(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[888],{5778:function(e,t,n){"use strict";var o=n(5163);o.__importStar(n(917)),o.__importDefault(n(1469))},9108:function(e,t,n){"use strict";var o=n(4406);Object.defineProperty(t,"__esModule",{value:!0}),t.useConfig=void 0;var a=n(5163).__importStar(n(2784)),s=(0,a.createContext)({});t.useConfig=function(){return(0,a.useContext)(s)},t.default=function(e){var t=e.children,n=e.loginUrl,c=void 0===n?o.env.NEXT_PUBLIC_AUTH0_LOGIN||"/api/auth/login":n;return a.default.createElement(s.Provider,{value:{loginUrl:c}},t)}},917:function(e,t,n){"use strict";var o=n(4406);Object.defineProperty(t,"__esModule",{value:!0}),t.useUser=t.UserContext=t.RequestError=void 0;var a=n(5163),s=a.__importStar(n(2784)),c=a.__importDefault(n(9108)),l=function(e){function RequestError(t){var n=e.call(this)||this;return n.status=t,Object.setPrototypeOf(n,RequestError.prototype),n}return a.__extends(RequestError,e),RequestError}(Error);t.RequestError=l;var u="You forgot to wrap your app in <UserProvider>";t.UserContext=(0,s.createContext)({get user(){throw Error(u)},get error(){throw Error(u)},get isLoading(){throw Error(u)},checkSession:function(){throw Error(u)}}),t.useUser=function(){return(0,s.useContext)(t.UserContext)};var userFetcher=function(e){return a.__awaiter(void 0,void 0,void 0,function(){var t;return a.__generator(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,fetch(e)];case 1:return t=n.sent(),[3,3];case 2:throw n.sent(),new l(0);case 3:if(204==t.status)return[2,void 0];if(t.ok)return[2,t.json()];throw new l(t.status)}})})};t.default=function(e){var n=e.children,l=e.user,u=e.profileUrl,h=void 0===u?o.env.NEXT_PUBLIC_AUTH0_PROFILE||"/api/auth/me":u,p=e.loginUrl,f=e.fetcher,m=void 0===f?userFetcher:f,g=a.__read((0,s.useState)({user:l,isLoading:!l}),2),y=g[0],v=g[1],b=(0,s.useCallback)(function(){return a.__awaiter(void 0,void 0,void 0,function(){var e,t;return a.__generator(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,m(h)];case 1:return e=n.sent(),v(function(t){return a.__assign(a.__assign({},t),{user:e,error:void 0})}),[3,3];case 2:return t=n.sent(),v(function(e){return a.__assign(a.__assign({},e),{error:t})}),[3,3];case 3:return[2]}})})},[h]);(0,s.useEffect)(function(){y.user||a.__awaiter(void 0,void 0,void 0,function(){return a.__generator(this,function(e){switch(e.label){case 0:return[4,b()];case 1:return e.sent(),v(function(e){return a.__assign(a.__assign({},e),{isLoading:!1})}),[2]}})})},[y.user]);var C=y.user,_=y.error,w=y.isLoading,S=(0,s.useMemo)(function(){return{user:C,error:_,isLoading:w,checkSession:b}},[C,_,w,b]);return s.default.createElement(c.default,{loginUrl:p},s.default.createElement(t.UserContext.Provider,{value:S},n))}},1469:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(5163),a=o.__importStar(n(2784)),s=n(9108),c=n(917);t.default=function(e,t){return void 0===t&&(t={}),function(n){var l=t.returnTo,u=t.onRedirecting,h=t.onError,p=(0,s.useConfig)().loginUrl,f=(0,c.useUser)(),m=f.user,g=f.error,y=f.isLoading;return((0,a.useEffect)(function(){if((!m||g)&&!y){if(l)e=l;else{var e,t=window.location.toString();e=t.replace(new URL(t).origin,"")||"/"}window.location.assign("".concat(p,"?returnTo=").concat(encodeURIComponent(e)))}},[m,g,y]),g)?(void 0===h?function(){return a.default.createElement(a.default.Fragment,null)}:h)(g):m?a.default.createElement(e,o.__assign({user:m},n)):(void 0===u?function(){return a.default.createElement(a.default.Fragment,null)}:u)()}}},1601:function(e,t,n){"use strict";n.d(t,{Jh:function(){return __generator},ZT:function(){return __extends},_T:function(){return __rest},fl:function(){return __spread},mG:function(){return __awaiter},pi:function(){return __assign}});/*! @azure/msal-browser v2.37.0 2023-05-01 *//*! *****************************************************************************
Copyright (c) Microsoft Corporation.

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var extendStatics=function(e,t){return(extendStatics=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function __extends(e,t){function __(){this.constructor=e}extendStatics(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}var __assign=function(){return(__assign=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};function __rest(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,o=Object.getOwnPropertySymbols(e);a<o.length;a++)0>t.indexOf(o[a])&&Object.prototype.propertyIsEnumerable.call(e,o[a])&&(n[o[a]]=e[o[a]]);return n}function __awaiter(e,t,n,o){return new(n||(n=Promise))(function(a,s){function fulfilled(e){try{step(o.next(e))}catch(e){s(e)}}function rejected(e){try{step(o.throw(e))}catch(e){s(e)}}function step(e){var t;e.done?a(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(fulfilled,rejected)}step((o=o.apply(e,t||[])).next())})}function __generator(e,t){var n,o,a,s,c={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return s={next:verb(0),throw:verb(1),return:verb(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function verb(s){return function(l){return function(s){if(n)throw TypeError("Generator is already executing.");for(;c;)try{if(n=1,o&&(a=2&s[0]?o.return:s[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,s[1])).done)return a;switch(o=0,a&&(s=[2&s[0],a.value]),s[0]){case 0:case 1:a=s;break;case 4:return c.label++,{value:s[1],done:!1};case 5:c.label++,o=s[1],s=[0];continue;case 7:s=c.ops.pop(),c.trys.pop();continue;default:if(!(a=(a=c.trys).length>0&&a[a.length-1])&&(6===s[0]||2===s[0])){c=0;continue}if(3===s[0]&&(!a||s[1]>a[0]&&s[1]<a[3])){c.label=s[1];break}if(6===s[0]&&c.label<a[1]){c.label=a[1],a=s;break}if(a&&c.label<a[2]){c.label=a[2],c.ops.push(s);break}a[2]&&c.ops.pop(),c.trys.pop();continue}s=t.call(e,c)}catch(e){s=[6,e],o=0}finally{n=a=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}function __spread(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var o,a,s=n.call(e),c=[];try{for(;(void 0===t||t-- >0)&&!(o=s.next()).done;)c.push(o.value)}catch(e){a={error:e}}finally{try{o&&!o.done&&(n=s.return)&&n.call(s)}finally{if(a)throw a.error}}return c}(arguments[t]));return e}},6832:function(e,t,n){"use strict";n.d(t,{W:function(){return c}});var o=n(1601),a=n(6959),s={redirectUriNotSet:{code:"redirect_uri_empty",desc:"A redirect URI is required for all calls, and none has been set."},postLogoutUriNotSet:{code:"post_logout_uri_empty",desc:"A post logout redirect has not been set."},storageNotSupportedError:{code:"storage_not_supported",desc:"Given storage configuration option was not supported."},noRedirectCallbacksSet:{code:"no_redirect_callbacks",desc:"No redirect callbacks have been set. Please call setRedirectCallbacks() with the appropriate function arguments before continuing. More information is available here: https://github.com/AzureAD/microsoft-authentication-library-for-js/wiki/MSAL-basics."},stubPcaInstanceCalled:{code:"stubbed_public_client_application_called",desc:"Stub instance of Public Client Application was called. If using msal-react, please ensure context is not used without a provider. For more visit: aka.ms/msaljs/browser-errors"},inMemRedirectUnavailable:{code:"in_mem_redirect_unavailable",desc:"Redirect cannot be supported. In-memory storage was selected and storeAuthStateInCookie=false, which would cause the library to be unable to handle the incoming hash. If you would like to use the redirect API, please use session/localStorage or set storeAuthStateInCookie=true."},entropyNotProvided:{code:"entropy_not_provided",desc:"The available browser crypto interface requires entropy set via system.cryptoOptions.entropy configuration option."}},c=function(e){function BrowserConfigurationAuthError(t,n){var o=e.call(this,t,n)||this;return o.name="BrowserConfigurationAuthError",Object.setPrototypeOf(o,BrowserConfigurationAuthError.prototype),o}return(0,o.ZT)(BrowserConfigurationAuthError,e),BrowserConfigurationAuthError.createRedirectUriEmptyError=function(){return new BrowserConfigurationAuthError(s.redirectUriNotSet.code,s.redirectUriNotSet.desc)},BrowserConfigurationAuthError.createPostLogoutRedirectUriEmptyError=function(){return new BrowserConfigurationAuthError(s.postLogoutUriNotSet.code,s.postLogoutUriNotSet.desc)},BrowserConfigurationAuthError.createStorageNotSupportedError=function(e){return new BrowserConfigurationAuthError(s.storageNotSupportedError.code,s.storageNotSupportedError.desc+" Given Location: "+e)},BrowserConfigurationAuthError.createRedirectCallbacksNotSetError=function(){return new BrowserConfigurationAuthError(s.noRedirectCallbacksSet.code,s.noRedirectCallbacksSet.desc)},BrowserConfigurationAuthError.createStubPcaInstanceCalledError=function(){return new BrowserConfigurationAuthError(s.stubPcaInstanceCalled.code,s.stubPcaInstanceCalled.desc)},BrowserConfigurationAuthError.createInMemoryRedirectUnavailableError=function(){return new BrowserConfigurationAuthError(s.inMemRedirectUnavailable.code,s.inMemRedirectUnavailable.desc)},BrowserConfigurationAuthError.createEntropyNotProvided=function(){return new BrowserConfigurationAuthError(s.entropyNotProvided.code,s.entropyNotProvided.desc)},BrowserConfigurationAuthError}(a.l)},6957:function(e,t,n){"use strict";var o,a;n.d(t,{t:function(){return o}}),(a=o||(o={})).INITIALIZE_START="msal:initializeStart",a.INITIALIZE_END="msal:initializeEnd",a.ACCOUNT_ADDED="msal:accountAdded",a.ACCOUNT_REMOVED="msal:accountRemoved",a.LOGIN_START="msal:loginStart",a.LOGIN_SUCCESS="msal:loginSuccess",a.LOGIN_FAILURE="msal:loginFailure",a.ACQUIRE_TOKEN_START="msal:acquireTokenStart",a.ACQUIRE_TOKEN_SUCCESS="msal:acquireTokenSuccess",a.ACQUIRE_TOKEN_FAILURE="msal:acquireTokenFailure",a.ACQUIRE_TOKEN_NETWORK_START="msal:acquireTokenFromNetworkStart",a.SSO_SILENT_START="msal:ssoSilentStart",a.SSO_SILENT_SUCCESS="msal:ssoSilentSuccess",a.SSO_SILENT_FAILURE="msal:ssoSilentFailure",a.ACQUIRE_TOKEN_BY_CODE_START="msal:acquireTokenByCodeStart",a.ACQUIRE_TOKEN_BY_CODE_SUCCESS="msal:acquireTokenByCodeSuccess",a.ACQUIRE_TOKEN_BY_CODE_FAILURE="msal:acquireTokenByCodeFailure",a.HANDLE_REDIRECT_START="msal:handleRedirectStart",a.HANDLE_REDIRECT_END="msal:handleRedirectEnd",a.POPUP_OPENED="msal:popupOpened",a.LOGOUT_START="msal:logoutStart",a.LOGOUT_SUCCESS="msal:logoutSuccess",a.LOGOUT_FAILURE="msal:logoutFailure",a.LOGOUT_END="msal:logoutEnd"},8527:function(e,t,n){"use strict";n.d(t,{$H:function(){return T},BD:function(){return P},Bs:function(){return w},EC:function(){return b},Gv:function(){return q},H4:function(){return L},Ix:function(){return v},Ky:function(){return y},Mm:function(){return O},Oq:function(){return _},WN:function(){return S},c4:function(){return C},kd:function(){return U},lA:function(){return k},lu:function(){return I},qx:function(){return R},s_:function(){return E},yo:function(){return M}});var o,a,s,c,l,u,h,p,f,m,g,y,v,b,C,_,w,S,E,T,k,I,x=n(6240),R={INTERACTION_IN_PROGRESS_VALUE:"interaction_in_progress",INVALID_GRANT_ERROR:"invalid_grant",POPUP_WIDTH:483,POPUP_HEIGHT:600,POPUP_NAME_PREFIX:"msal",DEFAULT_POLL_INTERVAL_MS:30,MSAL_SKU:"msal.js.browser"},P={CHANNEL_ID:"53ee284d-920a-4b59-9d30-a60315b26836",PREFERRED_EXTENSION_ID:"ppnbnpeolgkicgegkbkbjmhlideopiji",MATS_TELEMETRY:"MATS"};(o=y||(y={})).HandshakeRequest="Handshake",o.HandshakeResponse="HandshakeResponse",o.GetToken="GetToken",o.Response="Response",(a=v||(v={})).LocalStorage="localStorage",a.SessionStorage="sessionStorage",a.MemoryStorage="memoryStorage",(s=b||(b={})).GET="GET",s.POST="POST",(c=C||(C={})).AUTHORITY="authority",c.ACQUIRE_TOKEN_ACCOUNT="acquireToken.account",c.SESSION_STATE="session.state",c.REQUEST_STATE="request.state",c.NONCE_IDTOKEN="nonce.id_token",c.ORIGIN_URI="request.origin",c.RENEW_STATUS="token.renew.status",c.URL_HASH="urlHash",c.REQUEST_PARAMS="request.params",c.SCOPES="scopes",c.INTERACTION_STATUS_KEY="interaction.status",c.CCS_CREDENTIAL="ccs.credential",c.CORRELATION_ID="request.correlationId",c.NATIVE_REQUEST="request.native",c.REDIRECT_CONTEXT="request.redirect.context",(l=_||(_={})).ACCOUNT_KEYS="msal.account.keys",l.TOKEN_KEYS="msal.token.keys",(u=w||(w={})).WRAPPER_SKU="wrapper.sku",u.WRAPPER_VER="wrapper.version",(h=S||(S={}))[h.acquireTokenRedirect=861]="acquireTokenRedirect",h[h.acquireTokenPopup=862]="acquireTokenPopup",h[h.ssoSilent=863]="ssoSilent",h[h.acquireTokenSilent_authCode=864]="acquireTokenSilent_authCode",h[h.handleRedirectPromise=865]="handleRedirectPromise",h[h.acquireTokenByCode=866]="acquireTokenByCode",h[h.acquireTokenSilent_silentFlow=61]="acquireTokenSilent_silentFlow",h[h.logout=961]="logout",h[h.logoutPopup=962]="logoutPopup",(p=E||(E={})).Redirect="redirect",p.Popup="popup",p.Silent="silent",p.None="none",(f=T||(T={})).Startup="startup",f.Login="login",f.Logout="logout",f.AcquireToken="acquireToken",f.SsoSilent="ssoSilent",f.HandleRedirect="handleRedirect",f.None="none";var M={scopes:x.f_},O="jwk";(m=k||(k={})).React="@azure/msal-react",m.Angular="@azure/msal-angular";var L="msal.db",U=1,q=L+".keys";(g=I||(I={}))[g.Default=0]="Default",g[g.AccessToken=1]="AccessToken",g[g.AccessTokenAndRefreshToken=2]="AccessTokenAndRefreshToken",g[g.RefreshToken=3]="RefreshToken",g[g.RefreshTokenAndNetwork=4]="RefreshTokenAndNetwork",g[g.Skip=5]="Skip"},110:function(e,t,n){"use strict";n.d(t,{Jh:function(){return __generator},ZT:function(){return __extends},mG:function(){return __awaiter},pi:function(){return __assign},pr:function(){return __spreadArrays}});/*! @azure/msal-common v13.0.0 2023-05-01 *//*! *****************************************************************************
Copyright (c) Microsoft Corporation.

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var extendStatics=function(e,t){return(extendStatics=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function __extends(e,t){function __(){this.constructor=e}extendStatics(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}var __assign=function(){return(__assign=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};function __awaiter(e,t,n,o){return new(n||(n=Promise))(function(a,s){function fulfilled(e){try{step(o.next(e))}catch(e){s(e)}}function rejected(e){try{step(o.throw(e))}catch(e){s(e)}}function step(e){var t;e.done?a(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(fulfilled,rejected)}step((o=o.apply(e,t||[])).next())})}function __generator(e,t){var n,o,a,s,c={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return s={next:verb(0),throw:verb(1),return:verb(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function verb(s){return function(l){return function(s){if(n)throw TypeError("Generator is already executing.");for(;c;)try{if(n=1,o&&(a=2&s[0]?o.return:s[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,s[1])).done)return a;switch(o=0,a&&(s=[2&s[0],a.value]),s[0]){case 0:case 1:a=s;break;case 4:return c.label++,{value:s[1],done:!1};case 5:c.label++,o=s[1],s=[0];continue;case 7:s=c.ops.pop(),c.trys.pop();continue;default:if(!(a=(a=c.trys).length>0&&a[a.length-1])&&(6===s[0]||2===s[0])){c=0;continue}if(3===s[0]&&(!a||s[1]>a[0]&&s[1]<a[3])){c.label=s[1];break}if(6===s[0]&&c.label<a[1]){c.label=a[1],a=s;break}if(a&&c.label<a[2]){c.label=a[2],c.ops.push(s);break}a[2]&&c.ops.pop(),c.trys.pop();continue}s=t.call(e,c)}catch(e){s=[6,e],o=0}finally{n=a=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}function __spreadArrays(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;for(var o=Array(e),a=0,t=0;t<n;t++)for(var s=arguments[t],c=0,l=s.length;c<l;c++,a++)o[a]=s[c];return o}},6959:function(e,t,n){"use strict";n.d(t,{l:function(){return c}});var o=n(110),a=n(6240),s={unexpectedError:{code:"unexpected_error",desc:"Unexpected error in authentication."},postRequestFailed:{code:"post_request_failed",desc:"Post request failed from the network, could be a 4xx/5xx or a network unavailability. Please check the exact error code for details."}},c=function(e){function AuthError(t,n,o){var s=this,c=n?t+": "+n:t;return Object.setPrototypeOf(s=e.call(this,c)||this,AuthError.prototype),s.errorCode=t||a.gT.EMPTY_STRING,s.errorMessage=n||a.gT.EMPTY_STRING,s.subError=o||a.gT.EMPTY_STRING,s.name="AuthError",s}return(0,o.ZT)(AuthError,e),AuthError.prototype.setCorrelationId=function(e){this.correlationId=e},AuthError.createUnexpectedError=function(e){return new AuthError(s.unexpectedError.code,s.unexpectedError.desc+": "+e)},AuthError.createPostRequestFailed=function(e){return new AuthError(s.postRequestFailed.code,s.postRequestFailed.desc+": "+e)},AuthError}(Error)},2331:function(e,t,n){"use strict";n.d(t,{A:function(){return s},e:function(){return c}});var o=n(110),a=n(6959),s={clientInfoDecodingError:{code:"client_info_decoding_error",desc:"The client info could not be parsed/decoded correctly. Please review the trace to determine the root cause."},clientInfoEmptyError:{code:"client_info_empty_error",desc:"The client info was empty. Please review the trace to determine the root cause."},tokenParsingError:{code:"token_parsing_error",desc:"Token cannot be parsed. Please review stack trace to determine root cause."},nullOrEmptyToken:{code:"null_or_empty_token",desc:"The token is null or empty. Please review the trace to determine the root cause."},endpointResolutionError:{code:"endpoints_resolution_error",desc:"Error: could not resolve endpoints. Please check network and try again."},networkError:{code:"network_error",desc:"Network request failed. Please check network trace to determine root cause."},unableToGetOpenidConfigError:{code:"openid_config_error",desc:"Could not retrieve endpoints. Check your authority and verify the .well-known/openid-configuration endpoint returns the required endpoints."},hashNotDeserialized:{code:"hash_not_deserialized",desc:"The hash parameters could not be deserialized. Please review the trace to determine the root cause."},blankGuidGenerated:{code:"blank_guid_generated",desc:"The guid generated was blank. Please review the trace to determine the root cause."},invalidStateError:{code:"invalid_state",desc:"State was not the expected format. Please check the logs to determine whether the request was sent using ProtocolUtils.setRequestState()."},stateMismatchError:{code:"state_mismatch",desc:"State mismatch error. Please check your network. Continued requests may cause cache overflow."},stateNotFoundError:{code:"state_not_found",desc:"State not found"},nonceMismatchError:{code:"nonce_mismatch",desc:"Nonce mismatch error. This may be caused by a race condition in concurrent requests."},nonceNotFoundError:{code:"nonce_not_found",desc:"nonce not found"},authTimeNotFoundError:{code:"auth_time_not_found",desc:"Max Age was requested and the ID token is missing the auth_time variable. auth_time is an optional claim and is not enabled by default - it must be enabled. See https://aka.ms/msaljs/optional-claims for more information."},maxAgeTranspiredError:{code:"max_age_transpired",desc:"Max Age is set to 0, or too much time has elapsed since the last end-user authentication."},noTokensFoundError:{code:"no_tokens_found",desc:"No tokens were found for the given scopes, and no authorization code was passed to acquireToken. You must retrieve an authorization code before making a call to acquireToken()."},multipleMatchingTokens:{code:"multiple_matching_tokens",desc:"The cache contains multiple tokens satisfying the requirements. Call AcquireToken again providing more requirements such as authority or account."},multipleMatchingAccounts:{code:"multiple_matching_accounts",desc:"The cache contains multiple accounts satisfying the given parameters. Please pass more info to obtain the correct account"},multipleMatchingAppMetadata:{code:"multiple_matching_appMetadata",desc:"The cache contains multiple appMetadata satisfying the given parameters. Please pass more info to obtain the correct appMetadata"},tokenRequestCannotBeMade:{code:"request_cannot_be_made",desc:"Token request cannot be made without authorization code or refresh token."},appendEmptyScopeError:{code:"cannot_append_empty_scope",desc:"Cannot append null or empty scope to ScopeSet. Please check the stack trace for more info."},removeEmptyScopeError:{code:"cannot_remove_empty_scope",desc:"Cannot remove null or empty scope from ScopeSet. Please check the stack trace for more info."},appendScopeSetError:{code:"cannot_append_scopeset",desc:"Cannot append ScopeSet due to error."},emptyInputScopeSetError:{code:"empty_input_scopeset",desc:"Empty input ScopeSet cannot be processed."},DeviceCodePollingCancelled:{code:"device_code_polling_cancelled",desc:"Caller has cancelled token endpoint polling during device code flow by setting DeviceCodeRequest.cancel = true."},DeviceCodeExpired:{code:"device_code_expired",desc:"Device code is expired."},DeviceCodeUnknownError:{code:"device_code_unknown_error",desc:"Device code stopped polling for unknown reasons."},NoAccountInSilentRequest:{code:"no_account_in_silent_request",desc:"Please pass an account object, silent flow is not supported without account information"},invalidCacheRecord:{code:"invalid_cache_record",desc:"Cache record object was null or undefined."},invalidCacheEnvironment:{code:"invalid_cache_environment",desc:"Invalid environment when attempting to create cache entry"},noAccountFound:{code:"no_account_found",desc:"No account found in cache for given key."},CachePluginError:{code:"no cache plugin set on CacheManager",desc:"ICachePlugin needs to be set before using readFromStorage or writeFromStorage"},noCryptoObj:{code:"no_crypto_object",desc:"No crypto object detected. This is required for the following operation: "},invalidCacheType:{code:"invalid_cache_type",desc:"Invalid cache type"},unexpectedAccountType:{code:"unexpected_account_type",desc:"Unexpected account type."},unexpectedCredentialType:{code:"unexpected_credential_type",desc:"Unexpected credential type."},invalidAssertion:{code:"invalid_assertion",desc:"Client assertion must meet requirements described in https://tools.ietf.org/html/rfc7515"},invalidClientCredential:{code:"invalid_client_credential",desc:"Client credential (secret, certificate, or assertion) must not be empty when creating a confidential client. An application should at most have one credential"},tokenRefreshRequired:{code:"token_refresh_required",desc:"Cannot return token from cache because it must be refreshed. This may be due to one of the following reasons: forceRefresh parameter is set to true, claims have been requested, there is no cached access token or it is expired."},userTimeoutReached:{code:"user_timeout_reached",desc:"User defined timeout for device code polling reached"},tokenClaimsRequired:{code:"token_claims_cnf_required_for_signedjwt",desc:"Cannot generate a POP jwt if the token_claims are not populated"},noAuthorizationCodeFromServer:{code:"authorization_code_missing_from_server_response",desc:"Server response does not contain an authorization code to proceed"},noAzureRegionDetected:{code:"no_azure_region_detected",desc:"No azure region was detected and no fallback was made available"},accessTokenEntityNullError:{code:"access_token_entity_null",desc:"Access token entity is null, please check logs and cache to ensure a valid access token is present."},bindingKeyNotRemovedError:{code:"binding_key_not_removed",desc:"Could not remove the credential's binding key from storage."},logoutNotSupported:{code:"end_session_endpoint_not_supported",desc:"Provided authority does not support logout."},keyIdMissing:{code:"key_id_missing",desc:"A keyId value is missing from the requested bound token's cache record and is required to match the token to it's stored binding key."},noNetworkConnectivity:{code:"no_network_connectivity",desc:"No network connectivity. Check your internet connection."},userCanceledError:{code:"user_canceled",desc:"User canceled the flow."}},c=function(e){function ClientAuthError(t,n){var o=e.call(this,t,n)||this;return o.name="ClientAuthError",Object.setPrototypeOf(o,ClientAuthError.prototype),o}return(0,o.ZT)(ClientAuthError,e),ClientAuthError.createClientInfoDecodingError=function(e){return new ClientAuthError(s.clientInfoDecodingError.code,s.clientInfoDecodingError.desc+" Failed with error: "+e)},ClientAuthError.createClientInfoEmptyError=function(){return new ClientAuthError(s.clientInfoEmptyError.code,""+s.clientInfoEmptyError.desc)},ClientAuthError.createTokenParsingError=function(e){return new ClientAuthError(s.tokenParsingError.code,s.tokenParsingError.desc+" Failed with error: "+e)},ClientAuthError.createTokenNullOrEmptyError=function(e){return new ClientAuthError(s.nullOrEmptyToken.code,s.nullOrEmptyToken.desc+" Raw Token Value: "+e)},ClientAuthError.createEndpointDiscoveryIncompleteError=function(e){return new ClientAuthError(s.endpointResolutionError.code,s.endpointResolutionError.desc+" Detail: "+e)},ClientAuthError.createNetworkError=function(e,t){return new ClientAuthError(s.networkError.code,s.networkError.desc+" | Fetch client threw: "+t+" | Attempted to reach: "+e.split("?")[0])},ClientAuthError.createUnableToGetOpenidConfigError=function(e){return new ClientAuthError(s.unableToGetOpenidConfigError.code,s.unableToGetOpenidConfigError.desc+" Attempted to retrieve endpoints from: "+e)},ClientAuthError.createHashNotDeserializedError=function(e){return new ClientAuthError(s.hashNotDeserialized.code,s.hashNotDeserialized.desc+" Given Object: "+e)},ClientAuthError.createInvalidStateError=function(e,t){return new ClientAuthError(s.invalidStateError.code,s.invalidStateError.desc+" Invalid State: "+e+", Root Err: "+t)},ClientAuthError.createStateMismatchError=function(){return new ClientAuthError(s.stateMismatchError.code,s.stateMismatchError.desc)},ClientAuthError.createStateNotFoundError=function(e){return new ClientAuthError(s.stateNotFoundError.code,s.stateNotFoundError.desc+":  "+e)},ClientAuthError.createNonceMismatchError=function(){return new ClientAuthError(s.nonceMismatchError.code,s.nonceMismatchError.desc)},ClientAuthError.createAuthTimeNotFoundError=function(){return new ClientAuthError(s.authTimeNotFoundError.code,s.authTimeNotFoundError.desc)},ClientAuthError.createMaxAgeTranspiredError=function(){return new ClientAuthError(s.maxAgeTranspiredError.code,s.maxAgeTranspiredError.desc)},ClientAuthError.createNonceNotFoundError=function(e){return new ClientAuthError(s.nonceNotFoundError.code,s.nonceNotFoundError.desc+":  "+e)},ClientAuthError.createMultipleMatchingTokensInCacheError=function(){return new ClientAuthError(s.multipleMatchingTokens.code,s.multipleMatchingTokens.desc+".")},ClientAuthError.createMultipleMatchingAccountsInCacheError=function(){return new ClientAuthError(s.multipleMatchingAccounts.code,s.multipleMatchingAccounts.desc)},ClientAuthError.createMultipleMatchingAppMetadataInCacheError=function(){return new ClientAuthError(s.multipleMatchingAppMetadata.code,s.multipleMatchingAppMetadata.desc)},ClientAuthError.createTokenRequestCannotBeMadeError=function(){return new ClientAuthError(s.tokenRequestCannotBeMade.code,s.tokenRequestCannotBeMade.desc)},ClientAuthError.createAppendEmptyScopeToSetError=function(e){return new ClientAuthError(s.appendEmptyScopeError.code,s.appendEmptyScopeError.desc+" Given Scope: "+e)},ClientAuthError.createRemoveEmptyScopeFromSetError=function(e){return new ClientAuthError(s.removeEmptyScopeError.code,s.removeEmptyScopeError.desc+" Given Scope: "+e)},ClientAuthError.createAppendScopeSetError=function(e){return new ClientAuthError(s.appendScopeSetError.code,s.appendScopeSetError.desc+" Detail Error: "+e)},ClientAuthError.createEmptyInputScopeSetError=function(){return new ClientAuthError(s.emptyInputScopeSetError.code,""+s.emptyInputScopeSetError.desc)},ClientAuthError.createDeviceCodeCancelledError=function(){return new ClientAuthError(s.DeviceCodePollingCancelled.code,""+s.DeviceCodePollingCancelled.desc)},ClientAuthError.createDeviceCodeExpiredError=function(){return new ClientAuthError(s.DeviceCodeExpired.code,""+s.DeviceCodeExpired.desc)},ClientAuthError.createDeviceCodeUnknownError=function(){return new ClientAuthError(s.DeviceCodeUnknownError.code,""+s.DeviceCodeUnknownError.desc)},ClientAuthError.createNoAccountInSilentRequestError=function(){return new ClientAuthError(s.NoAccountInSilentRequest.code,""+s.NoAccountInSilentRequest.desc)},ClientAuthError.createNullOrUndefinedCacheRecord=function(){return new ClientAuthError(s.invalidCacheRecord.code,s.invalidCacheRecord.desc)},ClientAuthError.createInvalidCacheEnvironmentError=function(){return new ClientAuthError(s.invalidCacheEnvironment.code,s.invalidCacheEnvironment.desc)},ClientAuthError.createNoAccountFoundError=function(){return new ClientAuthError(s.noAccountFound.code,s.noAccountFound.desc)},ClientAuthError.createCachePluginError=function(){return new ClientAuthError(s.CachePluginError.code,""+s.CachePluginError.desc)},ClientAuthError.createNoCryptoObjectError=function(e){return new ClientAuthError(s.noCryptoObj.code,""+s.noCryptoObj.desc+e)},ClientAuthError.createInvalidCacheTypeError=function(){return new ClientAuthError(s.invalidCacheType.code,""+s.invalidCacheType.desc)},ClientAuthError.createUnexpectedAccountTypeError=function(){return new ClientAuthError(s.unexpectedAccountType.code,""+s.unexpectedAccountType.desc)},ClientAuthError.createUnexpectedCredentialTypeError=function(){return new ClientAuthError(s.unexpectedCredentialType.code,""+s.unexpectedCredentialType.desc)},ClientAuthError.createInvalidAssertionError=function(){return new ClientAuthError(s.invalidAssertion.code,""+s.invalidAssertion.desc)},ClientAuthError.createInvalidCredentialError=function(){return new ClientAuthError(s.invalidClientCredential.code,""+s.invalidClientCredential.desc)},ClientAuthError.createRefreshRequiredError=function(){return new ClientAuthError(s.tokenRefreshRequired.code,s.tokenRefreshRequired.desc)},ClientAuthError.createUserTimeoutReachedError=function(){return new ClientAuthError(s.userTimeoutReached.code,s.userTimeoutReached.desc)},ClientAuthError.createTokenClaimsRequiredError=function(){return new ClientAuthError(s.tokenClaimsRequired.code,s.tokenClaimsRequired.desc)},ClientAuthError.createNoAuthCodeInServerResponseError=function(){return new ClientAuthError(s.noAuthorizationCodeFromServer.code,s.noAuthorizationCodeFromServer.desc)},ClientAuthError.createBindingKeyNotRemovedError=function(){return new ClientAuthError(s.bindingKeyNotRemovedError.code,s.bindingKeyNotRemovedError.desc)},ClientAuthError.createLogoutNotSupportedError=function(){return new ClientAuthError(s.logoutNotSupported.code,s.logoutNotSupported.desc)},ClientAuthError.createKeyIdMissingError=function(){return new ClientAuthError(s.keyIdMissing.code,s.keyIdMissing.desc)},ClientAuthError.createNoNetworkConnectivityError=function(){return new ClientAuthError(s.noNetworkConnectivity.code,s.noNetworkConnectivity.desc)},ClientAuthError.createUserCanceledError=function(){return new ClientAuthError(s.userCanceledError.code,s.userCanceledError.desc)},ClientAuthError}(a.l)},6823:function(e,t,n){"use strict";n.d(t,{Y:function(){return l},i:function(){return a}});var o,a,s=n(6255),c=n(6240);(o=a||(a={}))[o.Error=0]="Error",o[o.Warning=1]="Warning",o[o.Info=2]="Info",o[o.Verbose=3]="Verbose",o[o.Trace=4]="Trace";var l=function(){function Logger(e,t,n){this.level=a.Info;var o=e||Logger.createDefaultLoggerOptions();this.localCallback=o.loggerCallback||function(){},this.piiLoggingEnabled=o.piiLoggingEnabled||!1,this.level="number"==typeof o.logLevel?o.logLevel:a.Info,this.correlationId=o.correlationId||c.gT.EMPTY_STRING,this.packageName=t||c.gT.EMPTY_STRING,this.packageVersion=n||c.gT.EMPTY_STRING}return Logger.createDefaultLoggerOptions=function(){return{loggerCallback:function(){},piiLoggingEnabled:!1,logLevel:a.Info}},Logger.prototype.clone=function(e,t,n){return new Logger({loggerCallback:this.localCallback,piiLoggingEnabled:this.piiLoggingEnabled,logLevel:this.level,correlationId:n||this.correlationId},e,t)},Logger.prototype.logMessage=function(e,t){if(!(t.logLevel>this.level)&&(this.piiLoggingEnabled||!t.containsPii)){var n=new Date().toUTCString(),o=(s.x.isEmpty(t.correlationId)?s.x.isEmpty(this.correlationId)?"["+n+"]":"["+n+"] : ["+this.correlationId+"]":"["+n+"] : ["+t.correlationId+"]")+" : "+this.packageName+"@"+this.packageVersion+" : "+a[t.logLevel]+" - "+e;this.executeCallback(t.logLevel,o,t.containsPii||!1)}},Logger.prototype.executeCallback=function(e,t,n){this.localCallback&&this.localCallback(e,t,n)},Logger.prototype.error=function(e,t){this.logMessage(e,{logLevel:a.Error,containsPii:!1,correlationId:t||c.gT.EMPTY_STRING})},Logger.prototype.errorPii=function(e,t){this.logMessage(e,{logLevel:a.Error,containsPii:!0,correlationId:t||c.gT.EMPTY_STRING})},Logger.prototype.warning=function(e,t){this.logMessage(e,{logLevel:a.Warning,containsPii:!1,correlationId:t||c.gT.EMPTY_STRING})},Logger.prototype.warningPii=function(e,t){this.logMessage(e,{logLevel:a.Warning,containsPii:!0,correlationId:t||c.gT.EMPTY_STRING})},Logger.prototype.info=function(e,t){this.logMessage(e,{logLevel:a.Info,containsPii:!1,correlationId:t||c.gT.EMPTY_STRING})},Logger.prototype.infoPii=function(e,t){this.logMessage(e,{logLevel:a.Info,containsPii:!0,correlationId:t||c.gT.EMPTY_STRING})},Logger.prototype.verbose=function(e,t){this.logMessage(e,{logLevel:a.Verbose,containsPii:!1,correlationId:t||c.gT.EMPTY_STRING})},Logger.prototype.verbosePii=function(e,t){this.logMessage(e,{logLevel:a.Verbose,containsPii:!0,correlationId:t||c.gT.EMPTY_STRING})},Logger.prototype.trace=function(e,t){this.logMessage(e,{logLevel:a.Trace,containsPii:!1,correlationId:t||c.gT.EMPTY_STRING})},Logger.prototype.tracePii=function(e,t){this.logMessage(e,{logLevel:a.Trace,containsPii:!0,correlationId:t||c.gT.EMPTY_STRING})},Logger.prototype.isPiiLoggingEnabled=function(){return this.piiLoggingEnabled||!1},Logger}()},6240:function(e,t,n){"use strict";n.d(t,{$f:function(){return ea},As:function(){return P},Bv:function(){return q},D1:function(){return em},Fo:function(){return R},Ge:function(){return $},HN:function(){return ep},L:function(){return er},LL:function(){return V},NJ:function(){return es},Nb:function(){return x},QU:function(){return eh},SZ:function(){return k},To:function(){return et},VO:function(){return M},VX:function(){return ec},Vi:function(){return I},W:function(){return Y},YY:function(){return J},bb:function(){return ef},ch:function(){return ed},d3:function(){return H},dg:function(){return el},f_:function(){return ei},gT:function(){return eo},hO:function(){return K},iR:function(){return U},ki:function(){return X},pQ:function(){return G},qJ:function(){return L},sR:function(){return eu},vw:function(){return O}});var o,a,s,c,l,u,h,p,f,m,g,y,v,b,C,_,w,S,E,T,k,I,x,R,P,M,O,L,U,q,H,V,G,K,$,J,Y,X,et,er,en=n(110),eo={LIBRARY_NAME:"MSAL.JS",SKU:"msal.js.common",CACHE_PREFIX:"msal",DEFAULT_AUTHORITY:"https://login.microsoftonline.com/common/",DEFAULT_AUTHORITY_HOST:"login.microsoftonline.com",DEFAULT_COMMON_TENANT:"common",ADFS:"adfs",DSTS:"dstsv2",AAD_INSTANCE_DISCOVERY_ENDPT:"https://login.microsoftonline.com/common/discovery/instance?api-version=1.1&authorization_endpoint=",CIAM_AUTH_URL:".ciamlogin.com",AAD_TENANT_DOMAIN_SUFFIX:".onmicrosoft.com",RESOURCE_DELIM:"|",NO_ACCOUNT:"NO_ACCOUNT",CLAIMS:"claims",CONSUMER_UTID:"9188040d-6c67-4c5b-b112-36a304b66dad",OPENID_SCOPE:"openid",PROFILE_SCOPE:"profile",OFFLINE_ACCESS_SCOPE:"offline_access",EMAIL_SCOPE:"email",CODE_RESPONSE_TYPE:"code",CODE_GRANT_TYPE:"authorization_code",RT_GRANT_TYPE:"refresh_token",FRAGMENT_RESPONSE_MODE:"fragment",S256_CODE_CHALLENGE_METHOD:"S256",URL_FORM_CONTENT_TYPE:"application/x-www-form-urlencoded;charset=utf-8",AUTHORIZATION_PENDING:"authorization_pending",NOT_DEFINED:"not_defined",EMPTY_STRING:"",NOT_APPLICABLE:"N/A",FORWARD_SLASH:"/",IMDS_ENDPOINT:"http://169.254.169.254/metadata/instance/compute/location",IMDS_VERSION:"2020-06-01",IMDS_TIMEOUT:2e3,AZURE_REGION_AUTO_DISCOVER_FLAG:"TryAutoDetect",REGIONAL_AUTH_PUBLIC_CLOUD_SUFFIX:"login.microsoft.com",REGIONAL_AUTH_NON_MSI_QUERY_STRING:"allowestsrnonmsi=true",KNOWN_PUBLIC_CLOUDS:["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"],TOKEN_RESPONSE_TYPE:"token",ID_TOKEN_RESPONSE_TYPE:"id_token",SHR_NONCE_VALIDITY:240,INVALID_INSTANCE:"invalid_instance"},ei=[eo.OPENID_SCOPE,eo.PROFILE_SCOPE,eo.OFFLINE_ACCESS_SCOPE],ea=(0,en.pr)(ei,[eo.EMAIL_SCOPE]);(o=k||(k={})).CONTENT_TYPE="Content-Type",o.RETRY_AFTER="Retry-After",o.CCS_HEADER="X-AnchorMailbox",o.WWWAuthenticate="WWW-Authenticate",o.AuthenticationInfo="Authentication-Info",o.X_MS_REQUEST_ID="x-ms-request-id",o.X_MS_HTTP_VERSION="x-ms-httpver",(a=I||(I={})).ID_TOKEN="idtoken",a.CLIENT_INFO="client.info",a.ADAL_ID_TOKEN="adal.idtoken",a.ERROR="error",a.ERROR_DESC="error.description",a.ACTIVE_ACCOUNT="active-account",a.ACTIVE_ACCOUNT_FILTERS="active-account-filters",(s=x||(x={})).COMMON="common",s.ORGANIZATIONS="organizations",s.CONSUMERS="consumers",(c=R||(R={})).CLIENT_ID="client_id",c.REDIRECT_URI="redirect_uri",c.RESPONSE_TYPE="response_type",c.RESPONSE_MODE="response_mode",c.GRANT_TYPE="grant_type",c.CLAIMS="claims",c.SCOPE="scope",c.ERROR="error",c.ERROR_DESCRIPTION="error_description",c.ACCESS_TOKEN="access_token",c.ID_TOKEN="id_token",c.REFRESH_TOKEN="refresh_token",c.EXPIRES_IN="expires_in",c.STATE="state",c.NONCE="nonce",c.PROMPT="prompt",c.SESSION_STATE="session_state",c.CLIENT_INFO="client_info",c.CODE="code",c.CODE_CHALLENGE="code_challenge",c.CODE_CHALLENGE_METHOD="code_challenge_method",c.CODE_VERIFIER="code_verifier",c.CLIENT_REQUEST_ID="client-request-id",c.X_CLIENT_SKU="x-client-SKU",c.X_CLIENT_VER="x-client-VER",c.X_CLIENT_OS="x-client-OS",c.X_CLIENT_CPU="x-client-CPU",c.X_CLIENT_CURR_TELEM="x-client-current-telemetry",c.X_CLIENT_LAST_TELEM="x-client-last-telemetry",c.X_MS_LIB_CAPABILITY="x-ms-lib-capability",c.X_APP_NAME="x-app-name",c.X_APP_VER="x-app-ver",c.POST_LOGOUT_URI="post_logout_redirect_uri",c.ID_TOKEN_HINT="id_token_hint",c.DEVICE_CODE="device_code",c.CLIENT_SECRET="client_secret",c.CLIENT_ASSERTION="client_assertion",c.CLIENT_ASSERTION_TYPE="client_assertion_type",c.TOKEN_TYPE="token_type",c.REQ_CNF="req_cnf",c.OBO_ASSERTION="assertion",c.REQUESTED_TOKEN_USE="requested_token_use",c.ON_BEHALF_OF="on_behalf_of",c.FOCI="foci",c.CCS_HEADER="X-AnchorMailbox",c.RETURN_SPA_CODE="return_spa_code",c.NATIVE_BROKER="nativebroker",c.LOGOUT_HINT="logout_hint",(l=P||(P={})).ACCESS_TOKEN="access_token",l.XMS_CC="xms_cc";var es={LOGIN:"login",SELECT_ACCOUNT:"select_account",CONSENT:"consent",NONE:"none",CREATE:"create",NO_SESSION:"no_session"};(u=M||(M={})).ACCOUNT="account",u.SID="sid",u.LOGIN_HINT="login_hint",u.ID_TOKEN="id_token",u.DOMAIN_HINT="domain_hint",u.ORGANIZATIONS="organizations",u.CONSUMERS="consumers",u.ACCOUNT_ID="accountIdentifier",u.HOMEACCOUNT_ID="homeAccountIdentifier";var ec={PLAIN:"plain",S256:"S256"};(h=O||(O={})).QUERY="query",h.FRAGMENT="fragment",h.FORM_POST="form_post",(p=L||(L={})).IMPLICIT_GRANT="implicit",p.AUTHORIZATION_CODE_GRANT="authorization_code",p.CLIENT_CREDENTIALS_GRANT="client_credentials",p.RESOURCE_OWNER_PASSWORD_GRANT="password",p.REFRESH_TOKEN_GRANT="refresh_token",p.DEVICE_CODE_GRANT="device_code",p.JWT_BEARER="urn:ietf:params:oauth:grant-type:jwt-bearer",(f=U||(U={})).MSSTS_ACCOUNT_TYPE="MSSTS",f.ADFS_ACCOUNT_TYPE="ADFS",f.MSAV1_ACCOUNT_TYPE="MSA",f.GENERIC_ACCOUNT_TYPE="Generic",(m=q||(q={})).CACHE_KEY_SEPARATOR="-",m.CLIENT_INFO_SEPARATOR=".",(g=H||(H={})).ID_TOKEN="IdToken",g.ACCESS_TOKEN="AccessToken",g.ACCESS_TOKEN_WITH_AUTH_SCHEME="AccessToken_With_AuthScheme",g.REFRESH_TOKEN="RefreshToken",(y=V||(V={}))[y.ADFS=1001]="ADFS",y[y.MSA=1002]="MSA",y[y.MSSTS=1003]="MSSTS",y[y.GENERIC=1004]="GENERIC",y[y.ACCESS_TOKEN=2001]="ACCESS_TOKEN",y[y.REFRESH_TOKEN=2002]="REFRESH_TOKEN",y[y.ID_TOKEN=2003]="ID_TOKEN",y[y.APP_METADATA=3001]="APP_METADATA",y[y.UNDEFINED=9999]="UNDEFINED";var el="appmetadata",eu="client_info",ed="1",eh={CACHE_KEY:"authority-metadata",REFRESH_TIME_SECONDS:86400};(v=G||(G={})).CONFIG="config",v.CACHE="cache",v.NETWORK="network",v.HARDCODED_VALUES="hardcoded_values";var ep={SCHEMA_VERSION:5,MAX_CUR_HEADER_BYTES:80,MAX_LAST_HEADER_BYTES:330,MAX_CACHED_ERRORS:50,CACHE_KEY:"server-telemetry",CATEGORY_SEPARATOR:"|",VALUE_SEPARATOR:",",OVERFLOW_TRUE:"1",OVERFLOW_FALSE:"0",UNKNOWN_ERROR:"unknown_error"};(b=K||(K={})).BEARER="Bearer",b.POP="pop",b.SSH="ssh-cert";var ef={DEFAULT_THROTTLE_TIME_SECONDS:60,DEFAULT_MAX_THROTTLE_TIME_SECONDS:3600,THROTTLING_PREFIX:"throttling",X_MS_LIB_CAPABILITY_VALUE:"retry-after, h429"},em={INVALID_GRANT_ERROR:"invalid_grant",CLIENT_MISMATCH_ERROR:"client_mismatch"};(C=$||($={})).username="username",C.password="password",(_=J||(J={}))[_.httpSuccess=200]="httpSuccess",_[_.httpBadRequest=400]="httpBadRequest",(w=Y||(Y={})).FAILED_AUTO_DETECTION="1",w.INTERNAL_CACHE="2",w.ENVIRONMENT_VARIABLE="3",w.IMDS="4",(S=X||(X={})).CONFIGURED_MATCHES_DETECTED="1",S.CONFIGURED_NO_AUTO_DETECTION="2",S.CONFIGURED_NOT_DETECTED="3",S.AUTO_DETECTION_REQUESTED_SUCCESSFUL="4",S.AUTO_DETECTION_REQUESTED_FAILED="5",(E=et||(et={})).NO_CACHE_HIT="0",E.FORCE_REFRESH="1",E.NO_CACHED_ACCESS_TOKEN="2",E.CACHED_ACCESS_TOKEN_EXPIRED="3",E.REFRESH_CACHED_ACCESS_TOKEN="4",(T=er||(er={})).Jwt="JWT",T.Jwk="JWK",T.Pop="pop"},6255:function(e,t,n){"use strict";n.d(t,{x:function(){return a}});var o=n(2331),a=function(){function StringUtils(){}return StringUtils.decodeAuthToken=function(e){if(StringUtils.isEmpty(e))throw o.e.createTokenNullOrEmptyError(e);var t=/^([^\.\s]*)\.([^\.\s]+)\.([^\.\s]*)$/.exec(e);if(!t||t.length<4)throw o.e.createTokenParsingError("Given token is malformed: "+JSON.stringify(e));return{header:t[1],JWSPayload:t[2],JWSSig:t[3]}},StringUtils.isEmpty=function(e){return void 0===e||!e||0===e.length},StringUtils.isEmptyObj=function(e){if(e&&!StringUtils.isEmpty(e))try{var t=JSON.parse(e);return 0===Object.keys(t).length}catch(e){}return!0},StringUtils.startsWith=function(e,t){return 0===e.indexOf(t)},StringUtils.endsWith=function(e,t){return e.length>=t.length&&e.lastIndexOf(t)===e.length-t.length},StringUtils.queryStringToObject=function(e){var t={},n=e.split("&"),decode=function(e){return decodeURIComponent(e.replace(/\+/g," "))};return n.forEach(function(e){if(e.trim()){var n=e.split(/=(.+)/g,2),o=n[0],a=n[1];o&&a&&(t[decode(o)]=decode(a))}}),t},StringUtils.trimArrayEntries=function(e){return e.map(function(e){return e.trim()})},StringUtils.removeEmptyStringsFromArray=function(e){return e.filter(function(e){return!StringUtils.isEmpty(e)})},StringUtils.jsonParseHelper=function(e){try{return JSON.parse(e)}catch(e){return null}},StringUtils.matchPattern=function(e,t){return new RegExp(e.replace(/\\/g,"\\\\").replace(/\*/g,"[^ ]*").replace(/\?/g,"\\?")).test(t)},StringUtils}()},9870:function(e,t,n){"use strict";n.d(t,{rL:function(){return MsalProvider}});var o,a,s=n(2784),c=n(6832),l=n(8527),u=n(6823),h=n(6957),p=function(){function EventMessageUtils(){}return EventMessageUtils.getInteractionStatusFromEvent=function(e,t){switch(e.eventType){case h.t.LOGIN_START:return l.$H.Login;case h.t.SSO_SILENT_START:return l.$H.SsoSilent;case h.t.ACQUIRE_TOKEN_START:if(e.interactionType===l.s_.Redirect||e.interactionType===l.s_.Popup)return l.$H.AcquireToken;break;case h.t.HANDLE_REDIRECT_START:return l.$H.HandleRedirect;case h.t.LOGOUT_START:return l.$H.Logout;case h.t.SSO_SILENT_SUCCESS:case h.t.SSO_SILENT_FAILURE:if(t&&t!==l.$H.SsoSilent)break;return l.$H.None;case h.t.LOGOUT_END:if(t&&t!==l.$H.Logout)break;return l.$H.None;case h.t.HANDLE_REDIRECT_END:if(t&&t!==l.$H.HandleRedirect)break;return l.$H.None;case h.t.LOGIN_SUCCESS:case h.t.LOGIN_FAILURE:case h.t.ACQUIRE_TOKEN_SUCCESS:case h.t.ACQUIRE_TOKEN_FAILURE:if(e.interactionType===l.s_.Redirect||e.interactionType===l.s_.Popup){if(t&&t!==l.$H.Login&&t!==l.$H.AcquireToken)break;return l.$H.None}}return null},EventMessageUtils}();let f={instance:{initialize:function(){return Promise.reject(c.W.createStubPcaInstanceCalledError())},acquireTokenPopup:function(){return Promise.reject(c.W.createStubPcaInstanceCalledError())},acquireTokenRedirect:function(){return Promise.reject(c.W.createStubPcaInstanceCalledError())},acquireTokenSilent:function(){return Promise.reject(c.W.createStubPcaInstanceCalledError())},acquireTokenByCode:function(){return Promise.reject(c.W.createStubPcaInstanceCalledError())},getAllAccounts:function(){return[]},getAccountByHomeId:function(){return null},getAccountByUsername:function(){return null},getAccountByLocalId:function(){return null},handleRedirectPromise:function(){return Promise.reject(c.W.createStubPcaInstanceCalledError())},loginPopup:function(){return Promise.reject(c.W.createStubPcaInstanceCalledError())},loginRedirect:function(){return Promise.reject(c.W.createStubPcaInstanceCalledError())},logout:function(){return Promise.reject(c.W.createStubPcaInstanceCalledError())},logoutRedirect:function(){return Promise.reject(c.W.createStubPcaInstanceCalledError())},logoutPopup:function(){return Promise.reject(c.W.createStubPcaInstanceCalledError())},ssoSilent:function(){return Promise.reject(c.W.createStubPcaInstanceCalledError())},addEventCallback:function(){return null},removeEventCallback:function(){},addPerformanceCallback:function(){return""},removePerformanceCallback:function(){return!1},enableAccountStorageEvents:function(){},disableAccountStorageEvents:function(){},getTokenCache:function(){throw c.W.createStubPcaInstanceCalledError()},getLogger:function(){throw c.W.createStubPcaInstanceCalledError()},setLogger:function(){},setActiveAccount:function(){},getActiveAccount:function(){return null},initializeWrapperLibrary:function(){},setNavigationClient:function(){},getConfiguration:function(){throw c.W.createStubPcaInstanceCalledError()}},inProgress:l.$H.None,accounts:[],logger:new u.Y({})},m=(0,s.createContext)(f);function accountArraysAreEqual(e,t){if(e.length!==t.length)return!1;let n=[...t];return e.every(e=>{let t=n.shift();return!!e&&!!t&&e.homeAccountId===t.homeAccountId&&e.localAccountId===t.localAccountId&&e.username===t.username})}m.Consumer;let g="1.5.7";(o=a||(a={})).UNBLOCK_INPROGRESS="UNBLOCK_INPROGRESS",o.EVENT="EVENT";let reducer=(e,t)=>{let{type:n,payload:o}=t,s=e.inProgress;switch(n){case a.UNBLOCK_INPROGRESS:e.inProgress===l.$H.Startup&&(s=l.$H.None,o.logger.info("MsalProvider - handleRedirectPromise resolved, setting inProgress to 'none'"));break;case a.EVENT:let c=o.message,u=p.getInteractionStatusFromEvent(c,e.inProgress);u&&(o.logger.info(`MsalProvider - ${c.eventType} results in setting inProgress from ${e.inProgress} to ${u}`),s=u);break;default:throw Error(`Unknown action type: ${n}`)}let h=o.instance.getAllAccounts();return s===e.inProgress||accountArraysAreEqual(h,e.accounts)?s!==e.inProgress?{...e,inProgress:s}:accountArraysAreEqual(h,e.accounts)?e:{...e,accounts:h}:{...e,inProgress:s,accounts:h}};function MsalProvider(e){let{instance:t,children:n}=e;(0,s.useEffect)(()=>{t.initializeWrapperLibrary(l.lA.React,g)},[t]);let o=(0,s.useMemo)(()=>t.getLogger().clone("@azure/msal-react",g),[t]),[c,u]=(0,s.useReducer)(reducer,void 0,()=>({inProgress:l.$H.Startup,accounts:t.getAllAccounts()}));(0,s.useEffect)(()=>{let e=t.addEventCallback(e=>{u({payload:{instance:t,logger:o,message:e},type:a.EVENT})});return o.verbose(`MsalProvider - Registered event callback with id: ${e}`),t.initialize().then(()=>{t.handleRedirectPromise().catch(()=>{}).finally(()=>{u({payload:{instance:t,logger:o},type:a.UNBLOCK_INPROGRESS})})}),()=>{e&&(o.verbose(`MsalProvider - Removing event callback ${e}`),t.removeEventCallback(e))}},[t,o]);let h={instance:t,inProgress:c.inProgress,accounts:c.accounts,logger:o};return s.createElement(m.Provider,{value:h},n)}},1361:function(e){var t="undefined"!=typeof Element,n="function"==typeof Map,o="function"==typeof Set,a="function"==typeof ArrayBuffer&&!!ArrayBuffer.isView;e.exports=function(e,s){try{return function equal(e,s){if(e===s)return!0;if(e&&s&&"object"==typeof e&&"object"==typeof s){var c,l,u,h;if(e.constructor!==s.constructor)return!1;if(Array.isArray(e)){if((c=e.length)!=s.length)return!1;for(l=c;0!=l--;)if(!equal(e[l],s[l]))return!1;return!0}if(n&&e instanceof Map&&s instanceof Map){if(e.size!==s.size)return!1;for(h=e.entries();!(l=h.next()).done;)if(!s.has(l.value[0]))return!1;for(h=e.entries();!(l=h.next()).done;)if(!equal(l.value[1],s.get(l.value[0])))return!1;return!0}if(o&&e instanceof Set&&s instanceof Set){if(e.size!==s.size)return!1;for(h=e.entries();!(l=h.next()).done;)if(!s.has(l.value[0]))return!1;return!0}if(a&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(s)){if((c=e.length)!=s.length)return!1;for(l=c;0!=l--;)if(e[l]!==s[l])return!1;return!0}if(e.constructor===RegExp)return e.source===s.source&&e.flags===s.flags;if(e.valueOf!==Object.prototype.valueOf&&"function"==typeof e.valueOf&&"function"==typeof s.valueOf)return e.valueOf()===s.valueOf();if(e.toString!==Object.prototype.toString&&"function"==typeof e.toString&&"function"==typeof s.toString)return e.toString()===s.toString();if((c=(u=Object.keys(e)).length)!==Object.keys(s).length)return!1;for(l=c;0!=l--;)if(!Object.prototype.hasOwnProperty.call(s,u[l]))return!1;if(t&&e instanceof Element)return!1;for(l=c;0!=l--;)if(("_owner"!==u[l]&&"__v"!==u[l]&&"__o"!==u[l]||!e.$$typeof)&&!equal(e[u[l]],s[u[l]]))return!1;return!0}return e!=e&&s!=s}(e,s)}catch(e){if((e.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw e}}},2107:function(e,t,n){"use strict";n.d(t,{Z:function(){return createCache}});var o=function(){function StyleSheet(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var e=StyleSheet.prototype;return e.hydrate=function(e){e.forEach(this._insertTag)},e.insert=function(e){if(this.ctr%(this.isSpeedy?65e3:1)==0){var t;this._insertTag(((t=document.createElement("style")).setAttribute("data-emotion",this.key),void 0!==this.nonce&&t.setAttribute("nonce",this.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t))}var n=this.tags[this.tags.length-1];if(this.isSpeedy){var o=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(n);try{o.insertRule(e,o.cssRules.length)}catch(e){}}else n.appendChild(document.createTextNode(e));this.ctr++},e.flush=function(){this.tags.forEach(function(e){return e.parentNode&&e.parentNode.removeChild(e)}),this.tags=[],this.ctr=0},StyleSheet}(),a=Math.abs,s=String.fromCharCode,c=Object.assign;function Utility_replace(e,t,n){return e.replace(t,n)}function indexof(e,t){return e.indexOf(t)}function Utility_charat(e,t){return 0|e.charCodeAt(t)}function Utility_substr(e,t,n){return e.slice(t,n)}function Utility_strlen(e){return e.length}function Utility_append(e,t){return t.push(e),e}var l=1,u=1,h=0,p=0,f=0,m="";function node(e,t,n,o,a,s,c){return{value:e,root:t,parent:n,type:o,props:a,children:s,line:l,column:u,length:c,return:""}}function Tokenizer_copy(e,t){return c(node("",null,null,"",null,null,0),e,{length:-e.length},t)}function next(){return f=p<h?Utility_charat(m,p++):0,u++,10===f&&(u=1,l++),f}function peek(){return Utility_charat(m,p)}function token(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function alloc(e){return l=u=1,h=Utility_strlen(m=e),p=0,[]}function delimit(e){var t,n;return(t=p-1,n=function delimiter(e){for(;next();)switch(f){case e:return p;case 34:case 39:34!==e&&39!==e&&delimiter(f);break;case 40:41===e&&delimiter(e);break;case 92:next()}return p}(91===e?e+2:40===e?e+1:e),Utility_substr(m,t,n)).trim()}var g="-ms-",y="-moz-",v="-webkit-",b="comm",C="rule",_="decl",w="@keyframes";function Serializer_serialize(e,t){for(var n="",o=e.length,a=0;a<o;a++)n+=t(e[a],a,e,t)||"";return n}function stringify(e,t,n,o){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case _:return e.return=e.return||e.value;case b:return"";case w:return e.return=e.value+"{"+Serializer_serialize(e.children,o)+"}";case C:e.value=e.props.join(",")}return Utility_strlen(n=Serializer_serialize(e.children,o))?e.return=e.value+"{"+n+"}":""}function ruleset(e,t,n,o,s,c,l,u,h,p,f){for(var m=s-1,g=0===s?c:[""],y=g.length,v=0,b=0,_=0;v<o;++v)for(var w=0,S=Utility_substr(e,m+1,m=a(b=l[v])),E=e;w<y;++w)(E=(b>0?g[w]+" "+S:Utility_replace(S,/&\f/g,g[w])).trim())&&(h[_++]=E);return node(e,t,n,0===s?C:u,h,p,f)}function declaration(e,t,n,o){return node(e,t,n,_,Utility_substr(e,0,o),Utility_substr(e,o+1,-1),o)}var identifierWithPointTracking=function(e,t,n){for(var o=0,a=0;o=a,a=peek(),38===o&&12===a&&(t[n]=1),!token(a);)next();return Utility_substr(m,e,p)},toRules=function(e,t){var n=-1,o=44;do switch(token(o)){case 0:38===o&&12===peek()&&(t[n]=1),e[n]+=identifierWithPointTracking(p-1,t,n);break;case 2:e[n]+=delimit(o);break;case 4:if(44===o){e[++n]=58===peek()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=s(o)}while(o=next());return e},getRules=function(e,t){var n;return n=toRules(alloc(e),t),m="",n},S=new WeakMap,compat=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,o=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||S.get(n))&&!o){S.set(e,!0);for(var a=[],s=getRules(t,a),c=n.props,l=0,u=0;l<s.length;l++)for(var h=0;h<c.length;h++,u++)e.props[u]=a[l]?s[l].replace(/&\f/g,c[h]):c[h]+" "+s[l]}}},removeLabel=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}},E=[function(e,t,n,o){if(e.length>-1&&!e.return)switch(e.type){case _:e.return=function emotion_cache_browser_esm_prefix(e,t){switch(45^Utility_charat(e,0)?(((t<<2^Utility_charat(e,0))<<2^Utility_charat(e,1))<<2^Utility_charat(e,2))<<2^Utility_charat(e,3):0){case 5103:return v+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return v+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return v+e+y+e+g+e+e;case 6828:case 4268:return v+e+g+e+e;case 6165:return v+e+g+"flex-"+e+e;case 5187:return v+e+Utility_replace(e,/(\w+).+(:[^]+)/,v+"box-$1$2"+g+"flex-$1$2")+e;case 5443:return v+e+g+"flex-item-"+Utility_replace(e,/flex-|-self/,"")+e;case 4675:return v+e+g+"flex-line-pack"+Utility_replace(e,/align-content|flex-|-self/,"")+e;case 5548:return v+e+g+Utility_replace(e,"shrink","negative")+e;case 5292:return v+e+g+Utility_replace(e,"basis","preferred-size")+e;case 6060:return v+"box-"+Utility_replace(e,"-grow","")+v+e+g+Utility_replace(e,"grow","positive")+e;case 4554:return v+Utility_replace(e,/([^-])(transform)/g,"$1"+v+"$2")+e;case 6187:return Utility_replace(Utility_replace(Utility_replace(e,/(zoom-|grab)/,v+"$1"),/(image-set)/,v+"$1"),e,"")+e;case 5495:case 3959:return Utility_replace(e,/(image-set\([^]*)/,v+"$1$`$1");case 4968:return Utility_replace(Utility_replace(e,/(.+:)(flex-)?(.*)/,v+"box-pack:$3"+g+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+v+e+e;case 4095:case 3583:case 4068:case 2532:return Utility_replace(e,/(.+)-inline(.+)/,v+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Utility_strlen(e)-1-t>6)switch(Utility_charat(e,t+1)){case 109:if(45!==Utility_charat(e,t+4))break;case 102:return Utility_replace(e,/(.+:)(.+)-([^]+)/,"$1"+v+"$2-$3$1"+y+(108==Utility_charat(e,t+3)?"$3":"$2-$3"))+e;case 115:return~indexof(e,"stretch")?emotion_cache_browser_esm_prefix(Utility_replace(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==Utility_charat(e,t+1))break;case 6444:switch(Utility_charat(e,Utility_strlen(e)-3-(~indexof(e,"!important")&&10))){case 107:return Utility_replace(e,":",":"+v)+e;case 101:return Utility_replace(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+v+(45===Utility_charat(e,14)?"inline-":"")+"box$3$1"+v+"$2$3$1"+g+"$2box$3")+e}break;case 5936:switch(Utility_charat(e,t+11)){case 114:return v+e+g+Utility_replace(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return v+e+g+Utility_replace(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return v+e+g+Utility_replace(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return v+e+g+e+e}return e}(e.value,e.length);break;case w:return Serializer_serialize([Tokenizer_copy(e,{value:Utility_replace(e.value,"@","@"+v)})],o);case C:if(e.length)return e.props.map(function(t){var n;switch(n=t,(n=/(::plac\w+|:read-\w+)/.exec(n))?n[0]:n){case":read-only":case":read-write":return Serializer_serialize([Tokenizer_copy(e,{props:[Utility_replace(t,/:(read-\w+)/,":"+y+"$1")]})],o);case"::placeholder":return Serializer_serialize([Tokenizer_copy(e,{props:[Utility_replace(t,/:(plac\w+)/,":"+v+"input-$1")]}),Tokenizer_copy(e,{props:[Utility_replace(t,/:(plac\w+)/,":"+y+"$1")]}),Tokenizer_copy(e,{props:[Utility_replace(t,/:(plac\w+)/,g+"input-$1")]})],o)}return""}).join("")}}],createCache=function(e){var t,n,a,c,h,g=e.key;if("css"===g){var y=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(y,function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))})}var v=e.stylisPlugins||E,C={},_=[];c=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+g+' "]'),function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)C[t[n]]=!0;_.push(e)});var w=(n=(t=[compat,removeLabel].concat(v,[stringify,(a=function(e){h.insert(e)},function(e){!e.root&&(e=e.return)&&a(e)})])).length,function(e,o,a,s){for(var c="",l=0;l<n;l++)c+=t[l](e,o,a,s)||"";return c}),stylis=function(e){var t,n;return Serializer_serialize((n=function parse(e,t,n,o,a,c,h,g,y){for(var v,C=0,_=0,w=h,S=0,E=0,T=0,k=1,I=1,x=1,R=0,P="",M=a,O=c,L=o,U=P;I;)switch(T=R,R=next()){case 40:if(108!=T&&58==Utility_charat(U,w-1)){-1!=indexof(U+=Utility_replace(delimit(R),"&","&\f"),"&\f")&&(x=-1);break}case 34:case 39:case 91:U+=delimit(R);break;case 9:case 10:case 13:case 32:U+=function(e){for(;f=peek();)if(f<33)next();else break;return token(e)>2||token(f)>3?"":" "}(T);break;case 92:U+=function(e,t){for(var n;--t&&next()&&!(f<48)&&!(f>102)&&(!(f>57)||!(f<65))&&(!(f>70)||!(f<97)););return n=p+(t<6&&32==peek()&&32==next()),Utility_substr(m,e,n)}(p-1,7);continue;case 47:switch(peek()){case 42:case 47:Utility_append(node(v=function(e,t){for(;next();)if(e+f===57)break;else if(e+f===84&&47===peek())break;return"/*"+Utility_substr(m,t,p-1)+"*"+s(47===e?e:next())}(next(),p),t,n,b,s(f),Utility_substr(v,2,-2),0),y);break;default:U+="/"}break;case 123*k:g[C++]=Utility_strlen(U)*x;case 125*k:case 59:case 0:switch(R){case 0:case 125:I=0;case 59+_:-1==x&&(U=Utility_replace(U,/\f/g,"")),E>0&&Utility_strlen(U)-w&&Utility_append(E>32?declaration(U+";",o,n,w-1):declaration(Utility_replace(U," ","")+";",o,n,w-2),y);break;case 59:U+=";";default:if(Utility_append(L=ruleset(U,t,n,C,_,a,g,P,M=[],O=[],w),c),123===R){if(0===_)parse(U,t,L,L,M,c,w,g,O);else switch(99===S&&110===Utility_charat(U,3)?100:S){case 100:case 108:case 109:case 115:parse(e,L,L,o&&Utility_append(ruleset(e,L,L,0,0,a,g,P,a,M=[],w),O),a,O,w,g,o?M:O);break;default:parse(U,L,L,L,[""],O,0,g,O)}}}C=_=E=0,k=x=1,P=U="",w=h;break;case 58:w=1+Utility_strlen(U),E=T;default:if(k<1){if(123==R)--k;else if(125==R&&0==k++&&125==(f=p>0?Utility_charat(m,--p):0,u--,10===f&&(u=1,l--),f))continue}switch(U+=s(R),R*k){case 38:x=_>0?1:(U+="\f",-1);break;case 44:g[C++]=(Utility_strlen(U)-1)*x,x=1;break;case 64:45===peek()&&(U+=delimit(next())),S=peek(),_=w=Utility_strlen(P=U+=function(e){for(;!token(peek());)next();return Utility_substr(m,e,p)}(p)),R++;break;case 45:45===T&&2==Utility_strlen(U)&&(k=0)}}return c}("",null,null,null,[""],t=alloc(t=e),0,[0],t),m="",n),w)},S={key:g,sheet:new o({key:g,container:c,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:C,registered:{},insert:function(e,t,n,o){h=n,stylis(e?e+"{"+t.styles+"}":t.styles),o&&(S.inserted[t.name]=!0)}};return S.sheet.hydrate(_),S}},6894:function(e,t,n){"use strict";function memoize(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}n.d(t,{Z:function(){return memoize}})},8586:function(e,t,n){"use strict";n.d(t,{T:function(){return u},a:function(){return ThemeProvider},i:function(){return c},w:function(){return withEmotionCache}});var o=n(2784),a=n(2107),s=n(7896),weakMemoize=function(e){var t=new WeakMap;return function(n){if(t.has(n))return t.get(n);var o=e(n);return t.set(n,o),o}};n(653),n(2668);var c=!0,l=o.createContext("undefined"!=typeof HTMLElement?(0,a.Z)({key:"css"}):null);l.Provider;var withEmotionCache=function(e){return(0,o.forwardRef)(function(t,n){return e(t,(0,o.useContext)(l),n)})};c||(withEmotionCache=function(e){return function(t){var n=(0,o.useContext)(l);return null===n?(n=(0,a.Z)({key:"css"}),o.createElement(l.Provider,{value:n},e(t,n))):e(t,n)}});var u=o.createContext({}),h=weakMemoize(function(e){return weakMemoize(function(t){return"function"==typeof t?t(e):(0,s.Z)({},e,t)})}),ThemeProvider=function(e){var t=o.useContext(u);return e.theme!==t&&(t=h(t)(e.theme)),o.createElement(u.Provider,{value:t},e.children)}},8165:function(e,t,n){"use strict";n.d(t,{F4:function(){return keyframes},xB:function(){return u}});var o=n(8586),a=n(2784),s=n(2792),c=n(2668),l=n(653);n(2107),n(3463);var u=(0,o.w)(function(e,t){var n=e.styles,u=(0,l.O)([n],void 0,a.useContext(o.T));if(!o.i){for(var h,p=u.name,f=u.styles,m=u.next;void 0!==m;)p+=" "+m.name,f+=m.styles,m=m.next;var g=!0===t.compat,y=t.insert("",{name:p,styles:f},t.sheet,g);return g?null:a.createElement("style",((h={})["data-emotion"]=t.key+"-global "+p,h.dangerouslySetInnerHTML={__html:y},h.nonce=t.sheet.nonce,h))}var v=a.useRef();return(0,c.j)(function(){var e=t.key+"-global",n=new t.sheet.constructor({key:e,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),o=!1,a=document.querySelector('style[data-emotion="'+e+" "+u.name+'"]');return t.sheet.tags.length&&(n.before=t.sheet.tags[0]),null!==a&&(o=!0,a.setAttribute("data-emotion",e),n.hydrate([a])),v.current=[n,o],function(){n.flush()}},[t]),(0,c.j)(function(){var e=v.current,n=e[0];if(e[1]){e[1]=!1;return}if(void 0!==u.next&&(0,s.My)(t,u.next,!0),n.tags.length){var o=n.tags[n.tags.length-1].nextElementSibling;n.before=o,n.flush()}t.insert("",u,n,!1)},[t,u.name]),null});function css(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,l.O)(t)}var keyframes=function(){var e=css.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}},653:function(e,t,n){"use strict";n.d(t,{O:function(){return serializeStyles}});var o,a={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},s=n(6894),c=/[A-Z]|^ms/g,l=/_EMO_([^_]+?)_([^]*?)_EMO_/g,isCustomProperty=function(e){return 45===e.charCodeAt(1)},isProcessableValue=function(e){return null!=e&&"boolean"!=typeof e},u=(0,s.Z)(function(e){return isCustomProperty(e)?e:e.replace(c,"-$&").toLowerCase()}),processStyleValue=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(l,function(e,t,n){return o={name:t,styles:n,next:o},t})}return 1===a[e]||isCustomProperty(e)||"number"!=typeof t||0===t?t:t+"px"};function handleInterpolation(e,t,n){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return o={name:n.name,styles:n.styles,next:o},n.name;if(void 0!==n.styles){var a=n.next;if(void 0!==a)for(;void 0!==a;)o={name:a.name,styles:a.styles,next:o},a=a.next;return n.styles+";"}return function(e,t,n){var o="";if(Array.isArray(n))for(var a=0;a<n.length;a++)o+=handleInterpolation(e,t,n[a])+";";else for(var s in n){var c=n[s];if("object"!=typeof c)null!=t&&void 0!==t[c]?o+=s+"{"+t[c]+"}":isProcessableValue(c)&&(o+=u(s)+":"+processStyleValue(s,c)+";");else if(Array.isArray(c)&&"string"==typeof c[0]&&(null==t||void 0===t[c[0]]))for(var l=0;l<c.length;l++)isProcessableValue(c[l])&&(o+=u(s)+":"+processStyleValue(s,c[l])+";");else{var h=handleInterpolation(e,t,c);switch(s){case"animation":case"animationName":o+=u(s)+":"+h+";";break;default:o+=s+"{"+h+"}"}}}return o}(e,t,n);case"function":if(void 0!==e){var s=o,c=n(e);return o=s,handleInterpolation(e,t,c)}}if(null==t)return n;var l=t[n];return void 0!==l?l:n}var h=/label:\s*([^\s;\n{]+)\s*(;|$)/g,serializeStyles=function(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var a,s=!0,c="";o=void 0;var l=e[0];null==l||void 0===l.raw?(s=!1,c+=handleInterpolation(n,t,l)):c+=l[0];for(var u=1;u<e.length;u++)c+=handleInterpolation(n,t,e[u]),s&&(c+=l[u]);h.lastIndex=0;for(var p="";null!==(a=h.exec(c));)p+="-"+a[1];return{name:function(e){for(var t,n=0,o=0,a=e.length;a>=4;++o,a-=4)t=(65535&(t=255&e.charCodeAt(o)|(255&e.charCodeAt(++o))<<8|(255&e.charCodeAt(++o))<<16|(255&e.charCodeAt(++o))<<24))*1540483477+((t>>>16)*59797<<16),t^=t>>>24,n=(65535&t)*1540483477+((t>>>16)*59797<<16)^(65535&n)*1540483477+((n>>>16)*59797<<16);switch(a){case 3:n^=(255&e.charCodeAt(o+2))<<16;case 2:n^=(255&e.charCodeAt(o+1))<<8;case 1:n^=255&e.charCodeAt(o),n=(65535&n)*1540483477+((n>>>16)*59797<<16)}return n^=n>>>13,(((n=(65535&n)*1540483477+((n>>>16)*59797<<16))^n>>>15)>>>0).toString(36)}(c)+p,styles:c,next:o}}},2603:function(e,t,n){"use strict";n.d(t,{Z:function(){return m}});var o=n(7896),a=n(2784),s=n(6894),c=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,l=(0,s.Z)(function(e){return c.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&91>e.charCodeAt(2)}),u=n(8586),h=n(2792),p=n(653),f=n(2668),testOmitPropsOnComponent=function(e){return"theme"!==e},getDefaultShouldForwardProp=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?l:testOmitPropsOnComponent},composeShouldForwardProps=function(e,t,n){var o;if(t){var a=t.shouldForwardProp;o=e.__emotion_forwardProp&&a?function(t){return e.__emotion_forwardProp(t)&&a(t)}:a}return"function"!=typeof o&&n&&(o=e.__emotion_forwardProp),o},Insertion=function(e){var t=e.cache,n=e.serialized,o=e.isStringTag;return(0,h.hC)(t,n,o),(0,f.L)(function(){return(0,h.My)(t,n,o)}),null},m=(function createStyled(e,t){var n,s,c=e.__emotion_real===e,l=c&&e.__emotion_base||e;void 0!==t&&(n=t.label,s=t.target);var f=composeShouldForwardProps(e,t,c),m=f||getDefaultShouldForwardProp(l),g=!m("as");return function(){var y=arguments,v=c&&void 0!==e.__emotion_styles?e.__emotion_styles.slice(0):[];if(void 0!==n&&v.push("label:"+n+";"),null==y[0]||void 0===y[0].raw)v.push.apply(v,y);else{v.push(y[0][0]);for(var b=y.length,C=1;C<b;C++)v.push(y[C],y[0][C])}var _=(0,u.w)(function(e,t,n){var o=g&&e.as||l,c="",y=[],b=e;if(null==e.theme){for(var C in b={},e)b[C]=e[C];b.theme=a.useContext(u.T)}"string"==typeof e.className?c=(0,h.fp)(t.registered,y,e.className):null!=e.className&&(c=e.className+" ");var _=(0,p.O)(v.concat(y),t.registered,b);c+=t.key+"-"+_.name,void 0!==s&&(c+=" "+s);var w=g&&void 0===f?getDefaultShouldForwardProp(o):m,S={};for(var E in e)(!g||"as"!==E)&&w(E)&&(S[E]=e[E]);return S.className=c,S.ref=n,a.createElement(a.Fragment,null,a.createElement(Insertion,{cache:t,serialized:_,isStringTag:"string"==typeof o}),a.createElement(o,S))});return _.displayName=void 0!==n?n:"Styled("+("string"==typeof l?l:l.displayName||l.name||"Component")+")",_.defaultProps=e.defaultProps,_.__emotion_real=_,_.__emotion_base=l,_.__emotion_styles=v,_.__emotion_forwardProp=f,Object.defineProperty(_,"toString",{value:function(){return"."+s}}),_.withComponent=function(e,n){return createStyled(e,(0,o.Z)({},t,n,{shouldForwardProp:composeShouldForwardProps(_,n,!0)})).apply(void 0,v)},_}}).bind();["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"].forEach(function(e){m[e]=m(e)})},2668:function(e,t,n){"use strict";n.d(t,{L:function(){return c},j:function(){return l}});var o,a=n(2784),s=!!(o||(o=n.t(a,2))).useInsertionEffect&&(o||(o=n.t(a,2))).useInsertionEffect,c=s||function(e){return e()},l=s||a.useLayoutEffect},2792:function(e,t,n){"use strict";function getRegisteredStyles(e,t,n){var o="";return n.split(" ").forEach(function(n){void 0!==e[n]?t.push(e[n]+";"):o+=n+" "}),o}n.d(t,{My:function(){return insertStyles},fp:function(){return getRegisteredStyles},hC:function(){return registerStyles}});var registerStyles=function(e,t,n){var o=e.key+"-"+t.name;!1===n&&void 0===e.registered[o]&&(e.registered[o]=t.styles)},insertStyles=function(e,t,n){registerStyles(e,t,n);var o=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var a=t;do e.insert(t===a?"."+o:"",a,e.sheet,!0),a=a.next;while(void 0!==a)}}},6208:function(e,t,n){"use strict";function getWindow(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function isElement(e){var t=getWindow(e).Element;return e instanceof t||e instanceof Element}function isHTMLElement(e){var t=getWindow(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function isShadowRoot(e){if("undefined"==typeof ShadowRoot)return!1;var t=getWindow(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}n.d(t,{fi:function(){return P}});var o,a,s,c,l,u=Math.max,h=Math.min,p=Math.round;function getUAString(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function isLayoutViewport(){return!/^((?!chrome|android).)*safari/i.test(getUAString())}function getBoundingClientRect(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var o=e.getBoundingClientRect(),a=1,s=1;t&&isHTMLElement(e)&&(a=e.offsetWidth>0&&p(o.width)/e.offsetWidth||1,s=e.offsetHeight>0&&p(o.height)/e.offsetHeight||1);var c=(isElement(e)?getWindow(e):window).visualViewport,l=!isLayoutViewport()&&n,u=(o.left+(l&&c?c.offsetLeft:0))/a,h=(o.top+(l&&c?c.offsetTop:0))/s,f=o.width/a,m=o.height/s;return{width:f,height:m,top:h,right:u+f,bottom:h+m,left:u,x:u,y:h}}function getWindowScroll(e){var t=getWindow(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function getNodeName(e){return e?(e.nodeName||"").toLowerCase():null}function getDocumentElement(e){return((isElement(e)?e.ownerDocument:e.document)||window.document).documentElement}function getWindowScrollBarX(e){return getBoundingClientRect(getDocumentElement(e)).left+getWindowScroll(e).scrollLeft}function getComputedStyle(e){return getWindow(e).getComputedStyle(e)}function isScrollParent(e){var t=getComputedStyle(e),n=t.overflow,o=t.overflowX,a=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+a+o)}function getLayoutRect(e){var t=getBoundingClientRect(e),n=e.offsetWidth,o=e.offsetHeight;return 1>=Math.abs(t.width-n)&&(n=t.width),1>=Math.abs(t.height-o)&&(o=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:o}}function getParentNode(e){return"html"===getNodeName(e)?e:e.assignedSlot||e.parentNode||(isShadowRoot(e)?e.host:null)||getDocumentElement(e)}function listScrollParents(e,t){void 0===t&&(t=[]);var n,o=function getScrollParent(e){return["html","body","#document"].indexOf(getNodeName(e))>=0?e.ownerDocument.body:isHTMLElement(e)&&isScrollParent(e)?e:getScrollParent(getParentNode(e))}(e),a=o===(null==(n=e.ownerDocument)?void 0:n.body),s=getWindow(o),c=a?[s].concat(s.visualViewport||[],isScrollParent(o)?o:[]):o,l=t.concat(c);return a?l:l.concat(listScrollParents(getParentNode(c)))}function getTrueOffsetParent(e){return isHTMLElement(e)&&"fixed"!==getComputedStyle(e).position?e.offsetParent:null}function getOffsetParent(e){for(var t=getWindow(e),n=getTrueOffsetParent(e);n&&["table","td","th"].indexOf(getNodeName(n))>=0&&"static"===getComputedStyle(n).position;)n=getTrueOffsetParent(n);return n&&("html"===getNodeName(n)||"body"===getNodeName(n)&&"static"===getComputedStyle(n).position)?t:n||function(e){var t=/firefox/i.test(getUAString());if(/Trident/i.test(getUAString())&&isHTMLElement(e)&&"fixed"===getComputedStyle(e).position)return null;var n=getParentNode(e);for(isShadowRoot(n)&&(n=n.host);isHTMLElement(n)&&0>["html","body"].indexOf(getNodeName(n));){var o=getComputedStyle(n);if("none"!==o.transform||"none"!==o.perspective||"paint"===o.contain||-1!==["transform","perspective"].indexOf(o.willChange)||t&&"filter"===o.willChange||t&&o.filter&&"none"!==o.filter)return n;n=n.parentNode}return null}(e)||t}var f="bottom",m="right",g="left",y="auto",v=["top",f,m,g],b="start",C="viewport",_="popper",w=v.reduce(function(e,t){return e.concat([t+"-"+b,t+"-end"])},[]),S=[].concat(v,[y]).reduce(function(e,t){return e.concat([t,t+"-"+b,t+"-end"])},[]),E=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"],T={placement:"bottom",modifiers:[],strategy:"absolute"};function areValidElements(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(e){return!(e&&"function"==typeof e.getBoundingClientRect)})}var k={passive:!0};function getBasePlacement(e){return e.split("-")[0]}function getVariation(e){return e.split("-")[1]}function getMainAxisFromPlacement(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function computeOffsets(e){var t,n=e.reference,o=e.element,a=e.placement,s=a?getBasePlacement(a):null,c=a?getVariation(a):null,l=n.x+n.width/2-o.width/2,u=n.y+n.height/2-o.height/2;switch(s){case"top":t={x:l,y:n.y-o.height};break;case f:t={x:l,y:n.y+n.height};break;case m:t={x:n.x+n.width,y:u};break;case g:t={x:n.x-o.width,y:u};break;default:t={x:n.x,y:n.y}}var h=s?getMainAxisFromPlacement(s):null;if(null!=h){var p="y"===h?"height":"width";switch(c){case b:t[h]=t[h]-(n[p]/2-o[p]/2);break;case"end":t[h]=t[h]+(n[p]/2-o[p]/2)}}return t}var I={top:"auto",right:"auto",bottom:"auto",left:"auto"};function mapToStyles(e){var t,n,o,a,s,c,l,u=e.popper,h=e.popperRect,y=e.placement,v=e.variation,b=e.offsets,C=e.position,_=e.gpuAcceleration,w=e.adaptive,S=e.roundOffsets,E=e.isFixed,T=b.x,k=void 0===T?0:T,x=b.y,R=void 0===x?0:x,P="function"==typeof S?S({x:k,y:R}):{x:k,y:R};k=P.x,R=P.y;var M=b.hasOwnProperty("x"),O=b.hasOwnProperty("y"),L=g,U="top",q=window;if(w){var H=getOffsetParent(u),V="clientHeight",G="clientWidth";H===getWindow(u)&&"static"!==getComputedStyle(H=getDocumentElement(u)).position&&"absolute"===C&&(V="scrollHeight",G="scrollWidth"),("top"===y||(y===g||y===m)&&"end"===v)&&(U=f,R-=(E&&H===q&&q.visualViewport?q.visualViewport.height:H[V])-h.height,R*=_?1:-1),(y===g||("top"===y||y===f)&&"end"===v)&&(L=m,k-=(E&&H===q&&q.visualViewport?q.visualViewport.width:H[G])-h.width,k*=_?1:-1)}var K=Object.assign({position:C},w&&I),$=!0===S?(t={x:k,y:R},n=getWindow(u),o=t.x,a=t.y,{x:p(o*(s=n.devicePixelRatio||1))/s||0,y:p(a*s)/s||0}):{x:k,y:R};return(k=$.x,R=$.y,_)?Object.assign({},K,((l={})[U]=O?"0":"",l[L]=M?"0":"",l.transform=1>=(q.devicePixelRatio||1)?"translate("+k+"px, "+R+"px)":"translate3d("+k+"px, "+R+"px, 0)",l)):Object.assign({},K,((c={})[U]=O?R+"px":"",c[L]=M?k+"px":"",c.transform="",c))}var x={left:"right",right:"left",bottom:"top",top:"bottom"};function getOppositePlacement(e){return e.replace(/left|right|bottom|top/g,function(e){return x[e]})}var R={start:"end",end:"start"};function getOppositeVariationPlacement(e){return e.replace(/start|end/g,function(e){return R[e]})}function contains(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&isShadowRoot(n)){var o=t;do{if(o&&e.isSameNode(o))return!0;o=o.parentNode||o.host}while(o)}return!1}function rectToClientRect(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function getClientRectFromMixedType(e,t,n){var o,a,s,c,l,h,p,f,m,g;return t===C?rectToClientRect(function(e,t){var n=getWindow(e),o=getDocumentElement(e),a=n.visualViewport,s=o.clientWidth,c=o.clientHeight,l=0,u=0;if(a){s=a.width,c=a.height;var h=isLayoutViewport();(h||!h&&"fixed"===t)&&(l=a.offsetLeft,u=a.offsetTop)}return{width:s,height:c,x:l+getWindowScrollBarX(e),y:u}}(e,n)):isElement(t)?((o=getBoundingClientRect(t,!1,"fixed"===n)).top=o.top+t.clientTop,o.left=o.left+t.clientLeft,o.bottom=o.top+t.clientHeight,o.right=o.left+t.clientWidth,o.width=t.clientWidth,o.height=t.clientHeight,o.x=o.left,o.y=o.top,o):rectToClientRect((a=getDocumentElement(e),c=getDocumentElement(a),l=getWindowScroll(a),h=null==(s=a.ownerDocument)?void 0:s.body,p=u(c.scrollWidth,c.clientWidth,h?h.scrollWidth:0,h?h.clientWidth:0),f=u(c.scrollHeight,c.clientHeight,h?h.scrollHeight:0,h?h.clientHeight:0),m=-l.scrollLeft+getWindowScrollBarX(a),g=-l.scrollTop,"rtl"===getComputedStyle(h||c).direction&&(m+=u(c.clientWidth,h?h.clientWidth:0)-p),{width:p,height:f,x:m,y:g}))}function getFreshSideObject(){return{top:0,right:0,bottom:0,left:0}}function mergePaddingObject(e){return Object.assign({},getFreshSideObject(),e)}function expandToHashMap(e,t){return t.reduce(function(t,n){return t[n]=e,t},{})}function detectOverflow(e,t){void 0===t&&(t={});var n,o,a,s,c,l,p,g=t,y=g.placement,b=void 0===y?e.placement:y,w=g.strategy,S=void 0===w?e.strategy:w,E=g.boundary,T=g.rootBoundary,k=g.elementContext,I=void 0===k?_:k,x=g.altBoundary,R=g.padding,P=void 0===R?0:R,M=mergePaddingObject("number"!=typeof P?P:expandToHashMap(P,v)),O=e.rects.popper,L=e.elements[void 0!==x&&x?I===_?"reference":_:I],U=(n=isElement(L)?L:L.contextElement||getDocumentElement(e.elements.popper),l=(c=[].concat("clippingParents"===(o=void 0===E?"clippingParents":E)?(a=listScrollParents(getParentNode(n)),isElement(s=["absolute","fixed"].indexOf(getComputedStyle(n).position)>=0&&isHTMLElement(n)?getOffsetParent(n):n)?a.filter(function(e){return isElement(e)&&contains(e,s)&&"body"!==getNodeName(e)}):[]):[].concat(o),[void 0===T?C:T]))[0],(p=c.reduce(function(e,t){var o=getClientRectFromMixedType(n,t,S);return e.top=u(o.top,e.top),e.right=h(o.right,e.right),e.bottom=h(o.bottom,e.bottom),e.left=u(o.left,e.left),e},getClientRectFromMixedType(n,l,S))).width=p.right-p.left,p.height=p.bottom-p.top,p.x=p.left,p.y=p.top,p),q=getBoundingClientRect(e.elements.reference),H=computeOffsets({reference:q,element:O,strategy:"absolute",placement:b}),V=rectToClientRect(Object.assign({},O,H)),G=I===_?V:q,K={top:U.top-G.top+M.top,bottom:G.bottom-U.bottom+M.bottom,left:U.left-G.left+M.left,right:G.right-U.right+M.right},$=e.modifiersData.offset;if(I===_&&$){var J=$[b];Object.keys(K).forEach(function(e){var t=[m,f].indexOf(e)>=0?1:-1,n=["top",f].indexOf(e)>=0?"y":"x";K[e]+=J[n]*t})}return K}function within(e,t,n){return u(e,h(t,n))}function getSideOffsets(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function isAnySideFullyClipped(e){return["top",m,f,g].some(function(t){return e[t]>=0})}var P=(s=void 0===(a=(o={defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,o=e.options,a=o.scroll,s=void 0===a||a,c=o.resize,l=void 0===c||c,u=getWindow(t.elements.popper),h=[].concat(t.scrollParents.reference,t.scrollParents.popper);return s&&h.forEach(function(e){e.addEventListener("scroll",n.update,k)}),l&&u.addEventListener("resize",n.update,k),function(){s&&h.forEach(function(e){e.removeEventListener("scroll",n.update,k)}),l&&u.removeEventListener("resize",n.update,k)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=computeOffsets({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,o=n.gpuAcceleration,a=n.adaptive,s=n.roundOffsets,c=void 0===s||s,l={placement:getBasePlacement(t.placement),variation:getVariation(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:void 0===o||o,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,mapToStyles(Object.assign({},l,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:void 0===a||a,roundOffsets:c})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,mapToStyles(Object.assign({},l,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach(function(e){var n=t.styles[e]||{},o=t.attributes[e]||{},a=t.elements[e];isHTMLElement(a)&&getNodeName(a)&&(Object.assign(a.style,n),Object.keys(o).forEach(function(e){var t=o[e];!1===t?a.removeAttribute(e):a.setAttribute(e,!0===t?"":t)}))})},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(e){var o=t.elements[e],a=t.attributes[e]||{},s=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce(function(e,t){return e[t]="",e},{});isHTMLElement(o)&&getNodeName(o)&&(Object.assign(o.style,s),Object.keys(a).forEach(function(e){o.removeAttribute(e)}))})}},requires:["computeStyles"]},{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,o=e.name,a=n.offset,s=void 0===a?[0,0]:a,c=S.reduce(function(e,n){var o,a,c,l,u,h;return e[n]=(o=t.rects,c=[g,"top"].indexOf(a=getBasePlacement(n))>=0?-1:1,u=(l="function"==typeof s?s(Object.assign({},o,{placement:n})):s)[0],h=l[1],u=u||0,h=(h||0)*c,[g,m].indexOf(a)>=0?{x:h,y:u}:{x:u,y:h}),e},{}),l=c[t.placement],u=l.x,h=l.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=u,t.modifiersData.popperOffsets.y+=h),t.modifiersData[o]=c}},{name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,o=e.name;if(!t.modifiersData[o]._skip){for(var a=n.mainAxis,s=void 0===a||a,c=n.altAxis,l=void 0===c||c,u=n.fallbackPlacements,h=n.padding,p=n.boundary,C=n.rootBoundary,_=n.altBoundary,E=n.flipVariations,T=void 0===E||E,k=n.allowedAutoPlacements,I=t.options.placement,x=getBasePlacement(I)===I,R=u||(x||!T?[getOppositePlacement(I)]:function(e){if(getBasePlacement(e)===y)return[];var t=getOppositePlacement(e);return[getOppositeVariationPlacement(e),t,getOppositeVariationPlacement(t)]}(I)),P=[I].concat(R).reduce(function(e,n){var o,a,s,c,l,u,f,m,g,b,_,E;return e.concat(getBasePlacement(n)===y?(a=(o={placement:n,boundary:p,rootBoundary:C,padding:h,flipVariations:T,allowedAutoPlacements:k}).placement,s=o.boundary,c=o.rootBoundary,l=o.padding,u=o.flipVariations,m=void 0===(f=o.allowedAutoPlacements)?S:f,0===(_=(b=(g=getVariation(a))?u?w:w.filter(function(e){return getVariation(e)===g}):v).filter(function(e){return m.indexOf(e)>=0})).length&&(_=b),Object.keys(E=_.reduce(function(e,n){return e[n]=detectOverflow(t,{placement:n,boundary:s,rootBoundary:c,padding:l})[getBasePlacement(n)],e},{})).sort(function(e,t){return E[e]-E[t]})):n)},[]),M=t.rects.reference,O=t.rects.popper,L=new Map,U=!0,q=P[0],H=0;H<P.length;H++){var V=P[H],G=getBasePlacement(V),K=getVariation(V)===b,$=["top",f].indexOf(G)>=0,J=$?"width":"height",Y=detectOverflow(t,{placement:V,boundary:p,rootBoundary:C,altBoundary:_,padding:h}),X=$?K?m:g:K?f:"top";M[J]>O[J]&&(X=getOppositePlacement(X));var et=getOppositePlacement(X),er=[];if(s&&er.push(Y[G]<=0),l&&er.push(Y[X]<=0,Y[et]<=0),er.every(function(e){return e})){q=V,U=!1;break}L.set(V,er)}if(U)for(var en=T?3:1,_loop=function(e){var t=P.find(function(t){var n=L.get(t);if(n)return n.slice(0,e).every(function(e){return e})});if(t)return q=t,"break"},eo=en;eo>0&&"break"!==_loop(eo);eo--);t.placement!==q&&(t.modifiersData[o]._skip=!0,t.placement=q,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,o=e.name,a=n.mainAxis,s=n.altAxis,c=n.boundary,l=n.rootBoundary,p=n.altBoundary,y=n.padding,v=n.tether,C=void 0===v||v,_=n.tetherOffset,w=void 0===_?0:_,S=detectOverflow(t,{boundary:c,rootBoundary:l,padding:y,altBoundary:p}),E=getBasePlacement(t.placement),T=getVariation(t.placement),k=!T,I=getMainAxisFromPlacement(E),x="x"===I?"y":"x",R=t.modifiersData.popperOffsets,P=t.rects.reference,M=t.rects.popper,O="function"==typeof w?w(Object.assign({},t.rects,{placement:t.placement})):w,L="number"==typeof O?{mainAxis:O,altAxis:O}:Object.assign({mainAxis:0,altAxis:0},O),U=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,q={x:0,y:0};if(R){if(void 0===a||a){var H,V="y"===I?"top":g,G="y"===I?f:m,K="y"===I?"height":"width",$=R[I],J=$+S[V],Y=$-S[G],X=C?-M[K]/2:0,et=T===b?P[K]:M[K],er=T===b?-M[K]:-P[K],en=t.elements.arrow,eo=C&&en?getLayoutRect(en):{width:0,height:0},ei=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:getFreshSideObject(),ea=ei[V],es=ei[G],ec=within(0,P[K],eo[K]),el=k?P[K]/2-X-ec-ea-L.mainAxis:et-ec-ea-L.mainAxis,eu=k?-P[K]/2+X+ec+es+L.mainAxis:er+ec+es+L.mainAxis,ed=t.elements.arrow&&getOffsetParent(t.elements.arrow),eh=ed?"y"===I?ed.clientTop||0:ed.clientLeft||0:0,ep=null!=(H=null==U?void 0:U[I])?H:0,ef=$+el-ep-eh,em=$+eu-ep,eg=within(C?h(J,ef):J,$,C?u(Y,em):Y);R[I]=eg,q[I]=eg-$}if(void 0!==s&&s){var ey,ev,eb="x"===I?"top":g,eC="x"===I?f:m,e_=R[x],ew="y"===x?"height":"width",eS=e_+S[eb],eE=e_-S[eC],eT=-1!==["top",g].indexOf(E),ek=null!=(ev=null==U?void 0:U[x])?ev:0,eA=eT?eS:e_-P[ew]-M[ew]-ek+L.altAxis,eI=eT?e_+P[ew]+M[ew]-ek-L.altAxis:eE,ex=C&&eT?(ey=within(eA,e_,eI))>eI?eI:ey:within(C?eA:eS,e_,C?eI:eE);R[x]=ex,q[x]=ex-e_}t.modifiersData[o]=q}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n,o=e.state,a=e.name,s=e.options,c=o.elements.arrow,l=o.modifiersData.popperOffsets,u=getBasePlacement(o.placement),h=getMainAxisFromPlacement(u),p=[g,m].indexOf(u)>=0?"height":"width";if(c&&l){var y=mergePaddingObject("number"!=typeof(t="function"==typeof(t=s.padding)?t(Object.assign({},o.rects,{placement:o.placement})):t)?t:expandToHashMap(t,v)),b=getLayoutRect(c),C="y"===h?"top":g,_="y"===h?f:m,w=o.rects.reference[p]+o.rects.reference[h]-l[h]-o.rects.popper[p],S=l[h]-o.rects.reference[h],E=getOffsetParent(c),T=E?"y"===h?E.clientHeight||0:E.clientWidth||0:0,k=y[C],I=T-b[p]-y[_],x=T/2-b[p]/2+(w/2-S/2),R=within(k,x,I);o.modifiersData[a]=((n={})[h]=R,n.centerOffset=R-x,n)}},effect:function(e){var t=e.state,n=e.options.element,o=void 0===n?"[data-popper-arrow]":n;null!=o&&("string"!=typeof o||(o=t.elements.popper.querySelector(o)))&&contains(t.elements.popper,o)&&(t.elements.arrow=o)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,o=t.rects.reference,a=t.rects.popper,s=t.modifiersData.preventOverflow,c=detectOverflow(t,{elementContext:"reference"}),l=detectOverflow(t,{altBoundary:!0}),u=getSideOffsets(c,o),h=getSideOffsets(l,a,s),p=isAnySideFullyClipped(u),f=isAnySideFullyClipped(h);t.modifiersData[n]={referenceClippingOffsets:u,popperEscapeOffsets:h,isReferenceHidden:p,hasPopperEscaped:f},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":p,"data-popper-escaped":f})}}]}).defaultModifiers)?[]:a,l=void 0===(c=o.defaultOptions)?T:c,function(e,t,n){void 0===n&&(n=l);var o,a={placement:"bottom",orderedModifiers:[],options:Object.assign({},T,l),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},c=[],u=!1,h={state:a,setOptions:function(n){var o,u,p,f,m,g="function"==typeof n?n(a.options):n;cleanupModifierEffects(),a.options=Object.assign({},l,a.options,g),a.scrollParents={reference:isElement(e)?listScrollParents(e):e.contextElement?listScrollParents(e.contextElement):[],popper:listScrollParents(t)};var y=(u=Object.keys(o=[].concat(s,a.options.modifiers).reduce(function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e},{})).map(function(e){return o[e]}),p=new Map,f=new Set,m=[],u.forEach(function(e){p.set(e.name,e)}),u.forEach(function(e){f.has(e.name)||function sort(e){f.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach(function(e){if(!f.has(e)){var t=p.get(e);t&&sort(t)}}),m.push(e)}(e)}),E.reduce(function(e,t){return e.concat(m.filter(function(e){return e.phase===t}))},[]));return a.orderedModifiers=y.filter(function(e){return e.enabled}),a.orderedModifiers.forEach(function(e){var t=e.name,n=e.options,o=e.effect;if("function"==typeof o){var s=o({state:a,name:t,instance:h,options:void 0===n?{}:n});c.push(s||function(){})}}),h.update()},forceUpdate:function(){if(!u){var e,t,n,o,s,c,l,f,m,g,y,v,b=a.elements,C=b.reference,_=b.popper;if(areValidElements(C,_)){a.rects={reference:(t=getOffsetParent(_),n="fixed"===a.options.strategy,o=isHTMLElement(t),f=isHTMLElement(t)&&(c=p((s=t.getBoundingClientRect()).width)/t.offsetWidth||1,l=p(s.height)/t.offsetHeight||1,1!==c||1!==l),m=getDocumentElement(t),g=getBoundingClientRect(C,f,n),y={scrollLeft:0,scrollTop:0},v={x:0,y:0},(o||!o&&!n)&&(("body"!==getNodeName(t)||isScrollParent(m))&&(y=(e=t)!==getWindow(e)&&isHTMLElement(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:getWindowScroll(e)),isHTMLElement(t)?(v=getBoundingClientRect(t,!0),v.x+=t.clientLeft,v.y+=t.clientTop):m&&(v.x=getWindowScrollBarX(m))),{x:g.left+y.scrollLeft-v.x,y:g.top+y.scrollTop-v.y,width:g.width,height:g.height}),popper:getLayoutRect(_)},a.reset=!1,a.placement=a.options.placement,a.orderedModifiers.forEach(function(e){return a.modifiersData[e.name]=Object.assign({},e.data)});for(var w=0;w<a.orderedModifiers.length;w++){if(!0===a.reset){a.reset=!1,w=-1;continue}var S=a.orderedModifiers[w],E=S.fn,T=S.options,k=void 0===T?{}:T,I=S.name;"function"==typeof E&&(a=E({state:a,options:k,name:I,instance:h})||a)}}}},update:function(){return o||(o=new Promise(function(e){Promise.resolve().then(function(){o=void 0,e(new Promise(function(e){h.forceUpdate(),e(a)}))})})),o},destroy:function(){cleanupModifierEffects(),u=!0}};if(!areValidElements(e,t))return h;function cleanupModifierEffects(){c.forEach(function(e){return e()}),c=[]}return h.setOptions(n).then(function(e){!u&&n.onFirstUpdate&&n.onFirstUpdate(e)}),h})},3463:function(e,t,n){"use strict";var o=n(3887),a={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},s={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},c={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},l={};function getStatics(e){return o.isMemo(e)?c:l[e.$$typeof]||a}l[o.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},l[o.Memo]=c;var u=Object.defineProperty,h=Object.getOwnPropertyNames,p=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,m=Object.getPrototypeOf,g=Object.prototype;e.exports=function hoistNonReactStatics(e,t,n){if("string"!=typeof t){if(g){var o=m(t);o&&o!==g&&hoistNonReactStatics(e,o,n)}var a=h(t);p&&(a=a.concat(p(t)));for(var c=getStatics(e),l=getStatics(t),y=0;y<a.length;++y){var v=a[y];if(!s[v]&&!(n&&n[v])&&!(l&&l[v])&&!(c&&c[v])){var b=f(t,v);try{u(e,v,b)}catch(e){}}}}return e}},3459:function(e,t){"use strict";/** @license React v16.13.1
 * react-is.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var n="function"==typeof Symbol&&Symbol.for,o=n?Symbol.for("react.element"):60103,a=n?Symbol.for("react.portal"):60106,s=n?Symbol.for("react.fragment"):60107,c=n?Symbol.for("react.strict_mode"):60108,l=n?Symbol.for("react.profiler"):60114,u=n?Symbol.for("react.provider"):60109,h=n?Symbol.for("react.context"):60110,p=n?Symbol.for("react.async_mode"):60111,f=n?Symbol.for("react.concurrent_mode"):60111,m=n?Symbol.for("react.forward_ref"):60112,g=n?Symbol.for("react.suspense"):60113,y=n?Symbol.for("react.suspense_list"):60120,v=n?Symbol.for("react.memo"):60115,b=n?Symbol.for("react.lazy"):60116,C=n?Symbol.for("react.block"):60121,_=n?Symbol.for("react.fundamental"):60117,w=n?Symbol.for("react.responder"):60118,S=n?Symbol.for("react.scope"):60119;function z(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case o:switch(e=e.type){case p:case f:case s:case l:case c:case g:return e;default:switch(e=e&&e.$$typeof){case h:case m:case b:case v:case u:return e;default:return t}}case a:return t}}}function A(e){return z(e)===f}t.AsyncMode=p,t.ConcurrentMode=f,t.ContextConsumer=h,t.ContextProvider=u,t.Element=o,t.ForwardRef=m,t.Fragment=s,t.Lazy=b,t.Memo=v,t.Portal=a,t.Profiler=l,t.StrictMode=c,t.Suspense=g,t.isAsyncMode=function(e){return A(e)||z(e)===p},t.isConcurrentMode=A,t.isContextConsumer=function(e){return z(e)===h},t.isContextProvider=function(e){return z(e)===u},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===o},t.isForwardRef=function(e){return z(e)===m},t.isFragment=function(e){return z(e)===s},t.isLazy=function(e){return z(e)===b},t.isMemo=function(e){return z(e)===v},t.isPortal=function(e){return z(e)===a},t.isProfiler=function(e){return z(e)===l},t.isStrictMode=function(e){return z(e)===c},t.isSuspense=function(e){return z(e)===g},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===s||e===f||e===l||e===c||e===g||e===y||"object"==typeof e&&null!==e&&(e.$$typeof===b||e.$$typeof===v||e.$$typeof===u||e.$$typeof===h||e.$$typeof===m||e.$$typeof===_||e.$$typeof===w||e.$$typeof===S||e.$$typeof===C)},t.typeOf=z},3887:function(e,t,n){"use strict";e.exports=n(3459)},3637:function(e,t,n){e=n.nmd(e);var o,a,s,c,l,u,h,p,f,m,g="__lodash_hash_undefined__",y="[object Arguments]",v="[object Function]",b="[object Object]",C=/^\[object .+?Constructor\]$/,_=/^(?:0|[1-9]\d*)$/,w={};w["[object Float32Array]"]=w["[object Float64Array]"]=w["[object Int8Array]"]=w["[object Int16Array]"]=w["[object Int32Array]"]=w["[object Uint8Array]"]=w["[object Uint8ClampedArray]"]=w["[object Uint16Array]"]=w["[object Uint32Array]"]=!0,w[y]=w["[object Array]"]=w["[object ArrayBuffer]"]=w["[object Boolean]"]=w["[object DataView]"]=w["[object Date]"]=w["[object Error]"]=w[v]=w["[object Map]"]=w["[object Number]"]=w[b]=w["[object RegExp]"]=w["[object Set]"]=w["[object String]"]=w["[object WeakMap]"]=!1;var S="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,E="object"==typeof self&&self&&self.Object===Object&&self,T=S||E||Function("return this")(),k=t&&!t.nodeType&&t,I=k&&e&&!e.nodeType&&e,x=I&&I.exports===k,R=x&&S.process,P=function(){try{var e=I&&I.require&&I.require("util").types;if(e)return e;return R&&R.binding&&R.binding("util")}catch(e){}}(),M=P&&P.isTypedArray,O=Array.prototype,L=Function.prototype,U=Object.prototype,q=T["__core-js_shared__"],H=L.toString,V=U.hasOwnProperty,G=(u=/[^.]+$/.exec(q&&q.keys&&q.keys.IE_PROTO||""))?"Symbol(src)_1."+u:"",K=U.toString,$=H.call(Object),J=RegExp("^"+H.call(V).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Y=x?T.Buffer:void 0,X=T.Symbol,et=T.Uint8Array,er=Y?Y.allocUnsafe:void 0,en=(h=Object.getPrototypeOf,p=Object,function(e){return h(p(e))}),eo=Object.create,ei=U.propertyIsEnumerable,ea=O.splice,es=X?X.toStringTag:void 0,ec=function(){try{var e=getNative(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),el=Y?Y.isBuffer:void 0,eu=Math.max,ed=Date.now,eh=getNative(T,"Map"),ep=getNative(Object,"create"),ef=function(){function object(){}return function(e){if(!isObject(e))return{};if(eo)return eo(e);object.prototype=e;var t=new object;return object.prototype=void 0,t}}();function Hash(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}function ListCache(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}function MapCache(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}function Stack(e){var t=this.__data__=new ListCache(e);this.size=t.size}function assignMergeValue(e,t,n){(void 0===n||eq(e[t],n))&&(void 0!==n||t in e)||baseAssignValue(e,t,n)}function assocIndexOf(e,t){for(var n=e.length;n--;)if(eq(e[n][0],t))return n;return -1}function baseAssignValue(e,t,n){"__proto__"==t&&ec?ec(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}Hash.prototype.clear=function(){this.__data__=ep?ep(null):{},this.size=0},Hash.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Hash.prototype.get=function(e){var t=this.__data__;if(ep){var n=t[e];return n===g?void 0:n}return V.call(t,e)?t[e]:void 0},Hash.prototype.has=function(e){var t=this.__data__;return ep?void 0!==t[e]:V.call(t,e)},Hash.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=ep&&void 0===t?g:t,this},ListCache.prototype.clear=function(){this.__data__=[],this.size=0},ListCache.prototype.delete=function(e){var t=this.__data__,n=assocIndexOf(t,e);return!(n<0)&&(n==t.length-1?t.pop():ea.call(t,n,1),--this.size,!0)},ListCache.prototype.get=function(e){var t=this.__data__,n=assocIndexOf(t,e);return n<0?void 0:t[n][1]},ListCache.prototype.has=function(e){return assocIndexOf(this.__data__,e)>-1},ListCache.prototype.set=function(e,t){var n=this.__data__,o=assocIndexOf(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this},MapCache.prototype.clear=function(){this.size=0,this.__data__={hash:new Hash,map:new(eh||ListCache),string:new Hash}},MapCache.prototype.delete=function(e){var t=getMapData(this,e).delete(e);return this.size-=t?1:0,t},MapCache.prototype.get=function(e){return getMapData(this,e).get(e)},MapCache.prototype.has=function(e){return getMapData(this,e).has(e)},MapCache.prototype.set=function(e,t){var n=getMapData(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this},Stack.prototype.clear=function(){this.__data__=new ListCache,this.size=0},Stack.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Stack.prototype.get=function(e){return this.__data__.get(e)},Stack.prototype.has=function(e){return this.__data__.has(e)},Stack.prototype.set=function(e,t){var n=this.__data__;if(n instanceof ListCache){var o=n.__data__;if(!eh||o.length<199)return o.push([e,t]),this.size=++n.size,this;n=this.__data__=new MapCache(o)}return n.set(e,t),this.size=n.size,this};var baseFor=function(e,t,n){for(var o=-1,a=Object(e),s=n(e),c=s.length;c--;){var l=s[++o];if(!1===t(a[l],l,a))break}return e};function baseGetTag(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":es&&es in Object(e)?function(e){var t=V.call(e,es),n=e[es];try{e[es]=void 0;var o=!0}catch(e){}var a=K.call(e);return o&&(t?e[es]=n:delete e[es]),a}(e):K.call(e)}function baseIsArguments(e){return isObjectLike(e)&&baseGetTag(e)==y}function getMapData(e,t){var n,o=e.__data__;return("string"==(n=typeof t)||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==t:null===t)?o["string"==typeof t?"string":"hash"]:o.map}function getNative(e,t){var n=null==e?void 0:e[t];return!(!isObject(n)||G&&G in n)&&(isFunction(n)?J:C).test(function(e){if(null!=e){try{return H.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(n))?n:void 0}function isIndex(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&_.test(e))&&e>-1&&e%1==0&&e<t}function isPrototype(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||U)}function safeGet(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var em=(o=ec?function(e,t){return ec(e,"toString",{configurable:!0,enumerable:!1,value:function(){return t},writable:!0})}:identity,a=0,s=0,function(){var e=ed(),t=16-(e-s);if(s=e,t>0){if(++a>=800)return arguments[0]}else a=0;return o.apply(void 0,arguments)});function eq(e,t){return e===t||e!=e&&t!=t}var eg=baseIsArguments(function(){return arguments}())?baseIsArguments:function(e){return isObjectLike(e)&&V.call(e,"callee")&&!ei.call(e,"callee")},ey=Array.isArray;function isArrayLike(e){return null!=e&&isLength(e.length)&&!isFunction(e)}var ev=el||function(){return!1};function isFunction(e){if(!isObject(e))return!1;var t=baseGetTag(e);return t==v||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function isLength(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}function isObject(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function isObjectLike(e){return null!=e&&"object"==typeof e}var eb=M?function(e){return M(e)}:function(e){return isObjectLike(e)&&isLength(e.length)&&!!w[baseGetTag(e)]};function keysIn(e){return isArrayLike(e)?function(e,t){var n=ey(e),o=!n&&eg(e),a=!n&&!o&&ev(e),s=!n&&!o&&!a&&eb(e),c=n||o||a||s,l=c?function(e,t){for(var n=-1,o=Array(e);++n<e;)o[n]=t(n);return o}(e.length,String):[],u=l.length;for(var h in e)(t||V.call(e,h))&&!(c&&("length"==h||a&&("offset"==h||"parent"==h)||s&&("buffer"==h||"byteLength"==h||"byteOffset"==h)||isIndex(h,u)))&&l.push(h);return l}(e,!0):function(e){if(!isObject(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=isPrototype(e),n=[];for(var o in e)"constructor"==o&&(t||!V.call(e,o))||n.push(o);return n}(e)}var eC=(f=function(e,t,n,o){!function baseMerge(e,t,n,o,a){e!==t&&baseFor(t,function(s,c){if(a||(a=new Stack),isObject(s))(function(e,t,n,o,a,s,c){var l=safeGet(e,n),u=safeGet(t,n),h=c.get(u);if(h){assignMergeValue(e,n,h);return}var p=s?s(l,u,n+"",e,t,c):void 0,f=void 0===p;if(f){var m,g,y=ey(u),v=!y&&ev(u),C=!y&&!v&&eb(u);p=u,y||v||C?ey(l)?p=l:isObjectLike(l)&&isArrayLike(l)?p=function(e,t){var n=-1,o=e.length;for(t||(t=Array(o));++n<o;)t[n]=e[n];return t}(l):v?(f=!1,p=function(e,t){if(t)return e.slice();var n=e.length,o=er?er(n):new e.constructor(n);return e.copy(o),o}(u,!0)):C?(f=!1,g=new(m=u.buffer).constructor(m.byteLength),new et(g).set(new et(m)),p=new u.constructor(g,u.byteOffset,u.length)):p=[]:function(e){if(!isObjectLike(e)||baseGetTag(e)!=b)return!1;var t=en(e);if(null===t)return!0;var n=V.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&H.call(n)==$}(u)||eg(u)?(p=l,eg(l)?p=function(e,t,n,o){var a=!n;n||(n={});for(var s=-1,c=t.length;++s<c;){var l=t[s],u=o?o(n[l],e[l],l,n,e):void 0;void 0===u&&(u=e[l]),a?baseAssignValue(n,l,u):function(e,t,n){var o=e[t];V.call(e,t)&&eq(o,n)&&(void 0!==n||t in e)||baseAssignValue(e,t,n)}(n,l,u)}return n}(l,keysIn(l)):(!isObject(l)||isFunction(l))&&(p="function"!=typeof u.constructor||isPrototype(u)?{}:ef(en(u)))):f=!1}f&&(c.set(u,p),a(p,u,o,s,c),c.delete(u)),assignMergeValue(e,n,p)})(e,t,c,n,baseMerge,o,a);else{var l=o?o(safeGet(e,c),s,c+"",e,t,a):void 0;void 0===l&&(l=s),assignMergeValue(e,c,l)}},keysIn)}(e,t,n,o)},em((c=m=function(e,t){var n=-1,o=t.length,a=o>1?t[o-1]:void 0,s=o>2?t[2]:void 0;for(a=f.length>3&&"function"==typeof a?(o--,a):void 0,s&&function(e,t,n){if(!isObject(n))return!1;var o=typeof t;return("number"==o?!!(isArrayLike(n)&&isIndex(t,n.length)):"string"==o&&(t in n))&&eq(n[t],e)}(t[0],t[1],s)&&(a=o<3?void 0:a,o=1),e=Object(e);++n<o;){var c=t[n];c&&f(e,c,n,a)}return e},l=eu((l=void 0,c.length-1),0),function(){for(var e=arguments,t=-1,n=eu(e.length-l,0),o=Array(n);++t<n;)o[t]=e[l+t];t=-1;for(var a=Array(l+1);++t<l;)a[t]=e[t];return a[l]=identity(o),function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}(c,this,a)}),m+""));function identity(e){return e}e.exports=eC},6570:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/_app",function(){return n(925)}])},1119:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Image",{enumerable:!0,get:function(){return v}});let o=n(3219),a=n(6794),s=a._(n(2784)),c=o._(n(8316)),l=o._(n(5487)),u=n(3476),h=n(6845),p=n(6020);n(9737);let f=n(9994),m=o._(n(9504)),g={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!0};function handleLoading(e,t,n,o,a,s){let c=null==e?void 0:e.src;if(!e||e["data-loaded-src"]===c)return;e["data-loaded-src"]=c;let l="decode"in e?e.decode():Promise.resolve();l.catch(()=>{}).then(()=>{if(e.parentElement&&e.isConnected){if("empty"!==t&&a(!0),null==n?void 0:n.current){let t=new Event("load");Object.defineProperty(t,"target",{writable:!1,value:e});let o=!1,a=!1;n.current({...t,nativeEvent:t,currentTarget:e,target:e,isDefaultPrevented:()=>o,isPropagationStopped:()=>a,persist:()=>{},preventDefault:()=>{o=!0,t.preventDefault()},stopPropagation:()=>{a=!0,t.stopPropagation()}})}(null==o?void 0:o.current)&&o.current(e)}})}function getDynamicProps(e){let[t,n]=s.version.split("."),o=parseInt(t,10),a=parseInt(n,10);return o>18||18===o&&a>=3?{fetchPriority:e}:{fetchpriority:e}}let y=(0,s.forwardRef)((e,t)=>{let{src:n,srcSet:o,sizes:a,height:c,width:l,decoding:u,className:h,style:p,fetchPriority:f,placeholder:m,loading:g,unoptimized:y,fill:v,onLoadRef:b,onLoadingCompleteRef:C,setBlurComplete:_,setShowAltText:w,onLoad:S,onError:E,...T}=e;return s.default.createElement("img",{...T,...getDynamicProps(f),loading:g,width:l,height:c,decoding:u,"data-nimg":v?"fill":"1",className:h,style:p,sizes:a,srcSet:o,src:n,ref:(0,s.useCallback)(e=>{t&&("function"==typeof t?t(e):"object"==typeof t&&(t.current=e)),e&&(E&&(e.src=e.src),e.complete&&handleLoading(e,m,b,C,_,y))},[n,m,b,C,_,E,y,t]),onLoad:e=>{let t=e.currentTarget;handleLoading(t,m,b,C,_,y)},onError:e=>{w(!0),"empty"!==m&&_(!0),E&&E(e)}})});function ImagePreload(e){let{isAppRouter:t,imgAttributes:n}=e,o={as:"image",imageSrcSet:n.srcSet,imageSizes:n.sizes,crossOrigin:n.crossOrigin,referrerPolicy:n.referrerPolicy,...getDynamicProps(n.fetchPriority)};return t&&c.default.preload?(c.default.preload(n.src,o),null):s.default.createElement(l.default,null,s.default.createElement("link",{key:"__nimg-"+n.src+n.srcSet+n.sizes,rel:"preload",href:n.srcSet?void 0:n.src,...o}))}let v=(0,s.forwardRef)((e,t)=>{let n=(0,s.useContext)(f.RouterContext),o=(0,s.useContext)(p.ImageConfigContext),a=(0,s.useMemo)(()=>{let e=g||o||h.imageConfigDefault,t=[...e.deviceSizes,...e.imageSizes].sort((e,t)=>e-t),n=e.deviceSizes.sort((e,t)=>e-t);return{...e,allSizes:t,deviceSizes:n}},[o]),{onLoad:c,onLoadingComplete:l}=e,v=(0,s.useRef)(c);(0,s.useEffect)(()=>{v.current=c},[c]);let b=(0,s.useRef)(l);(0,s.useEffect)(()=>{b.current=l},[l]);let[C,_]=(0,s.useState)(!1),[w,S]=(0,s.useState)(!1),{props:E,meta:T}=(0,u.getImgProps)(e,{defaultLoader:m.default,imgConf:a,blurComplete:C,showAltText:w});return s.default.createElement(s.default.Fragment,null,s.default.createElement(y,{...E,unoptimized:T.unoptimized,placeholder:T.placeholder,fill:T.fill,onLoadRef:v,onLoadingCompleteRef:b,setBlurComplete:_,setShowAltText:S,ref:t}),T.priority?s.default.createElement(ImagePreload,{isAppRouter:!n,imgAttributes:E}):null)});("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},3476:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getImgProps",{enumerable:!0,get:function(){return getImgProps}}),n(9737);let o=n(42),a=n(6845);function isStaticRequire(e){return void 0!==e.default}function getInt(e){return void 0===e?e:"number"==typeof e?Number.isFinite(e)?e:NaN:"string"==typeof e&&/^[0-9]+$/.test(e)?parseInt(e,10):NaN}function getImgProps(e,t){var n;let s,c,l,{src:u,sizes:h,unoptimized:p=!1,priority:f=!1,loading:m,className:g,quality:y,width:v,height:b,fill:C=!1,style:_,onLoad:w,onLoadingComplete:S,placeholder:E="empty",blurDataURL:T,fetchPriority:k,layout:I,objectFit:x,objectPosition:R,lazyBoundary:P,lazyRoot:M,...O}=e,{imgConf:L,showAltText:U,blurComplete:q,defaultLoader:H}=t,V=L||a.imageConfigDefault;if("allSizes"in V)s=V;else{let e=[...V.deviceSizes,...V.imageSizes].sort((e,t)=>e-t),t=V.deviceSizes.sort((e,t)=>e-t);s={...V,allSizes:e,deviceSizes:t}}let G=O.loader||H;delete O.loader,delete O.srcSet;let K="__next_img_default"in G;if(K){if("custom"===s.loader)throw Error('Image with src "'+u+'" is missing "loader" prop.\nRead more: https://nextjs.org/docs/messages/next-image-missing-loader')}else{let e=G;G=t=>{let{config:n,...o}=t;return e(o)}}if(I){"fill"===I&&(C=!0);let e={intrinsic:{maxWidth:"100%",height:"auto"},responsive:{width:"100%",height:"auto"}}[I];e&&(_={..._,...e});let t={responsive:"100vw",fill:"100vw"}[I];t&&!h&&(h=t)}let $="",J=getInt(v),Y=getInt(b);if("object"==typeof(n=u)&&(isStaticRequire(n)||void 0!==n.src)){let e=isStaticRequire(u)?u.default:u;if(!e.src)throw Error("An object should only be passed to the image component src parameter if it comes from a static image import. It must include src. Received "+JSON.stringify(e));if(!e.height||!e.width)throw Error("An object should only be passed to the image component src parameter if it comes from a static image import. It must include height and width. Received "+JSON.stringify(e));if(c=e.blurWidth,l=e.blurHeight,T=T||e.blurDataURL,$=e.src,!C){if(J||Y){if(J&&!Y){let t=J/e.width;Y=Math.round(e.height*t)}else if(!J&&Y){let t=Y/e.height;J=Math.round(e.width*t)}}else J=e.width,Y=e.height}}let X=!f&&("lazy"===m||void 0===m);(!(u="string"==typeof u?u:$)||u.startsWith("data:")||u.startsWith("blob:"))&&(p=!0,X=!1),s.unoptimized&&(p=!0),K&&u.endsWith(".svg")&&!s.dangerouslyAllowSVG&&(p=!0),f&&(k="high");let et=getInt(y),er=Object.assign(C?{position:"absolute",height:"100%",width:"100%",left:0,top:0,right:0,bottom:0,objectFit:x,objectPosition:R}:{},U?{}:{color:"transparent"},_),en=q||"empty"===E?null:"blur"===E?'url("data:image/svg+xml;charset=utf-8,'+(0,o.getImageBlurSvg)({widthInt:J,heightInt:Y,blurWidth:c,blurHeight:l,blurDataURL:T||"",objectFit:er.objectFit})+'")':'url("'+E+'")',eo=en?{backgroundSize:er.objectFit||"cover",backgroundPosition:er.objectPosition||"50% 50%",backgroundRepeat:"no-repeat",backgroundImage:en}:{},ei=function(e){let{config:t,src:n,unoptimized:o,width:a,quality:s,sizes:c,loader:l}=e;if(o)return{src:n,srcSet:void 0,sizes:void 0};let{widths:u,kind:h}=function(e,t,n){let{deviceSizes:o,allSizes:a}=e;if(n){let e=/(^|\s)(1?\d?\d)vw/g,t=[];for(let o;o=e.exec(n);o)t.push(parseInt(o[2]));if(t.length){let e=.01*Math.min(...t);return{widths:a.filter(t=>t>=o[0]*e),kind:"w"}}return{widths:a,kind:"w"}}if("number"!=typeof t)return{widths:o,kind:"w"};let s=[...new Set([t,2*t].map(e=>a.find(t=>t>=e)||a[a.length-1]))];return{widths:s,kind:"x"}}(t,a,c),p=u.length-1;return{sizes:c||"w"!==h?c:"100vw",srcSet:u.map((e,o)=>l({config:t,src:n,quality:s,width:e})+" "+("w"===h?e:o+1)+h).join(", "),src:l({config:t,src:n,quality:s,width:u[p]})}}({config:s,src:u,unoptimized:p,width:J,quality:et,sizes:h,loader:G}),ea={...O,loading:X?"lazy":m,fetchPriority:k,width:J,height:Y,decoding:"async",className:g,style:{...er,...eo},sizes:ei.sizes,srcSet:ei.srcSet,src:ei.src},es={unoptimized:p,priority:f,placeholder:E,fill:C};return{props:ea,meta:es}}},42:function(e,t){"use strict";function getImageBlurSvg(e){let{widthInt:t,heightInt:n,blurWidth:o,blurHeight:a,blurDataURL:s,objectFit:c}=e,l=o?40*o:t,u=a?40*a:n,h=l&&u?"viewBox='0 0 "+l+" "+u+"'":"";return"%3Csvg xmlns='http://www.w3.org/2000/svg' "+h+"%3E%3Cfilter id='b' color-interpolation-filters='sRGB'%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3CfeColorMatrix values='1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 100 -1' result='s'/%3E%3CfeFlood x='0' y='0' width='100%25' height='100%25'/%3E%3CfeComposite operator='out' in='s'/%3E%3CfeComposite in2='SourceGraphic'/%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3C/filter%3E%3Cimage width='100%25' height='100%25' x='0' y='0' preserveAspectRatio='"+(h?"none":"contain"===c?"xMidYMid":"cover"===c?"xMidYMid slice":"none")+"' style='filter: url(%23b);' href='"+s+"'/%3E%3C/svg%3E"}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getImageBlurSvg",{enumerable:!0,get:function(){return getImageBlurSvg}})},6099:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{unstable_getImgProps:function(){return unstable_getImgProps},default:function(){return u}});let o=n(3219),a=n(3476),s=n(9737),c=n(1119),l=o._(n(9504)),unstable_getImgProps=e=>{(0,s.warnOnce)("Warning: unstable_getImgProps() is experimental and may change or be removed at any time. Use at your own risk.");let{props:t}=(0,a.getImgProps)(e,{defaultLoader:l.default,imgConf:{deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!0}});for(let[e,n]of Object.entries(t))void 0===n&&delete t[e];return{props:t}},u=c.Image},9504:function(e,t){"use strict";function defaultLoader(e){let{config:t,src:n,width:o,quality:a}=e;return t.path+"?url="+encodeURIComponent(n)+"&w="+o+"&q="+(a||75)}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return n}}),defaultLoader.__next_img_default=!0;let n=defaultLoader},925:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return App}});var o,a,s,c,l,u,h,p,f,m,g,y,v,b,C,_,w,S,E,T,k,I,x,R,P,M=n(2322),O=n(5512),L=n(7296),U=n(7905),q=n(2784),H=n(9791);let V=["borders","breakpoints","colors","components","config","direction","fonts","fontSizes","fontWeights","letterSpacings","lineHeights","radii","shadows","sizes","space","styles","transition","zIndices"];function anatomy(e,t={}){let n=!1;function toPart(t){let n=["container","root"].includes(t??"")?[e]:[e,t],o=n.filter(Boolean).join("__"),a=`chakra-${o}`,s={className:a,selector:`.${a}`,toString:()=>t};return s}return{parts:function(...o){for(let e of(!function(){if(!n){n=!0;return}throw Error("[anatomy] .part(...) should only be called once. Did you mean to use .extend(...) ?")}(),o))t[e]=toPart(e);return anatomy(e,t)},toPart,extend:function(...n){for(let e of n)e in t||(t[e]=toPart(e));return anatomy(e,t)},selectors:function(){let e=Object.fromEntries(Object.entries(t).map(([e,t])=>[e,t.selector]));return e},classnames:function(){let e=Object.fromEntries(Object.entries(t).map(([e,t])=>[e,t.className]));return e},get keys(){return Object.keys(t)},__type:{}}}let G=anatomy("accordion").parts("root","container","button","panel","icon"),K=anatomy("alert").parts("title","description","container","icon","spinner"),$=anatomy("avatar").parts("label","badge","container","excessLabel","group"),J=anatomy("breadcrumb").parts("link","item","container","separator");anatomy("button").parts();let Y=anatomy("checkbox").parts("control","icon","container","label");anatomy("progress").parts("track","filledTrack","label");let X=anatomy("drawer").parts("overlay","dialogContainer","dialog","header","closeButton","body","footer"),et=anatomy("editable").parts("preview","input","textarea"),er=anatomy("form").parts("container","requiredIndicator","helperText"),en=anatomy("formError").parts("text","icon"),eo=anatomy("input").parts("addon","field","element","group"),ei=anatomy("list").parts("container","item","icon"),ea=anatomy("menu").parts("button","list","item","groupTitle","icon","command","divider"),es=anatomy("modal").parts("overlay","dialogContainer","dialog","header","closeButton","body","footer"),ec=anatomy("numberinput").parts("root","field","stepperGroup","stepper");anatomy("pininput").parts("field");let el=anatomy("popover").parts("content","header","body","footer","popper","arrow","closeButton"),eu=anatomy("progress").parts("label","filledTrack","track"),ed=anatomy("radio").parts("container","control","label"),eh=anatomy("select").parts("field","icon"),ep=anatomy("slider").parts("container","track","thumb","filledTrack","mark"),ef=anatomy("stat").parts("container","label","helpText","number","icon"),em=anatomy("switch").parts("container","track","thumb","label"),eg=anatomy("table").parts("table","thead","tbody","tr","th","td","tfoot","caption"),ey=anatomy("tabs").parts("root","tab","tablist","tabpanel","tabpanels","indicator"),ev=anatomy("tag").parts("container","label","closeButton"),eb=anatomy("card").parts("container","header","body","footer");anatomy("stepper").parts("stepper","step","title","description","indicator","separator","icon","number");var eC=n(559);let{definePartsStyle:e_,defineMultiStyleConfig:ew}=(0,eC.D)(G.keys),eS=(0,eC.k0)({borderTopWidth:"1px",borderColor:"inherit",_last:{borderBottomWidth:"1px"}}),eE=(0,eC.k0)({transitionProperty:"common",transitionDuration:"normal",fontSize:"md",_focusVisible:{boxShadow:"outline"},_hover:{bg:"blackAlpha.50"},_disabled:{opacity:.4,cursor:"not-allowed"},px:"4",py:"2"}),eT=(0,eC.k0)({pt:"2",px:"4",pb:"5"}),ek=(0,eC.k0)({fontSize:"1.25em"}),eA=e_({container:eS,button:eE,panel:eT,icon:ek}),eI=ew({baseStyle:eA});var ex=n(9149);function guard(e,t,n){return Math.min(Math.max(e,n),t)}var eR=class extends Error{constructor(e){super(`Failed to parse color: "${e}"`)}};function parseToRgba(e){if("string"!=typeof e)throw new eR(e);if("transparent"===e.trim().toLowerCase())return[0,0,0,0];let t=e.trim();t=eD.test(e)?function(e){let t=e.toLowerCase().trim(),n=eP[function(e){let t=5381,n=e.length;for(;n;)t=33*t^e.charCodeAt(--n);return(t>>>0)%2341}(t)];if(!n)throw new eR(e);return`#${n}`}(e):e;let n=eM.exec(t);if(n){let e=Array.from(n).slice(1);return[...e.slice(0,3).map(e=>parseInt(r(e,2),16)),parseInt(r(e[3]||"f",2),16)/255]}let o=eO.exec(t);if(o){let e=Array.from(o).slice(1);return[...e.slice(0,3).map(e=>parseInt(e,16)),parseInt(e[3]||"ff",16)/255]}let a=eN.exec(t);if(a){let e=Array.from(a).slice(1);return[...e.slice(0,3).map(e=>parseInt(e,10)),parseFloat(e[3]||"1")]}let s=eB.exec(t);if(s){let[t,n,o,a]=Array.from(s).slice(1).map(parseFloat);if(guard(0,100,n)!==n||guard(0,100,o)!==o)throw new eR(e);return[...hslToRgb(t,n,o),Number.isNaN(a)?1:a]}throw new eR(e)}let colorToInt=e=>parseInt(e.replace(/_/g,""),36),eP="1q29ehhb 1n09sgk7 1kl1ekf_ _yl4zsno 16z9eiv3 1p29lhp8 _bd9zg04 17u0____ _iw9zhe5 _to73___ _r45e31e _7l6g016 _jh8ouiv _zn3qba8 1jy4zshs 11u87k0u 1ro9yvyo 1aj3xael 1gz9zjz0 _3w8l4xo 1bf1ekf_ _ke3v___ _4rrkb__ 13j776yz _646mbhl _nrjr4__ _le6mbhl 1n37ehkb _m75f91n _qj3bzfz 1939yygw 11i5z6x8 _1k5f8xs 1509441m 15t5lwgf _ae2th1n _tg1ugcv 1lp1ugcv 16e14up_ _h55rw7n _ny9yavn _7a11xb_ 1ih442g9 _pv442g9 1mv16xof 14e6y7tu 1oo9zkds 17d1cisi _4v9y70f _y98m8kc 1019pq0v 12o9zda8 _348j4f4 1et50i2o _8epa8__ _ts6senj 1o350i2o 1mi9eiuo 1259yrp0 1ln80gnw _632xcoy 1cn9zldc _f29edu4 1n490c8q _9f9ziet 1b94vk74 _m49zkct 1kz6s73a 1eu9dtog _q58s1rz 1dy9sjiq __u89jo3 _aj5nkwg _ld89jo3 13h9z6wx _qa9z2ii _l119xgq _bs5arju 1hj4nwk9 1qt4nwk9 1ge6wau6 14j9zlcw 11p1edc_ _ms1zcxe _439shk6 _jt9y70f _754zsow 1la40eju _oq5p___ _x279qkz 1fa5r3rv _yd2d9ip _424tcku _8y1di2_ _zi2uabw _yy7rn9h 12yz980_ __39ljp6 1b59zg0x _n39zfzp 1fy9zest _b33k___ _hp9wq92 1il50hz4 _io472ub _lj9z3eo 19z9ykg0 _8t8iu3a 12b9bl4a 1ak5yw0o _896v4ku _tb8k8lv _s59zi6t _c09ze0p 1lg80oqn 1id9z8wb _238nba5 1kq6wgdi _154zssg _tn3zk49 _da9y6tc 1sg7cv4f _r12jvtt 1gq5fmkz 1cs9rvci _lp9jn1c _xw1tdnb 13f9zje6 16f6973h _vo7ir40 _bt5arjf _rc45e4t _hr4e100 10v4e100 _hc9zke2 _w91egv_ _sj2r1kk 13c87yx8 _vqpds__ _ni8ggk8 _tj9yqfb 1ia2j4r4 _7x9b10u 1fc9ld4j 1eq9zldr _5j9lhpx _ez9zl6o _md61fzm".split(" ").reduce((e,t)=>{let n=colorToInt(t.substring(0,3)),o=colorToInt(t.substring(3)).toString(16),a="";for(let e=0;e<6-o.length;e++)a+="0";return e[n]=`${a}${o}`,e},{}),r=(e,t)=>Array.from(Array(t)).map(()=>e).join(""),eM=RegExp(`^#${r("([a-f0-9])",3)}([a-f0-9])?$`,"i"),eO=RegExp(`^#${r("([a-f0-9]{2})",3)}([a-f0-9]{2})?$`,"i"),eN=RegExp(`^rgba?\\(\\s*(\\d+)\\s*${r(",\\s*(\\d+)\\s*",2)}(?:,\\s*([\\d.]+))?\\s*\\)$`,"i"),eB=/^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%(?:\s*,\s*([\d.]+))?\s*\)$/i,eD=/^[a-z]+$/i,roundColor=e=>Math.round(255*e),hslToRgb=(e,t,n)=>{let o=n/100;if(0===t)return[o,o,o].map(roundColor);let a=(e%360+360)%360/60,s=(1-Math.abs(2*o-1))*(t/100),c=s*(1-Math.abs(a%2-1)),l=0,u=0,h=0;a>=0&&a<1?(l=s,u=c):a>=1&&a<2?(l=c,u=s):a>=2&&a<3?(u=s,h=c):a>=3&&a<4?(u=c,h=s):a>=4&&a<5?(l=c,h=s):a>=5&&a<6&&(l=s,h=c);let p=o-s/2,f=l+p,m=u+p,g=h+p;return[f,m,g].map(roundColor)},isEmptyObject=e=>0===Object.keys(e).length,getColor=(e,t,n)=>{let o=function(e,t,n,o,a){for(o=0,t=t.split?t.split("."):t;o<t.length;o++)e=e?e[t[o]]:a;return e===a?n:e}(e,`colors.${t}`,t);try{return!function(e){let[t,n,o,a]=parseToRgba(e),hex=e=>{let t=guard(0,255,e).toString(16);return 1===t.length?`0${t}`:t};hex(t),hex(n),hex(o),a<1&&hex(Math.round(255*a))}(o),o}catch{return n??"#000000"}},getBrightness=e=>{let[t,n,o]=parseToRgba(e);return(299*t+587*n+114*o)/1e3},tone=e=>t=>{let n=getColor(t,e),o=getBrightness(n);return o<128?"dark":"light"},isDark=e=>t=>"dark"===tone(e)(t),color_transparentize=(e,t)=>n=>{let o=getColor(n,e);return function(e,t){let[n,o,a,s]=parseToRgba(e);return`rgba(${guard(0,255,n).toFixed()}, ${guard(0,255,o).toFixed()}, ${guard(0,255,a).toFixed()}, ${parseFloat(guard(0,1,s-t).toFixed(3))})`}(o,1-t)};function generateStripe(e="1rem",t="rgba(255, 255, 255, 0.15)"){return{backgroundImage:`linear-gradient(
    45deg,
    ${t} 25%,
    transparent 25%,
    transparent 50%,
    ${t} 50%,
    ${t} 75%,
    transparent 75%,
    transparent
  )`,backgroundSize:`${e} ${e}`}}let randomHex=()=>`#${Math.floor(16777215*Math.random()).toString(16).padEnd(6,"0")}`,{definePartsStyle:eL,defineMultiStyleConfig:eU}=(0,eC.D)(K.keys),eF=(0,ex.gJ)("alert-fg"),ez=(0,ex.gJ)("alert-bg"),eH=eL({container:{bg:ez.reference,px:"4",py:"3"},title:{fontWeight:"bold",lineHeight:"6",marginEnd:"2"},description:{lineHeight:"6"},icon:{color:eF.reference,flexShrink:0,marginEnd:"3",w:"5",h:"6"},spinner:{color:eF.reference,flexShrink:0,marginEnd:"3",w:"5",h:"5"}});function getBg(e){let{theme:t,colorScheme:n}=e,o=color_transparentize(`${n}.200`,.16)(t);return{light:`colors.${n}.100`,dark:o}}let ej=eL(e=>{let{colorScheme:t}=e,n=getBg(e);return{container:{[eF.variable]:`colors.${t}.600`,[ez.variable]:n.light,_dark:{[eF.variable]:`colors.${t}.200`,[ez.variable]:n.dark}}}}),eV=eL(e=>{let{colorScheme:t}=e,n=getBg(e);return{container:{[eF.variable]:`colors.${t}.600`,[ez.variable]:n.light,_dark:{[eF.variable]:`colors.${t}.200`,[ez.variable]:n.dark},paddingStart:"3",borderStartWidth:"4px",borderStartColor:eF.reference}}}),eG=eL(e=>{let{colorScheme:t}=e,n=getBg(e);return{container:{[eF.variable]:`colors.${t}.600`,[ez.variable]:n.light,_dark:{[eF.variable]:`colors.${t}.200`,[ez.variable]:n.dark},pt:"2",borderTopWidth:"4px",borderTopColor:eF.reference}}}),eK=eL(e=>{let{colorScheme:t}=e;return{container:{[eF.variable]:"colors.white",[ez.variable]:`colors.${t}.600`,_dark:{[eF.variable]:"colors.gray.900",[ez.variable]:`colors.${t}.200`},color:eF.reference}}}),eW=eU({baseStyle:eH,variants:{subtle:ej,"left-accent":eV,"top-accent":eG,solid:eK},defaultProps:{variant:"subtle",colorScheme:"blue"}}),e$={px:"1px",.5:"0.125rem",1:"0.25rem",1.5:"0.375rem",2:"0.5rem",2.5:"0.625rem",3:"0.75rem",3.5:"0.875rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem",12:"3rem",14:"3.5rem",16:"4rem",20:"5rem",24:"6rem",28:"7rem",32:"8rem",36:"9rem",40:"10rem",44:"11rem",48:"12rem",52:"13rem",56:"14rem",60:"15rem",64:"16rem",72:"18rem",80:"20rem",96:"24rem"},eJ={...e$,max:"max-content",min:"min-content",full:"100%","3xs":"14rem","2xs":"16rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem","8xl":"90rem",prose:"60ch",container:{sm:"640px",md:"768px",lg:"1024px",xl:"1280px"}},isFunction=e=>"function"==typeof e;function runIfFn(e,...t){return isFunction(e)?e(...t):e}let{definePartsStyle:eY,defineMultiStyleConfig:eQ}=(0,eC.D)($.keys),eX=(0,ex.gJ)("avatar-border-color"),eZ=(0,ex.gJ)("avatar-bg"),e0=(0,ex.gJ)("avatar-font-size"),e1=(0,ex.gJ)("avatar-size"),e2=(0,eC.k0)({borderRadius:"full",border:"0.2em solid",borderColor:eX.reference,[eX.variable]:"white",_dark:{[eX.variable]:"colors.gray.800"}}),e4=(0,eC.k0)({bg:eZ.reference,fontSize:e0.reference,width:e1.reference,height:e1.reference,lineHeight:"1",[eZ.variable]:"colors.gray.200",_dark:{[eZ.variable]:"colors.whiteAlpha.400"}}),e3=(0,eC.k0)(e=>{let{name:t,theme:n}=e,o=t?function(e){var t;let n=randomHex();return!e||isEmptyObject(e)?n:e.string&&e.colors?function(e,t){let n=0;if(0===e.length)return t[0];for(let t=0;t<e.length;t+=1)n=e.charCodeAt(t)+((n<<5)-n),n&=n;return n=(n%t.length+t.length)%t.length,t[n]}(e.string,e.colors):e.string&&!e.colors?function(e){let t=0;if(0===e.length)return t.toString();for(let n=0;n<e.length;n+=1)t=e.charCodeAt(n)+((t<<5)-t),t&=t;let n="#";for(let e=0;e<3;e+=1){let o=t>>8*e&255;n+=`00${o.toString(16)}`.substr(-2)}return n}(e.string):e.colors&&!e.string?(t=e.colors)[Math.floor(Math.random()*t.length)]:n}({string:t}):"colors.gray.400",a=isDark(o)(n),s="white";return a||(s="gray.800"),{bg:eZ.reference,fontSize:e0.reference,color:s,borderColor:eX.reference,verticalAlign:"top",width:e1.reference,height:e1.reference,"&:not([data-loaded])":{[eZ.variable]:o},[eX.variable]:"colors.white",_dark:{[eX.variable]:"colors.gray.800"}}}),e5=(0,eC.k0)({fontSize:e0.reference,lineHeight:"1"}),e6=eY(e=>({badge:runIfFn(e2,e),excessLabel:runIfFn(e4,e),container:runIfFn(e3,e),label:e5}));function getSize(e){let t="100%"!==e?eJ[e]:void 0;return eY({container:{[e1.variable]:t??e,[e0.variable]:`calc(${t??e} / 2.5)`},excessLabel:{[e1.variable]:t??e,[e0.variable]:`calc(${t??e} / 2.5)`}})}let e8={"2xs":getSize(4),xs:getSize(6),sm:getSize(8),md:getSize(12),lg:getSize(16),xl:getSize(24),"2xl":getSize(32),full:getSize("100%")},e9=eQ({baseStyle:e6,sizes:e8,defaultProps:{size:"md"}}),e7=(0,ex._6)("badge",["bg","color","shadow"]),tt=(0,eC.k0)({px:1,textTransform:"uppercase",fontSize:"xs",borderRadius:"sm",fontWeight:"bold",bg:e7.bg.reference,color:e7.color.reference,boxShadow:e7.shadow.reference}),tr=(0,eC.k0)(e=>{let{colorScheme:t,theme:n}=e,o=color_transparentize(`${t}.500`,.6)(n);return{[e7.bg.variable]:`colors.${t}.500`,[e7.color.variable]:"colors.white",_dark:{[e7.bg.variable]:o,[e7.color.variable]:"colors.whiteAlpha.800"}}}),tn=(0,eC.k0)(e=>{let{colorScheme:t,theme:n}=e,o=color_transparentize(`${t}.200`,.16)(n);return{[e7.bg.variable]:`colors.${t}.100`,[e7.color.variable]:`colors.${t}.800`,_dark:{[e7.bg.variable]:o,[e7.color.variable]:`colors.${t}.200`}}}),to=(0,eC.k0)(e=>{let{colorScheme:t,theme:n}=e,o=color_transparentize(`${t}.200`,.8)(n);return{[e7.color.variable]:`colors.${t}.500`,_dark:{[e7.color.variable]:o},[e7.shadow.variable]:`inset 0 0 0px 1px ${e7.color.reference}`}}),ti=(0,eC.fj)({baseStyle:tt,variants:{solid:tr,subtle:tn,outline:to},defaultProps:{variant:"subtle",colorScheme:"gray"}}),{defineMultiStyleConfig:ta,definePartsStyle:ts}=(0,eC.D)(J.keys),tc=(0,ex.gJ)("breadcrumb-link-decor"),tl=(0,eC.k0)({transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",outline:"none",color:"inherit",textDecoration:tc.reference,[tc.variable]:"none","&:not([aria-current=page])":{cursor:"pointer",_hover:{[tc.variable]:"underline"},_focusVisible:{boxShadow:"outline"}}}),tu=ts({link:tl}),td=ta({baseStyle:tu});function mode(e,t){return n=>"dark"===n.colorMode?t:e}function orient(e){let{orientation:t,vertical:n,horizontal:o}=e;return t?"vertical"===t?n:o:{}}let th=(0,eC.k0)({lineHeight:"1.2",borderRadius:"md",fontWeight:"semibold",transitionProperty:"common",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{_disabled:{bg:"initial"}}}),tp=(0,eC.k0)(e=>{let{colorScheme:t,theme:n}=e;if("gray"===t)return{color:mode("gray.800","whiteAlpha.900")(e),_hover:{bg:mode("gray.100","whiteAlpha.200")(e)},_active:{bg:mode("gray.200","whiteAlpha.300")(e)}};let o=color_transparentize(`${t}.200`,.12)(n),a=color_transparentize(`${t}.200`,.24)(n);return{color:mode(`${t}.600`,`${t}.200`)(e),bg:"transparent",_hover:{bg:mode(`${t}.50`,o)(e)},_active:{bg:mode(`${t}.100`,a)(e)}}}),tf=(0,eC.k0)(e=>{let{colorScheme:t}=e,n=mode("gray.200","whiteAlpha.300")(e);return{border:"1px solid",borderColor:"gray"===t?n:"currentColor",".chakra-button__group[data-attached][data-orientation=horizontal] > &:not(:last-of-type)":{marginEnd:"-1px"},".chakra-button__group[data-attached][data-orientation=vertical] > &:not(:last-of-type)":{marginBottom:"-1px"},...runIfFn(tp,e)}}),tm={yellow:{bg:"yellow.400",color:"black",hoverBg:"yellow.500",activeBg:"yellow.600"},cyan:{bg:"cyan.400",color:"black",hoverBg:"cyan.500",activeBg:"cyan.600"}},tg=(0,eC.k0)(e=>{let{colorScheme:t}=e;if("gray"===t){let t=mode("gray.100","whiteAlpha.200")(e);return{bg:t,color:mode("gray.800","whiteAlpha.900")(e),_hover:{bg:mode("gray.200","whiteAlpha.300")(e),_disabled:{bg:t}},_active:{bg:mode("gray.300","whiteAlpha.400")(e)}}}let{bg:n=`${t}.500`,color:o="white",hoverBg:a=`${t}.600`,activeBg:s=`${t}.700`}=tm[t]??{},c=mode(n,`${t}.200`)(e);return{bg:c,color:mode(o,"gray.800")(e),_hover:{bg:mode(a,`${t}.300`)(e),_disabled:{bg:c}},_active:{bg:mode(s,`${t}.400`)(e)}}}),ty=(0,eC.k0)(e=>{let{colorScheme:t}=e;return{padding:0,height:"auto",lineHeight:"normal",verticalAlign:"baseline",color:mode(`${t}.500`,`${t}.200`)(e),_hover:{textDecoration:"underline",_disabled:{textDecoration:"none"}},_active:{color:mode(`${t}.700`,`${t}.500`)(e)}}}),tv=(0,eC.k0)({bg:"none",color:"inherit",display:"inline",lineHeight:"inherit",m:"0",p:"0"}),tb={lg:(0,eC.k0)({h:"12",minW:"12",fontSize:"lg",px:"6"}),md:(0,eC.k0)({h:"10",minW:"10",fontSize:"md",px:"4"}),sm:(0,eC.k0)({h:"8",minW:"8",fontSize:"sm",px:"3"}),xs:(0,eC.k0)({h:"6",minW:"6",fontSize:"xs",px:"2"})},tC=(0,eC.fj)({baseStyle:th,variants:{ghost:tp,outline:tf,solid:tg,link:ty,unstyled:tv},sizes:tb,defaultProps:{variant:"solid",size:"md",colorScheme:"gray"}}),{definePartsStyle:t_,defineMultiStyleConfig:tw}=(0,eC.D)(eb.keys),tS=(0,ex.gJ)("card-bg"),tE=(0,ex.gJ)("card-padding"),tT=(0,ex.gJ)("card-shadow"),tk=(0,ex.gJ)("card-radius"),tA=(0,ex.gJ)("card-border-width","0"),tI=(0,ex.gJ)("card-border-color"),tx=t_({container:{[tS.variable]:"colors.chakra-body-bg",backgroundColor:tS.reference,boxShadow:tT.reference,borderRadius:tk.reference,color:"chakra-body-text",borderWidth:tA.reference,borderColor:tI.reference},body:{padding:tE.reference,flex:"1 1 0%"},header:{padding:tE.reference},footer:{padding:tE.reference}}),tR={sm:t_({container:{[tk.variable]:"radii.base",[tE.variable]:"space.3"}}),md:t_({container:{[tk.variable]:"radii.md",[tE.variable]:"space.5"}}),lg:t_({container:{[tk.variable]:"radii.xl",[tE.variable]:"space.7"}})},tP={elevated:t_({container:{[tT.variable]:"shadows.base",_dark:{[tS.variable]:"colors.gray.700"}}}),outline:t_({container:{[tA.variable]:"1px",[tI.variable]:"colors.chakra-border-color"}}),filled:t_({container:{[tS.variable]:"colors.chakra-subtle-bg"}}),unstyled:{body:{[tE.variable]:0},header:{[tE.variable]:0},footer:{[tE.variable]:0}}},tM=tw({baseStyle:tx,variants:tP,sizes:tR,defaultProps:{variant:"elevated",size:"md"}}),{definePartsStyle:tO,defineMultiStyleConfig:tN}=(0,eC.D)(Y.keys),tB=(0,ex.gJ)("checkbox-size"),tD=(0,eC.k0)(e=>{let{colorScheme:t}=e;return{w:tB.reference,h:tB.reference,transitionProperty:"box-shadow",transitionDuration:"normal",border:"2px solid",borderRadius:"sm",borderColor:"inherit",color:"white",_checked:{bg:mode(`${t}.500`,`${t}.200`)(e),borderColor:mode(`${t}.500`,`${t}.200`)(e),color:mode("white","gray.900")(e),_hover:{bg:mode(`${t}.600`,`${t}.300`)(e),borderColor:mode(`${t}.600`,`${t}.300`)(e)},_disabled:{borderColor:mode("gray.200","transparent")(e),bg:mode("gray.200","whiteAlpha.300")(e),color:mode("gray.500","whiteAlpha.500")(e)}},_indeterminate:{bg:mode(`${t}.500`,`${t}.200`)(e),borderColor:mode(`${t}.500`,`${t}.200`)(e),color:mode("white","gray.900")(e)},_disabled:{bg:mode("gray.100","whiteAlpha.100")(e),borderColor:mode("gray.100","transparent")(e)},_focusVisible:{boxShadow:"outline"},_invalid:{borderColor:mode("red.500","red.300")(e)}}}),tL=(0,eC.k0)({_disabled:{cursor:"not-allowed"}}),tU=(0,eC.k0)({userSelect:"none",_disabled:{opacity:.4}}),tF=(0,eC.k0)({transitionProperty:"transform",transitionDuration:"normal"}),tq=tO(e=>({icon:tF,container:tL,control:runIfFn(tD,e),label:tU})),tz={sm:tO({control:{[tB.variable]:"sizes.3"},label:{fontSize:"sm"},icon:{fontSize:"3xs"}}),md:tO({control:{[tB.variable]:"sizes.4"},label:{fontSize:"md"},icon:{fontSize:"2xs"}}),lg:tO({control:{[tB.variable]:"sizes.5"},label:{fontSize:"lg"},icon:{fontSize:"2xs"}})},tH=tN({baseStyle:tq,sizes:tz,defaultProps:{size:"md",colorScheme:"blue"}});function css_var_escape(e){let t=function(e,t="-"){return e.replace(/\s+/g,t)}(e.toString());return t.includes("\\.")?e:Number.isInteger(parseFloat(e.toString()))?e:t.replace(".","\\.")}function cssVar(e,t){var n,o;let a=function(e,t=""){return`--${function(e,t=""){return[t,css_var_escape(e)].filter(Boolean).join("-")}(e,t)}`}(e,t?.prefix);return{variable:a,reference:(n="string"==typeof(o=t?.fallback)?o:o?.reference,`var(${css_var_escape(a)}${n?`, ${n}`:""})`)}}let tj=cssVar("close-button-size"),tV=cssVar("close-button-bg"),tG=(0,eC.k0)({w:[tj.reference],h:[tj.reference],borderRadius:"md",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{[tV.variable]:"colors.blackAlpha.100",_dark:{[tV.variable]:"colors.whiteAlpha.100"}},_active:{[tV.variable]:"colors.blackAlpha.200",_dark:{[tV.variable]:"colors.whiteAlpha.200"}},_focusVisible:{boxShadow:"outline"},bg:tV.reference}),tK={lg:(0,eC.k0)({[tj.variable]:"sizes.10",fontSize:"md"}),md:(0,eC.k0)({[tj.variable]:"sizes.8",fontSize:"xs"}),sm:(0,eC.k0)({[tj.variable]:"sizes.6",fontSize:"2xs"})},tW=(0,eC.fj)({baseStyle:tG,sizes:tK,defaultProps:{size:"md"}}),{variants:t$,defaultProps:tJ}=ti,tY=(0,eC.k0)({fontFamily:"mono",fontSize:"sm",px:"0.2em",borderRadius:"sm",bg:e7.bg.reference,color:e7.color.reference,boxShadow:e7.shadow.reference}),tQ=(0,eC.fj)({baseStyle:tY,variants:t$,defaultProps:tJ}),tX=(0,eC.k0)({w:"100%",mx:"auto",maxW:"prose",px:"4"}),tZ=(0,eC.fj)({baseStyle:tX}),t0=(0,eC.k0)({opacity:.6,borderColor:"inherit"}),t1=(0,eC.k0)({borderStyle:"solid"}),t2=(0,eC.k0)({borderStyle:"dashed"}),t4=(0,eC.fj)({baseStyle:t0,variants:{solid:t1,dashed:t2},defaultProps:{variant:"solid"}}),{definePartsStyle:t3,defineMultiStyleConfig:t5}=(0,eC.D)(X.keys),t6=(0,ex.gJ)("drawer-bg"),t8=(0,ex.gJ)("drawer-box-shadow");function drawer_getSize(e){return"full"===e?t3({dialog:{maxW:"100vw",h:"100vh"}}):t3({dialog:{maxW:e}})}let t9=(0,eC.k0)({bg:"blackAlpha.600",zIndex:"modal"}),t7=(0,eC.k0)({display:"flex",zIndex:"modal",justifyContent:"center"}),rt=(0,eC.k0)(e=>{let{isFullHeight:t}=e;return{...t&&{height:"100vh"},zIndex:"modal",maxH:"100vh",color:"inherit",[t6.variable]:"colors.white",[t8.variable]:"shadows.lg",_dark:{[t6.variable]:"colors.gray.700",[t8.variable]:"shadows.dark-lg"},bg:t6.reference,boxShadow:t8.reference}}),rr=(0,eC.k0)({px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"}),rn=(0,eC.k0)({position:"absolute",top:"2",insetEnd:"3"}),ro=(0,eC.k0)({px:"6",py:"2",flex:"1",overflow:"auto"}),ri=(0,eC.k0)({px:"6",py:"4"}),ra=t3(e=>({overlay:t9,dialogContainer:t7,dialog:runIfFn(rt,e),header:rr,closeButton:rn,body:ro,footer:ri})),rs={xs:drawer_getSize("xs"),sm:drawer_getSize("md"),md:drawer_getSize("lg"),lg:drawer_getSize("2xl"),xl:drawer_getSize("4xl"),full:drawer_getSize("full")},rc=t5({baseStyle:ra,sizes:rs,defaultProps:{size:"xs"}}),{definePartsStyle:rl,defineMultiStyleConfig:ru}=(0,eC.D)(et.keys),rd=(0,eC.k0)({borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal"}),rh=(0,eC.k0)({borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}}),rp=(0,eC.k0)({borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}}),rf=rl({preview:rd,input:rh,textarea:rp}),rm=ru({baseStyle:rf}),{definePartsStyle:rg,defineMultiStyleConfig:ry}=(0,eC.D)(er.keys),rv=(0,ex.gJ)("form-control-color"),rb=(0,eC.k0)({marginStart:"1",[rv.variable]:"colors.red.500",_dark:{[rv.variable]:"colors.red.300"},color:rv.reference}),rC=(0,eC.k0)({mt:"2",[rv.variable]:"colors.gray.600",_dark:{[rv.variable]:"colors.whiteAlpha.600"},color:rv.reference,lineHeight:"normal",fontSize:"sm"}),r_=rg({container:{width:"100%",position:"relative"},requiredIndicator:rb,helperText:rC}),rw=ry({baseStyle:r_}),{definePartsStyle:rS,defineMultiStyleConfig:rE}=(0,eC.D)(en.keys),rT=(0,ex.gJ)("form-error-color"),rk=(0,eC.k0)({[rT.variable]:"colors.red.500",_dark:{[rT.variable]:"colors.red.300"},color:rT.reference,mt:"2",fontSize:"sm",lineHeight:"normal"}),rA=(0,eC.k0)({marginEnd:"0.5em",[rT.variable]:"colors.red.500",_dark:{[rT.variable]:"colors.red.300"},color:rT.reference}),rI=rS({text:rk,icon:rA}),rx=rE({baseStyle:rI}),rR=(0,eC.k0)({fontSize:"md",marginEnd:"3",mb:"2",fontWeight:"medium",transitionProperty:"common",transitionDuration:"normal",opacity:1,_disabled:{opacity:.4}}),rP=(0,eC.fj)({baseStyle:rR}),rM=(0,eC.k0)({fontFamily:"heading",fontWeight:"bold"}),rO={"4xl":(0,eC.k0)({fontSize:["6xl",null,"7xl"],lineHeight:1}),"3xl":(0,eC.k0)({fontSize:["5xl",null,"6xl"],lineHeight:1}),"2xl":(0,eC.k0)({fontSize:["4xl",null,"5xl"],lineHeight:[1.2,null,1]}),xl:(0,eC.k0)({fontSize:["3xl",null,"4xl"],lineHeight:[1.33,null,1.2]}),lg:(0,eC.k0)({fontSize:["2xl",null,"3xl"],lineHeight:[1.33,null,1.2]}),md:(0,eC.k0)({fontSize:"xl",lineHeight:1.2}),sm:(0,eC.k0)({fontSize:"md",lineHeight:1.2}),xs:(0,eC.k0)({fontSize:"sm",lineHeight:1.2})},rN=(0,eC.fj)({baseStyle:rM,sizes:rO,defaultProps:{size:"xl"}}),{definePartsStyle:rB,defineMultiStyleConfig:rD}=(0,eC.D)(eo.keys),rL=(0,ex.gJ)("input-height"),rU=(0,ex.gJ)("input-font-size"),rF=(0,ex.gJ)("input-padding"),rq=(0,ex.gJ)("input-border-radius"),rz=rB({addon:{height:rL.reference,fontSize:rU.reference,px:rF.reference,borderRadius:rq.reference},field:{width:"100%",height:rL.reference,fontSize:rU.reference,px:rF.reference,borderRadius:rq.reference,minWidth:0,outline:0,position:"relative",appearance:"none",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed"}}}),rH={lg:(0,eC.k0)({[rU.variable]:"fontSizes.lg",[rF.variable]:"space.4",[rq.variable]:"radii.md",[rL.variable]:"sizes.12"}),md:(0,eC.k0)({[rU.variable]:"fontSizes.md",[rF.variable]:"space.4",[rq.variable]:"radii.md",[rL.variable]:"sizes.10"}),sm:(0,eC.k0)({[rU.variable]:"fontSizes.sm",[rF.variable]:"space.3",[rq.variable]:"radii.sm",[rL.variable]:"sizes.8"}),xs:(0,eC.k0)({[rU.variable]:"fontSizes.xs",[rF.variable]:"space.2",[rq.variable]:"radii.sm",[rL.variable]:"sizes.6"})},rj={lg:rB({field:rH.lg,group:rH.lg}),md:rB({field:rH.md,group:rH.md}),sm:rB({field:rH.sm,group:rH.sm}),xs:rB({field:rH.xs,group:rH.xs})};function getDefaults(e){let{focusBorderColor:t,errorBorderColor:n}=e;return{focusBorderColor:t||mode("blue.500","blue.300")(e),errorBorderColor:n||mode("red.500","red.300")(e)}}let rV=rB(e=>{let{theme:t}=e,{focusBorderColor:n,errorBorderColor:o}=getDefaults(e);return{field:{border:"1px solid",borderColor:"inherit",bg:"inherit",_hover:{borderColor:mode("gray.300","whiteAlpha.400")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:getColor(t,o),boxShadow:`0 0 0 1px ${getColor(t,o)}`},_focusVisible:{zIndex:1,borderColor:getColor(t,n),boxShadow:`0 0 0 1px ${getColor(t,n)}`}},addon:{border:"1px solid",borderColor:mode("inherit","whiteAlpha.50")(e),bg:mode("gray.100","whiteAlpha.300")(e)}}}),rG=rB(e=>{let{theme:t}=e,{focusBorderColor:n,errorBorderColor:o}=getDefaults(e);return{field:{border:"2px solid",borderColor:"transparent",bg:mode("gray.100","whiteAlpha.50")(e),_hover:{bg:mode("gray.200","whiteAlpha.100")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:getColor(t,o)},_focusVisible:{bg:"transparent",borderColor:getColor(t,n)}},addon:{border:"2px solid",borderColor:"transparent",bg:mode("gray.100","whiteAlpha.50")(e)}}}),rK=rB(e=>{let{theme:t}=e,{focusBorderColor:n,errorBorderColor:o}=getDefaults(e);return{field:{borderBottom:"1px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent",_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:getColor(t,o),boxShadow:`0px 1px 0px 0px ${getColor(t,o)}`},_focusVisible:{borderColor:getColor(t,n),boxShadow:`0px 1px 0px 0px ${getColor(t,n)}`}},addon:{borderBottom:"2px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent"}}}),rW=rB({field:{bg:"transparent",px:"0",height:"auto"},addon:{bg:"transparent",px:"0",height:"auto"}}),r$=rD({baseStyle:rz,sizes:rj,variants:{outline:rV,filled:rG,flushed:rK,unstyled:rW},defaultProps:{size:"md",variant:"outline"}}),rJ=(0,ex.gJ)("kbd-bg"),rY=(0,eC.k0)({[rJ.variable]:"colors.gray.100",_dark:{[rJ.variable]:"colors.whiteAlpha.100"},bg:rJ.reference,borderRadius:"md",borderWidth:"1px",borderBottomWidth:"3px",fontSize:"0.8em",fontWeight:"bold",lineHeight:"normal",px:"0.4em",whiteSpace:"nowrap"}),rQ=(0,eC.fj)({baseStyle:rY}),rX=(0,eC.k0)({transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}}),rZ=(0,eC.fj)({baseStyle:rX}),{defineMultiStyleConfig:r0,definePartsStyle:r1}=(0,eC.D)(ei.keys),r2=(0,eC.k0)({marginEnd:"2",display:"inline",verticalAlign:"text-bottom"}),r4=r1({icon:r2}),r3=r0({baseStyle:r4}),{defineMultiStyleConfig:r5,definePartsStyle:r6}=(0,eC.D)(ea.keys),r8=(0,ex.gJ)("menu-bg"),r9=(0,ex.gJ)("menu-shadow"),r7=(0,eC.k0)({[r8.variable]:"#fff",[r9.variable]:"shadows.sm",_dark:{[r8.variable]:"colors.gray.700",[r9.variable]:"shadows.dark-lg"},color:"inherit",minW:"3xs",py:"2",zIndex:"dropdown",borderRadius:"md",borderWidth:"1px",bg:r8.reference,boxShadow:r9.reference}),nt=(0,eC.k0)({py:"1.5",px:"3",transitionProperty:"background",transitionDuration:"ultra-fast",transitionTimingFunction:"ease-in",_focus:{[r8.variable]:"colors.gray.100",_dark:{[r8.variable]:"colors.whiteAlpha.100"}},_active:{[r8.variable]:"colors.gray.200",_dark:{[r8.variable]:"colors.whiteAlpha.200"}},_expanded:{[r8.variable]:"colors.gray.100",_dark:{[r8.variable]:"colors.whiteAlpha.100"}},_disabled:{opacity:.4,cursor:"not-allowed"},bg:r8.reference}),nr=(0,eC.k0)({mx:4,my:2,fontWeight:"semibold",fontSize:"sm"}),nn=(0,eC.k0)({display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0}),no=(0,eC.k0)({opacity:.6}),ni=(0,eC.k0)({border:0,borderBottom:"1px solid",borderColor:"inherit",my:"2",opacity:.6}),na=(0,eC.k0)({transitionProperty:"common",transitionDuration:"normal"}),ns=r6({button:na,list:r7,item:nt,groupTitle:nr,icon:nn,command:no,divider:ni}),nc=r5({baseStyle:ns}),{defineMultiStyleConfig:nl,definePartsStyle:nu}=(0,eC.D)(es.keys),nd=(0,ex.gJ)("modal-bg"),nh=(0,ex.gJ)("modal-shadow"),np=(0,eC.k0)({bg:"blackAlpha.600",zIndex:"modal"}),nf=(0,eC.k0)(e=>{let{isCentered:t,scrollBehavior:n}=e;return{display:"flex",zIndex:"modal",justifyContent:"center",alignItems:t?"center":"flex-start",overflow:"inside"===n?"hidden":"auto",overscrollBehaviorY:"none"}}),nm=(0,eC.k0)(e=>{let{isCentered:t,scrollBehavior:n}=e;return{borderRadius:"md",color:"inherit",my:t?"auto":"16",mx:t?"auto":void 0,zIndex:"modal",maxH:"inside"===n?"calc(100% - 7.5rem)":void 0,[nd.variable]:"colors.white",[nh.variable]:"shadows.lg",_dark:{[nd.variable]:"colors.gray.700",[nh.variable]:"shadows.dark-lg"},bg:nd.reference,boxShadow:nh.reference}}),ng=(0,eC.k0)({px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"}),ny=(0,eC.k0)({position:"absolute",top:"2",insetEnd:"3"}),nv=(0,eC.k0)(e=>{let{scrollBehavior:t}=e;return{px:"6",py:"2",flex:"1",overflow:"inside"===t?"auto":void 0}}),nb=(0,eC.k0)({px:"6",py:"4"}),nC=nu(e=>({overlay:np,dialogContainer:runIfFn(nf,e),dialog:runIfFn(nm,e),header:ng,closeButton:ny,body:runIfFn(nv,e),footer:nb}));function modal_getSize(e){return"full"===e?nu({dialog:{maxW:"100vw",minH:"$100vh",my:"0",borderRadius:"0"}}):nu({dialog:{maxW:e}})}let n_={xs:modal_getSize("xs"),sm:modal_getSize("sm"),md:modal_getSize("md"),lg:modal_getSize("lg"),xl:modal_getSize("xl"),"2xl":modal_getSize("2xl"),"3xl":modal_getSize("3xl"),"4xl":modal_getSize("4xl"),"5xl":modal_getSize("5xl"),"6xl":modal_getSize("6xl"),full:modal_getSize("full")},nw=nl({baseStyle:nC,sizes:n_,defaultProps:{size:"md"}});function toRef(e){return(0,H.Kn)(e)&&e.reference?e.reference:String(e)}let toExpr=(e,...t)=>t.map(toRef).join(` ${e} `).replace(/calc/g,""),add=(...e)=>`calc(${toExpr("+",...e)})`,subtract=(...e)=>`calc(${toExpr("-",...e)})`,multiply=(...e)=>`calc(${toExpr("*",...e)})`,divide=(...e)=>`calc(${toExpr("/",...e)})`,negate=e=>{let t=toRef(e);return null==t||Number.isNaN(parseFloat(t))?multiply(t,-1):String(t).startsWith("-")?String(t).slice(1):`-${t}`},nS=Object.assign(e=>({add:(...t)=>nS(add(e,...t)),subtract:(...t)=>nS(subtract(e,...t)),multiply:(...t)=>nS(multiply(e,...t)),divide:(...t)=>nS(divide(e,...t)),negate:()=>nS(negate(e)),toString:()=>e.toString()}),{add,subtract,multiply,divide,negate}),nE={letterSpacings:{tighter:"-0.05em",tight:"-0.025em",normal:"0",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeights:{normal:"normal",none:1,shorter:1.25,short:1.375,base:1.5,tall:1.625,taller:"2",3:".75rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem"},fontWeights:{hairline:100,thin:200,light:300,normal:400,medium:500,semibold:600,bold:700,extrabold:800,black:900},fonts:{heading:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',body:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',mono:'SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'},fontSizes:{"3xs":"0.45rem","2xs":"0.625rem",xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem","2xl":"1.5rem","3xl":"1.875rem","4xl":"2.25rem","5xl":"3rem","6xl":"3.75rem","7xl":"4.5rem","8xl":"6rem","9xl":"8rem"}},{defineMultiStyleConfig:nT,definePartsStyle:nk}=(0,eC.D)(ec.keys),nA=cssVar("number-input-stepper-width"),nI=cssVar("number-input-input-padding"),nx=nS(nA).add("0.5rem").toString(),nR=cssVar("number-input-bg"),nP=cssVar("number-input-color"),nM=cssVar("number-input-border-color"),nO=(0,eC.k0)({[nA.variable]:"sizes.6",[nI.variable]:nx}),nN=(0,eC.k0)(e=>runIfFn(r$.baseStyle,e)?.field??{}),nB=(0,eC.k0)({width:nA.reference}),nD=(0,eC.k0)({borderStart:"1px solid",borderStartColor:nM.reference,color:nP.reference,bg:nR.reference,[nP.variable]:"colors.chakra-body-text",[nM.variable]:"colors.chakra-border-color",_dark:{[nP.variable]:"colors.whiteAlpha.800",[nM.variable]:"colors.whiteAlpha.300"},_active:{[nR.variable]:"colors.gray.200",_dark:{[nR.variable]:"colors.whiteAlpha.300"}},_disabled:{opacity:.4,cursor:"not-allowed"}}),nL=nk(e=>({root:nO,field:runIfFn(nN,e)??{},stepperGroup:nB,stepper:nD}));function number_input_getSize(e){let t=r$.sizes?.[e],n={lg:"md",md:"md",sm:"sm",xs:"sm"},o=t.field?.fontSize??"md",a=nE.fontSizes[o];return nk({field:{...t.field,paddingInlineEnd:nI.reference,verticalAlign:"top"},stepper:{fontSize:nS(a).multiply(.75).toString(),_first:{borderTopEndRadius:n[e]},_last:{borderBottomEndRadius:n[e],mt:"-1px",borderTopWidth:1}}})}let nU={xs:number_input_getSize("xs"),sm:number_input_getSize("sm"),md:number_input_getSize("md"),lg:number_input_getSize("lg")},nF=nT({baseStyle:nL,sizes:nU,variants:r$.variants,defaultProps:r$.defaultProps}),nq=(0,eC.k0)({...r$.baseStyle?.field,textAlign:"center"}),nz={lg:(0,eC.k0)({fontSize:"lg",w:12,h:12,borderRadius:"md"}),md:(0,eC.k0)({fontSize:"md",w:10,h:10,borderRadius:"md"}),sm:(0,eC.k0)({fontSize:"sm",w:8,h:8,borderRadius:"sm"}),xs:(0,eC.k0)({fontSize:"xs",w:6,h:6,borderRadius:"sm"})},nH={outline:(0,eC.k0)(e=>runIfFn(r$.variants?.outline,e)?.field??{}),flushed:(0,eC.k0)(e=>runIfFn(r$.variants?.flushed,e)?.field??{}),filled:(0,eC.k0)(e=>runIfFn(r$.variants?.filled,e)?.field??{}),unstyled:r$.variants?.unstyled.field??{}},nj=(0,eC.fj)({baseStyle:nq,sizes:nz,variants:nH,defaultProps:r$.defaultProps}),{defineMultiStyleConfig:nV,definePartsStyle:nG}=(0,eC.D)(el.keys),nK=cssVar("popper-bg"),nW=cssVar("popper-arrow-bg"),n$=cssVar("popper-arrow-shadow-color"),nJ=(0,eC.k0)({zIndex:"popover"}),nY=(0,eC.k0)({[nK.variable]:"colors.white",bg:nK.reference,[nW.variable]:nK.reference,[n$.variable]:"colors.gray.200",_dark:{[nK.variable]:"colors.gray.700",[n$.variable]:"colors.whiteAlpha.300"},width:"xs",border:"1px solid",borderColor:"inherit",borderRadius:"md",boxShadow:"sm",zIndex:"inherit",_focusVisible:{outline:0,boxShadow:"outline"}}),nQ=(0,eC.k0)({px:3,py:2,borderBottomWidth:"1px"}),nX=(0,eC.k0)({px:3,py:2}),nZ=(0,eC.k0)({px:3,py:2,borderTopWidth:"1px"}),n0=(0,eC.k0)({position:"absolute",borderRadius:"md",top:1,insetEnd:2,padding:2}),n1=nG({popper:nJ,content:nY,header:nQ,body:nX,footer:nZ,closeButton:n0}),n2=nV({baseStyle:n1}),{defineMultiStyleConfig:n4,definePartsStyle:n3}=(0,eC.D)(eu.keys),n5=(0,eC.k0)(e=>{let{colorScheme:t,theme:n,isIndeterminate:o,hasStripe:a}=e,s=mode(generateStripe(),generateStripe("1rem","rgba(0,0,0,0.1)"))(e),c=mode(`${t}.500`,`${t}.200`)(e),l=`linear-gradient(
    to right,
    transparent 0%,
    ${getColor(n,c)} 50%,
    transparent 100%
  )`;return{...!o&&a&&s,...o?{bgImage:l}:{bgColor:c}}}),n6=(0,eC.k0)({lineHeight:"1",fontSize:"0.25em",fontWeight:"bold",color:"white"}),n8=(0,eC.k0)(e=>({bg:mode("gray.100","whiteAlpha.300")(e)})),n9=(0,eC.k0)(e=>({transitionProperty:"common",transitionDuration:"slow",...n5(e)})),n7=n3(e=>({label:n6,filledTrack:n9(e),track:n8(e)})),ot={xs:n3({track:{h:"1"}}),sm:n3({track:{h:"2"}}),md:n3({track:{h:"3"}}),lg:n3({track:{h:"4"}})},or=n4({sizes:ot,baseStyle:n7,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:on,definePartsStyle:oo}=(0,eC.D)(ed.keys),oi=(0,eC.k0)(e=>{let t=runIfFn(tH.baseStyle,e)?.control;return{...t,borderRadius:"full",_checked:{...t?._checked,_before:{content:'""',display:"inline-block",pos:"relative",w:"50%",h:"50%",borderRadius:"50%",bg:"currentColor"}}}}),oa=oo(e=>({label:tH.baseStyle?.(e).label,container:tH.baseStyle?.(e).container,control:oi(e)})),os={md:oo({control:{w:"4",h:"4"},label:{fontSize:"md"}}),lg:oo({control:{w:"5",h:"5"},label:{fontSize:"lg"}}),sm:oo({control:{width:"3",height:"3"},label:{fontSize:"sm"}})},oc=on({baseStyle:oa,sizes:os,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:ol,definePartsStyle:ou}=(0,eC.D)(eh.keys),od=(0,ex.gJ)("select-bg"),oh=(0,eC.k0)({...r$.baseStyle?.field,appearance:"none",paddingBottom:"1px",lineHeight:"normal",bg:od.reference,[od.variable]:"colors.white",_dark:{[od.variable]:"colors.gray.700"},"> option, > optgroup":{bg:od.reference}}),op=(0,eC.k0)({width:"6",height:"100%",insetEnd:"2",position:"relative",color:"currentColor",fontSize:"xl",_disabled:{opacity:.5}}),of=ou({field:oh,icon:op}),om=(0,eC.k0)({paddingInlineEnd:"8"}),og={lg:{...r$.sizes?.lg,field:{...r$.sizes?.lg.field,...om}},md:{...r$.sizes?.md,field:{...r$.sizes?.md.field,...om}},sm:{...r$.sizes?.sm,field:{...r$.sizes?.sm.field,...om}},xs:{...r$.sizes?.xs,field:{...r$.sizes?.xs.field,...om},icon:{insetEnd:"1"}}},oy=ol({baseStyle:of,sizes:og,variants:r$.variants,defaultProps:r$.defaultProps}),ov=(0,ex.gJ)("skeleton-start-color"),ob=(0,ex.gJ)("skeleton-end-color"),oC=(0,eC.k0)({[ov.variable]:"colors.gray.100",[ob.variable]:"colors.gray.400",_dark:{[ov.variable]:"colors.gray.800",[ob.variable]:"colors.gray.600"},background:ov.reference,borderColor:ob.reference,opacity:.7,borderRadius:"sm"}),o_=(0,eC.fj)({baseStyle:oC}),ow=(0,ex.gJ)("skip-link-bg"),oS=(0,eC.k0)({borderRadius:"md",fontWeight:"semibold",_focusVisible:{boxShadow:"outline",padding:"4",position:"fixed",top:"6",insetStart:"6",[ow.variable]:"colors.white",_dark:{[ow.variable]:"colors.gray.700"},bg:ow.reference}}),oE=(0,eC.fj)({baseStyle:oS});var oT=n(5338);let{defineMultiStyleConfig:ok,definePartsStyle:oA}=(0,eC.D)(ep.keys),oI=(0,ex.gJ)("slider-thumb-size"),ox=(0,ex.gJ)("slider-track-size"),oR=(0,ex.gJ)("slider-bg"),oP=(0,eC.k0)(e=>{let{orientation:t}=e;return{display:"inline-block",position:"relative",cursor:"pointer",_disabled:{opacity:.6,cursor:"default",pointerEvents:"none"},...orient({orientation:t,vertical:{h:"100%",px:(0,oT.y)(oI.reference).divide(2).toString()},horizontal:{w:"100%",py:(0,oT.y)(oI.reference).divide(2).toString()}})}}),oM=(0,eC.k0)(e=>{let t=orient({orientation:e.orientation,horizontal:{h:ox.reference},vertical:{w:ox.reference}});return{...t,overflow:"hidden",borderRadius:"sm",[oR.variable]:"colors.gray.200",_dark:{[oR.variable]:"colors.whiteAlpha.200"},_disabled:{[oR.variable]:"colors.gray.300",_dark:{[oR.variable]:"colors.whiteAlpha.300"}},bg:oR.reference}}),oO=(0,eC.k0)(e=>{let{orientation:t}=e,n=orient({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",_active:{transform:"translateX(-50%) scale(1.15)"}},horizontal:{top:"50%",transform:"translateY(-50%)",_active:{transform:"translateY(-50%) scale(1.15)"}}});return{...n,w:oI.reference,h:oI.reference,display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",outline:0,zIndex:1,borderRadius:"full",bg:"white",boxShadow:"base",border:"1px solid",borderColor:"transparent",transitionProperty:"transform",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{bg:"gray.300"}}}),oN=(0,eC.k0)(e=>{let{colorScheme:t}=e;return{width:"inherit",height:"inherit",[oR.variable]:`colors.${t}.500`,_dark:{[oR.variable]:`colors.${t}.200`},bg:oR.reference}}),oB=oA(e=>({container:oP(e),track:oM(e),thumb:oO(e),filledTrack:oN(e)})),oD=oA({container:{[oI.variable]:"sizes.4",[ox.variable]:"sizes.1"}}),oL=oA({container:{[oI.variable]:"sizes.3.5",[ox.variable]:"sizes.1"}}),oU=oA({container:{[oI.variable]:"sizes.2.5",[ox.variable]:"sizes.0.5"}}),oF=ok({baseStyle:oB,sizes:{lg:oD,md:oL,sm:oU},defaultProps:{size:"md",colorScheme:"blue"}}),oq=cssVar("spinner-size"),oz=(0,eC.k0)({width:[oq.reference],height:[oq.reference]}),oH={xs:(0,eC.k0)({[oq.variable]:"sizes.3"}),sm:(0,eC.k0)({[oq.variable]:"sizes.4"}),md:(0,eC.k0)({[oq.variable]:"sizes.6"}),lg:(0,eC.k0)({[oq.variable]:"sizes.8"}),xl:(0,eC.k0)({[oq.variable]:"sizes.12"})},oj=(0,eC.fj)({baseStyle:oz,sizes:oH,defaultProps:{size:"md"}}),{defineMultiStyleConfig:oV,definePartsStyle:oG}=(0,eC.D)(ef.keys),oK=(0,eC.k0)({fontWeight:"medium"}),oW=(0,eC.k0)({opacity:.8,marginBottom:"2"}),o$=(0,eC.k0)({verticalAlign:"baseline",fontWeight:"semibold"}),oJ=(0,eC.k0)({marginEnd:1,w:"3.5",h:"3.5",verticalAlign:"middle"}),oY=oG({container:{},label:oK,helpText:oW,number:o$,icon:oJ}),oQ={md:oG({label:{fontSize:"sm"},helpText:{fontSize:"sm"},number:{fontSize:"2xl"}})},oX=oV({baseStyle:oY,sizes:oQ,defaultProps:{size:"md"}}),{defineMultiStyleConfig:oZ,definePartsStyle:o0}=(0,eC.D)(["stepper","step","title","description","indicator","separator","icon","number"]),o1=(0,ex.gJ)("stepper-indicator-size"),o2=(0,ex.gJ)("stepper-icon-size"),o4=(0,ex.gJ)("stepper-title-font-size"),o3=(0,ex.gJ)("stepper-description-font-size"),o5=(0,ex.gJ)("stepper-accent-color"),o6=o0(({colorScheme:e})=>({stepper:{display:"flex",justifyContent:"space-between",gap:"4","&[data-orientation=vertical]":{flexDirection:"column",alignItems:"flex-start"},"&[data-orientation=horizontal]":{flexDirection:"row",alignItems:"center"},[o5.variable]:`colors.${e}.500`,_dark:{[o5.variable]:`colors.${e}.200`}},title:{fontSize:o4.reference,fontWeight:"medium"},description:{fontSize:o3.reference,color:"chakra-subtle-text"},number:{fontSize:o4.reference},step:{flexShrink:0,position:"relative",display:"flex",gap:"2","&[data-orientation=horizontal]":{alignItems:"center"},flex:"1","&:last-of-type:not([data-stretch])":{flex:"initial"}},icon:{flexShrink:0,width:o2.reference,height:o2.reference},indicator:{flexShrink:0,borderRadius:"full",width:o1.reference,height:o1.reference,display:"flex",justifyContent:"center",alignItems:"center","&[data-status=active]":{borderWidth:"2px",borderColor:o5.reference},"&[data-status=complete]":{bg:o5.reference,color:"chakra-inverse-text"},"&[data-status=incomplete]":{borderWidth:"2px"}},separator:{bg:"chakra-border-color",flex:"1","&[data-status=complete]":{bg:o5.reference},"&[data-orientation=horizontal]":{width:"100%",height:"2px",marginStart:"2"},"&[data-orientation=vertical]":{width:"2px",position:"absolute",height:"100%",maxHeight:`calc(100% - ${o1.reference} - 8px)`,top:`calc(${o1.reference} + 4px)`,insetStart:`calc(${o1.reference} / 2 - 1px)`}}})),o8=oZ({baseStyle:o6,sizes:{xs:o0({stepper:{[o1.variable]:"sizes.4",[o2.variable]:"sizes.3",[o4.variable]:"fontSizes.xs",[o3.variable]:"fontSizes.xs"}}),sm:o0({stepper:{[o1.variable]:"sizes.6",[o2.variable]:"sizes.4",[o4.variable]:"fontSizes.sm",[o3.variable]:"fontSizes.xs"}}),md:o0({stepper:{[o1.variable]:"sizes.8",[o2.variable]:"sizes.5",[o4.variable]:"fontSizes.md",[o3.variable]:"fontSizes.sm"}}),lg:o0({stepper:{[o1.variable]:"sizes.10",[o2.variable]:"sizes.6",[o4.variable]:"fontSizes.lg",[o3.variable]:"fontSizes.md"}})},defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:o9,definePartsStyle:o7}=(0,eC.D)(em.keys),it=cssVar("switch-track-width"),ir=cssVar("switch-track-height"),io=cssVar("switch-track-diff"),ii=nS.subtract(it,ir),ia=cssVar("switch-thumb-x"),is=cssVar("switch-bg"),ic=(0,eC.k0)(e=>{let{colorScheme:t}=e;return{borderRadius:"full",p:"0.5",width:[it.reference],height:[ir.reference],transitionProperty:"common",transitionDuration:"fast",[is.variable]:"colors.gray.300",_dark:{[is.variable]:"colors.whiteAlpha.400"},_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed"},_checked:{[is.variable]:`colors.${t}.500`,_dark:{[is.variable]:`colors.${t}.200`}},bg:is.reference}}),il=(0,eC.k0)({bg:"white",transitionProperty:"transform",transitionDuration:"normal",borderRadius:"inherit",width:[ir.reference],height:[ir.reference],_checked:{transform:`translateX(${ia.reference})`}}),iu=o7(e=>({container:{[io.variable]:ii,[ia.variable]:io.reference,_rtl:{[ia.variable]:nS(io).negate().toString()}},track:ic(e),thumb:il})),id={sm:o7({container:{[it.variable]:"1.375rem",[ir.variable]:"sizes.3"}}),md:o7({container:{[it.variable]:"1.875rem",[ir.variable]:"sizes.4"}}),lg:o7({container:{[it.variable]:"2.875rem",[ir.variable]:"sizes.6"}})},ih=o9({baseStyle:iu,sizes:id,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:ip,definePartsStyle:im}=(0,eC.D)(eg.keys),ig=im({table:{fontVariantNumeric:"lining-nums tabular-nums",borderCollapse:"collapse",width:"full"},th:{fontFamily:"heading",fontWeight:"bold",textTransform:"uppercase",letterSpacing:"wider",textAlign:"start"},td:{textAlign:"start"},caption:{mt:4,fontFamily:"heading",textAlign:"center",fontWeight:"medium"}}),iy=(0,eC.k0)({"&[data-is-numeric=true]":{textAlign:"end"}}),iv=im(e=>{let{colorScheme:t}=e;return{th:{color:mode("gray.600","gray.400")(e),borderBottom:"1px",borderColor:mode(`${t}.100`,`${t}.700`)(e),...iy},td:{borderBottom:"1px",borderColor:mode(`${t}.100`,`${t}.700`)(e),...iy},caption:{color:mode("gray.600","gray.100")(e)},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),ib=im(e=>{let{colorScheme:t}=e;return{th:{color:mode("gray.600","gray.400")(e),borderBottom:"1px",borderColor:mode(`${t}.100`,`${t}.700`)(e),...iy},td:{borderBottom:"1px",borderColor:mode(`${t}.100`,`${t}.700`)(e),...iy},caption:{color:mode("gray.600","gray.100")(e)},tbody:{tr:{"&:nth-of-type(odd)":{"th, td":{borderBottomWidth:"1px",borderColor:mode(`${t}.100`,`${t}.700`)(e)},td:{background:mode(`${t}.100`,`${t}.700`)(e)}}}},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),iC={simple:iv,striped:ib,unstyled:(0,eC.k0)({})},i_={sm:im({th:{px:"4",py:"1",lineHeight:"4",fontSize:"xs"},td:{px:"4",py:"2",fontSize:"sm",lineHeight:"4"},caption:{px:"4",py:"2",fontSize:"xs"}}),md:im({th:{px:"6",py:"3",lineHeight:"4",fontSize:"xs"},td:{px:"6",py:"4",lineHeight:"5"},caption:{px:"6",py:"2",fontSize:"sm"}}),lg:im({th:{px:"8",py:"4",lineHeight:"5",fontSize:"sm"},td:{px:"8",py:"5",lineHeight:"6"},caption:{px:"6",py:"2",fontSize:"md"}})},iw=ip({baseStyle:ig,variants:iC,sizes:i_,defaultProps:{variant:"simple",size:"md",colorScheme:"gray"}}),iS=(0,ex.gJ)("tabs-color"),iE=(0,ex.gJ)("tabs-bg"),iT=(0,ex.gJ)("tabs-border-color"),{defineMultiStyleConfig:ik,definePartsStyle:iA}=(0,eC.D)(ey.keys),iI=(0,eC.k0)(e=>{let{orientation:t}=e;return{display:"vertical"===t?"flex":"block"}}),ix=(0,eC.k0)(e=>{let{isFitted:t}=e;return{flex:t?1:void 0,transitionProperty:"common",transitionDuration:"normal",_focusVisible:{zIndex:1,boxShadow:"outline"},_disabled:{cursor:"not-allowed",opacity:.4}}}),iR=(0,eC.k0)(e=>{let{align:t="start",orientation:n}=e;return{justifyContent:({end:"flex-end",center:"center",start:"flex-start"})[t],flexDirection:"vertical"===n?"column":"row"}}),iP=(0,eC.k0)({p:4}),iM=iA(e=>({root:iI(e),tab:ix(e),tablist:iR(e),tabpanel:iP})),iO={sm:iA({tab:{py:1,px:4,fontSize:"sm"}}),md:iA({tab:{fontSize:"md",py:2,px:4}}),lg:iA({tab:{fontSize:"lg",py:3,px:4}})},iN=iA(e=>{let{colorScheme:t,orientation:n}=e,o="vertical"===n,a=o?"borderStart":"borderBottom";return{tablist:{[a]:"2px solid",borderColor:"inherit"},tab:{[a]:"2px solid",borderColor:"transparent",[o?"marginStart":"marginBottom"]:"-2px",_selected:{[iS.variable]:`colors.${t}.600`,_dark:{[iS.variable]:`colors.${t}.300`},borderColor:"currentColor"},_active:{[iE.variable]:"colors.gray.200",_dark:{[iE.variable]:"colors.whiteAlpha.300"}},_disabled:{_active:{bg:"none"}},color:iS.reference,bg:iE.reference}}}),iB=iA(e=>{let{colorScheme:t}=e;return{tab:{borderTopRadius:"md",border:"1px solid",borderColor:"transparent",mb:"-1px",[iT.variable]:"transparent",_selected:{[iS.variable]:`colors.${t}.600`,[iT.variable]:"colors.white",_dark:{[iS.variable]:`colors.${t}.300`,[iT.variable]:"colors.gray.800"},borderColor:"inherit",borderBottomColor:iT.reference},color:iS.reference},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),iD=iA(e=>{let{colorScheme:t}=e;return{tab:{border:"1px solid",borderColor:"inherit",[iE.variable]:"colors.gray.50",_dark:{[iE.variable]:"colors.whiteAlpha.50"},mb:"-1px",_notLast:{marginEnd:"-1px"},_selected:{[iE.variable]:"colors.white",[iS.variable]:`colors.${t}.600`,_dark:{[iE.variable]:"colors.gray.800",[iS.variable]:`colors.${t}.300`},borderColor:"inherit",borderTopColor:"currentColor",borderBottomColor:"transparent"},color:iS.reference,bg:iE.reference},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),iL=iA(e=>{let{colorScheme:t,theme:n}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",color:"gray.600",_selected:{color:getColor(n,`${t}.700`),bg:getColor(n,`${t}.100`)}}}}),iU=iA(e=>{let{colorScheme:t}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",[iS.variable]:"colors.gray.600",_dark:{[iS.variable]:"inherit"},_selected:{[iS.variable]:"colors.white",[iE.variable]:`colors.${t}.600`,_dark:{[iS.variable]:"colors.gray.800",[iE.variable]:`colors.${t}.300`}},color:iS.reference,bg:iE.reference}}}),iF=iA({}),iq=ik({baseStyle:iM,sizes:iO,variants:{line:iN,enclosed:iB,"enclosed-colored":iD,"soft-rounded":iL,"solid-rounded":iU,unstyled:iF},defaultProps:{size:"md",variant:"line",colorScheme:"blue"}}),{defineMultiStyleConfig:iz,definePartsStyle:iH}=(0,eC.D)(ev.keys),ij=(0,ex.gJ)("tag-bg"),iV=(0,ex.gJ)("tag-color"),iG=(0,ex.gJ)("tag-shadow"),iK=(0,ex.gJ)("tag-min-height"),iW=(0,ex.gJ)("tag-min-width"),i$=(0,ex.gJ)("tag-font-size"),iJ=(0,ex.gJ)("tag-padding-inline"),iY=(0,eC.k0)({fontWeight:"medium",lineHeight:1.2,outline:0,[iV.variable]:e7.color.reference,[ij.variable]:e7.bg.reference,[iG.variable]:e7.shadow.reference,color:iV.reference,bg:ij.reference,boxShadow:iG.reference,borderRadius:"md",minH:iK.reference,minW:iW.reference,fontSize:i$.reference,px:iJ.reference,_focusVisible:{[iG.variable]:"shadows.outline"}}),iQ=(0,eC.k0)({lineHeight:1.2,overflow:"visible"}),iX=(0,eC.k0)({fontSize:"lg",w:"5",h:"5",transitionProperty:"common",transitionDuration:"normal",borderRadius:"full",marginStart:"1.5",marginEnd:"-1",opacity:.5,_disabled:{opacity:.4},_focusVisible:{boxShadow:"outline",bg:"rgba(0, 0, 0, 0.14)"},_hover:{opacity:.8},_active:{opacity:1}}),iZ=iH({container:iY,label:iQ,closeButton:iX}),i0={sm:iH({container:{[iK.variable]:"sizes.5",[iW.variable]:"sizes.5",[i$.variable]:"fontSizes.xs",[iJ.variable]:"space.2"},closeButton:{marginEnd:"-2px",marginStart:"0.35rem"}}),md:iH({container:{[iK.variable]:"sizes.6",[iW.variable]:"sizes.6",[i$.variable]:"fontSizes.sm",[iJ.variable]:"space.2"}}),lg:iH({container:{[iK.variable]:"sizes.8",[iW.variable]:"sizes.8",[i$.variable]:"fontSizes.md",[iJ.variable]:"space.3"}})},i1={subtle:iH(e=>({container:ti.variants?.subtle(e)})),solid:iH(e=>({container:ti.variants?.solid(e)})),outline:iH(e=>({container:ti.variants?.outline(e)}))},i2=iz({variants:i1,baseStyle:iZ,sizes:i0,defaultProps:{size:"md",variant:"subtle",colorScheme:"gray"}}),i4=(0,eC.k0)({...r$.baseStyle?.field,paddingY:"2",minHeight:"20",lineHeight:"short",verticalAlign:"top"}),i3={outline:(0,eC.k0)(e=>r$.variants?.outline(e).field??{}),flushed:(0,eC.k0)(e=>r$.variants?.flushed(e).field??{}),filled:(0,eC.k0)(e=>r$.variants?.filled(e).field??{}),unstyled:r$.variants?.unstyled.field??{}},i5={xs:r$.sizes?.xs.field??{},sm:r$.sizes?.sm.field??{},md:r$.sizes?.md.field??{},lg:r$.sizes?.lg.field??{}},i6=(0,eC.fj)({baseStyle:i4,sizes:i5,variants:i3,defaultProps:{size:"md",variant:"outline"}}),i8=cssVar("tooltip-bg"),i9=cssVar("tooltip-fg"),i7=cssVar("popper-arrow-bg"),ae=(0,eC.k0)({bg:i8.reference,color:i9.reference,[i8.variable]:"colors.gray.700",[i9.variable]:"colors.whiteAlpha.900",_dark:{[i8.variable]:"colors.gray.300",[i9.variable]:"colors.gray.900"},[i7.variable]:i8.reference,px:"2",py:"0.5",borderRadius:"sm",fontWeight:"medium",fontSize:"sm",boxShadow:"md",maxW:"xs",zIndex:"tooltip"}),at=(0,eC.fj)({baseStyle:ae}),ar={breakpoints:{base:"0em",sm:"30em",md:"48em",lg:"62em",xl:"80em","2xl":"96em"},zIndices:{hide:-1,auto:"auto",base:0,docked:10,dropdown:1e3,sticky:1100,banner:1200,overlay:1300,modal:1400,popover:1500,skipLink:1600,toast:1700,tooltip:1800},radii:{none:"0",sm:"0.125rem",base:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},blur:{none:0,sm:"4px",base:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},colors:{transparent:"transparent",current:"currentColor",black:"#000000",white:"#FFFFFF",whiteAlpha:{50:"rgba(255, 255, 255, 0.04)",100:"rgba(255, 255, 255, 0.06)",200:"rgba(255, 255, 255, 0.08)",300:"rgba(255, 255, 255, 0.16)",400:"rgba(255, 255, 255, 0.24)",500:"rgba(255, 255, 255, 0.36)",600:"rgba(255, 255, 255, 0.48)",700:"rgba(255, 255, 255, 0.64)",800:"rgba(255, 255, 255, 0.80)",900:"rgba(255, 255, 255, 0.92)"},blackAlpha:{50:"rgba(0, 0, 0, 0.04)",100:"rgba(0, 0, 0, 0.06)",200:"rgba(0, 0, 0, 0.08)",300:"rgba(0, 0, 0, 0.16)",400:"rgba(0, 0, 0, 0.24)",500:"rgba(0, 0, 0, 0.36)",600:"rgba(0, 0, 0, 0.48)",700:"rgba(0, 0, 0, 0.64)",800:"rgba(0, 0, 0, 0.80)",900:"rgba(0, 0, 0, 0.92)"},gray:{50:"#F7FAFC",100:"#EDF2F7",200:"#E2E8F0",300:"#CBD5E0",400:"#A0AEC0",500:"#718096",600:"#4A5568",700:"#2D3748",800:"#1A202C",900:"#171923"},red:{50:"#FFF5F5",100:"#FED7D7",200:"#FEB2B2",300:"#FC8181",400:"#F56565",500:"#E53E3E",600:"#C53030",700:"#9B2C2C",800:"#822727",900:"#63171B"},orange:{50:"#FFFAF0",100:"#FEEBC8",200:"#FBD38D",300:"#F6AD55",400:"#ED8936",500:"#DD6B20",600:"#C05621",700:"#9C4221",800:"#7B341E",900:"#652B19"},yellow:{50:"#FFFFF0",100:"#FEFCBF",200:"#FAF089",300:"#F6E05E",400:"#ECC94B",500:"#D69E2E",600:"#B7791F",700:"#975A16",800:"#744210",900:"#5F370E"},green:{50:"#F0FFF4",100:"#C6F6D5",200:"#9AE6B4",300:"#68D391",400:"#48BB78",500:"#38A169",600:"#2F855A",700:"#276749",800:"#22543D",900:"#1C4532"},teal:{50:"#E6FFFA",100:"#B2F5EA",200:"#81E6D9",300:"#4FD1C5",400:"#38B2AC",500:"#319795",600:"#2C7A7B",700:"#285E61",800:"#234E52",900:"#1D4044"},blue:{50:"#ebf8ff",100:"#bee3f8",200:"#90cdf4",300:"#63b3ed",400:"#4299e1",500:"#3182ce",600:"#2b6cb0",700:"#2c5282",800:"#2a4365",900:"#1A365D"},cyan:{50:"#EDFDFD",100:"#C4F1F9",200:"#9DECF9",300:"#76E4F7",400:"#0BC5EA",500:"#00B5D8",600:"#00A3C4",700:"#0987A0",800:"#086F83",900:"#065666"},purple:{50:"#FAF5FF",100:"#E9D8FD",200:"#D6BCFA",300:"#B794F4",400:"#9F7AEA",500:"#805AD5",600:"#6B46C1",700:"#553C9A",800:"#44337A",900:"#322659"},pink:{50:"#FFF5F7",100:"#FED7E2",200:"#FBB6CE",300:"#F687B3",400:"#ED64A6",500:"#D53F8C",600:"#B83280",700:"#97266D",800:"#702459",900:"#521B41"}},...nE,sizes:eJ,shadows:{xs:"0 0 0 1px rgba(0, 0, 0, 0.05)",sm:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",base:"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)",md:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",lg:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",xl:"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)","2xl":"0 25px 50px -12px rgba(0, 0, 0, 0.25)",outline:"0 0 0 3px rgba(66, 153, 225, 0.6)",inner:"inset 0 2px 4px 0 rgba(0,0,0,0.06)",none:"none","dark-lg":"rgba(0, 0, 0, 0.1) 0px 0px 0px 1px, rgba(0, 0, 0, 0.2) 0px 5px 10px, rgba(0, 0, 0, 0.4) 0px 15px 40px"},space:e$,borders:{none:0,"1px":"1px solid","2px":"2px solid","4px":"4px solid","8px":"8px solid"},transition:{property:{common:"background-color, border-color, color, fill, stroke, opacity, box-shadow, transform",colors:"background-color, border-color, color, fill, stroke",dimensions:"width, height",position:"left, right, top, bottom",background:"background-color, background-image, background-position"},easing:{"ease-in":"cubic-bezier(0.4, 0, 1, 1)","ease-out":"cubic-bezier(0, 0, 0.2, 1)","ease-in-out":"cubic-bezier(0.4, 0, 0.2, 1)"},duration:{"ultra-fast":"50ms",faster:"100ms",fast:"150ms",normal:"200ms",slow:"300ms",slower:"400ms","ultra-slow":"500ms"}}},an={colors:{"chakra-body-text":{_light:"gray.800",_dark:"whiteAlpha.900"},"chakra-body-bg":{_light:"white",_dark:"gray.800"},"chakra-border-color":{_light:"gray.200",_dark:"whiteAlpha.300"},"chakra-inverse-text":{_light:"white",_dark:"gray.800"},"chakra-subtle-bg":{_light:"gray.100",_dark:"gray.700"},"chakra-subtle-text":{_light:"gray.600",_dark:"gray.400"},"chakra-placeholder-color":{_light:"gray.500",_dark:"whiteAlpha.400"}}},ao={global:{body:{fontFamily:"body",color:"chakra-body-text",bg:"chakra-body-bg",transitionProperty:"background-color",transitionDuration:"normal",lineHeight:"base"},"*::placeholder":{color:"chakra-placeholder-color"},"*, *::before, &::after":{borderColor:"chakra-border-color"}}},ai={useSystemColorMode:!1,initialColorMode:"light",cssVarPrefix:"chakra"},aa={semanticTokens:an,direction:"ltr",...ar,components:{Accordion:eI,Alert:eW,Avatar:e9,Badge:ti,Breadcrumb:td,Button:tC,Checkbox:tH,CloseButton:tW,Code:tQ,Container:tZ,Divider:t4,Drawer:rc,Editable:rm,Form:rw,FormError:rx,FormLabel:rP,Heading:rN,Input:r$,Kbd:rQ,Link:rZ,List:r3,Menu:nc,Modal:nw,NumberInput:nF,PinInput:nj,Popover:n2,Progress:or,Radio:oc,Select:oy,Skeleton:o_,SkipLink:oE,Slider:oF,Spinner:oj,Stat:oX,Switch:ih,Table:iw,Tabs:iq,Tag:i2,Textarea:i6,Tooltip:at,Card:tM,Stepper:o8},styles:ao,config:ai},as={semanticTokens:an,direction:"ltr",components:{},...ar,styles:ao,config:ai};var ac=n(3637);function extend_theme_isFunction(e){return"function"==typeof e}let createExtendTheme=e=>function(...t){var n;let o=[...t],a=t[t.length-1];return(n=a,(0,H.Kn)(n)&&V.every(e=>Object.prototype.hasOwnProperty.call(n,e))&&o.length>1)?o=o.slice(0,o.length-1):a=e,(function(...e){return t=>e.reduce((e,t)=>t(e),t)})(...o.map(e=>t=>extend_theme_isFunction(e)?e(t):function(...e){return ac({},...e,mergeThemeCustomizer)}(t,e)))(a)},al=createExtendTheme(aa);function mergeThemeCustomizer(e,t,n,o){return(extend_theme_isFunction(e)||extend_theme_isFunction(t))&&Object.prototype.hasOwnProperty.call(o,n)?(...n)=>{let o=extend_theme_isFunction(e)?e(...n):e,a=extend_theme_isFunction(t)?t(...n):t;return ac({},o,a,mergeThemeCustomizer)}:(0,H.kJ)(e)&&(0,H.kJ)(t)?[...e,...t]:(0,H.kJ)(e)&&(0,H.Kn)(t)?t:void 0}createExtendTheme(as);var au=n(3543),ad=n(8586),ah=n(2839);let ap={light:"chakra-ui-light",dark:"chakra-ui-dark"},af="chakra-ui-color-mode",am={ssr:!1,type:"localStorage",get(e){let t;if(!globalThis?.document)return e;try{t=localStorage.getItem(af)||e}catch(e){}return t||e},set(e){try{localStorage.setItem(af,e)}catch(e){}}},noop=()=>{},ag=(0,au.jU)()?q.useLayoutEffect:q.useEffect;function getTheme(e,t){return"cookie"===e.type&&e.ssr?e.get(t):t}let ay=(0,ad.w)(function(e,t){let{value:n,children:o,options:{useSystemColorMode:a,initialColorMode:s,disableTransitionOnChange:c}={},colorModeManager:l=am}=e,u="dark"===s?"dark":"light",[h,p]=(0,q.useState)(()=>getTheme(l,u)),[f,m]=(0,q.useState)(()=>getTheme(l)),{getSystemTheme:g,setClassName:y,setDataset:v,addListener:b}=(0,q.useMemo)(()=>(function(e={}){let{preventTransition:t=!0,nonce:n}=e,o={setDataset:e=>{let n=t?o.preventTransition():void 0;document.documentElement.dataset.theme=e,document.documentElement.style.colorScheme=e,n?.()},setClassName(e){document.body.classList.add(e?ap.dark:ap.light),document.body.classList.remove(e?ap.light:ap.dark)},query:()=>window.matchMedia("(prefers-color-scheme: dark)"),getSystemTheme(e){let t=o.query().matches??"dark"===e;return t?"dark":"light"},addListener(e){let t=o.query(),listener=t=>{e(t.matches?"dark":"light")};return"function"==typeof t.addListener?t.addListener(listener):t.addEventListener("change",listener),()=>{"function"==typeof t.removeListener?t.removeListener(listener):t.removeEventListener("change",listener)}},preventTransition(){let e=document.createElement("style");return e.appendChild(document.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),void 0!==n&&(e.nonce=n),document.head.appendChild(e),()=>{window.getComputedStyle(document.body),requestAnimationFrame(()=>{requestAnimationFrame(()=>{document.head.removeChild(e)})})}}};return o})({preventTransition:c,nonce:t?.nonce}),[c,t?.nonce]),C="system"!==s||h?h:f,_=(0,q.useCallback)(e=>{let t="system"===e?g():e;p(t),y("dark"===t),v(t),l.set(t)},[l,g,y,v]);ag(()=>{"system"===s&&m(g())},[]),(0,q.useEffect)(()=>{let e=l.get();if(e){_(e);return}if("system"===s){_("system");return}_(u)},[l,u,s,_]);let w=(0,q.useCallback)(()=>{_("dark"===C?"light":"dark")},[C,_]);(0,q.useEffect)(()=>{if(a)return b(_)},[a,b,_]);let S=(0,q.useMemo)(()=>({colorMode:n??C,toggleColorMode:n?noop:w,setColorMode:n?noop:_,forced:void 0!==n}),[C,w,_,n]);return(0,M.jsx)(ah.kc.Provider,{value:S,children:o})});ay.displayName="ColorModeProvider";var av=n(8165);let ab=String.raw,aC=ab`
  :root,
  :host {
    --chakra-vh: 100vh;
  }

  @supports (height: -webkit-fill-available) {
    :root,
    :host {
      --chakra-vh: -webkit-fill-available;
    }
  }

  @supports (height: -moz-fill-available) {
    :root,
    :host {
      --chakra-vh: -moz-fill-available;
    }
  }

  @supports (height: 100dvh) {
    :root,
    :host {
      --chakra-vh: 100dvh;
    }
  }
`,CSSPolyfill=()=>(0,M.jsx)(av.xB,{styles:aC}),CSSReset=({scope:e=""})=>(0,M.jsx)(av.xB,{styles:ab`
      html {
        line-height: 1.5;
        -webkit-text-size-adjust: 100%;
        font-family: system-ui, sans-serif;
        -webkit-font-smoothing: antialiased;
        text-rendering: optimizeLegibility;
        -moz-osx-font-smoothing: grayscale;
        touch-action: manipulation;
      }

      body {
        position: relative;
        min-height: 100%;
        margin: 0;
        font-feature-settings: "kern";
      }

      ${e} :where(*, *::before, *::after) {
        border-width: 0;
        border-style: solid;
        box-sizing: border-box;
        word-wrap: break-word;
      }

      main {
        display: block;
      }

      ${e} hr {
        border-top-width: 1px;
        box-sizing: content-box;
        height: 0;
        overflow: visible;
      }

      ${e} :where(pre, code, kbd,samp) {
        font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace;
        font-size: 1em;
      }

      ${e} a {
        background-color: transparent;
        color: inherit;
        text-decoration: inherit;
      }

      ${e} abbr[title] {
        border-bottom: none;
        text-decoration: underline;
        -webkit-text-decoration: underline dotted;
        text-decoration: underline dotted;
      }

      ${e} :where(b, strong) {
        font-weight: bold;
      }

      ${e} small {
        font-size: 80%;
      }

      ${e} :where(sub,sup) {
        font-size: 75%;
        line-height: 0;
        position: relative;
        vertical-align: baseline;
      }

      ${e} sub {
        bottom: -0.25em;
      }

      ${e} sup {
        top: -0.5em;
      }

      ${e} img {
        border-style: none;
      }

      ${e} :where(button, input, optgroup, select, textarea) {
        font-family: inherit;
        font-size: 100%;
        line-height: 1.15;
        margin: 0;
      }

      ${e} :where(button, input) {
        overflow: visible;
      }

      ${e} :where(button, select) {
        text-transform: none;
      }

      ${e} :where(
          button::-moz-focus-inner,
          [type="button"]::-moz-focus-inner,
          [type="reset"]::-moz-focus-inner,
          [type="submit"]::-moz-focus-inner
        ) {
        border-style: none;
        padding: 0;
      }

      ${e} fieldset {
        padding: 0.35em 0.75em 0.625em;
      }

      ${e} legend {
        box-sizing: border-box;
        color: inherit;
        display: table;
        max-width: 100%;
        padding: 0;
        white-space: normal;
      }

      ${e} progress {
        vertical-align: baseline;
      }

      ${e} textarea {
        overflow: auto;
      }

      ${e} :where([type="checkbox"], [type="radio"]) {
        box-sizing: border-box;
        padding: 0;
      }

      ${e} input[type="number"]::-webkit-inner-spin-button,
      ${e} input[type="number"]::-webkit-outer-spin-button {
        -webkit-appearance: none !important;
      }

      ${e} input[type="number"] {
        -moz-appearance: textfield;
      }

      ${e} input[type="search"] {
        -webkit-appearance: textfield;
        outline-offset: -2px;
      }

      ${e} input[type="search"]::-webkit-search-decoration {
        -webkit-appearance: none !important;
      }

      ${e} ::-webkit-file-upload-button {
        -webkit-appearance: button;
        font: inherit;
      }

      ${e} details {
        display: block;
      }

      ${e} summary {
        display: list-item;
      }

      template {
        display: none;
      }

      [hidden] {
        display: none !important;
      }

      ${e} :where(
          blockquote,
          dl,
          dd,
          h1,
          h2,
          h3,
          h4,
          h5,
          h6,
          hr,
          figure,
          p,
          pre
        ) {
        margin: 0;
      }

      ${e} button {
        background: transparent;
        padding: 0;
      }

      ${e} fieldset {
        margin: 0;
        padding: 0;
      }

      ${e} :where(ol, ul) {
        margin: 0;
        padding: 0;
      }

      ${e} textarea {
        resize: vertical;
      }

      ${e} :where(button, [role="button"]) {
        cursor: pointer;
      }

      ${e} button::-moz-focus-inner {
        border: 0 !important;
      }

      ${e} table {
        border-collapse: collapse;
      }

      ${e} :where(h1, h2, h3, h4, h5, h6) {
        font-size: inherit;
        font-weight: inherit;
      }

      ${e} :where(button, input, optgroup, select, textarea) {
        padding: 0;
        line-height: inherit;
        color: inherit;
      }

      ${e} :where(img, svg, video, canvas, audio, iframe, embed, object) {
        display: block;
      }

      ${e} :where(img, video) {
        max-width: 100%;
        height: auto;
      }

      [data-js-focus-visible]
        :focus:not([data-focus-visible-added]):not(
          [data-focus-visible-disabled]
        ) {
        outline: none;
        box-shadow: none;
      }

      ${e} select::-ms-expand {
        display: none;
      }

      ${aC}
    `});var a_=n(6425),aw=n(7758);let aS=(0,q.createContext)({getDocument:()=>document,getWindow:()=>window});function EnvironmentProvider(e){let{children:t,environment:n,disabled:o}=e,a=(0,q.useRef)(null),s=(0,q.useMemo)(()=>n||{getDocument:()=>a.current?.ownerDocument??document,getWindow:()=>a.current?.ownerDocument.defaultView??window},[n]),c=!o||!n;return(0,M.jsxs)(aS.Provider,{value:s,children:[t,c&&(0,M.jsx)("span",{id:"__chakra_env",hidden:!0,ref:a})]})}aS.displayName="EnvironmentContext",EnvironmentProvider.displayName="EnvironmentProvider";let Provider=e=>{let{children:t,colorModeManager:n,portalZIndex:o,resetScope:a,resetCSS:s=!0,theme:c={},environment:l,cssVarsRoot:u,disableEnvironment:h,disableGlobalStyle:p}=e,f=(0,M.jsx)(EnvironmentProvider,{environment:l,disabled:h,children:t});return(0,M.jsx)(a_.f6,{theme:c,cssVarsRoot:u,children:(0,M.jsxs)(ay,{colorModeManager:n,options:c.config,children:[s?(0,M.jsx)(CSSReset,{scope:a}):(0,M.jsx)(CSSPolyfill,{}),!p&&(0,M.jsx)(a_.ZL,{}),o?(0,M.jsx)(aw.h,{zIndex:o,children:f}):f]})})};var aE=n(3167),aT=n(6634),ak=n(69),aA=n(35),aI=n(798),ax=n(8175),aR=n(4038);let findById=(e,t)=>e.find(e=>e.id===t);function findToast(e,t){let n=getToastPosition(e,t),o=n?e[n].findIndex(e=>e.id===t):-1;return{position:n,index:o}}function getToastPosition(e,t){for(let[n,o]of Object.entries(e))if(findById(o,t))return n}var aP=n(4913);let aM={initial:e=>{let{position:t}=e,n=["top","bottom"].includes(t)?"y":"x",o=["top-right","bottom-right"].includes(t)?1:-1;return"bottom"===t&&(o=1),{opacity:0,[n]:24*o}},animate:{opacity:1,y:0,x:0,scale:1,transition:{duration:.4,ease:[.4,0,.2,1]}},exit:{opacity:0,scale:.85,transition:{duration:.2,ease:[.4,0,1,1]}}},aO=(0,q.memo)(e=>{let{id:t,message:n,onCloseComplete:o,onRequestRemove:a,requestClose:s=!1,position:c="bottom",duration:l=5e3,containerStyle:u,motionVariants:h=aM,toastSpacing:p="0.5rem"}=e,[f,m]=(0,q.useState)(l),g=(0,ax.hO)();(0,ak.r)(()=>{g||o?.()},[g]),(0,ak.r)(()=>{m(l)},[l]);let close=()=>{g&&a()};(0,q.useEffect)(()=>{g&&s&&a()},[g,s,a]),function(e,t){let n=(0,aA.W)(e);(0,q.useEffect)(()=>{if(null==t)return;let e=null;return e=window.setTimeout(()=>{n()},t),()=>{e&&window.clearTimeout(e)}},[t,n])}(close,f);let y=(0,q.useMemo)(()=>({pointerEvents:"auto",maxWidth:560,minWidth:300,margin:p,...u}),[u,p]),v=(0,q.useMemo)(()=>(function(e){let t=e.includes("right"),n=e.includes("left"),o="center";return t&&(o="flex-end"),n&&(o="flex-start"),{display:"flex",flexDirection:"column",alignItems:o}})(c),[c]);return(0,M.jsx)(aR.E.div,{layout:!0,className:"chakra-toast",variants:h,initial:"initial",animate:"animate",exit:"exit",onHoverStart:()=>m(null),onHoverEnd:()=>m(l),custom:{position:c},style:v,children:(0,M.jsx)(aP.m.div,{role:"status","aria-atomic":"true",className:"chakra-toast__inner",__css:y,children:(0,aI.P)(n,{id:t,onClose:close})})})});aO.displayName="ToastComponent";var aN=n(5528),aB=n(521),aD=n(9453),aL=n(9180),aU=n(4114);let Toast=e=>{let{status:t,variant:n="solid",id:o,title:a,isClosable:s,onClose:c,description:l,colorScheme:u,icon:h}=e,p=o?{root:`toast-${o}`,title:`toast-${o}-title`,description:`toast-${o}-description`}:void 0;return(0,M.jsxs)(aN.b,{addRole:!1,status:t,variant:n,id:p?.root,alignItems:"start",borderRadius:"md",boxShadow:"lg",paddingEnd:8,textAlign:"start",width:"auto",colorScheme:u,children:[(0,M.jsx)(aB.z,{children:h}),(0,M.jsxs)(aP.m.div,{flex:"1",maxWidth:"100%",children:[a&&(0,M.jsx)(aD.C,{id:p?.title,children:a}),l&&(0,M.jsx)(aL.X,{id:p?.description,display:"block",children:l})]}),s&&(0,M.jsx)(aU.P,{size:"sm",onClick:c,position:"absolute",insetEnd:1,top:1})]})},aF=function(e){let t=e,n=new Set,setState=e=>{t=e(t),n.forEach(e=>e())};return{getState:()=>t,subscribe:t=>(n.add(t),()=>{setState(()=>e),n.delete(t)}),removeToast:(e,t)=>{setState(n=>({...n,[t]:n[t].filter(t=>t.id!=e)}))},notify:(e,t)=>{let n=function(e,t={}){aq+=1;let n=t.id??aq,o=t.position??"bottom";return{id:n,message:e,position:o,duration:t.duration,onCloseComplete:t.onCloseComplete,onRequestRemove:()=>aF.removeToast(String(n),o),status:t.status,requestClose:!1,containerStyle:t.containerStyle}}(e,t),{position:o,id:a}=n;return setState(e=>{let t=o.includes("top"),a=t?[n,...e[o]??[]]:[...e[o]??[],n];return{...e,[o]:a}}),a},update:(e,t)=>{e&&setState(n=>{let o={...n},{position:a,index:s}=findToast(o,e);return a&&-1!==s&&(o[a][s]={...o[a][s],...t,message:function(e={}){let{render:t,toastComponent:n=Toast}=e;return o=>"function"==typeof t?t({...o,...e}):(0,M.jsx)(n,{...o,...e})}(t)}),o})},closeAll:({positions:e}={})=>{setState(t=>(e??["bottom","bottom-right","bottom-left","top","top-left","top-right"]).reduce((e,n)=>(e[n]=t[n].map(e=>({...e,requestClose:!0})),e),{...t}))},close:e=>{setState(t=>{let n=getToastPosition(t,e);return n?{...t,[n]:t[n].map(t=>t.id==e?{...t,requestClose:!0}:t)}:t})},isActive:e=>!!findToast(aF.getState(),e).position}}({top:[],"top-left":[],"top-right":[],"bottom-left":[],bottom:[],"bottom-right":[]}),aq=0;var az=n(1853);let[aH,aj]=(0,aE.k)({name:"ToastOptionsContext",strict:!1}),ToastProvider=e=>{let t=(0,q.useSyncExternalStore)(aF.subscribe,aF.getState,aF.getState),{motionVariants:n,component:o=aO,portalProps:a,animatePresenceProps:s}=e,c=Object.keys(t),l=c.map(e=>{let a=t[e];return(0,M.jsx)("div",{role:"region","aria-live":"polite","aria-label":`Notifications-${e}`,id:`chakra-toast-manager-${e}`,style:function(e){let t=e.includes("top")?"env(safe-area-inset-top, 0px)":void 0,n=e.includes("bottom")?"env(safe-area-inset-bottom, 0px)":void 0,o=e.includes("left")?void 0:"env(safe-area-inset-right, 0px)",a=e.includes("right")?void 0:"env(safe-area-inset-left, 0px)";return{position:"fixed",zIndex:"var(--toast-z-index, 5500)",pointerEvents:"none",display:"flex",flexDirection:"column",margin:"top"===e||"bottom"===e?"0 auto":void 0,top:t,bottom:n,right:o,left:a}}(e),children:(0,M.jsx)(aT.M,{...s,initial:!1,children:a.map(e=>(0,M.jsx)(o,{motionVariants:n,...e},e.id))})},e)});return(0,M.jsx)(az.h,{...a,children:l})},ChakraProvider=function({children:e,theme:t=aa,toastOptions:n,...o}){return(0,M.jsxs)(Provider,{theme:t,...o,children:[(0,M.jsx)(aH,{value:n?.defaultOptions,children:e}),(0,M.jsx)(ToastProvider,{...n})]})};function chunk_7P3W45AB_mode(e,t){return n=>"dark"===n.colorMode?t:e}function chunk_ZN6IUO2A_anatomy(e,t={}){let n=!1;function toPart(t){let n=["container","root"].includes(null!=t?t:"")?[e]:[e,t],o=n.filter(Boolean).join("__"),a=`chakra-${o}`,s={className:a,selector:`.${a}`,toString:()=>t};return s}return{parts:function(...o){for(let e of(!function(){if(!n){n=!0;return}throw Error("[anatomy] .part(...) should only be called once. Did you mean to use .extend(...) ?")}(),o))t[e]=toPart(e);return chunk_ZN6IUO2A_anatomy(e,t)},toPart,extend:function(...n){for(let e of n)e in t||(t[e]=toPart(e));return chunk_ZN6IUO2A_anatomy(e,t)},selectors:function(){let e=Object.fromEntries(Object.entries(t).map(([e,t])=>[e,t.selector]));return e},classnames:function(){let e=Object.fromEntries(Object.entries(t).map(([e,t])=>[e,t.className]));return e},get keys(){return Object.keys(t)},__type:{}}}n(7293),n(1634),n(7640),n(8212),n(6077),chunk_ZN6IUO2A_anatomy("accordion").parts("root","container","button","panel").extend("icon"),chunk_ZN6IUO2A_anatomy("alert").parts("title","description","container").extend("icon","spinner"),chunk_ZN6IUO2A_anatomy("avatar").parts("label","badge","container").extend("excessLabel","group"),chunk_ZN6IUO2A_anatomy("breadcrumb").parts("link","item","container").extend("separator"),chunk_ZN6IUO2A_anatomy("button").parts(),chunk_ZN6IUO2A_anatomy("checkbox").parts("control","icon","container").extend("label"),chunk_ZN6IUO2A_anatomy("progress").parts("track","filledTrack").extend("label"),chunk_ZN6IUO2A_anatomy("drawer").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),chunk_ZN6IUO2A_anatomy("editable").parts("preview","input","textarea"),chunk_ZN6IUO2A_anatomy("form").parts("container","requiredIndicator","helperText"),chunk_ZN6IUO2A_anatomy("formError").parts("text","icon"),chunk_ZN6IUO2A_anatomy("input").parts("addon","field","element"),chunk_ZN6IUO2A_anatomy("list").parts("container","item","icon"),chunk_ZN6IUO2A_anatomy("menu").parts("button","list","item").extend("groupTitle","command","divider"),chunk_ZN6IUO2A_anatomy("modal").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),chunk_ZN6IUO2A_anatomy("numberinput").parts("root","field","stepperGroup","stepper"),chunk_ZN6IUO2A_anatomy("pininput").parts("field"),chunk_ZN6IUO2A_anatomy("popover").parts("content","header","body","footer").extend("popper","arrow","closeButton"),chunk_ZN6IUO2A_anatomy("progress").parts("label","filledTrack","track"),chunk_ZN6IUO2A_anatomy("radio").parts("container","control","label"),chunk_ZN6IUO2A_anatomy("select").parts("field","icon"),chunk_ZN6IUO2A_anatomy("slider").parts("container","track","thumb","filledTrack","mark"),chunk_ZN6IUO2A_anatomy("stat").parts("container","label","helpText","number","icon"),chunk_ZN6IUO2A_anatomy("switch").parts("container","track","thumb"),chunk_ZN6IUO2A_anatomy("table").parts("table","thead","tbody","tr","th","td","tfoot","caption"),chunk_ZN6IUO2A_anatomy("tabs").parts("root","tab","tablist","tabpanel","tabpanels","indicator"),chunk_ZN6IUO2A_anatomy("tag").parts("container","label","closeButton");var aV=chunk_ZN6IUO2A_anatomy("card").parts("container","header","body","footer");let{definePartsStyle:aG}=(0,eC.D)(aV.keys),aK=aG({container:{display:"flex",flexDirection:"column",width:"100%",position:"relative",minWidth:"0px",wordBreak:"break-word",backgroundClip:"border-box"},header:{display:"flex",width:"100%",pb:2},body:{display:"flex",width:"100%",pt:0},footer:{display:"flex",width:"100%",pt:0}}),aW={baseStyle:aK,variants:{panel:aG(e=>({container:{bg:"dark"===e.colorMode?"gray.700":"white",width:"100%",boxShadow:"0px 3.5px 5.5px rgba(0, 0, 0, 0.02)",borderRadius:"15px"}}))},defaultProps:{variant:"panel"}};var a$=al({breakpoints:{sm:"320px",md:"768px",lg:"960px",xl:"1200px"}},{colors:{gray:{700:"#1f2733"}},styles:{global:e=>({body:{bg:chunk_7P3W45AB_mode("gray.50","gray.800")(e),fontFamily:"Helvetica, sans-serif"},p:{marginBottom:0},ul:{marginBottom:0},html:{fontFamily:"Helvetica, sans-serif"}})}},{body:"Roboto"},{components:{Button:{variants:{"no-hover":{_hover:{boxShadow:"none"}},"transparent-with-icon":{bg:"transparent",fontWeight:"bold",borderRadius:"inherit",cursor:"pointer",_hover:"none",_active:{bg:"transparent",transform:"none",borderColor:"transparent"},_focus:{boxShadow:"none"},_hover:{boxShadow:"none"}}},baseStyle:{borderRadius:"15px",_focus:{boxShadow:"none"}}}}},{components:{Badge:{sizes:{md:{width:"65px",height:"25px"}},baseStyle:{textTransform:"capitalize"}}}},{components:{Link:{decoration:"none",baseStyle:{_hover:{textDecoration:"none"},_focus:{boxShadow:"none"}}}}},{components:{Drawer:{variants:{"with-shadow":{placement:"right",boxShadow:"0 0 2px 2px #efdfde",bgColor:"red"}}}}},{components:{Card:aW}},{components:{CardBody:{baseStyle:{display:"flex",width:"100%"}}}},{components:{CardHeader:{baseStyle:{display:"flex",width:"100%"}}}},{components:{MainPanel:{baseStyle:{float:"right",maxWidth:"100%",overflow:"auto",position:"relative",maxHeight:"100%",transition:"all 0.33s cubic-bezier(0.685, 0.0473, 0.346, 1)",transitionDuration:".2s, .2s, .35s",transitionProperty:"top, bottom, width",transitionTimingFunction:"linear, linear, ease"},variants:{main:e=>({float:"right"})},defaultProps:{variant:"main"}}}},{components:{PanelContent:{baseStyle:{ms:"auto",me:"auto",ps:"15px",pe:"15px"}}}},{components:{PanelContainer:{baseStyle:{p:"16px",minHeight:"calc(100vh - 123px)"}}}}),aJ=n(7259),aY=n(7386),aQ=n(2454),aX=n(2459),aZ=n(9813),a0=n(3950),a1=n(6811),a2=n(1908),a4=n(1821),a3=n(3429);function mergeRefs(...e){return t=>{e.forEach(e=>(function(e,t){if(null!=e){if((0,a3.mf)(e)){e(t);return}try{e.current=t}catch(n){throw Error(`Cannot assign value '${t}' to ref '${e}'`)}}})(e,t))}}let a5={display:"flex",flex:1,flexWrap:"wrap",alignItems:"center"},a6={display:"block",textAlign:"start"},a8={h:"auto",minW:72,pr:1},a9={display:"flex",alignItems:"center"},a7={fontWeight:"semibold"},se={display:"inline",h:"full",border:0,borderColor:"inherit",my:1,opacity:.8};var st={defaultProps:{size:"md"},parts:["item","selectedItem","list","textList","selectedList","actionGroup","control","input","button","groupTitle","divider","label"],sizes:{sm:{control:{minH:8,spacing:1},input:{p:"px"},actionGroup:{spacing:"0"},list:{fontSize:"sm"},item:{py:1,px:2},textList:{py:0,px:1},selectedItem:{m:"px"},selectedList:{py:"px"},groupTitle:{mx:2,my:1,fontSize:"sm"}},md:{control:{minH:10,spacing:1},input:{p:"2px"},actionGroup:{spacing:"0"},list:{fontSize:"md"},item:{py:2,px:3},textList:{p:1},selectedItem:{m:"2px"},selectedList:{py:"2px"},groupTitle:{mx:4,my:2,fontSize:"sm"}},lg:{control:{minH:12,spacing:2},input:{p:1},actionGroup:{spacing:"0"},list:{fontSize:"lg"},item:{py:2,px:3},textList:{py:1,px:2},selectedItem:{m:1},selectedList:{py:1},groupTitle:{mx:4,my:2,fontSize:"sm"}}},baseStyle:e=>({list:{bg:chunk_7P3W45AB_mode("#fff","gray.700")(e),boxShadow:chunk_7P3W45AB_mode("sm","dark-lg")(e),color:"inherit",w:"full",py:"2",zIndex:1,borderRadius:"md",borderWidth:"1px",maxH:"64",overflowY:"auto",overscrollBehaviorY:"contain"},selectedList:a5,item:{cursor:"pointer",transition:"background 50ms ease-out",_focus:{bg:chunk_7P3W45AB_mode("gray.50","whiteAlpha.100")(e),boxShadow:"outline"},_active:{bg:chunk_7P3W45AB_mode("gray.50","whiteAlpha.100")(e)},_expanded:{bg:chunk_7P3W45AB_mode("gray.50","whiteAlpha.100")(e)},_selected:{bg:chunk_7P3W45AB_mode("gray.100","whiteAlpha.300")(e)},_disabled:{opacity:.4,cursor:"not-allowed"}},selectedItem:{borderRadius:"full",variant:"solid",colorscheme:e.colorscheme},button:{variant:"ghost",_hover:{bg:chunk_7P3W45AB_mode("gray.200","whiteAlpha.300")(e)},_focus:{bg:chunk_7P3W45AB_mode("gray.200","whiteAlpha.300")(e),boxShadow:"outline"},_active:{bg:chunk_7P3W45AB_mode("gray.100","whiteAlpha.100")(e)},colorscheme:e.colorscheme},actionGroup:a9,control:a8,input:{bgColor:"transparent",appearance:"none",flex:1,outline:0},groupTitle:a7,divider:se,label:a6})};function D(){return(D=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e}).apply(this,arguments)}function N(e,t){if(null==e)return{};var n,o,a={},s=Object.keys(e);for(o=0;o<s.length;o++)t.indexOf(n=s[o])>=0||(a[n]=e[n]);return a}function j(e){return"object"==typeof e&&null!=e&&1===e.nodeType}function B(e,t){return(!t||"hidden"!==e)&&"visible"!==e&&"clip"!==e}function W(e,t){if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){var n,o=getComputedStyle(e,null);return B(o.overflowY,t)||B(o.overflowX,t)||!!(n=function(e){if(!e.ownerDocument||!e.ownerDocument.defaultView)return null;try{return e.ownerDocument.defaultView.frameElement}catch(e){return null}}(e))&&(n.clientHeight<e.scrollHeight||n.clientWidth<e.scrollWidth)}return!1}function F(e,t,n,o,a,s,c,l){return s<e&&c>t||s>e&&c<t?0:s<=e&&l<=n||c>=t&&l>=n?s-e-o:c>t&&l<n||s<e&&l>n?c-t+a:0}let sr=["onKeyDown"],sn=["refKey","ref","onChange","onFocus","onClick","onBlur"],so=["index","key","onClick","onMouseEnter","option"],si=["selected"];(o=b||(b={})).SingleCreate="singleCreate",o.SingleRemove="singleRemove",o.SingleSelect="singleSelect",o.SingleClear="singleClear",o.MultiCreate="multiCreate",o.MultiRemove="multiRemove",o.MultiSelect="multiSelect",o.MultiClear="multiClear",(a=C||(C={})).SetOpen="setOpen",a.SetSearch="setSearch",a.HighlightIndex="highlightIndex";let sa=[],ss=[],sc={searchValue:"",resolvedSearchValue:"",isOpen:!1,highlightedIndex:0},Q=(e,t)=>t,Z=(e,t,n,o)=>{o.current&&function(e,t){if(!e||!t)return;let n=function(e,t){var n=window,o=t.scrollMode,a=t.block,s=t.inline,c=t.boundary,l=t.skipOverflowHiddenElements,u="function"==typeof c?c:function(e){return e!==c};if(!j(e))throw TypeError("Invalid target");for(var h=document.scrollingElement||document.documentElement,p=[],f=e;j(f)&&u(f);){if((f=f.parentElement)===h){p.push(f);break}null!=f&&f===document.body&&W(f)&&!W(document.documentElement)||null!=f&&W(f,l)&&p.push(f)}for(var m=n.visualViewport?n.visualViewport.width:innerWidth,g=n.visualViewport?n.visualViewport.height:innerHeight,y=window.scrollX||pageXOffset,v=window.scrollY||pageYOffset,b=e.getBoundingClientRect(),C=b.height,_=b.width,w=b.top,S=b.right,E=b.bottom,T=b.left,k="start"===a||"nearest"===a?w:"end"===a?E:w+C/2,I="center"===s?T+_/2:"end"===s?S:T,x=[],R=0;R<p.length;R++){var P=p[R],M=P.getBoundingClientRect(),O=M.height,L=M.width,U=M.top,q=M.right,H=M.bottom,V=M.left;if("if-needed"===o&&w>=0&&T>=0&&E<=g&&S<=m&&w>=U&&E<=H&&T>=V&&S<=q)break;var G=getComputedStyle(P),K=parseInt(G.borderLeftWidth,10),$=parseInt(G.borderTopWidth,10),J=parseInt(G.borderRightWidth,10),Y=parseInt(G.borderBottomWidth,10),X=0,et=0,er="offsetWidth"in P?P.offsetWidth-P.clientWidth-K-J:0,en="offsetHeight"in P?P.offsetHeight-P.clientHeight-$-Y:0;if(h===P)X="start"===a?k:"end"===a?k-g:"nearest"===a?F(v,v+g,g,$,Y,v+k,v+k+C,C):k-g/2,et="start"===s?I:"center"===s?I-m/2:"end"===s?I-m:F(y,y+m,m,K,J,y+I,y+I+_,_),X=Math.max(0,X+v),et=Math.max(0,et+y);else{X="start"===a?k-U-$:"end"===a?k-H+Y+en:"nearest"===a?F(U,H,O,$,Y+en,k,k+C,C):k-(U+O/2)+en/2,et="start"===s?I-V-K:"center"===s?I-(V+L/2)+er/2:"end"===s?I-q+J+er:F(V,q,L,K,J+er,I,I+_,_);var eo=P.scrollLeft,ei=P.scrollTop;k+=ei-(X=Math.max(0,Math.min(ei+X,P.scrollHeight-O+en))),I+=eo-(et=Math.max(0,Math.min(eo+et,P.scrollWidth-L+er)))}x.push({el:P,top:X,left:et})}return x}(e,{boundary:t,block:"nearest",scrollMode:"if-needed"});n.forEach(({el:e,top:t,left:n})=>{e.scrollTop=t,e.scrollLeft=n})}(t.current,n.current)},ee=e=>`${e.charAt(0).toUpperCase()}${e.substring(1)}`,te=(e,t="")=>`${t}${null==e?void 0:e.value}`,ne=e=>"string"==typeof e?{value:e,label:ee(e)}:e,ie=e=>e.length>1e4?1e3:e.length>1e3?200:0,re=(e,t,n)=>e.filter(e=>n(e).value.toString().toLowerCase().includes(t.toString().toLowerCase())).sort(e=>n(e).value.toString().toLowerCase().indexOf(t.toString().toLowerCase()));function oe(e,t,n){return n?D({},e,"function"==typeof t?{[n]:t(e[n])}:{[n]:t}):"function"==typeof t?t(e):t}(s=_||(_={})).List="list",s.Input="input",s.Both="both";let[sl,su]=(0,a4.k)({strict:!1,name:"SelectContext"}),[sd,sh]=(0,a4.k)({strict:!1,name:"SelectInputContext"}),[sp,sf]=(0,a4.k)({strict:!1,name:"SelectedContext"}),[sm,sg]=(0,a4.k)({strict:!1,name:"SelectedListContext"}),[sy,sv]=(0,a4.k)({strict:!1,name:"SelectActionContext"}),[sb,sC]=(0,a4.k)({strict:!1,name:"SelectIdContext"}),ke=(e=21)=>{let t="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_",n="";for(let o=0;o<e;o++)n+=t[Math.floor(Math.random()*t.length)];return n};function Te(){let e=(0,q.useRef)();return e.current||(e.current=ke()),e.current}function Re(){return(Re=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e}).apply(this,arguments)}function Pe(){return(Pe=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e}).apply(this,arguments)}function Ae(e,t,n){var o,a,s=null!=(o=n.initialDeps)?o:[];return function(){n.key&&null!=n.debug&&n.debug()&&(o=Date.now());var o,c,l=e();if(l.length===s.length&&!l.some(function(e,t){return s[t]!==e}))return a;if(s=l,n.key&&null!=n.debug&&n.debug()&&(c=Date.now()),a=t.apply(void 0,l),n.key&&null!=n.debug&&n.debug()){var u=Math.round(100*(Date.now()-o))/100,h=Math.round(100*(Date.now()-c))/100,p=h/16,d=function(e,t){for(e=String(e);e.length<t;)e=" "+e;return e};console.info("%c⏱ "+d(h,5)+" /"+d(u,5)+" ms","\n            font-size: .6rem;\n            font-weight: bold;\n            color: hsl("+Math.max(0,Math.min(120-120*p,120))+"deg 100% 31%);",null==n?void 0:n.key)}return null==n||null==n.onChange||n.onChange(a),a}}function Ve(e,t){if(void 0===e)throw Error("Unexpected undefined"+(t?": "+t:""));return e}var De=function(e){return e},Ne=function(e){for(var t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1),o=[],a=t;a<=n;a++)o.push(a);return o},je=function(e,t){var n=e.scrollElement;if(n){var i=function(e){var n=e.height;t({width:Math.round(e.width),height:Math.round(n)})};i(n.getBoundingClientRect());var o=new ResizeObserver(function(e){var t=e[0];if(null!=t&&t.borderBoxSize){var o=t.borderBoxSize[0];if(o)return void i({width:o.inlineSize,height:o.blockSize})}i(n.getBoundingClientRect())});return o.observe(n,{box:"border-box"}),function(){o.unobserve(n)}}},Be=function(e,t){var n=e.scrollElement;if(n){var i=function(){t(n[e.options.horizontal?"scrollLeft":"scrollTop"])};return i(),n.addEventListener("scroll",i,{passive:!0}),function(){n.removeEventListener("scroll",i)}}},We=function(e,t,n){if(null!=t&&t.borderBoxSize){var o=t.borderBoxSize[0];if(o)return Math.round(o[n.options.horizontal?"inlineSize":"blockSize"])}return Math.round(e.getBoundingClientRect()[n.options.horizontal?"width":"height"])},Fe=function(e,t,n){var o,a,s=t.adjustments,c=t.behavior;null==(o=n.scrollElement)||null==o.scrollTo||o.scrollTo(((a={})[n.options.horizontal?"left":"top"]=e+(void 0===s?0:s),a.behavior=c,a))},He=function(e){var t,n,o=this;this.unsubs=[],this.scrollElement=null,this.isScrolling=!1,this.isScrollingTimeoutId=null,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollDirection=null,this.scrollAdjustments=0,this.measureElementCache=new Map,this.observer=(t=null,n=function(){return t||("undefined"!=typeof ResizeObserver?t=new ResizeObserver(function(e){e.forEach(function(e){o._measureElement(e.target,e)})}):null)},{disconnect:function(){var e;return null==(e=n())?void 0:e.disconnect()},observe:function(e){var t;return null==(t=n())?void 0:t.observe(e,{box:"border-box"})},unobserve:function(e){var t;return null==(t=n())?void 0:t.unobserve(e)}}),this.range={startIndex:0,endIndex:0},this.setOptions=function(e){Object.entries(e).forEach(function(t){void 0===t[1]&&delete e[t[0]]}),o.options=Pe({debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:De,rangeExtractor:Ne,onChange:function(){},measureElement:We,initialRect:{width:0,height:0},scrollMargin:0,scrollingDelay:150,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1},e)},this.notify=function(){null==o.options.onChange||o.options.onChange(o)},this.cleanup=function(){o.unsubs.filter(Boolean).forEach(function(e){return e()}),o.unsubs=[],o.scrollElement=null},this._didMount=function(){return o.measureElementCache.forEach(o.observer.observe),function(){o.observer.disconnect(),o.cleanup()}},this._willUpdate=function(){var e=o.options.getScrollElement();o.scrollElement!==e&&(o.cleanup(),o.scrollElement=e,o._scrollToOffset(o.scrollOffset,{adjustments:void 0,behavior:void 0}),o.unsubs.push(o.options.observeElementRect(o,function(e){var t=o.scrollRect;o.scrollRect=e,(o.options.horizontal?e.width!==t.width:e.height!==t.height)&&o.maybeNotify()})),o.unsubs.push(o.options.observeElementOffset(o,function(e){o.scrollAdjustments=0,o.scrollOffset!==e&&(null!==o.isScrollingTimeoutId&&(clearTimeout(o.isScrollingTimeoutId),o.isScrollingTimeoutId=null),o.isScrolling=!0,o.scrollDirection=o.scrollOffset<e?"forward":"backward",o.scrollOffset=e,o.maybeNotify(),o.isScrollingTimeoutId=setTimeout(function(){o.isScrollingTimeoutId=null,o.isScrolling=!1,o.scrollDirection=null,o.maybeNotify()},o.options.scrollingDelay))})))},this.getSize=function(){return o.scrollRect[o.options.horizontal?"width":"height"]},this.memoOptions=Ae(function(){return[o.options.count,o.options.paddingStart,o.options.scrollMargin,o.options.getItemKey]},function(e,t,n,a){return o.pendingMeasuredCacheIndexes=[],{count:e,paddingStart:t,scrollMargin:n,getItemKey:a}},{key:!1}),this.getFurthestMeasurement=function(e,t){for(var n=new Map,a=new Map,s=t-1;s>=0;s--){var c=e[s];if(!n.has(c.lane)){var l=a.get(c.lane);if(null==l||c.end>l.end?a.set(c.lane,c):c.end<l.end&&n.set(c.lane,!0),n.size===o.options.lanes)break}}return a.size===o.options.lanes?Array.from(a.values()).sort(function(e,t){return e.end-t.end})[0]:void 0},this.getMeasurements=Ae(function(){return[o.memoOptions(),o.itemSizeCache]},function(e,t){var n=e.count,a=e.paddingStart,s=e.scrollMargin,c=e.getItemKey,l=o.pendingMeasuredCacheIndexes.length>0?Math.min.apply(Math,o.pendingMeasuredCacheIndexes):0;o.pendingMeasuredCacheIndexes=[];for(var u=o.measurementsCache.slice(0,l),h=l;h<n;h++){var p=c(h),f=1===o.options.lanes?u[h-1]:o.getFurthestMeasurement(u,h),m=f?f.end:a+s,g=t.get(p),y="number"==typeof g?g:o.options.estimateSize(h);u[h]={index:h,start:m,size:y,end:m+y,key:p,lane:f?f.lane:h%o.options.lanes}}return o.measurementsCache=u,u},{key:!1,debug:function(){return o.options.debug}}),this.calculateRange=Ae(function(){return[o.getMeasurements(),o.getSize(),o.scrollOffset]},function(e,t,n){return o.range=function(e){for(var t=e.measurements,n=e.outerSize,o=e.scrollOffset,a=t.length-1,s=Ke(0,a,function(e){return t[e].start},o),c=s;c<a&&t[c].end<o+n;)c++;return{startIndex:s,endIndex:c}}({measurements:e,outerSize:t,scrollOffset:n})},{key:!1,debug:function(){return o.options.debug}}),this.maybeNotify=Ae(function(){var e=o.calculateRange();return[e.startIndex,e.endIndex,o.isScrolling]},function(){o.notify()},{key:!1,debug:function(){return o.options.debug},initialDeps:[this.range.startIndex,this.range.endIndex,this.isScrolling]}),this.getIndexes=Ae(function(){return[o.options.rangeExtractor,o.calculateRange(),o.options.overscan,o.options.count]},function(e,t,n,o){return e(Pe({},t,{overscan:n,count:o}))},{key:!1,debug:function(){return o.options.debug}}),this.indexFromElement=function(e){var t=o.options.indexAttribute,n=e.getAttribute(t);return n?parseInt(n,10):(console.warn("Missing attribute name '"+t+"={index}' on measured element."),-1)},this._measureElement=function(e,t){var n,a=o.indexFromElement(e),s=o.measurementsCache[a];if(s){var c=o.measureElementCache.get(s.key);if(!e.isConnected)return o.observer.unobserve(e),void(e===c&&o.measureElementCache.delete(s.key));c!==e&&(c&&o.observer.unobserve(c),o.observer.observe(e),o.measureElementCache.set(s.key,e));var l=o.options.measureElement(e,t,o),u=l-(null!=(n=o.itemSizeCache.get(s.key))?n:s.size);0!==u&&(s.start<o.scrollOffset&&o._scrollToOffset(o.scrollOffset,{adjustments:o.scrollAdjustments+=u,behavior:void 0}),o.pendingMeasuredCacheIndexes.push(a),o.itemSizeCache=new Map(o.itemSizeCache.set(s.key,l)),o.notify())}},this.measureElement=function(e){e&&o._measureElement(e,void 0)},this.getVirtualItems=Ae(function(){return[o.getIndexes(),o.getMeasurements()]},function(e,t){for(var n=[],o=0,a=e.length;o<a;o++)n.push(t[e[o]]);return n},{key:!1,debug:function(){return o.options.debug}}),this.getVirtualItemForOffset=function(e){var t=o.getMeasurements();return Ve(t[Ke(0,t.length-1,function(e){return Ve(t[e]).start},e)])},this.getOffsetForAlignment=function(e,t){var n=o.getSize();"auto"===t&&(t=e<=o.scrollOffset?"start":e>=o.scrollOffset+n?"end":"start"),"start"===t||("end"===t?e-=n:"center"===t&&(e-=n/2));var a=o.options.horizontal?"scrollWidth":"scrollHeight";return Math.max(Math.min((o.scrollElement?"document"in o.scrollElement?o.scrollElement.document.documentElement[a]:o.scrollElement[a]:0)-o.getSize(),e),0)},this.getOffsetForIndex=function(e,t){void 0===t&&(t="auto"),e=Math.max(0,Math.min(e,o.options.count-1));var n=Ve(o.getMeasurements()[e]);if("auto"===t){if(n.end>=o.scrollOffset+o.getSize()-o.options.scrollPaddingEnd)t="end";else{if(!(n.start<=o.scrollOffset+o.options.scrollPaddingStart))return[o.scrollOffset,t];t="start"}}return[o.getOffsetForAlignment("end"===t?n.end+o.options.scrollPaddingEnd:n.start-o.options.scrollPaddingStart,t),t]},this.isDynamicMode=function(){return o.measureElementCache.size>0},this.cancelScrollToIndex=function(){null!==o.scrollToIndexTimeoutId&&(clearTimeout(o.scrollToIndexTimeoutId),o.scrollToIndexTimeoutId=null)},this.scrollToOffset=function(e,t){var n=void 0===t?{}:t,a=n.align,s=void 0===a?"start":a,c=n.behavior;o.cancelScrollToIndex(),"smooth"===c&&o.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),o._scrollToOffset(o.getOffsetForAlignment(e,s),{adjustments:void 0,behavior:c})},this.scrollToIndex=function(e,t){var n=void 0===t?{}:t,a=n.align,s=void 0===a?"auto":a,c=n.behavior;e=Math.max(0,Math.min(e,o.options.count-1)),o.cancelScrollToIndex(),"smooth"===c&&o.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");var l=o.getOffsetForIndex(e,s),u=l[1];o._scrollToOffset(l[0],{adjustments:void 0,behavior:c}),"smooth"!==c&&o.isDynamicMode()&&(o.scrollToIndexTimeoutId=setTimeout(function(){o.scrollToIndexTimeoutId=null,o.measureElementCache.has(o.options.getItemKey(e))&&1>Math.abs(o.getOffsetForIndex(e,u)[0]-o.scrollOffset)||o.scrollToIndex(e,{align:u,behavior:c})}))},this.scrollBy=function(e,t){var n=(void 0===t?{}:t).behavior;o.cancelScrollToIndex(),"smooth"===n&&o.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),o._scrollToOffset(o.scrollOffset+e,{adjustments:void 0,behavior:n})},this.getTotalSize=function(){var e;return((null==(e=o.getMeasurements()[o.options.count-1])?void 0:e.end)||o.options.paddingStart)-o.options.scrollMargin+o.options.paddingEnd},this._scrollToOffset=function(e,t){o.options.scrollToFn(e,{behavior:t.behavior,adjustments:t.adjustments},o)},this.measure=function(){o.itemSizeCache=new Map,o.notify()},this.setOptions(e),this.scrollRect=this.options.initialRect,this.scrollOffset=this.options.initialOffset,this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(function(e){o.itemSizeCache.set(e.key,e.size)}),this.maybeNotify()},Ke=function(e,t,n,o){for(;e<=t;){var a=(e+t)/2|0,s=n(a);if(s<o)e=a+1;else{if(!(s>o))return a;t=a-1}}return e>0?e-1:0},s_="undefined"!=typeof document?q.useLayoutEffect:q.useEffect;let sw=["value","label","index","selected","created"],sS=["highlightedRef","option","multi"],sE=["index","size","start","item","optionItemProps"],sT=["__css","visibleOptions","isOpen","getOption","ref","optionsRef"],sk=["isActive","width","height","__css"],sA=["width","height"],sI=["value","label"],sx=["onClick","__css","value","label"],sR=["__css","size","ariaLabel","icon","isOpen"],sP=["__css","size","ariaLabel","icon"],sM=["children"],sO=["__css","textList","selectedItems","multi","selectionVisibleIn"],sN=["__css","clearable","clearOnClick","clearButtonProps","toggleButtonProps"],sB=["children"],sD=(0,aP.m)("svg"),sL=(0,q.memo)(e=>{let{children:t}=e,n=(0,aY.j)("MultiSelect",e),o=(0,aQ.L)(e),a=Te(),s=Te(),c=(0,q.useMemo)(()=>({selectLabelId:a,selectInputId:s}),[]),l=function({create:e=!1,single:t=!1,disabled:n=!1,selectionVisibleIn:o=_.Input,getDebounce:a=ie,getOption:s=ne,stateReducer:c=Q,filterFn:l=re,scrollToIndex:u=Z,shiftAmount:h=5,duplicates:p,options:f,value:m,onChange:g,placement:y="bottom-start",placeholder:v,searchPlaceholder:w}){var S;let[{searchValue:E,resolvedSearchValue:T,isOpen:k,highlightedIndex:I},x]=function(e,t){let n=(0,q.useRef)();n.current=t;let[o,a]=(0,q.useState)(e);return[o,(0,q.useCallback)((e,t)=>{if(!t)throw Error("An action type is required to update the state");return a(o=>n.current(o,e(o),t))},[a])]}(sc,c),R=!t,P=R&&!!(Array.isArray(m)?m.length>0:m),M=(0,q.useRef)(),O=(0,q.useRef)([]),L=(0,q.useRef)(""),U=(0,q.useRef)(),H=(0,q.useRef)(),V=(0,q.useRef)({}),G=(0,q.useRef)(),K=(0,q.useRef)(),$=(0,q.useRef)(),J=(0,q.useRef)(I),Y=(0,q.useRef)(),X=(0,q.useRef)(!1),et=(0,aJ.D)({placement:y});J.current=I,K.current=l,$.current=u,G.current=g,R&&void 0===m&&(m=sa),f||(f=ss);let er=f;f=(0,q.useMemo)(()=>{var e,t;return o!==_.Input?null==(e=f)?void 0:e.map(e=>{var t;return D({},s(e),{selected:null==(t=Array.isArray(m)?m:[m||""])?void 0:t.some(t=>s(t).value===s(e).value)})}):R&&!p?null==(t=f)?void 0:t.filter(e=>{var t;return!(null!=(t=m)&&t.some(t=>s(t).value===s(e).value))}):f},[f,m,p,R,s,o]);let en=(0,q.useMemo)(()=>R?m.map(e=>er.find(t=>s(t).value===s(e).value)||s(e)):er.find(e=>s(e).value===s(m).value)||s(m),[R,m,er,s]);f=(0,q.useMemo)(()=>T?null==K.current?void 0:K.current(f,T,s):f,[f,T,s]),f=(0,q.useMemo)(()=>e&&E?[D({created:!0},s(E)),...f]:f,[e,E,f,s]),L.current=m,O.current=f;let eo=(0,q.useCallback)(e=>{x(t=>oe(t,e,"isOpen"),C.SetOpen)},[]),ei=(0,q.useCallback)(()=>{eo(!1)},[]),ea=(0,q.useCallback)(()=>{eo(!0)},[]),es=function(e,t=0){let n=(0,q.useRef)(null),o=(0,q.useRef)();return o.current=e,(0,q.useEffect)(()=>()=>{clearTimeout(n.current)},[t]),(0,q.useCallback)(async(...e)=>(n.current&&clearTimeout(n.current),new Promise((a,s)=>{n.current=setTimeout(()=>{n.current=null;try{a(o.current(...e))}catch(e){s(e)}},t)})),[t])}(e=>{x(t=>oe(t,e,"resolvedSearchValue"),C.SetSearch)},a(f)),ec=(0,q.useCallback)(e=>{x(t=>oe(t,e,"searchValue"),C.SetSearch),es(e)},[]),el=(0,q.useCallback)(e=>{let t=O.current;x(n=>D({},n,{highlightedIndex:Math.min(Math.max(0,"function"==typeof e?e(n.highlightedIndex):e),t.length-1)}),C.HighlightIndex)},[]),eu=(0,q.useCallback)(t=>{let n=O.current[t];if(n){let e=s(n);if(R){let t=L.current;!p&&t.some(t=>s(t).value===e.value)||null==G.current||G.current([...t,e],{action:e.created?b.MultiCreate:b.MultiSelect,value:e})}else null==G.current||G.current(e.value,{action:e.created?b.SingleCreate:b.SingleSelect,value:e})}(e||R)&&ec(""),R||ei()},[R,e,p,s]),ed=(0,q.useCallback)(()=>{null==G.current||G.current(R?[]:"",{action:R?b.MultiClear:b.SingleClear,value:""})},[R]),eh=(0,q.useCallback)(e=>{let t="number"==typeof e,n=Array.isArray(L.current),o=n?L.current:[L.current],a=o.filter((n,o)=>t?o!==e:s(e).value!==s(n).value);n?G.current(a,{action:b.MultiRemove,value:s(t?o[e]:e).value}):G.current(a[0]||"",{action:b.SingleRemove,value:s(t?o[e]:e).value})},[s]),ep=(0,q.useCallback)(e=>{n||(ec(e.target.value),ea())},[n]),ef=(0,q.useCallback)(()=>{n||(e&&!R||ec(""),ea())},[e,R,n]),ye=(e,t)=>({shift:n,meta:o},a)=>{a.preventDefault();let s=t||o?1e12:e||n?h-1:1;ea(),X.current=!0,el(e=>e-s)},xe=(e,t)=>({shift:n,meta:o},a)=>{a.preventDefault();let s=t||o?1e12:e||n?h-1:1;ea(),X.current=!0,el(e=>e+s)},em=(0,q.useCallback)((e,t)=>{if(k){let e=O.current;(E||e[J.current])&&t.preventDefault(),e[J.current]&&eu(J.current)}},[k,E]),eg=(0,q.useCallback)(()=>{let e=L.current,t=R?e[e.length-1]:e;(R&&!E||!R&&t)&&(eh(t),ec(""))},[E,R]),ey=(S={ArrowUp:ye(),ArrowDown:xe(),PageUp:ye(!0),PageDown:xe(!0),Home:ye(!1,!0),End:xe(!1,!0),Escape:ei,Tab:ei,Enter:em,Backspace:eg},(e={})=>{let{onKeyDown:t}=e;return D({},N(e,sr),{onKeyDown:e=>{let{keyCode:n,key:o,shiftKey:a,metaKey:s}=e,c=S[o]||S[n];c&&c({keyCode:n,key:o,shift:a,meta:s},e),t&&t(e)}})}),ev=(0,q.useCallback)((e={})=>{let{refKey:t="ref",ref:n,onChange:o,onFocus:a,onClick:s,onBlur:c}=e,l=N(e,sn);return ey(D({[t]:e=>{U.current=e,n&&(n.current=e)},value:(k?E||en.label:en?null==en?void 0:en.label:"")||"",placeholder:P&&!E?w:null!=en&&en.label?void 0:v,onChange:e=>{ep(e),o&&o(e)},onFocus:e=>{ef(),a&&a(e)},onClick:e=>{ef(),s&&s(e)},onBlur:e=>{c&&(e.persist(),V.current.cb=c,V.current.event=e)}},l))},[k,E,en,ef,ep,v,w,P]),eb=(0,q.useCallback)((e={})=>{let{index:t,key:n=t,onClick:o,onMouseEnter:a,option:s}=e,c=N(e,so);if("number"!=typeof t||t<0)throw Error("useSelect: The getOptionProps prop getter requires an index property, eg. 'getOptionProps({index: 1})'");return D({key:n,option:s},c,{onClick:e=>{void 0!==s.selected&&s.selected?eh(s.value):eu(t),o&&o(e)},onMouseEnter:e=>{X.current=!1,el(t),a&&a(e)}})},[]);return function(e,t,n,o){let a=(0,q.useRef)(),s=(0,q.useRef)(),c=(0,q.useRef)();c.current=t;let l=n||a,u=o||s,h=(0,q.useCallback)(e=>{if("click"===e.type&&"touchstart"===e.type)return;let t=u.current,n=l.current;null!=t&&t.contains(e.target)||null!=n&&n.contains(e.target)||c.current(e)},[]);(0,q.useEffect)(()=>(e&&(document.addEventListener("touchstart",h,!0),document.addEventListener("click",h,!0)),()=>{document.removeEventListener("touchstart",h,!0),document.removeEventListener("click",h,!0)}),[e,h])}(k,ei,M,H),(0,q.useEffect)(()=>{k&&n&&eo(!1)},[k,n]),(0,q.useEffect)(()=>{E&&el(0)},[E,el]),(0,q.useEffect)(()=>{var e,t;el(0),!k&&null!=(e=V.current)&&e.event&&(null==(t=V.current)||t.cb(V.current.event),V.current.event=null)},[k]),(0,q.useEffect)(()=>{null==$.current||$.current(I,Y,M,X)},[I]),(0,q.useEffect)(()=>{k&&U.current&&setTimeout(()=>{var e;null==(e=U.current)||e.focus()})},[k]),{multi:R,clearable:P,disabled:n,clearAll:ed,optionsRef:M,controlRef:H,popper:et,value:m,searchValue:E,isOpen:k,highlightedIndexRef:J,highlightedValueRef:Y,enableScrollRef:X,selectedOption:en,visibleOptions:f,selectionVisibleIn:o,selectIndex:eu,removeValue:eh,setOpen:eo,setSearch:ec,highlightIndex:el,getInputProps:ev,getOptionProps:eb,getOption:s}}(o),u=(0,q.useMemo)(()=>l,[l]),h=(0,q.useMemo)(()=>({getInputProps:l.getInputProps}),[l.getInputProps]),p=(0,q.useMemo)(()=>({removeValue:l.removeValue}),[l.removeValue]),f=(0,q.useMemo)(()=>({value:l.value,multi:l.multi,selectionVisibleIn:l.selectionVisibleIn}),[l.value,l.multi,l.selectionVisibleIn]),m=(0,q.useMemo)(()=>({isOpen:l.isOpen,setOpen:l.setOpen,clearable:l.clearable,clearAll:l.clearAll}),[l.isOpen,l.setOpen,l.clearable,l.clearAll]);return(0,M.jsx)(a_.Fo,{value:n,children:(0,M.jsx)(sb,{value:c,children:(0,M.jsx)(sl,{value:u,children:(0,M.jsx)(sd,{value:h,children:(0,M.jsx)(sm,{value:f,children:(0,M.jsx)(sp,{value:p,children:(0,M.jsx)(sy,{value:m,children:(0,M.jsx)(aP.m.div,{pos:"relative",display:"flex",flexDirection:"column",children:t})})})})})})})})});sL.displayName="Select";let sU=(0,q.memo)(e=>{let t=function(e={}){let{selectLabelId:t,selectInputId:n}=sC();return D({},e,{__css:D({},(0,aY.j)("FormLabel",e)||{},(0,a_.yK)().label),id:t,htmlFor:n})}(e);return(0,M.jsx)(aP.m.label,D({},e,t))});sU.displayName="SelectLabel";let sF=(0,q.memo)(({label:e,created:t})=>(0,M.jsxs)(aX.U,{justifyContent:"space-between",w:"full",children:[(0,M.jsx)(L.x,{children:e}),!!t&&(0,M.jsx)(aZ.Vp,{flexShrink:0,children:(0,M.jsx)(aZ.Sn,{fontSize:"xs",fontWeight:"bold",children:"New"})})]}));sF.displayName="SelectOptionLabel";let sq=(0,q.memo)(e=>{let{value:t,label:n,index:o,selected:a,created:s}=e,c=N(e,sw),l=function(e={}){let{selected:t}=e,n=N(e,si),{getOptionProps:o,highlightedIndexRef:a,highlightedValueRef:s,multi:c}=su(),l=(0,a_.yK)(),u=a.current===n.index;return(0,q.useMemo)(()=>{var e,a;let h={value:n.value,label:n.label||ee(n.value),selected:t};return D({},o({option:h,key:n.key||te(h),index:n.index}),{multi:c,highlightedRef:u?s:void 0,__css:D({},l.item,null==(e=t&&l.item)?void 0:e._selected,null==(a=u&&l.item)?void 0:a._active)})},[u,t,n.key,n.label,n.value,n.index,l.item,c])}({value:t,label:n,index:o,selected:a}),{highlightedRef:u,option:h,multi:p}=l,f=N(l,sS);return(0,M.jsx)(aP.m.li,D({ref:u&&u,role:"option"},(a||p)&&{"aria-selected":!!a},c,f,{children:(0,M.jsx)(sF,{label:(null==h?void 0:h.label)||t,created:!!s})}))});sq.displayName="SelectOptionItem";let sz=(0,q.memo)(e=>{let{index:t,size:n,start:o,item:a,optionItemProps:s}=e,c=N(e,sE);return(0,M.jsx)(sq,D({},s(a.value,t),{style:{position:"absolute",top:0,left:0,width:"100%",height:`${n}px`,transform:`translateY(${o}px)`},selected:a.selected,created:a.created,label:a.label},c))});sz.displayName="SelectOptionVirtualItem";let sH=(0,q.memo)(({label:e="No results found"})=>{let t=(0,a_.yK)();return(0,M.jsx)(aP.m.li,{__css:t.item,children:(0,M.jsx)(sF,{label:e})})});sH.displayName="EmptySelectResults";let sj=(0,q.memo)(e=>{var t,n,o,a;let s=function(){let{isOpen:e,getOption:t,optionsRef:n,popper:o,visibleOptions:a,multi:s}=su(),c=(0,a_.yK)();return(0,q.useMemo)(()=>({ref:mergeRefs(n,o.popperRef),optionsRef:n,isOpen:e,visibleOptions:a,getOption:t,__css:c.list,"aria-multiselectable":s,"aria-hidden":!e}),[e,a,c.list,s])}(),{__css:c,visibleOptions:l,isOpen:u,getOption:h,ref:p,optionsRef:f}=s,m=N(s,sT),g=(0,q.useCallback)((e,t)=>{let n=h(e);return{key:n.id||te(n,"option-"),value:n.value,label:n.label||ee(n.value),selected:n.selected,created:n.created,index:t}},[]),y=(0,q.useMemo)(()=>"lg"===e.size?43:"sm"===e.size?29:40,[e.size]),v=(t=Re({observeElementRect:je,observeElementOffset:Be,scrollToFn:Fe},{count:l.length,getScrollElement:()=>f.current,estimateSize:()=>y}),n=q.useReducer(function(){return{}},{})[1],o=Re({},t,{onChange:function(e){n(),null==t.onChange||t.onChange(e)}}),(a=q.useState(function(){return new He(o)})[0]).setOptions(o),q.useEffect(function(){return a._didMount()},[]),s_(function(){return a._willUpdate()}),a);return(0,M.jsx)(aP.m.ul,D({ref:p,__css:(0,q.useMemo)(()=>D({listStyle:"none",position:"absolute"},!u&&{display:"none"},c),[u,c]),"aria-orientation":"vertical",role:"listbox"},m,e,{children:u&&l.length>0?(0,M.jsx)("div",{style:{height:`${v.getTotalSize()}px`,width:"100%",position:"relative"},children:v.getVirtualItems().map(e=>(0,M.jsx)(sz,{optionItemProps:g,item:l[e.index],index:e.index,size:e.size,start:e.start},e.key))}):u?(0,M.jsx)(sH,{label:e.emptyResultsLabel}):null}))});sj.displayName="SelectList";let mt=e=>{let{isActive:t,width:n=4,height:o=4,__css:a}=e,s=N(e,sk);return(0,M.jsx)(sD,D({viewBox:"0 0 24 24",stroke:"currentColor",fill:"none",width:n,height:o,__css:D({},a,t&&(null==a?void 0:a._active))},s,{children:(0,M.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M19 9l-7 7-7-7"})}))},gt=e=>{let{width:t=4,height:n=4}=e,o=N(e,sA);return(0,M.jsx)(sD,D({viewBox:"0 0 24 24",stroke:"currentColor",fill:"none",width:t,height:n},o,{children:(0,M.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"})}))},sV=(0,q.memo)(e=>{let t=function(e={}){let{selectLabelId:t,selectInputId:n}=sC(),{getInputProps:o}=sh(),{fontSize:a}=(0,aY.j)("Input",e).field||{},s=(0,a_.yK)();return D({},e,o(),{__css:D({fontSize:a},s.input),id:n,"aria-labelledby":t})}(e);return(0,M.jsx)(aP.m.input,D({},t))});sV.displayName="SelectInput";let sG=(0,q.memo)(e=>{let{value:t,label:n}=e,o=N(e,sI),a=function(e={}){let{removeValue:t}=sf(),n=(0,a_.yK)(),o=(0,q.useCallback)(()=>t(e.value),[e.value]);return(0,q.useMemo)(()=>({key:e.key||e.value,onClick:o,__css:n.selectedItem,value:e.value,label:e.label||ee(e.value)}),[e.value,e.label,e.key,o,n.selectedItem])}(D({value:t,label:n||"",key:o.key||""},o)),{onClick:s,__css:c,value:l,label:u}=a,h=N(a,sx);return(0,M.jsxs)(aZ.Vp,D({size:o.size},{sm:{fontSize:"sm"},md:{fontSize:"md"},lg:{fontSize:"lg"}}[o.size||"md"]||{},c,h,{role:"listitem",children:[(0,M.jsx)(aZ.Sn,{children:u||l}),(0,M.jsx)(aZ.SD,{onClick:s})]}))});sG.displayName="SelectedItem";let sK=(0,q.memo)(e=>{let t=function(e={}){var t;let{isOpen:n,setOpen:o}=sv(),a=(0,q.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),o(e=>!e)},[o]),s=(0,a_.yK)();return D({},e,{__css:D({},s.button,null==(t=n&&s.button)?void 0:t._active),isOpen:n,onClick:a})}(e),{__css:n,size:o="sm",ariaLabel:a="toggle menu",icon:s=mt,isOpen:c}=t,l=N(t,sR);return(0,M.jsx)(a0.h,D({tabIndex:0,size:o,"aria-label":a,"aria-haspopup":!0,"aria-expanded":!e.disabled&&c,icon:(0,M.jsx)(s,{isActive:!e.disabled&&c,__css:e.disabled?void 0:{transitionDuration:"200ms",transitionProperty:"transform",_active:{transform:"rotate(180deg)"}}}),minWidth:0},{sm:{height:"6",width:"6"},md:{height:"8",width:"8"},lg:{height:"10",width:"10"}}[o]||{},n,l))});sK.displayName="SelectToggleButton";let sW=(0,q.memo)(e=>{let t=function(e={}){return D({},e,{__css:D({},(0,a_.yK)().button)})}(e),{__css:n,size:o="sm",ariaLabel:a="clear all selected",icon:s=gt}=t,c=N(t,sP);return(0,M.jsx)(a0.h,D({tabIndex:0,size:o,"aria-label":a,icon:(0,M.jsx)(s,{}),minWidth:0},{sm:{height:"6",width:"6"},md:{height:"8",width:"8"},lg:{height:"10",width:"10"}}[o]||{},n,c))});sW.displayName="SelectClearButton";let s$=(0,q.memo)(e=>{let{children:t}=e,n=N(e,sM),o=function(e={}){let{visibleOptions:t,getOption:n}=su(),{value:o,multi:a,selectionVisibleIn:s}=sg(),c=(0,a_.yK)();return D({},e,{multi:a,selectedItems:(0,q.useMemo)(()=>o&&Array.isArray(o)?o.map(e=>n(e)):[],[o,t]),selectionVisibleIn:s,__css:c.selectedList,textList:{__css:c.textList}})}(n),{__css:a,textList:s,selectedItems:c,multi:l,selectionVisibleIn:u}=o,h=N(o,sO),p=l&&u!==_.List,f=l&&u===_.List;return(0,M.jsxs)(L.x,D({},a,h,p?{role:"list"}:null,{children:[p&&(null==c?void 0:c.map(e=>(0,M.jsx)(sG,{size:n.size,value:e.value,label:e.label},`selected-item-${e.value}`))),f&&!(null==c||!c.length)&&(0,M.jsx)(L.x,D({"aria-current":"true"},null==s?void 0:s.__css,{children:null==c?void 0:c.map(({label:e})=>e).join(", ")})),t]}))});s$.displayName="SelectedList";let sJ=(0,q.memo)(e=>{let t=function(e={}){let{clearAll:t,clearable:n}=sv(),o=(0,a_.yK)(),a=(0,q.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),t()},[]);return D({},e,{clearOnClick:a,clearable:n,__css:o.actionGroup})}(e),{__css:n,clearable:o,clearOnClick:a,clearButtonProps:s,toggleButtonProps:c}=t,l=N(t,sN);return(0,M.jsxs)(aX.U,D({},n,l,{children:[o&&(0,M.jsx)(sW,D({size:e.size,onClick:a},s)),(0,M.jsx)(sK,D({size:e.size,disabled:e.disabled},c))]}))});function colorToShades(e){let t=parseInt(e.substring(1,3),16),n=parseInt(e.substring(3,5),16),o=parseInt(e.substring(5,7),16),a={};return[50,100,200,300,400,500,600,700,800,900].forEach(e=>{a[e]=function(e,t,n,o){let a=o/500;e=(e=Math.floor(255-a*(255-e)))>0?e:0,t=(t=Math.floor(255-a*(255-t)))>0?t:0,n=(n=Math.floor(255-a*(255-n)))>0?n:0,e=e<255?e:255,t=t<255?t:255,n=n<255?n:255;let s=1===e.toString(16).length?"0"+e.toString(16):e.toString(16),c=1===t.toString(16).length?"0"+t.toString(16):t.toString(16),l=1===n.toString(16).length?"0"+n.toString(16):n.toString(16);return"#"+s+c+l}(t,n,o,e)}),{...a}}sJ.displayName="SelectActionGroup",(0,a1.G)((e,t)=>{let{children:n}=e,o=N(e,sB),{ref:a,__css:s}=function(e={}){var t,n;let{isOpen:o,popper:a,controlRef:s,disabled:c}=su(),l=(0,aY.j)("Input",e)||{},u=(0,a_.yK)();return D({},e,(0,q.useMemo)(()=>({ref:mergeRefs(e.ref,s,a.referenceRef)}),[e.ref,s,a.referenceRef]),{isOpen:o,disabled:c,__css:D({},u.field,u.control,{_focusWithin:null==(t=l.field)?void 0:t._focusVisible,_disabled:null==(n=l.field)?void 0:n._disabled})})}({ref:t});return(0,M.jsx)(a2.I,D({ref:a,as:aX.U},s,o,{children:n}))});var components_ThemeWrapper=e=>{var t,n,o,a,s,c;let{themeProps:l,isDashboard:u,children:h}=e,p=null==l?void 0:l.frontmatter,f={breakpoints:{sm:"30em",md:"48em",lg:"62em",xl:"80em",xs:"20em","2xl":"96em"},colors:{primary:colorToShades(null!==(t=null==p?void 0:p.primary)&&void 0!==t?t:"#466ff4"),secondary:colorToShades(null!==(n=null==p?void 0:p.secondary)&&void 0!==n?n:"#b23cfd"),success:colorToShades(null!==(o=null==p?void 0:p.success)&&void 0!==o?o:"#00b74a"),info:colorToShades(null!==(a=null==p?void 0:p.info)&&void 0!==a?a:"#39c0ed"),warning:colorToShades(null!==(s=null==p?void 0:p.warning)&&void 0!==s?s:"#ffa900"),danger:colorToShades(null!==(c=null==p?void 0:p.danger)&&void 0!==c?c:"#f93154")},fonts:{body:"Open Sans, system-ui, sans-serif",heading:"Raleway, serif",mono:"Menlo, monospace"},fontSizes:{xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem","2xl":"1.5rem","3xl":"1.875rem","4xl":"2.25rem","5xl":"3rem","6xl":"3.75rem","7xl":"4.5rem","8xl":"6rem","9xl":"8rem"},lineHeights:{normal:"normal",none:1.25,shorter:1.375,short:1.5,base:1.625,tall:2,taller:"2.5",1:"0.8em",2:"0.9em",3:"1em",4:"1.25em",5:"1.5em",6:"1.75em",7:"2em",8:"2.25em",9:"2.5em",10:"2.75em"},initialColorMode:"dark",useSystemColorMode:!1,components:{MultiSelect:st}},m=u?al(f,a$):al(f);return(0,M.jsx)(ChakraProvider,{theme:m,children:h})},sY=n(7186),sQ=n(8785),sX=n(3386),sZ=n(6698),s0=n(6577),s1=n.n(s0),s2=n(8978);function ColorModeButton(e){let{toggleColorMode:t}=(0,ah.If)(),n=(0,ah.ff)("dark","light"),o=(0,ah.ff)(s2.TLr,s2.Mei);return(0,M.jsx)(a0.h,{size:"md",fontSize:"lg","aria-label":"Switch to ".concat(n," mode"),variant:"ghost",color:"current",onClick:t,icon:(0,M.jsx)(o,{}),...e})}var components_Navbar=()=>(0,M.jsx)(L.x,{bg:"gray.100",_dark:{bg:"gray.700"},py:4,boxShadow:"sm",children:(0,M.jsx)(sY.W,{maxW:"container.4xl",children:(0,M.jsxs)(sQ.k,{justify:"space-between",align:"center",children:[(0,M.jsxs)(aX.U,{children:[(0,M.jsx)(s1(),{src:"/img/favicon/Blue256x256.png",width:32,height:32,alt:"WhiteStar Logo"}),(0,M.jsx)(L.x,{fontWeight:"bold",fontSize:"lg",children:"WhiteStar Dashboard"})]}),(0,M.jsxs)(sX.K,{direction:"row",spacing:4,children:[(0,M.jsx)(sZ.z,{variant:"ghost",as:"a",target:"_blank",href:"https://whitestar.io/download",children:"Download"}),(0,M.jsx)(sZ.z,{variant:"ghost",as:"a",target:"_blank",href:"https://whitestar.io/docs",children:"Docs"}),(0,M.jsx)(sZ.z,{variant:"ghost",as:"a",target:"_blank",href:"https://whitestar-communications.atlassian.net/servicedesk/customer/portal/1",children:"Help Portal"}),(0,M.jsx)(sZ.z,{colorScheme:"primary",variant:"outline",as:"a",target:"_blank",href:"https://whitestar.io#contactForm",children:"Contact"}),(0,M.jsx)(ColorModeButton,{})]})]})})}),s4=n(5632);n(5778);var s3=n(9870),s5=n(1601);(c=w||(w={})).AcquireTokenByCode="acquireTokenByCode",c.AcquireTokenByRefreshToken="acquireTokenByRefreshToken",c.AcquireTokenSilent="acquireTokenSilent",c.AcquireTokenSilentAsync="acquireTokenSilentAsync",c.AcquireTokenPopup="acquireTokenPopup",c.CryptoOptsGetPublicKeyThumbprint="cryptoOptsGetPublicKeyThumbprint",c.CryptoOptsSignJwt="cryptoOptsSignJwt",c.SilentCacheClientAcquireToken="silentCacheClientAcquireToken",c.SilentIframeClientAcquireToken="silentIframeClientAcquireToken",c.SilentRefreshClientAcquireToken="silentRefreshClientAcquireToken",c.SsoSilent="ssoSilent",c.StandardInteractionClientGetDiscoveredAuthority="standardInteractionClientGetDiscoveredAuthority",c.FetchAccountIdWithNativeBroker="fetchAccountIdWithNativeBroker",c.NativeInteractionClientAcquireToken="nativeInteractionClientAcquireToken",c.BaseClientCreateTokenRequestHeaders="baseClientCreateTokenRequestHeaders",c.BrokerHandhshake="brokerHandshake",c.AcquireTokenByRefreshTokenInBroker="acquireTokenByRefreshTokenInBroker",c.AcquireTokenByBroker="acquireTokenByBroker",c.RefreshTokenClientExecuteTokenRequest="refreshTokenClientExecuteTokenRequest",c.RefreshTokenClientAcquireToken="refreshTokenClientAcquireToken",c.RefreshTokenClientAcquireTokenWithCachedRefreshToken="refreshTokenClientAcquireTokenWithCachedRefreshToken",c.RefreshTokenClientAcquireTokenByRefreshToken="refreshTokenClientAcquireTokenByRefreshToken",c.RefreshTokenClientCreateTokenRequestBody="refreshTokenClientCreateTokenRequestBody",c.AcquireTokenFromCache="acquireTokenFromCache",c.AcquireTokenBySilentIframe="acquireTokenBySilentIframe",c.InitializeBaseRequest="initializeBaseRequest",c.InitializeSilentRequest="initializeSilentRequest",c.InitializeClientApplication="initializeClientApplication",c.SilentIframeClientTokenHelper="silentIframeClientTokenHelper",c.SilentHandlerInitiateAuthRequest="silentHandlerInitiateAuthRequest",c.SilentHandlerMonitorIframeForHash="silentHandlerMonitorIframeForHash",c.SilentHandlerLoadFrame="silentHandlerLoadFrame",c.StandardInteractionClientCreateAuthCodeClient="standardInteractionClientCreateAuthCodeClient",c.StandardInteractionClientGetClientConfiguration="standardInteractionClientGetClientConfiguration",c.StandardInteractionClientInitializeAuthorizationRequest="standardInteractionClientInitializeAuthorizationRequest",c.StandardInteractionClientInitializeAuthorizationCodeRequest="standardInteractionClientInitializeAuthorizationCodeRequest",c.GetAuthCodeUrl="getAuthCodeUrl",c.HandleCodeResponseFromServer="handleCodeResponseFromServer",c.HandleCodeResponseFromHash="handleCodeResponseFromHash",c.UpdateTokenEndpointAuthority="updateTokenEndpointAuthority",c.AuthClientAcquireToken="authClientAcquireToken",c.AuthClientExecuteTokenRequest="authClientExecuteTokenRequest",c.AuthClientCreateTokenRequestBody="authClientCreateTokenRequestBody",c.AuthClientCreateQueryString="authClientCreateQueryString",c.PopTokenGenerateCnf="popTokenGenerateCnf",c.PopTokenGenerateKid="popTokenGenerateKid",c.HandleServerTokenResponse="handleServerTokenResponse",c.AuthorityFactoryCreateDiscoveredInstance="authorityFactoryCreateDiscoveredInstance",c.AuthorityResolveEndpointsAsync="authorityResolveEndpointsAsync",c.AuthorityGetCloudDiscoveryMetadataFromNetwork="authorityGetCloudDiscoveryMetadataFromNetwork",c.AuthorityUpdateCloudDiscoveryMetadata="authorityUpdateCloudDiscoveryMetadata",c.AuthorityGetEndpointMetadataFromNetwork="authorityGetEndpointMetadataFromNetwork",c.AuthorityUpdateEndpointMetadata="authorityUpdateEndpointMetadata",c.AuthorityUpdateMetadataWithRegionalInformation="authorityUpdateMetadataWithRegionalInformation",c.RegionDiscoveryDetectRegion="regionDiscoveryDetectRegion",c.RegionDiscoveryGetRegionFromIMDS="regionDiscoveryGetRegionFromIMDS",c.RegionDiscoveryGetCurrentVersion="regionDiscoveryGetCurrentVersion",c.AcquireTokenByCodeAsync="acquireTokenByCodeAsync",c.GetEndpointMetadataFromNetwork="getEndpointMetadataFromNetwork",c.GetCloudDiscoveryMetadataFromNetworkMeasurement="getCloudDiscoveryMetadataFromNetworkMeasurement",c.HandleRedirectPromiseMeasurement="handleRedirectPromiseMeasurement",c.UpdateCloudDiscoveryMetadataMeasurement="updateCloudDiscoveryMetadataMeasurement",c.UsernamePasswordClientAcquireToken="usernamePasswordClientAcquireToken",c.NativeMessageHandlerHandshake="nativeMessageHandlerHandshake",(l=S||(S={}))[l.NotStarted=0]="NotStarted",l[l.InProgress=1]="InProgress",l[l.Completed=2]="Completed";var s6=new Set(["accessTokenSize","durationMs","idTokenSize","matsSilentStatus","matsHttpStatus","refreshTokenSize","queuedTimeMs","startTimeMs","status"]),s8=n(6240),s9=n(110),s7=n(6959),ce=function(e){function ServerError(t,n,o){var a=e.call(this,t,n,o)||this;return a.name="ServerError",Object.setPrototypeOf(a,ServerError.prototype),a}return(0,s9.ZT)(ServerError,e),ServerError}(s7.l),ct=["interaction_required","consent_required","login_required"],cr=["message_only","additional_action","basic_action","user_password_expired","consent_required"],cn={noTokensFoundError:{code:"no_tokens_found",desc:"No refresh token found in the cache. Please sign-in."},native_account_unavailable:{code:"native_account_unavailable",desc:"The requested account is not available in the native broker. It may have been deleted or logged out. Please sign-in again using an interactive API."}},co=function(e){function InteractionRequiredAuthError(t,n,o,a,s,c,l){var u=e.call(this,t,n,o)||this;return Object.setPrototypeOf(u,InteractionRequiredAuthError.prototype),u.timestamp=a||s8.gT.EMPTY_STRING,u.traceId=s||s8.gT.EMPTY_STRING,u.correlationId=c||s8.gT.EMPTY_STRING,u.claims=l||s8.gT.EMPTY_STRING,u.name="InteractionRequiredAuthError",u}return(0,s9.ZT)(InteractionRequiredAuthError,e),InteractionRequiredAuthError.isInteractionRequiredError=function(e,t,n){var o=!!e&&ct.indexOf(e)>-1,a=!!n&&cr.indexOf(n)>-1,s=!!t&&ct.some(function(e){return t.indexOf(e)>-1});return o||s||a},InteractionRequiredAuthError.createNoTokensFoundError=function(){return new InteractionRequiredAuthError(cn.noTokensFoundError.code,cn.noTokensFoundError.desc)},InteractionRequiredAuthError.createNativeAccountUnavailableError=function(){return new InteractionRequiredAuthError(cn.native_account_unavailable.code,cn.native_account_unavailable.desc)},InteractionRequiredAuthError}(s7.l),ci=n(8527),ca={missingKidError:{code:"missing_kid_error",desc:"The JOSE Header for the requested JWT, JWS or JWK object requires a keyId to be configured as the 'kid' header claim. No 'kid' value was provided."},missingAlgError:{code:"missing_alg_error",desc:"The JOSE Header for the requested JWT, JWS or JWK object requires an algorithm to be specified as the 'alg' header claim. No 'alg' value was provided."}},cs=function(e){function JoseHeaderError(t,n){var o=e.call(this,t,n)||this;return o.name="JoseHeaderError",Object.setPrototypeOf(o,JoseHeaderError.prototype),o}return(0,s9.ZT)(JoseHeaderError,e),JoseHeaderError.createMissingKidError=function(){return new JoseHeaderError(ca.missingKidError.code,ca.missingKidError.desc)},JoseHeaderError.createMissingAlgError=function(){return new JoseHeaderError(ca.missingAlgError.code,ca.missingAlgError.desc)},JoseHeaderError}(s7.l),cc=function(){function JoseHeader(e){this.typ=e.typ,this.alg=e.alg,this.kid=e.kid}return JoseHeader.getShrHeaderString=function(e){if(!e.kid)throw cs.createMissingKidError();if(!e.alg)throw cs.createMissingAlgError();return JSON.stringify(new JoseHeader({typ:e.typ||s8.L.Pop,kid:e.kid,alg:e.alg}))},JoseHeader}(),cl=function(){function MathUtils(){}return MathUtils.decimalToHex=function(e){for(var t=e.toString(16);t.length<2;)t="0"+t;return t},MathUtils}(),cu=function(){function GuidGenerator(e){this.cryptoObj=e}return GuidGenerator.prototype.generateGuid=function(){try{var e=new Uint8Array(16);return this.cryptoObj.getRandomValues(e),e[6]|=64,e[6]&=79,e[8]|=128,e[8]&=191,cl.decimalToHex(e[0])+cl.decimalToHex(e[1])+cl.decimalToHex(e[2])+cl.decimalToHex(e[3])+"-"+cl.decimalToHex(e[4])+cl.decimalToHex(e[5])+"-"+cl.decimalToHex(e[6])+cl.decimalToHex(e[7])+"-"+cl.decimalToHex(e[8])+cl.decimalToHex(e[9])+"-"+cl.decimalToHex(e[10])+cl.decimalToHex(e[11])+cl.decimalToHex(e[12])+cl.decimalToHex(e[13])+cl.decimalToHex(e[14])+cl.decimalToHex(e[15])}catch(e){for(var t="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx",n="0123456789abcdef",o=0,a=s8.gT.EMPTY_STRING,s=0;s<36;s++)"-"!==t[s]&&"4"!==t[s]&&(o=16*Math.random()|0),"x"===t[s]?a+=n[o]:"y"===t[s]?(o&=3,o|=8,a+=n[o]):a+=t[s];return a}},GuidGenerator.prototype.isGuid=function(e){return/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(e)},GuidGenerator}(),cd=function(){function BrowserStringUtils(){}return BrowserStringUtils.stringToUtf8Arr=function(e){for(var t,n=0,o=e.length,a=0;a<o;a++)n+=(t=e.charCodeAt(a))<128?1:t<2048?2:t<65536?3:t<2097152?4:t<67108864?5:6;for(var s=new Uint8Array(n),c=0,l=0;c<n;l++)(t=e.charCodeAt(l))<128?s[c++]=t:(t<2048?s[c++]=192+(t>>>6):(t<65536?s[c++]=224+(t>>>12):(t<2097152?s[c++]=240+(t>>>18):(t<67108864?s[c++]=248+(t>>>24):(s[c++]=252+(t>>>30),s[c++]=128+(t>>>24&63)),s[c++]=128+(t>>>18&63)),s[c++]=128+(t>>>12&63)),s[c++]=128+(t>>>6&63)),s[c++]=128+(63&t));return s},BrowserStringUtils.stringToArrayBuffer=function(e){for(var t=new ArrayBuffer(e.length),n=new Uint8Array(t),o=0;o<e.length;o++)n[o]=e.charCodeAt(o);return t},BrowserStringUtils.utf8ArrToString=function(e){for(var t=s8.gT.EMPTY_STRING,n=void 0,o=e.length,a=0;a<o;a++)t+=String.fromCharCode((n=e[a])>251&&n<254&&a+5<o?(n-252)*1073741824+(e[++a]-128<<24)+(e[++a]-128<<18)+(e[++a]-128<<12)+(e[++a]-128<<6)+e[++a]-128:n>247&&n<252&&a+4<o?(n-248<<24)+(e[++a]-128<<18)+(e[++a]-128<<12)+(e[++a]-128<<6)+e[++a]-128:n>239&&n<248&&a+3<o?(n-240<<18)+(e[++a]-128<<12)+(e[++a]-128<<6)+e[++a]-128:n>223&&n<240&&a+2<o?(n-224<<12)+(e[++a]-128<<6)+e[++a]-128:n>191&&n<224&&a+1<o?(n-192<<6)+e[++a]-128:n);return t},BrowserStringUtils.getSortedObjectString=function(e){return JSON.stringify(e,Object.keys(e).sort())},BrowserStringUtils}(),ch=function(){function Base64Encode(){}return Base64Encode.prototype.urlEncode=function(e){return encodeURIComponent(this.encode(e).replace(/=/g,s8.gT.EMPTY_STRING).replace(/\+/g,"-").replace(/\//g,"_"))},Base64Encode.prototype.urlEncodeArr=function(e){return this.base64EncArr(e).replace(/=/g,s8.gT.EMPTY_STRING).replace(/\+/g,"-").replace(/\//g,"_")},Base64Encode.prototype.encode=function(e){var t=cd.stringToUtf8Arr(e);return this.base64EncArr(t)},Base64Encode.prototype.base64EncArr=function(e){for(var t=(3-e.length%3)%3,n=s8.gT.EMPTY_STRING,o=void 0,a=e.length,s=0,c=0;c<a;c++)o=c%3,s|=e[c]<<(16>>>o&24),(2===o||e.length-c==1)&&(n+=String.fromCharCode(this.uint6ToB64(s>>>18&63),this.uint6ToB64(s>>>12&63),this.uint6ToB64(s>>>6&63),this.uint6ToB64(63&s)),s=0);return 0===t?n:n.substring(0,n.length-t)+(1===t?"=":"==")},Base64Encode.prototype.uint6ToB64=function(e){return e<26?e+65:e<52?e+71:e<62?e-4:62===e?43:63===e?47:65},Base64Encode}(),cp=function(){function Base64Decode(){}return Base64Decode.prototype.decode=function(e){var t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw Error("Invalid base64 string")}var n=this.base64DecToArr(t);return cd.utf8ArrToString(n)},Base64Decode.prototype.base64DecToArr=function(e,t){for(var n=e.replace(/[^A-Za-z0-9\+\/]/g,s8.gT.EMPTY_STRING),o=n.length,a=t?Math.ceil((3*o+1>>>2)/t)*t:3*o+1>>>2,s=new Uint8Array(a),c=void 0,l=void 0,u=0,h=0,p=0;p<o;p++)if(l=3&p,u|=this.b64ToUint6(n.charCodeAt(p))<<18-6*l,3===l||o-p==1){for(c=0;c<3&&h<a;c++,h++)s[h]=u>>>(16>>>c&24)&255;u=0}return s},Base64Decode.prototype.b64ToUint6=function(e){return e>64&&e<91?e-65:e>96&&e<123?e-71:e>47&&e<58?e+4:43===e?62:47===e?63:0},Base64Decode}(),cf=n(6255),cm={pkceNotGenerated:{code:"pkce_not_created",desc:"The PKCE code challenge and verifier could not be generated."},cryptoDoesNotExist:{code:"crypto_nonexistent",desc:"The crypto object or function is not available."},httpMethodNotImplementedError:{code:"http_method_not_implemented",desc:"The HTTP method given has not been implemented in this library."},emptyNavigateUriError:{code:"empty_navigate_uri",desc:"Navigation URI is empty. Please check stack trace for more info."},hashEmptyError:{code:"hash_empty_error",desc:"Hash value cannot be processed because it is empty. Please verify that your redirectUri is not clearing the hash. For more visit: aka.ms/msaljs/browser-errors."},hashDoesNotContainStateError:{code:"no_state_in_hash",desc:"Hash does not contain state. Please verify that the request originated from msal."},hashDoesNotContainKnownPropertiesError:{code:"hash_does_not_contain_known_properties",desc:"Hash does not contain known properites. Please verify that your redirectUri is not changing the hash. For more visit: aka.ms/msaljs/browser-errors."},unableToParseStateError:{code:"unable_to_parse_state",desc:"Unable to parse state. Please verify that the request originated from msal."},stateInteractionTypeMismatchError:{code:"state_interaction_type_mismatch",desc:"Hash contains state but the interaction type does not match the caller."},interactionInProgress:{code:"interaction_in_progress",desc:"Interaction is currently in progress. Please ensure that this interaction has been completed before calling an interactive API.  For more visit: aka.ms/msaljs/browser-errors."},popupWindowError:{code:"popup_window_error",desc:"Error opening popup window. This can happen if you are using IE or if popups are blocked in the browser."},emptyWindowError:{code:"empty_window_error",desc:"window.open returned null or undefined window object."},userCancelledError:{code:"user_cancelled",desc:"User cancelled the flow."},monitorPopupTimeoutError:{code:"monitor_window_timeout",desc:"Token acquisition in popup failed due to timeout. For more visit: aka.ms/msaljs/browser-errors."},monitorIframeTimeoutError:{code:"monitor_window_timeout",desc:"Token acquisition in iframe failed due to timeout. For more visit: aka.ms/msaljs/browser-errors."},redirectInIframeError:{code:"redirect_in_iframe",desc:"Redirects are not supported for iframed or brokered applications. Please ensure you are using MSAL.js in a top frame of the window if using the redirect APIs, or use the popup APIs."},blockTokenRequestsInHiddenIframeError:{code:"block_iframe_reload",desc:"Request was blocked inside an iframe because MSAL detected an authentication response. For more visit: aka.ms/msaljs/browser-errors"},blockAcquireTokenInPopupsError:{code:"block_nested_popups",desc:"Request was blocked inside a popup because MSAL detected it was running in a popup."},iframeClosedPrematurelyError:{code:"iframe_closed_prematurely",desc:"The iframe being monitored was closed prematurely."},silentLogoutUnsupportedError:{code:"silent_logout_unsupported",desc:"Silent logout not supported. Please call logoutRedirect or logoutPopup instead."},noAccountError:{code:"no_account_error",desc:"No account object provided to acquireTokenSilent and no active account has been set. Please call setActiveAccount or provide an account on the request."},silentPromptValueError:{code:"silent_prompt_value_error",desc:"The value given for the prompt value is not valid for silent requests - must be set to 'none' or 'no_session'."},noTokenRequestCacheError:{code:"no_token_request_cache_error",desc:"No token request found in cache."},unableToParseTokenRequestCacheError:{code:"unable_to_parse_token_request_cache_error",desc:"The cached token request could not be parsed."},noCachedAuthorityError:{code:"no_cached_authority_error",desc:"No cached authority found."},authRequestNotSet:{code:"auth_request_not_set_error",desc:"Auth Request not set. Please ensure initiateAuthRequest was called from the InteractionHandler"},invalidCacheType:{code:"invalid_cache_type",desc:"Invalid cache type"},notInBrowserEnvironment:{code:"non_browser_environment",desc:"Login and token requests are not supported in non-browser environments."},databaseNotOpen:{code:"database_not_open",desc:"Database is not open!"},noNetworkConnectivity:{code:"no_network_connectivity",desc:"No network connectivity. Check your internet connection."},postRequestFailed:{code:"post_request_failed",desc:"Network request failed: If the browser threw a CORS error, check that the redirectUri is registered in the Azure App Portal as type 'SPA'"},getRequestFailed:{code:"get_request_failed",desc:"Network request failed. Please check the network trace to determine root cause."},failedToParseNetworkResponse:{code:"failed_to_parse_response",desc:"Failed to parse network response. Check network trace."},unableToLoadTokenError:{code:"unable_to_load_token",desc:"Error loading token to cache."},signingKeyNotFoundInStorage:{code:"crypto_key_not_found",desc:"Cryptographic Key or Keypair not found in browser storage."},authCodeRequired:{code:"auth_code_required",desc:"An authorization code must be provided (as the `code` property on the request) to this flow."},authCodeOrNativeAccountRequired:{code:"auth_code_or_nativeAccountId_required",desc:"An authorization code or nativeAccountId must be provided to this flow."},spaCodeAndNativeAccountPresent:{code:"spa_code_and_nativeAccountId_present",desc:"Request cannot contain both spa code and native account id."},databaseUnavailable:{code:"database_unavailable",desc:"IndexedDB, which is required for persistent cryptographic key storage, is unavailable. This may be caused by browser privacy features which block persistent storage in third-party contexts."},unableToAcquireTokenFromNativePlatform:{code:"unable_to_acquire_token_from_native_platform",desc:"Unable to acquire token from native platform. For a list of possible reasons visit aka.ms/msaljs/browser-errors."},nativeHandshakeTimeout:{code:"native_handshake_timeout",desc:"Timed out while attempting to establish connection to browser extension"},nativeExtensionNotInstalled:{code:"native_extension_not_installed",desc:"Native extension is not installed. If you think this is a mistake call the initialize function."},nativeConnectionNotEstablished:{code:"native_connection_not_established",desc:"Connection to native platform has not been established. Please install a compatible browser extension and run initialize(). For more please visit aka.ms/msaljs/browser-errors."},nativeBrokerCalledBeforeInitialize:{code:"native_broker_called_before_initialize",desc:"You must call and await the initialize function before attempting to call any other MSAL API when native brokering is enabled. For more please visit aka.ms/msaljs/browser-errors."},nativePromptNotSupported:{code:"native_prompt_not_supported",desc:"The provided prompt is not supported by the native platform. This request should be routed to the web based flow."}},cg=function(e){function BrowserAuthError(t,n){var o=e.call(this,t,n)||this;return Object.setPrototypeOf(o,BrowserAuthError.prototype),o.name="BrowserAuthError",o}return(0,s5.ZT)(BrowserAuthError,e),BrowserAuthError.createPkceNotGeneratedError=function(e){return new BrowserAuthError(cm.pkceNotGenerated.code,cm.pkceNotGenerated.desc+" Detail:"+e)},BrowserAuthError.createCryptoNotAvailableError=function(e){return new BrowserAuthError(cm.cryptoDoesNotExist.code,cm.cryptoDoesNotExist.desc+" Detail:"+e)},BrowserAuthError.createHttpMethodNotImplementedError=function(e){return new BrowserAuthError(cm.httpMethodNotImplementedError.code,cm.httpMethodNotImplementedError.desc+" Given Method: "+e)},BrowserAuthError.createEmptyNavigationUriError=function(){return new BrowserAuthError(cm.emptyNavigateUriError.code,cm.emptyNavigateUriError.desc)},BrowserAuthError.createEmptyHashError=function(e){return new BrowserAuthError(cm.hashEmptyError.code,cm.hashEmptyError.desc+" Given Url: "+e)},BrowserAuthError.createHashDoesNotContainStateError=function(){return new BrowserAuthError(cm.hashDoesNotContainStateError.code,cm.hashDoesNotContainStateError.desc)},BrowserAuthError.createHashDoesNotContainKnownPropertiesError=function(){return new BrowserAuthError(cm.hashDoesNotContainKnownPropertiesError.code,cm.hashDoesNotContainKnownPropertiesError.desc)},BrowserAuthError.createUnableToParseStateError=function(){return new BrowserAuthError(cm.unableToParseStateError.code,cm.unableToParseStateError.desc)},BrowserAuthError.createStateInteractionTypeMismatchError=function(){return new BrowserAuthError(cm.stateInteractionTypeMismatchError.code,cm.stateInteractionTypeMismatchError.desc)},BrowserAuthError.createInteractionInProgressError=function(){return new BrowserAuthError(cm.interactionInProgress.code,cm.interactionInProgress.desc)},BrowserAuthError.createPopupWindowError=function(e){var t=cm.popupWindowError.desc;return t=cf.x.isEmpty(e)?t:t+" Details: "+e,new BrowserAuthError(cm.popupWindowError.code,t)},BrowserAuthError.createEmptyWindowCreatedError=function(){return new BrowserAuthError(cm.emptyWindowError.code,cm.emptyWindowError.desc)},BrowserAuthError.createUserCancelledError=function(){return new BrowserAuthError(cm.userCancelledError.code,cm.userCancelledError.desc)},BrowserAuthError.createMonitorPopupTimeoutError=function(){return new BrowserAuthError(cm.monitorPopupTimeoutError.code,cm.monitorPopupTimeoutError.desc)},BrowserAuthError.createMonitorIframeTimeoutError=function(){return new BrowserAuthError(cm.monitorIframeTimeoutError.code,cm.monitorIframeTimeoutError.desc)},BrowserAuthError.createRedirectInIframeError=function(e){return new BrowserAuthError(cm.redirectInIframeError.code,cm.redirectInIframeError.desc+" (window.parent !== window) => "+e)},BrowserAuthError.createBlockReloadInHiddenIframeError=function(){return new BrowserAuthError(cm.blockTokenRequestsInHiddenIframeError.code,cm.blockTokenRequestsInHiddenIframeError.desc)},BrowserAuthError.createBlockAcquireTokenInPopupsError=function(){return new BrowserAuthError(cm.blockAcquireTokenInPopupsError.code,cm.blockAcquireTokenInPopupsError.desc)},BrowserAuthError.createIframeClosedPrematurelyError=function(){return new BrowserAuthError(cm.iframeClosedPrematurelyError.code,cm.iframeClosedPrematurelyError.desc)},BrowserAuthError.createSilentLogoutUnsupportedError=function(){return new BrowserAuthError(cm.silentLogoutUnsupportedError.code,cm.silentLogoutUnsupportedError.desc)},BrowserAuthError.createNoAccountError=function(){return new BrowserAuthError(cm.noAccountError.code,cm.noAccountError.desc)},BrowserAuthError.createSilentPromptValueError=function(e){return new BrowserAuthError(cm.silentPromptValueError.code,cm.silentPromptValueError.desc+" Given value: "+e)},BrowserAuthError.createUnableToParseTokenRequestCacheError=function(){return new BrowserAuthError(cm.unableToParseTokenRequestCacheError.code,cm.unableToParseTokenRequestCacheError.desc)},BrowserAuthError.createNoTokenRequestCacheError=function(){return new BrowserAuthError(cm.noTokenRequestCacheError.code,cm.noTokenRequestCacheError.desc)},BrowserAuthError.createAuthRequestNotSetError=function(){return new BrowserAuthError(cm.authRequestNotSet.code,cm.authRequestNotSet.desc)},BrowserAuthError.createNoCachedAuthorityError=function(){return new BrowserAuthError(cm.noCachedAuthorityError.code,cm.noCachedAuthorityError.desc)},BrowserAuthError.createInvalidCacheTypeError=function(){return new BrowserAuthError(cm.invalidCacheType.code,""+cm.invalidCacheType.desc)},BrowserAuthError.createNonBrowserEnvironmentError=function(){return new BrowserAuthError(cm.notInBrowserEnvironment.code,cm.notInBrowserEnvironment.desc)},BrowserAuthError.createDatabaseNotOpenError=function(){return new BrowserAuthError(cm.databaseNotOpen.code,cm.databaseNotOpen.desc)},BrowserAuthError.createNoNetworkConnectivityError=function(){return new BrowserAuthError(cm.noNetworkConnectivity.code,cm.noNetworkConnectivity.desc)},BrowserAuthError.createPostRequestFailedError=function(e,t){return new BrowserAuthError(cm.postRequestFailed.code,cm.postRequestFailed.desc+" | Network client threw: "+e+" | Attempted to reach: "+t.split("?")[0])},BrowserAuthError.createGetRequestFailedError=function(e,t){return new BrowserAuthError(cm.getRequestFailed.code,cm.getRequestFailed.desc+" | Network client threw: "+e+" | Attempted to reach: "+t.split("?")[0])},BrowserAuthError.createFailedToParseNetworkResponseError=function(e){return new BrowserAuthError(cm.failedToParseNetworkResponse.code,cm.failedToParseNetworkResponse.desc+" | Attempted to reach: "+e.split("?")[0])},BrowserAuthError.createUnableToLoadTokenError=function(e){return new BrowserAuthError(cm.unableToLoadTokenError.code,cm.unableToLoadTokenError.desc+" | "+e)},BrowserAuthError.createSigningKeyNotFoundInStorageError=function(e){return new BrowserAuthError(cm.signingKeyNotFoundInStorage.code,cm.signingKeyNotFoundInStorage.desc+" | No match found for KeyId: "+e)},BrowserAuthError.createAuthCodeRequiredError=function(){return new BrowserAuthError(cm.authCodeRequired.code,cm.authCodeRequired.desc)},BrowserAuthError.createAuthCodeOrNativeAccountIdRequiredError=function(){return new BrowserAuthError(cm.authCodeOrNativeAccountRequired.code,cm.authCodeOrNativeAccountRequired.desc)},BrowserAuthError.createSpaCodeAndNativeAccountIdPresentError=function(){return new BrowserAuthError(cm.spaCodeAndNativeAccountPresent.code,cm.spaCodeAndNativeAccountPresent.desc)},BrowserAuthError.createDatabaseUnavailableError=function(){return new BrowserAuthError(cm.databaseUnavailable.code,cm.databaseUnavailable.desc)},BrowserAuthError.createUnableToAcquireTokenFromNativePlatformError=function(){return new BrowserAuthError(cm.unableToAcquireTokenFromNativePlatform.code,cm.unableToAcquireTokenFromNativePlatform.desc)},BrowserAuthError.createNativeHandshakeTimeoutError=function(){return new BrowserAuthError(cm.nativeHandshakeTimeout.code,cm.nativeHandshakeTimeout.desc)},BrowserAuthError.createNativeExtensionNotInstalledError=function(){return new BrowserAuthError(cm.nativeExtensionNotInstalled.code,cm.nativeExtensionNotInstalled.desc)},BrowserAuthError.createNativeConnectionNotEstablishedError=function(){return new BrowserAuthError(cm.nativeConnectionNotEstablished.code,cm.nativeConnectionNotEstablished.desc)},BrowserAuthError.createNativeBrokerCalledBeforeInitialize=function(){return new BrowserAuthError(cm.nativeBrokerCalledBeforeInitialize.code,cm.nativeBrokerCalledBeforeInitialize.desc)},BrowserAuthError.createNativePromptParameterNotSupportedError=function(){return new BrowserAuthError(cm.nativePromptNotSupported.code,cm.nativePromptNotSupported.desc)},BrowserAuthError}(s7.l),cy=function(){function PkceGenerator(e){this.base64Encode=new ch,this.cryptoObj=e}return PkceGenerator.prototype.generateCodes=function(){return(0,s5.mG)(this,void 0,void 0,function(){var e,t;return(0,s5.Jh)(this,function(n){switch(n.label){case 0:return e=this.generateCodeVerifier(),[4,this.generateCodeChallengeFromVerifier(e)];case 1:return t=n.sent(),[2,{verifier:e,challenge:t}]}})})},PkceGenerator.prototype.generateCodeVerifier=function(){try{var e=new Uint8Array(32);return this.cryptoObj.getRandomValues(e),this.base64Encode.urlEncodeArr(e)}catch(e){throw cg.createPkceNotGeneratedError(e)}},PkceGenerator.prototype.generateCodeChallengeFromVerifier=function(e){return(0,s5.mG)(this,void 0,void 0,function(){var t,n;return(0,s5.Jh)(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,this.cryptoObj.sha256Digest(e)];case 1:return t=o.sent(),[2,this.base64Encode.urlEncodeArr(new Uint8Array(t))];case 2:throw n=o.sent(),cg.createPkceNotGeneratedError(n);case 3:return[2]}})})},PkceGenerator}(),cv=function(){function ModernBrowserCrypto(){}return ModernBrowserCrypto.prototype.getRandomValues=function(e){return window.crypto.getRandomValues(e)},ModernBrowserCrypto.prototype.generateKey=function(e,t,n){return(0,s5.mG)(this,void 0,void 0,function(){return(0,s5.Jh)(this,function(o){return[2,window.crypto.subtle.generateKey(e,t,n)]})})},ModernBrowserCrypto.prototype.exportKey=function(e){return(0,s5.mG)(this,void 0,void 0,function(){return(0,s5.Jh)(this,function(t){return[2,window.crypto.subtle.exportKey(ci.Mm,e)]})})},ModernBrowserCrypto.prototype.importKey=function(e,t,n,o){return(0,s5.mG)(this,void 0,void 0,function(){return(0,s5.Jh)(this,function(a){return[2,window.crypto.subtle.importKey(ci.Mm,e,t,n,o)]})})},ModernBrowserCrypto.prototype.sign=function(e,t,n){return(0,s5.mG)(this,void 0,void 0,function(){return(0,s5.Jh)(this,function(o){return[2,window.crypto.subtle.sign(e,t,n)]})})},ModernBrowserCrypto.prototype.digest=function(e,t){return(0,s5.mG)(this,void 0,void 0,function(){return(0,s5.Jh)(this,function(n){return[2,window.crypto.subtle.digest(e,t)]})})},ModernBrowserCrypto}(),cb=function(){function MsrBrowserCrypto(){}return MsrBrowserCrypto.prototype.initPrng=function(e){return window.msrCrypto.initPrng((0,s5.fl)(e))},MsrBrowserCrypto.prototype.getRandomValues=function(e){return window.msrCrypto.getRandomValues(e)},MsrBrowserCrypto.prototype.generateKey=function(e,t,n){return(0,s5.mG)(this,void 0,void 0,function(){return(0,s5.Jh)(this,function(o){return[2,window.msrCrypto.subtle.generateKey(e,t,n)]})})},MsrBrowserCrypto.prototype.exportKey=function(e){return(0,s5.mG)(this,void 0,void 0,function(){return(0,s5.Jh)(this,function(t){return[2,window.msrCrypto.subtle.exportKey(ci.Mm,e)]})})},MsrBrowserCrypto.prototype.importKey=function(e,t,n,o){return(0,s5.mG)(this,void 0,void 0,function(){return(0,s5.Jh)(this,function(a){return[2,window.msrCrypto.subtle.importKey(ci.Mm,e,t,n,o)]})})},MsrBrowserCrypto.prototype.sign=function(e,t,n){return(0,s5.mG)(this,void 0,void 0,function(){return(0,s5.Jh)(this,function(o){return[2,window.msrCrypto.subtle.sign(e,t,n)]})})},MsrBrowserCrypto.prototype.digest=function(e,t){return(0,s5.mG)(this,void 0,void 0,function(){return(0,s5.Jh)(this,function(n){return[2,window.msrCrypto.subtle.digest(e,t)]})})},MsrBrowserCrypto}(),cC=function(){function MsBrowserCrypto(){}return MsBrowserCrypto.prototype.getRandomValues=function(e){return window.msCrypto.getRandomValues(e)},MsBrowserCrypto.prototype.generateKey=function(e,t,n){return(0,s5.mG)(this,void 0,void 0,function(){return(0,s5.Jh)(this,function(o){return[2,new Promise(function(o,a){var s=window.msCrypto.subtle.generateKey(e,t,n);s.addEventListener("complete",function(e){o(e.target.result)}),s.addEventListener("error",function(e){a(e)})})]})})},MsBrowserCrypto.prototype.exportKey=function(e){return(0,s5.mG)(this,void 0,void 0,function(){return(0,s5.Jh)(this,function(t){return[2,new Promise(function(t,n){var o=window.msCrypto.subtle.exportKey(ci.Mm,e);o.addEventListener("complete",function(e){var o=e.target.result,a=cd.utf8ArrToString(new Uint8Array(o)).replace(/\r/g,s8.gT.EMPTY_STRING).replace(/\n/g,s8.gT.EMPTY_STRING).replace(/\t/g,s8.gT.EMPTY_STRING).split(" ").join(s8.gT.EMPTY_STRING).replace("\x00",s8.gT.EMPTY_STRING);try{t(JSON.parse(a))}catch(e){n(e)}}),o.addEventListener("error",function(e){n(e)})})]})})},MsBrowserCrypto.prototype.importKey=function(e,t,n,o){return(0,s5.mG)(this,void 0,void 0,function(){var a,s;return(0,s5.Jh)(this,function(c){return a=cd.getSortedObjectString(e),s=cd.stringToArrayBuffer(a),[2,new Promise(function(e,a){var c=window.msCrypto.subtle.importKey(ci.Mm,s,t,n,o);c.addEventListener("complete",function(t){e(t.target.result)}),c.addEventListener("error",function(e){a(e)})})]})})},MsBrowserCrypto.prototype.sign=function(e,t,n){return(0,s5.mG)(this,void 0,void 0,function(){return(0,s5.Jh)(this,function(o){return[2,new Promise(function(o,a){var s=window.msCrypto.subtle.sign(e,t,n);s.addEventListener("complete",function(e){o(e.target.result)}),s.addEventListener("error",function(e){a(e)})})]})})},MsBrowserCrypto.prototype.digest=function(e,t){return(0,s5.mG)(this,void 0,void 0,function(){return(0,s5.Jh)(this,function(n){return[2,new Promise(function(n,o){var a=window.msCrypto.subtle.digest(e,t.buffer);a.addEventListener("complete",function(e){n(e.target.result)}),a.addEventListener("error",function(e){o(e)})})]})})},MsBrowserCrypto}(),c_=n(6832),cw="SHA-256",cS=new Uint8Array([1,0,1]),cE=function(){function BrowserCrypto(e,t){var n,o;if(this.logger=e,this.cryptoOptions=t,this.hasBrowserCrypto())this.logger.verbose("BrowserCrypto: modern crypto interface available"),this.subtleCrypto=new cv;else if(this.hasIECrypto())this.logger.verbose("BrowserCrypto: MS crypto interface available"),this.subtleCrypto=new cC;else if(this.hasMsrCrypto()&&(null===(n=this.cryptoOptions)||void 0===n?void 0:n.useMsrCrypto))this.logger.verbose("BrowserCrypto: MSR crypto interface available"),this.subtleCrypto=new cb;else throw this.hasMsrCrypto()&&this.logger.info("BrowserCrypto: MSR Crypto interface available but system.cryptoOptions.useMsrCrypto not enabled"),this.logger.error("BrowserCrypto: No crypto interfaces available."),cg.createCryptoNotAvailableError("Browser crypto, msCrypto, or msrCrypto interfaces not available.");if(this.subtleCrypto.initPrng){if(this.logger.verbose("BrowserCrypto: Interface requires entropy"),!(null===(o=this.cryptoOptions)||void 0===o?void 0:o.entropy))throw this.logger.error("BrowserCrypto: Interface requires entropy but none provided."),c_.W.createEntropyNotProvided();this.logger.verbose("BrowserCrypto: Entropy provided"),this.subtleCrypto.initPrng(this.cryptoOptions.entropy)}this.keygenAlgorithmOptions={name:"RSASSA-PKCS1-v1_5",hash:cw,modulusLength:2048,publicExponent:cS}}return BrowserCrypto.prototype.hasIECrypto=function(){return"msCrypto"in window},BrowserCrypto.prototype.hasBrowserCrypto=function(){return"crypto"in window},BrowserCrypto.prototype.hasMsrCrypto=function(){return"msrCrypto"in window},BrowserCrypto.prototype.sha256Digest=function(e){return(0,s5.mG)(this,void 0,void 0,function(){var t;return(0,s5.Jh)(this,function(n){return t=cd.stringToUtf8Arr(e),[2,this.subtleCrypto.digest({name:cw},t)]})})},BrowserCrypto.prototype.getRandomValues=function(e){return this.subtleCrypto.getRandomValues(e)},BrowserCrypto.prototype.generateKeyPair=function(e,t){return(0,s5.mG)(this,void 0,void 0,function(){return(0,s5.Jh)(this,function(n){return[2,this.subtleCrypto.generateKey(this.keygenAlgorithmOptions,e,t)]})})},BrowserCrypto.prototype.exportJwk=function(e){return(0,s5.mG)(this,void 0,void 0,function(){return(0,s5.Jh)(this,function(t){return[2,this.subtleCrypto.exportKey(e)]})})},BrowserCrypto.prototype.importJwk=function(e,t,n){return(0,s5.mG)(this,void 0,void 0,function(){return(0,s5.Jh)(this,function(o){return[2,this.subtleCrypto.importKey(e,this.keygenAlgorithmOptions,t,n)]})})},BrowserCrypto.prototype.sign=function(e,t){return(0,s5.mG)(this,void 0,void 0,function(){return(0,s5.Jh)(this,function(n){return[2,this.subtleCrypto.sign(this.keygenAlgorithmOptions,e,t)]})})},BrowserCrypto}(),cT=function(){function DatabaseStorage(){this.dbName=ci.H4,this.version=ci.kd,this.tableName=ci.Gv,this.dbOpen=!1}return DatabaseStorage.prototype.open=function(){return(0,s5.mG)(this,void 0,void 0,function(){var e=this;return(0,s5.Jh)(this,function(t){return[2,new Promise(function(t,n){var o=window.indexedDB.open(e.dbName,e.version);o.addEventListener("upgradeneeded",function(t){t.target.result.createObjectStore(e.tableName)}),o.addEventListener("success",function(n){e.db=n.target.result,e.dbOpen=!0,t()}),o.addEventListener("error",function(){return n(cg.createDatabaseUnavailableError())})})]})})},DatabaseStorage.prototype.closeConnection=function(){var e=this.db;e&&this.dbOpen&&(e.close(),this.dbOpen=!1)},DatabaseStorage.prototype.validateDbIsOpen=function(){return(0,s5.mG)(this,void 0,void 0,function(){return(0,s5.Jh)(this,function(e){switch(e.label){case 0:if(this.dbOpen)return[3,2];return[4,this.open()];case 1:return[2,e.sent()];case 2:return[2]}})})},DatabaseStorage.prototype.getItem=function(e){return(0,s5.mG)(this,void 0,void 0,function(){var t=this;return(0,s5.Jh)(this,function(n){switch(n.label){case 0:return[4,this.validateDbIsOpen()];case 1:return n.sent(),[2,new Promise(function(n,o){if(!t.db)return o(cg.createDatabaseNotOpenError());var a=t.db.transaction([t.tableName],"readonly").objectStore(t.tableName).get(e);a.addEventListener("success",function(e){t.closeConnection(),n(e.target.result)}),a.addEventListener("error",function(e){t.closeConnection(),o(e)})})]}})})},DatabaseStorage.prototype.setItem=function(e,t){return(0,s5.mG)(this,void 0,void 0,function(){var n=this;return(0,s5.Jh)(this,function(o){switch(o.label){case 0:return[4,this.validateDbIsOpen()];case 1:return o.sent(),[2,new Promise(function(o,a){if(!n.db)return a(cg.createDatabaseNotOpenError());var s=n.db.transaction([n.tableName],"readwrite").objectStore(n.tableName).put(t,e);s.addEventListener("success",function(){n.closeConnection(),o()}),s.addEventListener("error",function(e){n.closeConnection(),a(e)})})]}})})},DatabaseStorage.prototype.removeItem=function(e){return(0,s5.mG)(this,void 0,void 0,function(){var t=this;return(0,s5.Jh)(this,function(n){switch(n.label){case 0:return[4,this.validateDbIsOpen()];case 1:return n.sent(),[2,new Promise(function(n,o){if(!t.db)return o(cg.createDatabaseNotOpenError());var a=t.db.transaction([t.tableName],"readwrite").objectStore(t.tableName).delete(e);a.addEventListener("success",function(){t.closeConnection(),n()}),a.addEventListener("error",function(e){t.closeConnection(),o(e)})})]}})})},DatabaseStorage.prototype.getKeys=function(){return(0,s5.mG)(this,void 0,void 0,function(){var e=this;return(0,s5.Jh)(this,function(t){switch(t.label){case 0:return[4,this.validateDbIsOpen()];case 1:return t.sent(),[2,new Promise(function(t,n){if(!e.db)return n(cg.createDatabaseNotOpenError());var o=e.db.transaction([e.tableName],"readonly").objectStore(e.tableName).getAllKeys();o.addEventListener("success",function(n){e.closeConnection(),t(n.target.result)}),o.addEventListener("error",function(t){e.closeConnection(),n(t)})})]}})})},DatabaseStorage.prototype.containsKey=function(e){return(0,s5.mG)(this,void 0,void 0,function(){var t=this;return(0,s5.Jh)(this,function(n){switch(n.label){case 0:return[4,this.validateDbIsOpen()];case 1:return n.sent(),[2,new Promise(function(n,o){if(!t.db)return o(cg.createDatabaseNotOpenError());var a=t.db.transaction([t.tableName],"readonly").objectStore(t.tableName).count(e);a.addEventListener("success",function(e){t.closeConnection(),n(1===e.target.result)}),a.addEventListener("error",function(e){t.closeConnection(),o(e)})})]}})})},DatabaseStorage.prototype.deleteDatabase=function(){return(0,s5.mG)(this,void 0,void 0,function(){return(0,s5.Jh)(this,function(e){return this.db&&this.dbOpen&&this.closeConnection(),[2,new Promise(function(e,t){var n=window.indexedDB.deleteDatabase(ci.H4);n.addEventListener("success",function(){return e(!0)}),n.addEventListener("blocked",function(){return e(!0)}),n.addEventListener("error",function(){return t(!1)})})]})})},DatabaseStorage}(),ck=function(){function MemoryStorage(){this.cache=new Map}return MemoryStorage.prototype.getItem=function(e){return this.cache.get(e)||null},MemoryStorage.prototype.setItem=function(e,t){this.cache.set(e,t)},MemoryStorage.prototype.removeItem=function(e){this.cache.delete(e)},MemoryStorage.prototype.getKeys=function(){var e=[];return this.cache.forEach(function(t,n){e.push(n)}),e},MemoryStorage.prototype.containsKey=function(e){return this.cache.has(e)},MemoryStorage.prototype.clear=function(){this.cache.clear()},MemoryStorage}(),cA=function(){function AsyncMemoryStorage(e,t){this.inMemoryCache=new ck,this.indexedDBCache=new cT,this.logger=e,this.storeName=t}return AsyncMemoryStorage.prototype.handleDatabaseAccessError=function(e){if(e instanceof cg&&e.errorCode===cm.databaseUnavailable.code)this.logger.error("Could not access persistent storage. This may be caused by browser privacy features which block persistent storage in third-party contexts.");else throw e},AsyncMemoryStorage.prototype.getItem=function(e){return(0,s5.mG)(this,void 0,void 0,function(){var t,n;return(0,s5.Jh)(this,function(o){switch(o.label){case 0:if(t=this.inMemoryCache.getItem(e))return[3,4];o.label=1;case 1:return o.trys.push([1,3,,4]),this.logger.verbose("Queried item not found in in-memory cache, now querying persistent storage."),[4,this.indexedDBCache.getItem(e)];case 2:return[2,o.sent()];case 3:return n=o.sent(),this.handleDatabaseAccessError(n),[3,4];case 4:return[2,t]}})})},AsyncMemoryStorage.prototype.setItem=function(e,t){return(0,s5.mG)(this,void 0,void 0,function(){var n;return(0,s5.Jh)(this,function(o){switch(o.label){case 0:this.inMemoryCache.setItem(e,t),o.label=1;case 1:return o.trys.push([1,3,,4]),[4,this.indexedDBCache.setItem(e,t)];case 2:return o.sent(),[3,4];case 3:return n=o.sent(),this.handleDatabaseAccessError(n),[3,4];case 4:return[2]}})})},AsyncMemoryStorage.prototype.removeItem=function(e){return(0,s5.mG)(this,void 0,void 0,function(){var t;return(0,s5.Jh)(this,function(n){switch(n.label){case 0:this.inMemoryCache.removeItem(e),n.label=1;case 1:return n.trys.push([1,3,,4]),[4,this.indexedDBCache.removeItem(e)];case 2:return n.sent(),[3,4];case 3:return t=n.sent(),this.handleDatabaseAccessError(t),[3,4];case 4:return[2]}})})},AsyncMemoryStorage.prototype.getKeys=function(){return(0,s5.mG)(this,void 0,void 0,function(){var e,t;return(0,s5.Jh)(this,function(n){switch(n.label){case 0:if(0!==(e=this.inMemoryCache.getKeys()).length)return[3,4];n.label=1;case 1:return n.trys.push([1,3,,4]),this.logger.verbose("In-memory cache is empty, now querying persistent storage."),[4,this.indexedDBCache.getKeys()];case 2:return[2,n.sent()];case 3:return t=n.sent(),this.handleDatabaseAccessError(t),[3,4];case 4:return[2,e]}})})},AsyncMemoryStorage.prototype.containsKey=function(e){return(0,s5.mG)(this,void 0,void 0,function(){var t,n;return(0,s5.Jh)(this,function(o){switch(o.label){case 0:if(t=this.inMemoryCache.containsKey(e))return[3,4];o.label=1;case 1:return o.trys.push([1,3,,4]),this.logger.verbose("Key not found in in-memory cache, now querying persistent storage."),[4,this.indexedDBCache.containsKey(e)];case 2:return[2,o.sent()];case 3:return n=o.sent(),this.handleDatabaseAccessError(n),[3,4];case 4:return[2,t]}})})},AsyncMemoryStorage.prototype.clearInMemory=function(){this.logger.verbose("Deleting in-memory keystore "+this.storeName),this.inMemoryCache.clear(),this.logger.verbose("In-memory keystore "+this.storeName+" deleted")},AsyncMemoryStorage.prototype.clearPersistent=function(){return(0,s5.mG)(this,void 0,void 0,function(){var e,t;return(0,s5.Jh)(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),this.logger.verbose("Deleting persistent keystore"),[4,this.indexedDBCache.deleteDatabase()];case 1:return(e=n.sent())&&this.logger.verbose("Persistent keystore deleted"),[2,e];case 2:return t=n.sent(),this.handleDatabaseAccessError(t),[2,!1];case 3:return[2]}})})},AsyncMemoryStorage}();(u=E||(E={})).asymmetricKeys="asymmetricKeys",u.symmetricKeys="symmetricKeys";var cI=function(){function CryptoKeyStore(e){this.logger=e,this.asymmetricKeys=new cA(this.logger,E.asymmetricKeys),this.symmetricKeys=new cA(this.logger,E.symmetricKeys)}return CryptoKeyStore.prototype.clear=function(){return(0,s5.mG)(this,void 0,void 0,function(){var e;return(0,s5.Jh)(this,function(t){switch(t.label){case 0:this.asymmetricKeys.clearInMemory(),this.symmetricKeys.clearInMemory(),t.label=1;case 1:return t.trys.push([1,3,,4]),[4,this.asymmetricKeys.clearPersistent()];case 2:return t.sent(),[2,!0];case 3:return(e=t.sent())instanceof Error?this.logger.error("Clearing keystore failed with error: "+e.message):this.logger.error("Clearing keystore failed with unknown error"),[2,!1];case 4:return[2]}})})},CryptoKeyStore}(),cR=function(){function CryptoOps(e,t,n){this.logger=e,this.browserCrypto=new cE(this.logger,n),this.b64Encode=new ch,this.b64Decode=new cp,this.guidGenerator=new cu(this.browserCrypto),this.pkceGenerator=new cy(this.browserCrypto),this.cache=new cI(this.logger),this.performanceClient=t}return CryptoOps.prototype.createNewGuid=function(){return this.guidGenerator.generateGuid()},CryptoOps.prototype.base64Encode=function(e){return this.b64Encode.encode(e)},CryptoOps.prototype.base64Decode=function(e){return this.b64Decode.decode(e)},CryptoOps.prototype.generatePkceCodes=function(){return(0,s5.mG)(this,void 0,void 0,function(){return(0,s5.Jh)(this,function(e){return[2,this.pkceGenerator.generateCodes()]})})},CryptoOps.prototype.getPublicKeyThumbprint=function(e){var t;return(0,s5.mG)(this,void 0,void 0,function(){var n,o,a,s,c,l,u,h;return(0,s5.Jh)(this,function(p){switch(p.label){case 0:return n=null===(t=this.performanceClient)||void 0===t?void 0:t.startMeasurement(w.CryptoOptsGetPublicKeyThumbprint,e.correlationId),[4,this.browserCrypto.generateKeyPair(CryptoOps.EXTRACTABLE,CryptoOps.POP_KEY_USAGES)];case 1:return o=p.sent(),[4,this.browserCrypto.exportJwk(o.publicKey)];case 2:return s={e:(a=p.sent()).e,kty:a.kty,n:a.n},c=cd.getSortedObjectString(s),[4,this.hashString(c)];case 3:return l=p.sent(),[4,this.browserCrypto.exportJwk(o.privateKey)];case 4:return u=p.sent(),[4,this.browserCrypto.importJwk(u,!1,["sign"])];case 5:return h=p.sent(),[4,this.cache.asymmetricKeys.setItem(l,{privateKey:h,publicKey:o.publicKey,requestMethod:e.resourceRequestMethod,requestUri:e.resourceRequestUri})];case 6:return p.sent(),n&&n.endMeasurement({success:!0}),[2,l]}})})},CryptoOps.prototype.removeTokenBindingKey=function(e){return(0,s5.mG)(this,void 0,void 0,function(){return(0,s5.Jh)(this,function(t){switch(t.label){case 0:return[4,this.cache.asymmetricKeys.removeItem(e)];case 1:return t.sent(),[4,this.cache.asymmetricKeys.containsKey(e)];case 2:return[2,!t.sent()]}})})},CryptoOps.prototype.clearKeystore=function(){return(0,s5.mG)(this,void 0,void 0,function(){return(0,s5.Jh)(this,function(e){switch(e.label){case 0:return[4,this.cache.clear()];case 1:return[2,e.sent()]}})})},CryptoOps.prototype.signJwt=function(e,t,n){var o;return(0,s5.mG)(this,void 0,void 0,function(){var a,s,c,l,u,h,p,f,m,g,y,v;return(0,s5.Jh)(this,function(b){switch(b.label){case 0:return a=null===(o=this.performanceClient)||void 0===o?void 0:o.startMeasurement(w.CryptoOptsSignJwt,n),[4,this.cache.asymmetricKeys.getItem(t)];case 1:if(!(s=b.sent()))throw cg.createSigningKeyNotFoundInStorageError(t);return[4,this.browserCrypto.exportJwk(s.publicKey)];case 2:return c=b.sent(),l=cd.getSortedObjectString(c),u=this.b64Encode.urlEncode(JSON.stringify({kid:t})),h=cc.getShrHeaderString({kid:u,alg:c.alg}),p=this.b64Encode.urlEncode(h),e.cnf={jwk:JSON.parse(l)},f=p+"."+this.b64Encode.urlEncode(JSON.stringify(e)),m=cd.stringToArrayBuffer(f),[4,this.browserCrypto.sign(s.privateKey,m)];case 3:return g=b.sent(),y=this.b64Encode.urlEncodeArr(new Uint8Array(g)),v=f+"."+y,a&&a.endMeasurement({success:!0}),[2,v]}})})},CryptoOps.prototype.hashString=function(e){return(0,s5.mG)(this,void 0,void 0,function(){var t,n;return(0,s5.Jh)(this,function(o){switch(o.label){case 0:return[4,this.browserCrypto.sha256Digest(e)];case 1:return t=o.sent(),n=new Uint8Array(t),[2,this.b64Encode.urlEncodeArr(n)]}})})},CryptoOps.POP_KEY_USAGES=["sign","verify"],CryptoOps.EXTRACTABLE=!0,CryptoOps}(),cP=n(6823),cM=function(){function PerformanceClient(e,t,n,o,a,s){this.authority=t,this.libraryName=o,this.libraryVersion=a,this.applicationTelemetry=s,this.clientId=e,this.logger=n,this.callbacks=new Map,this.eventsByCorrelationId=new Map,this.queueMeasurements=new Map,this.preQueueTimeByCorrelationId=new Map}return PerformanceClient.prototype.startPerformanceMeasurement=function(e,t){return{}},PerformanceClient.prototype.startPerformanceMeasuremeant=function(e,t){return{}},PerformanceClient.prototype.getIntFields=function(){return s6},PerformanceClient.prototype.getPreQueueTime=function(e,t){var n=this.preQueueTimeByCorrelationId.get(t);if(n){if(n.name!==e){this.logger.trace("PerformanceClient.getPreQueueTime: no pre-queue time found for "+e+", unable to add queue measurement");return}}else{this.logger.trace("PerformanceClient.getPreQueueTime: no pre-queue times found for correlationId: "+t+", unable to add queue measurement");return}return n.time},PerformanceClient.prototype.calculateQueuedTime=function(e,t){return e<1?(this.logger.trace("PerformanceClient: preQueueTime should be a positive integer and not "+e),0):t<1?(this.logger.trace("PerformanceClient: currentTime should be a positive integer and not "+t),0):t<e?(this.logger.trace("PerformanceClient: currentTime is less than preQueueTime, check how time is being retrieved"),0):t-e},PerformanceClient.prototype.addQueueMeasurement=function(e,t,n,o){if(!t){this.logger.trace("PerformanceClient.addQueueMeasurement: correlationId not provided for "+e+", cannot add queue measurement");return}if(0===n)this.logger.trace("PerformanceClient.addQueueMeasurement: queue time provided for "+e+" is "+n);else if(!n){this.logger.trace("PerformanceClient.addQueueMeasurement: no queue time provided for "+e);return}var a={eventName:e,queueTime:n,manuallyCompleted:o},s=this.queueMeasurements.get(t);if(s)s.push(a),this.queueMeasurements.set(t,s);else{this.logger.trace("PerformanceClient.addQueueMeasurement: adding correlationId "+t+" to queue measurements");var c=[a];this.queueMeasurements.set(t,c)}this.preQueueTimeByCorrelationId.delete(t)},PerformanceClient.prototype.startMeasurement=function(e,t){var n,o,a=this,s=t||this.generateId();t||this.logger.info("PerformanceClient: No correlation id provided for "+e+", generating",s),this.logger.trace("PerformanceClient: Performance measurement started for "+e,s);var c=this.startPerformanceMeasuremeant(e,s);c.startMeasurement();var l={eventId:this.generateId(),status:S.InProgress,authority:this.authority,libraryName:this.libraryName,libraryVersion:this.libraryVersion,clientId:this.clientId,name:e,startTimeMs:Date.now(),correlationId:s,appName:null===(n=this.applicationTelemetry)||void 0===n?void 0:n.appName,appVersion:null===(o=this.applicationTelemetry)||void 0===o?void 0:o.appVersion};return this.cacheEventByCorrelationId(l),{endMeasurement:function(e){return a.endMeasurement((0,s9.pi)((0,s9.pi)({},l),e),c)},discardMeasurement:function(){return a.discardMeasurements(l.correlationId)},addStaticFields:function(e){return a.addStaticFields(e,l.correlationId)},increment:function(e){return a.increment(e,l.correlationId)},measurement:c,event:l}},PerformanceClient.prototype.endMeasurement=function(e,t){var n,o,a=this,s=this.eventsByCorrelationId.get(e.correlationId);if(!s)return this.logger.trace("PerformanceClient: Measurement not found for "+e.eventId,e.correlationId),null;var c=e.eventId===s.eventId,l={totalQueueTime:0,totalQueueCount:0,manuallyCompletedCount:0};c?(l=this.getQueueInfo(e.correlationId),this.discardCache(s.correlationId)):null===(n=s.incompleteSubMeasurements)||void 0===n||n.delete(e.eventId),null==t||t.endMeasurement();var u=null==t?void 0:t.flushMeasurement();if(!u)return this.logger.trace("PerformanceClient: Performance measurement not taken",s.correlationId),null;if(this.logger.trace("PerformanceClient: Performance measurement ended for "+e.name+": "+u+" ms",e.correlationId),!c)return s[e.name+"DurationMs"]=Math.floor(u),(0,s9.pi)({},s);var h=(0,s9.pi)((0,s9.pi)({},s),e),p=0;return null===(o=h.incompleteSubMeasurements)||void 0===o||o.forEach(function(t){a.logger.trace("PerformanceClient: Incomplete submeasurement "+t.name+" found for "+e.name,h.correlationId),p++}),h.incompleteSubMeasurements=void 0,h=(0,s9.pi)((0,s9.pi)({},h),{durationMs:Math.round(u),queuedTimeMs:l.totalQueueTime,queuedCount:l.totalQueueCount,queuedManuallyCompletedCount:l.manuallyCompletedCount,status:S.Completed,incompleteSubsCount:p}),this.truncateIntegralFields(h,this.getIntFields()),this.emitEvents([h],e.correlationId),h},PerformanceClient.prototype.addStaticFields=function(e,t){this.logger.trace("PerformanceClient: Updating static fields");var n=this.eventsByCorrelationId.get(t);n?this.eventsByCorrelationId.set(t,(0,s9.pi)((0,s9.pi)({},n),e)):this.logger.trace("PerformanceClient: Event not found for",t)},PerformanceClient.prototype.increment=function(e,t){this.logger.trace("PerformanceClient: Updating counters");var n=this.eventsByCorrelationId.get(t);if(n)for(var o in e)n.hasOwnProperty(o)||(n[o]=0),n[o]+=e[o];else this.logger.trace("PerformanceClient: Event not found for",t)},PerformanceClient.prototype.cacheEventByCorrelationId=function(e){var t=this.eventsByCorrelationId.get(e.correlationId);t?(this.logger.trace("PerformanceClient: Performance measurement for "+e.name+" added/updated",e.correlationId),t.incompleteSubMeasurements=t.incompleteSubMeasurements||new Map,t.incompleteSubMeasurements.set(e.eventId,{name:e.name,startTimeMs:e.startTimeMs})):(this.logger.trace("PerformanceClient: Performance measurement for "+e.name+" started",e.correlationId),this.eventsByCorrelationId.set(e.correlationId,(0,s9.pi)({},e)))},PerformanceClient.prototype.getQueueInfo=function(e){var t=this.queueMeasurements.get(e);t||this.logger.trace("PerformanceClient: no queue measurements found for for correlationId: "+e);var n=0,o=0,a=0;return null==t||t.forEach(function(e){n+=e.queueTime,o++,a+=e.manuallyCompleted?1:0}),{totalQueueTime:n,totalQueueCount:o,manuallyCompletedCount:a}},PerformanceClient.prototype.discardMeasurements=function(e){this.logger.trace("PerformanceClient: Performance measurements discarded",e),this.eventsByCorrelationId.delete(e)},PerformanceClient.prototype.discardCache=function(e){this.discardMeasurements(e),this.logger.trace("PerformanceClient: QueueMeasurements discarded",e),this.queueMeasurements.delete(e),this.logger.trace("PerformanceClient: Pre-queue times discarded",e),this.preQueueTimeByCorrelationId.delete(e)},PerformanceClient.prototype.addPerformanceCallback=function(e){var t=this.generateId();return this.callbacks.set(t,e),this.logger.verbose("PerformanceClient: Performance callback registered with id: "+t),t},PerformanceClient.prototype.removePerformanceCallback=function(e){var t=this.callbacks.delete(e);return t?this.logger.verbose("PerformanceClient: Performance callback "+e+" removed."):this.logger.verbose("PerformanceClient: Performance callback "+e+" not removed."),t},PerformanceClient.prototype.emitEvents=function(e,t){var n=this;this.logger.verbose("PerformanceClient: Emitting performance events",t),this.callbacks.forEach(function(o,a){n.logger.trace("PerformanceClient: Emitting event to callback "+a,t),o.apply(null,[e])})},PerformanceClient.prototype.truncateIntegralFields=function(e,t){t.forEach(function(t){t in e&&"number"==typeof e[t]&&(e[t]=Math.floor(e[t]))})},PerformanceClient}(),cO=function(){function StubPerformanceMeasurement(){}return StubPerformanceMeasurement.prototype.startMeasurement=function(){},StubPerformanceMeasurement.prototype.endMeasurement=function(){},StubPerformanceMeasurement.prototype.flushMeasurement=function(){return null},StubPerformanceMeasurement}(),cN=function(e){function StubPerformanceClient(){return null!==e&&e.apply(this,arguments)||this}return(0,s9.ZT)(StubPerformanceClient,e),StubPerformanceClient.prototype.generateId=function(){return"callback-id"},StubPerformanceClient.prototype.startPerformanceMeasuremeant=function(){return new cO},StubPerformanceClient.prototype.startPerformanceMeasurement=function(){return new cO},StubPerformanceClient.prototype.calculateQueuedTime=function(e,t){return 0},StubPerformanceClient.prototype.addQueueMeasurement=function(e,t,n){},StubPerformanceClient.prototype.setPreQueueTime=function(e,t){},StubPerformanceClient}(cM),cB={createNewGuid:function(){throw s7.l.createUnexpectedError("Crypto interface - createNewGuid() has not been implemented")},base64Decode:function(){throw s7.l.createUnexpectedError("Crypto interface - base64Decode() has not been implemented")},base64Encode:function(){throw s7.l.createUnexpectedError("Crypto interface - base64Encode() has not been implemented")},generatePkceCodes:function(){return(0,s9.mG)(this,void 0,void 0,function(){return(0,s9.Jh)(this,function(e){throw s7.l.createUnexpectedError("Crypto interface - generatePkceCodes() has not been implemented")})})},getPublicKeyThumbprint:function(){return(0,s9.mG)(this,void 0,void 0,function(){return(0,s9.Jh)(this,function(e){throw s7.l.createUnexpectedError("Crypto interface - getPublicKeyThumbprint() has not been implemented")})})},removeTokenBindingKey:function(){return(0,s9.mG)(this,void 0,void 0,function(){return(0,s9.Jh)(this,function(e){throw s7.l.createUnexpectedError("Crypto interface - removeTokenBindingKey() has not been implemented")})})},clearKeystore:function(){return(0,s9.mG)(this,void 0,void 0,function(){return(0,s9.Jh)(this,function(e){throw s7.l.createUnexpectedError("Crypto interface - clearKeystore() has not been implemented")})})},signJwt:function(){return(0,s9.mG)(this,void 0,void 0,function(){return(0,s9.Jh)(this,function(e){throw s7.l.createUnexpectedError("Crypto interface - signJwt() has not been implemented")})})},hashString:function(){return(0,s9.mG)(this,void 0,void 0,function(){return(0,s9.Jh)(this,function(e){throw s7.l.createUnexpectedError("Crypto interface - hashString() has not been implemented")})})}},cD=n(2331),cL=function(){function CredentialEntity(){}return CredentialEntity.prototype.generateAccountId=function(){return CredentialEntity.generateAccountIdForCacheKey(this.homeAccountId,this.environment)},CredentialEntity.prototype.generateCredentialId=function(){return CredentialEntity.generateCredentialIdForCacheKey(this.credentialType,this.clientId,this.realm,this.familyId)},CredentialEntity.prototype.generateTarget=function(){return CredentialEntity.generateTargetForCacheKey(this.target)},CredentialEntity.prototype.generateCredentialKey=function(){return CredentialEntity.generateCredentialCacheKey(this.homeAccountId,this.environment,this.credentialType,this.clientId,this.realm,this.target,this.familyId,this.tokenType,this.requestedClaimsHash)},CredentialEntity.prototype.generateType=function(){switch(this.credentialType){case s8.d3.ID_TOKEN:return s8.LL.ID_TOKEN;case s8.d3.ACCESS_TOKEN:case s8.d3.ACCESS_TOKEN_WITH_AUTH_SCHEME:return s8.LL.ACCESS_TOKEN;case s8.d3.REFRESH_TOKEN:return s8.LL.REFRESH_TOKEN;default:throw cD.e.createUnexpectedCredentialTypeError()}},CredentialEntity.generateCredentialCacheKey=function(e,t,n,o,a,s,c,l,u){return[this.generateAccountIdForCacheKey(e,t),this.generateCredentialIdForCacheKey(n,o,a,c),this.generateTargetForCacheKey(s),this.generateClaimsHashForCacheKey(u),this.generateSchemeForCacheKey(l)].join(s8.Bv.CACHE_KEY_SEPARATOR).toLowerCase()},CredentialEntity.generateAccountIdForCacheKey=function(e,t){return[e,t].join(s8.Bv.CACHE_KEY_SEPARATOR).toLowerCase()},CredentialEntity.generateCredentialIdForCacheKey=function(e,t,n,o){var a=e===s8.d3.REFRESH_TOKEN&&o||t;return[e,a,n||s8.gT.EMPTY_STRING].join(s8.Bv.CACHE_KEY_SEPARATOR).toLowerCase()},CredentialEntity.generateTargetForCacheKey=function(e){return(e||s8.gT.EMPTY_STRING).toLowerCase()},CredentialEntity.generateClaimsHashForCacheKey=function(e){return(e||s8.gT.EMPTY_STRING).toLowerCase()},CredentialEntity.generateSchemeForCacheKey=function(e){return e&&e.toLowerCase()!==s8.hO.BEARER.toLowerCase()?e.toLowerCase():s8.gT.EMPTY_STRING},CredentialEntity}(),cU=function(e){function IdTokenEntity(){return null!==e&&e.apply(this,arguments)||this}return(0,s9.ZT)(IdTokenEntity,e),IdTokenEntity.createIdTokenEntity=function(e,t,n,o,a){var s=new IdTokenEntity;return s.credentialType=s8.d3.ID_TOKEN,s.homeAccountId=e,s.environment=t,s.clientId=o,s.secret=n,s.realm=a,s},IdTokenEntity.isIdTokenEntity=function(e){return!!e&&e.hasOwnProperty("homeAccountId")&&e.hasOwnProperty("environment")&&e.hasOwnProperty("credentialType")&&e.hasOwnProperty("realm")&&e.hasOwnProperty("clientId")&&e.hasOwnProperty("secret")&&e.credentialType===s8.d3.ID_TOKEN},IdTokenEntity}(cL),cF={redirectUriNotSet:{code:"redirect_uri_empty",desc:"A redirect URI is required for all calls, and none has been set."},postLogoutUriNotSet:{code:"post_logout_uri_empty",desc:"A post logout redirect has not been set."},claimsRequestParsingError:{code:"claims_request_parsing_error",desc:"Could not parse the given claims request object."},authorityUriInsecure:{code:"authority_uri_insecure",desc:"Authority URIs must use https.  Please see here for valid authority configuration options: https://docs.microsoft.com/en-us/azure/active-directory/develop/msal-js-initializing-client-applications#configuration-options"},urlParseError:{code:"url_parse_error",desc:"URL could not be parsed into appropriate segments."},urlEmptyError:{code:"empty_url_error",desc:"URL was empty or null."},emptyScopesError:{code:"empty_input_scopes_error",desc:"Scopes cannot be passed as null, undefined or empty array because they are required to obtain an access token."},clientIdSingleScopeError:{code:"clientid_input_scopes_error",desc:"Client ID can only be provided as a single scope."},invalidPrompt:{code:"invalid_prompt_value",desc:"Supported prompt values are 'login', 'select_account', 'consent', 'create', 'none' and 'no_session'.  Please see here for valid configuration options: https://azuread.github.io/microsoft-authentication-library-for-js/ref/modules/_azure_msal_common.html#commonauthorizationurlrequest"},invalidClaimsRequest:{code:"invalid_claims",desc:"Given claims parameter must be a stringified JSON object."},tokenRequestEmptyError:{code:"token_request_empty",desc:"Token request was empty and not found in cache."},logoutRequestEmptyError:{code:"logout_request_empty",desc:"The logout request was null or undefined."},invalidCodeChallengeMethod:{code:"invalid_code_challenge_method",desc:'code_challenge_method passed is invalid. Valid values are "plain" and "S256".'},invalidCodeChallengeParams:{code:"pkce_params_missing",desc:"Both params: code_challenge and code_challenge_method are to be passed if to be sent in the request"},invalidCloudDiscoveryMetadata:{code:"invalid_cloud_discovery_metadata",desc:"Invalid cloudDiscoveryMetadata provided. Must be a stringified JSON object containing tenant_discovery_endpoint and metadata fields"},invalidAuthorityMetadata:{code:"invalid_authority_metadata",desc:"Invalid authorityMetadata provided. Must by a stringified JSON object containing authorization_endpoint, token_endpoint, issuer fields."},untrustedAuthority:{code:"untrusted_authority",desc:"The provided authority is not a trusted authority. Please include this authority in the knownAuthorities config parameter."},invalidAzureCloudInstance:{code:"invalid_azure_cloud_instance",desc:"Invalid AzureCloudInstance provided. Please refer MSAL JS docs: aks.ms/msaljs/azure_cloud_instance for valid values"},missingSshJwk:{code:"missing_ssh_jwk",desc:"Missing sshJwk in SSH certificate request. A stringified JSON Web Key is required when using the SSH authentication scheme."},missingSshKid:{code:"missing_ssh_kid",desc:"Missing sshKid in SSH certificate request. A string that uniquely identifies the public SSH key is required when using the SSH authentication scheme."},missingNonceAuthenticationHeader:{code:"missing_nonce_authentication_header",desc:"Unable to find an authentication header containing server nonce. Either the Authentication-Info or WWW-Authenticate headers must be present in order to obtain a server nonce."},invalidAuthenticationHeader:{code:"invalid_authentication_header",desc:"Invalid authentication header provided"}},cq=function(e){function ClientConfigurationError(t,n){var o=e.call(this,t,n)||this;return o.name="ClientConfigurationError",Object.setPrototypeOf(o,ClientConfigurationError.prototype),o}return(0,s9.ZT)(ClientConfigurationError,e),ClientConfigurationError.createRedirectUriEmptyError=function(){return new ClientConfigurationError(cF.redirectUriNotSet.code,cF.redirectUriNotSet.desc)},ClientConfigurationError.createPostLogoutRedirectUriEmptyError=function(){return new ClientConfigurationError(cF.postLogoutUriNotSet.code,cF.postLogoutUriNotSet.desc)},ClientConfigurationError.createClaimsRequestParsingError=function(e){return new ClientConfigurationError(cF.claimsRequestParsingError.code,cF.claimsRequestParsingError.desc+" Given value: "+e)},ClientConfigurationError.createInsecureAuthorityUriError=function(e){return new ClientConfigurationError(cF.authorityUriInsecure.code,cF.authorityUriInsecure.desc+" Given URI: "+e)},ClientConfigurationError.createUrlParseError=function(e){return new ClientConfigurationError(cF.urlParseError.code,cF.urlParseError.desc+" Given Error: "+e)},ClientConfigurationError.createUrlEmptyError=function(){return new ClientConfigurationError(cF.urlEmptyError.code,cF.urlEmptyError.desc)},ClientConfigurationError.createEmptyScopesArrayError=function(){return new ClientConfigurationError(cF.emptyScopesError.code,""+cF.emptyScopesError.desc)},ClientConfigurationError.createClientIdSingleScopeError=function(e){return new ClientConfigurationError(cF.clientIdSingleScopeError.code,cF.clientIdSingleScopeError.desc+" Given Scopes: "+e)},ClientConfigurationError.createInvalidPromptError=function(e){return new ClientConfigurationError(cF.invalidPrompt.code,cF.invalidPrompt.desc+" Given value: "+e)},ClientConfigurationError.createInvalidClaimsRequestError=function(){return new ClientConfigurationError(cF.invalidClaimsRequest.code,cF.invalidClaimsRequest.desc)},ClientConfigurationError.createEmptyLogoutRequestError=function(){return new ClientConfigurationError(cF.logoutRequestEmptyError.code,cF.logoutRequestEmptyError.desc)},ClientConfigurationError.createEmptyTokenRequestError=function(){return new ClientConfigurationError(cF.tokenRequestEmptyError.code,cF.tokenRequestEmptyError.desc)},ClientConfigurationError.createInvalidCodeChallengeMethodError=function(){return new ClientConfigurationError(cF.invalidCodeChallengeMethod.code,cF.invalidCodeChallengeMethod.desc)},ClientConfigurationError.createInvalidCodeChallengeParamsError=function(){return new ClientConfigurationError(cF.invalidCodeChallengeParams.code,cF.invalidCodeChallengeParams.desc)},ClientConfigurationError.createInvalidCloudDiscoveryMetadataError=function(){return new ClientConfigurationError(cF.invalidCloudDiscoveryMetadata.code,cF.invalidCloudDiscoveryMetadata.desc)},ClientConfigurationError.createInvalidAuthorityMetadataError=function(){return new ClientConfigurationError(cF.invalidAuthorityMetadata.code,cF.invalidAuthorityMetadata.desc)},ClientConfigurationError.createUntrustedAuthorityError=function(){return new ClientConfigurationError(cF.untrustedAuthority.code,cF.untrustedAuthority.desc)},ClientConfigurationError.createInvalidAzureCloudInstanceError=function(){return new ClientConfigurationError(cF.invalidAzureCloudInstance.code,cF.invalidAzureCloudInstance.desc)},ClientConfigurationError.createMissingSshJwkError=function(){return new ClientConfigurationError(cF.missingSshJwk.code,cF.missingSshJwk.desc)},ClientConfigurationError.createMissingSshKidError=function(){return new ClientConfigurationError(cF.missingSshKid.code,cF.missingSshKid.desc)},ClientConfigurationError.createMissingNonceAuthenticationHeadersError=function(){return new ClientConfigurationError(cF.missingNonceAuthenticationHeader.code,cF.missingNonceAuthenticationHeader.desc)},ClientConfigurationError.createInvalidAuthenticationHeaderError=function(e,t){return new ClientConfigurationError(cF.invalidAuthenticationHeader.code,cF.invalidAuthenticationHeader.desc+". Invalid header: "+e+". Details: "+t)},ClientConfigurationError}(cD.e),cz=function(){function ScopeSet(e){var t=this,n=e?cf.x.trimArrayEntries((0,s9.pr)(e)):[],o=n?cf.x.removeEmptyStringsFromArray(n):[];this.validateInputScopes(o),this.scopes=new Set,o.forEach(function(e){return t.scopes.add(e)})}return ScopeSet.fromString=function(e){var t=(e||s8.gT.EMPTY_STRING).split(" ");return new ScopeSet(t)},ScopeSet.createSearchScopes=function(e){var t=new ScopeSet(e);return t.containsOnlyOIDCScopes()?t.removeScope(s8.gT.OFFLINE_ACCESS_SCOPE):t.removeOIDCScopes(),t},ScopeSet.prototype.validateInputScopes=function(e){if(!e||e.length<1)throw cq.createEmptyScopesArrayError()},ScopeSet.prototype.containsScope=function(e){var t=this.printScopesLowerCase().split(" "),n=new ScopeSet(t);return!cf.x.isEmpty(e)&&n.scopes.has(e.toLowerCase())},ScopeSet.prototype.containsScopeSet=function(e){var t=this;return!!e&&!(e.scopes.size<=0)&&this.scopes.size>=e.scopes.size&&e.asArray().every(function(e){return t.containsScope(e)})},ScopeSet.prototype.containsOnlyOIDCScopes=function(){var e=this,t=0;return s8.$f.forEach(function(n){e.containsScope(n)&&(t+=1)}),this.scopes.size===t},ScopeSet.prototype.appendScope=function(e){cf.x.isEmpty(e)||this.scopes.add(e.trim())},ScopeSet.prototype.appendScopes=function(e){var t=this;try{e.forEach(function(e){return t.appendScope(e)})}catch(e){throw cD.e.createAppendScopeSetError(e)}},ScopeSet.prototype.removeScope=function(e){if(cf.x.isEmpty(e))throw cD.e.createRemoveEmptyScopeFromSetError(e);this.scopes.delete(e.trim())},ScopeSet.prototype.removeOIDCScopes=function(){var e=this;s8.$f.forEach(function(t){e.scopes.delete(t)})},ScopeSet.prototype.unionScopeSets=function(e){if(!e)throw cD.e.createEmptyInputScopeSetError();var t=new Set;return e.scopes.forEach(function(e){return t.add(e.toLowerCase())}),this.scopes.forEach(function(e){return t.add(e.toLowerCase())}),t},ScopeSet.prototype.intersectingScopeSets=function(e){if(!e)throw cD.e.createEmptyInputScopeSetError();e.containsOnlyOIDCScopes()||e.removeOIDCScopes();var t=this.unionScopeSets(e),n=e.getScopeCount(),o=this.getScopeCount();return t.size<o+n},ScopeSet.prototype.getScopeCount=function(){return this.scopes.size},ScopeSet.prototype.asArray=function(){var e=[];return this.scopes.forEach(function(t){return e.push(t)}),e},ScopeSet.prototype.printScopes=function(){return this.scopes?this.asArray().join(" "):s8.gT.EMPTY_STRING},ScopeSet.prototype.printScopesLowerCase=function(){return this.printScopes().toLowerCase()},ScopeSet}();/*! @azure/msal-common v13.0.0 2023-05-01 */function buildClientInfo(e,t){if(cf.x.isEmpty(e))throw cD.e.createClientInfoEmptyError();try{var n=t.base64Decode(e);return JSON.parse(n)}catch(e){throw cD.e.createClientInfoDecodingError(e.message)}}function buildClientInfoFromHomeAccountId(e){if(cf.x.isEmpty(e))throw cD.e.createClientInfoDecodingError("Home account ID was empty.");var t=e.split(s8.Bv.CLIENT_INFO_SEPARATOR,2);return{uid:t[0],utid:t.length<2?s8.gT.EMPTY_STRING:t[1]}}(h=T||(T={}))[h.Default=0]="Default",h[h.Adfs=1]="Adfs",h[h.Dsts=2]="Dsts",h[h.Ciam=3]="Ciam";/*! @azure/msal-common v13.0.0 2023-05-01 */var cH=function(){function AccountEntity(){}return AccountEntity.prototype.generateAccountId=function(){return[this.homeAccountId,this.environment].join(s8.Bv.CACHE_KEY_SEPARATOR).toLowerCase()},AccountEntity.prototype.generateAccountKey=function(){return AccountEntity.generateAccountCacheKey({homeAccountId:this.homeAccountId,environment:this.environment,tenantId:this.realm,username:this.username,localAccountId:this.localAccountId})},AccountEntity.prototype.generateType=function(){switch(this.authorityType){case s8.iR.ADFS_ACCOUNT_TYPE:return s8.LL.ADFS;case s8.iR.MSAV1_ACCOUNT_TYPE:return s8.LL.MSA;case s8.iR.MSSTS_ACCOUNT_TYPE:return s8.LL.MSSTS;case s8.iR.GENERIC_ACCOUNT_TYPE:return s8.LL.GENERIC;default:throw cD.e.createUnexpectedAccountTypeError()}},AccountEntity.prototype.getAccountInfo=function(){return{homeAccountId:this.homeAccountId,environment:this.environment,tenantId:this.realm,username:this.username,localAccountId:this.localAccountId,name:this.name,idTokenClaims:this.idTokenClaims,nativeAccountId:this.nativeAccountId}},AccountEntity.generateAccountCacheKey=function(e){return[e.homeAccountId,e.environment||s8.gT.EMPTY_STRING,e.tenantId||s8.gT.EMPTY_STRING].join(s8.Bv.CACHE_KEY_SEPARATOR).toLowerCase()},AccountEntity.createAccount=function(e,t,n,o,a,s,c,l){var u,h,p,f,m,g,y=new AccountEntity;y.authorityType=s8.iR.MSSTS_ACCOUNT_TYPE,y.clientInfo=e,y.homeAccountId=t,y.nativeAccountId=l;var v=c||o&&o.getPreferredCache();if(!v)throw cD.e.createInvalidCacheEnvironmentError();if(y.environment=v,y.realm=(null===(u=null==n?void 0:n.claims)||void 0===u?void 0:u.tid)||s8.gT.EMPTY_STRING,n){y.idTokenClaims=n.claims,y.localAccountId=(null===(h=null==n?void 0:n.claims)||void 0===h?void 0:h.oid)||(null===(p=null==n?void 0:n.claims)||void 0===p?void 0:p.sub)||s8.gT.EMPTY_STRING;var b=null===(f=null==n?void 0:n.claims)||void 0===f?void 0:f.preferred_username,C=(null===(m=null==n?void 0:n.claims)||void 0===m?void 0:m.emails)?n.claims.emails[0]:null;y.username=b||C||s8.gT.EMPTY_STRING,y.name=null===(g=null==n?void 0:n.claims)||void 0===g?void 0:g.name}return y.cloudGraphHostName=a,y.msGraphHost=s,y},AccountEntity.createGenericAccount=function(e,t,n,o,a,s){var c,l,u,h,p=new AccountEntity;p.authorityType=n&&n.authorityType===T.Adfs?s8.iR.ADFS_ACCOUNT_TYPE:s8.iR.GENERIC_ACCOUNT_TYPE,p.homeAccountId=e,p.realm=s8.gT.EMPTY_STRING;var f=s||n&&n.getPreferredCache();if(!f)throw cD.e.createInvalidCacheEnvironmentError();return t&&(p.localAccountId=(null===(c=null==t?void 0:t.claims)||void 0===c?void 0:c.oid)||(null===(l=null==t?void 0:t.claims)||void 0===l?void 0:l.sub)||s8.gT.EMPTY_STRING,p.username=(null===(u=null==t?void 0:t.claims)||void 0===u?void 0:u.upn)||s8.gT.EMPTY_STRING,p.name=(null===(h=null==t?void 0:t.claims)||void 0===h?void 0:h.name)||s8.gT.EMPTY_STRING,p.idTokenClaims=null==t?void 0:t.claims),p.environment=f,p.cloudGraphHostName=o,p.msGraphHost=a,p},AccountEntity.generateHomeAccountId=function(e,t,n,o,a){var s,c=(null===(s=null==a?void 0:a.claims)||void 0===s?void 0:s.sub)?a.claims.sub:s8.gT.EMPTY_STRING;if(t===T.Adfs||t===T.Dsts)return c;if(e)try{var l=buildClientInfo(e,o);if(!cf.x.isEmpty(l.uid)&&!cf.x.isEmpty(l.utid))return""+l.uid+s8.Bv.CLIENT_INFO_SEPARATOR+l.utid}catch(e){}return n.verbose("No client info in response"),c},AccountEntity.isAccountEntity=function(e){return!!e&&e.hasOwnProperty("homeAccountId")&&e.hasOwnProperty("environment")&&e.hasOwnProperty("realm")&&e.hasOwnProperty("localAccountId")&&e.hasOwnProperty("username")&&e.hasOwnProperty("authorityType")},AccountEntity.accountInfoIsEqual=function(e,t,n){if(!e||!t)return!1;var o=!0;if(n){var a=e.idTokenClaims||{},s=t.idTokenClaims||{};o=a.iat===s.iat&&a.nonce===s.nonce}return e.homeAccountId===t.homeAccountId&&e.localAccountId===t.localAccountId&&e.username===t.username&&e.tenantId===t.tenantId&&e.environment===t.environment&&e.nativeAccountId===t.nativeAccountId&&o},AccountEntity}(),cj=function(){function AuthToken(e,t){if(cf.x.isEmpty(e))throw cD.e.createTokenNullOrEmptyError(e);this.rawToken=e,this.claims=AuthToken.extractTokenClaims(e,t)}return AuthToken.extractTokenClaims=function(e,t){var n=cf.x.decodeAuthToken(e);try{var o=n.JWSPayload,a=t.base64Decode(o);return JSON.parse(a)}catch(e){throw cD.e.createTokenParsingError(e)}},AuthToken.checkMaxAge=function(e,t){if(0===t||Date.now()-3e5>e+t)throw cD.e.createMaxAgeTranspiredError()},AuthToken}(),cV="@azure/msal-common",cG="13.0.0",cK=function(){function CacheManager(e,t,n){this.clientId=e,this.cryptoImpl=t,this.commonLogger=n.clone(cV,cG)}return CacheManager.prototype.getAllAccounts=function(){var e=this,t=this.getAccountKeys();if(t.length<1)return[];var n=t.reduce(function(t,n){var o=e.getAccount(n);return o&&t.push(o),t},[]);return n.length<1?[]:n.map(function(t){return e.getAccountInfoFromEntity(t)})},CacheManager.prototype.getAccountInfoFilteredBy=function(e){var t=this.getAccountsFilteredBy(e);return t.length>0?this.getAccountInfoFromEntity(t[0]):null},CacheManager.prototype.getAccountInfoFromEntity=function(e){var t=e.getAccountInfo(),n=this.getIdToken(t);return n&&(t.idToken=n.secret,t.idTokenClaims=new cj(n.secret,this.cryptoImpl).claims),t},CacheManager.prototype.saveCacheRecord=function(e){return(0,s9.mG)(this,void 0,void 0,function(){return(0,s9.Jh)(this,function(t){switch(t.label){case 0:if(!e)throw cD.e.createNullOrUndefinedCacheRecord();if(e.account&&this.setAccount(e.account),e.idToken&&this.setIdTokenCredential(e.idToken),!e.accessToken)return[3,2];return[4,this.saveAccessToken(e.accessToken)];case 1:t.sent(),t.label=2;case 2:return e.refreshToken&&this.setRefreshTokenCredential(e.refreshToken),e.appMetadata&&this.setAppMetadata(e.appMetadata),[2]}})})},CacheManager.prototype.saveAccessToken=function(e){return(0,s9.mG)(this,void 0,void 0,function(){var t,n,o,a,s=this;return(0,s9.Jh)(this,function(c){switch(c.label){case 0:return t={clientId:e.clientId,credentialType:e.credentialType,environment:e.environment,homeAccountId:e.homeAccountId,realm:e.realm,tokenType:e.tokenType,requestedClaimsHash:e.requestedClaimsHash},n=this.getTokenKeys(),o=cz.fromString(e.target),a=[],n.accessToken.forEach(function(e){if(s.accessTokenKeyMatchesFilter(e,t,!1)){var n=s.getAccessTokenCredential(e);n&&s.credentialMatchesFilter(n,t)&&cz.fromString(n.target).intersectingScopeSets(o)&&a.push(s.removeAccessToken(e))}}),[4,Promise.all(a)];case 1:return c.sent(),this.setAccessTokenCredential(e),[2]}})})},CacheManager.prototype.getAccountsFilteredBy=function(e){var t=this,n=this.getAccountKeys(),o=[];return n.forEach(function(n){if(t.isAccountKey(n,e.homeAccountId,e.realm)){var a=t.getAccount(n);a&&(!e.homeAccountId||t.matchHomeAccountId(a,e.homeAccountId))&&(!e.localAccountId||t.matchLocalAccountId(a,e.localAccountId))&&(!e.username||t.matchUsername(a,e.username))&&(!e.environment||t.matchEnvironment(a,e.environment))&&(!e.realm||t.matchRealm(a,e.realm))&&(!e.nativeAccountId||t.matchNativeAccountId(a,e.nativeAccountId))&&o.push(a)}}),o},CacheManager.prototype.isAccountKey=function(e,t,n){return!(e.split(s8.Bv.CACHE_KEY_SEPARATOR).length<3)&&(!t||!!e.toLowerCase().includes(t.toLowerCase()))&&(!n||!!e.toLowerCase().includes(n.toLowerCase()))},CacheManager.prototype.isCredentialKey=function(e){if(e.split(s8.Bv.CACHE_KEY_SEPARATOR).length<6)return!1;var t=e.toLowerCase();if(-1===t.indexOf(s8.d3.ID_TOKEN.toLowerCase())&&-1===t.indexOf(s8.d3.ACCESS_TOKEN.toLowerCase())&&-1===t.indexOf(s8.d3.ACCESS_TOKEN_WITH_AUTH_SCHEME.toLowerCase())&&-1===t.indexOf(s8.d3.REFRESH_TOKEN.toLowerCase()))return!1;if(t.indexOf(s8.d3.REFRESH_TOKEN.toLowerCase())>-1){var n=""+s8.d3.REFRESH_TOKEN+s8.Bv.CACHE_KEY_SEPARATOR+this.clientId+s8.Bv.CACHE_KEY_SEPARATOR,o=""+s8.d3.REFRESH_TOKEN+s8.Bv.CACHE_KEY_SEPARATOR+s8.ch+s8.Bv.CACHE_KEY_SEPARATOR;if(-1===t.indexOf(n.toLowerCase())&&-1===t.indexOf(o.toLowerCase()))return!1}else if(-1===t.indexOf(this.clientId.toLowerCase()))return!1;return!0},CacheManager.prototype.credentialMatchesFilter=function(e,t){return(!t.clientId||!!this.matchClientId(e,t.clientId))&&(!t.userAssertionHash||!!this.matchUserAssertionHash(e,t.userAssertionHash))&&("string"!=typeof t.homeAccountId||!!this.matchHomeAccountId(e,t.homeAccountId))&&(!t.environment||!!this.matchEnvironment(e,t.environment))&&(!t.realm||!!this.matchRealm(e,t.realm))&&(!t.credentialType||!!this.matchCredentialType(e,t.credentialType))&&(!t.familyId||!!this.matchFamilyId(e,t.familyId))&&(!t.target||!!this.matchTarget(e,t.target))&&(!t.requestedClaimsHash&&!e.requestedClaimsHash||e.requestedClaimsHash===t.requestedClaimsHash)&&(e.credentialType!==s8.d3.ACCESS_TOKEN_WITH_AUTH_SCHEME||(!t.tokenType||!!this.matchTokenType(e,t.tokenType))&&(t.tokenType!==s8.hO.SSH||!t.keyId||!!this.matchKeyId(e,t.keyId)))},CacheManager.prototype.getAppMetadataFilteredBy=function(e){return this.getAppMetadataFilteredByInternal(e.environment,e.clientId)},CacheManager.prototype.getAppMetadataFilteredByInternal=function(e,t){var n=this,o=this.getKeys(),a={};return o.forEach(function(o){if(n.isAppMetadata(o)){var s=n.getAppMetadata(o);s&&(!e||n.matchEnvironment(s,e))&&(!t||n.matchClientId(s,t))&&(a[o]=s)}}),a},CacheManager.prototype.getAuthorityMetadataByAlias=function(e){var t=this,n=this.getAuthorityMetadataKeys(),o=null;return n.forEach(function(n){if(t.isAuthorityMetadata(n)&&-1!==n.indexOf(t.clientId)){var a=t.getAuthorityMetadata(n);a&&-1!==a.aliases.indexOf(e)&&(o=a)}}),o},CacheManager.prototype.removeAllAccounts=function(){return(0,s9.mG)(this,void 0,void 0,function(){var e,t,n=this;return(0,s9.Jh)(this,function(o){switch(o.label){case 0:return e=this.getAccountKeys(),t=[],e.forEach(function(e){t.push(n.removeAccount(e))}),[4,Promise.all(t)];case 1:return o.sent(),[2]}})})},CacheManager.prototype.removeAccount=function(e){return(0,s9.mG)(this,void 0,void 0,function(){var t;return(0,s9.Jh)(this,function(n){switch(n.label){case 0:if(!(t=this.getAccount(e)))throw cD.e.createNoAccountFoundError();return[4,this.removeAccountContext(t)];case 1:return n.sent(),this.removeItem(e),[2]}})})},CacheManager.prototype.removeAccountContext=function(e){return(0,s9.mG)(this,void 0,void 0,function(){var t,n,o,a=this;return(0,s9.Jh)(this,function(s){switch(s.label){case 0:return t=this.getTokenKeys(),n=e.generateAccountId(),o=[],t.idToken.forEach(function(e){0===e.indexOf(n)&&a.removeIdToken(e)}),t.accessToken.forEach(function(e){0===e.indexOf(n)&&o.push(a.removeAccessToken(e))}),t.refreshToken.forEach(function(e){0===e.indexOf(n)&&a.removeRefreshToken(e)}),[4,Promise.all(o)];case 1:return s.sent(),[2]}})})},CacheManager.prototype.removeAccessToken=function(e){return(0,s9.mG)(this,void 0,void 0,function(){var t,n;return(0,s9.Jh)(this,function(o){switch(o.label){case 0:if(!(t=this.getAccessTokenCredential(e)))return[2];if(t.credentialType.toLowerCase()!==s8.d3.ACCESS_TOKEN_WITH_AUTH_SCHEME.toLowerCase()||t.tokenType!==s8.hO.POP||!(n=t.keyId))return[3,4];o.label=1;case 1:return o.trys.push([1,3,,4]),[4,this.cryptoImpl.removeTokenBindingKey(n)];case 2:return o.sent(),[3,4];case 3:throw o.sent(),cD.e.createBindingKeyNotRemovedError();case 4:return[2,this.removeItem(e)]}})})},CacheManager.prototype.removeAppMetadata=function(){var e=this;return this.getKeys().forEach(function(t){e.isAppMetadata(t)&&e.removeItem(t)}),!0},CacheManager.prototype.readCacheRecord=function(e,t,n){var o=this.getTokenKeys(),a=this.readAccountFromCache(e),s=this.getIdToken(e,o),c=this.getAccessToken(e,t,o),l=this.getRefreshToken(e,!1,o),u=this.readAppMetadataFromCache(n);return a&&s&&(a.idTokenClaims=new cj(s.secret,this.cryptoImpl).claims),{account:a,idToken:s,accessToken:c,refreshToken:l,appMetadata:u}},CacheManager.prototype.readAccountFromCache=function(e){var t=cH.generateAccountCacheKey(e);return this.getAccount(t)},CacheManager.prototype.getIdToken=function(e,t){this.commonLogger.trace("CacheManager - getIdToken called");var n={homeAccountId:e.homeAccountId,environment:e.environment,credentialType:s8.d3.ID_TOKEN,clientId:this.clientId,realm:e.tenantId},o=this.getIdTokensByFilter(n,t),a=o.length;if(a<1)return this.commonLogger.info("CacheManager:getIdToken - No token found"),null;if(a>1)throw cD.e.createMultipleMatchingTokensInCacheError();return this.commonLogger.info("CacheManager:getIdToken - Returning id token"),o[0]},CacheManager.prototype.getIdTokensByFilter=function(e,t){var n=this,o=t&&t.idToken||this.getTokenKeys().idToken,a=[];return o.forEach(function(t){if(n.idTokenKeyMatchesFilter(t,(0,s9.pi)({clientId:n.clientId},e))){var o=n.getIdTokenCredential(t);o&&n.credentialMatchesFilter(o,e)&&a.push(o)}}),a},CacheManager.prototype.idTokenKeyMatchesFilter=function(e,t){var n=e.toLowerCase();return(!t.clientId||-1!==n.indexOf(t.clientId.toLowerCase()))&&(!t.homeAccountId||-1!==n.indexOf(t.homeAccountId.toLowerCase()))},CacheManager.prototype.removeIdToken=function(e){this.removeItem(e)},CacheManager.prototype.removeRefreshToken=function(e){this.removeItem(e)},CacheManager.prototype.getAccessToken=function(e,t,n){var o=this;this.commonLogger.trace("CacheManager - getAccessToken called");var a=cz.createSearchScopes(t.scopes),s=t.authenticationScheme||s8.hO.BEARER,c=s&&s.toLowerCase()!==s8.hO.BEARER.toLowerCase()?s8.d3.ACCESS_TOKEN_WITH_AUTH_SCHEME:s8.d3.ACCESS_TOKEN,l={homeAccountId:e.homeAccountId,environment:e.environment,credentialType:c,clientId:this.clientId,realm:e.tenantId,target:a,tokenType:s,keyId:t.sshKid,requestedClaimsHash:t.requestedClaimsHash},u=n&&n.accessToken||this.getTokenKeys().accessToken,h=[];u.forEach(function(e){if(o.accessTokenKeyMatchesFilter(e,l,!0)){var t=o.getAccessTokenCredential(e);t&&o.credentialMatchesFilter(t,l)&&h.push(t)}});var p=h.length;if(p<1)return this.commonLogger.info("CacheManager:getAccessToken - No token found"),null;if(p>1)throw cD.e.createMultipleMatchingTokensInCacheError();return this.commonLogger.info("CacheManager:getAccessToken - Returning access token"),h[0]},CacheManager.prototype.accessTokenKeyMatchesFilter=function(e,t,n){var o=e.toLowerCase();if(t.clientId&&-1===o.indexOf(t.clientId.toLowerCase())||t.homeAccountId&&-1===o.indexOf(t.homeAccountId.toLowerCase())||t.realm&&-1===o.indexOf(t.realm.toLowerCase())||t.requestedClaimsHash&&-1===o.indexOf(t.requestedClaimsHash.toLowerCase()))return!1;if(t.target)for(var a=t.target.asArray(),s=0;s<a.length;s++){if(n&&!o.includes(a[s].toLowerCase()))return!1;if(!n&&o.includes(a[s].toLowerCase()))break}return!0},CacheManager.prototype.getAccessTokensByFilter=function(e){var t=this,n=this.getTokenKeys(),o=[];return n.accessToken.forEach(function(n){if(t.accessTokenKeyMatchesFilter(n,e,!0)){var a=t.getAccessTokenCredential(n);a&&t.credentialMatchesFilter(a,e)&&o.push(a)}}),o},CacheManager.prototype.getRefreshToken=function(e,t,n){var o=this;this.commonLogger.trace("CacheManager - getRefreshToken called");var a=t?s8.ch:void 0,s={homeAccountId:e.homeAccountId,environment:e.environment,credentialType:s8.d3.REFRESH_TOKEN,clientId:this.clientId,familyId:a},c=n&&n.refreshToken||this.getTokenKeys().refreshToken,l=[];return(c.forEach(function(e){if(o.refreshTokenKeyMatchesFilter(e,s)){var t=o.getRefreshTokenCredential(e);t&&o.credentialMatchesFilter(t,s)&&l.push(t)}}),l.length<1)?(this.commonLogger.info("CacheManager:getRefreshToken - No refresh token found."),null):(this.commonLogger.info("CacheManager:getRefreshToken - returning refresh token"),l[0])},CacheManager.prototype.refreshTokenKeyMatchesFilter=function(e,t){var n=e.toLowerCase();return(!t.familyId||-1!==n.indexOf(t.familyId.toLowerCase()))&&(!!t.familyId||!t.clientId||-1!==n.indexOf(t.clientId.toLowerCase()))&&(!t.homeAccountId||-1!==n.indexOf(t.homeAccountId.toLowerCase()))},CacheManager.prototype.readAppMetadataFromCache=function(e){var t={environment:e,clientId:this.clientId},n=this.getAppMetadataFilteredBy(t),o=Object.keys(n).map(function(e){return n[e]}),a=o.length;if(a<1)return null;if(a>1)throw cD.e.createMultipleMatchingAppMetadataInCacheError();return o[0]},CacheManager.prototype.isAppMetadataFOCI=function(e){var t=this.readAppMetadataFromCache(e);return!!(t&&t.familyId===s8.ch)},CacheManager.prototype.matchHomeAccountId=function(e,t){return!!("string"==typeof e.homeAccountId&&t===e.homeAccountId)},CacheManager.prototype.matchLocalAccountId=function(e,t){return!!("string"==typeof e.localAccountId&&t===e.localAccountId)},CacheManager.prototype.matchUsername=function(e,t){return!!("string"==typeof e.username&&t.toLowerCase()===e.username.toLowerCase())},CacheManager.prototype.matchUserAssertionHash=function(e,t){return!!(e.userAssertionHash&&t===e.userAssertionHash)},CacheManager.prototype.matchEnvironment=function(e,t){var n=this.getAuthorityMetadataByAlias(t);return!!(n&&n.aliases.indexOf(e.environment)>-1)},CacheManager.prototype.matchCredentialType=function(e,t){return e.credentialType&&t.toLowerCase()===e.credentialType.toLowerCase()},CacheManager.prototype.matchClientId=function(e,t){return!!(e.clientId&&t===e.clientId)},CacheManager.prototype.matchFamilyId=function(e,t){return!!(e.familyId&&t===e.familyId)},CacheManager.prototype.matchRealm=function(e,t){return!!(e.realm&&t===e.realm)},CacheManager.prototype.matchNativeAccountId=function(e,t){return!!(e.nativeAccountId&&t===e.nativeAccountId)},CacheManager.prototype.matchTarget=function(e,t){return(e.credentialType===s8.d3.ACCESS_TOKEN||e.credentialType===s8.d3.ACCESS_TOKEN_WITH_AUTH_SCHEME)&&!!e.target&&cz.fromString(e.target).containsScopeSet(t)},CacheManager.prototype.matchTokenType=function(e,t){return!!(e.tokenType&&e.tokenType===t)},CacheManager.prototype.matchKeyId=function(e,t){return!!(e.keyId&&e.keyId===t)},CacheManager.prototype.isAppMetadata=function(e){return -1!==e.indexOf(s8.dg)},CacheManager.prototype.isAuthorityMetadata=function(e){return -1!==e.indexOf(s8.QU.CACHE_KEY)},CacheManager.prototype.generateAuthorityMetadataCacheKey=function(e){return s8.QU.CACHE_KEY+"-"+this.clientId+"-"+e},CacheManager.toObject=function(e,t){for(var n in t)e[n]=t[n];return e},CacheManager}(),cW=function(e){function DefaultStorageClass(){return null!==e&&e.apply(this,arguments)||this}return(0,s9.ZT)(DefaultStorageClass,e),DefaultStorageClass.prototype.setAccount=function(){throw s7.l.createUnexpectedError("Storage interface - setAccount() has not been implemented for the cacheStorage interface.")},DefaultStorageClass.prototype.getAccount=function(){throw s7.l.createUnexpectedError("Storage interface - getAccount() has not been implemented for the cacheStorage interface.")},DefaultStorageClass.prototype.setIdTokenCredential=function(){throw s7.l.createUnexpectedError("Storage interface - setIdTokenCredential() has not been implemented for the cacheStorage interface.")},DefaultStorageClass.prototype.getIdTokenCredential=function(){throw s7.l.createUnexpectedError("Storage interface - getIdTokenCredential() has not been implemented for the cacheStorage interface.")},DefaultStorageClass.prototype.setAccessTokenCredential=function(){throw s7.l.createUnexpectedError("Storage interface - setAccessTokenCredential() has not been implemented for the cacheStorage interface.")},DefaultStorageClass.prototype.getAccessTokenCredential=function(){throw s7.l.createUnexpectedError("Storage interface - getAccessTokenCredential() has not been implemented for the cacheStorage interface.")},DefaultStorageClass.prototype.setRefreshTokenCredential=function(){throw s7.l.createUnexpectedError("Storage interface - setRefreshTokenCredential() has not been implemented for the cacheStorage interface.")},DefaultStorageClass.prototype.getRefreshTokenCredential=function(){throw s7.l.createUnexpectedError("Storage interface - getRefreshTokenCredential() has not been implemented for the cacheStorage interface.")},DefaultStorageClass.prototype.setAppMetadata=function(){throw s7.l.createUnexpectedError("Storage interface - setAppMetadata() has not been implemented for the cacheStorage interface.")},DefaultStorageClass.prototype.getAppMetadata=function(){throw s7.l.createUnexpectedError("Storage interface - getAppMetadata() has not been implemented for the cacheStorage interface.")},DefaultStorageClass.prototype.setServerTelemetry=function(){throw s7.l.createUnexpectedError("Storage interface - setServerTelemetry() has not been implemented for the cacheStorage interface.")},DefaultStorageClass.prototype.getServerTelemetry=function(){throw s7.l.createUnexpectedError("Storage interface - getServerTelemetry() has not been implemented for the cacheStorage interface.")},DefaultStorageClass.prototype.setAuthorityMetadata=function(){throw s7.l.createUnexpectedError("Storage interface - setAuthorityMetadata() has not been implemented for the cacheStorage interface.")},DefaultStorageClass.prototype.getAuthorityMetadata=function(){throw s7.l.createUnexpectedError("Storage interface - getAuthorityMetadata() has not been implemented for the cacheStorage interface.")},DefaultStorageClass.prototype.getAuthorityMetadataKeys=function(){throw s7.l.createUnexpectedError("Storage interface - getAuthorityMetadataKeys() has not been implemented for the cacheStorage interface.")},DefaultStorageClass.prototype.setThrottlingCache=function(){throw s7.l.createUnexpectedError("Storage interface - setThrottlingCache() has not been implemented for the cacheStorage interface.")},DefaultStorageClass.prototype.getThrottlingCache=function(){throw s7.l.createUnexpectedError("Storage interface - getThrottlingCache() has not been implemented for the cacheStorage interface.")},DefaultStorageClass.prototype.removeItem=function(){throw s7.l.createUnexpectedError("Storage interface - removeItem() has not been implemented for the cacheStorage interface.")},DefaultStorageClass.prototype.containsKey=function(){throw s7.l.createUnexpectedError("Storage interface - containsKey() has not been implemented for the cacheStorage interface.")},DefaultStorageClass.prototype.getKeys=function(){throw s7.l.createUnexpectedError("Storage interface - getKeys() has not been implemented for the cacheStorage interface.")},DefaultStorageClass.prototype.getAccountKeys=function(){throw s7.l.createUnexpectedError("Storage interface - getAccountKeys() has not been implemented for the cacheStorage interface.")},DefaultStorageClass.prototype.getTokenKeys=function(){throw s7.l.createUnexpectedError("Storage interface - getTokenKeys() has not been implemented for the cacheStorage interface.")},DefaultStorageClass.prototype.clear=function(){return(0,s9.mG)(this,void 0,void 0,function(){return(0,s9.Jh)(this,function(e){throw s7.l.createUnexpectedError("Storage interface - clear() has not been implemented for the cacheStorage interface.")})})},DefaultStorageClass.prototype.updateCredentialCacheKey=function(){throw s7.l.createUnexpectedError("Storage interface - updateCredentialCacheKey() has not been implemented for the cacheStorage interface.")},DefaultStorageClass}(cK),c$=function(){function TimeUtils(){}return TimeUtils.nowSeconds=function(){return Math.round(new Date().getTime()/1e3)},TimeUtils.isTokenExpired=function(e,t){var n=Number(e)||0;return TimeUtils.nowSeconds()+t>n},TimeUtils.wasClockTurnedBack=function(e){return Number(e)>TimeUtils.nowSeconds()},TimeUtils.delay=function(e,t){return new Promise(function(n){return setTimeout(function(){return n(t)},e)})},TimeUtils}(),cJ=function(e){function AccessTokenEntity(){return null!==e&&e.apply(this,arguments)||this}return(0,s9.ZT)(AccessTokenEntity,e),AccessTokenEntity.createAccessTokenEntity=function(e,t,n,o,a,s,c,l,u,h,p,f,m,g,y){var v,b,C=new AccessTokenEntity;C.homeAccountId=e,C.credentialType=s8.d3.ACCESS_TOKEN,C.secret=n;var _=c$.nowSeconds();if(C.cachedAt=_.toString(),C.expiresOn=c.toString(),C.extendedExpiresOn=l.toString(),h&&(C.refreshOn=h.toString()),C.environment=t,C.clientId=o,C.realm=a,C.target=s,C.userAssertionHash=f,C.tokenType=cf.x.isEmpty(p)?s8.hO.BEARER:p,g&&(C.requestedClaims=g,C.requestedClaimsHash=y),(null===(v=C.tokenType)||void 0===v?void 0:v.toLowerCase())!==s8.hO.BEARER.toLowerCase())switch(C.credentialType=s8.d3.ACCESS_TOKEN_WITH_AUTH_SCHEME,C.tokenType){case s8.hO.POP:var w=cj.extractTokenClaims(n,u);if(!(null===(b=null==w?void 0:w.cnf)||void 0===b?void 0:b.kid))throw cD.e.createTokenClaimsRequiredError();C.keyId=w.cnf.kid;break;case s8.hO.SSH:C.keyId=m}return C},AccessTokenEntity.isAccessTokenEntity=function(e){return!!e&&e.hasOwnProperty("homeAccountId")&&e.hasOwnProperty("environment")&&e.hasOwnProperty("credentialType")&&e.hasOwnProperty("realm")&&e.hasOwnProperty("clientId")&&e.hasOwnProperty("secret")&&e.hasOwnProperty("target")&&(e.credentialType===s8.d3.ACCESS_TOKEN||e.credentialType===s8.d3.ACCESS_TOKEN_WITH_AUTH_SCHEME)},AccessTokenEntity}(cL),cY=function(e){function RefreshTokenEntity(){return null!==e&&e.apply(this,arguments)||this}return(0,s9.ZT)(RefreshTokenEntity,e),RefreshTokenEntity.createRefreshTokenEntity=function(e,t,n,o,a,s){var c=new RefreshTokenEntity;return c.clientId=o,c.credentialType=s8.d3.REFRESH_TOKEN,c.environment=t,c.homeAccountId=e,c.secret=n,c.userAssertionHash=s,a&&(c.familyId=a),c},RefreshTokenEntity.isRefreshTokenEntity=function(e){return!!e&&e.hasOwnProperty("homeAccountId")&&e.hasOwnProperty("environment")&&e.hasOwnProperty("credentialType")&&e.hasOwnProperty("clientId")&&e.hasOwnProperty("secret")&&e.credentialType===s8.d3.REFRESH_TOKEN},RefreshTokenEntity}(cL),cQ=function(){function AppMetadataEntity(){}return AppMetadataEntity.prototype.generateAppMetadataKey=function(){return AppMetadataEntity.generateAppMetadataCacheKey(this.environment,this.clientId)},AppMetadataEntity.generateAppMetadataCacheKey=function(e,t){return[s8.dg,e,t].join(s8.Bv.CACHE_KEY_SEPARATOR).toLowerCase()},AppMetadataEntity.createAppMetadataEntity=function(e,t,n){var o=new AppMetadataEntity;return o.clientId=e,o.environment=t,n&&(o.familyId=n),o},AppMetadataEntity.isAppMetadataEntity=function(e,t){return!!t&&0===e.indexOf(s8.dg)&&t.hasOwnProperty("clientId")&&t.hasOwnProperty("environment")},AppMetadataEntity}(),cX=function(){function ServerTelemetryEntity(){this.failedRequests=[],this.errors=[],this.cacheHits=0}return ServerTelemetryEntity.isServerTelemetryEntity=function(e,t){var n=0===e.indexOf(s8.HN.CACHE_KEY),o=!0;return t&&(o=t.hasOwnProperty("failedRequests")&&t.hasOwnProperty("errors")&&t.hasOwnProperty("cacheHits")),n&&o},ServerTelemetryEntity}(),cZ=function(){function AuthorityMetadataEntity(){this.expiresAt=c$.nowSeconds()+s8.QU.REFRESH_TIME_SECONDS}return AuthorityMetadataEntity.prototype.updateCloudDiscoveryMetadata=function(e,t){this.aliases=e.aliases,this.preferred_cache=e.preferred_cache,this.preferred_network=e.preferred_network,this.aliasesFromNetwork=t},AuthorityMetadataEntity.prototype.updateEndpointMetadata=function(e,t){this.authorization_endpoint=e.authorization_endpoint,this.token_endpoint=e.token_endpoint,this.end_session_endpoint=e.end_session_endpoint,this.issuer=e.issuer,this.endpointsFromNetwork=t,this.jwks_uri=e.jwks_uri},AuthorityMetadataEntity.prototype.updateCanonicalAuthority=function(e){this.canonical_authority=e},AuthorityMetadataEntity.prototype.resetExpiresAt=function(){this.expiresAt=c$.nowSeconds()+s8.QU.REFRESH_TIME_SECONDS},AuthorityMetadataEntity.prototype.isExpired=function(){return this.expiresAt<=c$.nowSeconds()},AuthorityMetadataEntity.isAuthorityMetadataEntity=function(e,t){return!!t&&0===e.indexOf(s8.QU.CACHE_KEY)&&t.hasOwnProperty("aliases")&&t.hasOwnProperty("preferred_cache")&&t.hasOwnProperty("preferred_network")&&t.hasOwnProperty("canonical_authority")&&t.hasOwnProperty("authorization_endpoint")&&t.hasOwnProperty("token_endpoint")&&t.hasOwnProperty("issuer")&&t.hasOwnProperty("aliasesFromNetwork")&&t.hasOwnProperty("endpointsFromNetwork")&&t.hasOwnProperty("expiresAt")&&t.hasOwnProperty("jwks_uri")},AuthorityMetadataEntity}(),c0=function(){function ThrottlingEntity(){}return ThrottlingEntity.isThrottlingEntity=function(e,t){var n=!1;e&&(n=0===e.indexOf(s8.bb.THROTTLING_PREFIX));var o=!0;return t&&(o=t.hasOwnProperty("throttleTime")),n&&o},ThrottlingEntity}(),c1=function(){function ProtocolUtils(){}return ProtocolUtils.setRequestState=function(e,t,n){var o=ProtocolUtils.generateLibraryState(e,n);return cf.x.isEmpty(t)?o:""+o+s8.gT.RESOURCE_DELIM+t},ProtocolUtils.generateLibraryState=function(e,t){if(!e)throw cD.e.createNoCryptoObjectError("generateLibraryState");var n={id:e.createNewGuid()};t&&(n.meta=t);var o=JSON.stringify(n);return e.base64Encode(o)},ProtocolUtils.parseRequestState=function(e,t){if(!e)throw cD.e.createNoCryptoObjectError("parseRequestState");if(cf.x.isEmpty(t))throw cD.e.createInvalidStateError(t,"Null, undefined or empty state");try{var n=t.split(s8.gT.RESOURCE_DELIM),o=n[0],a=n.length>1?n.slice(1).join(s8.gT.RESOURCE_DELIM):s8.gT.EMPTY_STRING,s=e.base64Decode(o),c=JSON.parse(s);return{userRequestState:cf.x.isEmpty(a)?s8.gT.EMPTY_STRING:a,libraryState:c}}catch(e){throw cD.e.createInvalidStateError(t,e)}},ProtocolUtils}();(p=k||(k={})).HOME_ACCOUNT_ID="home_account_id",p.UPN="UPN";/*! @azure/msal-browser v2.37.0 2023-05-01 */var c2=function(){function BrowserStorage(e){this.validateWindowStorage(e),this.windowStorage=window[e]}return BrowserStorage.prototype.validateWindowStorage=function(e){if(e!==ci.Ix.LocalStorage&&e!==ci.Ix.SessionStorage||!window[e])throw c_.W.createStorageNotSupportedError(e)},BrowserStorage.prototype.getItem=function(e){return this.windowStorage.getItem(e)},BrowserStorage.prototype.setItem=function(e,t){this.windowStorage.setItem(e,t)},BrowserStorage.prototype.removeItem=function(e){this.windowStorage.removeItem(e)},BrowserStorage.prototype.getKeys=function(){return Object.keys(this.windowStorage)},BrowserStorage.prototype.containsKey=function(e){return this.windowStorage.hasOwnProperty(e)},BrowserStorage}(),c4=function(){function UrlString(e){if(this._urlString=e,cf.x.isEmpty(this._urlString))throw cq.createUrlEmptyError();cf.x.isEmpty(this.getHash())&&(this._urlString=UrlString.canonicalizeUri(e))}return Object.defineProperty(UrlString.prototype,"urlString",{get:function(){return this._urlString},enumerable:!1,configurable:!0}),UrlString.canonicalizeUri=function(e){if(e){var t=e.toLowerCase();return cf.x.endsWith(t,"?")?t=t.slice(0,-1):cf.x.endsWith(t,"?/")&&(t=t.slice(0,-2)),cf.x.endsWith(t,"/")||(t+="/"),t}return e},UrlString.prototype.validateAsUri=function(){var e;try{e=this.getUrlComponents()}catch(e){throw cq.createUrlParseError(e)}if(!e.HostNameAndPort||!e.PathSegments)throw cq.createUrlParseError("Given url string: "+this.urlString);if(!e.Protocol||"https:"!==e.Protocol.toLowerCase())throw cq.createInsecureAuthorityUriError(this.urlString)},UrlString.appendQueryString=function(e,t){return cf.x.isEmpty(t)?e:0>e.indexOf("?")?e+"?"+t:e+"&"+t},UrlString.removeHashFromUrl=function(e){return UrlString.canonicalizeUri(e.split("#")[0])},UrlString.prototype.replaceTenantPath=function(e){var t=this.getUrlComponents(),n=t.PathSegments;return e&&0!==n.length&&(n[0]===s8.Nb.COMMON||n[0]===s8.Nb.ORGANIZATIONS)&&(n[0]=e),UrlString.constructAuthorityUriFromObject(t)},UrlString.prototype.getHash=function(){return UrlString.parseHash(this.urlString)},UrlString.prototype.getUrlComponents=function(){var e=RegExp("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?"),t=this.urlString.match(e);if(!t)throw cq.createUrlParseError("Given url string: "+this.urlString);var n={Protocol:t[1],HostNameAndPort:t[4],AbsolutePath:t[5],QueryString:t[7]},o=n.AbsolutePath.split("/");return o=o.filter(function(e){return e&&e.length>0}),n.PathSegments=o,!cf.x.isEmpty(n.QueryString)&&n.QueryString.endsWith("/")&&(n.QueryString=n.QueryString.substring(0,n.QueryString.length-1)),n},UrlString.getDomainFromUrl=function(e){var t=RegExp("^([^:/?#]+://)?([^/?#]*)"),n=e.match(t);if(!n)throw cq.createUrlParseError("Given url string: "+e);return n[2]},UrlString.getAbsoluteUrl=function(e,t){if(e[0]===s8.gT.FORWARD_SLASH){var n=new UrlString(t).getUrlComponents();return n.Protocol+"//"+n.HostNameAndPort+e}return e},UrlString.parseHash=function(e){var t=e.indexOf("#"),n=e.indexOf("#/");return n>-1?e.substring(n+2):t>-1?e.substring(t+1):s8.gT.EMPTY_STRING},UrlString.parseQueryString=function(e){var t=e.indexOf("?"),n=e.indexOf("/?");return n>-1?e.substring(n+2):t>-1?e.substring(t+1):s8.gT.EMPTY_STRING},UrlString.constructAuthorityUriFromObject=function(e){return new UrlString(e.Protocol+"//"+e.HostNameAndPort+"/"+e.PathSegments.join("/"))},UrlString.getDeserializedHash=function(e){if(cf.x.isEmpty(e))return{};var t=UrlString.parseHash(e),n=cf.x.queryStringToObject(cf.x.isEmpty(t)?e:t);if(!n)throw cD.e.createHashNotDeserializedError(JSON.stringify(n));return n},UrlString.getDeserializedQueryString=function(e){if(cf.x.isEmpty(e))return{};var t=UrlString.parseQueryString(e),n=cf.x.queryStringToObject(cf.x.isEmpty(t)?e:t);if(!n)throw cD.e.createHashNotDeserializedError(JSON.stringify(n));return n},UrlString.hashContainsKnownProperties=function(e){if(cf.x.isEmpty(e)||0>e.indexOf("="))return!1;var t=UrlString.getDeserializedHash(e);return!!(t.code||t.error_description||t.error||t.state)},UrlString}(),c3=function(){function BrowserProtocolUtils(){}return BrowserProtocolUtils.extractBrowserRequestState=function(e,t){if(cf.x.isEmpty(t))return null;try{return c1.parseRequestState(e,t).libraryState.meta}catch(e){throw cD.e.createInvalidStateError(t,e)}},BrowserProtocolUtils.parseServerResponseFromHash=function(e){if(!e)return{};var t=new c4(e);return c4.getDeserializedHash(t.getHash())},BrowserProtocolUtils}(),c5=function(e){function BrowserCacheManager(t,n,o,a){var s=e.call(this,t,o,a)||this;return s.COOKIE_LIFE_MULTIPLIER=864e5,s.cacheConfig=n,s.logger=a,s.internalStorage=new ck,s.browserStorage=s.setupBrowserStorage(s.cacheConfig.cacheLocation),s.temporaryCacheStorage=s.setupTemporaryCacheStorage(s.cacheConfig.temporaryCacheLocation,s.cacheConfig.cacheLocation),n.cacheMigrationEnabled&&(s.migrateCacheEntries(),s.createKeyMaps()),s}return(0,s5.ZT)(BrowserCacheManager,e),BrowserCacheManager.prototype.setupBrowserStorage=function(e){switch(e){case ci.Ix.LocalStorage:case ci.Ix.SessionStorage:try{return new c2(e)}catch(e){this.logger.verbose(e)}}return this.cacheConfig.cacheLocation=ci.Ix.MemoryStorage,new ck},BrowserCacheManager.prototype.setupTemporaryCacheStorage=function(e,t){switch(t){case ci.Ix.LocalStorage:case ci.Ix.SessionStorage:try{return new c2(e||ci.Ix.SessionStorage)}catch(e){return this.logger.verbose(e),this.internalStorage}case ci.Ix.MemoryStorage:default:return this.internalStorage}},BrowserCacheManager.prototype.migrateCacheEntries=function(){var e=this,t=s8.gT.CACHE_PREFIX+"."+s8.Vi.ID_TOKEN,n=s8.gT.CACHE_PREFIX+"."+s8.Vi.CLIENT_INFO,o=s8.gT.CACHE_PREFIX+"."+s8.Vi.ERROR,a=s8.gT.CACHE_PREFIX+"."+s8.Vi.ERROR_DESC,s=[this.browserStorage.getItem(t),this.browserStorage.getItem(n),this.browserStorage.getItem(o),this.browserStorage.getItem(a)];[s8.Vi.ID_TOKEN,s8.Vi.CLIENT_INFO,s8.Vi.ERROR,s8.Vi.ERROR_DESC].forEach(function(t,n){return e.migrateCacheEntry(t,s[n])})},BrowserCacheManager.prototype.migrateCacheEntry=function(e,t){t&&this.setTemporaryCache(e,t,!0)},BrowserCacheManager.prototype.createKeyMaps=function(){var e=this;this.logger.trace("BrowserCacheManager - createKeyMaps called.");var t=this.getItem(ci.Oq.ACCOUNT_KEYS),n=this.getItem(ci.Oq.TOKEN_KEYS+"."+this.clientId);if(t&&n){this.logger.verbose("BrowserCacheManager:createKeyMaps - account and token key maps already exist, skipping migration.");return}this.browserStorage.getKeys().forEach(function(t){if(e.isCredentialKey(t)){var n=e.getItem(t);if(n){var o=e.validateAndParseJson(n);if(o&&o.hasOwnProperty("credentialType"))switch(o.credentialType){case s8.d3.ID_TOKEN:if(cU.isIdTokenEntity(o)){e.logger.trace("BrowserCacheManager:createKeyMaps - idToken found, saving key to token key map"),e.logger.tracePii("BrowserCacheManager:createKeyMaps - idToken with key: "+t+" found, saving key to token key map");var a=cK.toObject(new cU,o),s=e.updateCredentialCacheKey(t,a);e.addTokenKey(s,s8.d3.ID_TOKEN);return}e.logger.trace("BrowserCacheManager:createKeyMaps - key found matching idToken schema with value containing idToken credentialType field but value failed IdTokenEntity validation, skipping."),e.logger.tracePii("BrowserCacheManager:createKeyMaps - failed idToken validation on key: "+t);break;case s8.d3.ACCESS_TOKEN:case s8.d3.ACCESS_TOKEN_WITH_AUTH_SCHEME:if(cJ.isAccessTokenEntity(o)){e.logger.trace("BrowserCacheManager:createKeyMaps - accessToken found, saving key to token key map"),e.logger.tracePii("BrowserCacheManager:createKeyMaps - accessToken with key: "+t+" found, saving key to token key map");var c=cK.toObject(new cJ,o),s=e.updateCredentialCacheKey(t,c);e.addTokenKey(s,s8.d3.ACCESS_TOKEN);return}e.logger.trace("BrowserCacheManager:createKeyMaps - key found matching accessToken schema with value containing accessToken credentialType field but value failed AccessTokenEntity validation, skipping."),e.logger.tracePii("BrowserCacheManager:createKeyMaps - failed accessToken validation on key: "+t);break;case s8.d3.REFRESH_TOKEN:if(cY.isRefreshTokenEntity(o)){e.logger.trace("BrowserCacheManager:createKeyMaps - refreshToken found, saving key to token key map"),e.logger.tracePii("BrowserCacheManager:createKeyMaps - refreshToken with key: "+t+" found, saving key to token key map");var l=cK.toObject(new cY,o),s=e.updateCredentialCacheKey(t,l);e.addTokenKey(s,s8.d3.REFRESH_TOKEN);return}e.logger.trace("BrowserCacheManager:createKeyMaps - key found matching refreshToken schema with value containing refreshToken credentialType field but value failed RefreshTokenEntity validation, skipping."),e.logger.tracePii("BrowserCacheManager:createKeyMaps - failed refreshToken validation on key: "+t)}}}if(e.isAccountKey(t)){var n=e.getItem(t);if(n){var u=e.validateAndParseJson(n);u&&cH.isAccountEntity(u)&&(e.logger.trace("BrowserCacheManager:createKeyMaps - account found, saving key to account key map"),e.logger.tracePii("BrowserCacheManager:createKeyMaps - account with key: "+t+" found, saving key to account key map"),e.addAccountKeyToMap(t))}}})},BrowserCacheManager.prototype.validateAndParseJson=function(e){try{var t=JSON.parse(e);return t&&"object"==typeof t?t:null}catch(e){return null}},BrowserCacheManager.prototype.getItem=function(e){return this.browserStorage.getItem(e)},BrowserCacheManager.prototype.setItem=function(e,t){this.browserStorage.setItem(e,t)},BrowserCacheManager.prototype.getAccount=function(e){this.logger.trace("BrowserCacheManager.getAccount called");var t=this.getItem(e);if(!t)return this.removeAccountKeyFromMap(e),null;var n=this.validateAndParseJson(t);return n&&cH.isAccountEntity(n)?cK.toObject(new cH,n):(this.removeAccountKeyFromMap(e),null)},BrowserCacheManager.prototype.setAccount=function(e){this.logger.trace("BrowserCacheManager.setAccount called");var t=e.generateAccountKey();this.setItem(t,JSON.stringify(e)),this.addAccountKeyToMap(t)},BrowserCacheManager.prototype.getAccountKeys=function(){this.logger.trace("BrowserCacheManager.getAccountKeys called");var e=this.getItem(ci.Oq.ACCOUNT_KEYS);return e?JSON.parse(e):(this.logger.verbose("BrowserCacheManager.getAccountKeys - No account keys found"),[])},BrowserCacheManager.prototype.addAccountKeyToMap=function(e){this.logger.trace("BrowserCacheManager.addAccountKeyToMap called"),this.logger.tracePii("BrowserCacheManager.addAccountKeyToMap called with key: "+e);var t=this.getAccountKeys();-1===t.indexOf(e)?(t.push(e),this.setItem(ci.Oq.ACCOUNT_KEYS,JSON.stringify(t)),this.logger.verbose("BrowserCacheManager.addAccountKeyToMap account key added")):this.logger.verbose("BrowserCacheManager.addAccountKeyToMap account key already exists in map")},BrowserCacheManager.prototype.removeAccountKeyFromMap=function(e){this.logger.trace("BrowserCacheManager.removeAccountKeyFromMap called"),this.logger.tracePii("BrowserCacheManager.removeAccountKeyFromMap called with key: "+e);var t=this.getAccountKeys(),n=t.indexOf(e);n>-1?(t.splice(n,1),this.setItem(ci.Oq.ACCOUNT_KEYS,JSON.stringify(t)),this.logger.trace("BrowserCacheManager.removeAccountKeyFromMap account key removed")):this.logger.trace("BrowserCacheManager.removeAccountKeyFromMap key not found in existing map")},BrowserCacheManager.prototype.removeAccount=function(t){return(0,s5.mG)(this,void 0,void 0,function(){return(0,s5.Jh)(this,function(n){return e.prototype.removeAccount.call(this,t),this.removeAccountKeyFromMap(t),[2]})})},BrowserCacheManager.prototype.removeIdToken=function(t){e.prototype.removeIdToken.call(this,t),this.removeTokenKey(t,s8.d3.ID_TOKEN)},BrowserCacheManager.prototype.removeAccessToken=function(t){return(0,s5.mG)(this,void 0,void 0,function(){return(0,s5.Jh)(this,function(n){return e.prototype.removeAccessToken.call(this,t),this.removeTokenKey(t,s8.d3.ACCESS_TOKEN),[2]})})},BrowserCacheManager.prototype.removeRefreshToken=function(t){e.prototype.removeRefreshToken.call(this,t),this.removeTokenKey(t,s8.d3.REFRESH_TOKEN)},BrowserCacheManager.prototype.getTokenKeys=function(){this.logger.trace("BrowserCacheManager.getTokenKeys called");var e=this.getItem(ci.Oq.TOKEN_KEYS+"."+this.clientId);if(e){var t=this.validateAndParseJson(e);if(t&&t.hasOwnProperty("idToken")&&t.hasOwnProperty("accessToken")&&t.hasOwnProperty("refreshToken"))return t;this.logger.error("BrowserCacheManager.getTokenKeys - Token keys found but in an unknown format. Returning empty key map.")}else this.logger.verbose("BrowserCacheManager.getTokenKeys - No token keys found");return{idToken:[],accessToken:[],refreshToken:[]}},BrowserCacheManager.prototype.addTokenKey=function(e,t){this.logger.trace("BrowserCacheManager addTokenKey called");var n=this.getTokenKeys();switch(t){case s8.d3.ID_TOKEN:-1===n.idToken.indexOf(e)&&(this.logger.info("BrowserCacheManager: addTokenKey - idToken added to map"),n.idToken.push(e));break;case s8.d3.ACCESS_TOKEN:-1===n.accessToken.indexOf(e)&&(this.logger.info("BrowserCacheManager: addTokenKey - accessToken added to map"),n.accessToken.push(e));break;case s8.d3.REFRESH_TOKEN:-1===n.refreshToken.indexOf(e)&&(this.logger.info("BrowserCacheManager: addTokenKey - refreshToken added to map"),n.refreshToken.push(e));break;default:this.logger.error("BrowserCacheManager:addTokenKey - CredentialType provided invalid. CredentialType: "+t),cD.e.createUnexpectedCredentialTypeError()}this.setItem(ci.Oq.TOKEN_KEYS+"."+this.clientId,JSON.stringify(n))},BrowserCacheManager.prototype.removeTokenKey=function(e,t){this.logger.trace("BrowserCacheManager removeTokenKey called");var n=this.getTokenKeys();switch(t){case s8.d3.ID_TOKEN:this.logger.infoPii("BrowserCacheManager: removeTokenKey - attempting to remove idToken with key: "+e+" from map");var o=n.idToken.indexOf(e);o>-1?(this.logger.info("BrowserCacheManager: removeTokenKey - idToken removed from map"),n.idToken.splice(o,1)):this.logger.info("BrowserCacheManager: removeTokenKey - idToken does not exist in map. Either it was previously removed or it was never added.");break;case s8.d3.ACCESS_TOKEN:this.logger.infoPii("BrowserCacheManager: removeTokenKey - attempting to remove accessToken with key: "+e+" from map");var a=n.accessToken.indexOf(e);a>-1?(this.logger.info("BrowserCacheManager: removeTokenKey - accessToken removed from map"),n.accessToken.splice(a,1)):this.logger.info("BrowserCacheManager: removeTokenKey - accessToken does not exist in map. Either it was previously removed or it was never added.");break;case s8.d3.REFRESH_TOKEN:this.logger.infoPii("BrowserCacheManager: removeTokenKey - attempting to remove refreshToken with key: "+e+" from map");var s=n.refreshToken.indexOf(e);s>-1?(this.logger.info("BrowserCacheManager: removeTokenKey - refreshToken removed from map"),n.refreshToken.splice(s,1)):this.logger.info("BrowserCacheManager: removeTokenKey - refreshToken does not exist in map. Either it was previously removed or it was never added.");break;default:this.logger.error("BrowserCacheManager:removeTokenKey - CredentialType provided invalid. CredentialType: "+t),cD.e.createUnexpectedCredentialTypeError()}this.setItem(ci.Oq.TOKEN_KEYS+"."+this.clientId,JSON.stringify(n))},BrowserCacheManager.prototype.getIdTokenCredential=function(e){var t=this.getItem(e);if(!t)return this.logger.trace("BrowserCacheManager.getIdTokenCredential: called, no cache hit"),this.removeTokenKey(e,s8.d3.ID_TOKEN),null;var n=this.validateAndParseJson(t);return n&&cU.isIdTokenEntity(n)?(this.logger.trace("BrowserCacheManager.getIdTokenCredential: cache hit"),cK.toObject(new cU,n)):(this.logger.trace("BrowserCacheManager.getIdTokenCredential: called, no cache hit"),this.removeTokenKey(e,s8.d3.ID_TOKEN),null)},BrowserCacheManager.prototype.setIdTokenCredential=function(e){this.logger.trace("BrowserCacheManager.setIdTokenCredential called");var t=e.generateCredentialKey();this.setItem(t,JSON.stringify(e)),this.addTokenKey(t,s8.d3.ID_TOKEN)},BrowserCacheManager.prototype.getAccessTokenCredential=function(e){var t=this.getItem(e);if(!t)return this.logger.trace("BrowserCacheManager.getAccessTokenCredential: called, no cache hit"),this.removeTokenKey(e,s8.d3.ACCESS_TOKEN),null;var n=this.validateAndParseJson(t);return n&&cJ.isAccessTokenEntity(n)?(this.logger.trace("BrowserCacheManager.getAccessTokenCredential: cache hit"),cK.toObject(new cJ,n)):(this.logger.trace("BrowserCacheManager.getAccessTokenCredential: called, no cache hit"),this.removeTokenKey(e,s8.d3.ACCESS_TOKEN),null)},BrowserCacheManager.prototype.setAccessTokenCredential=function(e){this.logger.trace("BrowserCacheManager.setAccessTokenCredential called");var t=e.generateCredentialKey();this.setItem(t,JSON.stringify(e)),this.addTokenKey(t,s8.d3.ACCESS_TOKEN)},BrowserCacheManager.prototype.getRefreshTokenCredential=function(e){var t=this.getItem(e);if(!t)return this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: called, no cache hit"),this.removeTokenKey(e,s8.d3.REFRESH_TOKEN),null;var n=this.validateAndParseJson(t);return n&&cY.isRefreshTokenEntity(n)?(this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: cache hit"),cK.toObject(new cY,n)):(this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: called, no cache hit"),this.removeTokenKey(e,s8.d3.REFRESH_TOKEN),null)},BrowserCacheManager.prototype.setRefreshTokenCredential=function(e){this.logger.trace("BrowserCacheManager.setRefreshTokenCredential called");var t=e.generateCredentialKey();this.setItem(t,JSON.stringify(e)),this.addTokenKey(t,s8.d3.REFRESH_TOKEN)},BrowserCacheManager.prototype.getAppMetadata=function(e){var t=this.getItem(e);if(!t)return this.logger.trace("BrowserCacheManager.getAppMetadata: called, no cache hit"),null;var n=this.validateAndParseJson(t);return n&&cQ.isAppMetadataEntity(e,n)?(this.logger.trace("BrowserCacheManager.getAppMetadata: cache hit"),cK.toObject(new cQ,n)):(this.logger.trace("BrowserCacheManager.getAppMetadata: called, no cache hit"),null)},BrowserCacheManager.prototype.setAppMetadata=function(e){this.logger.trace("BrowserCacheManager.setAppMetadata called");var t=e.generateAppMetadataKey();this.setItem(t,JSON.stringify(e))},BrowserCacheManager.prototype.getServerTelemetry=function(e){var t=this.getItem(e);if(!t)return this.logger.trace("BrowserCacheManager.getServerTelemetry: called, no cache hit"),null;var n=this.validateAndParseJson(t);return n&&cX.isServerTelemetryEntity(e,n)?(this.logger.trace("BrowserCacheManager.getServerTelemetry: cache hit"),cK.toObject(new cX,n)):(this.logger.trace("BrowserCacheManager.getServerTelemetry: called, no cache hit"),null)},BrowserCacheManager.prototype.setServerTelemetry=function(e,t){this.logger.trace("BrowserCacheManager.setServerTelemetry called"),this.setItem(e,JSON.stringify(t))},BrowserCacheManager.prototype.getAuthorityMetadata=function(e){var t=this.internalStorage.getItem(e);if(!t)return this.logger.trace("BrowserCacheManager.getAuthorityMetadata: called, no cache hit"),null;var n=this.validateAndParseJson(t);return n&&cZ.isAuthorityMetadataEntity(e,n)?(this.logger.trace("BrowserCacheManager.getAuthorityMetadata: cache hit"),cK.toObject(new cZ,n)):null},BrowserCacheManager.prototype.getAuthorityMetadataKeys=function(){var e=this;return this.internalStorage.getKeys().filter(function(t){return e.isAuthorityMetadata(t)})},BrowserCacheManager.prototype.setWrapperMetadata=function(e,t){this.internalStorage.setItem(ci.Bs.WRAPPER_SKU,e),this.internalStorage.setItem(ci.Bs.WRAPPER_VER,t)},BrowserCacheManager.prototype.getWrapperMetadata=function(){return[this.internalStorage.getItem(ci.Bs.WRAPPER_SKU)||s8.gT.EMPTY_STRING,this.internalStorage.getItem(ci.Bs.WRAPPER_VER)||s8.gT.EMPTY_STRING]},BrowserCacheManager.prototype.setAuthorityMetadata=function(e,t){this.logger.trace("BrowserCacheManager.setAuthorityMetadata called"),this.internalStorage.setItem(e,JSON.stringify(t))},BrowserCacheManager.prototype.getActiveAccount=function(){var e=this.generateCacheKey(s8.Vi.ACTIVE_ACCOUNT_FILTERS),t=this.getItem(e);if(!t){this.logger.trace("BrowserCacheManager.getActiveAccount: No active account filters cache schema found, looking for legacy schema");var n=this.generateCacheKey(s8.Vi.ACTIVE_ACCOUNT),o=this.getItem(n);if(!o)return this.logger.trace("BrowserCacheManager.getActiveAccount: No active account found"),null;var a=this.getAccountInfoByFilter({localAccountId:o})[0]||null;return a?(this.logger.trace("BrowserCacheManager.getActiveAccount: Legacy active account cache schema found"),this.logger.trace("BrowserCacheManager.getActiveAccount: Adding active account filters cache schema"),this.setActiveAccount(a),a):null}var s=this.validateAndParseJson(t);return s?(this.logger.trace("BrowserCacheManager.getActiveAccount: Active account filters schema found"),this.getAccountInfoByFilter({homeAccountId:s.homeAccountId,localAccountId:s.localAccountId})[0]||null):(this.logger.trace("BrowserCacheManager.getActiveAccount: No active account found"),null)},BrowserCacheManager.prototype.setActiveAccount=function(e){var t=this.generateCacheKey(s8.Vi.ACTIVE_ACCOUNT_FILTERS),n=this.generateCacheKey(s8.Vi.ACTIVE_ACCOUNT);if(e){this.logger.verbose("setActiveAccount: Active account set");var o={homeAccountId:e.homeAccountId,localAccountId:e.localAccountId};this.browserStorage.setItem(t,JSON.stringify(o)),this.browserStorage.setItem(n,e.localAccountId)}else this.logger.verbose("setActiveAccount: No account passed, active account not set"),this.browserStorage.removeItem(t),this.browserStorage.removeItem(n)},BrowserCacheManager.prototype.getAccountInfoByFilter=function(e){var t=this.getAllAccounts();return this.logger.trace("BrowserCacheManager.getAccountInfoByFilter: total "+t.length+" accounts found"),t.filter(function(t){return(!e.username||e.username.toLowerCase()===t.username.toLowerCase())&&(!e.homeAccountId||e.homeAccountId===t.homeAccountId)&&(!e.localAccountId||e.localAccountId===t.localAccountId)&&(!e.tenantId||e.tenantId===t.tenantId)&&(!e.environment||e.environment===t.environment)})},BrowserCacheManager.prototype.getAccountInfoByHints=function(e,t){var n=this.getAllAccounts().filter(function(n){return t?t===(n.idTokenClaims&&n.idTokenClaims.sid):!!e&&e===n.username});if(1===n.length)return n[0];if(n.length>1)throw cD.e.createMultipleMatchingAccountsInCacheError();return null},BrowserCacheManager.prototype.getThrottlingCache=function(e){var t=this.getItem(e);if(!t)return this.logger.trace("BrowserCacheManager.getThrottlingCache: called, no cache hit"),null;var n=this.validateAndParseJson(t);return n&&c0.isThrottlingEntity(e,n)?(this.logger.trace("BrowserCacheManager.getThrottlingCache: cache hit"),cK.toObject(new c0,n)):(this.logger.trace("BrowserCacheManager.getThrottlingCache: called, no cache hit"),null)},BrowserCacheManager.prototype.setThrottlingCache=function(e,t){this.logger.trace("BrowserCacheManager.setThrottlingCache called"),this.setItem(e,JSON.stringify(t))},BrowserCacheManager.prototype.getTemporaryCache=function(e,t){var n=t?this.generateCacheKey(e):e;if(this.cacheConfig.storeAuthStateInCookie){var o=this.getItemCookie(n);if(o)return this.logger.trace("BrowserCacheManager.getTemporaryCache: storeAuthStateInCookies set to true, retrieving from cookies"),o}var a=this.temporaryCacheStorage.getItem(n);if(!a){if(this.cacheConfig.cacheLocation===ci.Ix.LocalStorage){var s=this.browserStorage.getItem(n);if(s)return this.logger.trace("BrowserCacheManager.getTemporaryCache: Temporary cache item found in local storage"),s}return this.logger.trace("BrowserCacheManager.getTemporaryCache: No cache item found in local storage"),null}return this.logger.trace("BrowserCacheManager.getTemporaryCache: Temporary cache item returned"),a},BrowserCacheManager.prototype.setTemporaryCache=function(e,t,n){var o=n?this.generateCacheKey(e):e;this.temporaryCacheStorage.setItem(o,t),this.cacheConfig.storeAuthStateInCookie&&(this.logger.trace("BrowserCacheManager.setTemporaryCache: storeAuthStateInCookie set to true, setting item cookie"),this.setItemCookie(o,t))},BrowserCacheManager.prototype.removeItem=function(e){this.browserStorage.removeItem(e),this.temporaryCacheStorage.removeItem(e),this.cacheConfig.storeAuthStateInCookie&&(this.logger.trace("BrowserCacheManager.removeItem: storeAuthStateInCookie is true, clearing item cookie"),this.clearItemCookie(e))},BrowserCacheManager.prototype.containsKey=function(e){return this.browserStorage.containsKey(e)||this.temporaryCacheStorage.containsKey(e)},BrowserCacheManager.prototype.getKeys=function(){return(0,s5.fl)(this.browserStorage.getKeys(),this.temporaryCacheStorage.getKeys())},BrowserCacheManager.prototype.clear=function(){return(0,s5.mG)(this,void 0,void 0,function(){var e=this;return(0,s5.Jh)(this,function(t){switch(t.label){case 0:return[4,this.removeAllAccounts()];case 1:return t.sent(),this.removeAppMetadata(),this.getKeys().forEach(function(t){(e.browserStorage.containsKey(t)||e.temporaryCacheStorage.containsKey(t))&&(-1!==t.indexOf(s8.gT.CACHE_PREFIX)||-1!==t.indexOf(e.clientId))&&e.removeItem(t)}),this.internalStorage.clear(),[2]}})})},BrowserCacheManager.prototype.setItemCookie=function(e,t,n){var o=encodeURIComponent(e)+"="+encodeURIComponent(t)+";path=/;SameSite=Lax;";n&&(o+="expires="+this.getCookieExpirationTime(n)+";"),this.cacheConfig.secureCookies&&(o+="Secure;"),document.cookie=o},BrowserCacheManager.prototype.getItemCookie=function(e){for(var t=encodeURIComponent(e)+"=",n=document.cookie.split(";"),o=0;o<n.length;o++){for(var a=n[o];" "===a.charAt(0);)a=a.substring(1);if(0===a.indexOf(t))return decodeURIComponent(a.substring(t.length,a.length))}return s8.gT.EMPTY_STRING},BrowserCacheManager.prototype.clearMsalCookies=function(){var e=this,t=s8.gT.CACHE_PREFIX+"."+this.clientId;document.cookie.split(";").forEach(function(n){for(;" "===n.charAt(0);)n=n.substring(1);if(0===n.indexOf(t)){var o=n.split("=")[0];e.clearItemCookie(o)}})},BrowserCacheManager.prototype.clearItemCookie=function(e){this.setItemCookie(e,s8.gT.EMPTY_STRING,-1)},BrowserCacheManager.prototype.getCookieExpirationTime=function(e){var t=new Date;return new Date(t.getTime()+e*this.COOKIE_LIFE_MULTIPLIER).toUTCString()},BrowserCacheManager.prototype.getCache=function(){return this.browserStorage},BrowserCacheManager.prototype.setCache=function(){},BrowserCacheManager.prototype.generateCacheKey=function(e){return this.validateAndParseJson(e)?JSON.stringify(e):cf.x.startsWith(e,s8.gT.CACHE_PREFIX)||cf.x.startsWith(e,s8.Vi.ADAL_ID_TOKEN)?e:s8.gT.CACHE_PREFIX+"."+this.clientId+"."+e},BrowserCacheManager.prototype.generateAuthorityKey=function(e){var t=c1.parseRequestState(this.cryptoImpl,e).libraryState.id;return this.generateCacheKey(ci.c4.AUTHORITY+"."+t)},BrowserCacheManager.prototype.generateNonceKey=function(e){var t=c1.parseRequestState(this.cryptoImpl,e).libraryState.id;return this.generateCacheKey(ci.c4.NONCE_IDTOKEN+"."+t)},BrowserCacheManager.prototype.generateStateKey=function(e){var t=c1.parseRequestState(this.cryptoImpl,e).libraryState.id;return this.generateCacheKey(ci.c4.REQUEST_STATE+"."+t)},BrowserCacheManager.prototype.getCachedAuthority=function(e){var t=this.generateStateKey(e),n=this.getTemporaryCache(t);if(!n)return null;var o=this.generateAuthorityKey(n);return this.getTemporaryCache(o)},BrowserCacheManager.prototype.updateCacheEntries=function(e,t,n,o,a){this.logger.trace("BrowserCacheManager.updateCacheEntries called");var s=this.generateStateKey(e);this.setTemporaryCache(s,e,!1);var c=this.generateNonceKey(e);this.setTemporaryCache(c,t,!1);var l=this.generateAuthorityKey(e);if(this.setTemporaryCache(l,n,!1),a){var u={credential:a.homeAccountId,type:k.HOME_ACCOUNT_ID};this.setTemporaryCache(ci.c4.CCS_CREDENTIAL,JSON.stringify(u),!0)}else if(!cf.x.isEmpty(o)){var u={credential:o,type:k.UPN};this.setTemporaryCache(ci.c4.CCS_CREDENTIAL,JSON.stringify(u),!0)}},BrowserCacheManager.prototype.resetRequestCache=function(e){var t=this;this.logger.trace("BrowserCacheManager.resetRequestCache called"),cf.x.isEmpty(e)||this.getKeys().forEach(function(n){-1!==n.indexOf(e)&&t.removeItem(n)}),e&&(this.removeItem(this.generateStateKey(e)),this.removeItem(this.generateNonceKey(e)),this.removeItem(this.generateAuthorityKey(e))),this.removeItem(this.generateCacheKey(ci.c4.REQUEST_PARAMS)),this.removeItem(this.generateCacheKey(ci.c4.ORIGIN_URI)),this.removeItem(this.generateCacheKey(ci.c4.URL_HASH)),this.removeItem(this.generateCacheKey(ci.c4.CORRELATION_ID)),this.removeItem(this.generateCacheKey(ci.c4.CCS_CREDENTIAL)),this.removeItem(this.generateCacheKey(ci.c4.NATIVE_REQUEST)),this.setInteractionInProgress(!1)},BrowserCacheManager.prototype.cleanRequestByState=function(e){if(this.logger.trace("BrowserCacheManager.cleanRequestByState called"),e){var t=this.generateStateKey(e),n=this.temporaryCacheStorage.getItem(t);this.logger.infoPii("BrowserCacheManager.cleanRequestByState: Removing temporary cache items for state: "+n),this.resetRequestCache(n||s8.gT.EMPTY_STRING)}this.clearMsalCookies()},BrowserCacheManager.prototype.cleanRequestByInteractionType=function(e){var t=this;this.logger.trace("BrowserCacheManager.cleanRequestByInteractionType called"),this.getKeys().forEach(function(n){if(-1!==n.indexOf(ci.c4.REQUEST_STATE)){var o=t.temporaryCacheStorage.getItem(n);if(o){var a=c3.extractBrowserRequestState(t.cryptoImpl,o);a&&a.interactionType===e&&(t.logger.infoPii("BrowserCacheManager.cleanRequestByInteractionType: Removing temporary cache items for state: "+o),t.resetRequestCache(o))}}}),this.clearMsalCookies(),this.setInteractionInProgress(!1)},BrowserCacheManager.prototype.cacheCodeRequest=function(e,t){this.logger.trace("BrowserCacheManager.cacheCodeRequest called");var n=t.base64Encode(JSON.stringify(e));this.setTemporaryCache(ci.c4.REQUEST_PARAMS,n,!0)},BrowserCacheManager.prototype.getCachedRequest=function(e,t){this.logger.trace("BrowserCacheManager.getCachedRequest called");var n=this.getTemporaryCache(ci.c4.REQUEST_PARAMS,!0);if(!n)throw cg.createNoTokenRequestCacheError();var o=this.validateAndParseJson(t.base64Decode(n));if(!o)throw cg.createUnableToParseTokenRequestCacheError();if(this.removeItem(this.generateCacheKey(ci.c4.REQUEST_PARAMS)),cf.x.isEmpty(o.authority)){var a=this.generateAuthorityKey(e),s=this.getTemporaryCache(a);if(!s)throw cg.createNoCachedAuthorityError();o.authority=s}return o},BrowserCacheManager.prototype.getCachedNativeRequest=function(){this.logger.trace("BrowserCacheManager.getCachedNativeRequest called");var e=this.getTemporaryCache(ci.c4.NATIVE_REQUEST,!0);return e?this.validateAndParseJson(e)||(this.logger.error("BrowserCacheManager.getCachedNativeRequest: Unable to parse native request"),null):(this.logger.trace("BrowserCacheManager.getCachedNativeRequest: No cached native request found"),null)},BrowserCacheManager.prototype.isInteractionInProgress=function(e){var t=this.getInteractionInProgress();return e?t===this.clientId:!!t},BrowserCacheManager.prototype.getInteractionInProgress=function(){var e=s8.gT.CACHE_PREFIX+"."+ci.c4.INTERACTION_STATUS_KEY;return this.getTemporaryCache(e,!1)},BrowserCacheManager.prototype.setInteractionInProgress=function(e){var t=s8.gT.CACHE_PREFIX+"."+ci.c4.INTERACTION_STATUS_KEY;if(e){if(this.getInteractionInProgress())throw cg.createInteractionInProgressError();this.setTemporaryCache(t,this.clientId,!1)}else e||this.getInteractionInProgress()!==this.clientId||this.removeItem(t)},BrowserCacheManager.prototype.getLegacyLoginHint=function(){var e=this.getTemporaryCache(s8.Vi.ADAL_ID_TOKEN);e&&(this.browserStorage.removeItem(s8.Vi.ADAL_ID_TOKEN),this.logger.verbose("Cached ADAL id token retrieved."));var t=this.getTemporaryCache(s8.Vi.ID_TOKEN,!0);t&&(this.removeItem(this.generateCacheKey(s8.Vi.ID_TOKEN)),this.logger.verbose("Cached MSAL.js v1 id token retrieved"));var n=t||e;if(n){var o=new cj(n,this.cryptoImpl);if(o.claims&&o.claims.preferred_username)return this.logger.verbose("No SSO params used and ADAL/MSAL v1 token retrieved, setting ADAL/MSAL v1 preferred_username as loginHint"),o.claims.preferred_username;if(o.claims&&o.claims.upn)return this.logger.verbose("No SSO params used and ADAL/MSAL v1 token retrieved, setting ADAL/MSAL v1 upn as loginHint"),o.claims.upn;this.logger.verbose("No SSO params used and ADAL/MSAL v1 token retrieved, however, no account hint claim found. Enable preferred_username or upn id token claim to get SSO.")}return null},BrowserCacheManager.prototype.updateCredentialCacheKey=function(e,t){var n=t.generateCredentialKey();if(e!==n){var o=this.getItem(e);if(o)return this.removeItem(e),this.setItem(n,o),this.logger.verbose("Updated an outdated "+t.credentialType+" cache key"),n;this.logger.error("Attempted to update an outdated "+t.credentialType+" cache key but no item matching the outdated key was found in storage")}return e},BrowserCacheManager.prototype.getRedirectRequestContext=function(){return this.getTemporaryCache(ci.c4.REDIRECT_CONTEXT,!0)},BrowserCacheManager.prototype.setRedirectRequestContext=function(e){this.setTemporaryCache(ci.c4.REDIRECT_CONTEXT,e,!0)},BrowserCacheManager}(cK),DEFAULT_BROWSER_CACHE_MANAGER=function(e,t){var n={cacheLocation:ci.Ix.MemoryStorage,temporaryCacheLocation:ci.Ix.MemoryStorage,storeAuthStateInCookie:!1,secureCookies:!1,cacheMigrationEnabled:!1};return new c5(e,n,cB,t)};(f=I||(I={})).AAD="AAD",f.OIDC="OIDC",(m=x||(x={}))[m.None=0]="None",m.AzurePublic="https://login.microsoftonline.com",m.AzurePpe="https://login.windows-ppe.net",m.AzureChina="https://login.chinacloudapi.cn",m.AzureGermany="https://login.microsoftonline.de",m.AzureUsGovernment="https://login.microsoftonline.us";var c6={tokenRenewalOffsetSeconds:300,preventCorsPreflight:!1},c8={loggerCallback:function(){},piiLoggingEnabled:!1,logLevel:cP.i.Info,correlationId:s8.gT.EMPTY_STRING},c9={sendGetRequestAsync:function(){return(0,s9.mG)(this,void 0,void 0,function(){return(0,s9.Jh)(this,function(e){throw s7.l.createUnexpectedError("Network interface - sendGetRequestAsync() has not been implemented")})})},sendPostRequestAsync:function(){return(0,s9.mG)(this,void 0,void 0,function(){return(0,s9.Jh)(this,function(e){throw s7.l.createUnexpectedError("Network interface - sendPostRequestAsync() has not been implemented")})})}},c7={sku:s8.gT.SKU,version:cG,cpu:s8.gT.EMPTY_STRING,os:s8.gT.EMPTY_STRING},le={clientSecret:s8.gT.EMPTY_STRING,clientAssertion:void 0},lt={azureCloudInstance:x.None,tenant:""+s8.gT.DEFAULT_COMMON_TENANT},lr={application:{appName:"",appVersion:""}},ln={sendGetRequestAsync:function(){return Promise.reject(s7.l.createUnexpectedError("Network interface - sendGetRequestAsync() has not been implemented for the Network interface."))},sendPostRequestAsync:function(){return Promise.reject(s7.l.createUnexpectedError("Network interface - sendPostRequestAsync() has not been implemented for the Network interface."))}},lo=function(){function FetchClient(){}return FetchClient.prototype.sendGetRequestAsync=function(e,t){return(0,s5.mG)(this,void 0,void 0,function(){var n,o,a;return(0,s5.Jh)(this,function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),[4,fetch(e,{method:ci.EC.GET,headers:this.getFetchHeaders(t)})];case 1:return n=s.sent(),[3,3];case 2:if(o=s.sent(),window.navigator.onLine)throw cg.createGetRequestFailedError(o,e);throw cg.createNoNetworkConnectivityError();case 3:return s.trys.push([3,5,,6]),a={headers:this.getHeaderDict(n.headers)},[4,n.json()];case 4:return[2,(a.body=s.sent(),a.status=n.status,a)];case 5:throw s.sent(),cg.createFailedToParseNetworkResponseError(e);case 6:return[2]}})})},FetchClient.prototype.sendPostRequestAsync=function(e,t){return(0,s5.mG)(this,void 0,void 0,function(){var n,o,a,s;return(0,s5.Jh)(this,function(c){switch(c.label){case 0:n=t&&t.body||s8.gT.EMPTY_STRING,c.label=1;case 1:return c.trys.push([1,3,,4]),[4,fetch(e,{method:ci.EC.POST,headers:this.getFetchHeaders(t),body:n})];case 2:return o=c.sent(),[3,4];case 3:if(a=c.sent(),window.navigator.onLine)throw cg.createPostRequestFailedError(a,e);throw cg.createNoNetworkConnectivityError();case 4:return c.trys.push([4,6,,7]),s={headers:this.getHeaderDict(o.headers)},[4,o.json()];case 5:return[2,(s.body=c.sent(),s.status=o.status,s)];case 6:throw c.sent(),cg.createFailedToParseNetworkResponseError(e);case 7:return[2]}})})},FetchClient.prototype.getFetchHeaders=function(e){var t=new Headers;if(!(e&&e.headers))return t;var n=e.headers;return Object.keys(n).forEach(function(e){t.append(e,n[e])}),t},FetchClient.prototype.getHeaderDict=function(e){var t={};return e.forEach(function(e,n){t[n]=e}),t},FetchClient}(),li=function(){function XhrClient(){}return XhrClient.prototype.sendGetRequestAsync=function(e,t){return(0,s5.mG)(this,void 0,void 0,function(){return(0,s5.Jh)(this,function(n){return[2,this.sendRequestAsync(e,ci.EC.GET,t)]})})},XhrClient.prototype.sendPostRequestAsync=function(e,t){return(0,s5.mG)(this,void 0,void 0,function(){return(0,s5.Jh)(this,function(n){return[2,this.sendRequestAsync(e,ci.EC.POST,t)]})})},XhrClient.prototype.sendRequestAsync=function(e,t,n){var o=this;return new Promise(function(a,s){var c=new XMLHttpRequest;if(c.open(t,e,!0),o.setXhrHeaders(c,n),c.onload=function(){(c.status<200||c.status>=300)&&(t===ci.EC.POST?s(cg.createPostRequestFailedError("Failed with status "+c.status,e)):s(cg.createGetRequestFailedError("Failed with status "+c.status,e)));try{var n=JSON.parse(c.responseText),l={headers:o.getHeaderDict(c),body:n,status:c.status};a(l)}catch(t){s(cg.createFailedToParseNetworkResponseError(e))}},c.onerror=function(){window.navigator.onLine?t===ci.EC.POST?s(cg.createPostRequestFailedError("Failed with status "+c.status,e)):s(cg.createGetRequestFailedError("Failed with status "+c.status,e)):s(cg.createNoNetworkConnectivityError())},t===ci.EC.POST&&n&&n.body)c.send(n.body);else if(t===ci.EC.GET)c.send();else throw cg.createHttpMethodNotImplementedError(t)})},XhrClient.prototype.setXhrHeaders=function(e,t){if(t&&t.headers){var n=t.headers;Object.keys(n).forEach(function(t){e.setRequestHeader(t,n[t])})}},XhrClient.prototype.getHeaderDict=function(e){var t=e.getAllResponseHeaders().trim().split(/[\r\n]+/),n={};return t.forEach(function(e){var t=e.split(": "),o=t.shift(),a=t.join(": ");o&&a&&(n[o]=a)}),n},XhrClient}(),la=function(){function BrowserUtils(){}return BrowserUtils.clearHash=function(e){e.location.hash=s8.gT.EMPTY_STRING,"function"==typeof e.history.replaceState&&e.history.replaceState(null,s8.gT.EMPTY_STRING,""+e.location.origin+e.location.pathname+e.location.search)},BrowserUtils.replaceHash=function(e){var t=e.split("#");t.shift(),window.location.hash=t.length>0?t.join("#"):s8.gT.EMPTY_STRING},BrowserUtils.isInIframe=function(){return window.parent!==window},BrowserUtils.isInPopup=function(){return"undefined"!=typeof window&&!!window.opener&&window.opener!==window&&"string"==typeof window.name&&0===window.name.indexOf(ci.qx.POPUP_NAME_PREFIX+".")},BrowserUtils.getCurrentUri=function(){return window.location.href.split("?")[0].split("#")[0]},BrowserUtils.getHomepage=function(){var e=new c4(window.location.href).getUrlComponents();return e.Protocol+"//"+e.HostNameAndPort+"/"},BrowserUtils.getBrowserNetworkClient=function(){return window.fetch&&window.Headers?new lo:new li},BrowserUtils.blockReloadInHiddenIframes=function(){if(c4.hashContainsKnownProperties(window.location.hash)&&BrowserUtils.isInIframe())throw cg.createBlockReloadInHiddenIframeError()},BrowserUtils.blockRedirectInIframe=function(e,t){var n=BrowserUtils.isInIframe();if(e===ci.s_.Redirect&&n&&!t)throw cg.createRedirectInIframeError(n)},BrowserUtils.blockAcquireTokenInPopups=function(){if(BrowserUtils.isInPopup())throw cg.createBlockAcquireTokenInPopupsError()},BrowserUtils.blockNonBrowserEnvironment=function(e){if(!e)throw cg.createNonBrowserEnvironmentError()},BrowserUtils.blockNativeBrokerCalledBeforeInitialized=function(e,t){if(e&&!t)throw cg.createNativeBrokerCalledBeforeInitialize()},BrowserUtils.detectIEOrEdge=function(){var e=window.navigator.userAgent,t=e.indexOf("MSIE "),n=e.indexOf("Trident/"),o=e.indexOf("Edge/");return t>0||n>0||o>0},BrowserUtils}(),ls=function(){function NavigationClient(){}return NavigationClient.prototype.navigateInternal=function(e,t){return NavigationClient.defaultNavigateWindow(e,t)},NavigationClient.prototype.navigateExternal=function(e,t){return NavigationClient.defaultNavigateWindow(e,t)},NavigationClient.defaultNavigateWindow=function(e,t){return t.noHistory?window.location.replace(e):window.location.assign(e),new Promise(function(e){setTimeout(function(){e(!0)},t.timeout)})},NavigationClient}(),lc="@azure/msal-browser",ll="2.37.0",lu=n(6957),ld=function(){function EventHandler(e,t){this.eventCallbacks=new Map,this.logger=e,this.browserCrypto=t,this.listeningToStorageEvents=!1,this.handleAccountCacheChange=this.handleAccountCacheChange.bind(this)}return EventHandler.prototype.addEventCallback=function(e){if("undefined"!=typeof window){var t=this.browserCrypto.createNewGuid();return this.eventCallbacks.set(t,e),this.logger.verbose("Event callback registered with id: "+t),t}return null},EventHandler.prototype.removeEventCallback=function(e){this.eventCallbacks.delete(e),this.logger.verbose("Event callback "+e+" removed.")},EventHandler.prototype.enableAccountStorageEvents=function(){"undefined"!=typeof window&&(this.listeningToStorageEvents?this.logger.verbose("Account storage listener already registered."):(this.logger.verbose("Adding account storage listener."),this.listeningToStorageEvents=!0,window.addEventListener("storage",this.handleAccountCacheChange)))},EventHandler.prototype.disableAccountStorageEvents=function(){"undefined"!=typeof window&&(this.listeningToStorageEvents?(this.logger.verbose("Removing account storage listener."),window.removeEventListener("storage",this.handleAccountCacheChange),this.listeningToStorageEvents=!1):this.logger.verbose("No account storage listener registered."))},EventHandler.prototype.emitEvent=function(e,t,n,o){var a=this;if("undefined"!=typeof window){var s={eventType:e,interactionType:t||null,payload:n||null,error:o||null,timestamp:Date.now()};this.logger.info("Emitting event: "+e),this.eventCallbacks.forEach(function(t,n){a.logger.verbose("Emitting event to callback "+n+": "+e),t.apply(null,[s])})}},EventHandler.prototype.handleAccountCacheChange=function(e){try{var t=e.newValue||e.oldValue;if(!t)return;var n=JSON.parse(t);if("object"!=typeof n||!cH.isAccountEntity(n))return;var o=cK.toObject(new cH,n).getAccountInfo();!e.oldValue&&e.newValue?(this.logger.info("Account was added to cache in a different window"),this.emitEvent(lu.t.ACCOUNT_ADDED,void 0,o)):!e.newValue&&e.oldValue&&(this.logger.info("Account was removed from cache in a different window"),this.emitEvent(lu.t.ACCOUNT_REMOVED,void 0,o))}catch(e){return}},EventHandler}(),lh=function(){function ThrottlingUtils(){}return ThrottlingUtils.generateThrottlingStorageKey=function(e){return s8.bb.THROTTLING_PREFIX+"."+JSON.stringify(e)},ThrottlingUtils.preProcess=function(e,t){var n,o=ThrottlingUtils.generateThrottlingStorageKey(t),a=e.getThrottlingCache(o);if(a){if(a.throttleTime<Date.now()){e.removeItem(o);return}throw new ce((null===(n=a.errorCodes)||void 0===n?void 0:n.join(" "))||s8.gT.EMPTY_STRING,a.errorMessage,a.subError)}},ThrottlingUtils.postProcess=function(e,t,n){if(ThrottlingUtils.checkResponseStatus(n)||ThrottlingUtils.checkResponseForRetryAfter(n)){var o={throttleTime:ThrottlingUtils.calculateThrottleTime(parseInt(n.headers[s8.SZ.RETRY_AFTER])),error:n.body.error,errorCodes:n.body.error_codes,errorMessage:n.body.error_description,subError:n.body.suberror};e.setThrottlingCache(ThrottlingUtils.generateThrottlingStorageKey(t),o)}},ThrottlingUtils.checkResponseStatus=function(e){return 429===e.status||e.status>=500&&e.status<600},ThrottlingUtils.checkResponseForRetryAfter=function(e){return!!e.headers&&e.headers.hasOwnProperty(s8.SZ.RETRY_AFTER)&&(e.status<200||e.status>=300)},ThrottlingUtils.calculateThrottleTime=function(e){var t=Date.now()/1e3;return Math.floor(1e3*Math.min(t+((e<=0?0:e)||s8.bb.DEFAULT_THROTTLE_TIME_SECONDS),t+s8.bb.DEFAULT_MAX_THROTTLE_TIME_SECONDS))},ThrottlingUtils.removeThrottle=function(e,t,n,o){var a={clientId:t,authority:n.authority,scopes:n.scopes,homeAccountIdentifier:o,claims:n.claims,authenticationScheme:n.authenticationScheme,resourceRequestMethod:n.resourceRequestMethod,resourceRequestUri:n.resourceRequestUri,shrClaims:n.shrClaims,sshKid:n.sshKid},s=this.generateThrottlingStorageKey(a);e.removeItem(s)},ThrottlingUtils}(),lp=function(){function NetworkManager(e,t){this.networkClient=e,this.cacheManager=t}return NetworkManager.prototype.sendPostRequest=function(e,t,n){return(0,s9.mG)(this,void 0,void 0,function(){var o,a;return(0,s9.Jh)(this,function(s){switch(s.label){case 0:lh.preProcess(this.cacheManager,e),s.label=1;case 1:return s.trys.push([1,3,,4]),[4,this.networkClient.sendPostRequestAsync(t,n)];case 2:return o=s.sent(),[3,4];case 3:if((a=s.sent())instanceof s7.l)throw a;throw cD.e.createNetworkError(t,a);case 4:return lh.postProcess(this.cacheManager,e,o),[2,o]}})})},NetworkManager}(),lf=function(){function RequestValidator(){}return RequestValidator.validateRedirectUri=function(e){if(cf.x.isEmpty(e))throw cq.createRedirectUriEmptyError()},RequestValidator.validatePrompt=function(e){var t=[];for(var n in s8.NJ)t.push(s8.NJ[n]);if(0>t.indexOf(e))throw cq.createInvalidPromptError(e)},RequestValidator.validateClaims=function(e){try{JSON.parse(e)}catch(e){throw cq.createInvalidClaimsRequestError()}},RequestValidator.validateCodeChallengeParams=function(e,t){if(cf.x.isEmpty(e)||cf.x.isEmpty(t))throw cq.createInvalidCodeChallengeParamsError();this.validateCodeChallengeMethod(t)},RequestValidator.validateCodeChallengeMethod=function(e){if(0>[s8.VX.PLAIN,s8.VX.S256].indexOf(e))throw cq.createInvalidCodeChallengeMethodError()},RequestValidator.sanitizeEQParams=function(e,t){return e?(t.forEach(function(t,n){e[n]&&delete e[n]}),Object.fromEntries(Object.entries(e).filter(function(e){return""!==e[1]}))):{}},RequestValidator}(),lm=function(){function RequestParameterBuilder(){this.parameters=new Map}return RequestParameterBuilder.prototype.addResponseTypeCode=function(){this.parameters.set(s8.Fo.RESPONSE_TYPE,encodeURIComponent(s8.gT.CODE_RESPONSE_TYPE))},RequestParameterBuilder.prototype.addResponseTypeForTokenAndIdToken=function(){this.parameters.set(s8.Fo.RESPONSE_TYPE,encodeURIComponent(s8.gT.TOKEN_RESPONSE_TYPE+" "+s8.gT.ID_TOKEN_RESPONSE_TYPE))},RequestParameterBuilder.prototype.addResponseMode=function(e){this.parameters.set(s8.Fo.RESPONSE_MODE,encodeURIComponent(e||s8.vw.QUERY))},RequestParameterBuilder.prototype.addNativeBroker=function(){this.parameters.set(s8.Fo.NATIVE_BROKER,encodeURIComponent("1"))},RequestParameterBuilder.prototype.addScopes=function(e,t){void 0===t&&(t=!0);var n=t?(0,s9.pr)(e||[],s8.f_):e||[],o=new cz(n);this.parameters.set(s8.Fo.SCOPE,encodeURIComponent(o.printScopes()))},RequestParameterBuilder.prototype.addClientId=function(e){this.parameters.set(s8.Fo.CLIENT_ID,encodeURIComponent(e))},RequestParameterBuilder.prototype.addRedirectUri=function(e){lf.validateRedirectUri(e),this.parameters.set(s8.Fo.REDIRECT_URI,encodeURIComponent(e))},RequestParameterBuilder.prototype.addPostLogoutRedirectUri=function(e){lf.validateRedirectUri(e),this.parameters.set(s8.Fo.POST_LOGOUT_URI,encodeURIComponent(e))},RequestParameterBuilder.prototype.addIdTokenHint=function(e){this.parameters.set(s8.Fo.ID_TOKEN_HINT,encodeURIComponent(e))},RequestParameterBuilder.prototype.addDomainHint=function(e){this.parameters.set(s8.VO.DOMAIN_HINT,encodeURIComponent(e))},RequestParameterBuilder.prototype.addLoginHint=function(e){this.parameters.set(s8.VO.LOGIN_HINT,encodeURIComponent(e))},RequestParameterBuilder.prototype.addCcsUpn=function(e){this.parameters.set(s8.SZ.CCS_HEADER,encodeURIComponent("UPN:"+e))},RequestParameterBuilder.prototype.addCcsOid=function(e){this.parameters.set(s8.SZ.CCS_HEADER,encodeURIComponent("Oid:"+e.uid+"@"+e.utid))},RequestParameterBuilder.prototype.addSid=function(e){this.parameters.set(s8.VO.SID,encodeURIComponent(e))},RequestParameterBuilder.prototype.addClaims=function(e,t){var n=this.addClientCapabilitiesToClaims(e,t);lf.validateClaims(n),this.parameters.set(s8.Fo.CLAIMS,encodeURIComponent(n))},RequestParameterBuilder.prototype.addCorrelationId=function(e){this.parameters.set(s8.Fo.CLIENT_REQUEST_ID,encodeURIComponent(e))},RequestParameterBuilder.prototype.addLibraryInfo=function(e){this.parameters.set(s8.Fo.X_CLIENT_SKU,e.sku),this.parameters.set(s8.Fo.X_CLIENT_VER,e.version),e.os&&this.parameters.set(s8.Fo.X_CLIENT_OS,e.os),e.cpu&&this.parameters.set(s8.Fo.X_CLIENT_CPU,e.cpu)},RequestParameterBuilder.prototype.addApplicationTelemetry=function(e){(null==e?void 0:e.appName)&&this.parameters.set(s8.Fo.X_APP_NAME,e.appName),(null==e?void 0:e.appVersion)&&this.parameters.set(s8.Fo.X_APP_VER,e.appVersion)},RequestParameterBuilder.prototype.addPrompt=function(e){lf.validatePrompt(e),this.parameters.set(""+s8.Fo.PROMPT,encodeURIComponent(e))},RequestParameterBuilder.prototype.addState=function(e){cf.x.isEmpty(e)||this.parameters.set(s8.Fo.STATE,encodeURIComponent(e))},RequestParameterBuilder.prototype.addNonce=function(e){this.parameters.set(s8.Fo.NONCE,encodeURIComponent(e))},RequestParameterBuilder.prototype.addCodeChallengeParams=function(e,t){if(lf.validateCodeChallengeParams(e,t),e&&t)this.parameters.set(s8.Fo.CODE_CHALLENGE,encodeURIComponent(e)),this.parameters.set(s8.Fo.CODE_CHALLENGE_METHOD,encodeURIComponent(t));else throw cq.createInvalidCodeChallengeParamsError()},RequestParameterBuilder.prototype.addAuthorizationCode=function(e){this.parameters.set(s8.Fo.CODE,encodeURIComponent(e))},RequestParameterBuilder.prototype.addDeviceCode=function(e){this.parameters.set(s8.Fo.DEVICE_CODE,encodeURIComponent(e))},RequestParameterBuilder.prototype.addRefreshToken=function(e){this.parameters.set(s8.Fo.REFRESH_TOKEN,encodeURIComponent(e))},RequestParameterBuilder.prototype.addCodeVerifier=function(e){this.parameters.set(s8.Fo.CODE_VERIFIER,encodeURIComponent(e))},RequestParameterBuilder.prototype.addClientSecret=function(e){this.parameters.set(s8.Fo.CLIENT_SECRET,encodeURIComponent(e))},RequestParameterBuilder.prototype.addClientAssertion=function(e){cf.x.isEmpty(e)||this.parameters.set(s8.Fo.CLIENT_ASSERTION,encodeURIComponent(e))},RequestParameterBuilder.prototype.addClientAssertionType=function(e){cf.x.isEmpty(e)||this.parameters.set(s8.Fo.CLIENT_ASSERTION_TYPE,encodeURIComponent(e))},RequestParameterBuilder.prototype.addOboAssertion=function(e){this.parameters.set(s8.Fo.OBO_ASSERTION,encodeURIComponent(e))},RequestParameterBuilder.prototype.addRequestTokenUse=function(e){this.parameters.set(s8.Fo.REQUESTED_TOKEN_USE,encodeURIComponent(e))},RequestParameterBuilder.prototype.addGrantType=function(e){this.parameters.set(s8.Fo.GRANT_TYPE,encodeURIComponent(e))},RequestParameterBuilder.prototype.addClientInfo=function(){this.parameters.set(s8.sR,"1")},RequestParameterBuilder.prototype.addExtraQueryParameters=function(e){var t=this;Object.keys(lf.sanitizeEQParams(e,this.parameters)).forEach(function(n){t.parameters.set(n,e[n])})},RequestParameterBuilder.prototype.addClientCapabilitiesToClaims=function(e,t){var n;if(e)try{n=JSON.parse(e)}catch(e){throw cq.createInvalidClaimsRequestError()}else n={};return t&&t.length>0&&(n.hasOwnProperty(s8.As.ACCESS_TOKEN)||(n[s8.As.ACCESS_TOKEN]={}),n[s8.As.ACCESS_TOKEN][s8.As.XMS_CC]={values:t}),JSON.stringify(n)},RequestParameterBuilder.prototype.addUsername=function(e){this.parameters.set(s8.Ge.username,encodeURIComponent(e))},RequestParameterBuilder.prototype.addPassword=function(e){this.parameters.set(s8.Ge.password,encodeURIComponent(e))},RequestParameterBuilder.prototype.addPopToken=function(e){cf.x.isEmpty(e)||(this.parameters.set(s8.Fo.TOKEN_TYPE,s8.hO.POP),this.parameters.set(s8.Fo.REQ_CNF,encodeURIComponent(e)))},RequestParameterBuilder.prototype.addSshJwk=function(e){cf.x.isEmpty(e)||(this.parameters.set(s8.Fo.TOKEN_TYPE,s8.hO.SSH),this.parameters.set(s8.Fo.REQ_CNF,encodeURIComponent(e)))},RequestParameterBuilder.prototype.addServerTelemetry=function(e){this.parameters.set(s8.Fo.X_CLIENT_CURR_TELEM,e.generateCurrentRequestHeaderValue()),this.parameters.set(s8.Fo.X_CLIENT_LAST_TELEM,e.generateLastRequestHeaderValue())},RequestParameterBuilder.prototype.addThrottling=function(){this.parameters.set(s8.Fo.X_MS_LIB_CAPABILITY,s8.bb.X_MS_LIB_CAPABILITY_VALUE)},RequestParameterBuilder.prototype.addLogoutHint=function(e){this.parameters.set(s8.Fo.LOGOUT_HINT,encodeURIComponent(e))},RequestParameterBuilder.prototype.createQueryString=function(){var e=[];return this.parameters.forEach(function(t,n){e.push(n+"="+t)}),e.join("&")},RequestParameterBuilder}(),lg=function(){function BaseClient(e,t){var n,o,a,s,c,l,u,h,p,f,m,g,y;this.config=(n=e.authOptions,o=e.systemOptions,a=e.loggerOptions,s=e.storageInterface,c=e.networkInterface,l=e.cryptoInterface,u=e.clientCredentials,h=e.libraryInfo,p=e.telemetry,f=e.serverTelemetryManager,m=e.persistencePlugin,g=e.serializableCache,y=(0,s9.pi)((0,s9.pi)({},c8),a),{authOptions:(0,s9.pi)({clientCapabilities:[],azureCloudOptions:lt,skipAuthorityMetadataCache:!1},n),systemOptions:(0,s9.pi)((0,s9.pi)({},c6),o),loggerOptions:y,storageInterface:s||new cW(n.clientId,cB,new cP.Y(y)),networkInterface:c||c9,cryptoInterface:l||cB,clientCredentials:u||le,libraryInfo:(0,s9.pi)((0,s9.pi)({},c7),h),telemetry:(0,s9.pi)((0,s9.pi)({},lr),p),serverTelemetryManager:f||null,persistencePlugin:m||null,serializableCache:g||null}),this.logger=new cP.Y(this.config.loggerOptions,cV,cG),this.cryptoUtils=this.config.cryptoInterface,this.cacheManager=this.config.storageInterface,this.networkClient=this.config.networkInterface,this.networkManager=new lp(this.networkClient,this.cacheManager),this.serverTelemetryManager=this.config.serverTelemetryManager,this.authority=this.config.authOptions.authority,this.performanceClient=t}return BaseClient.prototype.createTokenRequestHeaders=function(e){var t={};if(t[s8.SZ.CONTENT_TYPE]=s8.gT.URL_FORM_CONTENT_TYPE,!this.config.systemOptions.preventCorsPreflight&&e)switch(e.type){case k.HOME_ACCOUNT_ID:try{var n=buildClientInfoFromHomeAccountId(e.credential);t[s8.SZ.CCS_HEADER]="Oid:"+n.uid+"@"+n.utid}catch(e){this.logger.verbose("Could not parse home account ID for CCS Header: "+e)}break;case k.UPN:t[s8.SZ.CCS_HEADER]="UPN: "+e.credential}return t},BaseClient.prototype.executePostToTokenEndpoint=function(e,t,n,o){return(0,s9.mG)(this,void 0,void 0,function(){var a;return(0,s9.Jh)(this,function(s){switch(s.label){case 0:return[4,this.networkManager.sendPostRequest(o,e,{body:t,headers:n})];case 1:return a=s.sent(),this.config.serverTelemetryManager&&a.status<500&&429!==a.status&&this.config.serverTelemetryManager.clearTelemetryCache(),[2,a]}})})},BaseClient.prototype.updateAuthority=function(e){if(!e.discoveryComplete())throw cD.e.createEndpointDiscoveryIncompleteError("Updated authority has not completed endpoint discovery.");this.authority=e},BaseClient.prototype.createTokenQueryParameters=function(e){var t=new lm;return e.tokenQueryParameters&&t.addExtraQueryParameters(e.tokenQueryParameters),t.createQueryString()},BaseClient}(),CacheRecord=function(e,t,n,o,a){this.account=e||null,this.idToken=t||null,this.accessToken=n||null,this.refreshToken=o||null,this.appMetadata=a||null};(g=R||(R={})).SW="sw",g.UHW="uhw";var ly=function(){function PopTokenGenerator(e,t){this.cryptoUtils=e,this.performanceClient=t}return PopTokenGenerator.prototype.generateCnf=function(e){var t,n;return(0,s9.mG)(this,void 0,void 0,function(){var o,a,s;return(0,s9.Jh)(this,function(c){switch(c.label){case 0:return null===(t=this.performanceClient)||void 0===t||t.addQueueMeasurement(w.PopTokenGenerateCnf,e.correlationId),null===(n=this.performanceClient)||void 0===n||n.setPreQueueTime(w.PopTokenGenerateKid,e.correlationId),[4,this.generateKid(e)];case 1:return o=c.sent(),a=this.cryptoUtils.base64Encode(JSON.stringify(o)),s={kid:o.kid,reqCnfString:a},[4,this.cryptoUtils.hashString(a)];case 2:return[2,(s.reqCnfHash=c.sent(),s)]}})})},PopTokenGenerator.prototype.generateKid=function(e){var t;return(0,s9.mG)(this,void 0,void 0,function(){return(0,s9.Jh)(this,function(n){switch(n.label){case 0:return null===(t=this.performanceClient)||void 0===t||t.addQueueMeasurement(w.PopTokenGenerateKid,e.correlationId),[4,this.cryptoUtils.getPublicKeyThumbprint(e)];case 1:return[2,{kid:n.sent(),xms_ksl:R.SW}]}})})},PopTokenGenerator.prototype.signPopToken=function(e,t,n){return(0,s9.mG)(this,void 0,void 0,function(){return(0,s9.Jh)(this,function(o){return[2,this.signPayload(e,t,n)]})})},PopTokenGenerator.prototype.signPayload=function(e,t,n,o){return(0,s9.mG)(this,void 0,void 0,function(){var a,s,c,l,u,h;return(0,s9.Jh)(this,function(p){switch(p.label){case 0:return a=n.resourceRequestMethod,s=n.resourceRequestUri,c=n.shrClaims,l=n.shrNonce,h=null==(u=s?new c4(s):void 0)?void 0:u.getUrlComponents(),[4,this.cryptoUtils.signJwt((0,s9.pi)({at:e,ts:c$.nowSeconds(),m:null==a?void 0:a.toUpperCase(),u:null==h?void 0:h.HostNameAndPort,nonce:l||this.cryptoUtils.createNewGuid(),p:null==h?void 0:h.AbsolutePath,q:(null==h?void 0:h.QueryString)?[[],h.QueryString]:void 0,client_claims:c||void 0},o),t,n.correlationId)];case 1:return[2,p.sent()]}})})},PopTokenGenerator}(),lv=function(){function TokenCacheContext(e,t){this.cache=e,this.hasChanged=t}return Object.defineProperty(TokenCacheContext.prototype,"cacheHasChanged",{get:function(){return this.hasChanged},enumerable:!1,configurable:!0}),Object.defineProperty(TokenCacheContext.prototype,"tokenCache",{get:function(){return this.cache},enumerable:!1,configurable:!0}),TokenCacheContext}(),lb=function(){function ResponseHandler(e,t,n,o,a,s,c){this.clientId=e,this.cacheStorage=t,this.cryptoObj=n,this.logger=o,this.serializableCache=a,this.persistencePlugin=s,this.performanceClient=c}return ResponseHandler.prototype.validateServerAuthorizationCodeResponse=function(e,t,n){if(!e.state||!t)throw e.state?cD.e.createStateNotFoundError("Cached State"):cD.e.createStateNotFoundError("Server State");if(decodeURIComponent(e.state)!==decodeURIComponent(t))throw cD.e.createStateMismatchError();if(e.error||e.error_description||e.suberror){if(co.isInteractionRequiredError(e.error,e.error_description,e.suberror))throw new co(e.error||s8.gT.EMPTY_STRING,e.error_description,e.suberror,e.timestamp||s8.gT.EMPTY_STRING,e.trace_id||s8.gT.EMPTY_STRING,e.correlation_id||s8.gT.EMPTY_STRING,e.claims||s8.gT.EMPTY_STRING);throw new ce(e.error||s8.gT.EMPTY_STRING,e.error_description,e.suberror)}e.client_info&&buildClientInfo(e.client_info,n)},ResponseHandler.prototype.validateTokenResponse=function(e){if(e.error||e.error_description||e.suberror){if(co.isInteractionRequiredError(e.error,e.error_description,e.suberror))throw new co(e.error,e.error_description,e.suberror,e.timestamp||s8.gT.EMPTY_STRING,e.trace_id||s8.gT.EMPTY_STRING,e.correlation_id||s8.gT.EMPTY_STRING,e.claims||s8.gT.EMPTY_STRING);var t=e.error_codes+" - ["+e.timestamp+"]: "+e.error_description+" - Correlation ID: "+e.correlation_id+" - Trace ID: "+e.trace_id;throw new ce(e.error,t,e.suberror)}},ResponseHandler.prototype.handleServerTokenResponse=function(e,t,n,o,a,s,c,l,u){var h;return(0,s9.mG)(this,void 0,void 0,function(){var p,f,m,g,y,v;return(0,s9.Jh)(this,function(b){switch(b.label){case 0:if(null===(h=this.performanceClient)||void 0===h||h.addQueueMeasurement(w.HandleServerTokenResponse,e.correlation_id),e.id_token){if(p=new cj(e.id_token||s8.gT.EMPTY_STRING,this.cryptoObj),a&&!cf.x.isEmpty(a.nonce)&&p.claims.nonce!==a.nonce)throw cD.e.createNonceMismatchError();if(o.maxAge||0===o.maxAge){if(!(f=p.claims.auth_time))throw cD.e.createAuthTimeNotFoundError();cj.checkMaxAge(f,o.maxAge)}}this.homeAccountIdentifier=cH.generateHomeAccountId(e.client_info||s8.gT.EMPTY_STRING,t.authorityType,this.logger,this.cryptoObj,p),a&&a.state&&(m=c1.parseRequestState(this.cryptoObj,a.state)),e.key_id=e.key_id||o.sshKid||void 0,g=this.generateCacheRecord(e,t,n,o,p,s,a),b.label=1;case 1:if(b.trys.push([1,,5,8]),!(this.persistencePlugin&&this.serializableCache))return[3,3];return this.logger.verbose("Persistence enabled, calling beforeCacheAccess"),y=new lv(this.serializableCache,!0),[4,this.persistencePlugin.beforeCacheAccess(y)];case 2:b.sent(),b.label=3;case 3:if(c&&!l&&g.account&&(v=g.account.generateAccountKey(),!this.cacheStorage.getAccount(v)))return this.logger.warning("Account used to refresh tokens not in persistence, refreshed tokens will not be stored in the cache"),[2,ResponseHandler.generateAuthenticationResult(this.cryptoObj,t,g,!1,o,p,m,void 0,u)];return[4,this.cacheStorage.saveCacheRecord(g)];case 4:return b.sent(),[3,8];case 5:if(!(this.persistencePlugin&&this.serializableCache&&y))return[3,7];return this.logger.verbose("Persistence enabled, calling afterCacheAccess"),[4,this.persistencePlugin.afterCacheAccess(y)];case 6:b.sent(),b.label=7;case 7:return[7];case 8:return[2,ResponseHandler.generateAuthenticationResult(this.cryptoObj,t,g,!1,o,p,m,e,u)]}})})},ResponseHandler.prototype.generateCacheRecord=function(e,t,n,o,a,s,c){var l,u,h=t.getPreferredCache();if(cf.x.isEmpty(h))throw cD.e.createInvalidCacheEnvironmentError();!cf.x.isEmpty(e.id_token)&&a&&(l=cU.createIdTokenEntity(this.homeAccountIdentifier,h,e.id_token||s8.gT.EMPTY_STRING,this.clientId,a.claims.tid||s8.gT.EMPTY_STRING),u=this.generateAccountEntity(e,a,t,c));var p=null;if(!cf.x.isEmpty(e.access_token)){var f=e.scope?cz.fromString(e.scope):new cz(o.scopes||[]),m=("string"==typeof e.expires_in?parseInt(e.expires_in,10):e.expires_in)||0,g=("string"==typeof e.ext_expires_in?parseInt(e.ext_expires_in,10):e.ext_expires_in)||0,y=("string"==typeof e.refresh_in?parseInt(e.refresh_in,10):e.refresh_in)||void 0,v=n+m,b=v+g,C=y&&y>0?n+y:void 0;p=cJ.createAccessTokenEntity(this.homeAccountIdentifier,h,e.access_token||s8.gT.EMPTY_STRING,this.clientId,a?a.claims.tid||s8.gT.EMPTY_STRING:t.tenant,f.printScopes(),v,b,this.cryptoObj,C,e.token_type,s,e.key_id,o.claims,o.requestedClaimsHash)}var _=null;cf.x.isEmpty(e.refresh_token)||(_=cY.createRefreshTokenEntity(this.homeAccountIdentifier,h,e.refresh_token||s8.gT.EMPTY_STRING,this.clientId,e.foci,s));var w=null;return cf.x.isEmpty(e.foci)||(w=cQ.createAppMetadataEntity(this.clientId,h,e.foci)),new CacheRecord(u,l,p,_,w)},ResponseHandler.prototype.generateAccountEntity=function(e,t,n,o){var a=n.authorityType,s=o?o.cloud_graph_host_name:s8.gT.EMPTY_STRING,c=o?o.msgraph_host:s8.gT.EMPTY_STRING;if(a===T.Adfs)return this.logger.verbose("Authority type is ADFS, creating ADFS account"),cH.createGenericAccount(this.homeAccountIdentifier,t,n,s,c);if(cf.x.isEmpty(e.client_info)&&"AAD"===n.protocolMode)throw cD.e.createClientInfoEmptyError();return e.client_info?cH.createAccount(e.client_info,this.homeAccountIdentifier,t,n,s,c):cH.createGenericAccount(this.homeAccountIdentifier,t,n,s,c)},ResponseHandler.generateAuthenticationResult=function(e,t,n,o,a,s,c,l,u){var h,p,f;return(0,s9.mG)(this,void 0,void 0,function(){var m,g,y,v,b,C,_,w,S,E,T;return(0,s9.Jh)(this,function(k){switch(k.label){case 0:if(m=s8.gT.EMPTY_STRING,g=[],y=null,b=s8.gT.EMPTY_STRING,!n.accessToken)return[3,4];if(n.accessToken.tokenType!==s8.hO.POP)return[3,2];if(C=new ly(e),w=(_=n.accessToken).secret,!(S=_.keyId))throw cD.e.createKeyIdMissingError();return[4,C.signPopToken(w,S,a)];case 1:return m=k.sent(),[3,3];case 2:m=n.accessToken.secret,k.label=3;case 3:g=cz.fromString(n.accessToken.target).asArray(),y=new Date(1e3*Number(n.accessToken.expiresOn)),v=new Date(1e3*Number(n.accessToken.extendedExpiresOn)),k.label=4;case 4:return n.appMetadata&&(b=n.appMetadata.familyId===s8.ch?s8.ch:s8.gT.EMPTY_STRING),E=(null==s?void 0:s.claims.oid)||(null==s?void 0:s.claims.sub)||s8.gT.EMPTY_STRING,T=(null==s?void 0:s.claims.tid)||s8.gT.EMPTY_STRING,(null==l?void 0:l.spa_accountid)&&n.account&&(n.account.nativeAccountId=null==l?void 0:l.spa_accountid),[2,{authority:t.canonicalAuthority,uniqueId:E,tenantId:T,scopes:g,account:n.account?n.account.getAccountInfo():null,idToken:s?s.rawToken:s8.gT.EMPTY_STRING,idTokenClaims:s?s.claims:{},accessToken:m,fromCache:o,expiresOn:y,correlationId:a.correlationId,requestId:u||s8.gT.EMPTY_STRING,extExpiresOn:v,familyId:b,tokenType:(null===(h=n.accessToken)||void 0===h?void 0:h.tokenType)||s8.gT.EMPTY_STRING,state:c?c.userRequestState:s8.gT.EMPTY_STRING,cloudGraphHostName:(null===(p=n.account)||void 0===p?void 0:p.cloudGraphHostName)||s8.gT.EMPTY_STRING,msGraphHost:(null===(f=n.account)||void 0===f?void 0:f.msGraphHost)||s8.gT.EMPTY_STRING,code:null==l?void 0:l.spa_code,fromNativeBroker:!1}]}})})},ResponseHandler}(),lC=function(e){function AuthorizationCodeClient(t,n){var o=e.call(this,t,n)||this;return o.includeRedirectUri=!0,o}return(0,s9.ZT)(AuthorizationCodeClient,e),AuthorizationCodeClient.prototype.getAuthCodeUrl=function(e){var t,n;return(0,s9.mG)(this,void 0,void 0,function(){var o;return(0,s9.Jh)(this,function(a){switch(a.label){case 0:return null===(t=this.performanceClient)||void 0===t||t.addQueueMeasurement(w.GetAuthCodeUrl,e.correlationId),null===(n=this.performanceClient)||void 0===n||n.setPreQueueTime(w.AuthClientCreateQueryString,e.correlationId),[4,this.createAuthCodeUrlQueryString(e)];case 1:return o=a.sent(),[2,c4.appendQueryString(this.authority.authorizationEndpoint,o)]}})})},AuthorizationCodeClient.prototype.acquireToken=function(e,t){var n,o,a,s,c,l;return(0,s9.mG)(this,void 0,void 0,function(){var u,h,p,f,m,g,y=this;return(0,s9.Jh)(this,function(v){switch(v.label){case 0:if(!e||!e.code)throw cD.e.createTokenRequestCannotBeMadeError();return null===(n=this.performanceClient)||void 0===n||n.addQueueMeasurement(w.AuthClientAcquireToken,e.correlationId),u=null===(o=this.performanceClient)||void 0===o?void 0:o.startMeasurement("AuthCodeClientAcquireToken",e.correlationId),this.logger.info("in acquireToken call in auth-code client"),h=c$.nowSeconds(),null===(a=this.performanceClient)||void 0===a||a.setPreQueueTime(w.AuthClientExecuteTokenRequest,e.correlationId),[4,this.executeTokenRequest(this.authority,e)];case 1:return f=null===(s=(p=v.sent()).headers)||void 0===s?void 0:s[s8.SZ.X_MS_REQUEST_ID],(m=null===(c=p.headers)||void 0===c?void 0:c[s8.SZ.X_MS_HTTP_VERSION])&&(null==u||u.addStaticFields({httpVerAuthority:m})),(g=new lb(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,this.config.serializableCache,this.config.persistencePlugin,this.performanceClient)).validateTokenResponse(p.body),null===(l=this.performanceClient)||void 0===l||l.setPreQueueTime(w.HandleServerTokenResponse,e.correlationId),[2,g.handleServerTokenResponse(p.body,this.authority,h,e,t,void 0,void 0,void 0,f).then(function(e){return null==u||u.endMeasurement({success:!0}),e}).catch(function(t){throw y.logger.verbose("Error in fetching token in ACC",e.correlationId),null==u||u.endMeasurement({errorCode:t.errorCode,subErrorCode:t.subError,success:!1}),t})]}})})},AuthorizationCodeClient.prototype.handleFragmentResponse=function(e,t){var n=new lb(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,null,null),o=new c4(e),a=c4.getDeserializedHash(o.getHash());if(n.validateServerAuthorizationCodeResponse(a,t,this.cryptoUtils),!a.code)throw cD.e.createNoAuthCodeInServerResponseError();return(0,s9.pi)((0,s9.pi)({},a),{code:a.code})},AuthorizationCodeClient.prototype.getLogoutUri=function(e){if(!e)throw cq.createEmptyLogoutRequestError();var t=this.createLogoutUrlQueryString(e);return c4.appendQueryString(this.authority.endSessionEndpoint,t)},AuthorizationCodeClient.prototype.executeTokenRequest=function(e,t){var n,o;return(0,s9.mG)(this,void 0,void 0,function(){var a,s,c,l,u,h,p;return(0,s9.Jh)(this,function(f){switch(f.label){case 0:return null===(n=this.performanceClient)||void 0===n||n.addQueueMeasurement(w.AuthClientExecuteTokenRequest,t.correlationId),null===(o=this.performanceClient)||void 0===o||o.setPreQueueTime(w.AuthClientCreateTokenRequestBody,t.correlationId),a=this.createTokenQueryParameters(t),s=c4.appendQueryString(e.tokenEndpoint,a),[4,this.createTokenRequestBody(t)];case 1:if(c=f.sent(),l=void 0,t.clientInfo)try{u=buildClientInfo(t.clientInfo,this.cryptoUtils),l={credential:""+u.uid+s8.Bv.CLIENT_INFO_SEPARATOR+u.utid,type:k.HOME_ACCOUNT_ID}}catch(e){this.logger.verbose("Could not parse client info for CCS Header: "+e)}return h=this.createTokenRequestHeaders(l||t.ccsCredential),p={clientId:this.config.authOptions.clientId,authority:e.canonicalAuthority,scopes:t.scopes,claims:t.claims,authenticationScheme:t.authenticationScheme,resourceRequestMethod:t.resourceRequestMethod,resourceRequestUri:t.resourceRequestUri,shrClaims:t.shrClaims,sshKid:t.sshKid},[2,this.executePostToTokenEndpoint(s,c,h,p)]}})})},AuthorizationCodeClient.prototype.createTokenRequestBody=function(e){var t,n;return(0,s9.mG)(this,void 0,void 0,function(){var o,a,s,c,l,u,h,p;return(0,s9.Jh)(this,function(f){switch(f.label){case 0:if(null===(t=this.performanceClient)||void 0===t||t.addQueueMeasurement(w.AuthClientCreateTokenRequestBody,e.correlationId),(o=new lm).addClientId(this.config.authOptions.clientId),this.includeRedirectUri?o.addRedirectUri(e.redirectUri):lf.validateRedirectUri(e.redirectUri),o.addScopes(e.scopes),o.addAuthorizationCode(e.code),o.addLibraryInfo(this.config.libraryInfo),o.addApplicationTelemetry(this.config.telemetry.application),o.addThrottling(),this.serverTelemetryManager&&o.addServerTelemetry(this.serverTelemetryManager),e.codeVerifier&&o.addCodeVerifier(e.codeVerifier),this.config.clientCredentials.clientSecret&&o.addClientSecret(this.config.clientCredentials.clientSecret),this.config.clientCredentials.clientAssertion&&(a=this.config.clientCredentials.clientAssertion,o.addClientAssertion(a.assertion),o.addClientAssertionType(a.assertionType)),o.addGrantType(s8.qJ.AUTHORIZATION_CODE_GRANT),o.addClientInfo(),e.authenticationScheme!==s8.hO.POP)return[3,2];return s=new ly(this.cryptoUtils,this.performanceClient),null===(n=this.performanceClient)||void 0===n||n.setPreQueueTime(w.PopTokenGenerateCnf,e.correlationId),[4,s.generateCnf(e)];case 1:return c=f.sent(),o.addPopToken(c.reqCnfString),[3,3];case 2:if(e.authenticationScheme===s8.hO.SSH){if(e.sshJwk)o.addSshJwk(e.sshJwk);else throw cq.createMissingSshJwkError()}f.label=3;case 3:if(l=e.correlationId||this.config.cryptoInterface.createNewGuid(),o.addCorrelationId(l),(!cf.x.isEmptyObj(e.claims)||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&o.addClaims(e.claims,this.config.authOptions.clientCapabilities),u=void 0,e.clientInfo)try{h=buildClientInfo(e.clientInfo,this.cryptoUtils),u={credential:""+h.uid+s8.Bv.CLIENT_INFO_SEPARATOR+h.utid,type:k.HOME_ACCOUNT_ID}}catch(e){this.logger.verbose("Could not parse client info for CCS Header: "+e)}else u=e.ccsCredential;if(this.config.systemOptions.preventCorsPreflight&&u)switch(u.type){case k.HOME_ACCOUNT_ID:try{h=buildClientInfoFromHomeAccountId(u.credential),o.addCcsOid(h)}catch(e){this.logger.verbose("Could not parse home account ID for CCS Header: "+e)}break;case k.UPN:o.addCcsUpn(u.credential)}return e.tokenBodyParameters&&o.addExtraQueryParameters(e.tokenBodyParameters),!e.enableSpaAuthorizationCode||e.tokenBodyParameters&&e.tokenBodyParameters[s8.Fo.RETURN_SPA_CODE]||o.addExtraQueryParameters(((p={})[s8.Fo.RETURN_SPA_CODE]="1",p)),[2,o.createQueryString()]}})})},AuthorizationCodeClient.prototype.createAuthCodeUrlQueryString=function(e){var t;return(0,s9.mG)(this,void 0,void 0,function(){var n,o,a,s,c,l,u;return(0,s9.Jh)(this,function(h){switch(h.label){case 0:if(null===(t=this.performanceClient)||void 0===t||t.addQueueMeasurement(w.AuthClientCreateQueryString,e.correlationId),(n=new lm).addClientId(this.config.authOptions.clientId),o=(0,s9.pr)(e.scopes||[],e.extraScopesToConsent||[]),n.addScopes(o),n.addRedirectUri(e.redirectUri),a=e.correlationId||this.config.cryptoInterface.createNewGuid(),n.addCorrelationId(a),n.addResponseMode(e.responseMode),n.addResponseTypeCode(),n.addLibraryInfo(this.config.libraryInfo),n.addApplicationTelemetry(this.config.telemetry.application),n.addClientInfo(),e.codeChallenge&&e.codeChallengeMethod&&n.addCodeChallengeParams(e.codeChallenge,e.codeChallengeMethod),e.prompt&&n.addPrompt(e.prompt),e.domainHint&&n.addDomainHint(e.domainHint),e.prompt!==s8.NJ.SELECT_ACCOUNT){if(e.sid&&e.prompt===s8.NJ.NONE)this.logger.verbose("createAuthCodeUrlQueryString: Prompt is none, adding sid from request"),n.addSid(e.sid);else if(e.account){if(s=this.extractAccountSid(e.account),c=this.extractLoginHint(e.account)){this.logger.verbose("createAuthCodeUrlQueryString: login_hint claim present on account"),n.addLoginHint(c);try{l=buildClientInfoFromHomeAccountId(e.account.homeAccountId),n.addCcsOid(l)}catch(e){this.logger.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header")}}else if(s&&e.prompt===s8.NJ.NONE){this.logger.verbose("createAuthCodeUrlQueryString: Prompt is none, adding sid from account"),n.addSid(s);try{l=buildClientInfoFromHomeAccountId(e.account.homeAccountId),n.addCcsOid(l)}catch(e){this.logger.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header")}}else if(e.loginHint)this.logger.verbose("createAuthCodeUrlQueryString: Adding login_hint from request"),n.addLoginHint(e.loginHint),n.addCcsUpn(e.loginHint);else if(e.account.username){this.logger.verbose("createAuthCodeUrlQueryString: Adding login_hint from account"),n.addLoginHint(e.account.username);try{l=buildClientInfoFromHomeAccountId(e.account.homeAccountId),n.addCcsOid(l)}catch(e){this.logger.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header")}}}else e.loginHint&&(this.logger.verbose("createAuthCodeUrlQueryString: No account, adding login_hint from request"),n.addLoginHint(e.loginHint),n.addCcsUpn(e.loginHint))}else this.logger.verbose("createAuthCodeUrlQueryString: Prompt is select_account, ignoring account hints");if(e.nonce&&n.addNonce(e.nonce),e.state&&n.addState(e.state),(!cf.x.isEmpty(e.claims)||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&n.addClaims(e.claims,this.config.authOptions.clientCapabilities),e.extraQueryParameters&&n.addExtraQueryParameters(e.extraQueryParameters),!e.nativeBroker||(n.addNativeBroker(),e.authenticationScheme!==s8.hO.POP))return[3,2];return[4,new ly(this.cryptoUtils).generateCnf(e)];case 1:u=h.sent(),n.addPopToken(u.reqCnfHash),h.label=2;case 2:return[2,n.createQueryString()]}})})},AuthorizationCodeClient.prototype.createLogoutUrlQueryString=function(e){var t=new lm;return e.postLogoutRedirectUri&&t.addPostLogoutRedirectUri(e.postLogoutRedirectUri),e.correlationId&&t.addCorrelationId(e.correlationId),e.idTokenHint&&t.addIdTokenHint(e.idTokenHint),e.state&&t.addState(e.state),e.logoutHint&&t.addLogoutHint(e.logoutHint),e.extraQueryParameters&&t.addExtraQueryParameters(e.extraQueryParameters),t.createQueryString()},AuthorizationCodeClient.prototype.extractAccountSid=function(e){var t;return(null===(t=e.idTokenClaims)||void 0===t?void 0:t.sid)||null},AuthorizationCodeClient.prototype.extractLoginHint=function(e){var t;return(null===(t=e.idTokenClaims)||void 0===t?void 0:t.login_hint)||null},AuthorizationCodeClient}(lg),l_={endpointMetadata:{"https://login.microsoftonline.com/common/":{token_endpoint:"https://login.microsoftonline.com/common/oauth2/v2.0/token",token_endpoint_auth_methods_supported:["client_secret_post","private_key_jwt","client_secret_basic"],jwks_uri:"https://login.microsoftonline.com/common/discovery/v2.0/keys",response_modes_supported:["query","fragment","form_post"],subject_types_supported:["pairwise"],id_token_signing_alg_values_supported:["RS256"],response_types_supported:["code","id_token","code id_token","id_token token"],scopes_supported:["openid","profile","email","offline_access"],issuer:"https://login.microsoftonline.com/{tenantid}/v2.0",request_uri_parameter_supported:!1,userinfo_endpoint:"https://graph.microsoft.com/oidc/userinfo",authorization_endpoint:"https://login.microsoftonline.com/common/oauth2/v2.0/authorize",device_authorization_endpoint:"https://login.microsoftonline.com/common/oauth2/v2.0/devicecode",http_logout_supported:!0,frontchannel_logout_supported:!0,end_session_endpoint:"https://login.microsoftonline.com/common/oauth2/v2.0/logout",claims_supported:["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],kerberos_endpoint:"https://login.microsoftonline.com/common/kerberos",tenant_region_scope:null,cloud_instance_name:"microsoftonline.com",cloud_graph_host_name:"graph.windows.net",msgraph_host:"graph.microsoft.com",rbac_url:"https://pas.windows.net"},"https://login.chinacloudapi.cn/common/":{token_endpoint:"https://login.chinacloudapi.cn/common/oauth2/v2.0/token",token_endpoint_auth_methods_supported:["client_secret_post","private_key_jwt","client_secret_basic"],jwks_uri:"https://login.chinacloudapi.cn/common/discovery/v2.0/keys",response_modes_supported:["query","fragment","form_post"],subject_types_supported:["pairwise"],id_token_signing_alg_values_supported:["RS256"],response_types_supported:["code","id_token","code id_token","id_token token"],scopes_supported:["openid","profile","email","offline_access"],issuer:"https://login.partner.microsoftonline.cn/{tenantid}/v2.0",request_uri_parameter_supported:!1,userinfo_endpoint:"https://microsoftgraph.chinacloudapi.cn/oidc/userinfo",authorization_endpoint:"https://login.chinacloudapi.cn/common/oauth2/v2.0/authorize",device_authorization_endpoint:"https://login.chinacloudapi.cn/common/oauth2/v2.0/devicecode",http_logout_supported:!0,frontchannel_logout_supported:!0,end_session_endpoint:"https://login.chinacloudapi.cn/common/oauth2/v2.0/logout",claims_supported:["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],kerberos_endpoint:"https://login.chinacloudapi.cn/common/kerberos",tenant_region_scope:null,cloud_instance_name:"partner.microsoftonline.cn",cloud_graph_host_name:"graph.chinacloudapi.cn",msgraph_host:"microsoftgraph.chinacloudapi.cn",rbac_url:"https://pas.chinacloudapi.cn"},"https://login.microsoftonline.us/common/":{token_endpoint:"https://login.microsoftonline.us/common/oauth2/v2.0/token",token_endpoint_auth_methods_supported:["client_secret_post","private_key_jwt","client_secret_basic"],jwks_uri:"https://login.microsoftonline.us/common/discovery/v2.0/keys",response_modes_supported:["query","fragment","form_post"],subject_types_supported:["pairwise"],id_token_signing_alg_values_supported:["RS256"],response_types_supported:["code","id_token","code id_token","id_token token"],scopes_supported:["openid","profile","email","offline_access"],issuer:"https://login.microsoftonline.us/{tenantid}/v2.0",request_uri_parameter_supported:!1,userinfo_endpoint:"https://graph.microsoft.com/oidc/userinfo",authorization_endpoint:"https://login.microsoftonline.us/common/oauth2/v2.0/authorize",device_authorization_endpoint:"https://login.microsoftonline.us/common/oauth2/v2.0/devicecode",http_logout_supported:!0,frontchannel_logout_supported:!0,end_session_endpoint:"https://login.microsoftonline.us/common/oauth2/v2.0/logout",claims_supported:["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],kerberos_endpoint:"https://login.microsoftonline.us/common/kerberos",tenant_region_scope:null,cloud_instance_name:"microsoftonline.us",cloud_graph_host_name:"graph.windows.net",msgraph_host:"graph.microsoft.com",rbac_url:"https://pasff.usgovcloudapi.net"},"https://login.microsoftonline.com/consumers/":{token_endpoint:"https://login.microsoftonline.com/consumers/oauth2/v2.0/token",token_endpoint_auth_methods_supported:["client_secret_post","private_key_jwt","client_secret_basic"],jwks_uri:"https://login.microsoftonline.com/consumers/discovery/v2.0/keys",response_modes_supported:["query","fragment","form_post"],subject_types_supported:["pairwise"],id_token_signing_alg_values_supported:["RS256"],response_types_supported:["code","id_token","code id_token","id_token token"],scopes_supported:["openid","profile","email","offline_access"],issuer:"https://login.microsoftonline.com/9188040d-6c67-4c5b-b112-36a304b66dad/v2.0",request_uri_parameter_supported:!1,userinfo_endpoint:"https://graph.microsoft.com/oidc/userinfo",authorization_endpoint:"https://login.microsoftonline.com/consumers/oauth2/v2.0/authorize",device_authorization_endpoint:"https://login.microsoftonline.com/consumers/oauth2/v2.0/devicecode",http_logout_supported:!0,frontchannel_logout_supported:!0,end_session_endpoint:"https://login.microsoftonline.com/consumers/oauth2/v2.0/logout",claims_supported:["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],kerberos_endpoint:"https://login.microsoftonline.com/consumers/kerberos",tenant_region_scope:null,cloud_instance_name:"microsoftonline.com",cloud_graph_host_name:"graph.windows.net",msgraph_host:"graph.microsoft.com",rbac_url:"https://pas.windows.net"},"https://login.chinacloudapi.cn/consumers/":{token_endpoint:"https://login.chinacloudapi.cn/consumers/oauth2/v2.0/token",token_endpoint_auth_methods_supported:["client_secret_post","private_key_jwt","client_secret_basic"],jwks_uri:"https://login.chinacloudapi.cn/consumers/discovery/v2.0/keys",response_modes_supported:["query","fragment","form_post"],subject_types_supported:["pairwise"],id_token_signing_alg_values_supported:["RS256"],response_types_supported:["code","id_token","code id_token","id_token token"],scopes_supported:["openid","profile","email","offline_access"],issuer:"https://login.partner.microsoftonline.cn/9188040d-6c67-4c5b-b112-36a304b66dad/v2.0",request_uri_parameter_supported:!1,userinfo_endpoint:"https://microsoftgraph.chinacloudapi.cn/oidc/userinfo",authorization_endpoint:"https://login.chinacloudapi.cn/consumers/oauth2/v2.0/authorize",device_authorization_endpoint:"https://login.chinacloudapi.cn/consumers/oauth2/v2.0/devicecode",http_logout_supported:!0,frontchannel_logout_supported:!0,end_session_endpoint:"https://login.chinacloudapi.cn/consumers/oauth2/v2.0/logout",claims_supported:["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],kerberos_endpoint:"https://login.chinacloudapi.cn/consumers/kerberos",tenant_region_scope:null,cloud_instance_name:"partner.microsoftonline.cn",cloud_graph_host_name:"graph.chinacloudapi.cn",msgraph_host:"microsoftgraph.chinacloudapi.cn",rbac_url:"https://pas.chinacloudapi.cn"},"https://login.microsoftonline.us/consumers/":{token_endpoint:"https://login.microsoftonline.us/consumers/oauth2/v2.0/token",token_endpoint_auth_methods_supported:["client_secret_post","private_key_jwt","client_secret_basic"],jwks_uri:"https://login.microsoftonline.us/consumers/discovery/v2.0/keys",response_modes_supported:["query","fragment","form_post"],subject_types_supported:["pairwise"],id_token_signing_alg_values_supported:["RS256"],response_types_supported:["code","id_token","code id_token","id_token token"],scopes_supported:["openid","profile","email","offline_access"],issuer:"https://login.microsoftonline.us/9188040d-6c67-4c5b-b112-36a304b66dad/v2.0",request_uri_parameter_supported:!1,userinfo_endpoint:"https://graph.microsoft.com/oidc/userinfo",authorization_endpoint:"https://login.microsoftonline.us/consumers/oauth2/v2.0/authorize",device_authorization_endpoint:"https://login.microsoftonline.us/consumers/oauth2/v2.0/devicecode",http_logout_supported:!0,frontchannel_logout_supported:!0,end_session_endpoint:"https://login.microsoftonline.us/consumers/oauth2/v2.0/logout",claims_supported:["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],kerberos_endpoint:"https://login.microsoftonline.us/consumers/kerberos",tenant_region_scope:null,cloud_instance_name:"microsoftonline.us",cloud_graph_host_name:"graph.windows.net",msgraph_host:"graph.microsoft.com",rbac_url:"https://pasff.usgovcloudapi.net"},"https://login.microsoftonline.com/organizations/":{token_endpoint:"https://login.microsoftonline.com/organizations/oauth2/v2.0/token",token_endpoint_auth_methods_supported:["client_secret_post","private_key_jwt","client_secret_basic"],jwks_uri:"https://login.microsoftonline.com/organizations/discovery/v2.0/keys",response_modes_supported:["query","fragment","form_post"],subject_types_supported:["pairwise"],id_token_signing_alg_values_supported:["RS256"],response_types_supported:["code","id_token","code id_token","id_token token"],scopes_supported:["openid","profile","email","offline_access"],issuer:"https://login.microsoftonline.com/{tenantid}/v2.0",request_uri_parameter_supported:!1,userinfo_endpoint:"https://graph.microsoft.com/oidc/userinfo",authorization_endpoint:"https://login.microsoftonline.com/organizations/oauth2/v2.0/authorize",device_authorization_endpoint:"https://login.microsoftonline.com/organizations/oauth2/v2.0/devicecode",http_logout_supported:!0,frontchannel_logout_supported:!0,end_session_endpoint:"https://login.microsoftonline.com/organizations/oauth2/v2.0/logout",claims_supported:["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],kerberos_endpoint:"https://login.microsoftonline.com/organizations/kerberos",tenant_region_scope:null,cloud_instance_name:"microsoftonline.com",cloud_graph_host_name:"graph.windows.net",msgraph_host:"graph.microsoft.com",rbac_url:"https://pas.windows.net"},"https://login.chinacloudapi.cn/organizations/":{token_endpoint:"https://login.chinacloudapi.cn/organizations/oauth2/v2.0/token",token_endpoint_auth_methods_supported:["client_secret_post","private_key_jwt","client_secret_basic"],jwks_uri:"https://login.chinacloudapi.cn/organizations/discovery/v2.0/keys",response_modes_supported:["query","fragment","form_post"],subject_types_supported:["pairwise"],id_token_signing_alg_values_supported:["RS256"],response_types_supported:["code","id_token","code id_token","id_token token"],scopes_supported:["openid","profile","email","offline_access"],issuer:"https://login.partner.microsoftonline.cn/{tenantid}/v2.0",request_uri_parameter_supported:!1,userinfo_endpoint:"https://microsoftgraph.chinacloudapi.cn/oidc/userinfo",authorization_endpoint:"https://login.chinacloudapi.cn/organizations/oauth2/v2.0/authorize",device_authorization_endpoint:"https://login.chinacloudapi.cn/organizations/oauth2/v2.0/devicecode",http_logout_supported:!0,frontchannel_logout_supported:!0,end_session_endpoint:"https://login.chinacloudapi.cn/organizations/oauth2/v2.0/logout",claims_supported:["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],kerberos_endpoint:"https://login.chinacloudapi.cn/organizations/kerberos",tenant_region_scope:null,cloud_instance_name:"partner.microsoftonline.cn",cloud_graph_host_name:"graph.chinacloudapi.cn",msgraph_host:"microsoftgraph.chinacloudapi.cn",rbac_url:"https://pas.chinacloudapi.cn"},"https://login.microsoftonline.us/organizations/":{token_endpoint:"https://login.microsoftonline.us/organizations/oauth2/v2.0/token",token_endpoint_auth_methods_supported:["client_secret_post","private_key_jwt","client_secret_basic"],jwks_uri:"https://login.microsoftonline.us/organizations/discovery/v2.0/keys",response_modes_supported:["query","fragment","form_post"],subject_types_supported:["pairwise"],id_token_signing_alg_values_supported:["RS256"],response_types_supported:["code","id_token","code id_token","id_token token"],scopes_supported:["openid","profile","email","offline_access"],issuer:"https://login.microsoftonline.us/{tenantid}/v2.0",request_uri_parameter_supported:!1,userinfo_endpoint:"https://graph.microsoft.com/oidc/userinfo",authorization_endpoint:"https://login.microsoftonline.us/organizations/oauth2/v2.0/authorize",device_authorization_endpoint:"https://login.microsoftonline.us/organizations/oauth2/v2.0/devicecode",http_logout_supported:!0,frontchannel_logout_supported:!0,end_session_endpoint:"https://login.microsoftonline.us/organizations/oauth2/v2.0/logout",claims_supported:["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],kerberos_endpoint:"https://login.microsoftonline.us/organizations/kerberos",tenant_region_scope:null,cloud_instance_name:"microsoftonline.us",cloud_graph_host_name:"graph.windows.net",msgraph_host:"graph.microsoft.com",rbac_url:"https://pasff.usgovcloudapi.net"}},instanceDiscoveryMetadata:{"https://login.microsoftonline.com/common/":{tenant_discovery_endpoint:"https://login.microsoftonline.com/common/v2.0/.well-known/openid-configuration","api-version":"1.1",metadata:[{preferred_network:"login.microsoftonline.com",preferred_cache:"login.windows.net",aliases:["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"]},{preferred_network:"login.partner.microsoftonline.cn",preferred_cache:"login.partner.microsoftonline.cn",aliases:["login.partner.microsoftonline.cn","login.chinacloudapi.cn"]},{preferred_network:"login.microsoftonline.de",preferred_cache:"login.microsoftonline.de",aliases:["login.microsoftonline.de"]},{preferred_network:"login.microsoftonline.us",preferred_cache:"login.microsoftonline.us",aliases:["login.microsoftonline.us","login.usgovcloudapi.net"]},{preferred_network:"login-us.microsoftonline.com",preferred_cache:"login-us.microsoftonline.com",aliases:["login-us.microsoftonline.com"]}]},"https://login.chinacloudapi.cn/common/":{tenant_discovery_endpoint:"https://login.chinacloudapi.cn/common/v2.0/.well-known/openid-configuration","api-version":"1.1",metadata:[{preferred_network:"login.microsoftonline.com",preferred_cache:"login.windows.net",aliases:["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"]},{preferred_network:"login.partner.microsoftonline.cn",preferred_cache:"login.partner.microsoftonline.cn",aliases:["login.partner.microsoftonline.cn","login.chinacloudapi.cn"]},{preferred_network:"login.microsoftonline.de",preferred_cache:"login.microsoftonline.de",aliases:["login.microsoftonline.de"]},{preferred_network:"login.microsoftonline.us",preferred_cache:"login.microsoftonline.us",aliases:["login.microsoftonline.us","login.usgovcloudapi.net"]},{preferred_network:"login-us.microsoftonline.com",preferred_cache:"login-us.microsoftonline.com",aliases:["login-us.microsoftonline.com"]}]},"https://login.microsoftonline.us/common/":{tenant_discovery_endpoint:"https://login.microsoftonline.us/common/v2.0/.well-known/openid-configuration","api-version":"1.1",metadata:[{preferred_network:"login.microsoftonline.com",preferred_cache:"login.windows.net",aliases:["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"]},{preferred_network:"login.partner.microsoftonline.cn",preferred_cache:"login.partner.microsoftonline.cn",aliases:["login.partner.microsoftonline.cn","login.chinacloudapi.cn"]},{preferred_network:"login.microsoftonline.de",preferred_cache:"login.microsoftonline.de",aliases:["login.microsoftonline.de"]},{preferred_network:"login.microsoftonline.us",preferred_cache:"login.microsoftonline.us",aliases:["login.microsoftonline.us","login.usgovcloudapi.net"]},{preferred_network:"login-us.microsoftonline.com",preferred_cache:"login-us.microsoftonline.com",aliases:["login-us.microsoftonline.com"]}]},"https://login.microsoftonline.com/consumers/":{tenant_discovery_endpoint:"https://login.microsoftonline.com/consumers/v2.0/.well-known/openid-configuration","api-version":"1.1",metadata:[{preferred_network:"login.microsoftonline.com",preferred_cache:"login.windows.net",aliases:["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"]},{preferred_network:"login.partner.microsoftonline.cn",preferred_cache:"login.partner.microsoftonline.cn",aliases:["login.partner.microsoftonline.cn","login.chinacloudapi.cn"]},{preferred_network:"login.microsoftonline.de",preferred_cache:"login.microsoftonline.de",aliases:["login.microsoftonline.de"]},{preferred_network:"login.microsoftonline.us",preferred_cache:"login.microsoftonline.us",aliases:["login.microsoftonline.us","login.usgovcloudapi.net"]},{preferred_network:"login-us.microsoftonline.com",preferred_cache:"login-us.microsoftonline.com",aliases:["login-us.microsoftonline.com"]}]},"https://login.chinacloudapi.cn/consumers/":{tenant_discovery_endpoint:"https://login.chinacloudapi.cn/consumers/v2.0/.well-known/openid-configuration","api-version":"1.1",metadata:[{preferred_network:"login.microsoftonline.com",preferred_cache:"login.windows.net",aliases:["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"]},{preferred_network:"login.partner.microsoftonline.cn",preferred_cache:"login.partner.microsoftonline.cn",aliases:["login.partner.microsoftonline.cn","login.chinacloudapi.cn"]},{preferred_network:"login.microsoftonline.de",preferred_cache:"login.microsoftonline.de",aliases:["login.microsoftonline.de"]},{preferred_network:"login.microsoftonline.us",preferred_cache:"login.microsoftonline.us",aliases:["login.microsoftonline.us","login.usgovcloudapi.net"]},{preferred_network:"login-us.microsoftonline.com",preferred_cache:"login-us.microsoftonline.com",aliases:["login-us.microsoftonline.com"]}]},"https://login.microsoftonline.us/consumers/":{tenant_discovery_endpoint:"https://login.microsoftonline.us/consumers/v2.0/.well-known/openid-configuration","api-version":"1.1",metadata:[{preferred_network:"login.microsoftonline.com",preferred_cache:"login.windows.net",aliases:["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"]},{preferred_network:"login.partner.microsoftonline.cn",preferred_cache:"login.partner.microsoftonline.cn",aliases:["login.partner.microsoftonline.cn","login.chinacloudapi.cn"]},{preferred_network:"login.microsoftonline.de",preferred_cache:"login.microsoftonline.de",aliases:["login.microsoftonline.de"]},{preferred_network:"login.microsoftonline.us",preferred_cache:"login.microsoftonline.us",aliases:["login.microsoftonline.us","login.usgovcloudapi.net"]},{preferred_network:"login-us.microsoftonline.com",preferred_cache:"login-us.microsoftonline.com",aliases:["login-us.microsoftonline.com"]}]},"https://login.microsoftonline.com/organizations/":{tenant_discovery_endpoint:"https://login.microsoftonline.com/organizations/v2.0/.well-known/openid-configuration","api-version":"1.1",metadata:[{preferred_network:"login.microsoftonline.com",preferred_cache:"login.windows.net",aliases:["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"]},{preferred_network:"login.partner.microsoftonline.cn",preferred_cache:"login.partner.microsoftonline.cn",aliases:["login.partner.microsoftonline.cn","login.chinacloudapi.cn"]},{preferred_network:"login.microsoftonline.de",preferred_cache:"login.microsoftonline.de",aliases:["login.microsoftonline.de"]},{preferred_network:"login.microsoftonline.us",preferred_cache:"login.microsoftonline.us",aliases:["login.microsoftonline.us","login.usgovcloudapi.net"]},{preferred_network:"login-us.microsoftonline.com",preferred_cache:"login-us.microsoftonline.com",aliases:["login-us.microsoftonline.com"]}]},"https://login.chinacloudapi.cn/organizations/":{tenant_discovery_endpoint:"https://login.chinacloudapi.cn/organizations/v2.0/.well-known/openid-configuration","api-version":"1.1",metadata:[{preferred_network:"login.microsoftonline.com",preferred_cache:"login.windows.net",aliases:["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"]},{preferred_network:"login.partner.microsoftonline.cn",preferred_cache:"login.partner.microsoftonline.cn",aliases:["login.partner.microsoftonline.cn","login.chinacloudapi.cn"]},{preferred_network:"login.microsoftonline.de",preferred_cache:"login.microsoftonline.de",aliases:["login.microsoftonline.de"]},{preferred_network:"login.microsoftonline.us",preferred_cache:"login.microsoftonline.us",aliases:["login.microsoftonline.us","login.usgovcloudapi.net"]},{preferred_network:"login-us.microsoftonline.com",preferred_cache:"login-us.microsoftonline.com",aliases:["login-us.microsoftonline.com"]}]},"https://login.microsoftonline.us/organizations/":{tenant_discovery_endpoint:"https://login.microsoftonline.us/organizations/v2.0/.well-known/openid-configuration","api-version":"1.1",metadata:[{preferred_network:"login.microsoftonline.com",preferred_cache:"login.windows.net",aliases:["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"]},{preferred_network:"login.partner.microsoftonline.cn",preferred_cache:"login.partner.microsoftonline.cn",aliases:["login.partner.microsoftonline.cn","login.chinacloudapi.cn"]},{preferred_network:"login.microsoftonline.de",preferred_cache:"login.microsoftonline.de",aliases:["login.microsoftonline.de"]},{preferred_network:"login.microsoftonline.us",preferred_cache:"login.microsoftonline.us",aliases:["login.microsoftonline.us","login.usgovcloudapi.net"]},{preferred_network:"login-us.microsoftonline.com",preferred_cache:"login-us.microsoftonline.com",aliases:["login-us.microsoftonline.com"]}]}}},lw=l_.endpointMetadata,lS=l_.instanceDiscoveryMetadata,lE=function(){function RegionDiscovery(e,t,n){this.networkInterface=e,this.performanceClient=t,this.correlationId=n}return RegionDiscovery.prototype.detectRegion=function(e,t){var n,o,a,s;return(0,s9.mG)(this,void 0,void 0,function(){var c,l,u,h,p;return(0,s9.Jh)(this,function(f){switch(f.label){case 0:if(null===(n=this.performanceClient)||void 0===n||n.addQueueMeasurement(w.RegionDiscoveryDetectRegion,this.correlationId),c=e)return[3,8];l=RegionDiscovery.IMDS_OPTIONS,f.label=1;case 1:return f.trys.push([1,6,,7]),null===(o=this.performanceClient)||void 0===o||o.setPreQueueTime(w.RegionDiscoveryGetRegionFromIMDS,this.correlationId),[4,this.getRegionFromIMDS(s8.gT.IMDS_VERSION,l)];case 2:if((u=f.sent()).status===s8.YY.httpSuccess&&(c=u.body,t.region_source=s8.W.IMDS),u.status!==s8.YY.httpBadRequest)return[3,5];return null===(a=this.performanceClient)||void 0===a||a.setPreQueueTime(w.RegionDiscoveryGetCurrentVersion,this.correlationId),[4,this.getCurrentVersion(l)];case 3:if(!(h=f.sent()))return t.region_source=s8.W.FAILED_AUTO_DETECTION,[2,null];return null===(s=this.performanceClient)||void 0===s||s.setPreQueueTime(w.RegionDiscoveryGetRegionFromIMDS,this.correlationId),[4,this.getRegionFromIMDS(h,l)];case 4:(p=f.sent()).status===s8.YY.httpSuccess&&(c=p.body,t.region_source=s8.W.IMDS),f.label=5;case 5:return[3,7];case 6:return f.sent(),t.region_source=s8.W.FAILED_AUTO_DETECTION,[2,null];case 7:return[3,9];case 8:t.region_source=s8.W.ENVIRONMENT_VARIABLE,f.label=9;case 9:return c||(t.region_source=s8.W.FAILED_AUTO_DETECTION),[2,c||null]}})})},RegionDiscovery.prototype.getRegionFromIMDS=function(e,t){var n;return(0,s9.mG)(this,void 0,void 0,function(){return(0,s9.Jh)(this,function(o){return null===(n=this.performanceClient)||void 0===n||n.addQueueMeasurement(w.RegionDiscoveryGetRegionFromIMDS,this.correlationId),[2,this.networkInterface.sendGetRequestAsync(s8.gT.IMDS_ENDPOINT+"?api-version="+e+"&format=text",t,s8.gT.IMDS_TIMEOUT)]})})},RegionDiscovery.prototype.getCurrentVersion=function(e){var t;return(0,s9.mG)(this,void 0,void 0,function(){var n;return(0,s9.Jh)(this,function(o){switch(o.label){case 0:null===(t=this.performanceClient)||void 0===t||t.addQueueMeasurement(w.RegionDiscoveryGetCurrentVersion,this.correlationId),o.label=1;case 1:return o.trys.push([1,3,,4]),[4,this.networkInterface.sendGetRequestAsync(s8.gT.IMDS_ENDPOINT+"?format=json",e)];case 2:if((n=o.sent()).status===s8.YY.httpBadRequest&&n.body&&n.body["newest-versions"]&&n.body["newest-versions"].length>0)return[2,n.body["newest-versions"][0]];return[2,null];case 3:return o.sent(),[2,null];case 4:return[2]}})})},RegionDiscovery.IMDS_OPTIONS={headers:{Metadata:"true"}},RegionDiscovery}(),lT=function(){function Authority(e,t,n,o,a,s,c){this.canonicalAuthority=e,this._canonicalAuthority.validateAsUri(),this.networkInterface=t,this.cacheManager=n,this.authorityOptions=o,this.regionDiscoveryMetadata={region_used:void 0,region_source:void 0,region_outcome:void 0},this.logger=a,this.performanceClient=s,this.correlationId=c,this.regionDiscovery=new lE(t,this.performanceClient,this.correlationId)}return Object.defineProperty(Authority.prototype,"authorityType",{get:function(){if(this.canonicalAuthorityUrlComponents.HostNameAndPort.endsWith(s8.gT.CIAM_AUTH_URL))return T.Ciam;var e=this.canonicalAuthorityUrlComponents.PathSegments;if(e.length)switch(e[0].toLowerCase()){case s8.gT.ADFS:return T.Adfs;case s8.gT.DSTS:return T.Dsts}return T.Default},enumerable:!1,configurable:!0}),Object.defineProperty(Authority.prototype,"protocolMode",{get:function(){return this.authorityOptions.protocolMode},enumerable:!1,configurable:!0}),Object.defineProperty(Authority.prototype,"options",{get:function(){return this.authorityOptions},enumerable:!1,configurable:!0}),Object.defineProperty(Authority.prototype,"canonicalAuthority",{get:function(){return this._canonicalAuthority.urlString},set:function(e){this._canonicalAuthority=new c4(e),this._canonicalAuthority.validateAsUri(),this._canonicalAuthorityUrlComponents=null},enumerable:!1,configurable:!0}),Object.defineProperty(Authority.prototype,"canonicalAuthorityUrlComponents",{get:function(){return this._canonicalAuthorityUrlComponents||(this._canonicalAuthorityUrlComponents=this._canonicalAuthority.getUrlComponents()),this._canonicalAuthorityUrlComponents},enumerable:!1,configurable:!0}),Object.defineProperty(Authority.prototype,"hostnameAndPort",{get:function(){return this.canonicalAuthorityUrlComponents.HostNameAndPort.toLowerCase()},enumerable:!1,configurable:!0}),Object.defineProperty(Authority.prototype,"tenant",{get:function(){return this.canonicalAuthorityUrlComponents.PathSegments[0]},enumerable:!1,configurable:!0}),Object.defineProperty(Authority.prototype,"authorizationEndpoint",{get:function(){if(this.discoveryComplete()){var e=this.replacePath(this.metadata.authorization_endpoint);return this.replaceTenant(e)}throw cD.e.createEndpointDiscoveryIncompleteError("Discovery incomplete.")},enumerable:!1,configurable:!0}),Object.defineProperty(Authority.prototype,"tokenEndpoint",{get:function(){if(this.discoveryComplete()){var e=this.replacePath(this.metadata.token_endpoint);return this.replaceTenant(e)}throw cD.e.createEndpointDiscoveryIncompleteError("Discovery incomplete.")},enumerable:!1,configurable:!0}),Object.defineProperty(Authority.prototype,"deviceCodeEndpoint",{get:function(){if(this.discoveryComplete()){var e=this.replacePath(this.metadata.token_endpoint.replace("/token","/devicecode"));return this.replaceTenant(e)}throw cD.e.createEndpointDiscoveryIncompleteError("Discovery incomplete.")},enumerable:!1,configurable:!0}),Object.defineProperty(Authority.prototype,"endSessionEndpoint",{get:function(){if(this.discoveryComplete()){if(!this.metadata.end_session_endpoint)throw cD.e.createLogoutNotSupportedError();var e=this.replacePath(this.metadata.end_session_endpoint);return this.replaceTenant(e)}throw cD.e.createEndpointDiscoveryIncompleteError("Discovery incomplete.")},enumerable:!1,configurable:!0}),Object.defineProperty(Authority.prototype,"selfSignedJwtAudience",{get:function(){if(this.discoveryComplete()){var e=this.replacePath(this.metadata.issuer);return this.replaceTenant(e)}throw cD.e.createEndpointDiscoveryIncompleteError("Discovery incomplete.")},enumerable:!1,configurable:!0}),Object.defineProperty(Authority.prototype,"jwksUri",{get:function(){if(this.discoveryComplete()){var e=this.replacePath(this.metadata.jwks_uri);return this.replaceTenant(e)}throw cD.e.createEndpointDiscoveryIncompleteError("Discovery incomplete.")},enumerable:!1,configurable:!0}),Authority.prototype.replaceTenant=function(e){return e.replace(/{tenant}|{tenantid}/g,this.tenant)},Authority.prototype.replacePath=function(e){var t=e,n=new c4(this.metadata.canonical_authority).getUrlComponents().PathSegments;return this.canonicalAuthorityUrlComponents.PathSegments.forEach(function(e,o){var a=n[o];e!==a&&(t=t.replace("/"+a+"/","/"+e+"/"))}),t},Object.defineProperty(Authority.prototype,"defaultOpenIdConfigurationEndpoint",{get:function(){return this.authorityType===T.Adfs||this.authorityType===T.Dsts||this.protocolMode===I.OIDC?this.canonicalAuthority+".well-known/openid-configuration":this.canonicalAuthority+"v2.0/.well-known/openid-configuration"},enumerable:!1,configurable:!0}),Authority.prototype.discoveryComplete=function(){return!!this.metadata},Authority.prototype.resolveEndpointsAsync=function(){var e,t,n;return(0,s9.mG)(this,void 0,void 0,function(){var o,a,s,c;return(0,s9.Jh)(this,function(l){switch(l.label){case 0:return null===(e=this.performanceClient)||void 0===e||e.addQueueMeasurement(w.AuthorityResolveEndpointsAsync,this.correlationId),(o=this.cacheManager.getAuthorityMetadataByAlias(this.hostnameAndPort))||(o=new cZ).updateCanonicalAuthority(this.canonicalAuthority),null===(t=this.performanceClient)||void 0===t||t.setPreQueueTime(w.AuthorityUpdateCloudDiscoveryMetadata,this.correlationId),[4,this.updateCloudDiscoveryMetadata(o)];case 1:return a=l.sent(),this.canonicalAuthority=this.canonicalAuthority.replace(this.hostnameAndPort,o.preferred_network),null===(n=this.performanceClient)||void 0===n||n.setPreQueueTime(w.AuthorityUpdateEndpointMetadata,this.correlationId),[4,this.updateEndpointMetadata(o)];case 2:return s=l.sent(),a!==s8.pQ.CACHE&&s!==s8.pQ.CACHE&&(o.resetExpiresAt(),o.updateCanonicalAuthority(this.canonicalAuthority)),c=this.cacheManager.generateAuthorityMetadataCacheKey(o.preferred_cache),this.cacheManager.setAuthorityMetadata(c,o),this.metadata=o,[2]}})})},Authority.prototype.updateEndpointMetadata=function(e){var t,n,o,a,s,c;return(0,s9.mG)(this,void 0,void 0,function(){var l,u;return(0,s9.Jh)(this,function(h){switch(h.label){case 0:if(null===(t=this.performanceClient)||void 0===t||t.addQueueMeasurement(w.AuthorityUpdateEndpointMetadata,this.correlationId),l=this.getEndpointMetadataFromConfig())return e.updateEndpointMetadata(l,!1),[2,s8.pQ.CONFIG];if(this.isAuthoritySameType(e)&&e.endpointsFromNetwork&&!e.isExpired())return[2,s8.pQ.CACHE];return null===(n=this.performanceClient)||void 0===n||n.setPreQueueTime(w.AuthorityGetEndpointMetadataFromNetwork,this.correlationId),[4,this.getEndpointMetadataFromNetwork()];case 1:if(!(l=h.sent()))return[3,4];if(!(null===(o=this.authorityOptions.azureRegionConfiguration)||void 0===o?void 0:o.azureRegion))return[3,3];return null===(a=this.performanceClient)||void 0===a||a.setPreQueueTime(w.AuthorityUpdateMetadataWithRegionalInformation,this.correlationId),[4,this.updateMetadataWithRegionalInformation(l)];case 2:l=h.sent(),h.label=3;case 3:return e.updateEndpointMetadata(l,!0),[2,s8.pQ.NETWORK];case 4:if(!((u=this.getEndpointMetadataFromHardcodedValues())&&!this.authorityOptions.skipAuthorityMetadataCache))return[3,7];if(!(null===(s=this.authorityOptions.azureRegionConfiguration)||void 0===s?void 0:s.azureRegion))return[3,6];return null===(c=this.performanceClient)||void 0===c||c.setPreQueueTime(w.AuthorityUpdateMetadataWithRegionalInformation,this.correlationId),[4,this.updateMetadataWithRegionalInformation(u)];case 5:u=h.sent(),h.label=6;case 6:return e.updateEndpointMetadata(u,!1),[2,s8.pQ.HARDCODED_VALUES];case 7:throw cD.e.createUnableToGetOpenidConfigError(this.defaultOpenIdConfigurationEndpoint)}})})},Authority.prototype.isAuthoritySameType=function(e){return new c4(e.canonical_authority).getUrlComponents().PathSegments.length===this.canonicalAuthorityUrlComponents.PathSegments.length},Authority.prototype.getEndpointMetadataFromConfig=function(){if(this.authorityOptions.authorityMetadata)try{return JSON.parse(this.authorityOptions.authorityMetadata)}catch(e){throw cq.createInvalidAuthorityMetadataError()}return null},Authority.prototype.getEndpointMetadataFromNetwork=function(){var e;return(0,s9.mG)(this,void 0,void 0,function(){var t,n;return(0,s9.Jh)(this,function(o){switch(o.label){case 0:null===(e=this.performanceClient)||void 0===e||e.addQueueMeasurement(w.AuthorityGetEndpointMetadataFromNetwork,this.correlationId),t={},o.label=1;case 1:return o.trys.push([1,3,,4]),[4,this.networkInterface.sendGetRequestAsync(this.defaultOpenIdConfigurationEndpoint,t)];case 2:var a;return[2,(a=(n=o.sent()).body).hasOwnProperty("authorization_endpoint")&&a.hasOwnProperty("token_endpoint")&&a.hasOwnProperty("issuer")&&a.hasOwnProperty("jwks_uri")?n.body:null];case 3:return o.sent(),[2,null];case 4:return[2]}})})},Authority.prototype.getEndpointMetadataFromHardcodedValues=function(){return this.canonicalAuthority in lw?lw[this.canonicalAuthority]:null},Authority.prototype.updateMetadataWithRegionalInformation=function(e){var t,n,o,a,s,c,l;return(0,s9.mG)(this,void 0,void 0,function(){var u,h;return(0,s9.Jh)(this,function(p){switch(p.label){case 0:return null===(t=this.performanceClient)||void 0===t||t.addQueueMeasurement(w.AuthorityUpdateMetadataWithRegionalInformation,this.correlationId),null===(n=this.performanceClient)||void 0===n||n.setPreQueueTime(w.RegionDiscoveryDetectRegion,this.correlationId),[4,this.regionDiscovery.detectRegion(null===(o=this.authorityOptions.azureRegionConfiguration)||void 0===o?void 0:o.environmentRegion,this.regionDiscoveryMetadata)];case 1:if(u=p.sent(),h=(null===(a=this.authorityOptions.azureRegionConfiguration)||void 0===a?void 0:a.azureRegion)===s8.gT.AZURE_REGION_AUTO_DISCOVER_FLAG?u:null===(s=this.authorityOptions.azureRegionConfiguration)||void 0===s?void 0:s.azureRegion,(null===(c=this.authorityOptions.azureRegionConfiguration)||void 0===c?void 0:c.azureRegion)===s8.gT.AZURE_REGION_AUTO_DISCOVER_FLAG?this.regionDiscoveryMetadata.region_outcome=u?s8.ki.AUTO_DETECTION_REQUESTED_SUCCESSFUL:s8.ki.AUTO_DETECTION_REQUESTED_FAILED:u?this.regionDiscoveryMetadata.region_outcome=(null===(l=this.authorityOptions.azureRegionConfiguration)||void 0===l?void 0:l.azureRegion)===u?s8.ki.CONFIGURED_MATCHES_DETECTED:s8.ki.CONFIGURED_NOT_DETECTED:this.regionDiscoveryMetadata.region_outcome=s8.ki.CONFIGURED_NO_AUTO_DETECTION,h)return this.regionDiscoveryMetadata.region_used=h,[2,Authority.replaceWithRegionalInformation(e,h)];return[2,e]}})})},Authority.prototype.updateCloudDiscoveryMetadata=function(e){var t,n;return(0,s9.mG)(this,void 0,void 0,function(){var o,a,s;return(0,s9.Jh)(this,function(c){switch(c.label){case 0:if(null===(t=this.performanceClient)||void 0===t||t.addQueueMeasurement(w.AuthorityUpdateCloudDiscoveryMetadata,this.correlationId),this.logger.verbose("Attempting to get cloud discovery metadata in the config"),this.logger.verbosePii("Known Authorities: "+(this.authorityOptions.knownAuthorities||s8.gT.NOT_APPLICABLE)),this.logger.verbosePii("Authority Metadata: "+(this.authorityOptions.authorityMetadata||s8.gT.NOT_APPLICABLE)),this.logger.verbosePii("Canonical Authority: "+(e.canonical_authority||s8.gT.NOT_APPLICABLE)),o=this.getCloudDiscoveryMetadataFromConfig())return this.logger.verbose("Found cloud discovery metadata in the config."),e.updateCloudDiscoveryMetadata(o,!1),[2,s8.pQ.CONFIG];if(this.logger.verbose("Did not find cloud discovery metadata in the config... Attempting to get cloud discovery metadata from the cache."),a=e.isExpired(),this.isAuthoritySameType(e)&&e.aliasesFromNetwork&&!a)return this.logger.verbose("Found metadata in the cache."),[2,s8.pQ.CACHE];return a&&this.logger.verbose("The metadata entity is expired."),this.logger.verbose("Did not find cloud discovery metadata in the cache... Attempting to get cloud discovery metadata from the network."),null===(n=this.performanceClient)||void 0===n||n.setPreQueueTime(w.AuthorityGetCloudDiscoveryMetadataFromNetwork,this.correlationId),[4,this.getCloudDiscoveryMetadataFromNetwork()];case 1:if(o=c.sent())return this.logger.verbose("cloud discovery metadata was successfully returned from getCloudDiscoveryMetadataFromNetwork()"),e.updateCloudDiscoveryMetadata(o,!0),[2,s8.pQ.NETWORK];if(this.logger.verbose("Did not find cloud discovery metadata from the network... Attempting to get cloud discovery metadata from hardcoded values."),(s=this.getCloudDiscoveryMetadataFromHarcodedValues())&&!this.options.skipAuthorityMetadataCache)return this.logger.verbose("Found cloud discovery metadata from hardcoded values."),e.updateCloudDiscoveryMetadata(s,!1),[2,s8.pQ.HARDCODED_VALUES];throw this.logger.error("Did not find cloud discovery metadata from hardcoded values... Metadata could not be obtained from config, cache, network or hardcoded values. Throwing Untrusted Authority Error."),cq.createUntrustedAuthorityError()}})})},Authority.prototype.getCloudDiscoveryMetadataFromConfig=function(){if(this.authorityType===T.Ciam)return this.logger.verbose("CIAM authorities do not support cloud discovery metadata, generate the aliases from authority host."),Authority.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort);if(this.authorityOptions.cloudDiscoveryMetadata){this.logger.verbose("The cloud discovery metadata has been provided as a network response, in the config.");try{this.logger.verbose("Attempting to parse the cloud discovery metadata.");var e=JSON.parse(this.authorityOptions.cloudDiscoveryMetadata),t=Authority.getCloudDiscoveryMetadataFromNetworkResponse(e.metadata,this.hostnameAndPort);if(this.logger.verbose("Parsed the cloud discovery metadata."),t)return this.logger.verbose("There is returnable metadata attached to the parsed cloud discovery metadata."),t;this.logger.verbose("There is no metadata attached to the parsed cloud discovery metadata.")}catch(e){throw this.logger.verbose("Unable to parse the cloud discovery metadata. Throwing Invalid Cloud Discovery Metadata Error."),cq.createInvalidCloudDiscoveryMetadataError()}}return this.isInKnownAuthorities()?(this.logger.verbose("The host is included in knownAuthorities. Creating new cloud discovery metadata from the host."),Authority.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort)):null},Authority.prototype.getCloudDiscoveryMetadataFromNetwork=function(){var e;return(0,s9.mG)(this,void 0,void 0,function(){var t,n,o,a,s,c,l,u;return(0,s9.Jh)(this,function(h){switch(h.label){case 0:null===(e=this.performanceClient)||void 0===e||e.addQueueMeasurement(w.AuthorityGetCloudDiscoveryMetadataFromNetwork,this.correlationId),t=""+s8.gT.AAD_INSTANCE_DISCOVERY_ENDPT+this.canonicalAuthority+"oauth2/v2.0/authorize",n={},o=null,h.label=1;case 1:return h.trys.push([1,3,,4]),[4,this.networkInterface.sendGetRequestAsync(t,n)];case 2:var p,f;if(a=h.sent(),s=void 0,c=void 0,(p=a.body).hasOwnProperty("tenant_discovery_endpoint")&&p.hasOwnProperty("metadata"))c=(s=a.body).metadata,this.logger.verbosePii("tenant_discovery_endpoint is: "+s.tenant_discovery_endpoint);else{if(!((f=a.body).hasOwnProperty("error")&&f.hasOwnProperty("error_description")))return this.logger.error("AAD did not return a CloudInstanceDiscoveryResponse or CloudInstanceDiscoveryErrorResponse"),[2,null];if(this.logger.warning("A CloudInstanceDiscoveryErrorResponse was returned. The cloud instance discovery network request's status code is: "+a.status),(s=a.body).error===s8.gT.INVALID_INSTANCE)return this.logger.error("The CloudInstanceDiscoveryErrorResponse error is invalid_instance."),[2,null];this.logger.warning("The CloudInstanceDiscoveryErrorResponse error is "+s.error),this.logger.warning("The CloudInstanceDiscoveryErrorResponse error description is "+s.error_description),this.logger.warning("Setting the value of the CloudInstanceDiscoveryMetadata (returned from the network) to []"),c=[]}return this.logger.verbose("Attempting to find a match between the developer's authority and the CloudInstanceDiscoveryMetadata returned from the network request."),o=Authority.getCloudDiscoveryMetadataFromNetworkResponse(c,this.hostnameAndPort),[3,4];case 3:return(l=h.sent())instanceof s7.l?this.logger.error("There was a network error while attempting to get the cloud discovery instance metadata.\nError: "+l.errorCode+"\nError Description: "+l.errorMessage):(u=l,this.logger.error("A non-MSALJS error was thrown while attempting to get the cloud instance discovery metadata.\nError: "+u.name+"\nError Description: "+u.message)),[2,null];case 4:return o||(this.logger.warning("The developer's authority was not found within the CloudInstanceDiscoveryMetadata returned from the network request."),this.logger.verbose("Creating custom Authority for custom domain scenario."),o=Authority.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort)),[2,o]}})})},Authority.prototype.getCloudDiscoveryMetadataFromHarcodedValues=function(){return this.canonicalAuthority in lS?lS[this.canonicalAuthority]:null},Authority.prototype.isInKnownAuthorities=function(){var e=this;return this.authorityOptions.knownAuthorities.filter(function(t){return c4.getDomainFromUrl(t).toLowerCase()===e.hostnameAndPort}).length>0},Authority.generateAuthority=function(e,t){var n;if(t&&t.azureCloudInstance!==x.None){var o=t.tenant?t.tenant:s8.gT.DEFAULT_COMMON_TENANT;n=t.azureCloudInstance+"/"+o+"/"}return n||e},Authority.createCloudDiscoveryMetadataFromHost=function(e){return{preferred_network:e,preferred_cache:e,aliases:[e]}},Authority.getCloudDiscoveryMetadataFromNetworkResponse=function(e,t){for(var n=0;n<e.length;n++){var o=e[n];if(o.aliases.indexOf(t)>-1)return o}return null},Authority.prototype.getPreferredCache=function(){if(this.discoveryComplete())return this.metadata.preferred_cache;throw cD.e.createEndpointDiscoveryIncompleteError("Discovery incomplete.")},Authority.prototype.isAlias=function(e){return this.metadata.aliases.indexOf(e)>-1},Authority.isPublicCloudAuthority=function(e){return s8.gT.KNOWN_PUBLIC_CLOUDS.indexOf(e)>=0},Authority.buildRegionalAuthorityString=function(e,t,n){var o=new c4(e);o.validateAsUri();var a=o.getUrlComponents(),s=t+"."+a.HostNameAndPort;this.isPublicCloudAuthority(a.HostNameAndPort)&&(s=t+"."+s8.gT.REGIONAL_AUTH_PUBLIC_CLOUD_SUFFIX);var c=c4.constructAuthorityUriFromObject((0,s9.pi)((0,s9.pi)({},o.getUrlComponents()),{HostNameAndPort:s})).urlString;return n?c+"?"+n:c},Authority.replaceWithRegionalInformation=function(e,t){return e.authorization_endpoint=Authority.buildRegionalAuthorityString(e.authorization_endpoint,t),e.token_endpoint=Authority.buildRegionalAuthorityString(e.token_endpoint,t,s8.gT.REGIONAL_AUTH_NON_MSI_QUERY_STRING),e.end_session_endpoint&&(e.end_session_endpoint=Authority.buildRegionalAuthorityString(e.end_session_endpoint,t)),e},Authority.transformCIAMAuthority=function(e){var t=e.endsWith(s8.gT.FORWARD_SLASH)?e:""+e+s8.gT.FORWARD_SLASH,n=new c4(e).getUrlComponents();return 0===n.PathSegments.length&&n.HostNameAndPort.endsWith(s8.gT.CIAM_AUTH_URL)&&(t=""+t+n.HostNameAndPort.split(".")[0]+s8.gT.AAD_TENANT_DOMAIN_SUFFIX),t},Authority}(),lk=function(){function AuthorityFactory(){}return AuthorityFactory.createDiscoveredInstance=function(e,t,n,o,a,s,c){return(0,s9.mG)(this,void 0,void 0,function(){var l,u,h;return(0,s9.Jh)(this,function(p){switch(p.label){case 0:null==s||s.addQueueMeasurement(w.AuthorityFactoryCreateDiscoveredInstance,c),l=lT.transformCIAMAuthority(e),u=AuthorityFactory.createInstance(l,t,n,o,a,s,c),p.label=1;case 1:return p.trys.push([1,3,,4]),null==s||s.setPreQueueTime(w.AuthorityResolveEndpointsAsync,c),[4,u.resolveEndpointsAsync()];case 2:return p.sent(),[2,u];case 3:throw h=p.sent(),cD.e.createEndpointDiscoveryIncompleteError(h);case 4:return[2]}})})},AuthorityFactory.createInstance=function(e,t,n,o,a,s,c){if(cf.x.isEmpty(e))throw cq.createUrlEmptyError();return new lT(e,t,n,o,a,s,c)},AuthorityFactory}(),lA=function(){function ServerTelemetryManager(e,t){this.cacheOutcome=s8.To.NO_CACHE_HIT,this.cacheManager=t,this.apiId=e.apiId,this.correlationId=e.correlationId,this.wrapperSKU=e.wrapperSKU||s8.gT.EMPTY_STRING,this.wrapperVer=e.wrapperVer||s8.gT.EMPTY_STRING,this.telemetryCacheKey=s8.HN.CACHE_KEY+s8.Bv.CACHE_KEY_SEPARATOR+e.clientId}return ServerTelemetryManager.prototype.generateCurrentRequestHeaderValue=function(){var e=""+this.apiId+s8.HN.VALUE_SEPARATOR+this.cacheOutcome,t=[this.wrapperSKU,this.wrapperVer].join(s8.HN.VALUE_SEPARATOR),n=[e,this.getRegionDiscoveryFields()].join(s8.HN.VALUE_SEPARATOR);return[s8.HN.SCHEMA_VERSION,n,t].join(s8.HN.CATEGORY_SEPARATOR)},ServerTelemetryManager.prototype.generateLastRequestHeaderValue=function(){var e=this.getLastRequests(),t=ServerTelemetryManager.maxErrorsToSend(e),n=e.failedRequests.slice(0,2*t).join(s8.HN.VALUE_SEPARATOR),o=e.errors.slice(0,t).join(s8.HN.VALUE_SEPARATOR),a=e.errors.length,s=t<a?s8.HN.OVERFLOW_TRUE:s8.HN.OVERFLOW_FALSE,c=[a,s].join(s8.HN.VALUE_SEPARATOR);return[s8.HN.SCHEMA_VERSION,e.cacheHits,n,o,c].join(s8.HN.CATEGORY_SEPARATOR)},ServerTelemetryManager.prototype.cacheFailedRequest=function(e){var t=this.getLastRequests();t.errors.length>=s8.HN.MAX_CACHED_ERRORS&&(t.failedRequests.shift(),t.failedRequests.shift(),t.errors.shift()),t.failedRequests.push(this.apiId,this.correlationId),cf.x.isEmpty(e.subError)?cf.x.isEmpty(e.errorCode)?e&&e.toString()?t.errors.push(e.toString()):t.errors.push(s8.HN.UNKNOWN_ERROR):t.errors.push(e.errorCode):t.errors.push(e.subError),this.cacheManager.setServerTelemetry(this.telemetryCacheKey,t)},ServerTelemetryManager.prototype.incrementCacheHits=function(){var e=this.getLastRequests();return e.cacheHits+=1,this.cacheManager.setServerTelemetry(this.telemetryCacheKey,e),e.cacheHits},ServerTelemetryManager.prototype.getLastRequests=function(){var e=new cX;return this.cacheManager.getServerTelemetry(this.telemetryCacheKey)||e},ServerTelemetryManager.prototype.clearTelemetryCache=function(){var e=this.getLastRequests(),t=ServerTelemetryManager.maxErrorsToSend(e);if(t===e.errors.length)this.cacheManager.removeItem(this.telemetryCacheKey);else{var n=new cX;n.failedRequests=e.failedRequests.slice(2*t),n.errors=e.errors.slice(t),this.cacheManager.setServerTelemetry(this.telemetryCacheKey,n)}},ServerTelemetryManager.maxErrorsToSend=function(e){var t,n=0,o=0,a=e.errors.length;for(t=0;t<a;t++){var s=e.failedRequests[2*t]||s8.gT.EMPTY_STRING,c=e.failedRequests[2*t+1]||s8.gT.EMPTY_STRING,l=e.errors[t]||s8.gT.EMPTY_STRING;if((o+=s.toString().length+c.toString().length+l.length+3)<s8.HN.MAX_LAST_HEADER_BYTES)n+=1;else break}return n},ServerTelemetryManager.prototype.getRegionDiscoveryFields=function(){var e=[];return e.push(this.regionUsed||s8.gT.EMPTY_STRING),e.push(this.regionSource||s8.gT.EMPTY_STRING),e.push(this.regionOutcome||s8.gT.EMPTY_STRING),e.join(",")},ServerTelemetryManager.prototype.updateRegionDiscoveryMetadata=function(e){this.regionUsed=e.region_used,this.regionSource=e.region_source,this.regionOutcome=e.region_outcome},ServerTelemetryManager.prototype.setCacheOutcome=function(e){this.cacheOutcome=e},ServerTelemetryManager}(),lI=function(){function BaseInteractionClient(e,t,n,o,a,s,c,l,u){this.config=e,this.browserStorage=t,this.browserCrypto=n,this.networkClient=this.config.system.networkClient,this.eventHandler=a,this.navigationClient=s,this.nativeMessageHandler=l,this.correlationId=u||this.browserCrypto.createNewGuid(),this.logger=o.clone(ci.qx.MSAL_SKU,ll,this.correlationId),this.performanceClient=c}return BaseInteractionClient.prototype.clearCacheOnLogout=function(e){return(0,s5.mG)(this,void 0,void 0,function(){return(0,s5.Jh)(this,function(t){switch(t.label){case 0:if(!e)return[3,5];cH.accountInfoIsEqual(e,this.browserStorage.getActiveAccount(),!1)&&(this.logger.verbose("Setting active account to null"),this.browserStorage.setActiveAccount(null)),t.label=1;case 1:return t.trys.push([1,3,,4]),[4,this.browserStorage.removeAccount(cH.generateAccountCacheKey(e))];case 2:return t.sent(),this.logger.verbose("Cleared cache items belonging to the account provided in the logout request."),[3,4];case 3:return t.sent(),this.logger.error("Account provided in logout request was not found. Local cache unchanged."),[3,4];case 4:return[3,9];case 5:return t.trys.push([5,8,,9]),this.logger.verbose("No account provided in logout request, clearing all cache items.",this.correlationId),[4,this.browserStorage.clear()];case 6:return t.sent(),[4,this.browserCrypto.clearKeystore()];case 7:return t.sent(),[3,9];case 8:return t.sent(),this.logger.error("Attempted to clear all MSAL cache items and failed. Local cache unchanged."),[3,9];case 9:return[2]}})})},BaseInteractionClient.prototype.initializeBaseRequest=function(e){return(0,s5.mG)(this,void 0,void 0,function(){var t,n,o,a;return(0,s5.Jh)(this,function(s){switch(s.label){case 0:if(this.performanceClient.addQueueMeasurement(w.InitializeBaseRequest,e.correlationId),this.logger.verbose("Initializing BaseAuthRequest"),t=e.authority||this.config.auth.authority,n=(0,s5.fl)(e&&e.scopes||[]),(o=(0,s5.pi)((0,s5.pi)({},e),{correlationId:this.correlationId,authority:t,scopes:n})).authenticationScheme){if(o.authenticationScheme===s8.hO.SSH){if(!e.sshJwk)throw cq.createMissingSshJwkError();if(!e.sshKid)throw cq.createMissingSshKidError()}this.logger.verbose('Authentication Scheme set to "'+o.authenticationScheme+'" as configured in Auth request')}else o.authenticationScheme=s8.hO.BEARER,this.logger.verbose('Authentication Scheme wasn\'t explicitly set in request, defaulting to "Bearer" request');if(!(e.claims&&!cf.x.isEmpty(e.claims)))return[3,2];return a=o,[4,this.browserCrypto.hashString(e.claims)];case 1:a.requestedClaimsHash=s.sent(),s.label=2;case 2:return[2,o]}})})},BaseInteractionClient.prototype.getRedirectUri=function(e){this.logger.verbose("getRedirectUri called");var t=e||this.config.auth.redirectUri||la.getCurrentUri();return c4.getAbsoluteUrl(t,la.getCurrentUri())},BaseInteractionClient.prototype.initializeServerTelemetryManager=function(e,t){this.logger.verbose("initializeServerTelemetryManager called");var n={clientId:this.config.auth.clientId,correlationId:this.correlationId,apiId:e,forceRefresh:t||!1,wrapperSKU:this.browserStorage.getWrapperMetadata()[0],wrapperVer:this.browserStorage.getWrapperMetadata()[1]};return new lA(n,this.browserStorage)},BaseInteractionClient.prototype.getDiscoveredAuthority=function(e){return(0,s5.mG)(this,void 0,void 0,function(){var t;return(0,s5.Jh)(this,function(n){switch(n.label){case 0:if(this.logger.verbose("getDiscoveredAuthority called"),t={protocolMode:this.config.auth.protocolMode,knownAuthorities:this.config.auth.knownAuthorities,cloudDiscoveryMetadata:this.config.auth.cloudDiscoveryMetadata,authorityMetadata:this.config.auth.authorityMetadata},!e)return[3,2];return this.logger.verbose("Creating discovered authority with request authority"),[4,lk.createDiscoveredInstance(e,this.config.system.networkClient,this.browserStorage,t,this.logger)];case 1:case 3:return[2,n.sent()];case 2:return this.logger.verbose("Creating discovered authority with configured authority"),[4,lk.createDiscoveredInstance(this.config.auth.authority,this.config.system.networkClient,this.browserStorage,t,this.logger)]}})})},BaseInteractionClient}(),lx=function(e){function StandardInteractionClient(){return null!==e&&e.apply(this,arguments)||this}return(0,s5.ZT)(StandardInteractionClient,e),StandardInteractionClient.prototype.initializeAuthorizationCodeRequest=function(e){return(0,s5.mG)(this,void 0,void 0,function(){var t,n;return(0,s5.Jh)(this,function(o){switch(o.label){case 0:return this.performanceClient.addQueueMeasurement(w.StandardInteractionClientInitializeAuthorizationCodeRequest,e.correlationId),this.logger.verbose("initializeAuthorizationRequest called",e.correlationId),[4,this.browserCrypto.generatePkceCodes()];case 1:return t=o.sent(),n=(0,s5.pi)((0,s5.pi)({},e),{redirectUri:e.redirectUri,code:s8.gT.EMPTY_STRING,codeVerifier:t.verifier}),e.codeChallenge=t.challenge,e.codeChallengeMethod=s8.gT.S256_CODE_CHALLENGE_METHOD,[2,n]}})})},StandardInteractionClient.prototype.initializeLogoutRequest=function(e){this.logger.verbose("initializeLogoutRequest called",null==e?void 0:e.correlationId);var t=(0,s5.pi)({correlationId:this.correlationId||this.browserCrypto.createNewGuid()},e);if(e){if(e.logoutHint)this.logger.verbose("logoutHint has already been set in logoutRequest");else if(e.account){var n=this.getLogoutHintFromIdTokenClaims(e.account);n&&(this.logger.verbose("Setting logoutHint to login_hint ID Token Claim value for the account provided"),t.logoutHint=n)}else this.logger.verbose("logoutHint was not set and account was not passed into logout request, logoutHint will not be set")}else this.logger.verbose("logoutHint will not be set since no logout request was configured");return e&&null===e.postLogoutRedirectUri?this.logger.verbose("postLogoutRedirectUri passed as null, not setting post logout redirect uri",t.correlationId):e&&e.postLogoutRedirectUri?(this.logger.verbose("Setting postLogoutRedirectUri to uri set on logout request",t.correlationId),t.postLogoutRedirectUri=c4.getAbsoluteUrl(e.postLogoutRedirectUri,la.getCurrentUri())):null===this.config.auth.postLogoutRedirectUri?this.logger.verbose("postLogoutRedirectUri configured as null and no uri set on request, not passing post logout redirect",t.correlationId):this.config.auth.postLogoutRedirectUri?(this.logger.verbose("Setting postLogoutRedirectUri to configured uri",t.correlationId),t.postLogoutRedirectUri=c4.getAbsoluteUrl(this.config.auth.postLogoutRedirectUri,la.getCurrentUri())):(this.logger.verbose("Setting postLogoutRedirectUri to current page",t.correlationId),t.postLogoutRedirectUri=c4.getAbsoluteUrl(la.getCurrentUri(),la.getCurrentUri())),t},StandardInteractionClient.prototype.getLogoutHintFromIdTokenClaims=function(e){var t=e.idTokenClaims;if(t){if(t.login_hint)return t.login_hint;this.logger.verbose("The ID Token Claims tied to the provided account do not contain a login_hint claim, logoutHint will not be added to logout request")}else this.logger.verbose("The provided account does not contain ID Token Claims, logoutHint will not be added to logout request");return null},StandardInteractionClient.prototype.createAuthCodeClient=function(e,t,n){return(0,s5.mG)(this,void 0,void 0,function(){var o;return(0,s5.Jh)(this,function(a){switch(a.label){case 0:return this.performanceClient.addQueueMeasurement(w.StandardInteractionClientCreateAuthCodeClient,this.correlationId),this.performanceClient.setPreQueueTime(w.StandardInteractionClientGetClientConfiguration,this.correlationId),[4,this.getClientConfiguration(e,t,n)];case 1:return o=a.sent(),[2,new lC(o,this.performanceClient)]}})})},StandardInteractionClient.prototype.getClientConfiguration=function(e,t,n){return(0,s5.mG)(this,void 0,void 0,function(){var o,a;return(0,s5.Jh)(this,function(s){switch(s.label){case 0:return this.performanceClient.addQueueMeasurement(w.StandardInteractionClientGetClientConfiguration,this.correlationId),this.logger.verbose("getClientConfiguration called",this.correlationId),this.performanceClient.setPreQueueTime(w.StandardInteractionClientGetDiscoveredAuthority,this.correlationId),[4,this.getDiscoveredAuthority(t,n)];case 1:return o=s.sent(),a=this.config.system.loggerOptions,[2,{authOptions:{clientId:this.config.auth.clientId,authority:o,clientCapabilities:this.config.auth.clientCapabilities},systemOptions:{tokenRenewalOffsetSeconds:this.config.system.tokenRenewalOffsetSeconds,preventCorsPreflight:!0},loggerOptions:{loggerCallback:a.loggerCallback,piiLoggingEnabled:a.piiLoggingEnabled,logLevel:a.logLevel,correlationId:this.correlationId},cryptoInterface:this.browserCrypto,networkInterface:this.networkClient,storageInterface:this.browserStorage,serverTelemetryManager:e,libraryInfo:{sku:ci.qx.MSAL_SKU,version:ll,cpu:s8.gT.EMPTY_STRING,os:s8.gT.EMPTY_STRING},telemetry:this.config.telemetry}]}})})},StandardInteractionClient.prototype.validateAndExtractStateFromHash=function(e,t,n){if(this.logger.verbose("validateAndExtractStateFromHash called",n),!e.state)throw cg.createHashDoesNotContainStateError();var o=c3.extractBrowserRequestState(this.browserCrypto,e.state);if(!o)throw cg.createUnableToParseStateError();if(o.interactionType!==t)throw cg.createStateInteractionTypeMismatchError();return this.logger.verbose("Returning state from hash",n),e.state},StandardInteractionClient.prototype.getDiscoveredAuthority=function(e,t){var n;return(0,s5.mG)(this,void 0,void 0,function(){var o,a,s,c;return(0,s5.Jh)(this,function(l){switch(l.label){case 0:return this.performanceClient.addQueueMeasurement(w.StandardInteractionClientGetDiscoveredAuthority,this.correlationId),this.logger.verbose("getDiscoveredAuthority called",this.correlationId),o=null===(n=this.performanceClient)||void 0===n?void 0:n.startMeasurement(w.StandardInteractionClientGetDiscoveredAuthority,this.correlationId),a={protocolMode:this.config.auth.protocolMode,knownAuthorities:this.config.auth.knownAuthorities,cloudDiscoveryMetadata:this.config.auth.cloudDiscoveryMetadata,authorityMetadata:this.config.auth.authorityMetadata,skipAuthorityMetadataCache:this.config.auth.skipAuthorityMetadataCache},s=e||this.config.auth.authority,c=lT.generateAuthority(s,t||this.config.auth.azureCloudOptions),this.logger.verbose("Creating discovered authority with configured authority",this.correlationId),this.performanceClient.setPreQueueTime(w.AuthorityFactoryCreateDiscoveredInstance,this.correlationId),[4,lk.createDiscoveredInstance(c,this.config.system.networkClient,this.browserStorage,a,this.logger,this.performanceClient,this.correlationId).then(function(e){return o.endMeasurement({success:!0}),e}).catch(function(e){throw o.endMeasurement({errorCode:e.errorCode,subErrorCode:e.subError,success:!1}),e})];case 1:return[2,l.sent()]}})})},StandardInteractionClient.prototype.initializeAuthorizationRequest=function(e,t){return(0,s5.mG)(this,void 0,void 0,function(){var n,o,a,s,c,l,u;return(0,s5.Jh)(this,function(h){switch(h.label){case 0:return this.performanceClient.addQueueMeasurement(w.StandardInteractionClientInitializeAuthorizationRequest,this.correlationId),this.logger.verbose("initializeAuthorizationRequest called",this.correlationId),n=this.getRedirectUri(e.redirectUri),o={interactionType:t},a=c1.setRequestState(this.browserCrypto,e&&e.state||s8.gT.EMPTY_STRING,o),this.performanceClient.setPreQueueTime(w.InitializeBaseRequest,this.correlationId),c=[{}],[4,this.initializeBaseRequest(e)];case 1:return s=s5.pi.apply(void 0,[s5.pi.apply(void 0,c.concat([h.sent()])),{redirectUri:n,state:a,nonce:e.nonce||this.browserCrypto.createNewGuid(),responseMode:s8.vw.FRAGMENT}]),(l=e.account||this.browserStorage.getActiveAccount())&&(this.logger.verbose("Setting validated request account",this.correlationId),this.logger.verbosePii("Setting validated request account: "+l.homeAccountId,this.correlationId),s.account=l),cf.x.isEmpty(s.loginHint)&&!l&&(u=this.browserStorage.getLegacyLoginHint())&&(s.loginHint=u),[2,s]}})})},StandardInteractionClient}(lI);(y=P||(P={})).USER_INTERACTION_REQUIRED="USER_INTERACTION_REQUIRED",y.USER_CANCEL="USER_CANCEL",y.NO_NETWORK="NO_NETWORK",y.TRANSIENT_ERROR="TRANSIENT_ERROR",y.PERSISTENT_ERROR="PERSISTENT_ERROR",y.DISABLED="DISABLED",y.ACCOUNT_UNAVAILABLE="ACCOUNT_UNAVAILABLE";var lR={extensionError:{code:"ContentError"},userSwitch:{code:"user_switch",desc:"User attempted to switch accounts in the native broker, which is not allowed. All new accounts must sign-in through the standard web flow first, please try again."},tokensNotFoundInCache:{code:"tokens_not_found_in_internal_memory_cache",desc:"Tokens not cached in MSAL JS internal memory, please make the WAM request"}},lP=function(e){function NativeAuthError(t,n,o){var a=e.call(this,t,n)||this;return Object.setPrototypeOf(a,NativeAuthError.prototype),a.name="NativeAuthError",a.ext=o,a}return(0,s5.ZT)(NativeAuthError,e),NativeAuthError.prototype.isFatal=function(){return!!this.ext&&!!this.ext.status&&(this.ext.status===P.PERSISTENT_ERROR||this.ext.status===P.DISABLED)||this.errorCode===lR.extensionError.code},NativeAuthError.createError=function(e,t,n){if(n&&n.status)switch(n.status){case P.ACCOUNT_UNAVAILABLE:return co.createNativeAccountUnavailableError();case P.USER_INTERACTION_REQUIRED:return new co(e,t);case P.USER_CANCEL:return cg.createUserCancelledError();case P.NO_NETWORK:return cg.createNoNetworkConnectivityError()}return new NativeAuthError(e,t,n)},NativeAuthError.createUserSwitchError=function(){return new NativeAuthError(lR.userSwitch.code,lR.userSwitch.desc)},NativeAuthError.createTokensNotFoundInCacheError=function(){return new NativeAuthError(lR.tokensNotFoundInCache.code,lR.tokensNotFoundInCache.desc)},NativeAuthError}(s7.l),lM=function(e){function RefreshTokenClient(t,n){return e.call(this,t,n)||this}return(0,s9.ZT)(RefreshTokenClient,e),RefreshTokenClient.prototype.acquireToken=function(e){var t,n,o,a,s,c,l;return(0,s9.mG)(this,void 0,void 0,function(){var u,h,p,f,m,g,y=this;return(0,s9.Jh)(this,function(v){switch(v.label){case 0:return null===(t=this.performanceClient)||void 0===t||t.addQueueMeasurement(w.RefreshTokenClientAcquireToken,e.correlationId),u=null===(n=this.performanceClient)||void 0===n?void 0:n.startMeasurement(w.RefreshTokenClientAcquireToken,e.correlationId),this.logger.verbose("RefreshTokenClientAcquireToken called",e.correlationId),h=c$.nowSeconds(),null===(o=this.performanceClient)||void 0===o||o.setPreQueueTime(w.RefreshTokenClientExecuteTokenRequest,e.correlationId),[4,this.executeTokenRequest(e,this.authority)];case 1:return f=null===(a=(p=v.sent()).headers)||void 0===a?void 0:a[s8.SZ.X_MS_HTTP_VERSION],null==u||u.addStaticFields({refreshTokenSize:(null===(s=p.body.refresh_token)||void 0===s?void 0:s.length)||0}),f&&(null==u||u.addStaticFields({httpVerToken:f})),m=null===(c=p.headers)||void 0===c?void 0:c[s8.SZ.X_MS_REQUEST_ID],(g=new lb(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,this.config.serializableCache,this.config.persistencePlugin)).validateTokenResponse(p.body),null===(l=this.performanceClient)||void 0===l||l.setPreQueueTime(w.HandleServerTokenResponse,e.correlationId),[2,g.handleServerTokenResponse(p.body,this.authority,h,e,void 0,void 0,!0,e.forceCache,m).then(function(e){return null==u||u.endMeasurement({success:!0}),e}).catch(function(t){throw y.logger.verbose("Error in fetching refresh token",e.correlationId),null==u||u.endMeasurement({errorCode:t.errorCode,subErrorCode:t.subError,success:!1}),t})]}})})},RefreshTokenClient.prototype.acquireTokenByRefreshToken=function(e){var t,n,o,a;return(0,s9.mG)(this,void 0,void 0,function(){var s,c;return(0,s9.Jh)(this,function(l){if(!e)throw cq.createEmptyTokenRequestError();if(null===(t=this.performanceClient)||void 0===t||t.addQueueMeasurement(w.RefreshTokenClientAcquireTokenByRefreshToken,e.correlationId),!e.account)throw cD.e.createNoAccountInSilentRequestError();if(this.cacheManager.isAppMetadataFOCI(e.account.environment))try{return null===(n=this.performanceClient)||void 0===n||n.setPreQueueTime(w.RefreshTokenClientAcquireTokenWithCachedRefreshToken,e.correlationId),[2,this.acquireTokenWithCachedRefreshToken(e,!0)]}catch(t){if(s=t instanceof co&&t.errorCode===cn.noTokensFoundError.code,c=t instanceof ce&&t.errorCode===s8.D1.INVALID_GRANT_ERROR&&t.subError===s8.D1.CLIENT_MISMATCH_ERROR,s||c)return null===(o=this.performanceClient)||void 0===o||o.setPreQueueTime(w.RefreshTokenClientAcquireTokenWithCachedRefreshToken,e.correlationId),[2,this.acquireTokenWithCachedRefreshToken(e,!1)];throw t}return null===(a=this.performanceClient)||void 0===a||a.setPreQueueTime(w.RefreshTokenClientAcquireTokenWithCachedRefreshToken,e.correlationId),[2,this.acquireTokenWithCachedRefreshToken(e,!1)]})})},RefreshTokenClient.prototype.acquireTokenWithCachedRefreshToken=function(e,t){var n,o,a;return(0,s9.mG)(this,void 0,void 0,function(){var s,c,l;return(0,s9.Jh)(this,function(u){if(null===(n=this.performanceClient)||void 0===n||n.addQueueMeasurement(w.RefreshTokenClientAcquireTokenWithCachedRefreshToken,e.correlationId),s=null===(o=this.performanceClient)||void 0===o?void 0:o.startMeasurement(w.RefreshTokenClientAcquireTokenWithCachedRefreshToken,e.correlationId),this.logger.verbose("RefreshTokenClientAcquireTokenWithCachedRefreshToken called",e.correlationId),!(c=this.cacheManager.getRefreshToken(e.account,t)))throw null==s||s.discardMeasurement(),co.createNoTokensFoundError();return null==s||s.endMeasurement({success:!0}),l=(0,s9.pi)((0,s9.pi)({},e),{refreshToken:c.secret,authenticationScheme:e.authenticationScheme||s8.hO.BEARER,ccsCredential:{credential:e.account.homeAccountId,type:k.HOME_ACCOUNT_ID}}),null===(a=this.performanceClient)||void 0===a||a.setPreQueueTime(w.RefreshTokenClientAcquireToken,e.correlationId),[2,this.acquireToken(l)]})})},RefreshTokenClient.prototype.executeTokenRequest=function(e,t){var n,o,a;return(0,s9.mG)(this,void 0,void 0,function(){var s,c,l,u,h,p;return(0,s9.Jh)(this,function(f){switch(f.label){case 0:return null===(n=this.performanceClient)||void 0===n||n.addQueueMeasurement(w.RefreshTokenClientExecuteTokenRequest,e.correlationId),s=null===(o=this.performanceClient)||void 0===o?void 0:o.startMeasurement(w.RefreshTokenClientExecuteTokenRequest,e.correlationId),null===(a=this.performanceClient)||void 0===a||a.setPreQueueTime(w.RefreshTokenClientCreateTokenRequestBody,e.correlationId),c=this.createTokenQueryParameters(e),l=c4.appendQueryString(t.tokenEndpoint,c),[4,this.createTokenRequestBody(e)];case 1:return u=f.sent(),h=this.createTokenRequestHeaders(e.ccsCredential),p={clientId:this.config.authOptions.clientId,authority:t.canonicalAuthority,scopes:e.scopes,claims:e.claims,authenticationScheme:e.authenticationScheme,resourceRequestMethod:e.resourceRequestMethod,resourceRequestUri:e.resourceRequestUri,shrClaims:e.shrClaims,sshKid:e.sshKid},[2,this.executePostToTokenEndpoint(l,u,h,p).then(function(e){return null==s||s.endMeasurement({success:!0}),e}).catch(function(e){throw null==s||s.endMeasurement({success:!1}),e})]}})})},RefreshTokenClient.prototype.createTokenRequestBody=function(e){var t,n,o;return(0,s9.mG)(this,void 0,void 0,function(){var a,s,c,l,u,h,p;return(0,s9.Jh)(this,function(f){switch(f.label){case 0:if(null===(t=this.performanceClient)||void 0===t||t.addQueueMeasurement(w.RefreshTokenClientCreateTokenRequestBody,e.correlationId),a=e.correlationId,s=null===(n=this.performanceClient)||void 0===n?void 0:n.startMeasurement(w.BaseClientCreateTokenRequestHeaders,a),(c=new lm).addClientId(this.config.authOptions.clientId),c.addScopes(e.scopes),c.addGrantType(s8.qJ.REFRESH_TOKEN_GRANT),c.addClientInfo(),c.addLibraryInfo(this.config.libraryInfo),c.addApplicationTelemetry(this.config.telemetry.application),c.addThrottling(),this.serverTelemetryManager&&c.addServerTelemetry(this.serverTelemetryManager),c.addCorrelationId(a),c.addRefreshToken(e.refreshToken),this.config.clientCredentials.clientSecret&&c.addClientSecret(this.config.clientCredentials.clientSecret),this.config.clientCredentials.clientAssertion&&(l=this.config.clientCredentials.clientAssertion,c.addClientAssertion(l.assertion),c.addClientAssertionType(l.assertionType)),e.authenticationScheme!==s8.hO.POP)return[3,2];return u=new ly(this.cryptoUtils,this.performanceClient),null===(o=this.performanceClient)||void 0===o||o.setPreQueueTime(w.PopTokenGenerateCnf,e.correlationId),[4,u.generateCnf(e)];case 1:return h=f.sent(),c.addPopToken(h.reqCnfString),[3,3];case 2:if(e.authenticationScheme===s8.hO.SSH){if(e.sshJwk)c.addSshJwk(e.sshJwk);else throw null==s||s.endMeasurement({success:!1}),cq.createMissingSshJwkError()}f.label=3;case 3:if((!cf.x.isEmptyObj(e.claims)||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&c.addClaims(e.claims,this.config.authOptions.clientCapabilities),this.config.systemOptions.preventCorsPreflight&&e.ccsCredential)switch(e.ccsCredential.type){case k.HOME_ACCOUNT_ID:try{p=buildClientInfoFromHomeAccountId(e.ccsCredential.credential),c.addCcsOid(p)}catch(e){this.logger.verbose("Could not parse home account ID for CCS Header: "+e)}break;case k.UPN:c.addCcsUpn(e.ccsCredential.credential)}return null==s||s.endMeasurement({success:!0}),[2,c.createQueryString()]}})})},RefreshTokenClient}(lg),lO=function(e){function SilentFlowClient(t,n){return e.call(this,t,n)||this}return(0,s9.ZT)(SilentFlowClient,e),SilentFlowClient.prototype.acquireToken=function(e){return(0,s9.mG)(this,void 0,void 0,function(){var t;return(0,s9.Jh)(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.acquireCachedToken(e)];case 1:return[2,n.sent()];case 2:if((t=n.sent())instanceof cD.e&&t.errorCode===cD.A.tokenRefreshRequired.code)return[2,new lM(this.config,this.performanceClient).acquireTokenByRefreshToken(e)];throw t;case 3:return[2]}})})},SilentFlowClient.prototype.acquireCachedToken=function(e){var t,n,o,a;return(0,s9.mG)(this,void 0,void 0,function(){var s,c;return(0,s9.Jh)(this,function(l){switch(l.label){case 0:if(!e)throw cq.createEmptyTokenRequestError();if(e.forceRefresh)throw null===(t=this.serverTelemetryManager)||void 0===t||t.setCacheOutcome(s8.To.FORCE_REFRESH),this.logger.info("SilentFlowClient:acquireCachedToken - Skipping cache because forceRefresh is true."),cD.e.createRefreshRequiredError();if(!e.account)throw cD.e.createNoAccountInSilentRequestError();if(s=e.authority||this.authority.getPreferredCache(),(c=this.cacheManager.readCacheRecord(e.account,e,s)).accessToken){if(c$.wasClockTurnedBack(c.accessToken.cachedAt)||c$.isTokenExpired(c.accessToken.expiresOn,this.config.systemOptions.tokenRenewalOffsetSeconds))throw null===(o=this.serverTelemetryManager)||void 0===o||o.setCacheOutcome(s8.To.CACHED_ACCESS_TOKEN_EXPIRED),this.logger.info("SilentFlowClient:acquireCachedToken - Cached access token is expired or will expire within "+this.config.systemOptions.tokenRenewalOffsetSeconds+" seconds."),cD.e.createRefreshRequiredError();if(c.accessToken.refreshOn&&c$.isTokenExpired(c.accessToken.refreshOn,0))throw null===(a=this.serverTelemetryManager)||void 0===a||a.setCacheOutcome(s8.To.REFRESH_CACHED_ACCESS_TOKEN),this.logger.info("SilentFlowClient:acquireCachedToken - Cached access token's refreshOn property has been exceeded'."),cD.e.createRefreshRequiredError()}else throw null===(n=this.serverTelemetryManager)||void 0===n||n.setCacheOutcome(s8.To.NO_CACHED_ACCESS_TOKEN),this.logger.info("SilentFlowClient:acquireCachedToken - No access token found in cache for the given properties."),cD.e.createRefreshRequiredError();return this.config.serverTelemetryManager&&this.config.serverTelemetryManager.incrementCacheHits(),[4,this.generateResultFromCacheRecord(c,e)];case 1:return[2,l.sent()]}})})},SilentFlowClient.prototype.generateResultFromCacheRecord=function(e,t){return(0,s9.mG)(this,void 0,void 0,function(){var n,o;return(0,s9.Jh)(this,function(a){switch(a.label){case 0:if(e.idToken&&(n=new cj(e.idToken.secret,this.config.cryptoInterface)),t.maxAge||0===t.maxAge){if(!(o=null==n?void 0:n.claims.auth_time))throw cD.e.createAuthTimeNotFoundError();cj.checkMaxAge(o,t.maxAge)}return[4,lb.generateAuthenticationResult(this.cryptoUtils,this.authority,e,!0,t,n)];case 1:return[2,a.sent()]}})})},SilentFlowClient}(lg),lN=function(e){function SilentCacheClient(){return null!==e&&e.apply(this,arguments)||this}return(0,s5.ZT)(SilentCacheClient,e),SilentCacheClient.prototype.acquireToken=function(e){return(0,s5.mG)(this,void 0,void 0,function(){var t,n,o,a,s;return(0,s5.Jh)(this,function(c){switch(c.label){case 0:return t=this.performanceClient.startMeasurement(w.SilentCacheClientAcquireToken,e.correlationId),n=this.initializeServerTelemetryManager(ci.WN.acquireTokenSilent_silentFlow),[4,this.createSilentFlowClient(n,e.authority,e.azureCloudOptions)];case 1:o=c.sent(),this.logger.verbose("Silent auth client created"),c.label=2;case 2:return c.trys.push([2,4,,5]),[4,o.acquireCachedToken(e)];case 3:return a=c.sent(),t.endMeasurement({success:!0,fromCache:!0}),[2,a];case 4:throw(s=c.sent())instanceof cg&&s.errorCode===cm.signingKeyNotFoundInStorage.code&&this.logger.verbose("Signing keypair for bound access token not found. Refreshing bound access token and generating a new crypto keypair."),t.endMeasurement({errorCode:s instanceof s7.l&&s.errorCode||void 0,subErrorCode:s instanceof s7.l&&s.subError||void 0,success:!1}),s;case 5:return[2]}})})},SilentCacheClient.prototype.logout=function(){return Promise.reject(cg.createSilentLogoutUnsupportedError())},SilentCacheClient.prototype.createSilentFlowClient=function(e,t,n){return(0,s5.mG)(this,void 0,void 0,function(){var o;return(0,s5.Jh)(this,function(a){switch(a.label){case 0:return this.performanceClient.setPreQueueTime(w.StandardInteractionClientGetClientConfiguration,this.correlationId),[4,this.getClientConfiguration(e,t,n)];case 1:return o=a.sent(),[2,new lO(o,this.performanceClient)]}})})},SilentCacheClient.prototype.initializeSilentRequest=function(e,t){return(0,s5.mG)(this,void 0,void 0,function(){var n;return(0,s5.Jh)(this,function(o){switch(o.label){case 0:return this.performanceClient.addQueueMeasurement(w.InitializeSilentRequest,this.correlationId),this.performanceClient.setPreQueueTime(w.InitializeBaseRequest,this.correlationId),n=[(0,s5.pi)({},e)],[4,this.initializeBaseRequest(e)];case 1:return[2,s5.pi.apply(void 0,[s5.pi.apply(void 0,n.concat([o.sent()])),{account:t,forceRefresh:e.forceRefresh||!1}])]}})})},SilentCacheClient}(lx),lB=function(e){function NativeInteractionClient(t,n,o,a,s,c,l,u,h,p,f,m){var g=e.call(this,t,n,o,a,s,c,u,h,m)||this;return g.apiId=l,g.accountId=p,g.nativeMessageHandler=h,g.nativeStorageManager=f,g.silentCacheClient=new lN(t,g.nativeStorageManager,o,a,s,c,u,h,m),g}return(0,s5.ZT)(NativeInteractionClient,e),NativeInteractionClient.prototype.acquireToken=function(e){return(0,s5.mG)(this,void 0,void 0,function(){var t,n,o,a,s,c,l;return(0,s5.Jh)(this,function(u){switch(u.label){case 0:return this.logger.trace("NativeInteractionClient - acquireToken called."),t=this.performanceClient.startMeasurement(w.NativeInteractionClientAcquireToken,e.correlationId),n=c$.nowSeconds(),[4,this.initializeNativeRequest(e)];case 1:o=u.sent(),u.label=2;case 2:return u.trys.push([2,4,,5]),[4,this.acquireTokensFromCache(this.accountId,o)];case 3:return a=u.sent(),t.endMeasurement({success:!0,isNativeBroker:!1,fromCache:!0}),[2,a];case 4:return u.sent(),this.logger.info("MSAL internal Cache does not contain tokens, proceed to make a native call"),[3,5];case 5:return s={method:ci.Ky.GetToken,request:o},[4,this.nativeMessageHandler.sendMessage(s)];case 6:return c=u.sent(),l=this.validateNativeResponse(c),[2,this.handleNativeResponse(l,o,n).then(function(e){return t.endMeasurement({success:!0,isNativeBroker:!0,requestId:e.requestId}),e}).catch(function(e){throw t.endMeasurement({success:!1,errorCode:e.errorCode,subErrorCode:e.subError,isNativeBroker:!0}),e})]}})})},NativeInteractionClient.prototype.createSilentCacheRequest=function(e,t){return{authority:e.authority,correlationId:this.correlationId,scopes:cz.fromString(e.scope).asArray(),account:t,forceRefresh:!1}},NativeInteractionClient.prototype.acquireTokensFromCache=function(e,t){return(0,s5.mG)(this,void 0,void 0,function(){var n,o;return(0,s5.Jh)(this,function(a){switch(a.label){case 0:if(!e)throw this.logger.warning("NativeInteractionClient:acquireTokensFromCache - No nativeAccountId provided"),cD.e.createNoAccountFoundError();if(!(n=this.browserStorage.getAccountInfoFilteredBy({nativeAccountId:e})))throw cD.e.createNoAccountFoundError();a.label=1;case 1:return a.trys.push([1,3,,4]),o=this.createSilentCacheRequest(t,n),[4,this.silentCacheClient.acquireToken(o)];case 2:return[2,a.sent()];case 3:throw a.sent();case 4:return[2]}})})},NativeInteractionClient.prototype.acquireTokenRedirect=function(e){return(0,s5.mG)(this,void 0,void 0,function(){var t,n,o,a,s,c;return(0,s5.Jh)(this,function(l){switch(l.label){case 0:return this.logger.trace("NativeInteractionClient - acquireTokenRedirect called."),[4,this.initializeNativeRequest(e)];case 1:t=l.sent(),n={method:ci.Ky.GetToken,request:t},l.label=2;case 2:return l.trys.push([2,4,,5]),[4,this.nativeMessageHandler.sendMessage(n)];case 3:return o=l.sent(),this.validateNativeResponse(o),[3,5];case 4:if((a=l.sent())instanceof lP&&a.isFatal())throw a;return[3,5];case 5:return this.browserStorage.setTemporaryCache(ci.c4.NATIVE_REQUEST,JSON.stringify(t),!0),s={apiId:ci.WN.acquireTokenRedirect,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},c=this.config.auth.navigateToLoginRequestUrl?window.location.href:this.getRedirectUri(e.redirectUri),[4,this.navigationClient.navigateExternal(c,s)];case 6:return l.sent(),[2]}})})},NativeInteractionClient.prototype.handleRedirectPromise=function(){return(0,s5.mG)(this,void 0,void 0,function(){var e,t,n,o,a,s,c,l;return(0,s5.Jh)(this,function(u){switch(u.label){case 0:if(this.logger.trace("NativeInteractionClient - handleRedirectPromise called."),!this.browserStorage.isInteractionInProgress(!0))return this.logger.info("handleRedirectPromise called but there is no interaction in progress, returning null."),[2,null];if(!(e=this.browserStorage.getCachedNativeRequest()))return this.logger.verbose("NativeInteractionClient - handleRedirectPromise called but there is no cached request, returning null."),[2,null];t=e.prompt,n=(0,s5._T)(e,["prompt"]),t&&this.logger.verbose("NativeInteractionClient - handleRedirectPromise called and prompt was included in the original request, removing prompt from cached request to prevent second interaction with native broker window."),this.browserStorage.removeItem(this.browserStorage.generateCacheKey(ci.c4.NATIVE_REQUEST)),o={method:ci.Ky.GetToken,request:n},a=c$.nowSeconds(),u.label=1;case 1:return u.trys.push([1,3,,4]),this.logger.verbose("NativeInteractionClient - handleRedirectPromise sending message to native broker."),[4,this.nativeMessageHandler.sendMessage(o)];case 2:return s=u.sent(),this.validateNativeResponse(s),c=this.handleNativeResponse(s,n,a),this.browserStorage.setInteractionInProgress(!1),[2,c];case 3:throw l=u.sent(),this.browserStorage.setInteractionInProgress(!1),l;case 4:return[2]}})})},NativeInteractionClient.prototype.logout=function(){return this.logger.trace("NativeInteractionClient - logout called."),Promise.reject("Logout not implemented yet")},NativeInteractionClient.prototype.handleNativeResponse=function(e,t,n){return(0,s5.mG)(this,void 0,void 0,function(){var o,a,s,c,l,u;return(0,s5.Jh)(this,function(h){switch(h.label){case 0:if(this.logger.trace("NativeInteractionClient - handleNativeResponse called."),e.account.id!==t.accountId)throw lP.createUserSwitchError();return[4,this.getDiscoveredAuthority(t.authority)];case 1:return a=(o=h.sent()).getPreferredCache(),s=this.createIdTokenObj(e),c=this.createHomeAccountIdentifier(e,s),l=this.createAccountEntity(e,c,s,a),[4,this.generateAuthenticationResult(e,t,s,l,o.canonicalAuthority,n)];case 2:return u=h.sent(),this.cacheAccount(l),this.cacheNativeTokens(e,t,c,s,u.accessToken,u.tenantId,n),[2,u]}})})},NativeInteractionClient.prototype.createIdTokenObj=function(e){return new cj(e.id_token||s8.gT.EMPTY_STRING,this.browserCrypto)},NativeInteractionClient.prototype.createHomeAccountIdentifier=function(e,t){return cH.generateHomeAccountId(e.client_info||s8.gT.EMPTY_STRING,T.Default,this.logger,this.browserCrypto,t)},NativeInteractionClient.prototype.createAccountEntity=function(e,t,n,o){return cH.createAccount(e.client_info,t,n,void 0,void 0,void 0,o,e.account.id)},NativeInteractionClient.prototype.generateScopes=function(e,t){return e.scope?cz.fromString(e.scope):cz.fromString(t.scope)},NativeInteractionClient.prototype.generatePopAccessToken=function(e,t){return(0,s5.mG)(this,void 0,void 0,function(){var n,o;return(0,s5.Jh)(this,function(a){switch(a.label){case 0:if(t.tokenType!==s8.hO.POP)return[3,2];if(e.shr)return this.logger.trace("handleNativeServerResponse: SHR is enabled in native layer"),[2,e.shr];if(n=new ly(this.browserCrypto),o={resourceRequestMethod:t.resourceRequestMethod,resourceRequestUri:t.resourceRequestUri,shrClaims:t.shrClaims,shrNonce:t.shrNonce},!t.keyId)throw cD.e.createKeyIdMissingError();return[4,n.signPopToken(e.access_token,t.keyId,o)];case 1:return[2,a.sent()];case 2:return[2,e.access_token]}})})},NativeInteractionClient.prototype.generateAuthenticationResult=function(e,t,n,o,a,s){return(0,s5.mG)(this,void 0,void 0,function(){var c,l,u,h,p,f,m;return(0,s5.Jh)(this,function(g){switch(g.label){case 0:return c=this.addTelemetryFromNativeResponse(e),l=e.scope?cz.fromString(e.scope):cz.fromString(t.scope),h=(u=e.account.properties||{}).UID||n.claims.oid||n.claims.sub||s8.gT.EMPTY_STRING,p=u.TenantId||n.claims.tid||s8.gT.EMPTY_STRING,[4,this.generatePopAccessToken(e,t)];case 1:return f=g.sent(),m=t.tokenType===s8.hO.POP?s8.hO.POP:s8.hO.BEARER,[2,{authority:a,uniqueId:h,tenantId:p,scopes:l.asArray(),account:o.getAccountInfo(),idToken:e.id_token,idTokenClaims:n.claims,accessToken:f,fromCache:!!c&&this.isResponseFromCache(c),expiresOn:new Date(1e3*Number(s+e.expires_in)),tokenType:m,correlationId:this.correlationId,state:e.state,fromNativeBroker:!0}]}})})},NativeInteractionClient.prototype.cacheAccount=function(e){var t=this;this.browserStorage.setAccount(e),this.browserStorage.removeAccountContext(e).catch(function(e){t.logger.error("Error occurred while removing account context from browser storage. "+e)})},NativeInteractionClient.prototype.cacheNativeTokens=function(e,t,n,o,a,s,c){var l=cU.createIdTokenEntity(n,t.authority,e.id_token||s8.gT.EMPTY_STRING,t.clientId,o.claims.tid||s8.gT.EMPTY_STRING);this.nativeStorageManager.setIdTokenCredential(l);var u=t.tokenType===s8.hO.POP?s8.gT.SHR_NONCE_VALIDITY:("string"==typeof e.expires_in?parseInt(e.expires_in,10):e.expires_in)||0,h=this.generateScopes(e,t),p=cJ.createAccessTokenEntity(n,t.authority,a,t.clientId,s,h.printScopes(),c+u,0,this.browserCrypto);this.nativeStorageManager.setAccessTokenCredential(p)},NativeInteractionClient.prototype.addTelemetryFromNativeResponse=function(e){var t=this.getMATSFromResponse(e);return t?(this.performanceClient.addStaticFields({extensionId:this.nativeMessageHandler.getExtensionId(),extensionVersion:this.nativeMessageHandler.getExtensionVersion(),matsBrokerVersion:t.broker_version,matsAccountJoinOnStart:t.account_join_on_start,matsAccountJoinOnEnd:t.account_join_on_end,matsDeviceJoin:t.device_join,matsPromptBehavior:t.prompt_behavior,matsApiErrorCode:t.api_error_code,matsUiVisible:t.ui_visible,matsSilentCode:t.silent_code,matsSilentBiSubCode:t.silent_bi_sub_code,matsSilentMessage:t.silent_message,matsSilentStatus:t.silent_status,matsHttpStatus:t.http_status,matsHttpEventCount:t.http_event_count},this.correlationId),t):null},NativeInteractionClient.prototype.validateNativeResponse=function(e){if(e.hasOwnProperty("access_token")&&e.hasOwnProperty("id_token")&&e.hasOwnProperty("client_info")&&e.hasOwnProperty("account")&&e.hasOwnProperty("scope")&&e.hasOwnProperty("expires_in"))return e;throw lP.createUnexpectedError("Response missing expected properties.")},NativeInteractionClient.prototype.getMATSFromResponse=function(e){if(e.properties.MATS)try{return JSON.parse(e.properties.MATS)}catch(e){this.logger.error("NativeInteractionClient - Error parsing MATS telemetry, returning null instead")}return null},NativeInteractionClient.prototype.isResponseFromCache=function(e){return void 0===e.is_cached?(this.logger.verbose("NativeInteractionClient - MATS telemetry does not contain field indicating if response was served from cache. Returning false."),!1):!!e.is_cached},NativeInteractionClient.prototype.initializeNativeRequest=function(e){return(0,s5.mG)(this,void 0,void 0,function(){var t,n,o,a,s,c,l,u,h,p=this;return(0,s5.Jh)(this,function(f){switch(f.label){case 0:if(this.logger.trace("NativeInteractionClient - initializeNativeRequest called"),t=e.authority||this.config.auth.authority,(n=new c4(t)).validateAsUri(),o=e.scopes,a=(0,s5._T)(e,["scopes"]),(s=new cz(o||[])).appendScopes(s8.f_),c=function(){switch(p.apiId){case ci.WN.ssoSilent:case ci.WN.acquireTokenSilent_silentFlow:return p.logger.trace("initializeNativeRequest: silent request sets prompt to none"),s8.NJ.NONE}if(!e.prompt){p.logger.trace("initializeNativeRequest: prompt was not provided");return}switch(e.prompt){case s8.NJ.NONE:case s8.NJ.CONSENT:case s8.NJ.LOGIN:return p.logger.trace("initializeNativeRequest: prompt is compatible with native flow"),e.prompt;default:throw p.logger.trace("initializeNativeRequest: prompt = "+e.prompt+" is not compatible with native flow"),cg.createNativePromptParameterNotSupportedError()}},l=(0,s5.pi)((0,s5.pi)({},a),{accountId:this.accountId,clientId:this.config.auth.clientId,authority:n.urlString,scope:s.printScopes(),redirectUri:this.getRedirectUri(e.redirectUri),prompt:c(),correlationId:this.correlationId,tokenType:e.authenticationScheme,windowTitleSubstring:document.title,extraParameters:(0,s5.pi)((0,s5.pi)((0,s5.pi)({},e.extraQueryParameters),e.tokenQueryParameters),{telemetry:ci.BD.MATS_TELEMETRY}),extendedExpiryToken:!1}),e.authenticationScheme!==s8.hO.POP)return[3,2];return u={resourceRequestUri:e.resourceRequestUri,resourceRequestMethod:e.resourceRequestMethod,shrClaims:e.shrClaims,shrNonce:e.shrNonce},[4,new ly(this.browserCrypto).generateCnf(u)];case 1:h=f.sent(),l.reqCnf=h.reqCnfHash,l.keyId=h.kid,f.label=2;case 2:return[2,l]}})})},NativeInteractionClient}(lI),lD=function(){function NativeMessageHandler(e,t,n,o){this.logger=e,this.handshakeTimeoutMs=t,this.extensionId=o,this.resolvers=new Map,this.handshakeResolvers=new Map,this.responseId=0,this.messageChannel=new MessageChannel,this.windowListener=this.onWindowMessage.bind(this),this.performanceClient=n,this.handshakeEvent=n.startMeasurement(w.NativeMessageHandlerHandshake)}return NativeMessageHandler.prototype.sendMessage=function(e){return(0,s5.mG)(this,void 0,void 0,function(){var t,n=this;return(0,s5.Jh)(this,function(o){return this.logger.trace("NativeMessageHandler - sendMessage called."),t={channel:ci.BD.CHANNEL_ID,extensionId:this.extensionId,responseId:this.responseId++,body:e},this.logger.trace("NativeMessageHandler - Sending request to browser extension"),this.logger.tracePii("NativeMessageHandler - Sending request to browser extension: "+JSON.stringify(t)),this.messageChannel.port1.postMessage(t),[2,new Promise(function(e,o){n.resolvers.set(t.responseId,{resolve:e,reject:o})})]})})},NativeMessageHandler.createProvider=function(e,t,n){return(0,s5.mG)(this,void 0,void 0,function(){var o,a;return(0,s5.Jh)(this,function(s){switch(s.label){case 0:e.trace("NativeMessageHandler - createProvider called."),s.label=1;case 1:return s.trys.push([1,3,,5]),[4,(o=new NativeMessageHandler(e,t,n,ci.BD.PREFERRED_EXTENSION_ID)).sendHandshakeRequest()];case 2:return s.sent(),[2,o];case 3:return s.sent(),[4,(a=new NativeMessageHandler(e,t,n)).sendHandshakeRequest()];case 4:return s.sent(),[2,a];case 5:return[2]}})})},NativeMessageHandler.prototype.sendHandshakeRequest=function(){return(0,s5.mG)(this,void 0,void 0,function(){var e,t=this;return(0,s5.Jh)(this,function(n){return this.logger.trace("NativeMessageHandler - sendHandshakeRequest called."),window.addEventListener("message",this.windowListener,!1),e={channel:ci.BD.CHANNEL_ID,extensionId:this.extensionId,responseId:this.responseId++,body:{method:ci.Ky.HandshakeRequest}},this.handshakeEvent.addStaticFields({extensionId:this.extensionId,extensionHandshakeTimeoutMs:this.handshakeTimeoutMs}),this.messageChannel.port1.onmessage=function(e){t.onChannelMessage(e)},window.postMessage(e,window.origin,[this.messageChannel.port2]),[2,new Promise(function(n,o){t.handshakeResolvers.set(e.responseId,{resolve:n,reject:o}),t.timeoutId=window.setTimeout(function(){window.removeEventListener("message",t.windowListener,!1),t.messageChannel.port1.close(),t.messageChannel.port2.close(),t.handshakeEvent.endMeasurement({extensionHandshakeTimedOut:!0,success:!1}),o(cg.createNativeHandshakeTimeoutError()),t.handshakeResolvers.delete(e.responseId)},t.handshakeTimeoutMs)})]})})},NativeMessageHandler.prototype.onWindowMessage=function(e){if(this.logger.trace("NativeMessageHandler - onWindowMessage called"),e.source===window){var t=e.data;if(t.channel&&t.channel===ci.BD.CHANNEL_ID&&(!t.extensionId||t.extensionId===this.extensionId)&&t.body.method===ci.Ky.HandshakeRequest){this.logger.verbose(t.extensionId?"Extension with id: "+t.extensionId+" not installed":"No extension installed"),clearTimeout(this.timeoutId),this.messageChannel.port1.close(),this.messageChannel.port2.close(),window.removeEventListener("message",this.windowListener,!1);var n=this.handshakeResolvers.get(t.responseId);n&&(this.handshakeEvent.endMeasurement({success:!1,extensionInstalled:!1}),n.reject(cg.createNativeExtensionNotInstalledError()))}}},NativeMessageHandler.prototype.onChannelMessage=function(e){this.logger.trace("NativeMessageHandler - onChannelMessage called.");var t=e.data,n=this.resolvers.get(t.responseId),o=this.handshakeResolvers.get(t.responseId);try{var a=t.body.method;if(a===ci.Ky.Response){if(!n)return;var s=t.body.response;if(this.logger.trace("NativeMessageHandler - Received response from browser extension"),this.logger.tracePii("NativeMessageHandler - Received response from browser extension: "+JSON.stringify(s)),"Success"!==s.status)n.reject(lP.createError(s.code,s.description,s.ext));else if(s.result)s.result.code&&s.result.description?n.reject(lP.createError(s.result.code,s.result.description,s.result.ext)):n.resolve(s.result);else throw s7.l.createUnexpectedError("Event does not contain result.");this.resolvers.delete(t.responseId)}else if(a===ci.Ky.HandshakeResponse){if(!o)return;clearTimeout(this.timeoutId),window.removeEventListener("message",this.windowListener,!1),this.extensionId=t.extensionId,this.extensionVersion=t.body.version,this.logger.verbose("NativeMessageHandler - Received HandshakeResponse from extension: "+this.extensionId),this.handshakeEvent.endMeasurement({extensionInstalled:!0,success:!0}),o.resolve(),this.handshakeResolvers.delete(t.responseId)}}catch(t){this.logger.error("Error parsing response from WAM Extension"),this.logger.errorPii("Error parsing response from WAM Extension: "+t.toString()),this.logger.errorPii("Unable to parse "+e),n?n.reject(t):o&&o.reject(t)}},NativeMessageHandler.prototype.getExtensionId=function(){return this.extensionId},NativeMessageHandler.prototype.getExtensionVersion=function(){return this.extensionVersion},NativeMessageHandler.isNativeAvailable=function(e,t,n,o){if(t.trace("isNativeAvailable called"),!e.system.allowNativeBroker)return t.trace("isNativeAvailable: allowNativeBroker is not enabled, returning false"),!1;if(!n)return t.trace("isNativeAvailable: WAM extension provider is not initialized, returning false"),!1;if(o)switch(o){case s8.hO.BEARER:case s8.hO.POP:t.trace("isNativeAvailable: authenticationScheme is supported, returning true");break;default:return t.trace("isNativeAvailable: authenticationScheme is not supported, returning false"),!1}return!0},NativeMessageHandler}(),lL=function(){function InteractionHandler(e,t,n,o,a){this.authModule=e,this.browserStorage=t,this.authCodeRequest=n,this.logger=o,this.performanceClient=a}return InteractionHandler.prototype.handleCodeResponseFromHash=function(e,t,n,o){return(0,s5.mG)(this,void 0,void 0,function(){var a,s,c;return(0,s5.Jh)(this,function(l){if(this.performanceClient.addQueueMeasurement(w.HandleCodeResponseFromHash,this.authCodeRequest.correlationId),this.logger.verbose("InteractionHandler.handleCodeResponse called"),cf.x.isEmpty(e))throw cg.createEmptyHashError(e);if(a=this.browserStorage.generateStateKey(t),!(s=this.browserStorage.getTemporaryCache(a)))throw cD.e.createStateNotFoundError("Cached State");try{c=this.authModule.handleFragmentResponse(e,s)}catch(e){if(e instanceof ce&&e.subError===cm.userCancelledError.code)throw cg.createUserCancelledError();throw e}return this.performanceClient.setPreQueueTime(w.HandleCodeResponseFromServer,this.authCodeRequest.correlationId),[2,this.handleCodeResponseFromServer(c,t,n,o)]})})},InteractionHandler.prototype.handleCodeResponseFromServer=function(e,t,n,o,a){return void 0===a&&(a=!0),(0,s5.mG)(this,void 0,void 0,function(){var s,c,l,u,h,p;return(0,s5.Jh)(this,function(f){switch(f.label){case 0:if(this.performanceClient.addQueueMeasurement(w.HandleCodeResponseFromServer,this.authCodeRequest.correlationId),this.logger.trace("InteractionHandler.handleCodeResponseFromServer called"),s=this.browserStorage.generateStateKey(t),!(c=this.browserStorage.getTemporaryCache(s)))throw cD.e.createStateNotFoundError("Cached State");if(l=this.browserStorage.generateNonceKey(c),u=this.browserStorage.getTemporaryCache(l),this.authCodeRequest.code=e.code,!e.cloud_instance_host_name)return[3,2];return this.performanceClient.setPreQueueTime(w.UpdateTokenEndpointAuthority,this.authCodeRequest.correlationId),[4,this.updateTokenEndpointAuthority(e.cloud_instance_host_name,n,o)];case 1:f.sent(),f.label=2;case 2:return a&&(e.nonce=u||void 0),e.state=c,e.client_info?this.authCodeRequest.clientInfo=e.client_info:(h=this.checkCcsCredentials())&&(this.authCodeRequest.ccsCredential=h),this.performanceClient.setPreQueueTime(w.AuthClientAcquireToken,this.authCodeRequest.correlationId),[4,this.authModule.acquireToken(this.authCodeRequest,e)];case 3:return p=f.sent(),this.browserStorage.cleanRequestByState(t),[2,p]}})})},InteractionHandler.prototype.updateTokenEndpointAuthority=function(e,t,n){return(0,s5.mG)(this,void 0,void 0,function(){var o,a;return(0,s5.Jh)(this,function(s){switch(s.label){case 0:return this.performanceClient.addQueueMeasurement(w.UpdateTokenEndpointAuthority,this.authCodeRequest.correlationId),o="https://"+e+"/"+t.tenant+"/",[4,lk.createDiscoveredInstance(o,n,this.browserStorage,t.options,this.logger,this.performanceClient,this.authCodeRequest.correlationId)];case 1:return a=s.sent(),this.authModule.updateAuthority(a),[2]}})})},InteractionHandler.prototype.checkCcsCredentials=function(){var e=this.browserStorage.getTemporaryCache(ci.c4.CCS_CREDENTIAL,!0);if(e)try{return JSON.parse(e)}catch(t){this.authModule.logger.error("Cache credential could not be parsed"),this.authModule.logger.errorPii("Cache credential could not be parsed: "+e)}return null},InteractionHandler}(),lU=function(e){function PopupClient(t,n,o,a,s,c,l,u,h,p){var f=e.call(this,t,n,o,a,s,c,l,h,p)||this;return f.unloadWindow=f.unloadWindow.bind(f),f.nativeStorage=u,f}return(0,s5.ZT)(PopupClient,e),PopupClient.prototype.acquireToken=function(e){try{var t=this.generatePopupName(e.scopes||s8.f_,e.authority||this.config.auth.authority),n=e.popupWindowAttributes||{};if(this.config.system.asyncPopups)return this.logger.verbose("asyncPopups set to true, acquiring token"),this.acquireTokenPopupAsync(e,t,n);this.logger.verbose("asyncPopup set to false, opening popup before acquiring token");var o=this.openSizedPopup("about:blank",t,n);return this.acquireTokenPopupAsync(e,t,n,o)}catch(e){return Promise.reject(e)}},PopupClient.prototype.logout=function(e){try{this.logger.verbose("logoutPopup called");var t=this.initializeLogoutRequest(e),n=this.generateLogoutPopupName(t),o=e&&e.authority,a=e&&e.mainWindowRedirectUri,s=(null==e?void 0:e.popupWindowAttributes)||{};if(this.config.system.asyncPopups)return this.logger.verbose("asyncPopups set to true"),this.logoutPopupAsync(t,n,s,o,void 0,a);this.logger.verbose("asyncPopup set to false, opening popup");var c=this.openSizedPopup("about:blank",n,s);return this.logoutPopupAsync(t,n,s,o,c,a)}catch(e){return Promise.reject(e)}},PopupClient.prototype.acquireTokenPopupAsync=function(e,t,n,o){return(0,s5.mG)(this,void 0,void 0,function(){var a,s,c,l,u,h,p,f,m,g,y,v,b,C,_,S,E=this;return(0,s5.Jh)(this,function(T){switch(T.label){case 0:return this.logger.verbose("acquireTokenPopupAsync called"),a=this.initializeServerTelemetryManager(ci.WN.acquireTokenPopup),this.performanceClient.setPreQueueTime(w.StandardInteractionClientInitializeAuthorizationRequest,e.correlationId),[4,this.initializeAuthorizationRequest(e,ci.s_.Popup)];case 1:s=T.sent(),this.browserStorage.updateCacheEntries(s.state,s.nonce,s.authority,s.loginHint||s8.gT.EMPTY_STRING,s.account||null),T.label=2;case 2:return T.trys.push([2,8,,9]),this.performanceClient.setPreQueueTime(w.StandardInteractionClientInitializeAuthorizationCodeRequest,e.correlationId),[4,this.initializeAuthorizationCodeRequest(s)];case 3:return c=T.sent(),this.performanceClient.setPreQueueTime(w.StandardInteractionClientCreateAuthCodeClient,e.correlationId),[4,this.createAuthCodeClient(a,s.authority,s.azureCloudOptions)];case 4:return l=T.sent(),this.logger.verbose("Auth code client created"),u=lD.isNativeAvailable(this.config,this.logger,this.nativeMessageHandler,e.authenticationScheme),h=void 0,u&&(h=this.performanceClient.startMeasurement(w.FetchAccountIdWithNativeBroker,e.correlationId)),[4,l.getAuthCodeUrl((0,s5.pi)((0,s5.pi)({},s),{nativeBroker:u}))];case 5:return p=T.sent(),f=new lL(l,this.browserStorage,c,this.logger,this.performanceClient),m={popup:o,popupName:t,popupWindowAttributes:n},g=this.initiateAuthRequest(p,m),this.eventHandler.emitEvent(lu.t.POPUP_OPENED,ci.s_.Popup,{popupWindow:g},null),[4,this.monitorPopupForHash(g)];case 6:if(y=T.sent(),v=c4.getDeserializedHash(y),b=this.validateAndExtractStateFromHash(v,ci.s_.Popup,s.correlationId),lh.removeThrottle(this.browserStorage,this.config.auth.clientId,c),v.accountId){if(this.logger.verbose("Account id found in hash, calling WAM for token"),h&&h.endMeasurement({success:!0,isNativeBroker:!0}),!this.nativeMessageHandler)throw cg.createNativeConnectionNotEstablishedError();return C=new lB(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,ci.WN.acquireTokenPopup,this.performanceClient,this.nativeMessageHandler,v.accountId,this.nativeStorage,s.correlationId),_=c1.parseRequestState(this.browserCrypto,b).userRequestState,[2,C.acquireToken((0,s5.pi)((0,s5.pi)({},s),{state:_,prompt:void 0})).finally(function(){E.browserStorage.cleanRequestByState(b)})]}return[4,f.handleCodeResponseFromHash(y,b,l.authority,this.networkClient)];case 7:return[2,T.sent()];case 8:throw S=T.sent(),o&&o.close(),S instanceof s7.l&&S.setCorrelationId(this.correlationId),a.cacheFailedRequest(S),this.browserStorage.cleanRequestByState(s.state),S;case 9:return[2]}})})},PopupClient.prototype.logoutPopupAsync=function(e,t,n,o,a,s){return(0,s5.mG)(this,void 0,void 0,function(){var c,l,u,h,p,f,m;return(0,s5.Jh)(this,function(g){switch(g.label){case 0:this.logger.verbose("logoutPopupAsync called"),this.eventHandler.emitEvent(lu.t.LOGOUT_START,ci.s_.Popup,e),c=this.initializeServerTelemetryManager(ci.WN.logoutPopup),g.label=1;case 1:return g.trys.push([1,5,,6]),[4,this.clearCacheOnLogout(e.account)];case 2:return g.sent(),this.performanceClient.setPreQueueTime(w.StandardInteractionClientCreateAuthCodeClient,e.correlationId),[4,this.createAuthCodeClient(c,o)];case 3:return l=g.sent(),this.logger.verbose("Auth code client created"),u=l.getLogoutUri(e),this.eventHandler.emitEvent(lu.t.LOGOUT_SUCCESS,ci.s_.Popup,e),h=this.openPopup(u,{popupName:t,popupWindowAttributes:n,popup:a}),this.eventHandler.emitEvent(lu.t.POPUP_OPENED,ci.s_.Popup,{popupWindow:h},null),[4,this.waitForLogoutPopup(h)];case 4:return g.sent(),s?(p={apiId:ci.WN.logoutPopup,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},f=c4.getAbsoluteUrl(s,la.getCurrentUri()),this.logger.verbose("Redirecting main window to url specified in the request"),this.logger.verbosePii("Redirecting main window to: "+f),this.navigationClient.navigateInternal(f,p)):this.logger.verbose("No main window navigation requested"),[3,6];case 5:throw m=g.sent(),a&&a.close(),m instanceof s7.l&&m.setCorrelationId(this.correlationId),this.browserStorage.setInteractionInProgress(!1),this.eventHandler.emitEvent(lu.t.LOGOUT_FAILURE,ci.s_.Popup,null,m),this.eventHandler.emitEvent(lu.t.LOGOUT_END,ci.s_.Popup),c.cacheFailedRequest(m),m;case 6:return this.eventHandler.emitEvent(lu.t.LOGOUT_END,ci.s_.Popup),[2]}})})},PopupClient.prototype.initiateAuthRequest=function(e,t){if(!cf.x.isEmpty(e))return this.logger.infoPii("Navigate to: "+e),this.openPopup(e,t);throw this.logger.error("Navigate url is empty"),cg.createEmptyNavigationUriError()},PopupClient.prototype.monitorPopupForHash=function(e){var t=this;return new Promise(function(n,o){var a=t.config.system.windowHashTimeout/t.config.system.pollIntervalMilliseconds,s=0;t.logger.verbose("PopupHandler.monitorPopupForHash - polling started");var c=setInterval(function(){if(e.closed){t.logger.error("PopupHandler.monitorPopupForHash - window closed"),t.cleanPopup(),clearInterval(c),o(cg.createUserCancelledError());return}var l=s8.gT.EMPTY_STRING,u=s8.gT.EMPTY_STRING;try{l=e.location.href,u=e.location.hash}catch(e){}!cf.x.isEmpty(l)&&"about:blank"!==l&&(t.logger.verbose("PopupHandler.monitorPopupForHash - popup window is on same origin as caller"),s++,u?(t.logger.verbose("PopupHandler.monitorPopupForHash - found hash in url"),clearInterval(c),t.cleanPopup(e),c4.hashContainsKnownProperties(u)?(t.logger.verbose("PopupHandler.monitorPopupForHash - hash contains known properties, returning."),n(u)):(t.logger.error("PopupHandler.monitorPopupForHash - found hash in url but it does not contain known properties. Check that your router is not changing the hash prematurely."),t.logger.errorPii("PopupHandler.monitorPopupForHash - hash found: "+u),o(cg.createHashDoesNotContainKnownPropertiesError()))):s>a&&(t.logger.error("PopupHandler.monitorPopupForHash - unable to find hash in url, timing out"),clearInterval(c),o(cg.createMonitorPopupTimeoutError())))},t.config.system.pollIntervalMilliseconds)})},PopupClient.prototype.waitForLogoutPopup=function(e){var t=this;return new Promise(function(n){t.logger.verbose("PopupHandler.waitForLogoutPopup - polling started");var o=setInterval(function(){e.closed&&(t.logger.error("PopupHandler.waitForLogoutPopup - window closed"),t.cleanPopup(),clearInterval(o),n());var a=s8.gT.EMPTY_STRING;try{a=e.location.href}catch(e){}cf.x.isEmpty(a)||"about:blank"===a||(t.logger.verbose("PopupHandler.waitForLogoutPopup - popup window is on same origin as caller, closing."),clearInterval(o),t.cleanPopup(e),n())},t.config.system.pollIntervalMilliseconds)})},PopupClient.prototype.openPopup=function(e,t){try{var n=void 0;if(t.popup?(n=t.popup,this.logger.verbosePii("Navigating popup window to: "+e),n.location.assign(e)):void 0===t.popup&&(this.logger.verbosePii("Opening popup window to: "+e),n=this.openSizedPopup(e,t.popupName,t.popupWindowAttributes)),!n)throw cg.createEmptyWindowCreatedError();return n.focus&&n.focus(),this.currentWindow=n,window.addEventListener("beforeunload",this.unloadWindow),n}catch(e){throw this.logger.error("error opening popup "+e.message),this.browserStorage.setInteractionInProgress(!1),cg.createPopupWindowError(e.toString())}},PopupClient.prototype.openSizedPopup=function(e,t,n){var o,a,s,c,l=window.screenLeft?window.screenLeft:window.screenX,u=window.screenTop?window.screenTop:window.screenY,h=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,p=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,f=null===(o=n.popupSize)||void 0===o?void 0:o.width,m=null===(a=n.popupSize)||void 0===a?void 0:a.height,g=null===(s=n.popupPosition)||void 0===s?void 0:s.top,y=null===(c=n.popupPosition)||void 0===c?void 0:c.left;return(!f||f<0||f>h)&&(this.logger.verbose("Default popup window width used. Window width not configured or invalid."),f=ci.qx.POPUP_WIDTH),(!m||m<0||m>p)&&(this.logger.verbose("Default popup window height used. Window height not configured or invalid."),m=ci.qx.POPUP_HEIGHT),(!g||g<0||g>p)&&(this.logger.verbose("Default popup window top position used. Window top not configured or invalid."),g=Math.max(0,p/2-ci.qx.POPUP_HEIGHT/2+u)),(!y||y<0||y>h)&&(this.logger.verbose("Default popup window left position used. Window left not configured or invalid."),y=Math.max(0,h/2-ci.qx.POPUP_WIDTH/2+l)),window.open(e,t,"width="+f+", height="+m+", top="+g+", left="+y+", scrollbars=yes")},PopupClient.prototype.unloadWindow=function(e){this.browserStorage.cleanRequestByInteractionType(ci.s_.Popup),this.currentWindow&&this.currentWindow.close(),e.preventDefault()},PopupClient.prototype.cleanPopup=function(e){e&&e.close(),window.removeEventListener("beforeunload",this.unloadWindow),this.browserStorage.setInteractionInProgress(!1)},PopupClient.prototype.generatePopupName=function(e,t){return ci.qx.POPUP_NAME_PREFIX+"."+this.config.auth.clientId+"."+e.join("-")+"."+t+"."+this.correlationId},PopupClient.prototype.generateLogoutPopupName=function(e){var t=e.account&&e.account.homeAccountId;return ci.qx.POPUP_NAME_PREFIX+"."+this.config.auth.clientId+"."+t+"."+this.correlationId},PopupClient}(lx),lF=function(e){function RedirectHandler(t,n,o,a,s,c){var l=e.call(this,t,n,o,a,c)||this;return l.browserCrypto=s,l}return(0,s5.ZT)(RedirectHandler,e),RedirectHandler.prototype.initiateAuthRequest=function(e,t){return(0,s5.mG)(this,void 0,void 0,function(){var n;return(0,s5.Jh)(this,function(o){switch(o.label){case 0:if(this.logger.verbose("RedirectHandler.initiateAuthRequest called"),cf.x.isEmpty(e))return[3,7];if(t.redirectStartPage&&(this.logger.verbose("RedirectHandler.initiateAuthRequest: redirectStartPage set, caching start page"),this.browserStorage.setTemporaryCache(ci.c4.ORIGIN_URI,t.redirectStartPage,!0)),this.browserStorage.setTemporaryCache(ci.c4.CORRELATION_ID,this.authCodeRequest.correlationId,!0),this.browserStorage.cacheCodeRequest(this.authCodeRequest,this.browserCrypto),this.logger.infoPii("RedirectHandler.initiateAuthRequest: Navigate to: "+e),n={apiId:ci.WN.acquireTokenRedirect,timeout:t.redirectTimeout,noHistory:!1},"function"!=typeof t.onRedirectNavigate)return[3,4];if(this.logger.verbose("RedirectHandler.initiateAuthRequest: Invoking onRedirectNavigate callback"),!(!1!==t.onRedirectNavigate(e)))return[3,2];return this.logger.verbose("RedirectHandler.initiateAuthRequest: onRedirectNavigate did not return false, navigating"),[4,t.navigationClient.navigateExternal(e,n)];case 1:case 5:return o.sent(),[2];case 2:return this.logger.verbose("RedirectHandler.initiateAuthRequest: onRedirectNavigate returned false, stopping navigation"),[2];case 3:return[3,6];case 4:return this.logger.verbose("RedirectHandler.initiateAuthRequest: Navigating window to navigate url"),[4,t.navigationClient.navigateExternal(e,n)];case 6:return[3,8];case 7:throw this.logger.info("RedirectHandler.initiateAuthRequest: Navigate url is empty"),cg.createEmptyNavigationUriError();case 8:return[2]}})})},RedirectHandler.prototype.handleCodeResponseFromHash=function(e,t,n,o){return(0,s5.mG)(this,void 0,void 0,function(){var a,s,c,l,u,h,p;return(0,s5.Jh)(this,function(f){switch(f.label){case 0:if(this.logger.verbose("RedirectHandler.handleCodeResponse called"),cf.x.isEmpty(e))throw cg.createEmptyHashError(e);if(this.browserStorage.setInteractionInProgress(!1),a=this.browserStorage.generateStateKey(t),!(s=this.browserStorage.getTemporaryCache(a)))throw cD.e.createStateNotFoundError("Cached State");try{c=this.authModule.handleFragmentResponse(e,s)}catch(e){if(e instanceof ce&&e.subError===cm.userCancelledError.code)throw cg.createUserCancelledError();throw e}if(l=this.browserStorage.generateNonceKey(s),u=this.browserStorage.getTemporaryCache(l),this.authCodeRequest.code=c.code,!c.cloud_instance_host_name)return[3,2];return[4,this.updateTokenEndpointAuthority(c.cloud_instance_host_name,n,o)];case 1:f.sent(),f.label=2;case 2:return c.nonce=u||void 0,c.state=s,c.client_info?this.authCodeRequest.clientInfo=c.client_info:(h=this.checkCcsCredentials())&&(this.authCodeRequest.ccsCredential=h),[4,this.authModule.acquireToken(this.authCodeRequest,c)];case 3:return p=f.sent(),this.browserStorage.cleanRequestByState(t),[2,p]}})})},RedirectHandler}(lL),lq=function(e){function RedirectClient(t,n,o,a,s,c,l,u,h,p){var f=e.call(this,t,n,o,a,s,c,l,h,p)||this;return f.nativeStorage=u,f}return(0,s5.ZT)(RedirectClient,e),RedirectClient.prototype.acquireToken=function(e){return(0,s5.mG)(this,void 0,void 0,function(){var t,n,o,a,s,c,l,u,h,p=this;return(0,s5.Jh)(this,function(f){switch(f.label){case 0:return this.performanceClient.setPreQueueTime(w.StandardInteractionClientInitializeAuthorizationRequest,e.correlationId),[4,this.initializeAuthorizationRequest(e,ci.s_.Redirect)];case 1:t=f.sent(),this.browserStorage.updateCacheEntries(t.state,t.nonce,t.authority,t.loginHint||s8.gT.EMPTY_STRING,t.account||null),n=this.initializeServerTelemetryManager(ci.WN.acquireTokenRedirect),o=function(e){e.persisted&&(p.logger.verbose("Page was restored from back/forward cache. Clearing temporary cache."),p.browserStorage.cleanRequestByState(t.state))},f.label=2;case 2:return f.trys.push([2,7,,8]),this.performanceClient.setPreQueueTime(w.StandardInteractionClientInitializeAuthorizationCodeRequest,e.correlationId),[4,this.initializeAuthorizationCodeRequest(t)];case 3:return a=f.sent(),this.performanceClient.setPreQueueTime(w.StandardInteractionClientCreateAuthCodeClient,e.correlationId),[4,this.createAuthCodeClient(n,t.authority,t.azureCloudOptions)];case 4:return s=f.sent(),this.logger.verbose("Auth code client created"),c=new lF(s,this.browserStorage,a,this.logger,this.browserCrypto,this.performanceClient),[4,s.getAuthCodeUrl((0,s5.pi)((0,s5.pi)({},t),{nativeBroker:lD.isNativeAvailable(this.config,this.logger,this.nativeMessageHandler,e.authenticationScheme)}))];case 5:return l=f.sent(),u=this.getRedirectStartPage(e.redirectStartPage),this.logger.verbosePii("Redirect start page: "+u),window.addEventListener("pageshow",o),[4,c.initiateAuthRequest(l,{navigationClient:this.navigationClient,redirectTimeout:this.config.system.redirectNavigationTimeout,redirectStartPage:u,onRedirectNavigate:e.onRedirectNavigate})];case 6:return[2,f.sent()];case 7:throw(h=f.sent())instanceof s7.l&&h.setCorrelationId(this.correlationId),window.removeEventListener("pageshow",o),n.cacheFailedRequest(h),this.browserStorage.cleanRequestByState(t.state),h;case 8:return[2]}})})},RedirectClient.prototype.handleRedirectPromise=function(e){return(0,s5.mG)(this,void 0,void 0,function(){var t,n,o,a,s,c,l,u,h,p;return(0,s5.Jh)(this,function(f){switch(f.label){case 0:t=this.initializeServerTelemetryManager(ci.WN.handleRedirectPromise),f.label=1;case 1:if(f.trys.push([1,10,,11]),!this.browserStorage.isInteractionInProgress(!0))return this.logger.info("handleRedirectPromise called but there is no interaction in progress, returning null."),[2,null];if(!(n=this.getRedirectResponseHash(e||window.location.hash)))return this.logger.info("handleRedirectPromise did not detect a response hash as a result of a redirect. Cleaning temporary cache."),this.browserStorage.cleanRequestByInteractionType(ci.s_.Redirect),[2,null];o=void 0;try{a=c4.getDeserializedHash(n),o=this.validateAndExtractStateFromHash(a,ci.s_.Redirect),this.logger.verbose("State extracted from hash")}catch(e){return this.logger.info("handleRedirectPromise was unable to extract state due to: "+e),this.browserStorage.cleanRequestByInteractionType(ci.s_.Redirect),[2,null]}if(s=this.browserStorage.getTemporaryCache(ci.c4.ORIGIN_URI,!0)||s8.gT.EMPTY_STRING,!(c4.removeHashFromUrl(s)===c4.removeHashFromUrl(window.location.href)&&this.config.auth.navigateToLoginRequestUrl))return[3,3];return this.logger.verbose("Current page is loginRequestUrl, handling hash"),[4,this.handleHash(n,o,t)];case 2:return c=f.sent(),s.indexOf("#")>-1&&la.replaceHash(s),[2,c];case 3:if(this.config.auth.navigateToLoginRequestUrl)return[3,4];return this.logger.verbose("NavigateToLoginRequestUrl set to false, handling hash"),[2,this.handleHash(n,o,t)];case 4:if(!(!la.isInIframe()||this.config.system.allowRedirectInIframe))return[3,9];if(this.browserStorage.setTemporaryCache(ci.c4.URL_HASH,n,!0),l={apiId:ci.WN.handleRedirectPromise,timeout:this.config.system.redirectNavigationTimeout,noHistory:!0},u=!0,!(!s||"null"===s))return[3,6];return h=la.getHomepage(),this.browserStorage.setTemporaryCache(ci.c4.ORIGIN_URI,h,!0),this.logger.warning("Unable to get valid login request url from cache, redirecting to home page"),[4,this.navigationClient.navigateInternal(h,l)];case 5:return u=f.sent(),[3,8];case 6:return this.logger.verbose("Navigating to loginRequestUrl: "+s),[4,this.navigationClient.navigateInternal(s,l)];case 7:u=f.sent(),f.label=8;case 8:if(!u)return[2,this.handleHash(n,o,t)];f.label=9;case 9:return[2,null];case 10:throw(p=f.sent())instanceof s7.l&&p.setCorrelationId(this.correlationId),t.cacheFailedRequest(p),this.browserStorage.cleanRequestByInteractionType(ci.s_.Redirect),p;case 11:return[2]}})})},RedirectClient.prototype.getRedirectResponseHash=function(e){if(this.logger.verbose("getRedirectResponseHash called"),c4.hashContainsKnownProperties(e))return la.clearHash(window),this.logger.verbose("Hash contains known properties, returning response hash"),e;var t=this.browserStorage.getTemporaryCache(ci.c4.URL_HASH,!0);return this.browserStorage.removeItem(this.browserStorage.generateCacheKey(ci.c4.URL_HASH)),this.logger.verbose("Hash does not contain known properties, returning cached hash"),t},RedirectClient.prototype.handleHash=function(e,t,n){return(0,s5.mG)(this,void 0,void 0,function(){var o,a,s,c,l,u,h=this;return(0,s5.Jh)(this,function(p){switch(p.label){case 0:if(o=this.browserStorage.getCachedRequest(t,this.browserCrypto),this.logger.verbose("handleHash called, retrieved cached request"),(a=c4.getDeserializedHash(e)).accountId){if(this.logger.verbose("Account id found in hash, calling WAM for token"),!this.nativeMessageHandler)throw cg.createNativeConnectionNotEstablishedError();return s=new lB(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,ci.WN.acquireTokenPopup,this.performanceClient,this.nativeMessageHandler,a.accountId,this.browserStorage,o.correlationId),c=c1.parseRequestState(this.browserCrypto,t).userRequestState,[2,s.acquireToken((0,s5.pi)((0,s5.pi)({},o),{state:c,prompt:void 0})).finally(function(){h.browserStorage.cleanRequestByState(t)})]}if(!(l=this.browserStorage.getCachedAuthority(t)))throw cg.createNoCachedAuthorityError();return this.performanceClient.setPreQueueTime(w.StandardInteractionClientCreateAuthCodeClient,o.correlationId),[4,this.createAuthCodeClient(n,l)];case 1:return u=p.sent(),this.logger.verbose("Auth code client created"),lh.removeThrottle(this.browserStorage,this.config.auth.clientId,o),[4,new lF(u,this.browserStorage,o,this.logger,this.browserCrypto,this.performanceClient).handleCodeResponseFromHash(e,t,u.authority,this.networkClient)];case 2:return[2,p.sent()]}})})},RedirectClient.prototype.logout=function(e){return(0,s5.mG)(this,void 0,void 0,function(){var t,n,o,a,s,c;return(0,s5.Jh)(this,function(l){switch(l.label){case 0:this.logger.verbose("logoutRedirect called"),t=this.initializeLogoutRequest(e),n=this.initializeServerTelemetryManager(ci.WN.logout),l.label=1;case 1:return l.trys.push([1,10,,11]),this.eventHandler.emitEvent(lu.t.LOGOUT_START,ci.s_.Redirect,e),[4,this.clearCacheOnLogout(t.account)];case 2:return l.sent(),o={apiId:ci.WN.logout,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},this.performanceClient.setPreQueueTime(w.StandardInteractionClientCreateAuthCodeClient,t.correlationId),[4,this.createAuthCodeClient(n,e&&e.authority)];case 3:if(a=l.sent(),this.logger.verbose("Auth code client created"),s=a.getLogoutUri(t),this.eventHandler.emitEvent(lu.t.LOGOUT_SUCCESS,ci.s_.Redirect,t),!(e&&"function"==typeof e.onRedirectNavigate))return[3,7];if(!(!1!==e.onRedirectNavigate(s)))return[3,5];return this.logger.verbose("Logout onRedirectNavigate did not return false, navigating"),this.browserStorage.getInteractionInProgress()||this.browserStorage.setInteractionInProgress(!0),[4,this.navigationClient.navigateExternal(s,o)];case 4:return l.sent(),[2];case 5:this.browserStorage.setInteractionInProgress(!1),this.logger.verbose("Logout onRedirectNavigate returned false, stopping navigation"),l.label=6;case 6:return[3,9];case 7:return this.browserStorage.getInteractionInProgress()||this.browserStorage.setInteractionInProgress(!0),[4,this.navigationClient.navigateExternal(s,o)];case 8:return l.sent(),[2];case 9:return[3,11];case 10:throw(c=l.sent())instanceof s7.l&&c.setCorrelationId(this.correlationId),n.cacheFailedRequest(c),this.eventHandler.emitEvent(lu.t.LOGOUT_FAILURE,ci.s_.Redirect,null,c),this.eventHandler.emitEvent(lu.t.LOGOUT_END,ci.s_.Redirect),c;case 11:return this.eventHandler.emitEvent(lu.t.LOGOUT_END,ci.s_.Redirect),[2]}})})},RedirectClient.prototype.getRedirectStartPage=function(e){var t=e||window.location.href;return c4.getAbsoluteUrl(t,la.getCurrentUri())},RedirectClient}(lx),lz=function(e){function SilentHandler(t,n,o,a,s,c){var l=e.call(this,t,n,o,a,c)||this;return l.navigateFrameWait=s.navigateFrameWait,l.pollIntervalMilliseconds=s.pollIntervalMilliseconds,l}return(0,s5.ZT)(SilentHandler,e),SilentHandler.prototype.initiateAuthRequest=function(e){return(0,s5.mG)(this,void 0,void 0,function(){return(0,s5.Jh)(this,function(t){switch(t.label){case 0:if(this.performanceClient.addQueueMeasurement(w.SilentHandlerInitiateAuthRequest,this.authCodeRequest.correlationId),cf.x.isEmpty(e))throw this.logger.info("Navigate url is empty"),cg.createEmptyNavigationUriError();if(!this.navigateFrameWait)return[3,2];return this.performanceClient.setPreQueueTime(w.SilentHandlerLoadFrame,this.authCodeRequest.correlationId),[4,this.loadFrame(e)];case 1:return[2,t.sent()];case 2:return[2,this.loadFrameSync(e)]}})})},SilentHandler.prototype.monitorIframeForHash=function(e,t){var n=this;return this.performanceClient.addQueueMeasurement(w.SilentHandlerMonitorIframeForHash,this.authCodeRequest.correlationId),new Promise(function(o,a){t<6e3&&n.logger.warning("system.loadFrameTimeout or system.iframeHashTimeout set to lower ("+t+"ms) than the default (6000ms). This may result in timeouts.");var s=window.performance.now()+t,c=setInterval(function(){if(window.performance.now()>s){n.removeHiddenIframe(e),clearInterval(c),a(cg.createMonitorIframeTimeoutError());return}var t=s8.gT.EMPTY_STRING,l=e.contentWindow;try{t=l?l.location.href:s8.gT.EMPTY_STRING}catch(e){}if(!cf.x.isEmpty(t)){var u=l?l.location.hash:s8.gT.EMPTY_STRING;if(c4.hashContainsKnownProperties(u)){n.removeHiddenIframe(e),clearInterval(c),o(u);return}}},n.pollIntervalMilliseconds)})},SilentHandler.prototype.loadFrame=function(e){var t=this;return this.performanceClient.addQueueMeasurement(w.SilentHandlerLoadFrame,this.authCodeRequest.correlationId),new Promise(function(n,o){var a=t.createHiddenIframe();setTimeout(function(){if(!a){o("Unable to load iframe");return}a.src=e,n(a)},t.navigateFrameWait)})},SilentHandler.prototype.loadFrameSync=function(e){var t=this.createHiddenIframe();return t.src=e,t},SilentHandler.prototype.createHiddenIframe=function(){var e=document.createElement("iframe");return e.style.visibility="hidden",e.style.position="absolute",e.style.width=e.style.height="0",e.style.border="0",e.setAttribute("sandbox","allow-scripts allow-same-origin allow-forms"),document.getElementsByTagName("body")[0].appendChild(e),e},SilentHandler.prototype.removeHiddenIframe=function(e){document.body===e.parentNode&&document.body.removeChild(e)},SilentHandler}(lL),lH=function(e){function SilentIframeClient(t,n,o,a,s,c,l,u,h,p,f){var m=e.call(this,t,n,o,a,s,c,u,p,f)||this;return m.apiId=l,m.nativeStorage=h,m}return(0,s5.ZT)(SilentIframeClient,e),SilentIframeClient.prototype.acquireToken=function(e){return(0,s5.mG)(this,void 0,void 0,function(){var t,n,o,a,s;return(0,s5.Jh)(this,function(c){switch(c.label){case 0:if(this.performanceClient.addQueueMeasurement(w.SilentIframeClientAcquireToken,e.correlationId),this.logger.verbose("acquireTokenByIframe called"),t=this.performanceClient.startMeasurement(w.SilentIframeClientAcquireToken,e.correlationId),cf.x.isEmpty(e.loginHint)&&cf.x.isEmpty(e.sid)&&(!e.account||cf.x.isEmpty(e.account.username))&&this.logger.warning("No user hint provided. The authorization server may need more information to complete this request."),e.prompt&&e.prompt!==s8.NJ.NONE&&e.prompt!==s8.NJ.NO_SESSION)throw t.endMeasurement({success:!1}),cg.createSilentPromptValueError(e.prompt);return this.performanceClient.setPreQueueTime(w.StandardInteractionClientInitializeAuthorizationRequest,e.correlationId),[4,this.initializeAuthorizationRequest((0,s5.pi)((0,s5.pi)({},e),{prompt:e.prompt||s8.NJ.NONE}),ci.s_.Silent)];case 1:n=c.sent(),this.browserStorage.updateCacheEntries(n.state,n.nonce,n.authority,n.loginHint||s8.gT.EMPTY_STRING,n.account||null),o=this.initializeServerTelemetryManager(this.apiId),c.label=2;case 2:return c.trys.push([2,5,,6]),this.performanceClient.setPreQueueTime(w.StandardInteractionClientCreateAuthCodeClient,e.correlationId),[4,this.createAuthCodeClient(o,n.authority,n.azureCloudOptions)];case 3:return a=c.sent(),this.logger.verbose("Auth code client created"),this.performanceClient.setPreQueueTime(w.SilentIframeClientTokenHelper,e.correlationId),[4,this.silentTokenHelper(a,n).then(function(e){return t.endMeasurement({success:!0,fromCache:!1,requestId:e.requestId}),e})];case 4:return[2,c.sent()];case 5:throw(s=c.sent())instanceof s7.l&&s.setCorrelationId(this.correlationId),o.cacheFailedRequest(s),this.browserStorage.cleanRequestByState(n.state),t.endMeasurement({errorCode:s instanceof s7.l&&s.errorCode||void 0,subErrorCode:s instanceof s7.l&&s.subError||void 0,success:!1}),s;case 6:return[2]}})})},SilentIframeClient.prototype.logout=function(){return Promise.reject(cg.createSilentLogoutUnsupportedError())},SilentIframeClient.prototype.silentTokenHelper=function(e,t){return(0,s5.mG)(this,void 0,void 0,function(){var n,o,a,s,c,l,u,h,p,f=this;return(0,s5.Jh)(this,function(m){switch(m.label){case 0:return this.performanceClient.addQueueMeasurement(w.SilentIframeClientTokenHelper,t.correlationId),this.performanceClient.setPreQueueTime(w.StandardInteractionClientInitializeAuthorizationCodeRequest,t.correlationId),[4,this.initializeAuthorizationCodeRequest(t)];case 1:return n=m.sent(),this.performanceClient.setPreQueueTime(w.GetAuthCodeUrl,t.correlationId),[4,e.getAuthCodeUrl((0,s5.pi)((0,s5.pi)({},t),{nativeBroker:lD.isNativeAvailable(this.config,this.logger,this.nativeMessageHandler,t.authenticationScheme)}))];case 2:return o=m.sent(),a=new lz(e,this.browserStorage,n,this.logger,this.config.system,this.performanceClient),this.performanceClient.setPreQueueTime(w.SilentHandlerInitiateAuthRequest,t.correlationId),[4,a.initiateAuthRequest(o)];case 3:return s=m.sent(),this.performanceClient.setPreQueueTime(w.SilentHandlerMonitorIframeForHash,t.correlationId),[4,a.monitorIframeForHash(s,this.config.system.iframeHashTimeout)];case 4:if(c=m.sent(),l=c4.getDeserializedHash(c),u=this.validateAndExtractStateFromHash(l,ci.s_.Silent,n.correlationId),l.accountId){if(this.logger.verbose("Account id found in hash, calling WAM for token"),!this.nativeMessageHandler)throw cg.createNativeConnectionNotEstablishedError();return h=new lB(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.apiId,this.performanceClient,this.nativeMessageHandler,l.accountId,this.browserStorage,this.correlationId),p=c1.parseRequestState(this.browserCrypto,u).userRequestState,[2,h.acquireToken((0,s5.pi)((0,s5.pi)({},t),{state:p,prompt:t.prompt||s8.NJ.NONE})).finally(function(){f.browserStorage.cleanRequestByState(u)})]}return this.performanceClient.setPreQueueTime(w.HandleCodeResponseFromHash,t.correlationId),[2,a.handleCodeResponseFromHash(c,u,e.authority,this.networkClient)]}})})},SilentIframeClient}(lx),lj=function(e){function SilentRefreshClient(){return null!==e&&e.apply(this,arguments)||this}return(0,s5.ZT)(SilentRefreshClient,e),SilentRefreshClient.prototype.acquireToken=function(e){return(0,s5.mG)(this,void 0,void 0,function(){var t,n,o,a,s,c=this;return(0,s5.Jh)(this,function(l){switch(l.label){case 0:return this.performanceClient.addQueueMeasurement(w.SilentRefreshClientAcquireToken,e.correlationId),this.performanceClient.setPreQueueTime(w.InitializeBaseRequest,e.correlationId),n=[(0,s5.pi)({},e)],[4,this.initializeBaseRequest(e)];case 1:return t=s5.pi.apply(void 0,n.concat([l.sent()])),o=this.performanceClient.startMeasurement(w.SilentRefreshClientAcquireToken,t.correlationId),a=this.initializeServerTelemetryManager(ci.WN.acquireTokenSilent_silentFlow),[4,this.createRefreshTokenClient(a,t.authority,t.azureCloudOptions)];case 2:return s=l.sent(),this.logger.verbose("Refresh token client created"),this.performanceClient.setPreQueueTime(w.RefreshTokenClientAcquireTokenByRefreshToken,e.correlationId),[2,s.acquireTokenByRefreshToken(t).then(function(e){return o.endMeasurement({success:!0,fromCache:e.fromCache,requestId:e.requestId}),e}).catch(function(e){throw e instanceof s7.l&&e.setCorrelationId(c.correlationId),a.cacheFailedRequest(e),o.endMeasurement({errorCode:e.errorCode,subErrorCode:e.subError,success:!1}),e})]}})})},SilentRefreshClient.prototype.logout=function(){return Promise.reject(cg.createSilentLogoutUnsupportedError())},SilentRefreshClient.prototype.createRefreshTokenClient=function(e,t,n){return(0,s5.mG)(this,void 0,void 0,function(){var o;return(0,s5.Jh)(this,function(a){switch(a.label){case 0:return this.performanceClient.setPreQueueTime(w.StandardInteractionClientGetClientConfiguration,this.correlationId),[4,this.getClientConfiguration(e,t,n)];case 1:return o=a.sent(),[2,new lM(o,this.performanceClient)]}})})},SilentRefreshClient}(lx),lV=function(){function TokenCache(e,t,n,o){this.isBrowserEnvironment="undefined"!=typeof window,this.config=e,this.storage=t,this.logger=n,this.cryptoObj=o}return TokenCache.prototype.loadExternalTokens=function(e,t,n){if(this.logger.info("TokenCache - loadExternalTokens called"),!t.id_token)throw cg.createUnableToLoadTokenError("Please ensure server response includes id token.");var o,a,s=new cj(t.id_token,this.cryptoObj);if(e.account){var c=this.loadAccount(s,e.account.environment,void 0,void 0,e.account.homeAccountId);o=new CacheRecord(c,this.loadIdToken(s,c.homeAccountId,e.account.environment,e.account.tenantId),this.loadAccessToken(e,t,c.homeAccountId,e.account.environment,e.account.tenantId,n),this.loadRefreshToken(e,t,c.homeAccountId,e.account.environment))}else if(e.authority){var l=lT.generateAuthority(e.authority,e.azureCloudOptions),u={protocolMode:this.config.auth.protocolMode,knownAuthorities:this.config.auth.knownAuthorities,cloudDiscoveryMetadata:this.config.auth.cloudDiscoveryMetadata,authorityMetadata:this.config.auth.authorityMetadata,skipAuthorityMetadataCache:this.config.auth.skipAuthorityMetadataCache};if(a=new lT(l,this.config.system.networkClient,this.storage,u,this.logger),n.clientInfo){this.logger.trace("TokenCache - homeAccountId from options");var c=this.loadAccount(s,a.hostnameAndPort,n.clientInfo,a.authorityType);o=new CacheRecord(c,this.loadIdToken(s,c.homeAccountId,a.hostnameAndPort,a.tenant),this.loadAccessToken(e,t,c.homeAccountId,a.hostnameAndPort,a.tenant,n),this.loadRefreshToken(e,t,c.homeAccountId,a.hostnameAndPort))}else if(t.client_info){this.logger.trace("TokenCache - homeAccountId from response");var c=this.loadAccount(s,a.hostnameAndPort,t.client_info,a.authorityType);o=new CacheRecord(c,this.loadIdToken(s,c.homeAccountId,a.hostnameAndPort,a.tenant),this.loadAccessToken(e,t,c.homeAccountId,a.hostnameAndPort,a.tenant,n),this.loadRefreshToken(e,t,c.homeAccountId,a.hostnameAndPort))}else throw cg.createUnableToLoadTokenError("Please provide clientInfo in the response or options.")}else throw cg.createUnableToLoadTokenError("Please provide a request with an account or a request with authority.");return this.generateAuthenticationResult(e,s,o,a)},TokenCache.prototype.loadAccount=function(e,t,n,o,a){if(a?s=a:void 0!==o&&n&&(s=cH.generateHomeAccountId(n,o,this.logger,this.cryptoObj,e)),!s)throw cg.createUnableToLoadTokenError("Unexpected missing homeAccountId");var s,c=n?cH.createAccount(n,s,e,void 0,void 0,void 0,t):cH.createGenericAccount(s,e,void 0,void 0,void 0,t);if(this.isBrowserEnvironment)return this.logger.verbose("TokenCache - loading account"),this.storage.setAccount(c),c;throw cg.createUnableToLoadTokenError("loadExternalTokens is designed to work in browser environments only.")},TokenCache.prototype.loadIdToken=function(e,t,n,o){var a=cU.createIdTokenEntity(t,n,e.rawToken,this.config.auth.clientId,o);if(this.isBrowserEnvironment)return this.logger.verbose("TokenCache - loading id token"),this.storage.setIdTokenCredential(a),a;throw cg.createUnableToLoadTokenError("loadExternalTokens is designed to work in browser environments only.")},TokenCache.prototype.loadAccessToken=function(e,t,n,o,a,s){if(!t.access_token)return this.logger.verbose("TokenCache - No access token provided for caching"),null;if(!t.expires_in)throw cg.createUnableToLoadTokenError("Please ensure server response includes expires_in value.");if(!s.extendedExpiresOn)throw cg.createUnableToLoadTokenError("Please provide an extendedExpiresOn value in the options.");var c=new cz(e.scopes).printScopes(),l=s.expiresOn||t.expires_in+new Date().getTime()/1e3,u=s.extendedExpiresOn,h=cJ.createAccessTokenEntity(n,o,t.access_token,this.config.auth.clientId,a,c,l,u,this.cryptoObj);if(this.isBrowserEnvironment)return this.logger.verbose("TokenCache - loading access token"),this.storage.setAccessTokenCredential(h),h;throw cg.createUnableToLoadTokenError("loadExternalTokens is designed to work in browser environments only.")},TokenCache.prototype.loadRefreshToken=function(e,t,n,o){if(!t.refresh_token)return this.logger.verbose("TokenCache - No refresh token provided for caching"),null;var a=cY.createRefreshTokenEntity(n,o,t.refresh_token,this.config.auth.clientId);if(this.isBrowserEnvironment)return this.logger.verbose("TokenCache - loading refresh token"),this.storage.setRefreshTokenCredential(a),a;throw cg.createUnableToLoadTokenError("loadExternalTokens is designed to work in browser environments only.")},TokenCache.prototype.generateAuthenticationResult=function(e,t,n,o){var a,s,c,l,u=s8.gT.EMPTY_STRING,h=[],p=null;(null==n?void 0:n.accessToken)&&(u=n.accessToken.secret,h=cz.fromString(n.accessToken.target).asArray(),p=new Date(1e3*Number(n.accessToken.expiresOn)),l=new Date(1e3*Number(n.accessToken.extendedExpiresOn)));var f=(null==t?void 0:t.claims.oid)||(null==t?void 0:t.claims.sub)||s8.gT.EMPTY_STRING,m=(null==t?void 0:t.claims.tid)||s8.gT.EMPTY_STRING;return{authority:o?o.canonicalAuthority:s8.gT.EMPTY_STRING,uniqueId:f,tenantId:m,scopes:h,account:(null==n?void 0:n.account)?n.account.getAccountInfo():null,idToken:t?t.rawToken:s8.gT.EMPTY_STRING,idTokenClaims:t?t.claims:{},accessToken:u,fromCache:!0,expiresOn:p,correlationId:e.correlationId||s8.gT.EMPTY_STRING,requestId:s8.gT.EMPTY_STRING,extExpiresOn:l,familyId:s8.gT.EMPTY_STRING,tokenType:(null===(a=null==n?void 0:n.accessToken)||void 0===a?void 0:a.tokenType)||s8.gT.EMPTY_STRING,state:s8.gT.EMPTY_STRING,cloudGraphHostName:(null===(s=null==n?void 0:n.account)||void 0===s?void 0:s.cloudGraphHostName)||s8.gT.EMPTY_STRING,msGraphHost:(null===(c=null==n?void 0:n.account)||void 0===c?void 0:c.msGraphHost)||s8.gT.EMPTY_STRING,code:void 0,fromNativeBroker:!1}},TokenCache}(),lG=function(e){function HybridSpaAuthorizationCodeClient(t){var n=e.call(this,t)||this;return n.includeRedirectUri=!1,n}return(0,s5.ZT)(HybridSpaAuthorizationCodeClient,e),HybridSpaAuthorizationCodeClient}(lC),lK=function(e){function SilentAuthCodeClient(t,n,o,a,s,c,l,u,h,p){var f=e.call(this,t,n,o,a,s,c,u,h,p)||this;return f.apiId=l,f}return(0,s5.ZT)(SilentAuthCodeClient,e),SilentAuthCodeClient.prototype.acquireToken=function(e){return(0,s5.mG)(this,void 0,void 0,function(){var t,n,o,a,s,c;return(0,s5.Jh)(this,function(l){switch(l.label){case 0:if(this.logger.trace("SilentAuthCodeClient.acquireToken called"),!e.code)throw cg.createAuthCodeRequiredError();return this.performanceClient.setPreQueueTime(w.StandardInteractionClientInitializeAuthorizationRequest,e.correlationId),[4,this.initializeAuthorizationRequest(e,ci.s_.Silent)];case 1:t=l.sent(),this.browserStorage.updateCacheEntries(t.state,t.nonce,t.authority,t.loginHint||s8.gT.EMPTY_STRING,t.account||null),n=this.initializeServerTelemetryManager(this.apiId),l.label=2;case 2:return l.trys.push([2,4,,5]),o=(0,s5.pi)((0,s5.pi)({},t),{code:e.code}),this.performanceClient.setPreQueueTime(w.StandardInteractionClientGetClientConfiguration,e.correlationId),[4,this.getClientConfiguration(n,t.authority)];case 3:return a=l.sent(),s=new lG(a),this.logger.verbose("Auth code client created"),[2,new lz(s,this.browserStorage,o,this.logger,this.config.system,this.performanceClient).handleCodeResponseFromServer({code:e.code,msgraph_host:e.msGraphHost,cloud_graph_host_name:e.cloudGraphHostName,cloud_instance_host_name:e.cloudInstanceHostName},t.state,s.authority,this.networkClient,!1)];case 4:throw(c=l.sent())instanceof s7.l&&c.setCorrelationId(this.correlationId),n.cacheFailedRequest(c),this.browserStorage.cleanRequestByState(t.state),c;case 5:return[2]}})})},SilentAuthCodeClient.prototype.logout=function(){return Promise.reject(cg.createSilentLogoutUnsupportedError())},SilentAuthCodeClient}(lx),lW=function(){function BrowserPerformanceMeasurement(e,t){this.correlationId=t,this.measureName=BrowserPerformanceMeasurement.makeMeasureName(e,t),this.startMark=BrowserPerformanceMeasurement.makeStartMark(e,t),this.endMark=BrowserPerformanceMeasurement.makeEndMark(e,t)}return BrowserPerformanceMeasurement.makeMeasureName=function(e,t){return"msal.measure."+e+"."+t},BrowserPerformanceMeasurement.makeStartMark=function(e,t){return"msal.start."+e+"."+t},BrowserPerformanceMeasurement.makeEndMark=function(e,t){return"msal.end."+e+"."+t},BrowserPerformanceMeasurement.supportsBrowserPerformance=function(){return"undefined"!=typeof window&&void 0!==window.performance&&"function"==typeof window.performance.mark&&"function"==typeof window.performance.measure&&"function"==typeof window.performance.clearMarks&&"function"==typeof window.performance.clearMeasures&&"function"==typeof window.performance.getEntriesByName},BrowserPerformanceMeasurement.flushMeasurements=function(e,t){if(BrowserPerformanceMeasurement.supportsBrowserPerformance())try{t.forEach(function(t){var n=BrowserPerformanceMeasurement.makeMeasureName(t.name,e);window.performance.getEntriesByName(n,"measure").length>0&&(window.performance.clearMeasures(n),window.performance.clearMarks(BrowserPerformanceMeasurement.makeStartMark(n,e)),window.performance.clearMarks(BrowserPerformanceMeasurement.makeEndMark(n,e)))})}catch(e){}},BrowserPerformanceMeasurement.prototype.startMeasurement=function(){if(BrowserPerformanceMeasurement.supportsBrowserPerformance())try{window.performance.mark(this.startMark)}catch(e){}},BrowserPerformanceMeasurement.prototype.endMeasurement=function(){if(BrowserPerformanceMeasurement.supportsBrowserPerformance())try{window.performance.mark(this.endMark),window.performance.measure(this.measureName,this.startMark,this.endMark)}catch(e){}},BrowserPerformanceMeasurement.prototype.flushMeasurement=function(){if(BrowserPerformanceMeasurement.supportsBrowserPerformance())try{var e=window.performance.getEntriesByName(this.measureName,"measure");if(e.length>0){var t=e[0].duration;return window.performance.clearMeasures(this.measureName),window.performance.clearMarks(this.startMark),window.performance.clearMarks(this.endMark),t}}catch(e){}return null},BrowserPerformanceMeasurement}(),l$=function(e){function BrowserPerformanceClient(t,n,o,a,s,c,l){var u=e.call(this,t,n,o,a,s,c)||this;return u.browserCrypto=new cE(u.logger,l),u.guidGenerator=new cu(u.browserCrypto),u}return(0,s5.ZT)(BrowserPerformanceClient,e),BrowserPerformanceClient.prototype.startPerformanceMeasuremeant=function(e,t){return new lW(e,t)},BrowserPerformanceClient.prototype.generateId=function(){return this.guidGenerator.generateGuid()},BrowserPerformanceClient.prototype.getPageVisibility=function(){var e;return(null===(e=document.visibilityState)||void 0===e?void 0:e.toString())||null},BrowserPerformanceClient.prototype.deleteIncompleteSubMeasurements=function(e){var t=this.eventsByCorrelationId.get(e.event.correlationId),n=t&&t.eventId===e.event.eventId,o=[];n&&(null==t?void 0:t.incompleteSubMeasurements)&&t.incompleteSubMeasurements.forEach(function(e){o.push((0,s5.pi)({},e))}),o.length>0&&lW.flushMeasurements(e.event.correlationId,o)},BrowserPerformanceClient.prototype.supportsBrowserPerformanceNow=function(){return"undefined"!=typeof window&&void 0!==window.performance&&"function"==typeof window.performance.now},BrowserPerformanceClient.prototype.startMeasurement=function(t,n){var o=this,a=this.getPageVisibility(),s=e.prototype.startMeasurement.call(this,t,n);return(0,s5.pi)((0,s5.pi)({},s),{endMeasurement:function(e){var t=s.endMeasurement((0,s5.pi)({startPageVisibility:a,endPageVisibility:o.getPageVisibility()},e));return o.deleteIncompleteSubMeasurements(s),t},discardMeasurement:function(){s.discardMeasurement(),o.deleteIncompleteSubMeasurements(s),s.measurement.flushMeasurement()}})},BrowserPerformanceClient.prototype.setPreQueueTime=function(e,t){if(!this.supportsBrowserPerformanceNow()){this.logger.trace("BrowserPerformanceClient: window performance API not available, unable to set telemetry queue time for "+e);return}if(!t){this.logger.trace("BrowserPerformanceClient: correlationId for "+e+" not provided, unable to set telemetry queue time");return}var n=this.preQueueTimeByCorrelationId.get(t);n&&(this.logger.trace("BrowserPerformanceClient: Incomplete pre-queue "+n.name+" found",t),this.addQueueMeasurement(n.name,t,void 0,!0)),this.preQueueTimeByCorrelationId.set(t,{name:e,time:window.performance.now()})},BrowserPerformanceClient.prototype.addQueueMeasurement=function(t,n,o,a){if(!this.supportsBrowserPerformanceNow()){this.logger.trace("BrowserPerformanceClient: window performance API not available, unable to add queue measurement for "+t);return}if(!n){this.logger.trace("BrowserPerformanceClient: correlationId for "+t+" not provided, unable to add queue measurement");return}var s=e.prototype.getPreQueueTime.call(this,t,n);if(s){var c=window.performance.now(),l=o||e.prototype.calculateQueuedTime.call(this,s,c);return e.prototype.addQueueMeasurement.call(this,t,n,l,a)}},BrowserPerformanceClient}(cM),lJ=function(e){function PublicClientApplication(t){var n=e.call(this,t)||this;return n.astsAsyncMeasurement=void 0,n.activeSilentTokenRequests=new Map,n.trackPageVisibility=n.trackPageVisibility.bind(n),n}return(0,s5.ZT)(PublicClientApplication,e),PublicClientApplication.prototype.loginRedirect=function(e){return(0,s5.mG)(this,void 0,void 0,function(){var t;return(0,s5.Jh)(this,function(n){return t=this.getRequestCorrelationId(e),this.logger.verbose("loginRedirect called",t),[2,this.acquireTokenRedirect((0,s5.pi)({correlationId:t},e||ci.yo))]})})},PublicClientApplication.prototype.loginPopup=function(e){var t=this.getRequestCorrelationId(e);return this.logger.verbose("loginPopup called",t),this.acquireTokenPopup((0,s5.pi)({correlationId:t},e||ci.yo))},PublicClientApplication.prototype.acquireTokenSilent=function(e){return(0,s5.mG)(this,void 0,void 0,function(){var t,n,o,a,s,c,l=this;return(0,s5.Jh)(this,function(u){if(t=this.getRequestCorrelationId(e),(n=this.performanceClient.startMeasurement(w.AcquireTokenSilent,t)).addStaticFields({cacheLookupPolicy:e.cacheLookupPolicy}),this.preflightBrowserEnvironmentCheck(ci.s_.Silent),this.logger.verbose("acquireTokenSilent called",t),!(o=e.account||this.getActiveAccount()))throw cg.createNoAccountError();return(a=JSON.stringify({clientId:this.config.auth.clientId,authority:e.authority||s8.gT.EMPTY_STRING,scopes:e.scopes,homeAccountIdentifier:o.homeAccountId,claims:e.claims,authenticationScheme:e.authenticationScheme,resourceRequestMethod:e.resourceRequestMethod,resourceRequestUri:e.resourceRequestUri,shrClaims:e.shrClaims,sshKid:e.sshKid}),void 0===(s=this.activeSilentTokenRequests.get(a)))?(this.logger.verbose("acquireTokenSilent called for the first time, storing active request",t),this.performanceClient.setPreQueueTime(w.AcquireTokenSilentAsync,t),c=this.acquireTokenSilentAsync((0,s5.pi)((0,s5.pi)({},e),{correlationId:t}),o).then(function(t){return l.activeSilentTokenRequests.delete(a),n.addStaticFields({accessTokenSize:t.accessToken.length,idTokenSize:t.idToken.length}),n.endMeasurement({success:!0,fromCache:t.fromCache,isNativeBroker:t.fromNativeBroker,cacheLookupPolicy:e.cacheLookupPolicy,requestId:t.requestId}),t}).catch(function(e){throw l.activeSilentTokenRequests.delete(a),n.endMeasurement({errorCode:e.errorCode,subErrorCode:e.subError,success:!1}),e}),this.activeSilentTokenRequests.set(a,c),[2,c]):(this.logger.verbose("acquireTokenSilent has been called previously, returning the result from the first call",t),n.discardMeasurement(),[2,s])})})},PublicClientApplication.prototype.trackPageVisibility=function(){this.astsAsyncMeasurement&&(this.logger.info("Perf: Visibility change detected"),this.astsAsyncMeasurement.increment({visibilityChangeCount:1}))},PublicClientApplication.prototype.acquireTokenSilentAsync=function(e,t){var n;return(0,s5.mG)(this,void 0,void 0,function(){var o,a,s,c,l,u=this;return(0,s5.Jh)(this,function(h){switch(h.label){case 0:if(this.performanceClient.addQueueMeasurement(w.AcquireTokenSilentAsync,e.correlationId),this.eventHandler.emitEvent(lu.t.ACQUIRE_TOKEN_START,ci.s_.Silent,e),this.astsAsyncMeasurement=this.performanceClient.startMeasurement(w.AcquireTokenSilentAsync,e.correlationId),null===(n=this.astsAsyncMeasurement)||void 0===n||n.increment({visibilityChangeCount:0}),document.addEventListener("visibilitychange",this.trackPageVisibility),!(lD.isNativeAvailable(this.config,this.logger,this.nativeExtensionProvider,e.authenticationScheme)&&t.nativeAccountId))return[3,1];return this.logger.verbose("acquireTokenSilent - attempting to acquire token from native platform"),a=(0,s5.pi)((0,s5.pi)({},e),{account:t}),o=this.acquireTokenNative(a,ci.WN.acquireTokenSilent_silentFlow).catch(function(t){return(0,s5.mG)(u,void 0,void 0,function(){return(0,s5.Jh)(this,function(n){if(t instanceof lP&&t.isFatal())return this.logger.verbose("acquireTokenSilent - native platform unavailable, falling back to web flow"),this.nativeExtensionProvider=void 0,[2,this.createSilentIframeClient(e.correlationId).acquireToken(e)];throw t})})}),[3,3];case 1:return this.logger.verbose("acquireTokenSilent - attempting to acquire token from web flow"),s=this.createSilentCacheClient(e.correlationId),this.performanceClient.setPreQueueTime(w.InitializeSilentRequest,e.correlationId),[4,s.initializeSilentRequest(e,t)];case 2:c=h.sent(),l=(0,s5.pi)((0,s5.pi)({},e),{cacheLookupPolicy:e.cacheLookupPolicy||ci.lu.Default}),this.performanceClient.setPreQueueTime(w.AcquireTokenFromCache,c.correlationId),o=this.acquireTokenFromCache(s,c,l).catch(function(t){if(l.cacheLookupPolicy===ci.lu.AccessToken)throw t;return la.blockReloadInHiddenIframes(),u.eventHandler.emitEvent(lu.t.ACQUIRE_TOKEN_NETWORK_START,ci.s_.Silent,c),u.performanceClient.setPreQueueTime(w.AcquireTokenByRefreshToken,c.correlationId),u.acquireTokenByRefreshToken(c,l).catch(function(t){var n=t instanceof ce,o=t instanceof co,a=t.errorCode===ci.qx.INVALID_GRANT_ERROR;if((!n||!a||o||l.cacheLookupPolicy===ci.lu.AccessTokenAndRefreshToken||l.cacheLookupPolicy===ci.lu.RefreshToken)&&l.cacheLookupPolicy!==ci.lu.Skip)throw t;return u.logger.verbose("Refresh token expired/invalid or CacheLookupPolicy is set to Skip, attempting acquire token by iframe.",e.correlationId),u.performanceClient.setPreQueueTime(w.AcquireTokenBySilentIframe,c.correlationId),u.acquireTokenBySilentIframe(c)})}),h.label=3;case 3:return[2,o.then(function(e){var t;return u.eventHandler.emitEvent(lu.t.ACQUIRE_TOKEN_SUCCESS,ci.s_.Silent,e),null===(t=u.astsAsyncMeasurement)||void 0===t||t.endMeasurement({success:!0,fromCache:e.fromCache,isNativeBroker:e.fromNativeBroker,requestId:e.requestId}),e}).catch(function(e){var t;throw u.eventHandler.emitEvent(lu.t.ACQUIRE_TOKEN_FAILURE,ci.s_.Silent,null,e),null===(t=u.astsAsyncMeasurement)||void 0===t||t.endMeasurement({errorCode:e.errorCode,subErrorCode:e.subError,success:!1}),e}).finally(function(){document.removeEventListener("visibilitychange",u.trackPageVisibility)})]}})})},PublicClientApplication}(function(){function ClientApplication(e){this.isBrowserEnvironment="undefined"!=typeof window,this.config=(t=this.isBrowserEnvironment,n=e.auth,o=e.cache,a=e.system,s=e.telemetry,c={clientId:s8.gT.EMPTY_STRING,authority:""+s8.gT.DEFAULT_AUTHORITY,knownAuthorities:[],cloudDiscoveryMetadata:s8.gT.EMPTY_STRING,authorityMetadata:s8.gT.EMPTY_STRING,redirectUri:s8.gT.EMPTY_STRING,postLogoutRedirectUri:s8.gT.EMPTY_STRING,navigateToLoginRequestUrl:!0,clientCapabilities:[],protocolMode:I.AAD,azureCloudOptions:{azureCloudInstance:x.None,tenant:s8.gT.EMPTY_STRING},skipAuthorityMetadataCache:!1},l={cacheLocation:ci.Ix.SessionStorage,temporaryCacheLocation:ci.Ix.SessionStorage,storeAuthStateInCookie:!1,secureCookies:!1,cacheMigrationEnabled:!!o&&o.cacheLocation===ci.Ix.LocalStorage},u={loggerCallback:function(){},logLevel:cP.i.Info,piiLoggingEnabled:!1},h=(0,s5.pi)((0,s5.pi)({},c6),{loggerOptions:u,networkClient:t?la.getBrowserNetworkClient():ln,navigationClient:new ls,loadFrameTimeout:0,windowHashTimeout:(null==a?void 0:a.loadFrameTimeout)||6e4,iframeHashTimeout:(null==a?void 0:a.loadFrameTimeout)||6e3,navigateFrameWait:t&&la.detectIEOrEdge()?500:0,redirectNavigationTimeout:3e4,asyncPopups:!1,allowRedirectInIframe:!1,allowNativeBroker:!1,nativeBrokerHandshakeTimeout:(null==a?void 0:a.nativeBrokerHandshakeTimeout)||2e3,pollIntervalMilliseconds:ci.qx.DEFAULT_POLL_INTERVAL_MS,cryptoOptions:{useMsrCrypto:!1,entropy:void 0}}),p=(0,s5.pi)((0,s5.pi)({},a),{loggerOptions:(null==a?void 0:a.loggerOptions)||u}),f={application:{appName:s8.gT.EMPTY_STRING,appVersion:s8.gT.EMPTY_STRING}},{auth:(0,s5.pi)((0,s5.pi)({},c),n),cache:(0,s5.pi)((0,s5.pi)({},l),o),system:(0,s5.pi)((0,s5.pi)({},h),p),telemetry:(0,s5.pi)((0,s5.pi)({},f),s)}),this.initialized=!1,this.logger=new cP.Y(this.config.system.loggerOptions,lc,ll),this.networkClient=this.config.system.networkClient,this.navigationClient=this.config.system.navigationClient,this.redirectResponse=new Map,this.hybridAuthCodeResponses=new Map,this.performanceClient=this.isBrowserEnvironment?new l$(this.config.auth.clientId,this.config.auth.authority,this.logger,lc,ll,this.config.telemetry.application,this.config.system.cryptoOptions):new cN(this.config.auth.clientId,this.config.auth.authority,this.logger,lc,ll,this.config.telemetry.application),this.browserCrypto=this.isBrowserEnvironment?new cR(this.logger,this.performanceClient,this.config.system.cryptoOptions):cB,this.eventHandler=new ld(this.logger,this.browserCrypto),this.browserStorage=this.isBrowserEnvironment?new c5(this.config.auth.clientId,this.config.cache,this.browserCrypto,this.logger):DEFAULT_BROWSER_CACHE_MANAGER(this.config.auth.clientId,this.logger);var t,n,o,a,s,c,l,u,h,p,f,m={cacheLocation:ci.Ix.MemoryStorage,temporaryCacheLocation:ci.Ix.MemoryStorage,storeAuthStateInCookie:!1,secureCookies:!1,cacheMigrationEnabled:!1};this.nativeInternalStorage=new c5(this.config.auth.clientId,m,this.browserCrypto,this.logger),this.tokenCache=new lV(this.config,this.browserStorage,this.logger,this.browserCrypto),this.trackPageVisibilityWithMeasurement=this.trackPageVisibilityWithMeasurement.bind(this)}return ClientApplication.prototype.initialize=function(){return(0,s5.mG)(this,void 0,void 0,function(){var e,t,n,o;return(0,s5.Jh)(this,function(a){switch(a.label){case 0:if(this.logger.trace("initialize called"),this.initialized)return this.logger.info("initialize has already been called, exiting early."),[2];if(e=this.config.system.allowNativeBroker,t=this.performanceClient.startMeasurement(w.InitializeClientApplication),this.eventHandler.emitEvent(lu.t.INITIALIZE_START),!e)return[3,4];a.label=1;case 1:return a.trys.push([1,3,,4]),n=this,[4,lD.createProvider(this.logger,this.config.system.nativeBrokerHandshakeTimeout,this.performanceClient)];case 2:return n.nativeExtensionProvider=a.sent(),[3,4];case 3:return o=a.sent(),this.logger.verbose(o),[3,4];case 4:return this.initialized=!0,this.eventHandler.emitEvent(lu.t.INITIALIZE_END),t.endMeasurement({allowNativeBroker:e,success:!0}),[2]}})})},ClientApplication.prototype.handleRedirectPromise=function(e){return(0,s5.mG)(this,void 0,void 0,function(){var t,n,o,a,s,c,l=this;return(0,s5.Jh)(this,function(u){return(this.logger.verbose("handleRedirectPromise called"),la.blockNativeBrokerCalledBeforeInitialized(this.config.system.allowNativeBroker,this.initialized),t=this.getAllAccounts(),this.isBrowserEnvironment)?(n=e||s8.gT.EMPTY_STRING,void 0===(o=this.redirectResponse.get(n))?(this.eventHandler.emitEvent(lu.t.HANDLE_REDIRECT_START,ci.s_.Redirect),this.logger.verbose("handleRedirectPromise has been called for the first time, storing the promise"),a=this.browserStorage.getCachedNativeRequest(),s=void 0,a&&lD.isNativeAvailable(this.config,this.logger,this.nativeExtensionProvider)&&this.nativeExtensionProvider&&!e?(this.logger.trace("handleRedirectPromise - acquiring token from native platform"),s=new lB(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,ci.WN.handleRedirectPromise,this.performanceClient,this.nativeExtensionProvider,a.accountId,this.nativeInternalStorage,a.correlationId).handleRedirectPromise()):(this.logger.trace("handleRedirectPromise - acquiring token from web flow"),c=this.browserStorage.getTemporaryCache(ci.c4.CORRELATION_ID,!0)||s8.gT.EMPTY_STRING,s=this.createRedirectClient(c).handleRedirectPromise(e)),o=s.then(function(e){return e&&(t.length<l.getAllAccounts().length?(l.eventHandler.emitEvent(lu.t.LOGIN_SUCCESS,ci.s_.Redirect,e),l.logger.verbose("handleRedirectResponse returned result, login success")):(l.eventHandler.emitEvent(lu.t.ACQUIRE_TOKEN_SUCCESS,ci.s_.Redirect,e),l.logger.verbose("handleRedirectResponse returned result, acquire token success"))),l.eventHandler.emitEvent(lu.t.HANDLE_REDIRECT_END,ci.s_.Redirect),e}).catch(function(e){throw t.length>0?l.eventHandler.emitEvent(lu.t.ACQUIRE_TOKEN_FAILURE,ci.s_.Redirect,null,e):l.eventHandler.emitEvent(lu.t.LOGIN_FAILURE,ci.s_.Redirect,null,e),l.eventHandler.emitEvent(lu.t.HANDLE_REDIRECT_END,ci.s_.Redirect),e}),this.redirectResponse.set(n,o)):this.logger.verbose("handleRedirectPromise has been called previously, returning the result from the first call"),[2,o]):(this.logger.verbose("handleRedirectPromise returns null, not browser environment"),[2,null])})})},ClientApplication.prototype.acquireTokenRedirect=function(e){return(0,s5.mG)(this,void 0,void 0,function(){var t,n,o=this;return(0,s5.Jh)(this,function(a){return t=this.getRequestCorrelationId(e),this.logger.verbose("acquireTokenRedirect called",t),this.preflightBrowserEnvironmentCheck(ci.s_.Redirect),(n=this.getAllAccounts().length>0)?this.eventHandler.emitEvent(lu.t.ACQUIRE_TOKEN_START,ci.s_.Redirect,e):this.eventHandler.emitEvent(lu.t.LOGIN_START,ci.s_.Redirect,e),[2,(this.nativeExtensionProvider&&this.canUseNative(e)?new lB(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,ci.WN.acquireTokenRedirect,this.performanceClient,this.nativeExtensionProvider,this.getNativeAccountId(e),this.nativeInternalStorage,e.correlationId).acquireTokenRedirect(e).catch(function(t){if(t instanceof lP&&t.isFatal()){o.nativeExtensionProvider=void 0;var n=o.createRedirectClient(e.correlationId);return n.acquireToken(e)}if(t instanceof co){o.logger.verbose("acquireTokenRedirect - Resolving interaction required error thrown by native broker by falling back to web flow");var n=o.createRedirectClient(e.correlationId);return n.acquireToken(e)}throw o.browserStorage.setInteractionInProgress(!1),t}):this.createRedirectClient(e.correlationId).acquireToken(e)).catch(function(e){throw n?o.eventHandler.emitEvent(lu.t.ACQUIRE_TOKEN_FAILURE,ci.s_.Redirect,null,e):o.eventHandler.emitEvent(lu.t.LOGIN_FAILURE,ci.s_.Redirect,null,e),e})]})})},ClientApplication.prototype.acquireTokenPopup=function(e){var t=this,n=this.getRequestCorrelationId(e),o=this.performanceClient.startMeasurement(w.AcquireTokenPopup,n);try{this.logger.verbose("acquireTokenPopup called",n),this.preflightBrowserEnvironmentCheck(ci.s_.Popup)}catch(e){return Promise.reject(e)}var a=this.getAllAccounts();return a.length>0?this.eventHandler.emitEvent(lu.t.ACQUIRE_TOKEN_START,ci.s_.Popup,e):this.eventHandler.emitEvent(lu.t.LOGIN_START,ci.s_.Popup,e),(this.canUseNative(e)?this.acquireTokenNative(e,ci.WN.acquireTokenPopup).then(function(e){return t.browserStorage.setInteractionInProgress(!1),o.endMeasurement({success:!0,isNativeBroker:!0,requestId:e.requestId}),e}).catch(function(n){if(n instanceof lP&&n.isFatal()){t.nativeExtensionProvider=void 0;var o=t.createPopupClient(e.correlationId);return o.acquireToken(e)}if(n instanceof co){t.logger.verbose("acquireTokenPopup - Resolving interaction required error thrown by native broker by falling back to web flow");var o=t.createPopupClient(e.correlationId);return o.acquireToken(e)}throw t.browserStorage.setInteractionInProgress(!1),n}):this.createPopupClient(e.correlationId).acquireToken(e)).then(function(e){return a.length<t.getAllAccounts().length?t.eventHandler.emitEvent(lu.t.LOGIN_SUCCESS,ci.s_.Popup,e):t.eventHandler.emitEvent(lu.t.ACQUIRE_TOKEN_SUCCESS,ci.s_.Popup,e),o.addStaticFields({accessTokenSize:e.accessToken.length,idTokenSize:e.idToken.length}),o.endMeasurement({success:!0,requestId:e.requestId}),e}).catch(function(e){return a.length>0?t.eventHandler.emitEvent(lu.t.ACQUIRE_TOKEN_FAILURE,ci.s_.Popup,null,e):t.eventHandler.emitEvent(lu.t.LOGIN_FAILURE,ci.s_.Popup,null,e),o.endMeasurement({errorCode:e.errorCode,subErrorCode:e.subError,success:!1}),Promise.reject(e)})},ClientApplication.prototype.trackPageVisibilityWithMeasurement=function(){var e=this.ssoSilentMeasurement||this.acquireTokenByCodeAsyncMeasurement;e&&(this.logger.info("Perf: Visibility change detected in ",e.event.name),e.increment({visibilityChangeCount:1}))},ClientApplication.prototype.ssoSilent=function(e){var t;return(0,s5.mG)(this,void 0,void 0,function(){var n,o,a=this;return(0,s5.Jh)(this,function(s){return n=this.getRequestCorrelationId(e),o=(0,s5.pi)((0,s5.pi)({},e),{prompt:e.prompt,correlationId:n}),this.preflightBrowserEnvironmentCheck(ci.s_.Silent),this.ssoSilentMeasurement=this.performanceClient.startMeasurement(w.SsoSilent,n),null===(t=this.ssoSilentMeasurement)||void 0===t||t.increment({visibilityChangeCount:0}),document.addEventListener("visibilitychange",this.trackPageVisibilityWithMeasurement),this.logger.verbose("ssoSilent called",n),this.eventHandler.emitEvent(lu.t.SSO_SILENT_START,ci.s_.Silent,o),[2,(this.canUseNative(o)?this.acquireTokenNative(o,ci.WN.ssoSilent).catch(function(e){if(e instanceof lP&&e.isFatal())return a.nativeExtensionProvider=void 0,a.createSilentIframeClient(o.correlationId).acquireToken(o);throw e}):this.createSilentIframeClient(o.correlationId).acquireToken(o)).then(function(e){var t,n;return a.eventHandler.emitEvent(lu.t.SSO_SILENT_SUCCESS,ci.s_.Silent,e),null===(t=a.ssoSilentMeasurement)||void 0===t||t.addStaticFields({accessTokenSize:e.accessToken.length,idTokenSize:e.idToken.length}),null===(n=a.ssoSilentMeasurement)||void 0===n||n.endMeasurement({success:!0,isNativeBroker:e.fromNativeBroker,requestId:e.requestId}),e}).catch(function(e){var t;throw a.eventHandler.emitEvent(lu.t.SSO_SILENT_FAILURE,ci.s_.Silent,null,e),null===(t=a.ssoSilentMeasurement)||void 0===t||t.endMeasurement({errorCode:e.errorCode,subErrorCode:e.subError,success:!1}),e}).finally(function(){document.removeEventListener("visibilitychange",a.trackPageVisibilityWithMeasurement)})]})})},ClientApplication.prototype.acquireTokenByCode=function(e){return(0,s5.mG)(this,void 0,void 0,function(){var t,n,o,a,s=this;return(0,s5.Jh)(this,function(c){t=this.getRequestCorrelationId(e),this.preflightBrowserEnvironmentCheck(ci.s_.Silent),this.logger.trace("acquireTokenByCode called",t),this.eventHandler.emitEvent(lu.t.ACQUIRE_TOKEN_BY_CODE_START,ci.s_.Silent,e),n=this.performanceClient.startMeasurement(w.AcquireTokenByCode,e.correlationId);try{if(e.code&&e.nativeAccountId)throw cg.createSpaCodeAndNativeAccountIdPresentError();if(e.code)return o=e.code,(a=this.hybridAuthCodeResponses.get(o))?(this.logger.verbose("Existing acquireTokenByCode request found",e.correlationId),n.discardMeasurement()):(this.logger.verbose("Initiating new acquireTokenByCode request",t),a=this.acquireTokenByCodeAsync((0,s5.pi)((0,s5.pi)({},e),{correlationId:t})).then(function(e){return s.eventHandler.emitEvent(lu.t.ACQUIRE_TOKEN_BY_CODE_SUCCESS,ci.s_.Silent,e),s.hybridAuthCodeResponses.delete(o),n.addStaticFields({accessTokenSize:e.accessToken.length,idTokenSize:e.idToken.length}),n.endMeasurement({success:!0,isNativeBroker:e.fromNativeBroker,requestId:e.requestId}),e}).catch(function(e){throw s.hybridAuthCodeResponses.delete(o),s.eventHandler.emitEvent(lu.t.ACQUIRE_TOKEN_BY_CODE_FAILURE,ci.s_.Silent,null,e),n.endMeasurement({errorCode:e.errorCode,subErrorCode:e.subError,success:!1}),e}),this.hybridAuthCodeResponses.set(o,a)),[2,a];if(e.nativeAccountId){if(this.canUseNative(e,e.nativeAccountId))return[2,this.acquireTokenNative(e,ci.WN.acquireTokenByCode,e.nativeAccountId).catch(function(e){throw e instanceof lP&&e.isFatal()&&(s.nativeExtensionProvider=void 0),e})];throw cg.createUnableToAcquireTokenFromNativePlatformError()}throw cg.createAuthCodeOrNativeAccountIdRequiredError()}catch(e){throw this.eventHandler.emitEvent(lu.t.ACQUIRE_TOKEN_BY_CODE_FAILURE,ci.s_.Silent,null,e),n.endMeasurement({errorCode:e instanceof s7.l&&e.errorCode||void 0,subErrorCode:e instanceof s7.l&&e.subError||void 0,success:!1}),e}return[2]})})},ClientApplication.prototype.acquireTokenByCodeAsync=function(e){var t;return(0,s5.mG)(this,void 0,void 0,function(){var n=this;return(0,s5.Jh)(this,function(o){switch(o.label){case 0:return this.logger.trace("acquireTokenByCodeAsync called",e.correlationId),this.acquireTokenByCodeAsyncMeasurement=this.performanceClient.startMeasurement(w.AcquireTokenByCodeAsync,e.correlationId),null===(t=this.acquireTokenByCodeAsyncMeasurement)||void 0===t||t.increment({visibilityChangeCount:0}),document.addEventListener("visibilitychange",this.trackPageVisibilityWithMeasurement),[4,this.createSilentAuthCodeClient(e.correlationId).acquireToken(e).then(function(e){var t;return null===(t=n.acquireTokenByCodeAsyncMeasurement)||void 0===t||t.endMeasurement({success:!0,fromCache:e.fromCache,isNativeBroker:e.fromNativeBroker,requestId:e.requestId}),e}).catch(function(e){var t;throw null===(t=n.acquireTokenByCodeAsyncMeasurement)||void 0===t||t.endMeasurement({errorCode:e.errorCode,subErrorCode:e.subError,success:!1}),e}).finally(function(){document.removeEventListener("visibilitychange",n.trackPageVisibilityWithMeasurement)})];case 1:return[2,o.sent()]}})})},ClientApplication.prototype.acquireTokenFromCache=function(e,t,n){return(0,s5.mG)(this,void 0,void 0,function(){return(0,s5.Jh)(this,function(o){switch(this.performanceClient.addQueueMeasurement(w.AcquireTokenFromCache,t.correlationId),n.cacheLookupPolicy){case ci.lu.Default:case ci.lu.AccessToken:case ci.lu.AccessTokenAndRefreshToken:return[2,e.acquireToken(t)];default:throw cD.e.createRefreshRequiredError()}return[2]})})},ClientApplication.prototype.acquireTokenByRefreshToken=function(e,t){return(0,s5.mG)(this,void 0,void 0,function(){var n;return(0,s5.Jh)(this,function(o){switch(this.performanceClient.addQueueMeasurement(w.AcquireTokenByRefreshToken,e.correlationId),t.cacheLookupPolicy){case ci.lu.Default:case ci.lu.AccessTokenAndRefreshToken:case ci.lu.RefreshToken:case ci.lu.RefreshTokenAndNetwork:return n=this.createSilentRefreshClient(e.correlationId),this.performanceClient.setPreQueueTime(w.SilentRefreshClientAcquireToken,e.correlationId),[2,n.acquireToken(e)];default:throw cD.e.createRefreshRequiredError()}return[2]})})},ClientApplication.prototype.acquireTokenBySilentIframe=function(e){return(0,s5.mG)(this,void 0,void 0,function(){var t;return(0,s5.Jh)(this,function(n){return this.performanceClient.addQueueMeasurement(w.AcquireTokenBySilentIframe,e.correlationId),t=this.createSilentIframeClient(e.correlationId),this.performanceClient.setPreQueueTime(w.SilentIframeClientAcquireToken,e.correlationId),[2,t.acquireToken(e)]})})},ClientApplication.prototype.logout=function(e){return(0,s5.mG)(this,void 0,void 0,function(){var t;return(0,s5.Jh)(this,function(n){return t=this.getRequestCorrelationId(e),this.logger.warning("logout API is deprecated and will be removed in msal-browser v3.0.0. Use logoutRedirect instead.",t),[2,this.logoutRedirect((0,s5.pi)({correlationId:t},e))]})})},ClientApplication.prototype.logoutRedirect=function(e){return(0,s5.mG)(this,void 0,void 0,function(){var t;return(0,s5.Jh)(this,function(n){return t=this.getRequestCorrelationId(e),this.preflightBrowserEnvironmentCheck(ci.s_.Redirect),[2,this.createRedirectClient(t).logout(e)]})})},ClientApplication.prototype.logoutPopup=function(e){try{var t=this.getRequestCorrelationId(e);return this.preflightBrowserEnvironmentCheck(ci.s_.Popup),this.createPopupClient(t).logout(e)}catch(e){return Promise.reject(e)}},ClientApplication.prototype.getAllAccounts=function(){return this.logger.verbose("getAllAccounts called"),this.isBrowserEnvironment?this.browserStorage.getAllAccounts():[]},ClientApplication.prototype.getAccountByUsername=function(e){if(this.logger.trace("getAccountByUsername called"),!e)return this.logger.warning("getAccountByUsername: No username provided"),null;var t=this.browserStorage.getAccountInfoFilteredBy({username:e});return t?(this.logger.verbose("getAccountByUsername: Account matching username found, returning"),this.logger.verbosePii("getAccountByUsername: Returning signed-in accounts matching username: "+e),t):(this.logger.verbose("getAccountByUsername: No matching account found, returning null"),null)},ClientApplication.prototype.getAccountByHomeId=function(e){if(this.logger.trace("getAccountByHomeId called"),!e)return this.logger.warning("getAccountByHomeId: No homeAccountId provided"),null;var t=this.browserStorage.getAccountInfoFilteredBy({homeAccountId:e});return t?(this.logger.verbose("getAccountByHomeId: Account matching homeAccountId found, returning"),this.logger.verbosePii("getAccountByHomeId: Returning signed-in accounts matching homeAccountId: "+e),t):(this.logger.verbose("getAccountByHomeId: No matching account found, returning null"),null)},ClientApplication.prototype.getAccountByLocalId=function(e){if(this.logger.trace("getAccountByLocalId called"),!e)return this.logger.warning("getAccountByLocalId: No localAccountId provided"),null;var t=this.browserStorage.getAccountInfoFilteredBy({localAccountId:e});return t?(this.logger.verbose("getAccountByLocalId: Account matching localAccountId found, returning"),this.logger.verbosePii("getAccountByLocalId: Returning signed-in accounts matching localAccountId: "+e),t):(this.logger.verbose("getAccountByLocalId: No matching account found, returning null"),null)},ClientApplication.prototype.setActiveAccount=function(e){this.browserStorage.setActiveAccount(e)},ClientApplication.prototype.getActiveAccount=function(){return this.browserStorage.getActiveAccount()},ClientApplication.prototype.preflightBrowserEnvironmentCheck=function(e,t){if(void 0===t&&(t=!0),this.logger.verbose("preflightBrowserEnvironmentCheck started"),la.blockNonBrowserEnvironment(this.isBrowserEnvironment),la.blockRedirectInIframe(e,this.config.system.allowRedirectInIframe),la.blockReloadInHiddenIframes(),la.blockAcquireTokenInPopups(),la.blockNativeBrokerCalledBeforeInitialized(this.config.system.allowNativeBroker,this.initialized),e===ci.s_.Redirect&&this.config.cache.cacheLocation===ci.Ix.MemoryStorage&&!this.config.cache.storeAuthStateInCookie)throw c_.W.createInMemoryRedirectUnavailableError();(e===ci.s_.Redirect||e===ci.s_.Popup)&&this.preflightInteractiveRequest(t)},ClientApplication.prototype.preflightInteractiveRequest=function(e){this.logger.verbose("preflightInteractiveRequest called, validating app environment"),la.blockReloadInHiddenIframes(),e&&this.browserStorage.setInteractionInProgress(!0)},ClientApplication.prototype.acquireTokenNative=function(e,t,n){return(0,s5.mG)(this,void 0,void 0,function(){return(0,s5.Jh)(this,function(o){if(this.logger.trace("acquireTokenNative called"),!this.nativeExtensionProvider)throw cg.createNativeConnectionNotEstablishedError();return[2,new lB(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,t,this.performanceClient,this.nativeExtensionProvider,n||this.getNativeAccountId(e),this.nativeInternalStorage,e.correlationId).acquireToken(e)]})})},ClientApplication.prototype.canUseNative=function(e,t){if(this.logger.trace("canUseNative called"),!lD.isNativeAvailable(this.config,this.logger,this.nativeExtensionProvider,e.authenticationScheme))return this.logger.trace("canUseNative: isNativeAvailable returned false, returning false"),!1;if(e.prompt)switch(e.prompt){case s8.NJ.NONE:case s8.NJ.CONSENT:case s8.NJ.LOGIN:this.logger.trace("canUseNative: prompt is compatible with native flow");break;default:return this.logger.trace("canUseNative: prompt = "+e.prompt+" is not compatible with native flow, returning false"),!1}return!!(t||this.getNativeAccountId(e))||(this.logger.trace("canUseNative: nativeAccountId is not available, returning false"),!1)},ClientApplication.prototype.getNativeAccountId=function(e){var t=e.account||this.browserStorage.getAccountInfoByHints(e.loginHint,e.sid)||this.getActiveAccount();return t&&t.nativeAccountId||""},ClientApplication.prototype.createPopupClient=function(e){return new lU(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeInternalStorage,this.nativeExtensionProvider,e)},ClientApplication.prototype.createRedirectClient=function(e){return new lq(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeInternalStorage,this.nativeExtensionProvider,e)},ClientApplication.prototype.createSilentIframeClient=function(e){return new lH(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,ci.WN.ssoSilent,this.performanceClient,this.nativeInternalStorage,this.nativeExtensionProvider,e)},ClientApplication.prototype.createSilentCacheClient=function(e){return new lN(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeExtensionProvider,e)},ClientApplication.prototype.createSilentRefreshClient=function(e){return new lj(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeExtensionProvider,e)},ClientApplication.prototype.createSilentAuthCodeClient=function(e){return new lK(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,ci.WN.acquireTokenByCode,this.performanceClient,this.nativeExtensionProvider,e)},ClientApplication.prototype.addEventCallback=function(e){return this.eventHandler.addEventCallback(e)},ClientApplication.prototype.removeEventCallback=function(e){this.eventHandler.removeEventCallback(e)},ClientApplication.prototype.addPerformanceCallback=function(e){return this.performanceClient.addPerformanceCallback(e)},ClientApplication.prototype.removePerformanceCallback=function(e){return this.performanceClient.removePerformanceCallback(e)},ClientApplication.prototype.enableAccountStorageEvents=function(){this.eventHandler.enableAccountStorageEvents()},ClientApplication.prototype.disableAccountStorageEvents=function(){this.eventHandler.disableAccountStorageEvents()},ClientApplication.prototype.getTokenCache=function(){return this.tokenCache},ClientApplication.prototype.getLogger=function(){return this.logger},ClientApplication.prototype.setLogger=function(e){this.logger=e},ClientApplication.prototype.initializeWrapperLibrary=function(e,t){this.browserStorage.setWrapperMetadata(e,t)},ClientApplication.prototype.setNavigationClient=function(e){this.navigationClient=e},ClientApplication.prototype.getConfiguration=function(){return this.config},ClientApplication.prototype.getRequestCorrelationId=function(e){return(null==e?void 0:e.correlationId)?e.correlationId:this.isBrowserEnvironment?this.browserCrypto.createNewGuid():s8.gT.EMPTY_STRING},ClientApplication}());let lY=new lJ({auth:{clientId:"7026d37b-ee27-4230-8981-e1535fc3742d",authority:"https://login.microsoftonline.com/organizations",redirectUri:"/"}});var wrapper=e=>{let{children:t}=e;return(0,M.jsx)(s3.rL,{instance:lY,children:t})},lQ=n(8909);function readCookie(e,t){void 0===t&&(t={});var n,o=e&&"j"===e[0]&&":"===e[1]?e.substr(2):e;if(void 0===(n=t.doNotParse)&&(n=!o||"{"!==o[0]&&"["!==o[0]&&'"'!==o[0]),!n)try{return JSON.parse(o)}catch(e){}return e}var __assign=function(){return(__assign=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)},lX=function(){function Cookies(e,t){var n=this;this.changeListeners=[],this.HAS_DOCUMENT_COOKIE=!1,this.cookies="string"==typeof e?lQ.Q(e,t):"object"==typeof e&&null!==e?e:{},new Promise(function(){n.HAS_DOCUMENT_COOKIE="object"==typeof document&&"string"==typeof document.cookie}).catch(function(){})}return Cookies.prototype._updateBrowserValues=function(e){this.HAS_DOCUMENT_COOKIE&&(this.cookies=lQ.Q(document.cookie,e))},Cookies.prototype._emitChange=function(e){for(var t=0;t<this.changeListeners.length;++t)this.changeListeners[t](e)},Cookies.prototype.get=function(e,t,n){return void 0===t&&(t={}),this._updateBrowserValues(n),readCookie(this.cookies[e],t)},Cookies.prototype.getAll=function(e,t){void 0===e&&(e={}),this._updateBrowserValues(t);var n={};for(var o in this.cookies)n[o]=readCookie(this.cookies[o],e);return n},Cookies.prototype.set=function(e,t,n){var o;"object"==typeof t&&(t=JSON.stringify(t)),this.cookies=__assign(__assign({},this.cookies),((o={})[e]=t,o)),this.HAS_DOCUMENT_COOKIE&&(document.cookie=lQ.q(e,t,n)),this._emitChange({name:e,value:t,options:n})},Cookies.prototype.remove=function(e,t){var n=t=__assign(__assign({},t),{expires:new Date(1970,1,1,0,0,1),maxAge:0});this.cookies=__assign({},this.cookies),delete this.cookies[e],this.HAS_DOCUMENT_COOKIE&&(document.cookie=lQ.q(e,"",n)),this._emitChange({name:e,value:void 0,options:t})},Cookies.prototype.addChangeListener=function(e){this.changeListeners.push(e)},Cookies.prototype.removeChangeListener=function(e){var t=this.changeListeners.indexOf(e);t>=0&&this.changeListeners.splice(t,1)},Cookies}(),lZ=q.createContext(new lX),l0=lZ.Provider;lZ.Consumer;var l1=(v=function(e,t){return(v=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function __(){this.constructor=e}v(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),l2=function(e){function CookiesProvider(t){var n=e.call(this,t)||this;return t.cookies?n.cookies=t.cookies:n.cookies=new lX,n}return l1(CookiesProvider,e),CookiesProvider.prototype.render=function(){return q.createElement(l0,{value:this.cookies},this.props.children)},CookiesProvider}(q.Component);function App(e){let{Component:t,pageProps:n}=e,o=(0,s4.useRouter)();return(0,M.jsx)(components_ThemeWrapper,{...n,isDashboard:!0,children:(0,M.jsx)(wrapper,{children:(0,M.jsxs)(O.g,{align:"unset",w:"100%",minH:"100vh",children:[(0,M.jsx)(components_Navbar,{...n,isIndex:"/"===o.route}),(0,M.jsx)(L.x,{alignItems:"center",mt:"0 !important",children:(0,M.jsx)(l2,{children:(0,M.jsx)(t,{...n})})}),(0,M.jsx)(U.L,{})]})})})}},6077:function(){},8212:function(){},7293:function(){},7640:function(){},1634:function(){},6577:function(e,t,n){e.exports=n(6099)},5632:function(e,t,n){e.exports=n(5123)},4406:function(e){var t,n,o,a=e.exports={};function defaultSetTimout(){throw Error("setTimeout has not been defined")}function defaultClearTimeout(){throw Error("clearTimeout has not been defined")}function runTimeout(e){if(t===setTimeout)return setTimeout(e,0);if((t===defaultSetTimout||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:defaultSetTimout}catch(e){t=defaultSetTimout}try{n="function"==typeof clearTimeout?clearTimeout:defaultClearTimeout}catch(e){n=defaultClearTimeout}}();var s=[],c=!1,l=-1;function cleanUpNextTick(){c&&o&&(c=!1,o.length?s=o.concat(s):l=-1,s.length&&drainQueue())}function drainQueue(){if(!c){var e=runTimeout(cleanUpNextTick);c=!0;for(var t=s.length;t;){for(o=s,s=[];++l<t;)o&&o[l].run();l=-1,t=s.length}o=null,c=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===defaultClearTimeout||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function Item(e,t){this.fun=e,this.array=t}function noop(){}a.nextTick=function(e){var t=Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];s.push(new Item(e,t)),1!==s.length||c||runTimeout(drainQueue)},Item.prototype.run=function(){this.fun.apply(null,this.array)},a.title="browser",a.browser=!0,a.env={},a.argv=[],a.version="",a.versions={},a.on=noop,a.addListener=noop,a.once=noop,a.off=noop,a.removeListener=noop,a.removeAllListeners=noop,a.emit=noop,a.prependListener=noop,a.prependOnceListener=noop,a.listeners=function(e){return[]},a.binding=function(e){throw Error("process.binding is not supported")},a.cwd=function(){return"/"},a.chdir=function(e){throw Error("process.chdir is not supported")},a.umask=function(){return 0}},8978:function(e,t,n){"use strict";n.d(t,{AMf:function(){return FaTrashAlt},EAB:function(){return FaEllipsisV},FJM:function(){return FaCheckCircle},LCi:function(){return FaEllipsisH},Mei:function(){return FaSun},SYN:function(){return FaSatelliteDish},TLr:function(){return FaMoon},Y2X:function(){return FaPaperPlane},YxP:function(){return FaTags},a4m:function(){return FaExclamationCircle},byV:function(){return FaConnectdevelop},hON:function(){return FaListUl},lp8:function(){return FaRegTrashAlt},vAr:function(){return FaCoins}});var o=n(8281);function FaConnectdevelop(e){return(0,o.w_)({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M550.5 241l-50.089-86.786c1.071-2.142 1.875-4.553 1.875-7.232 0-8.036-6.696-14.733-14.732-15.001l-55.447-95.893c.536-1.607 1.071-3.214 1.071-4.821 0-8.571-6.964-15.268-15.268-15.268-4.821 0-8.839 2.143-11.786 5.625H299.518C296.839 18.143 292.821 16 288 16s-8.839 2.143-11.518 5.625H170.411C167.464 18.143 163.447 16 158.625 16c-8.303 0-15.268 6.696-15.268 15.268 0 1.607.536 3.482 1.072 4.821l-55.983 97.233c-5.356 2.41-9.107 7.5-9.107 13.661 0 .535.268 1.071.268 1.607l-53.304 92.143c-7.232 1.339-12.59 7.5-12.59 15 0 7.232 5.089 13.393 12.054 15l55.179 95.358c-.536 1.607-.804 2.946-.804 4.821 0 7.232 5.089 13.393 12.054 14.732l51.697 89.732c-.536 1.607-1.071 3.482-1.071 5.357 0 8.571 6.964 15.268 15.268 15.268 4.821 0 8.839-2.143 11.518-5.357h106.875C279.161 493.857 283.447 496 288 496s8.839-2.143 11.518-5.357h107.143c2.678 2.946 6.696 4.821 10.982 4.821 8.571 0 15.268-6.964 15.268-15.268 0-1.607-.267-2.946-.803-4.285l51.697-90.268c6.964-1.339 12.054-7.5 12.054-14.732 0-1.607-.268-3.214-.804-4.821l54.911-95.358c6.964-1.339 12.322-7.5 12.322-15-.002-7.232-5.092-13.393-11.788-14.732zM153.535 450.732l-43.66-75.803h43.66v75.803zm0-83.839h-43.66c-.268-1.071-.804-2.142-1.339-3.214l44.999-47.41v50.624zm0-62.411l-50.357 53.304c-1.339-.536-2.679-1.34-4.018-1.607L43.447 259.75c.535-1.339.535-2.679.535-4.018s0-2.41-.268-3.482l51.965-90c2.679-.268 5.357-1.072 7.768-2.679l50.089 51.965v92.946zm0-102.322l-45.803-47.41c1.339-2.143 2.143-4.821 2.143-7.767 0-.268-.268-.804-.268-1.072l43.928-15.804v72.053zm0-80.625l-43.66 15.804 43.66-75.536v59.732zm326.519 39.108l.804 1.339L445.5 329.125l-63.75-67.232 98.036-101.518.268.268zM291.75 355.107l11.518 11.786H280.5l11.25-11.786zm-.268-11.25l-83.303-85.446 79.553-84.375 83.036 87.589-79.286 82.232zm5.357 5.893l79.286-82.232 67.5 71.25-5.892 28.125H313.714l-16.875-17.143zM410.411 44.393c1.071.536 2.142 1.072 3.482 1.34l57.857 100.714v.536c0 2.946.803 5.624 2.143 7.767L376.393 256l-83.035-87.589L410.411 44.393zm-9.107-2.143L287.732 162.518l-57.054-60.268 166.339-60h4.287zm-123.483 0c2.678 2.678 6.16 4.285 10.179 4.285s7.5-1.607 10.179-4.285h75L224.786 95.821 173.893 42.25h103.928zm-116.249 5.625l1.071-2.142a33.834 33.834 0 0 0 2.679-.804l51.161 53.84-54.911 19.821V47.875zm0 79.286l60.803-21.964 59.732 63.214-79.553 84.107-40.982-42.053v-83.304zm0 92.678L198 257.607l-36.428 38.304v-76.072zm0 87.858l42.053-44.464 82.768 85.982-17.143 17.678H161.572v-59.196zm6.964 162.053c-1.607-1.607-3.482-2.678-5.893-3.482l-1.071-1.607v-89.732h99.91l-91.607 94.821h-1.339zm129.911 0c-2.679-2.41-6.428-4.285-10.447-4.285s-7.767 1.875-10.447 4.285h-96.429l91.607-94.821h38.304l91.607 94.821H298.447zm120-11.786l-4.286 7.5c-1.339.268-2.41.803-3.482 1.339l-89.196-91.875h114.376l-17.412 83.036zm12.856-22.232l12.858-60.803h21.964l-34.822 60.803zm34.822-68.839h-20.357l4.553-21.16 17.143 18.214c-.535.803-1.071 1.874-1.339 2.946zm66.161-107.411l-55.447 96.697c-1.339.535-2.679 1.071-4.018 1.874l-20.625-21.964 34.554-163.928 45.803 79.286c-.267 1.339-.803 2.678-.803 4.285 0 1.339.268 2.411.536 3.75z"}}]})(e)}function FaCheckCircle(e){return(0,o.w_)({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zM227.314 387.314l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.249-16.379-6.249-22.628 0L216 308.118l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.249 16.379 6.249 22.628.001z"}}]})(e)}function FaCoins(e){return(0,o.w_)({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M0 405.3V448c0 35.3 86 64 192 64s192-28.7 192-64v-42.7C342.7 434.4 267.2 448 192 448S41.3 434.4 0 405.3zM320 128c106 0 192-28.7 192-64S426 0 320 0 128 28.7 128 64s86 64 192 64zM0 300.4V352c0 35.3 86 64 192 64s192-28.7 192-64v-51.6c-41.3 34-116.9 51.6-192 51.6S41.3 334.4 0 300.4zm416 11c57.3-11.1 96-31.7 96-55.4v-42.7c-23.2 16.4-57.3 27.6-96 34.5v63.6zM192 160C86 160 0 195.8 0 240s86 80 192 80 192-35.8 192-80-86-80-192-80zm219.3 56.3c60-10.8 100.7-32 100.7-56.3v-42.7c-35.5 25.1-96.5 38.6-160.7 41.8 29.5 14.3 51.2 33.5 60 57.2z"}}]})(e)}function FaEllipsisH(e){return(0,o.w_)({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M328 256c0 39.8-32.2 72-72 72s-72-32.2-72-72 32.2-72 72-72 72 32.2 72 72zm104-72c-39.8 0-72 32.2-72 72s32.2 72 72 72 72-32.2 72-72-32.2-72-72-72zm-352 0c-39.8 0-72 32.2-72 72s32.2 72 72 72 72-32.2 72-72-32.2-72-72-72z"}}]})(e)}function FaEllipsisV(e){return(0,o.w_)({tag:"svg",attr:{viewBox:"0 0 192 512"},child:[{tag:"path",attr:{d:"M96 184c39.8 0 72 32.2 72 72s-32.2 72-72 72-72-32.2-72-72 32.2-72 72-72zM24 80c0 39.8 32.2 72 72 72s72-32.2 72-72S135.8 8 96 8 24 40.2 24 80zm0 352c0 39.8 32.2 72 72 72s72-32.2 72-72-32.2-72-72-72-72 32.2-72 72z"}}]})(e)}function FaExclamationCircle(e){return(0,o.w_)({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zm-248 50c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"}}]})(e)}function FaListUl(e){return(0,o.w_)({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M48 48a48 48 0 1 0 48 48 48 48 0 0 0-48-48zm0 160a48 48 0 1 0 48 48 48 48 0 0 0-48-48zm0 160a48 48 0 1 0 48 48 48 48 0 0 0-48-48zm448 16H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm0-320H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16V80a16 16 0 0 0-16-16zm0 160H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16z"}}]})(e)}function FaMoon(e){return(0,o.w_)({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M283.211 512c78.962 0 151.079-35.925 198.857-94.792 7.068-8.708-.639-21.43-11.562-19.35-124.203 23.654-238.262-71.576-238.262-196.954 0-72.222 38.662-138.635 101.498-174.394 9.686-5.512 7.25-20.197-3.756-22.23A258.156 258.156 0 0 0 283.211 0c-141.309 0-256 114.511-256 256 0 141.309 114.511 256 256 256z"}}]})(e)}function FaPaperPlane(e){return(0,o.w_)({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M476 3.2L12.5 270.6c-18.1 10.4-15.8 35.6 2.2 43.2L121 358.4l287.3-253.2c5.5-4.9 13.3 2.6 8.6 8.3L176 407v80.5c0 23.6 28.5 32.9 42.5 15.8L282 426l124.6 52.2c14.2 6 30.4-2.9 33-18.2l72-432C515 7.8 493.3-6.8 476 3.2z"}}]})(e)}function FaSatelliteDish(e){return(0,o.w_)({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M305.44954,462.59c7.39157,7.29792,6.18829,20.09661-3.00038,25.00356-77.713,41.80281-176.72559,29.9105-242.34331-35.7082C-5.49624,386.28227-17.404,287.362,24.41381,209.554c4.89125-9.095,17.68975-10.29834,25.00318-3.00043L166.22872,323.36708l27.39411-27.39452c-.68759-2.60974-1.594-5.00071-1.594-7.81361a32.00407,32.00407,0,1,1,32.00407,32.00455c-2.79723,0-5.20378-.89075-7.79786-1.594l-27.40974,27.41015ZM511.9758,303.06732a16.10336,16.10336,0,0,1-16.002,17.00242H463.86031a15.96956,15.96956,0,0,1-15.89265-15.00213C440.46671,175.5492,336.45348,70.53427,207.03078,63.53328a15.84486,15.84486,0,0,1-15.00191-15.90852V16.02652A16.09389,16.09389,0,0,1,209.031.02425C372.25491,8.61922,503.47472,139.841,511.9758,303.06732Zm-96.01221-.29692a16.21093,16.21093,0,0,1-16.11142,17.29934H367.645a16.06862,16.06862,0,0,1-15.89265-14.70522c-6.90712-77.01094-68.118-138.91037-144.92467-145.22376a15.94,15.94,0,0,1-14.79876-15.89289V112.13393a16.134,16.134,0,0,1,17.29908-16.096C319.45132,104.5391,407.55627,192.64538,415.96359,302.7704Z"}}]})(e)}function FaSun(e){return(0,o.w_)({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 160c-52.9 0-96 43.1-96 96s43.1 96 96 96 96-43.1 96-96-43.1-96-96-96zm246.4 80.5l-94.7-47.3 33.5-100.4c4.5-13.6-8.4-26.5-21.9-21.9l-100.4 33.5-47.4-94.8c-6.4-12.8-24.6-12.8-31 0l-47.3 94.7L92.7 70.8c-13.6-4.5-26.5 8.4-21.9 21.9l33.5 100.4-94.7 47.4c-12.8 6.4-12.8 24.6 0 31l94.7 47.3-33.5 100.5c-4.5 13.6 8.4 26.5 21.9 21.9l100.4-33.5 47.3 94.7c6.4 12.8 24.6 12.8 31 0l47.3-94.7 100.4 33.5c13.6 4.5 26.5-8.4 21.9-21.9l-33.5-100.4 94.7-47.3c13-6.5 13-24.7.2-31.1zm-155.9 106c-49.9 49.9-131.1 49.9-181 0-49.9-49.9-49.9-131.1 0-181 49.9-49.9 131.1-49.9 181 0 49.9 49.9 49.9 131.1 0 181z"}}]})(e)}function FaTags(e){return(0,o.w_)({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M497.941 225.941L286.059 14.059A48 48 0 0 0 252.118 0H48C21.49 0 0 21.49 0 48v204.118a48 48 0 0 0 14.059 33.941l211.882 211.882c18.744 18.745 49.136 18.746 67.882 0l204.118-204.118c18.745-18.745 18.745-49.137 0-67.882zM112 160c-26.51 0-48-21.49-48-48s21.49-48 48-48 48 21.49 48 48-21.49 48-48 48zm513.941 133.823L421.823 497.941c-18.745 18.745-49.137 18.745-67.882 0l-.36-.36L527.64 323.522c16.999-16.999 26.36-39.6 26.36-63.64s-9.362-46.641-26.36-63.64L331.397 0h48.721a48 48 0 0 1 33.941 14.059l211.882 211.882c18.745 18.745 18.745 49.137 0 67.882z"}}]})(e)}function FaTrashAlt(e){return(0,o.w_)({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M32 464a48 48 0 0 0 48 48h288a48 48 0 0 0 48-48V128H32zm272-256a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zM432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16z"}}]})(e)}function FaRegTrashAlt(e){return(0,o.w_)({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M268 416h24a12 12 0 0 0 12-12V188a12 12 0 0 0-12-12h-24a12 12 0 0 0-12 12v216a12 12 0 0 0 12 12zM432 80h-82.41l-34-56.7A48 48 0 0 0 274.41 0H173.59a48 48 0 0 0-41.16 23.3L98.41 80H16A16 16 0 0 0 0 96v16a16 16 0 0 0 16 16h16v336a48 48 0 0 0 48 48h288a48 48 0 0 0 48-48V128h16a16 16 0 0 0 16-16V96a16 16 0 0 0-16-16zM171.84 50.91A6 6 0 0 1 177 48h94a6 6 0 0 1 5.15 2.91L293.61 80H154.39zM368 464H80V128h288zm-212-48h24a12 12 0 0 0 12-12V188a12 12 0 0 0-12-12h-24a12 12 0 0 0-12 12v216a12 12 0 0 0 12 12z"}}]})(e)}},8281:function(e,t,n){"use strict";n.d(t,{w_:function(){return GenIcon}});var o=n(2784),a={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},s=o.createContext&&o.createContext(a),__assign=function(){return(__assign=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)},__rest=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,o=Object.getOwnPropertySymbols(e);a<o.length;a++)0>t.indexOf(o[a])&&Object.prototype.propertyIsEnumerable.call(e,o[a])&&(n[o[a]]=e[o[a]]);return n};function GenIcon(e){return function(t){return o.createElement(IconBase,__assign({attr:__assign({},e.attr)},t),function Tree2Element(e){return e&&e.map(function(e,t){return o.createElement(e.tag,__assign({key:t},e.attr),Tree2Element(e.child))})}(e.child))}}function IconBase(e){var elem=function(t){var n,a=e.attr,s=e.size,c=e.title,l=__rest(e,["attr","size","title"]),u=s||t.size||"1em";return t.className&&(n=t.className),e.className&&(n=(n?n+" ":"")+e.className),o.createElement("svg",__assign({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},t.attr,a,l,{className:n,style:__assign(__assign({color:e.color||t.color},t.style),e.style),height:u,width:u,xmlns:"http://www.w3.org/2000/svg"}),c&&o.createElement("title",null,c),e.children)};return void 0!==s?o.createElement(s.Consumer,null,function(e){return elem(e)}):elem(a)}},5163:function(e,t,n){"use strict";n.r(t),n.d(t,{__assign:function(){return __assign},__asyncDelegator:function(){return __asyncDelegator},__asyncGenerator:function(){return __asyncGenerator},__asyncValues:function(){return __asyncValues},__await:function(){return __await},__awaiter:function(){return __awaiter},__classPrivateFieldGet:function(){return __classPrivateFieldGet},__classPrivateFieldIn:function(){return __classPrivateFieldIn},__classPrivateFieldSet:function(){return __classPrivateFieldSet},__createBinding:function(){return o},__decorate:function(){return __decorate},__esDecorate:function(){return __esDecorate},__exportStar:function(){return __exportStar},__extends:function(){return __extends},__generator:function(){return __generator},__importDefault:function(){return __importDefault},__importStar:function(){return __importStar},__makeTemplateObject:function(){return __makeTemplateObject},__metadata:function(){return __metadata},__param:function(){return __param},__propKey:function(){return __propKey},__read:function(){return __read},__rest:function(){return __rest},__runInitializers:function(){return __runInitializers},__setFunctionName:function(){return __setFunctionName},__spread:function(){return __spread},__spreadArray:function(){return __spreadArray},__spreadArrays:function(){return __spreadArrays},__values:function(){return __values}});var extendStatics=function(e,t){return(extendStatics=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function __extends(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function __(){this.constructor=e}extendStatics(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}var __assign=function(){return(__assign=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};function __rest(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,o=Object.getOwnPropertySymbols(e);a<o.length;a++)0>t.indexOf(o[a])&&Object.prototype.propertyIsEnumerable.call(e,o[a])&&(n[o[a]]=e[o[a]]);return n}function __decorate(e,t,n,o){var a,s=arguments.length,c=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,t,n,o);else for(var l=e.length-1;l>=0;l--)(a=e[l])&&(c=(s<3?a(c):s>3?a(t,n,c):a(t,n))||c);return s>3&&c&&Object.defineProperty(t,n,c),c}function __param(e,t){return function(n,o){t(n,o,e)}}function __esDecorate(e,t,n,o,a,s){function accept(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var c,l=o.kind,u="getter"===l?"get":"setter"===l?"set":"value",h=!t&&e?o.static?e:e.prototype:null,p=t||(h?Object.getOwnPropertyDescriptor(h,o.name):{}),f=!1,m=n.length-1;m>=0;m--){var g={};for(var y in o)g[y]="access"===y?{}:o[y];for(var y in o.access)g.access[y]=o.access[y];g.addInitializer=function(e){if(f)throw TypeError("Cannot add initializers after decoration has completed");s.push(accept(e||null))};var v=(0,n[m])("accessor"===l?{get:p.get,set:p.set}:p[u],g);if("accessor"===l){if(void 0===v)continue;if(null===v||"object"!=typeof v)throw TypeError("Object expected");(c=accept(v.get))&&(p.get=c),(c=accept(v.set))&&(p.set=c),(c=accept(v.init))&&a.unshift(c)}else(c=accept(v))&&("field"===l?a.unshift(c):p[u]=c)}h&&Object.defineProperty(h,o.name,p),f=!0}function __runInitializers(e,t,n){for(var o=arguments.length>2,a=0;a<t.length;a++)n=o?t[a].call(e,n):t[a].call(e);return o?n:void 0}function __propKey(e){return"symbol"==typeof e?e:"".concat(e)}function __setFunctionName(e,t,n){return"symbol"==typeof t&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:n?"".concat(n," ",t):t})}function __metadata(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function __awaiter(e,t,n,o){return new(n||(n=Promise))(function(a,s){function fulfilled(e){try{step(o.next(e))}catch(e){s(e)}}function rejected(e){try{step(o.throw(e))}catch(e){s(e)}}function step(e){var t;e.done?a(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(fulfilled,rejected)}step((o=o.apply(e,t||[])).next())})}function __generator(e,t){var n,o,a,s,c={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return s={next:verb(0),throw:verb(1),return:verb(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function verb(l){return function(u){return function(l){if(n)throw TypeError("Generator is already executing.");for(;s&&(s=0,l[0]&&(c=0)),c;)try{if(n=1,o&&(a=2&l[0]?o.return:l[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,l[1])).done)return a;switch(o=0,a&&(l=[2&l[0],a.value]),l[0]){case 0:case 1:a=l;break;case 4:return c.label++,{value:l[1],done:!1};case 5:c.label++,o=l[1],l=[0];continue;case 7:l=c.ops.pop(),c.trys.pop();continue;default:if(!(a=(a=c.trys).length>0&&a[a.length-1])&&(6===l[0]||2===l[0])){c=0;continue}if(3===l[0]&&(!a||l[1]>a[0]&&l[1]<a[3])){c.label=l[1];break}if(6===l[0]&&c.label<a[1]){c.label=a[1],a=l;break}if(a&&c.label<a[2]){c.label=a[2],c.ops.push(l);break}a[2]&&c.ops.pop(),c.trys.pop();continue}l=t.call(e,c)}catch(e){l=[6,e],o=0}finally{n=a=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,u])}}}var o=Object.create?function(e,t,n,o){void 0===o&&(o=n);var a=Object.getOwnPropertyDescriptor(t,n);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,a)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]};function __exportStar(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||o(t,e,n)}function __values(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],o=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&o>=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function __read(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var o,a,s=n.call(e),c=[];try{for(;(void 0===t||t-- >0)&&!(o=s.next()).done;)c.push(o.value)}catch(e){a={error:e}}finally{try{o&&!o.done&&(n=s.return)&&n.call(s)}finally{if(a)throw a.error}}return c}function __spread(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(__read(arguments[t]));return e}function __spreadArrays(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;for(var o=Array(e),a=0,t=0;t<n;t++)for(var s=arguments[t],c=0,l=s.length;c<l;c++,a++)o[a]=s[c];return o}function __spreadArray(e,t,n){if(n||2==arguments.length)for(var o,a=0,s=t.length;a<s;a++)!o&&a in t||(o||(o=Array.prototype.slice.call(t,0,a)),o[a]=t[a]);return e.concat(o||Array.prototype.slice.call(t))}function __await(e){return this instanceof __await?(this.v=e,this):new __await(e)}function __asyncGenerator(e,t,n){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var o,a=n.apply(e,t||[]),s=[];return o={},verb("next"),verb("throw"),verb("return"),o[Symbol.asyncIterator]=function(){return this},o;function verb(e){a[e]&&(o[e]=function(t){return new Promise(function(n,o){s.push([e,t,n,o])>1||resume(e,t)})})}function resume(e,t){try{var n;(n=a[e](t)).value instanceof __await?Promise.resolve(n.value.v).then(fulfill,reject):settle(s[0][2],n)}catch(e){settle(s[0][3],e)}}function fulfill(e){resume("next",e)}function reject(e){resume("throw",e)}function settle(e,t){e(t),s.shift(),s.length&&resume(s[0][0],s[0][1])}}function __asyncDelegator(e){var t,n;return t={},verb("next"),verb("throw",function(e){throw e}),verb("return"),t[Symbol.iterator]=function(){return this},t;function verb(o,a){t[o]=e[o]?function(t){return(n=!n)?{value:__await(e[o](t)),done:!1}:a?a(t):t}:a}}function __asyncValues(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=__values(e),t={},verb("next"),verb("throw"),verb("return"),t[Symbol.asyncIterator]=function(){return this},t);function verb(n){t[n]=e[n]&&function(t){return new Promise(function(o,a){!function(e,t,n,o){Promise.resolve(o).then(function(t){e({value:t,done:n})},t)}(o,a,(t=e[n](t)).done,t.value)})}}}function __makeTemplateObject(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var a=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function __importStar(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&o(t,e,n);return a(t,e),t}function __importDefault(e){return e&&e.__esModule?e:{default:e}}function __classPrivateFieldGet(e,t,n,o){if("a"===n&&!o)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!o:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?o:"a"===n?o.call(e):o?o.value:t.get(e)}function __classPrivateFieldSet(e,t,n,o,a){if("m"===o)throw TypeError("Private method is not writable");if("a"===o&&!a)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!a:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===o?a.call(e,n):a?a.value=n:t.set(e,n),n}function __classPrivateFieldIn(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}t.default={__extends,__assign,__rest,__decorate,__param,__metadata,__awaiter,__generator,__createBinding:o,__exportStar,__values,__read,__spread,__spreadArrays,__spreadArray,__await,__asyncGenerator,__asyncDelegator,__asyncValues,__makeTemplateObject,__importStar,__importDefault,__classPrivateFieldGet,__classPrivateFieldSet,__classPrivateFieldIn}},8909:function(e,t){"use strict";/*!
 * cookie
 * Copyright(c) 2012-2014 Roman Shtylman
 * Copyright(c) 2015 Douglas Christopher Wilson
 * MIT Licensed
 */t.Q=function(e,t){if("string"!=typeof e)throw TypeError("argument str must be a string");for(var o={},a=e.split(";"),s=(t||{}).decode||n,c=0;c<a.length;c++){var l=a[c],u=l.indexOf("=");if(!(u<0)){var h=l.substring(0,u).trim();if(void 0==o[h]){var p=l.substring(u+1,l.length).trim();'"'===p[0]&&(p=p.slice(1,-1)),o[h]=function(e,t){try{return t(e)}catch(t){return e}}(p,s)}}}return o},t.q=function(e,t,n){var s=n||{},c=s.encode||o;if("function"!=typeof c)throw TypeError("option encode is invalid");if(!a.test(e))throw TypeError("argument name is invalid");var l=c(t);if(l&&!a.test(l))throw TypeError("argument val is invalid");var u=e+"="+l;if(null!=s.maxAge){var h=s.maxAge-0;if(isNaN(h)||!isFinite(h))throw TypeError("option maxAge is invalid");u+="; Max-Age="+Math.floor(h)}if(s.domain){if(!a.test(s.domain))throw TypeError("option domain is invalid");u+="; Domain="+s.domain}if(s.path){if(!a.test(s.path))throw TypeError("option path is invalid");u+="; Path="+s.path}if(s.expires){if("function"!=typeof s.expires.toUTCString)throw TypeError("option expires is invalid");u+="; Expires="+s.expires.toUTCString()}if(s.httpOnly&&(u+="; HttpOnly"),s.secure&&(u+="; Secure"),s.sameSite)switch("string"==typeof s.sameSite?s.sameSite.toLowerCase():s.sameSite){case!0:case"strict":u+="; SameSite=Strict";break;case"lax":u+="; SameSite=Lax";break;case"none":u+="; SameSite=None";break;default:throw TypeError("option sameSite is invalid")}return u};var n=decodeURIComponent,o=encodeURIComponent,a=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/},7896:function(e,t,n){"use strict";function _extends(){return(_extends=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e}).apply(null,arguments)}n.d(t,{Z:function(){return _extends}})},35:function(e,t,n){"use strict";n.d(t,{W:function(){return useCallbackRef}});var o=n(2784);function useCallbackRef(e,t=[]){let n=(0,o.useRef)(e);return(0,o.useEffect)(()=>{n.current=e}),(0,o.useCallback)((...e)=>n.current?.(...e),t)}},125:function(e,t,n){"use strict";n.d(t,{lq:function(){return mergeRefs},qq:function(){return useMergeRefs}});var o=n(2784);function mergeRefs(...e){return t=>{e.forEach(e=>{!function(e,t){if(null!=e){if("function"==typeof e){e(t);return}try{e.current=t}catch(n){throw Error(`Cannot assign value '${t}' to ref '${e}'`)}}}(e,t)})}}function useMergeRefs(...e){return(0,o.useMemo)(()=>mergeRefs(...e),e)}},4074:function(e,t,n){"use strict";n.d(t,{G:function(){return a}});var o=n(2784);let a=globalThis?.document?o.useLayoutEffect:o.useEffect},69:function(e,t,n){"use strict";n.d(t,{r:function(){return useUpdateEffect}});var o=n(2784);let useUpdateEffect=(e,t)=>{let n=(0,o.useRef)(!1),a=(0,o.useRef)(!1);(0,o.useEffect)(()=>{let t=n.current,o=t&&a.current;if(o)return e();a.current=!0},t),(0,o.useEffect)(()=>(n.current=!0,()=>{n.current=!1}),[])}},1821:function(e,t,n){"use strict";n.d(t,{k:function(){return createContext}});var o=n(2784);function createContext(e={}){let{strict:t=!0,errorMessage:n="useContext: `context` is undefined. Seems you forgot to wrap component within the Provider",name:a}=e,s=(0,o.createContext)(void 0);return s.displayName=a,[s.Provider,function useContext(){var e;let a=(0,o.useContext)(s);if(!a&&t){let t=Error(n);throw t.name="ContextError",null==(e=Error.captureStackTrace)||e.call(Error,t,useContext),t}return a},s]}},9761:function(e,t,n){"use strict";n.d(t,{uZ:function(){return l},Hm:function(){return h},TR:function(){return getStatusColorScheme},XO:function(){return getStatusIcon},oX:function(){return u},uL:function(){return p}});var o=n(3167),a=n(2322),s=n(9025);function WarningIcon(e){return(0,a.jsx)(s.J,{viewBox:"0 0 24 24",...e,children:(0,a.jsx)("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"})})}var c=n(1285);let[l,u]=(0,o.k)({name:"AlertContext",hookName:"useAlertContext",providerName:"<Alert />"}),[h,p]=(0,o.k)({name:"AlertStylesContext",hookName:"useAlertStyles",providerName:"<Alert />"}),f={info:{icon:function(e){return(0,a.jsx)(s.J,{viewBox:"0 0 24 24",...e,children:(0,a.jsx)("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z"})})},colorScheme:"blue"},warning:{icon:WarningIcon,colorScheme:"orange"},success:{icon:function(e){return(0,a.jsx)(s.J,{viewBox:"0 0 24 24",...e,children:(0,a.jsx)("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"})})},colorScheme:"green"},error:{icon:WarningIcon,colorScheme:"red"},loading:{icon:c.$,colorScheme:"blue"}};function getStatusColorScheme(e){return f[e].colorScheme}function getStatusIcon(e){return f[e].icon}},9180:function(e,t,n){"use strict";n.d(t,{X:function(){return h}});var o=n(2322),a=n(559),s=n(3112),c=n(9761),l=n(6811),u=n(4913);let h=(0,l.G)(function(e,t){let{status:n}=(0,c.oX)(),l=(0,c.uL)(),h=(0,a.k0)({display:"inline",...l.description});return(0,o.jsx)(u.m.div,{ref:t,"data-status":n,...e,className:(0,s.cx)("chakra-alert__desc",e.className),__css:h})});h.displayName="AlertDescription"},521:function(e,t,n){"use strict";n.d(t,{z:function(){return AlertIcon}});var o=n(2322),a=n(3112),s=n(9761),c=n(4913);function AlertIcon(e){let{status:t}=(0,s.oX)(),n=(0,s.XO)(t),l=(0,s.uL)(),u="loading"===t?l.spinner:l.icon;return(0,o.jsx)(c.m.span,{display:"inherit","data-status":t,...e,className:(0,a.cx)("chakra-alert__icon",e.className),__css:u,children:e.children||(0,o.jsx)(n,{h:"100%",w:"100%"})})}AlertIcon.displayName="AlertIcon"},9453:function(e,t,n){"use strict";n.d(t,{C:function(){return u}});var o=n(2322),a=n(3112),s=n(9761),c=n(6811),l=n(4913);let u=(0,c.G)(function(e,t){let n=(0,s.uL)(),{status:c}=(0,s.oX)();return(0,o.jsx)(l.m.div,{ref:t,"data-status":c,...e,className:(0,a.cx)("chakra-alert__title",e.className),__css:n.title})});u.displayName="AlertTitle"},5528:function(e,t,n){"use strict";n.d(t,{b:function(){return f}});var o=n(2322),a=n(2454),s=n(559),c=n(3112),l=n(9761),u=n(7386),h=n(6811),p=n(4913);let f=(0,h.G)(function(e,t){let{status:n="info",addRole:h=!0,...f}=(0,a.L)(e),m=e.colorScheme??(0,l.TR)(n),g=(0,u.j)("Alert",{...e,colorScheme:m}),y=(0,s.k0)({width:"100%",display:"flex",alignItems:"center",position:"relative",overflow:"hidden",...g.container});return(0,o.jsx)(l.uZ,{value:{status:n},children:(0,o.jsx)(l.Hm,{value:g,children:(0,o.jsx)(p.m.div,{"data-status":n,role:h?"alert":void 0,ref:t,...f,className:(0,c.cx)("chakra-alert",e.className),__css:y})})})});f.displayName="Alert"},7296:function(e,t,n){"use strict";n.d(t,{x:function(){return a}});var o=n(4913);let a=(0,o.m)("div");a.displayName="Box"},4584:function(e,t,n){"use strict";n.d(t,{D:function(){return a},i:function(){return s}});var o=n(3167);let[a,s]=(0,o.k)({strict:!1,name:"ButtonGroupContext"})},6698:function(e,t,n){"use strict";n.d(t,{z:function(){return v}});var o=n(2322),a=n(125),s=n(2454),c=n(5792),l=n(3112),u=n(2784),h=n(4584),p=n(4913);function ButtonIcon(e){let{children:t,className:n,...a}=e,s=(0,u.isValidElement)(t)?(0,u.cloneElement)(t,{"aria-hidden":!0,focusable:!1}):t,c=(0,l.cx)("chakra-button__icon",n);return(0,o.jsx)(p.m.span,{display:"inline-flex",alignSelf:"center",flexShrink:0,...a,className:c,children:s})}ButtonIcon.displayName="ButtonIcon";var f=n(559),m=n(1285);function ButtonSpinner(e){let{label:t,placement:n,spacing:a="0.5rem",children:s=(0,o.jsx)(m.$,{color:"currentColor",width:"1em",height:"1em"}),className:c,__css:h,...g}=e,y=(0,l.cx)("chakra-button__spinner",c),v="start"===n?"marginEnd":"marginStart",b=(0,u.useMemo)(()=>(0,f.k0)({display:"flex",alignItems:"center",position:t?"relative":"absolute",[v]:t?a:0,fontSize:"1em",lineHeight:"normal",...h}),[h,t,v,a]);return(0,o.jsx)(p.m.div,{className:y,...g,__css:b,children:s})}ButtonSpinner.displayName="ButtonSpinner";var g=n(6811),y=n(7386);let v=(0,g.G)((e,t)=>{let n=(0,h.i)(),f=(0,y.m)("Button",{...n,...e}),{isDisabled:m=n?.isDisabled,isLoading:g,isActive:v,children:b,leftIcon:C,rightIcon:_,loadingText:w,iconSpacing:S="0.5rem",type:E,spinner:T,spinnerPlacement:k="start",className:I,as:x,shouldWrapChildren:R,...P}=(0,s.L)(e),M=(0,u.useMemo)(()=>{let e={...f?._focus,zIndex:1};return{display:"inline-flex",appearance:"none",alignItems:"center",justifyContent:"center",userSelect:"none",position:"relative",whiteSpace:"nowrap",verticalAlign:"middle",outline:"none",...f,...!!n&&{_focus:e}}},[f,n]),{ref:O,type:L}=function(e){let[t,n]=(0,u.useState)(!e),o=(0,u.useCallback)(e=>{e&&n("BUTTON"===e.tagName)},[]);return{ref:o,type:t?"button":void 0}}(x),U={rightIcon:_,leftIcon:C,iconSpacing:S,children:b,shouldWrapChildren:R};return(0,o.jsxs)(p.m.button,{disabled:m||g,ref:(0,a.qq)(t,O),as:x,type:E??L,"data-active":(0,c.P)(v),"data-loading":(0,c.P)(g),__css:M,className:(0,l.cx)("chakra-button",I),...P,children:[g&&"start"===k&&(0,o.jsx)(ButtonSpinner,{className:"chakra-button__spinner--start",label:w,placement:"start",spacing:S,children:T}),g?w||(0,o.jsx)(p.m.span,{opacity:0,children:(0,o.jsx)(ButtonContent,{...U})}):(0,o.jsx)(ButtonContent,{...U}),g&&"end"===k&&(0,o.jsx)(ButtonSpinner,{className:"chakra-button__spinner--end",label:w,placement:"end",spacing:S,children:T})]})});function ButtonContent(e){let{leftIcon:t,rightIcon:n,children:a,iconSpacing:s,shouldWrapChildren:c}=e;return c?(0,o.jsxs)("span",{style:{display:"contents"},children:[t&&(0,o.jsx)(ButtonIcon,{marginEnd:s,children:t}),a,n&&(0,o.jsx)(ButtonIcon,{marginStart:s,children:n})]}):(0,o.jsxs)(o.Fragment,{children:[t&&(0,o.jsx)(ButtonIcon,{marginEnd:s,children:t}),a,n&&(0,o.jsx)(ButtonIcon,{marginStart:s,children:n})]})}v.displayName="Button"},3950:function(e,t,n){"use strict";n.d(t,{h:function(){return l}});var o=n(2322),a=n(2784),s=n(6698),c=n(6811);let l=(0,c.G)((e,t)=>{let{icon:n,children:c,isRound:l,"aria-label":u,...h}=e,p=n||c,f=(0,a.isValidElement)(p)?(0,a.cloneElement)(p,{"aria-hidden":!0,focusable:!1}):null;return(0,o.jsx)(s.z,{px:"0",py:"0",borderRadius:l?"full":void 0,ref:t,"aria-label":u,...h,children:f})});l.displayName="IconButton"},4114:function(e,t,n){"use strict";n.d(t,{P:function(){return h}});var o=n(2322),a=n(2454),s=n(9025),c=n(6811),l=n(7386),u=n(4913);function CloseIcon(e){return(0,o.jsx)(s.J,{focusable:"false","aria-hidden":!0,...e,children:(0,o.jsx)("path",{fill:"currentColor",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"})})}let h=(0,c.G)(function(e,t){let n=(0,l.m)("CloseButton",e),{children:s,isDisabled:c,__css:h,...p}=(0,a.L)(e);return(0,o.jsx)(u.m.button,{type:"button","aria-label":"Close",ref:t,disabled:c,__css:{outline:0,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,...n,...h},...p,children:s||(0,o.jsx)(CloseIcon,{width:"1em",height:"1em"})})});h.displayName="CloseButton"},2839:function(e,t,n){"use strict";n.d(t,{If:function(){return useColorMode},ff:function(){return useColorModeValue},kc:function(){return a}});var o=n(2784);let a=(0,o.createContext)({});function useColorMode(){let e=(0,o.useContext)(a);if(void 0===e)throw Error("useColorMode must be used within a ColorModeProvider");return e}function useColorModeValue(e,t){let{colorMode:n}=useColorMode();return"dark"===n?t:e}a.displayName="ColorModeContext"},7186:function(e,t,n){"use strict";n.d(t,{W:function(){return h}});var o=n(2322),a=n(2454),s=n(3112),c=n(6811),l=n(7386),u=n(4913);let h=(0,c.G)(function(e,t){let{className:n,centerContent:c,...h}=(0,a.L)(e),p=(0,l.m)("Container",e);return(0,o.jsx)(u.m.div,{ref:t,className:(0,s.cx)("chakra-container",n),...h,__css:{...p,...c&&{display:"flex",flexDirection:"column",alignItems:"center"}}})});h.displayName="Container"},8785:function(e,t,n){"use strict";n.d(t,{k:function(){return c}});var o=n(2322),a=n(6811),s=n(4913);let c=(0,a.G)(function(e,t){let{direction:n,align:a,justify:c,wrap:l,basis:u,grow:h,shrink:p,...f}=e;return(0,o.jsx)(s.m.div,{ref:t,__css:{display:"flex",flexDirection:n,alignItems:a,justifyContent:c,flexWrap:l,flexBasis:u,flexGrow:h,flexShrink:p},...f})});c.displayName="Flex"},3718:function(e,t,n){"use strict";n.d(t,{NI:function(){return C},NJ:function(){return b},Q6:function(){return _},e:function(){return y}});var o=n(2322),a=n(125),s=n(2454),c=n(3167),l=n(5792),u=n(3112),h=n(2784),p=n(6811),f=n(7386),m=n(4913);let[g,y]=(0,c.k)({name:"FormControlStylesContext",errorMessage:"useFormControlStyles returned is 'undefined'. Seems you forgot to wrap the components in \"<FormControl />\" "}),[v,b]=(0,c.k)({strict:!1,name:"FormControlContext"}),C=(0,p.G)(function(e,t){let n=(0,f.j)("Form",e),c=(0,s.L)(e),{getRootProps:p,htmlProps:y,...b}=function(e){let{id:t,isRequired:n,isInvalid:o,isDisabled:s,isReadOnly:c,...u}=e,p=(0,h.useId)(),f=t||`field-${p}`,m=`${f}-label`,g=`${f}-feedback`,y=`${f}-helptext`,[v,b]=(0,h.useState)(!1),[C,_]=(0,h.useState)(!1),[w,S]=(0,h.useState)(!1),E=(0,h.useCallback)((e={},t=null)=>({id:y,...e,ref:(0,a.lq)(t,e=>{e&&_(!0)})}),[y]),T=(0,h.useCallback)((e={},t=null)=>({...e,ref:t,"data-focus":(0,l.P)(w),"data-disabled":(0,l.P)(s),"data-invalid":(0,l.P)(o),"data-readonly":(0,l.P)(c),id:void 0!==e.id?e.id:m,htmlFor:void 0!==e.htmlFor?e.htmlFor:f}),[f,s,w,o,c,m]),k=(0,h.useCallback)((e={},t=null)=>({id:g,...e,ref:(0,a.lq)(t,e=>{e&&b(!0)}),"aria-live":"polite"}),[g]),I=(0,h.useCallback)((e={},t=null)=>({...e,...u,ref:t,role:"group","data-focus":(0,l.P)(w),"data-disabled":(0,l.P)(s),"data-invalid":(0,l.P)(o),"data-readonly":(0,l.P)(c)}),[u,s,w,o,c]),x=(0,h.useCallback)((e={},t=null)=>({...e,ref:t,role:"presentation","aria-hidden":!0,children:e.children||"*"}),[]);return{isRequired:!!n,isInvalid:!!o,isReadOnly:!!c,isDisabled:!!s,isFocused:!!w,onFocus:()=>S(!0),onBlur:()=>S(!1),hasFeedbackText:v,setHasFeedbackText:b,hasHelpText:C,setHasHelpText:_,id:f,labelId:m,feedbackId:g,helpTextId:y,htmlProps:u,getHelpTextProps:E,getErrorMessageProps:k,getRootProps:I,getLabelProps:T,getRequiredIndicatorProps:x}}(c),C=(0,u.cx)("chakra-form-control",e.className);return(0,o.jsx)(v,{value:b,children:(0,o.jsx)(g,{value:n,children:(0,o.jsx)(m.m.div,{...p({},t),className:C,__css:n.container})})})});C.displayName="FormControl";let _=(0,p.G)(function(e,t){let n=b(),a=y(),s=(0,u.cx)("chakra-form__helper-text",e.className);return(0,o.jsx)(m.m.div,{...n?.getHelpTextProps(e,t),__css:a.helperText,className:s})});_.displayName="FormHelperText"},2081:function(e,t,n){"use strict";n.d(t,{K:function(){return useFormControlProps},Y:function(){return useFormControl}});var o=n(5792),a=n(7006),s=n(3718);function useFormControl(e){let{isDisabled:t,isInvalid:n,isReadOnly:a,isRequired:s,...c}=useFormControlProps(e);return{...c,disabled:t,readOnly:a,required:s,"aria-invalid":(0,o.Q)(n),"aria-required":(0,o.Q)(s),"aria-readonly":(0,o.Q)(a)}}function useFormControlProps(e){let t=(0,s.NJ)(),{id:n,disabled:o,readOnly:c,required:l,isRequired:u,isInvalid:h,isReadOnly:p,isDisabled:f,onFocus:m,onBlur:g,...y}=e,v=e["aria-describedby"]?[e["aria-describedby"]]:[];return t?.hasFeedbackText&&t?.isInvalid&&v.push(t.feedbackId),t?.hasHelpText&&v.push(t.helpTextId),{...y,"aria-describedby":v.join(" ")||void 0,id:n??t?.id,isDisabled:o??f??t?.isDisabled,isReadOnly:c??p??t?.isReadOnly,isRequired:l??u??t?.isRequired,isInvalid:h??t?.isInvalid,onFocus:(0,a.v)(t?.onFocus,m),onBlur:(0,a.v)(t?.onBlur,g)}}},9025:function(e,t,n){"use strict";n.d(t,{J:function(){return h}});var o=n(2322),a=n(3112),s=n(6811),c=n(7386),l=n(4913);let u={path:(0,o.jsxs)("g",{stroke:"currentColor",strokeWidth:"1.5",children:[(0,o.jsx)("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),(0,o.jsx)("path",{fill:"currentColor",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),(0,o.jsx)("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]}),viewBox:"0 0 24 24"},h=(0,s.G)((e,t)=>{let{as:n,viewBox:s,color:h="currentColor",focusable:p=!1,children:f,className:m,__css:g,...y}=e,v=(0,a.cx)("chakra-icon",m),b=(0,c.m)("Icon",e),C={w:"1em",h:"1em",display:"inline-block",lineHeight:"1em",flexShrink:0,color:h,...g,...b},_={ref:t,focusable:p,className:v,__css:C},w=s??u.viewBox;if(n&&"string"!=typeof n)return(0,o.jsx)(l.m.svg,{as:n,..._,...y});let S=f??u.path;return(0,o.jsx)(l.m.svg,{verticalAlign:"middle",viewBox:w,..._,...y,children:S})});h.displayName="Icon"},1908:function(e,t,n){"use strict";n.d(t,{I:function(){return p}});var o=n(2322),a=n(2454),s=n(3112),c=n(2081),l=n(6811),u=n(7386),h=n(4913);let p=(0,l.G)(function(e,t){let{htmlSize:n,...l}=e,p=(0,u.j)("Input",l),f=(0,a.L)(l),m=(0,c.Y)(f),g=(0,s.cx)("chakra-input",e.className);return(0,o.jsx)(h.m.input,{size:n,...m,__css:p.field,ref:t,className:g})});p.displayName="Input",p.id="Input"},7259:function(e,t,n){"use strict";n.d(t,{D:function(){return usePopper}});var o=n(125),a=n(6208),s=n(2784),c=n(4497);let l={name:"matchWidth",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:({state:e})=>{e.styles.popper.width=`${e.rects.reference.width}px`},effect:({state:e})=>()=>{let t=e.elements.reference;e.elements.popper.style.width=`${t.offsetWidth}px`}},u={name:"transformOrigin",enabled:!0,phase:"write",fn:({state:e})=>{setTransformOrigin(e)},effect:({state:e})=>()=>{setTransformOrigin(e)}},setTransformOrigin=e=>{e.elements.popper.style.setProperty(c.Dq.transformOrigin.var,(0,c.mv)(e.placement))},h={name:"positionArrow",enabled:!0,phase:"afterWrite",fn:({state:e})=>{setArrowStyles(e)}},setArrowStyles=e=>{if(!e.placement)return;let t=getArrowStyle(e.placement);if(e.elements?.arrow&&t){Object.assign(e.elements.arrow.style,{[t.property]:t.value,width:c.Dq.arrowSize.varRef,height:c.Dq.arrowSize.varRef,zIndex:-1});let n={[c.Dq.arrowSizeHalf.var]:`calc(${c.Dq.arrowSize.varRef} / 2 - 1px)`,[c.Dq.arrowOffset.var]:`calc(${c.Dq.arrowSizeHalf.varRef} * -1)`};for(let t in n)e.elements.arrow.style.setProperty(t,n[t])}},getArrowStyle=e=>e.startsWith("top")?{property:"bottom",value:c.Dq.arrowOffset.varRef}:e.startsWith("bottom")?{property:"top",value:c.Dq.arrowOffset.varRef}:e.startsWith("left")?{property:"right",value:c.Dq.arrowOffset.varRef}:e.startsWith("right")?{property:"left",value:c.Dq.arrowOffset.varRef}:void 0,p={name:"innerArrow",enabled:!0,phase:"main",requires:["arrow"],fn:({state:e})=>{setInnerArrowStyles(e)},effect:({state:e})=>()=>{setInnerArrowStyles(e)}},setInnerArrowStyles=e=>{if(!e.elements.arrow)return;let t=e.elements.arrow.querySelector("[data-popper-arrow-inner]");if(!t)return;let n=(0,c.Ke)(e.placement);n&&t.style.setProperty("--popper-arrow-default-shadow",n),Object.assign(t.style,{transform:"rotate(45deg)",background:c.Dq.arrowBg.varRef,top:0,left:0,width:"100%",height:"100%",position:"absolute",zIndex:"inherit",boxShadow:"var(--popper-arrow-shadow, var(--popper-arrow-default-shadow))"})},f={"start-start":{ltr:"left-start",rtl:"right-start"},"start-end":{ltr:"left-end",rtl:"right-end"},"end-start":{ltr:"right-start",rtl:"left-start"},"end-end":{ltr:"right-end",rtl:"left-end"},start:{ltr:"left",rtl:"right"},end:{ltr:"right",rtl:"left"}},m={"auto-start":"auto-end","auto-end":"auto-start","top-start":"top-end","top-end":"top-start","bottom-start":"bottom-end","bottom-end":"bottom-start"};function usePopper(e={}){let{enabled:t=!0,modifiers:n,placement:g="bottom",strategy:y="absolute",arrowPadding:v=8,eventListeners:b=!0,offset:C,gutter:_=8,flip:w=!0,boundary:S="clippingParents",preventOverflow:E=!0,matchWidth:T,direction:k="ltr"}=e,I=(0,s.useRef)(null),x=(0,s.useRef)(null),R=(0,s.useRef)(null),P=function(e,t="ltr"){let n=f[e]?.[t]||e;return"ltr"===t?n:m[e]??n}(g,k),M=(0,s.useRef)(()=>{}),O=(0,s.useCallback)(()=>{t&&I.current&&x.current&&(M.current?.(),R.current=(0,a.fi)(I.current,x.current,{placement:P,modifiers:[p,h,u,{...l,enabled:!!T},{name:"eventListeners",...(0,c.$B)(b)},{name:"arrow",options:{padding:v}},{name:"offset",options:{offset:C??[0,_]}},{name:"flip",enabled:!!w,options:{padding:8}},{name:"preventOverflow",enabled:!!E,options:{boundary:S}},...n??[]],strategy:y}),R.current.forceUpdate(),M.current=R.current.destroy)},[P,t,n,T,b,v,C,_,w,E,S,y]);(0,s.useEffect)(()=>()=>{I.current||x.current||(R.current?.destroy(),R.current=null)},[]);let L=(0,s.useCallback)(e=>{I.current=e,O()},[O]),U=(0,s.useCallback)((e={},t=null)=>({...e,ref:(0,o.lq)(L,t)}),[L]),q=(0,s.useCallback)(e=>{x.current=e,O()},[O]),H=(0,s.useCallback)((e={},t=null)=>({...e,ref:(0,o.lq)(q,t),style:{...e.style,position:y,minWidth:T?void 0:"max-content",inset:"0 auto auto 0"}}),[y,q,T]),V=(0,s.useCallback)((e={},t=null)=>{let{size:n,shadowColor:o,bg:a,style:s,...c}=e;return{...c,ref:t,"data-popper-arrow":"",style:function(e){let{size:t,shadowColor:n,bg:o,style:a}=e,s={...a,position:"absolute"};return t&&(s["--popper-arrow-size"]=t),n&&(s["--popper-arrow-shadow-color"]=n),o&&(s["--popper-arrow-bg"]=o),s}(e)}},[]),G=(0,s.useCallback)((e={},t=null)=>({...e,ref:t,"data-popper-arrow-inner":""}),[]);return{update(){R.current?.update()},forceUpdate(){R.current?.forceUpdate()},transformOrigin:c.Dq.transformOrigin.varRef,referenceRef:L,popperRef:q,getPopperProps:H,getArrowProps:V,getArrowInnerProps:G,getReferenceProps:U}}},4497:function(e,t,n){"use strict";n.d(t,{$B:function(){return getEventListenerOptions},Dq:function(){return o},Ke:function(){return getBoxShadow},mv:function(){return toTransformOrigin}});let toVar=(e,t)=>({var:e,varRef:t?`var(${e}, ${t})`:`var(${e})`}),o={arrowShadowColor:toVar("--popper-arrow-shadow-color"),arrowSize:toVar("--popper-arrow-size","8px"),arrowSizeHalf:toVar("--popper-arrow-size-half"),arrowBg:toVar("--popper-arrow-bg"),transformOrigin:toVar("--popper-transform-origin"),arrowOffset:toVar("--popper-arrow-offset")};function getBoxShadow(e){return e.includes("top")?"1px 1px 0px 0 var(--popper-arrow-shadow-color)":e.includes("bottom")?"-1px -1px 0px 0 var(--popper-arrow-shadow-color)":e.includes("right")?"-1px 1px 0px 0 var(--popper-arrow-shadow-color)":e.includes("left")?"1px -1px 0px 0 var(--popper-arrow-shadow-color)":void 0}let a={top:"bottom center","top-start":"bottom left","top-end":"bottom right",bottom:"top center","bottom-start":"top left","bottom-end":"top right",left:"right center","left-start":"right top","left-end":"right bottom",right:"left center","right-start":"left top","right-end":"left bottom"},toTransformOrigin=e=>a[e],s={scroll:!0,resize:!0};function getEventListenerOptions(e){return"object"==typeof e?{enabled:!0,options:{...s,...e}}:{enabled:e,options:s}}},7758:function(e,t,n){"use strict";n.d(t,{L:function(){return c},h:function(){return PortalManager}});var o=n(2322),a=n(3167);let[s,c]=(0,a.k)({strict:!1,name:"PortalManagerContext"});function PortalManager(e){let{children:t,zIndex:n}=e;return(0,o.jsx)(s,{value:{zIndex:n},children:t})}PortalManager.displayName="PortalManager"},1853:function(e,t,n){"use strict";n.d(t,{h:function(){return Portal}});var o=n(2322),a=n(4074),s=n(3167),c=n(2784),l=n(8316),u=n(7758);let[h,p]=(0,s.k)({strict:!1,name:"PortalContext"}),f="chakra-portal",Container=e=>(0,o.jsx)("div",{className:"chakra-portal-zIndex",style:{position:"absolute",zIndex:e.zIndex,top:0,left:0,right:0},children:e.children}),DefaultPortal=e=>{let{appendToParentPortal:t,children:n}=e,[s,m]=(0,c.useState)(null),g=(0,c.useRef)(null),[,y]=(0,c.useState)({});(0,c.useEffect)(()=>y({}),[]);let v=p(),b=(0,u.L)();(0,a.G)(()=>{if(!s)return;let e=s.ownerDocument,n=t?v??e.body:e.body;if(!n)return;g.current=e.createElement("div"),g.current.className=f,n.appendChild(g.current),y({});let o=g.current;return()=>{n.contains(o)&&n.removeChild(o)}},[s]);let C=b?.zIndex?(0,o.jsx)(Container,{zIndex:b?.zIndex,children:n}):n;return g.current?(0,l.createPortal)((0,o.jsx)(h,{value:g.current,children:C}),g.current):(0,o.jsx)("span",{ref:e=>{e&&m(e)}})},ContainerPortal=e=>{let{children:t,containerRef:n,appendToParentPortal:s}=e,u=n.current,p=u??("undefined"!=typeof window?document.body:void 0),m=(0,c.useMemo)(()=>{let e=u?.ownerDocument.createElement("div");return e&&(e.className=f),e},[u]),[,g]=(0,c.useState)({});return((0,a.G)(()=>g({}),[]),(0,a.G)(()=>{if(m&&p)return p.appendChild(m),()=>{p.removeChild(m)}},[m,p]),p&&m)?(0,l.createPortal)((0,o.jsx)(h,{value:s?m:null,children:t}),m):null};function Portal(e){let t={appendToParentPortal:!0,...e},{containerRef:n,...a}=t;return n?(0,o.jsx)(ContainerPortal,{containerRef:n,...a}):(0,o.jsx)(DefaultPortal,{...a})}Portal.className=f,Portal.selector=".chakra-portal",Portal.displayName="Portal"},7905:function(e,t,n){"use strict";n.d(t,{L:function(){return a}});var o=n(4913);let a=(0,o.m)("div",{baseStyle:{flex:1,justifySelf:"stretch",alignSelf:"stretch"}});a.displayName="Spacer"},1285:function(e,t,n){"use strict";n.d(t,{$:function(){return f}});var o=n(2322),a=n(2454),s=n(3112),c=n(8165),l=n(6811),u=n(7386),h=n(4913);let p=(0,c.F4)({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),f=(0,l.G)((e,t)=>{let n=(0,u.m)("Spinner",e),{label:c="Loading...",thickness:l="2px",speed:f="0.45s",emptyColor:m="transparent",className:g,...y}=(0,a.L)(e),v=(0,s.cx)("chakra-spinner",g),b={display:"inline-block",borderColor:"currentColor",borderStyle:"solid",borderRadius:"99999px",borderWidth:l,borderBottomColor:m,borderLeftColor:m,animation:`${p} ${f} linear infinite`,...n};return(0,o.jsx)(h.m.div,{ref:t,__css:b,className:v,...y,children:c&&(0,o.jsx)(h.m.span,{srOnly:!0,children:c})})});f.displayName="Spinner"},2459:function(e,t,n){"use strict";n.d(t,{U:function(){return c}});var o=n(2322),a=n(3386),s=n(6811);let c=(0,s.G)((e,t)=>(0,o.jsx)(a.K,{align:"center",...e,direction:"row",ref:t}));c.displayName="HStack"},3386:function(e,t,n){"use strict";n.d(t,{K:function(){return p}});var o=n(2322),a=n(9846),s=n(3112),c=n(2784),l=n(4913);let StackItem=e=>(0,o.jsx)(l.m.div,{className:"chakra-stack__item",...e,__css:{display:"inline-block",flex:"0 0 auto",minWidth:0,...e.__css}});StackItem.displayName="StackItem";var u=n(4966),h=n(6811);let p=(0,h.G)((e,t)=>{let{isInline:n,direction:h,align:p,justify:f,spacing:m="0.5rem",wrap:g,children:y,divider:v,className:b,shouldWrapChildren:C,..._}=e,w=n?"row":h??"column",S=(0,c.useMemo)(()=>(function(e){let{spacing:t,direction:n}=e,o={column:{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},"column-reverse":{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},row:{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0},"row-reverse":{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0}};return{"&":(0,u.XQ)(n,e=>o[e])}})({spacing:m,direction:w}),[m,w]),E=!!v,T=!C&&!E,k=(0,c.useMemo)(()=>{let e=(0,a.W)(y);return T?e:e.map((t,n)=>{let a=void 0!==t.key?t.key:n,s=n+1===e.length,l=(0,o.jsx)(StackItem,{children:t},a),u=C?l:t;if(!E)return u;let h=(0,c.cloneElement)(v,{__css:S});return(0,o.jsxs)(c.Fragment,{children:[u,s?null:h]},a)})},[v,S,E,T,C,y]),I=(0,s.cx)("chakra-stack",b);return(0,o.jsx)(l.m.div,{ref:t,display:"flex",alignItems:p,justifyContent:f,flexDirection:w,flexWrap:g,gap:E?void 0:m,className:I,..._,children:k})});p.displayName="Stack"},5512:function(e,t,n){"use strict";n.d(t,{g:function(){return c}});var o=n(2322),a=n(3386),s=n(6811);let c=(0,s.G)((e,t)=>(0,o.jsx)(a.K,{align:"center",...e,direction:"column",ref:t}));c.displayName="VStack"},4913:function(e,t,n){"use strict";n.d(t,{m:function(){return y}});var o,a=n(1700),s=n(6820),c=n(798),l=n(5154),u=n(2603),h=n(2784);let p=new Set([...a.cC,"textStyle","layerStyle","apply","noOfLines","focusBorderColor","errorBorderColor","as","__css","css","sx"]),f=new Set(["htmlWidth","htmlHeight","htmlSize","htmlTranslate"]);function shouldForwardProp(e){return(f.has(e)||!p.has(e))&&"_"!==e[0]}var m=n(2839);let g=(o=u.Z).default||o,toCSSObject=({baseStyle:e})=>t=>{let{theme:n,css:o,__css:u,sx:h,...p}=t,[f]=function(e,...t){let n=Object.getOwnPropertyDescriptors(e),o=Object.keys(n),split=e=>{let t={};for(let o=0;o<e.length;o++){let a=e[o];n[a]&&(Object.defineProperty(t,a,n[a]),delete n[a])}return t};return t.map(e=>split(Array.isArray(e)?e:o.filter(e))).concat(split(o))}(p,a.ZR),m=(0,c.P)(e,t),g=function(e,...t){if(null==e)throw TypeError("Cannot convert undefined or null to object");let n={...e};for(let e of t)if(null!=e)for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(t in n&&delete n[t],n[t]=e[t]);return n}({},u,m,(0,l.o)(f),h),y=(0,s.i)(g)(t.theme);return o?[y,o]:y};function styled(e,t){let{baseStyle:n,...o}=t??{};o.shouldForwardProp||(o.shouldForwardProp=shouldForwardProp);let a=toCSSObject({baseStyle:n}),s=g(e,o)(a),c=(0,h.forwardRef)(function(e,t){let{children:n,...o}=e,{colorMode:a,forced:c}=(0,m.If)();return(0,h.createElement)(s,{ref:t,"data-theme":c?a:void 0,...o},n)});return c}let y=function(){let e=new Map;return new Proxy(styled,{apply:(e,t,n)=>styled(...n),get:(t,n)=>(e.has(n)||e.set(n,styled(n)),e.get(n))})}()},6811:function(e,t,n){"use strict";n.d(t,{G:function(){return forwardRef}});var o=n(2784);function forwardRef(e){return(0,o.forwardRef)(e)}},9120:function(e,t,n){"use strict";n.d(t,{LP:function(){return getToken},dQ:function(){return useToken},uP:function(){return useChakra}});var o=n(9026),a=n(2839);function useChakra(){let e=(0,a.If)(),t=(0,o.F)();return{...e,theme:t}}function useToken(e,t,n){let a=(0,o.F)();return getToken(e,t,n)(a)}function getToken(e,t,n){let o=Array.isArray(t)?t:[t],a=Array.isArray(n)?n:[n];return n=>{let s=a.filter(Boolean),c=o.map((t,o)=>{if("breakpoints"===e)return function(e,t,n){if(null==t)return t;let getValue=t=>e.__breakpoints?.asArray?.[t];return getValue(t)??getValue(n)??n}(n,t,s[o]??t);let a=`${e}.${t}`;return function(e,t,n){if(null==t)return t;let getValue=t=>e.__cssMap?.[t]?.value;return getValue(t)??getValue(n)??n}(n,a,s[o]??t)});return Array.isArray(t)?c:c[0]}}},6425:function(e,t,n){"use strict";n.d(t,{ZL:function(){return GlobalStyle},Fo:function(){return S},f6:function(){return ThemeProvider},eC:function(){return createStylesContext},yK:function(){return E}});var o=n(2322),a=n(7506),s=n(9791),c=n(3637),l=n(5338),u=n(9149);function walkObject(e,t,n={}){let{stop:o,getKey:a}=n;return function inner(e,n=[]){if((0,s.Kn)(e)||Array.isArray(e)){let s={};for(let[c,l]of Object.entries(e)){let u=a?.(c)??c,h=[...n,u];if(o?.(e,h))return t(e,n);s[u]=inner(l,h)}return s}return t(e,n)}(e)}var h=n(8641),p=n(2619);let f=["colors","borders","borderWidths","borderStyles","fonts","fontSizes","fontWeights","gradients","letterSpacings","lineHeights","radii","space","shadows","sizes","zIndices","transition","blur","breakpoints"];function tokenToCssVar(e,t){return(0,u.gJ)(String(e).replace(/\./g,"-"),void 0,t)}var m=n(6820),g=n(3167),y=n(1400),v=n(798),b=n(8586),C=n(8165),_=n(2784),w=n(2839);function ThemeProvider(e){let{cssVarsRoot:t,theme:n,children:u}=e,m=(0,_.useMemo)(()=>(function(e){let t=function(e){let{__cssMap:t,__cssVars:n,__breakpoints:o,...a}=e;return a}(e),{cssMap:n,cssVars:o}=function(e){let t=function(e){let t=(0,p.e)(e,f),n=e.semanticTokens,isSemanticCondition=e=>h._.includes(e)||"default"===e,o={};return walkObject(t,(e,t)=>{null!=e&&(o[t.join(".")]={isSemantic:!1,value:e})}),walkObject(n,(e,t)=>{null!=e&&(o[t.join(".")]={isSemantic:!0,value:e})},{stop:e=>Object.keys(e).every(isSemanticCondition)}),o}(e),n=e.config?.cssVarPrefix,o={},a={};for(let[e,u]of Object.entries(t)){let{isSemantic:p,value:f}=u,{variable:m,reference:g}=tokenToCssVar(e,n);if(!p){if(e.startsWith("space")){let t=e.split("."),[n,...o]=t,s=`${n}.-${o.join(".")}`,c=l.y.negate(f),u=l.y.negate(g);a[s]={value:c,var:m,varRef:u}}o[m]=f,a[e]={value:f,var:m,varRef:g};continue}let y=(0,s.Kn)(f)?f:{default:f};o=c(o,Object.entries(y).reduce((o,[a,s])=>{if(!s)return o;let c=function(e,o){let a=String(e).split(".")[0],s=[a,o].join("."),c=t[s];if(!c)return o;let{reference:l}=tokenToCssVar(s,n);return l}(e,`${s}`);if("default"===a)return o[m]=c,o;let l=h.v?.[a]??a;return o[l]={[m]:c},o},{})),a[e]={value:g,var:m,varRef:g}}return{cssVars:o,cssMap:a}}(t);return Object.assign(t,{__cssVars:{"--chakra-ring-inset":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-ring-offset-width":"0px","--chakra-ring-offset-color":"#fff","--chakra-ring-color":"rgba(66, 153, 225, 0.6)","--chakra-ring-offset-shadow":"0 0 #0000","--chakra-ring-shadow":"0 0 #0000","--chakra-space-x-reverse":"0","--chakra-space-y-reverse":"0",...o},__cssMap:n,__breakpoints:(0,a.y)(t.breakpoints)}),t})(n),[n]);return(0,o.jsxs)(b.a,{theme:m,children:[(0,o.jsx)(CSSVars,{root:t}),u]})}function CSSVars({root:e=":host, :root"}){let t=[e,"[data-theme]"].join(",");return(0,o.jsx)(C.xB,{styles:e=>({[t]:e.__cssVars})})}let[S,E]=(0,g.k)({name:"StylesContext",errorMessage:"useStyles: `styles` is undefined. Seems you forgot to wrap the components in `<StylesProvider />` "});function createStylesContext(e){return(0,g.k)({name:`${e}StylesContext`,errorMessage:`useStyles: "styles" is undefined. Seems you forgot to wrap the components in "<${e} />" `})}function GlobalStyle(){let{colorMode:e}=(0,w.If)();return(0,o.jsx)(C.xB,{styles:t=>{let n=(0,y.W)(t,"styles.global"),o=(0,v.P)(n,{theme:t,colorMode:e});if(!o)return;let a=(0,m.i)(o)(t);return a}})}},7386:function(e,t,n){"use strict";n.d(t,{j:function(){return useMultiStyleConfig},m:function(){return useStyleConfig}});var o=n(9791),a=n(7506),s=n(798),c=n(3637),l=n(1400),u=n(5154),h=n(2044),p=n(2784),f=n(1361),m=n(9120);function useStyleConfigImpl(e,t={}){let{styleConfig:n,...g}=t,{theme:y,colorMode:v}=(0,m.uP)(),b=e?(0,l.W)(y,`components.${e}`):void 0,C=n||b,_=c({theme:y,colorMode:v},C?.defaultProps??{},(0,u.o)((0,h.C)(g,["children"])),(e,t)=>e?void 0:t),w=(0,p.useRef)({});if(C){let e=(e=>{let{variant:t,size:n,theme:l}=e,u=function(e){let t=e.__breakpoints;return function(e,n,l,u){var h;if(!t)return;let p={},f=(h=t.toArrayValue,Array.isArray(l)?l:(0,o.Kn)(l)?h(l):null!=l?[l]:void 0);if(!f)return p;let m=f.length,g=1===m,y=!!e.parts;for(let o=0;o<m;o++){let l=t.details[o],h=t.details[function(e,t){for(let n=t+1;n<e.length;n++)if(null!=e[n])return n;return -1}(f,o)],m=(0,a.Y)(l.minW,h?._minW),v=(0,s.P)(e[n]?.[f[o]],u);if(v){if(y){e.parts?.forEach(e=>{c(p,{[e]:g?v[e]:{[m]:v[e]}})});continue}if(!y){g?c(p,v):p[m]=v;continue}p[m]=v}}return p}}(l);return c({},(0,s.P)(C.baseStyle??{},e),u(C,"sizes",n,e),u(C,"variants",t,e))})(_),t=f(w.current,e);t||(w.current=e)}return w.current}function useStyleConfig(e,t={}){return useStyleConfigImpl(e,t)}function useMultiStyleConfig(e,t={}){return useStyleConfigImpl(e,t)}},9026:function(e,t,n){"use strict";n.d(t,{F:function(){return useTheme}});var o=n(8586),a=n(2784);function useTheme(){let e=(0,a.useContext)(o.T);if(!e)throw Error("useTheme: `theme` is undefined. Seems you forgot to wrap your app in `<ChakraProvider />` or `<ThemeProvider />`");return e}},9813:function(e,t,n){"use strict";n.d(t,{AD:function(){return y},SD:function(){return b},Sn:function(){return g},Vp:function(){return m},bq:function(){return v}});var o=n(2322),a=n(2454),s=n(3167),c=n(9025),l=n(6811),u=n(7386),h=n(4913);let[p,f]=(0,s.k)({name:"TagStylesContext",errorMessage:"useTagStyles returned is 'undefined'. Seems you forgot to wrap the components in \"<Tag />\" "}),m=(0,l.G)((e,t)=>{let n=(0,u.j)("Tag",e),s=(0,a.L)(e),c={display:"inline-flex",verticalAlign:"top",alignItems:"center",maxWidth:"100%",...n.container};return(0,o.jsx)(p,{value:n,children:(0,o.jsx)(h.m.span,{ref:t,...s,__css:c})})});m.displayName="Tag";let g=(0,l.G)((e,t)=>{let n=f();return(0,o.jsx)(h.m.span,{ref:t,noOfLines:1,...e,__css:n.label})});g.displayName="TagLabel";let y=(0,l.G)((e,t)=>(0,o.jsx)(c.J,{ref:t,verticalAlign:"top",marginEnd:"0.5rem",...e}));y.displayName="TagLeftIcon";let v=(0,l.G)((e,t)=>(0,o.jsx)(c.J,{ref:t,verticalAlign:"top",marginStart:"0.5rem",...e}));v.displayName="TagRightIcon";let TagCloseIcon=e=>(0,o.jsx)(c.J,{verticalAlign:"inherit",viewBox:"0 0 512 512",...e,children:(0,o.jsx)("path",{fill:"currentColor",d:"M289.94 256l95-95A24 24 0 00351 127l-95 95-95-95a24 24 0 00-34 34l95 95-95 95a24 24 0 1034 34l95-95 95 95a24 24 0 0034-34z"})});TagCloseIcon.displayName="TagCloseIcon";let b=(0,l.G)((e,t)=>{let{isDisabled:n,children:a,...s}=e,c=f(),l={display:"flex",alignItems:"center",justifyContent:"center",outline:"0",...c.closeButton};return(0,o.jsx)(h.m.button,{ref:t,"aria-label":"close",...s,type:"button",disabled:n,__css:l,children:a||(0,o.jsx)(TagCloseIcon,{})})});b.displayName="TagCloseButton"},5338:function(e,t,n){"use strict";n.d(t,{y:function(){return a}});var o=n(9791);function resolveReference(e){return(0,o.Kn)(e)&&e.reference?e.reference:String(e)}let toExpression=(e,...t)=>t.map(resolveReference).join(` ${e} `).replace(/calc/g,""),add=(...e)=>`calc(${toExpression("+",...e)})`,subtract=(...e)=>`calc(${toExpression("-",...e)})`,multiply=(...e)=>`calc(${toExpression("*",...e)})`,divide=(...e)=>`calc(${toExpression("/",...e)})`,negate=e=>{let t=resolveReference(e);return null==t||Number.isNaN(parseFloat(t))?multiply(t,-1):String(t).startsWith("-")?String(t).slice(1):`-${t}`},a=Object.assign(e=>({add:(...t)=>a(add(e,...t)),subtract:(...t)=>a(subtract(e,...t)),multiply:(...t)=>a(multiply(e,...t)),divide:(...t)=>a(divide(e,...t)),negate:()=>a(negate(e)),toString:()=>e.toString()}),{add,subtract,multiply,divide,negate})},9149:function(e,t,n){"use strict";function cssVar(e,t,n){let o=function(e,t=""){return function(e){let t=function(e,t="-"){return e.replace(/\s+/g,t)}(e.toString());return(function(e){if(e.includes("\\."))return e;let t=!Number.isInteger(parseFloat(e.toString()));return t?e.replace(".","\\."):e})(t).replace(/[!-,/:-@[-^`{-~]/g,"\\$&")}(`--${function(e,t=""){return[t,e].filter(Boolean).join("-")}(e,t)}`)}(e,n);return{variable:o,reference:`var(${o}${t?`, ${t}`:""})`}}function defineCssVars(e,t){let n={};for(let o of t){if(Array.isArray(o)){let[t,a]=o;n[t]=cssVar(`${e}-${t}`,a);continue}n[o]=cssVar(`${e}-${o}`)}return n}n.d(t,{_6:function(){return defineCssVars},gJ:function(){return cssVar}})},6820:function(e,t,n){"use strict";n.d(t,{i:function(){return css}});var o=n(798),a=n(9791),s=n(3637),c=n(8641),l=n(1700);let expandResponsive=e=>t=>{if(!t.__breakpoints)return e;let{isResponsive:n,toArrayValue:s,media:c}=t.__breakpoints,l={};for(let u in e){let h=(0,o.P)(e[u],t);if(null==h)continue;if(!Array.isArray(h=(0,a.Kn)(h)&&n(h)?s(h):h)){l[u]=h;continue}let p=h.slice(0,c.length).length;for(let e=0;e<p;e+=1){let t=c?.[e];if(!t){l[u]=h[e];continue}l[t]=l[t]||{},null!=h[e]&&(l[t][u]=h[e])}}return l},isCSSVariableTokenValue=(e,t)=>e.startsWith("--")&&"string"==typeof t&&!/^var\(--.+\)$/.test(t),resolveTokenValue=(e,t)=>{if(null==t)return t;let getVar=t=>e.__cssMap?.[t]?.varRef,getValue=e=>getVar(e)??e,[n,o]=function(e){let t=[],n="",o=!1;for(let a=0;a<e.length;a++){let s=e[a];"("===s?(o=!0,n+=s):")"===s?(o=!1,n+=s):","!==s||o?n+=s:(t.push(n),n="")}return(n=n.trim())&&t.push(n),t}(t);return t=getVar(n)??getValue(o)??getValue(t)},css=e=>t=>{let n=function(e){let{configs:t={},pseudos:n={},theme:c}=e,css2=(e,l=!1)=>{let u=(0,o.P)(e,c),h=expandResponsive(u)(c),p={};for(let e in h){let f=h[e],m=(0,o.P)(f,c);e in n&&(e=n[e]),isCSSVariableTokenValue(e,m)&&(m=resolveTokenValue(c,m));let g=t[e];if(!0===g&&(g={property:e}),(0,a.Kn)(m)){p[e]=p[e]??{},p[e]=s({},p[e],css2(m,!0));continue}let y=g?.transform?.(m,c,u)??m;y=g?.processResult?css2(y,!0):y;let v=(0,o.P)(g?.property,c);if(!l&&g?.static){let e=(0,o.P)(g.static,c);p=s({},p,e)}if(v&&Array.isArray(v)){for(let e of v)p[e]=y;continue}if(v){"&"===v&&(0,a.Kn)(y)?p=s({},p,y):p[v]=y;continue}if((0,a.Kn)(y)){p=s({},p,y);continue}p[e]=y}return p};return css2}({theme:t,pseudos:c.v,configs:l.Ul});return n(e)}},559:function(e,t,n){"use strict";function defineStyle(e){return e}function defineStyleConfig(e){return e}function createMultiStyleConfigHelpers(e){return{definePartsStyle:e=>e,defineMultiStyleConfig:t=>({parts:e,...t})}}n.d(t,{D:function(){return createMultiStyleConfigHelpers},fj:function(){return defineStyleConfig},k0:function(){return defineStyle}})},8641:function(e,t,n){"use strict";n.d(t,{_:function(){return s},v:function(){return a}});let o={open:(e,t)=>`${e}[data-open], ${e}[open], ${e}[data-state=open] ${t}`,closed:(e,t)=>`${e}[data-closed], ${e}[data-state=closed] ${t}`,hover:(e,t)=>`${e}:hover ${t}, ${e}[data-hover] ${t}`,focus:(e,t)=>`${e}:focus ${t}, ${e}[data-focus] ${t}`,focusVisible:(e,t)=>`${e}:focus-visible ${t}`,focusWithin:(e,t)=>`${e}:focus-within ${t}`,active:(e,t)=>`${e}:active ${t}, ${e}[data-active] ${t}`,disabled:(e,t)=>`${e}:disabled ${t}, ${e}[data-disabled] ${t}`,invalid:(e,t)=>`${e}:invalid ${t}, ${e}[data-invalid] ${t}`,checked:(e,t)=>`${e}:checked ${t}, ${e}[data-checked] ${t}`,placeholderShown:(e,t)=>`${e}:placeholder-shown ${t}`},toGroup=e=>merge(t=>e(t,"&"),"[role=group]","[data-group]",".group"),toPeer=e=>merge(t=>e(t,"~ &"),"[data-peer]",".peer"),merge=(e,...t)=>t.map(e).join(", "),a={_hover:"&:hover, &[data-hover]",_active:"&:active, &[data-active]",_focus:"&:focus, &[data-focus]",_highlighted:"&[data-highlighted]",_focusWithin:"&:focus-within, &[data-focus-within]",_focusVisible:"&:focus-visible, &[data-focus-visible]",_disabled:"&:disabled, &[disabled], &[aria-disabled=true], &[data-disabled]",_readOnly:"&[aria-readonly=true], &[readonly], &[data-readonly]",_before:"&::before",_after:"&::after",_empty:"&:empty, &[data-empty]",_expanded:"&[aria-expanded=true], &[data-expanded], &[data-state=expanded]",_checked:"&[aria-checked=true], &[data-checked], &[data-state=checked]",_grabbed:"&[aria-grabbed=true], &[data-grabbed]",_pressed:"&[aria-pressed=true], &[data-pressed]",_invalid:"&[aria-invalid=true], &[data-invalid]",_valid:"&[data-valid], &[data-state=valid]",_loading:"&[data-loading], &[aria-busy=true]",_selected:"&[aria-selected=true], &[data-selected]",_hidden:"&[hidden], &[data-hidden]",_autofill:"&:-webkit-autofill",_even:"&:nth-of-type(even)",_odd:"&:nth-of-type(odd)",_first:"&:first-of-type",_firstLetter:"&::first-letter",_last:"&:last-of-type",_notFirst:"&:not(:first-of-type)",_notLast:"&:not(:last-of-type)",_visited:"&:visited",_activeLink:"&[aria-current=page]",_activeStep:"&[aria-current=step]",_indeterminate:"&:indeterminate, &[aria-checked=mixed], &[data-indeterminate], &[data-state=indeterminate]",_groupOpen:toGroup(o.open),_groupClosed:toGroup(o.closed),_groupHover:toGroup(o.hover),_peerHover:toPeer(o.hover),_groupFocus:toGroup(o.focus),_peerFocus:toPeer(o.focus),_groupFocusVisible:toGroup(o.focusVisible),_peerFocusVisible:toPeer(o.focusVisible),_groupActive:toGroup(o.active),_peerActive:toPeer(o.active),_groupDisabled:toGroup(o.disabled),_peerDisabled:toPeer(o.disabled),_groupInvalid:toGroup(o.invalid),_peerInvalid:toPeer(o.invalid),_groupChecked:toGroup(o.checked),_peerChecked:toPeer(o.checked),_groupFocusWithin:toGroup(o.focusWithin),_peerFocusWithin:toPeer(o.focusWithin),_peerPlaceholderShown:toPeer(o.placeholderShown),_placeholder:"&::placeholder, &[data-placeholder]",_placeholderShown:"&:placeholder-shown, &[data-placeholder-shown]",_fullScreen:"&:fullscreen, &[data-fullscreen]",_selection:"&::selection",_rtl:"[dir=rtl] &, &[dir=rtl]",_ltr:"[dir=ltr] &, &[dir=ltr]",_mediaDark:"@media (prefers-color-scheme: dark)",_mediaReduceMotion:"@media (prefers-reduced-motion: reduce)",_dark:".chakra-ui-dark &:not([data-theme]),[data-theme=dark] &:not([data-theme]),&[data-theme=dark]",_light:".chakra-ui-light &:not([data-theme]),[data-theme=light] &:not([data-theme]),&[data-theme=light]",_horizontal:"&[data-orientation=horizontal]",_vertical:"&[data-orientation=vertical]",_open:"&[data-open], &[open], &[data-state=open]",_closed:"&[data-closed], &[data-state=closed]",_complete:"&[data-complete]",_incomplete:"&[data-incomplete]",_current:"&[data-current]"},s=Object.keys(a)},1700:function(e,t,n){"use strict";n.d(t,{ZR:function(){return isStyleProp},oE:function(){return J},cC:function(){return Y},Ul:function(){return K}});var o=n(3637),a=n(8641),s=n(9791);let isImportant=e=>/!(important)?$/.test(e),withoutImportant=e=>"string"==typeof e?e.replace(/!(important)?$/,"").trim():e,tokenToCSSVar=(e,t)=>n=>{let o=String(t),a=isImportant(o),c=withoutImportant(o),l=e?`${e}.${c}`:c,u=(0,s.Kn)(n.__cssMap)&&l in n.__cssMap?n.__cssMap[l].varRef:t;return u=withoutImportant(u),a?`${u} !important`:u};function createTransform(e){let{scale:t,transform:n,compose:o}=e;return(e,a)=>{let s=tokenToCSSVar(t,e)(a),c=n?.(s,a)??s;return o&&(c=o(c,a)),c}}let pipe=(...e)=>t=>e.reduce((e,t)=>t(e),t);function toConfig(e,t){return n=>{let o={property:n,scale:e};return o.transform=createTransform({scale:e,transform:t}),o}}let getRtl=({rtl:e,ltr:t})=>n=>"rtl"===n.direction?e:t,c=["rotate(var(--chakra-rotate, 0))","scaleX(var(--chakra-scale-x, 1))","scaleY(var(--chakra-scale-y, 1))","skewX(var(--chakra-skew-x, 0))","skewY(var(--chakra-skew-y, 0))"],l={"--chakra-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-sepia":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-drop-shadow":"var(--chakra-empty,/*!*/ /*!*/)",filter:"var(--chakra-blur) var(--chakra-brightness) var(--chakra-contrast) var(--chakra-grayscale) var(--chakra-hue-rotate) var(--chakra-invert) var(--chakra-saturate) var(--chakra-sepia) var(--chakra-drop-shadow)"},u={backdropFilter:"var(--chakra-backdrop-blur) var(--chakra-backdrop-brightness) var(--chakra-backdrop-contrast) var(--chakra-backdrop-grayscale) var(--chakra-backdrop-hue-rotate) var(--chakra-backdrop-invert) var(--chakra-backdrop-opacity) var(--chakra-backdrop-saturate) var(--chakra-backdrop-sepia)","--chakra-backdrop-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-opacity":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-sepia":"var(--chakra-empty,/*!*/ /*!*/)"},h={"row-reverse":{space:"--chakra-space-x-reverse",divide:"--chakra-divide-x-reverse"},"column-reverse":{space:"--chakra-space-y-reverse",divide:"--chakra-divide-y-reverse"}},p={"to-t":"to top","to-tr":"to top right","to-r":"to right","to-br":"to bottom right","to-b":"to bottom","to-bl":"to bottom left","to-l":"to left","to-tl":"to top left"},f=new Set(Object.values(p)),m=new Set(["none","-moz-initial","inherit","initial","revert","unset"]),trimSpace=e=>e.trim(),isCSSFunction=e=>"string"==typeof e&&e.includes("(")&&e.includes(")"),analyzeCSSValue=e=>{let t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}},wrap=e=>t=>`${e}(${t})`,g={filter:e=>"auto"!==e?e:l,backdropFilter:e=>"auto"!==e?e:u,ring:e=>({"--chakra-ring-offset-shadow":"var(--chakra-ring-inset) 0 0 0 var(--chakra-ring-offset-width) var(--chakra-ring-offset-color)","--chakra-ring-shadow":"var(--chakra-ring-inset) 0 0 0 calc(var(--chakra-ring-width) + var(--chakra-ring-offset-width)) var(--chakra-ring-color)","--chakra-ring-width":g.px(e),boxShadow:"var(--chakra-ring-offset-shadow), var(--chakra-ring-shadow), var(--chakra-shadow, 0 0 #0000)"}),bgClip:e=>"text"===e?{color:"transparent",backgroundClip:"text"}:{backgroundClip:e},transform:e=>"auto"===e?["translateX(var(--chakra-translate-x, 0))","translateY(var(--chakra-translate-y, 0))",...c].join(" "):"auto-gpu"===e?["translate3d(var(--chakra-translate-x, 0), var(--chakra-translate-y, 0), 0)",...c].join(" "):e,vh:e=>"$100vh"===e?"var(--chakra-vh)":e,px(e){if(null==e)return e;let{unitless:t}=analyzeCSSValue(e);return t||"number"==typeof e?`${e}px`:e},fraction:e=>"number"!=typeof e||e>1?e:`${100*e}%`,float:(e,t)=>"rtl"===t.direction?({left:"right",right:"left"})[e]:e,degree(e){if(/^var\(--.+\)$/.test(e)||null==e)return e;let t="string"==typeof e&&!e.endsWith("deg");return"number"==typeof e||t?`${e}deg`:e},gradient:(e,t)=>(function(e,t){if(null==e||m.has(e))return e;let n=isCSSFunction(e)||m.has(e);if(!n)return`url('${e}')`;let o=/(^[a-z-A-Z]+)\((.*)\)/g.exec(e),a=o?.[1],s=o?.[2];if(!a||!s)return e;let c=a.includes("-gradient")?a:`${a}-gradient`,[l,...u]=s.split(",").map(trimSpace).filter(Boolean);if(u?.length===0)return e;let h=l in p?p[l]:l;u.unshift(h);let g=u.map(e=>{if(f.has(e))return e;let n=e.indexOf(" "),[o,a]=-1!==n?[e.substr(0,n),e.substr(n+1)]:[e],s=isCSSFunction(a)?a:a&&a.split(" "),c=`colors.${o}`,l=c in t.__cssMap?t.__cssMap[c].varRef:o;return s?[l,...Array.isArray(s)?s:[s]].join(" "):l});return`${c}(${g.join(", ")})`})(e,t??{}),blur:wrap("blur"),opacity:wrap("opacity"),brightness:wrap("brightness"),contrast:wrap("contrast"),dropShadow:wrap("drop-shadow"),grayscale:wrap("grayscale"),hueRotate:e=>wrap("hue-rotate")(g.degree(e)),invert:wrap("invert"),saturate:wrap("saturate"),sepia:wrap("sepia"),bgImage(e){if(null==e)return e;let t=isCSSFunction(e)||m.has(e);return t?e:`url(${e})`},outline(e){let t="0"===String(e)||"none"===String(e);return null!==e&&t?{outline:"2px solid transparent",outlineOffset:"2px"}:{outline:e}},flexDirection(e){let{space:t,divide:n}=h[e]??{},o={flexDirection:e};return t&&(o[t]=1),n&&(o[n]=1),o}},y={borderWidths:toConfig("borderWidths"),borderStyles:toConfig("borderStyles"),colors:toConfig("colors"),borders:toConfig("borders"),gradients:toConfig("gradients",g.gradient),radii:toConfig("radii",g.px),space:toConfig("space",pipe(g.vh,g.px)),spaceT:toConfig("space",pipe(g.vh,g.px)),degreeT:e=>({property:e,transform:g.degree}),prop:(e,t,n)=>({property:e,scale:t,...t&&{transform:createTransform({scale:t,transform:n})}}),propT:(e,t)=>({property:e,transform:t}),sizes:toConfig("sizes",pipe(g.vh,g.px)),sizesT:toConfig("sizes",pipe(g.vh,g.fraction)),shadows:toConfig("shadows"),logical:function(e){let{property:t,scale:n,transform:o}=e;return{scale:n,property:getRtl(t),transform:n?createTransform({scale:n,compose:o}):o}},blur:toConfig("blur",g.blur)},v={background:y.colors("background"),backgroundColor:y.colors("backgroundColor"),backgroundImage:y.gradients("backgroundImage"),backgroundSize:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundAttachment:!0,backgroundClip:{transform:g.bgClip},bgSize:y.prop("backgroundSize"),bgPosition:y.prop("backgroundPosition"),bg:y.colors("background"),bgColor:y.colors("backgroundColor"),bgPos:y.prop("backgroundPosition"),bgRepeat:y.prop("backgroundRepeat"),bgAttachment:y.prop("backgroundAttachment"),bgGradient:y.gradients("backgroundImage"),bgClip:{transform:g.bgClip}};Object.assign(v,{bgImage:v.backgroundImage,bgImg:v.backgroundImage});let b={border:y.borders("border"),borderWidth:y.borderWidths("borderWidth"),borderStyle:y.borderStyles("borderStyle"),borderColor:y.colors("borderColor"),borderRadius:y.radii("borderRadius"),borderTop:y.borders("borderTop"),borderBlockStart:y.borders("borderBlockStart"),borderTopLeftRadius:y.radii("borderTopLeftRadius"),borderStartStartRadius:y.logical({scale:"radii",property:{ltr:"borderTopLeftRadius",rtl:"borderTopRightRadius"}}),borderEndStartRadius:y.logical({scale:"radii",property:{ltr:"borderBottomLeftRadius",rtl:"borderBottomRightRadius"}}),borderTopRightRadius:y.radii("borderTopRightRadius"),borderStartEndRadius:y.logical({scale:"radii",property:{ltr:"borderTopRightRadius",rtl:"borderTopLeftRadius"}}),borderEndEndRadius:y.logical({scale:"radii",property:{ltr:"borderBottomRightRadius",rtl:"borderBottomLeftRadius"}}),borderRight:y.borders("borderRight"),borderInlineEnd:y.borders("borderInlineEnd"),borderBottom:y.borders("borderBottom"),borderBlockEnd:y.borders("borderBlockEnd"),borderBottomLeftRadius:y.radii("borderBottomLeftRadius"),borderBottomRightRadius:y.radii("borderBottomRightRadius"),borderLeft:y.borders("borderLeft"),borderInlineStart:{property:"borderInlineStart",scale:"borders"},borderInlineStartRadius:y.logical({scale:"radii",property:{ltr:["borderTopLeftRadius","borderBottomLeftRadius"],rtl:["borderTopRightRadius","borderBottomRightRadius"]}}),borderInlineEndRadius:y.logical({scale:"radii",property:{ltr:["borderTopRightRadius","borderBottomRightRadius"],rtl:["borderTopLeftRadius","borderBottomLeftRadius"]}}),borderX:y.borders(["borderLeft","borderRight"]),borderInline:y.borders("borderInline"),borderY:y.borders(["borderTop","borderBottom"]),borderBlock:y.borders("borderBlock"),borderTopWidth:y.borderWidths("borderTopWidth"),borderBlockStartWidth:y.borderWidths("borderBlockStartWidth"),borderTopColor:y.colors("borderTopColor"),borderBlockStartColor:y.colors("borderBlockStartColor"),borderTopStyle:y.borderStyles("borderTopStyle"),borderBlockStartStyle:y.borderStyles("borderBlockStartStyle"),borderBottomWidth:y.borderWidths("borderBottomWidth"),borderBlockEndWidth:y.borderWidths("borderBlockEndWidth"),borderBottomColor:y.colors("borderBottomColor"),borderBlockEndColor:y.colors("borderBlockEndColor"),borderBottomStyle:y.borderStyles("borderBottomStyle"),borderBlockEndStyle:y.borderStyles("borderBlockEndStyle"),borderLeftWidth:y.borderWidths("borderLeftWidth"),borderInlineStartWidth:y.borderWidths("borderInlineStartWidth"),borderLeftColor:y.colors("borderLeftColor"),borderInlineStartColor:y.colors("borderInlineStartColor"),borderLeftStyle:y.borderStyles("borderLeftStyle"),borderInlineStartStyle:y.borderStyles("borderInlineStartStyle"),borderRightWidth:y.borderWidths("borderRightWidth"),borderInlineEndWidth:y.borderWidths("borderInlineEndWidth"),borderRightColor:y.colors("borderRightColor"),borderInlineEndColor:y.colors("borderInlineEndColor"),borderRightStyle:y.borderStyles("borderRightStyle"),borderInlineEndStyle:y.borderStyles("borderInlineEndStyle"),borderTopRadius:y.radii(["borderTopLeftRadius","borderTopRightRadius"]),borderBottomRadius:y.radii(["borderBottomLeftRadius","borderBottomRightRadius"]),borderLeftRadius:y.radii(["borderTopLeftRadius","borderBottomLeftRadius"]),borderRightRadius:y.radii(["borderTopRightRadius","borderBottomRightRadius"])};Object.assign(b,{rounded:b.borderRadius,roundedTop:b.borderTopRadius,roundedTopLeft:b.borderTopLeftRadius,roundedTopRight:b.borderTopRightRadius,roundedTopStart:b.borderStartStartRadius,roundedTopEnd:b.borderStartEndRadius,roundedBottom:b.borderBottomRadius,roundedBottomLeft:b.borderBottomLeftRadius,roundedBottomRight:b.borderBottomRightRadius,roundedBottomStart:b.borderEndStartRadius,roundedBottomEnd:b.borderEndEndRadius,roundedLeft:b.borderLeftRadius,roundedRight:b.borderRightRadius,roundedStart:b.borderInlineStartRadius,roundedEnd:b.borderInlineEndRadius,borderStart:b.borderInlineStart,borderEnd:b.borderInlineEnd,borderTopStartRadius:b.borderStartStartRadius,borderTopEndRadius:b.borderStartEndRadius,borderBottomStartRadius:b.borderEndStartRadius,borderBottomEndRadius:b.borderEndEndRadius,borderStartRadius:b.borderInlineStartRadius,borderEndRadius:b.borderInlineEndRadius,borderStartWidth:b.borderInlineStartWidth,borderEndWidth:b.borderInlineEndWidth,borderStartColor:b.borderInlineStartColor,borderEndColor:b.borderInlineEndColor,borderStartStyle:b.borderInlineStartStyle,borderEndStyle:b.borderInlineEndStyle});let C={color:y.colors("color"),textColor:y.colors("color"),fill:y.colors("fill"),stroke:y.colors("stroke"),accentColor:y.colors("accentColor"),textFillColor:y.colors("textFillColor")},_={alignItems:!0,alignContent:!0,justifyItems:!0,justifyContent:!0,flexWrap:!0,flexDirection:{transform:g.flexDirection},flex:!0,flexFlow:!0,flexGrow:!0,flexShrink:!0,flexBasis:y.sizes("flexBasis"),justifySelf:!0,alignSelf:!0,order:!0,placeItems:!0,placeContent:!0,placeSelf:!0,gap:y.space("gap"),rowGap:y.space("rowGap"),columnGap:y.space("columnGap")};Object.assign(_,{flexDir:_.flexDirection});let w={width:y.sizesT("width"),inlineSize:y.sizesT("inlineSize"),height:y.sizes("height"),blockSize:y.sizes("blockSize"),boxSize:y.sizes(["width","height"]),minWidth:y.sizes("minWidth"),minInlineSize:y.sizes("minInlineSize"),minHeight:y.sizes("minHeight"),minBlockSize:y.sizes("minBlockSize"),maxWidth:y.sizes("maxWidth"),maxInlineSize:y.sizes("maxInlineSize"),maxHeight:y.sizes("maxHeight"),maxBlockSize:y.sizes("maxBlockSize"),overflow:!0,overflowX:!0,overflowY:!0,overscrollBehavior:!0,overscrollBehaviorX:!0,overscrollBehaviorY:!0,display:!0,aspectRatio:!0,hideFrom:{scale:"breakpoints",transform:(e,t)=>{let n=t.__breakpoints?.get(e)?.minW??e,o=`@media screen and (min-width: ${n})`;return{[o]:{display:"none"}}}},hideBelow:{scale:"breakpoints",transform:(e,t)=>{let n=t.__breakpoints?.get(e)?._minW??e,o=`@media screen and (max-width: ${n})`;return{[o]:{display:"none"}}}},verticalAlign:!0,boxSizing:!0,boxDecorationBreak:!0,float:y.propT("float",g.float),objectFit:!0,objectPosition:!0,visibility:!0,isolation:!0};Object.assign(w,{w:w.width,h:w.height,minW:w.minWidth,maxW:w.maxWidth,minH:w.minHeight,maxH:w.maxHeight,overscroll:w.overscrollBehavior,overscrollX:w.overscrollBehaviorX,overscrollY:w.overscrollBehaviorY});let S={filter:{transform:g.filter},blur:y.blur("--chakra-blur"),brightness:y.propT("--chakra-brightness",g.brightness),contrast:y.propT("--chakra-contrast",g.contrast),hueRotate:y.propT("--chakra-hue-rotate",g.hueRotate),invert:y.propT("--chakra-invert",g.invert),saturate:y.propT("--chakra-saturate",g.saturate),dropShadow:y.propT("--chakra-drop-shadow",g.dropShadow),backdropFilter:{transform:g.backdropFilter},backdropBlur:y.blur("--chakra-backdrop-blur"),backdropBrightness:y.propT("--chakra-backdrop-brightness",g.brightness),backdropContrast:y.propT("--chakra-backdrop-contrast",g.contrast),backdropHueRotate:y.propT("--chakra-backdrop-hue-rotate",g.hueRotate),backdropInvert:y.propT("--chakra-backdrop-invert",g.invert),backdropSaturate:y.propT("--chakra-backdrop-saturate",g.saturate)},E={ring:{transform:g.ring},ringColor:y.colors("--chakra-ring-color"),ringOffset:y.prop("--chakra-ring-offset-width"),ringOffsetColor:y.colors("--chakra-ring-offset-color"),ringInset:y.prop("--chakra-ring-inset")},T={appearance:!0,cursor:!0,resize:!0,userSelect:!0,pointerEvents:!0,outline:{transform:g.outline},outlineOffset:!0,outlineColor:y.colors("outlineColor")},k={gridGap:y.space("gridGap"),gridColumnGap:y.space("gridColumnGap"),gridRowGap:y.space("gridRowGap"),gridColumn:!0,gridRow:!0,gridAutoFlow:!0,gridAutoColumns:!0,gridColumnStart:!0,gridColumnEnd:!0,gridRowStart:!0,gridRowEnd:!0,gridAutoRows:!0,gridTemplate:!0,gridTemplateColumns:!0,gridTemplateRows:!0,gridTemplateAreas:!0,gridArea:!0},I=(e=>{let t=new WeakMap;return(n,o,a,s)=>{if(void 0===n)return e(n,o,a);t.has(n)||t.set(n,new Map);let c=t.get(n);if(c.has(o))return c.get(o);let l=e(n,o,a,s);return c.set(o,l),l}})(function(e,t,n,o){let a="string"==typeof t?t.split("."):[t];for(o=0;o<a.length&&e;o+=1)e=e[a[o]];return void 0===e?n:e}),x={border:"0px",clip:"rect(0, 0, 0, 0)",width:"1px",height:"1px",margin:"-1px",padding:"0px",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},R={position:"static",width:"auto",height:"auto",clip:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal"},getWithPriority=(e,t,n)=>{let o={},a=I(e,t,{});for(let e in a){let t=e in n&&null!=n[e];t||(o[e]=a[e])}return o},P={position:!0,pos:y.prop("position"),zIndex:y.prop("zIndex","zIndices"),inset:y.spaceT("inset"),insetX:y.spaceT(["left","right"]),insetInline:y.spaceT("insetInline"),insetY:y.spaceT(["top","bottom"]),insetBlock:y.spaceT("insetBlock"),top:y.spaceT("top"),insetBlockStart:y.spaceT("insetBlockStart"),bottom:y.spaceT("bottom"),insetBlockEnd:y.spaceT("insetBlockEnd"),left:y.spaceT("left"),insetInlineStart:y.logical({scale:"space",property:{ltr:"left",rtl:"right"}}),right:y.spaceT("right"),insetInlineEnd:y.logical({scale:"space",property:{ltr:"right",rtl:"left"}})};Object.assign(P,{insetStart:P.insetInlineStart,insetEnd:P.insetInlineEnd});let M={boxShadow:y.shadows("boxShadow"),mixBlendMode:!0,blendMode:y.prop("mixBlendMode"),backgroundBlendMode:!0,bgBlendMode:y.prop("backgroundBlendMode"),opacity:!0};Object.assign(M,{shadow:M.boxShadow});let O={margin:y.spaceT("margin"),marginTop:y.spaceT("marginTop"),marginBlockStart:y.spaceT("marginBlockStart"),marginRight:y.spaceT("marginRight"),marginInlineEnd:y.spaceT("marginInlineEnd"),marginBottom:y.spaceT("marginBottom"),marginBlockEnd:y.spaceT("marginBlockEnd"),marginLeft:y.spaceT("marginLeft"),marginInlineStart:y.spaceT("marginInlineStart"),marginX:y.spaceT(["marginInlineStart","marginInlineEnd"]),marginInline:y.spaceT("marginInline"),marginY:y.spaceT(["marginTop","marginBottom"]),marginBlock:y.spaceT("marginBlock"),padding:y.space("padding"),paddingTop:y.space("paddingTop"),paddingBlockStart:y.space("paddingBlockStart"),paddingRight:y.space("paddingRight"),paddingBottom:y.space("paddingBottom"),paddingBlockEnd:y.space("paddingBlockEnd"),paddingLeft:y.space("paddingLeft"),paddingInlineStart:y.space("paddingInlineStart"),paddingInlineEnd:y.space("paddingInlineEnd"),paddingX:y.space(["paddingInlineStart","paddingInlineEnd"]),paddingInline:y.space("paddingInline"),paddingY:y.space(["paddingTop","paddingBottom"]),paddingBlock:y.space("paddingBlock")};Object.assign(O,{m:O.margin,mt:O.marginTop,mr:O.marginRight,me:O.marginInlineEnd,marginEnd:O.marginInlineEnd,mb:O.marginBottom,ml:O.marginLeft,ms:O.marginInlineStart,marginStart:O.marginInlineStart,mx:O.marginX,my:O.marginY,p:O.padding,pt:O.paddingTop,py:O.paddingY,px:O.paddingX,pb:O.paddingBottom,pl:O.paddingLeft,ps:O.paddingInlineStart,paddingStart:O.paddingInlineStart,pr:O.paddingRight,pe:O.paddingInlineEnd,paddingEnd:O.paddingInlineEnd});let L={scrollBehavior:!0,scrollSnapAlign:!0,scrollSnapStop:!0,scrollSnapType:!0,scrollMargin:y.spaceT("scrollMargin"),scrollMarginTop:y.spaceT("scrollMarginTop"),scrollMarginBottom:y.spaceT("scrollMarginBottom"),scrollMarginLeft:y.spaceT("scrollMarginLeft"),scrollMarginRight:y.spaceT("scrollMarginRight"),scrollMarginX:y.spaceT(["scrollMarginLeft","scrollMarginRight"]),scrollMarginY:y.spaceT(["scrollMarginTop","scrollMarginBottom"]),scrollPadding:y.spaceT("scrollPadding"),scrollPaddingTop:y.spaceT("scrollPaddingTop"),scrollPaddingBottom:y.spaceT("scrollPaddingBottom"),scrollPaddingLeft:y.spaceT("scrollPaddingLeft"),scrollPaddingRight:y.spaceT("scrollPaddingRight"),scrollPaddingX:y.spaceT(["scrollPaddingLeft","scrollPaddingRight"]),scrollPaddingY:y.spaceT(["scrollPaddingTop","scrollPaddingBottom"])},U={fontFamily:y.prop("fontFamily","fonts"),fontSize:y.prop("fontSize","fontSizes",g.px),fontWeight:y.prop("fontWeight","fontWeights"),lineHeight:y.prop("lineHeight","lineHeights"),letterSpacing:y.prop("letterSpacing","letterSpacings"),textAlign:!0,fontStyle:!0,textIndent:!0,wordBreak:!0,overflowWrap:!0,textOverflow:!0,textTransform:!0,whiteSpace:!0,isTruncated:{transform(e){if(!0===e)return{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}},noOfLines:{static:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:"var(--chakra-line-clamp)"},property:"--chakra-line-clamp"}},q={textDecorationColor:y.colors("textDecorationColor"),textDecoration:!0,textDecor:{property:"textDecoration"},textDecorationLine:!0,textDecorationStyle:!0,textDecorationThickness:!0,textUnderlineOffset:!0,textShadow:y.shadows("textShadow")},H={clipPath:!0,transform:y.propT("transform",g.transform),transformOrigin:!0,translateX:y.spaceT("--chakra-translate-x"),translateY:y.spaceT("--chakra-translate-y"),skewX:y.degreeT("--chakra-skew-x"),skewY:y.degreeT("--chakra-skew-y"),scaleX:y.prop("--chakra-scale-x"),scaleY:y.prop("--chakra-scale-y"),scale:y.prop(["--chakra-scale-x","--chakra-scale-y"]),rotate:y.degreeT("--chakra-rotate")},V={listStyleType:!0,listStylePosition:!0,listStylePos:y.prop("listStylePosition"),listStyleImage:!0,listStyleImg:y.prop("listStyleImage")},G={transition:!0,transitionDelay:!0,animation:!0,willChange:!0,transitionDuration:y.prop("transitionDuration","transition.duration"),transitionProperty:y.prop("transitionProperty","transition.property"),transitionTimingFunction:y.prop("transitionTimingFunction","transition.easing")},K=o({},v,b,C,_,w,S,E,T,k,{srOnly:{transform:e=>!0===e?x:"focusable"===e?R:{}},layerStyle:{processResult:!0,transform:(e,t,n)=>getWithPriority(t,`layerStyles.${e}`,n)},textStyle:{processResult:!0,transform:(e,t,n)=>getWithPriority(t,`textStyles.${e}`,n)},apply:{processResult:!0,transform:(e,t,n)=>getWithPriority(t,e,n)}},P,M,O,L,U,q,H,V,G),$=Object.assign({},O,w,_,k,P),J=Object.keys($),Y=[...Object.keys(K),...a._],X={...K,...a.v},isStyleProp=e=>e in X},2454:function(e,t,n){"use strict";n.d(t,{L:function(){return omitThemingProps}});var o=n(2044);function omitThemingProps(e){return(0,o.C)(e,["styleConfig","size","variant","colorScheme"])}},5792:function(e,t,n){"use strict";n.d(t,{P:function(){return dataAttr},Q:function(){return ariaAttr}});let dataAttr=e=>e?"":void 0,ariaAttr=e=>!!e||void 0},7506:function(e,t,n){"use strict";n.d(t,{Y:function(){return toMediaQueryString},y:function(){return analyzeBreakpoints}});var o=n(9791);function px(e){if(null==e)return e;let{unitless:t}=function(e){let t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}}(e);return t||"number"==typeof e?`${e}px`:e}let sortByBreakpointValue=(e,t)=>parseInt(e[1],10)>parseInt(t[1],10)?1:-1,sortBps=e=>Object.fromEntries(Object.entries(e).sort(sortByBreakpointValue));function normalize(e){let t=sortBps(e);return Object.assign(Object.values(t),t)}function subtract(e){return e?"number"==typeof(e=px(e)??e)?`${e+-.02}`:e.replace(/(\d+\.?\d*)/u,e=>`${parseFloat(e)+-.02}`):e}function toMediaQueryString(e,t){let n=["@media screen"];return e&&n.push("and",`(min-width: ${px(e)})`),t&&n.push("and",`(max-width: ${px(t)})`),n.join(" ")}function analyzeBreakpoints(e){if(!e)return null;e.base=e.base??"0px";let t=normalize(e),n=Object.entries(e).sort(sortByBreakpointValue).map(([e,t],n,o)=>{let[,a]=o[n+1]??[];return a=parseFloat(a)>0?subtract(a):void 0,{_minW:subtract(t),breakpoint:e,minW:t,maxW:a,maxWQuery:toMediaQueryString(null,a),minWQuery:toMediaQueryString(t),minMaxQuery:toMediaQueryString(t,a)}}),a=function(e){let t=Object.keys(sortBps(e));return new Set(t)}(e),s=Array.from(a.values());return{keys:a,normalized:t,isResponsive(e){let t=Object.keys(e);return t.length>0&&t.every(e=>a.has(e))},asObject:sortBps(e),asArray:normalize(e),details:n,get:e=>n.find(t=>t.breakpoint===e),media:[null,...t.map(e=>toMediaQueryString(e)).slice(1)],toArrayValue(e){if(!(0,o.Kn)(e))throw Error("toArrayValue: value must be an object");let t=s.map(t=>e[t]??null);for(;null===function(e){let t=null==e?0:e.length;return t?e[t-1]:void 0}(t);)t.pop();return t},toObjectValue(e){if(!Array.isArray(e))throw Error("toObjectValue: value must be an array");return e.reduce((e,t,n)=>{let o=s[n];return null!=o&&null!=t&&(e[o]=t),e},{})}}}},7006:function(e,t,n){"use strict";function callAll(...e){return function(...t){e.forEach(e=>e?.(...t))}}function callAllHandlers(...e){return function(t){e.some(e=>(e?.(t),t?.defaultPrevented))}}n.d(t,{P:function(){return callAll},v:function(){return callAllHandlers}})},9846:function(e,t,n){"use strict";n.d(t,{W:function(){return getValidChildren}});var o=n(2784);function getValidChildren(e){return o.Children.toArray(e).filter(e=>(0,o.isValidElement)(e))}},5154:function(e,t,n){"use strict";function compact(e){let t=Object.assign({},e);for(let e in t)void 0===t[e]&&delete t[e];return t}n.d(t,{o:function(){return compact}})},3167:function(e,t,n){"use strict";n.d(t,{k:function(){return createContext}});var o=n(2784);function createContext(e={}){let{name:t,strict:n=!0,hookName:a="useContext",providerName:s="Provider",errorMessage:c,defaultValue:l}=e,u=(0,o.createContext)(l);return u.displayName=t,[u.Provider,function useContext$1(){let e=(0,o.useContext)(u);if(!e&&n){let e=Error(c??`${a} returned \`undefined\`. Seems you forgot to wrap component within ${s}`);throw e.name="ContextError",Error.captureStackTrace?.(e,useContext$1),e}return e},u]}},3112:function(e,t,n){"use strict";n.d(t,{cx:function(){return cx}});let cx=(...e)=>e.filter(Boolean).join(" ")},1400:function(e,t,n){"use strict";n.d(t,{W:function(){return o}});let o=(e=>{let t=new WeakMap;return(n,o,a,s)=>{if(void 0===n)return e(n,o,a);t.has(n)||t.set(n,new Map);let c=t.get(n);if(c.has(o))return c.get(o);let l=e(n,o,a,s);return c.set(o,l),l}})(function(e,t,n,o){let a="string"==typeof t?t.split("."):[t];for(o=0;o<a.length&&e;o+=1)e=e[a[o]];return void 0===e?n:e})},3543:function(e,t,n){"use strict";function isHTMLElement(e){return null!=e&&"object"==typeof e&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function isBrowser(){return!!globalThis?.document}function isContentEditableElement(e){let t=e.getAttribute("contenteditable");return"false"!==t&&null!=t}function isDisabledElement(e){return!0==!!e.getAttribute("disabled")||!0==!!e.getAttribute("aria-disabled")}n.d(t,{Re:function(){return isHTMLElement},iU:function(){return isContentEditableElement},jU:function(){return isBrowser},nV:function(){return isDisabledElement},oI:function(){return function isHiddenElement(e){return!!(e.parentElement&&isHiddenElement(e.parentElement))||e.hidden}}})},9791:function(e,t,n){"use strict";function isArray(e){return Array.isArray(e)}function isObject(e){let t=typeof e;return null!=e&&("object"===t||"function"===t)&&!isArray(e)}n.d(t,{Kn:function(){return isObject},kJ:function(){return isArray}})},2044:function(e,t,n){"use strict";function omit(e,t=[]){let n=Object.assign({},e);for(let e of t)e in n&&delete n[e];return n}n.d(t,{C:function(){return omit}})},2619:function(e,t,n){"use strict";function pick(e,t){let n={};for(let o of t)o in e&&(n[o]=e[o]);return n}n.d(t,{e:function(){return pick}})},4966:function(e,t,n){"use strict";n.d(t,{XQ:function(){return mapResponsive}});var o=n(9791);function mapResponsive(e,t){return Array.isArray(e)?e.map(e=>null===e?null:t(e)):(0,o.Kn)(e)?Object.keys(e).reduce((n,o)=>(n[o]=t(e[o]),n),{}):null!=e?t(e):null}Object.freeze(["base","sm","md","lg","xl","2xl"])},798:function(e,t,n){"use strict";n.d(t,{P:function(){return runIfFn}});let isFunction=e=>"function"==typeof e;function runIfFn(e,...t){return isFunction(e)?e(...t):e}},3429:function(e,t,n){"use strict";function isArray(e){return Array.isArray(e)}function isFunction(e){return"function"==typeof e}function isDefined(e){return void 0!==e&&void 0!==e}function isUndefined(e){return void 0===e||void 0===e}function isObject(e){let t=typeof e;return null!=e&&("object"===t||"function"===t)&&!isArray(e)}function isEmpty(e){return isArray(e)?isArray(e)&&0===e.length:isObject(e)?isObject(e)&&0===Object.keys(e).length:null==e||""===e}n.d(t,{$K:function(){return isDefined},Kn:function(){return isObject},mf:function(){return isFunction},o8:function(){return isUndefined},xb:function(){return isEmpty}})},6634:function(e,t,n){"use strict";n.d(t,{M:function(){return AnimatePresence}});var o=n(2322),a=n(2784),s=n(7967),c=n(3105),l=n(976);let PopChildMeasure=class PopChildMeasure extends a.Component{getSnapshotBeforeUpdate(e){let t=this.props.childRef.current;if(t&&e.isPresent&&!this.props.isPresent){let e=this.props.sizeRef.current;e.height=t.offsetHeight||0,e.width=t.offsetWidth||0,e.top=t.offsetTop,e.left=t.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}};function PopChild({children:e,isPresent:t}){let n=(0,a.useId)(),s=(0,a.useRef)(null),c=(0,a.useRef)({width:0,height:0,top:0,left:0}),{nonce:u}=(0,a.useContext)(l._);return(0,a.useInsertionEffect)(()=>{let{width:e,height:o,top:a,left:l}=c.current;if(t||!s.current||!e||!o)return;s.current.dataset.motionPopId=n;let h=document.createElement("style");return u&&(h.nonce=u),document.head.appendChild(h),h.sheet&&h.sheet.insertRule(`
          [data-motion-pop-id="${n}"] {
            position: absolute !important;
            width: ${e}px !important;
            height: ${o}px !important;
            top: ${a}px !important;
            left: ${l}px !important;
          }
        `),()=>{document.head.removeChild(h)}},[t]),(0,o.jsx)(PopChildMeasure,{isPresent:t,childRef:s,sizeRef:c,children:a.cloneElement(e,{ref:s})})}let PresenceChild=({children:e,initial:t,isPresent:n,onExitComplete:l,custom:u,presenceAffectsLayout:h,mode:p})=>{let f=(0,c.h)(newChildrenMap),m=(0,a.useId)(),g=(0,a.useCallback)(e=>{for(let t of(f.set(e,!0),f.values()))if(!t)return;l&&l()},[f,l]),y=(0,a.useMemo)(()=>({id:m,initial:t,isPresent:n,custom:u,onExitComplete:g,register:e=>(f.set(e,!1),()=>f.delete(e))}),h?[Math.random(),g]:[n,g]);return(0,a.useMemo)(()=>{f.forEach((e,t)=>f.set(t,!1))},[n]),a.useEffect(()=>{n||f.size||!l||l()},[n]),"popLayout"===p&&(e=(0,o.jsx)(PopChild,{isPresent:n,children:e})),(0,o.jsx)(s.O.Provider,{value:y,children:e})};function newChildrenMap(){return new Map}var u=n(3422),h=n(7781);let getChildKey=e=>e.key||"";function onlyElements(e){let t=[];return a.Children.forEach(e,e=>{(0,a.isValidElement)(e)&&t.push(e)}),t}var p=n(3617);let AnimatePresence=({children:e,exitBeforeEnter:t,custom:n,initial:s=!0,onExitComplete:l,presenceAffectsLayout:f=!0,mode:m="sync"})=>{(0,h.k)(!t,"Replace exitBeforeEnter with mode='wait'");let g=(0,a.useMemo)(()=>onlyElements(e),[e]),y=g.map(getChildKey),v=(0,a.useRef)(!0),b=(0,a.useRef)(g),C=(0,c.h)(()=>new Map),[_,w]=(0,a.useState)(g),[S,E]=(0,a.useState)(g);(0,p.L)(()=>{v.current=!1,b.current=g;for(let e=0;e<S.length;e++){let t=getChildKey(S[e]);y.includes(t)?C.delete(t):!0!==C.get(t)&&C.set(t,!1)}},[S,y.length,y.join("-")]);let T=[];if(g!==_){let e=[...g];for(let t=0;t<S.length;t++){let n=S[t],o=getChildKey(n);y.includes(o)||(e.splice(t,0,n),T.push(n))}"wait"===m&&T.length&&(e=T),E(onlyElements(e)),w(g);return}let{forceRender:k}=(0,a.useContext)(u.p);return(0,o.jsx)(o.Fragment,{children:S.map(e=>{let t=getChildKey(e),a=g===S||y.includes(t);return(0,o.jsx)(PresenceChild,{isPresent:a,initial:(!v.current||!!s)&&void 0,custom:a?void 0:n,presenceAffectsLayout:f,mode:m,onExitComplete:a?void 0:()=>{if(!C.has(t))return;C.set(t,!0);let e=!0;C.forEach(t=>{t||(e=!1)}),e&&(null==k||k(),E(b.current),l&&l())},children:e},t)})})}},8175:function(e,t,n){"use strict";n.d(t,{hO:function(){return useIsPresent},oO:function(){return usePresence}});var o=n(2784),a=n(7967);function usePresence(){let e=(0,o.useContext)(a.O);if(null===e)return[!0,null];let{isPresent:t,onExitComplete:n,register:s}=e,c=(0,o.useId)();(0,o.useEffect)(()=>s(c),[]);let l=(0,o.useCallback)(()=>n&&n(c),[c,n]);return!t&&n?[!1,l]:[!0]}function useIsPresent(){var e;return null===(e=(0,o.useContext)(a.O))||e.isPresent}},3422:function(e,t,n){"use strict";n.d(t,{p:function(){return a}});var o=n(2784);let a=(0,o.createContext)({})},976:function(e,t,n){"use strict";n.d(t,{_:function(){return a}});var o=n(2784);let a=(0,o.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"})},7967:function(e,t,n){"use strict";n.d(t,{O:function(){return a}});var o=n(2784);let a=(0,o.createContext)(null)},4038:function(e,t,n){"use strict";let o;function isAnimationControls(e){return null!==e&&"object"==typeof e&&"function"==typeof e.start}n.d(t,{E:function(){return tW}});let isKeyframesTarget=e=>Array.isArray(e);function shallowCompare(e,t){if(!Array.isArray(t))return!1;let n=t.length;if(n!==e.length)return!1;for(let o=0;o<n;o++)if(t[o]!==e[o])return!1;return!0}function isVariantLabel(e){return"string"==typeof e||Array.isArray(e)}function getValueState(e){let t=[{},{}];return null==e||e.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function resolveVariantFromProps(e,t,n,o){if("function"==typeof t){let[a,s]=getValueState(o);t=t(void 0!==n?n:e.custom,a,s)}if("string"==typeof t&&(t=e.variants&&e.variants[t]),"function"==typeof t){let[a,s]=getValueState(o);t=t(void 0!==n?n:e.custom,a,s)}return t}function resolveVariant(e,t,n){let o=e.getProps();return resolveVariantFromProps(o,t,void 0!==n?n:o.custom,e)}let a=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],s=["initial",...a],c=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],l=new Set(c),time_conversion_secondsToMilliseconds=e=>1e3*e,millisecondsToSeconds=e=>e/1e3,u={type:"spring",stiffness:500,damping:25,restSpeed:10},criticallyDampedSpring=e=>({type:"spring",stiffness:550,damping:0===e?2*Math.sqrt(550):30,restSpeed:10}),h={type:"keyframes",duration:.8},p={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},getDefaultTransition=(e,{keyframes:t})=>t.length>2?h:l.has(e)?e.startsWith("scale")?criticallyDampedSpring(t[1]):u:p;function get_value_transition_getValueTransition(e,t){return e?e[t]||e.default||e:void 0}let f={skipAnimations:!1,useManualTiming:!1},m={current:!1},isNotNull=e=>null!==e;function getFinalKeyframe(e,{repeat:t,repeatType:n="loop"},o){let a=e.filter(isNotNull),s=t&&"loop"!==n&&t%2==1?0:a.length-1;return s&&void 0!==o?o:a[s]}var g,y,v,b=n(7363);let C=["read","resolveKeyframes","update","preRender","render","postRender"];function createRenderBatcher(e,t){let n=!1,o=!0,a={delta:0,timestamp:0,isProcessing:!1},flagRunNextFrame=()=>n=!0,s=C.reduce((e,t)=>(e[t]=function(e){let t=new Set,n=new Set,o=!1,a=!1,s=new WeakSet,c={delta:0,timestamp:0,isProcessing:!1};function triggerCallback(t){s.has(t)&&(l.schedule(t),e()),t(c)}let l={schedule:(e,a=!1,c=!1)=>{let l=c&&o,u=l?t:n;return a&&s.add(e),u.has(e)||u.add(e),e},cancel:e=>{n.delete(e),s.delete(e)},process:e=>{if(c=e,o){a=!0;return}o=!0,[t,n]=[n,t],n.clear(),t.forEach(triggerCallback),o=!1,a&&(a=!1,l.process(e))}};return l}(flagRunNextFrame),e),{}),{read:c,resolveKeyframes:l,update:u,preRender:h,render:p,postRender:m}=s,processBatch=()=>{let s=f.useManualTiming?a.timestamp:performance.now();n=!1,a.delta=o?1e3/60:Math.max(Math.min(s-a.timestamp,40),1),a.timestamp=s,a.isProcessing=!0,c.process(a),l.process(a),u.process(a),h.process(a),p.process(a),m.process(a),a.isProcessing=!1,n&&t&&(o=!1,e(processBatch))},wake=()=>{n=!0,o=!0,a.isProcessing||e(processBatch)},g=C.reduce((e,t)=>{let o=s[t];return e[t]=(e,t=!1,a=!1)=>(n||wake(),o.schedule(e,t,a)),e},{});return{schedule:g,cancel:e=>{for(let t=0;t<C.length;t++)s[C[t]].cancel(e)},state:a,steps:s}}let{schedule:_,cancel:w,state:S,steps:E}=createRenderBatcher("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:b.Z,!0),calcBezier=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e;function cubicBezier(e,t,n,o){if(e===t&&n===o)return b.Z;let getTForX=t=>(function(e,t,n,o,a){let s,c;let l=0;do(s=calcBezier(c=t+(n-t)/2,o,a)-e)>0?n=c:t=c;while(Math.abs(s)>1e-7&&++l<12);return c})(t,0,1,e,n);return e=>0===e||1===e?e:calcBezier(getTForX(e),t,o)}let mirrorEasing=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,reverseEasing=e=>t=>1-e(1-t),T=cubicBezier(.33,1.53,.69,.99),k=reverseEasing(T),I=mirrorEasing(k),anticipate=e=>(e*=2)<1?.5*k(e):.5*(2-Math.pow(2,-10*(e-1))),circIn=e=>1-Math.sin(Math.acos(e)),x=reverseEasing(circIn),R=mirrorEasing(circIn),isZeroValueString=e=>/^0[^.\s]+$/u.test(e);var P=n(7781);let isNumericalString=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),checkStringStartsWith=e=>t=>"string"==typeof t&&t.startsWith(e),M=checkStringStartsWith("--"),O=checkStringStartsWith("var(--"),isCSSVariableToken=e=>{let t=O(e);return!!t&&L.test(e.split("/*")[0].trim())},L=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,U=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u,clamp=(e,t,n)=>n>t?t:n<e?e:n,q={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},H={...q,transform:e=>clamp(0,1,e)},V={...q,default:1},createUnitType=e=>({test:t=>"string"==typeof t&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),G=createUnitType("deg"),K=createUnitType("%"),$=createUnitType("px"),J=createUnitType("vh"),Y=createUnitType("vw"),X={...K,parse:e=>K.parse(e)/100,transform:e=>K.transform(100*e)},et=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),isNumOrPxType=e=>e===q||e===$,getPosFromMatrix=(e,t)=>parseFloat(e.split(", ")[t]),getTranslateFromMatrix=(e,t)=>(n,{transform:o})=>{if("none"===o||!o)return 0;let a=o.match(/^matrix3d\((.+)\)$/u);if(a)return getPosFromMatrix(a[1],t);{let t=o.match(/^matrix\((.+)\)$/u);return t?getPosFromMatrix(t[1],e):0}},er=new Set(["x","y","z"]),en=c.filter(e=>!er.has(e)),eo={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:getTranslateFromMatrix(4,13),y:getTranslateFromMatrix(5,14)};eo.translateX=eo.x,eo.translateY=eo.y;let testValueType=e=>t=>t.test(e),ei=[q,$,K,G,Y,J,{test:e=>"auto"===e,parse:e=>e}],findDimensionValueType=e=>ei.find(testValueType(e)),ea=new Set,es=!1,ec=!1;function measureAllKeyframes(){if(ec){let e=Array.from(ea).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;t.forEach(e=>{let t=function(e){let t=[];return en.forEach(n=>{let o=e.getValue(n);void 0!==o&&(t.push([n,o.get()]),o.set(n.startsWith("scale")?1:0))}),t}(e);t.length&&(n.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();let t=n.get(e);t&&t.forEach(([t,n])=>{var o;null===(o=e.getValue(t))||void 0===o||o.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{void 0!==e.suspendedScrollY&&window.scrollTo(0,e.suspendedScrollY)})}ec=!1,es=!1,ea.forEach(e=>e.complete()),ea.clear()}function readAllKeyframes(){ea.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(ec=!0)})}let KeyframeResolver=class KeyframeResolver{constructor(e,t,n,o,a,s=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=o,this.element=a,this.isAsync=s}scheduleResolve(){this.isScheduled=!0,this.isAsync?(ea.add(this),es||(es=!0,_.read(readAllKeyframes),_.resolveKeyframes(measureAllKeyframes))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:t,element:n,motionValue:o}=this;for(let a=0;a<e.length;a++)if(null===e[a]){if(0===a){let a=null==o?void 0:o.get(),s=e[e.length-1];if(void 0!==a)e[0]=a;else if(n&&t){let o=n.readValue(t,s);null!=o&&(e[0]=o)}void 0===e[0]&&(e[0]=s),o&&void 0===a&&o.set(e[0])}else e[a]=e[a-1]}}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),ea.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,ea.delete(this))}resume(){this.isComplete||this.scheduleResolve()}};let sanitize=e=>Math.round(1e5*e)/1e5,el=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,eu=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,isColorString=(e,t)=>n=>!!("string"==typeof n&&eu.test(n)&&n.startsWith(e)||t&&null!=n&&Object.prototype.hasOwnProperty.call(n,t)),splitColor=(e,t,n)=>o=>{if("string"!=typeof o)return o;let[a,s,c,l]=o.match(el);return{[e]:parseFloat(a),[t]:parseFloat(s),[n]:parseFloat(c),alpha:void 0!==l?parseFloat(l):1}},clampRgbUnit=e=>clamp(0,255,e),ed={...q,transform:e=>Math.round(clampRgbUnit(e))},eh={test:isColorString("rgb","red"),parse:splitColor("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:o=1})=>"rgba("+ed.transform(e)+", "+ed.transform(t)+", "+ed.transform(n)+", "+sanitize(H.transform(o))+")"},ep={test:isColorString("#"),parse:function(e){let t="",n="",o="",a="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),o=e.substring(5,7),a=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),o=e.substring(3,4),a=e.substring(4,5),t+=t,n+=n,o+=o,a+=a),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(o,16),alpha:a?parseInt(a,16)/255:1}},transform:eh.transform},ef={test:isColorString("hsl","hue"),parse:splitColor("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:o=1})=>"hsla("+Math.round(e)+", "+K.transform(sanitize(t))+", "+K.transform(sanitize(n))+", "+sanitize(H.transform(o))+")"},em={test:e=>eh.test(e)||ep.test(e)||ef.test(e),parse:e=>eh.test(e)?eh.parse(e):ef.test(e)?ef.parse(e):ep.parse(e),transform:e=>"string"==typeof e?e:e.hasOwnProperty("red")?eh.transform(e):ef.transform(e)},eg=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,ey="number",ev="color",eb=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function analyseComplexValue(e){let t=e.toString(),n=[],o={color:[],number:[],var:[]},a=[],s=0,c=t.replace(eb,e=>(em.test(e)?(o.color.push(s),a.push(ev),n.push(em.parse(e))):e.startsWith("var(")?(o.var.push(s),a.push("var"),n.push(e)):(o.number.push(s),a.push(ey),n.push(parseFloat(e))),++s,"${}")),l=c.split("${}");return{values:n,split:l,indexes:o,types:a}}function parseComplexValue(e){return analyseComplexValue(e).values}function createTransformer(e){let{split:t,types:n}=analyseComplexValue(e),o=t.length;return e=>{let a="";for(let s=0;s<o;s++)if(a+=t[s],void 0!==e[s]){let t=n[s];t===ey?a+=sanitize(e[s]):t===ev?a+=em.transform(e[s]):a+=e[s]}return a}}let convertNumbersToZero=e=>"number"==typeof e?0:e,eC={test:function(e){var t,n;return isNaN(e)&&"string"==typeof e&&((null===(t=e.match(el))||void 0===t?void 0:t.length)||0)+((null===(n=e.match(eg))||void 0===n?void 0:n.length)||0)>0},parse:parseComplexValue,createTransformer,getAnimatableNone:function(e){let t=parseComplexValue(e),n=createTransformer(e);return n(t.map(convertNumbersToZero))}},e_=new Set(["brightness","contrast","saturate","opacity"]);function applyDefaultFilter(e){let[t,n]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;let[o]=n.match(el)||[];if(!o)return e;let a=n.replace(o,""),s=e_.has(t)?1:0;return o!==n&&(s*=100),t+"("+s+a+")"}let ew=/\b([a-z-]*)\(.*?\)/gu,eS={...eC,getAnimatableNone:e=>{let t=e.match(ew);return t?t.map(applyDefaultFilter).join(" "):e}},eE={...q,transform:Math.round},eT={borderWidth:$,borderTopWidth:$,borderRightWidth:$,borderBottomWidth:$,borderLeftWidth:$,borderRadius:$,radius:$,borderTopLeftRadius:$,borderTopRightRadius:$,borderBottomRightRadius:$,borderBottomLeftRadius:$,width:$,maxWidth:$,height:$,maxHeight:$,top:$,right:$,bottom:$,left:$,padding:$,paddingTop:$,paddingRight:$,paddingBottom:$,paddingLeft:$,margin:$,marginTop:$,marginRight:$,marginBottom:$,marginLeft:$,backgroundPositionX:$,backgroundPositionY:$,rotate:G,rotateX:G,rotateY:G,rotateZ:G,scale:V,scaleX:V,scaleY:V,scaleZ:V,skew:G,skewX:G,skewY:G,distance:$,translateX:$,translateY:$,translateZ:$,x:$,y:$,z:$,perspective:$,transformPerspective:$,opacity:H,originX:X,originY:X,originZ:$,zIndex:eE,size:$,fillOpacity:H,strokeOpacity:H,numOctaves:eE},ek={...eT,color:em,backgroundColor:em,outlineColor:em,fill:em,stroke:em,borderColor:em,borderTopColor:em,borderRightColor:em,borderBottomColor:em,borderLeftColor:em,filter:eS,WebkitFilter:eS},getDefaultValueType=e=>ek[e];function animatable_none_getAnimatableNone(e,t){let n=getDefaultValueType(e);return n!==eS&&(n=eC),n.getAnimatableNone?n.getAnimatableNone(t):void 0}let eA=new Set(["auto","none","0"]);let DOMKeyframesResolver=class DOMKeyframesResolver extends KeyframeResolver{constructor(e,t,n,o,a){super(e,t,n,o,a,!0)}readKeyframes(){let{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let n=0;n<e.length;n++){let o=e[n];if("string"==typeof o&&isCSSVariableToken(o=o.trim())){let a=function getVariableValue(e,t,n=1){(0,P.k)(n<=4,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);let[o,a]=function(e){let t=U.exec(e);if(!t)return[,];let[,n,o,a]=t;return[`--${null!=n?n:o}`,a]}(e);if(!o)return;let s=window.getComputedStyle(t).getPropertyValue(o);if(s){let e=s.trim();return isNumericalString(e)?parseFloat(e):e}return isCSSVariableToken(a)?getVariableValue(a,t,n+1):a}(o,t.current);void 0!==a&&(e[n]=a),n===e.length-1&&(this.finalKeyframe=o)}}if(this.resolveNoneKeyframes(),!et.has(n)||2!==e.length)return;let[o,a]=e,s=findDimensionValueType(o),c=findDimensionValueType(a);if(s!==c){if(isNumOrPxType(s)&&isNumOrPxType(c))for(let t=0;t<e.length;t++){let n=e[t];"string"==typeof n&&(e[t]=parseFloat(n))}else this.needsMeasurement=!0}}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++){var o;("number"==typeof(o=e[t])?0===o:null===o||"none"===o||"0"===o||isZeroValueString(o))&&n.push(t)}n.length&&function(e,t,n){let o,a=0;for(;a<e.length&&!o;){let t=e[a];"string"==typeof t&&!eA.has(t)&&analyseComplexValue(t).values.length&&(o=e[a]),a++}if(o&&n)for(let a of t)e[a]=animatable_none_getAnimatableNone(n,o)}(e,n,t)}measureInitialState(){let{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=eo[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;let o=t[t.length-1];void 0!==o&&e.getValue(n,o).jump(o,!1)}measureEndState(){var e;let{element:t,name:n,unresolvedKeyframes:o}=this;if(!t||!t.current)return;let a=t.getValue(n);a&&a.jump(this.measuredOrigin,!1);let s=o.length-1,c=o[s];o[s]=eo[n](t.measureViewportBox(),window.getComputedStyle(t.current)),null!==c&&void 0===this.finalKeyframe&&(this.finalKeyframe=c),(null===(e=this.removedTransforms)||void 0===e?void 0:e.length)&&this.removedTransforms.forEach(([e,n])=>{t.getValue(e).set(n)}),this.resolveNoneKeyframes()}};function is_generator_isGenerator(e){return"function"==typeof e}function clearTime(){o=void 0}let eI={now:()=>(void 0===o&&eI.set(S.isProcessing||f.useManualTiming?S.timestamp:performance.now()),o),set:e=>{o=e,queueMicrotask(clearTime)}},isAnimatable=(e,t)=>"zIndex"!==t&&!!("number"==typeof e||Array.isArray(e)||"string"==typeof e&&(eC.test(e)||"0"===e)&&!e.startsWith("url("));let BaseAnimation=class BaseAnimation{constructor({autoplay:e=!0,delay:t=0,type:n="keyframes",repeat:o=0,repeatDelay:a=0,repeatType:s="loop",...c}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=eI.now(),this.options={autoplay:e,delay:t,type:n,repeat:o,repeatDelay:a,repeatType:s,...c},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt}get resolved(){return this._resolved||this.hasAttemptedResolve||(readAllKeyframes(),measureAllKeyframes()),this._resolved}onKeyframesResolved(e,t){this.resolvedAt=eI.now(),this.hasAttemptedResolve=!0;let{name:n,type:o,velocity:a,delay:s,onComplete:c,onUpdate:l,isGenerator:u}=this.options;if(!u&&!function(e,t,n,o){let a=e[0];if(null===a)return!1;if("display"===t||"visibility"===t)return!0;let s=e[e.length-1],c=isAnimatable(a,t),l=isAnimatable(s,t);return(0,P.K)(c===l,`You are trying to animate ${t} from "${a}" to "${s}". ${a} is not an animatable value - to enable this animation set ${a} to a value animatable to ${s} via the \`style\` property.`),!!c&&!!l&&(function(e){let t=e[0];if(1===e.length)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}(e)||("spring"===n||is_generator_isGenerator(n))&&o)}(e,n,o,a)){if(m.current||!s){null==l||l(getFinalKeyframe(e,this.options,t)),null==c||c(),this.resolveFinishedPromise();return}this.options.duration=0}let h=this.initPlayback(e,t);!1!==h&&(this._resolved={keyframes:e,finalKeyframe:t,...h},this.onPostResolved())}onPostResolved(){}then(e,t){return this.currentFinishedPromise.then(e,t)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(e=>{this.resolveFinishedPromise=e})}};let progress=(e,t,n)=>{let o=t-e;return 0===o?1:(n-e)/o},linear_generateLinearEasing=(e,t,n=10)=>{let o="",a=Math.max(Math.round(t/n),2);for(let t=0;t<a;t++)o+=e(progress(0,a-1,t))+", ";return`linear(${o.substring(0,o.length-2)})`};function calcGeneratorVelocity(e,t,n){var o,a;let s=Math.max(t-5,0);return o=n-e(s),(a=t-s)?o*(1e3/a):0}let ex={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function calcAngularFreq(e,t){return e*Math.sqrt(1-t*t)}function calcGeneratorDuration(e){let t=0,n=e.next(t);for(;!n.done&&t<2e4;)t+=50,n=e.next(t);return t>=2e4?1/0:t}let eR=["duration","bounce"],eP=["stiffness","damping","mass"];function isSpringType(e,t){return t.some(t=>void 0!==e[t])}function spring(e=ex.visualDuration,t=ex.bounce){let n;let o="object"!=typeof e?{visualDuration:e,keyframes:[0,1],bounce:t}:e,{restSpeed:a,restDelta:s}=o,c=o.keyframes[0],l=o.keyframes[o.keyframes.length-1],u={done:!1,value:c},{stiffness:h,damping:p,mass:f,duration:m,velocity:g,isResolvedFromDuration:y}=function(e){let t={velocity:ex.velocity,stiffness:ex.stiffness,damping:ex.damping,mass:ex.mass,isResolvedFromDuration:!1,...e};if(!isSpringType(e,eP)&&isSpringType(e,eR)){if(e.visualDuration){let n=e.visualDuration,o=2*Math.PI/(1.2*n),a=o*o,s=2*clamp(.05,1,1-e.bounce)*Math.sqrt(a);t={...t,mass:ex.mass,stiffness:a,damping:s}}else{let n=function({duration:e=ex.duration,bounce:t=ex.bounce,velocity:n=ex.velocity,mass:o=ex.mass}){let a,s;(0,P.K)(e<=time_conversion_secondsToMilliseconds(ex.maxDuration),"Spring duration must be 10 seconds or less");let c=1-t;c=clamp(ex.minDamping,ex.maxDamping,c),e=clamp(ex.minDuration,ex.maxDuration,millisecondsToSeconds(e)),c<1?(a=t=>{let o=t*c,a=o*e,s=calcAngularFreq(t,c),l=Math.exp(-a);return .001-(o-n)/s*l},s=t=>{let o=t*c,s=o*e,l=Math.pow(c,2)*Math.pow(t,2)*e,u=Math.exp(-s),h=calcAngularFreq(Math.pow(t,2),c),p=-a(t)+.001>0?-1:1;return p*((s*n+n-l)*u)/h}):(a=t=>{let o=Math.exp(-t*e),a=(t-n)*e+1;return -.001+o*a},s=t=>{let o=Math.exp(-t*e),a=(n-t)*(e*e);return o*a});let l=5/e,u=function(e,t,n){let o=n;for(let n=1;n<12;n++)o-=e(o)/t(o);return o}(a,s,l);if(e=time_conversion_secondsToMilliseconds(e),isNaN(u))return{stiffness:ex.stiffness,damping:ex.damping,duration:e};{let t=Math.pow(u,2)*o;return{stiffness:t,damping:2*c*Math.sqrt(o*t),duration:e}}}(e);(t={...t,...n,mass:ex.mass}).isResolvedFromDuration=!0}}return t}({...o,velocity:-millisecondsToSeconds(o.velocity||0)}),v=g||0,b=p/(2*Math.sqrt(h*f)),C=l-c,_=millisecondsToSeconds(Math.sqrt(h/f)),w=5>Math.abs(C);if(a||(a=w?ex.restSpeed.granular:ex.restSpeed.default),s||(s=w?ex.restDelta.granular:ex.restDelta.default),b<1){let e=calcAngularFreq(_,b);n=t=>{let n=Math.exp(-b*_*t);return l-n*((v+b*_*C)/e*Math.sin(e*t)+C*Math.cos(e*t))}}else if(1===b)n=e=>l-Math.exp(-_*e)*(C+(v+_*C)*e);else{let e=_*Math.sqrt(b*b-1);n=t=>{let n=Math.exp(-b*_*t),o=Math.min(e*t,300);return l-n*((v+b*_*C)*Math.sinh(o)+e*C*Math.cosh(o))/e}}let S={calculatedDuration:y&&m||null,next:e=>{let t=n(e);if(y)u.done=e>=m;else{let o=0;b<1&&(o=0===e?time_conversion_secondsToMilliseconds(v):calcGeneratorVelocity(n,e,t));let c=Math.abs(o)<=a,h=Math.abs(l-t)<=s;u.done=c&&h}return u.value=u.done?l:t,u},toString:()=>{let e=Math.min(calcGeneratorDuration(S),2e4),t=linear_generateLinearEasing(t=>S.next(e*t).value,e,30);return e+"ms "+t}};return S}function inertia({keyframes:e,velocity:t=0,power:n=.8,timeConstant:o=325,bounceDamping:a=10,bounceStiffness:s=500,modifyTarget:c,min:l,max:u,restDelta:h=.5,restSpeed:p}){let f,m;let g=e[0],y={done:!1,value:g},isOutOfBounds=e=>void 0!==l&&e<l||void 0!==u&&e>u,nearestBoundary=e=>void 0===l?u:void 0===u?l:Math.abs(l-e)<Math.abs(u-e)?l:u,v=n*t,b=g+v,C=void 0===c?b:c(b);C!==b&&(v=C-g);let calcDelta=e=>-v*Math.exp(-e/o),calcLatest=e=>C+calcDelta(e),applyFriction=e=>{let t=calcDelta(e),n=calcLatest(e);y.done=Math.abs(t)<=h,y.value=y.done?C:n},checkCatchBoundary=e=>{isOutOfBounds(y.value)&&(f=e,m=spring({keyframes:[y.value,nearestBoundary(y.value)],velocity:calcGeneratorVelocity(calcLatest,e,y.value),damping:a,stiffness:s,restDelta:h,restSpeed:p}))};return checkCatchBoundary(0),{calculatedDuration:null,next:e=>{let t=!1;return(m||void 0!==f||(t=!0,applyFriction(e),checkCatchBoundary(e)),void 0!==f&&e>=f)?m.next(e-f):(t||applyFriction(e),y)}}}let eM=cubicBezier(.42,0,1,1),eO=cubicBezier(0,0,.58,1),eN=cubicBezier(.42,0,.58,1),isEasingArray=e=>Array.isArray(e)&&"number"!=typeof e[0],is_bezier_definition_isBezierDefinition=e=>Array.isArray(e)&&"number"==typeof e[0],eB={linear:b.Z,easeIn:eM,easeInOut:eN,easeOut:eO,circIn:circIn,circInOut:R,circOut:x,backIn:k,backInOut:I,backOut:T,anticipate:anticipate},easingDefinitionToFunction=e=>{if(is_bezier_definition_isBezierDefinition(e)){(0,P.k)(4===e.length,"Cubic bezier arrays must contain four numerical values.");let[t,n,o,a]=e;return cubicBezier(t,n,o,a)}return"string"==typeof e?((0,P.k)(void 0!==eB[e],`Invalid easing type '${e}'`),eB[e]):e},combineFunctions=(e,t)=>n=>t(e(n)),pipe=(...e)=>e.reduce(combineFunctions),mixNumber=(e,t,n)=>e+(t-e)*n;function hueToRgb(e,t,n){return(n<0&&(n+=1),n>1&&(n-=1),n<1/6)?e+(t-e)*6*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function mixImmediate(e,t){return n=>n>0?t:e}let mixLinearColor=(e,t,n)=>{let o=e*e,a=n*(t*t-o)+o;return a<0?0:Math.sqrt(a)},eD=[ep,eh,ef],getColorType=e=>eD.find(t=>t.test(e));function asRGBA(e){let t=getColorType(e);if((0,P.K)(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===ef&&(n=function({hue:e,saturation:t,lightness:n,alpha:o}){e/=360,n/=100;let a=0,s=0,c=0;if(t/=100){let o=n<.5?n*(1+t):n+t-n*t,l=2*n-o;a=hueToRgb(l,o,e+1/3),s=hueToRgb(l,o,e),c=hueToRgb(l,o,e-1/3)}else a=s=c=n;return{red:Math.round(255*a),green:Math.round(255*s),blue:Math.round(255*c),alpha:o}}(n)),n}let mixColor=(e,t)=>{let n=asRGBA(e),o=asRGBA(t);if(!n||!o)return mixImmediate(e,t);let a={...n};return e=>(a.red=mixLinearColor(n.red,o.red,e),a.green=mixLinearColor(n.green,o.green,e),a.blue=mixLinearColor(n.blue,o.blue,e),a.alpha=mixNumber(n.alpha,o.alpha,e),eh.transform(a))},eL=new Set(["none","hidden"]);function complex_mixNumber(e,t){return n=>mixNumber(e,t,n)}function getMixer(e){return"number"==typeof e?complex_mixNumber:"string"==typeof e?isCSSVariableToken(e)?mixImmediate:em.test(e)?mixColor:mixComplex:Array.isArray(e)?mixArray:"object"==typeof e?em.test(e)?mixColor:mixObject:mixImmediate}function mixArray(e,t){let n=[...e],o=n.length,a=e.map((e,n)=>getMixer(e)(e,t[n]));return e=>{for(let t=0;t<o;t++)n[t]=a[t](e);return n}}function mixObject(e,t){let n={...e,...t},o={};for(let a in n)void 0!==e[a]&&void 0!==t[a]&&(o[a]=getMixer(e[a])(e[a],t[a]));return e=>{for(let t in o)n[t]=o[t](e);return n}}let mixComplex=(e,t)=>{let n=eC.createTransformer(t),o=analyseComplexValue(e),a=analyseComplexValue(t),s=o.indexes.var.length===a.indexes.var.length&&o.indexes.color.length===a.indexes.color.length&&o.indexes.number.length>=a.indexes.number.length;return s?eL.has(e)&&!a.values.length||eL.has(t)&&!o.values.length?eL.has(e)?n=>n<=0?e:t:n=>n>=1?t:e:pipe(mixArray(function(e,t){var n;let o=[],a={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){let c=t.types[s],l=e.indexes[c][a[c]],u=null!==(n=e.values[l])&&void 0!==n?n:0;o[s]=u,a[c]++}return o}(o,a),a.values),n):((0,P.K)(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),mixImmediate(e,t))};function mix(e,t,n){if("number"==typeof e&&"number"==typeof t&&"number"==typeof n)return mixNumber(e,t,n);let o=getMixer(e);return o(e,t)}function keyframes({duration:e=300,keyframes:t,times:n,ease:o="easeInOut"}){let a=isEasingArray(o)?o.map(easingDefinitionToFunction):easingDefinitionToFunction(o),s={done:!1,value:t[0]},c=(n&&n.length===t.length?n:function(e){let t=[0];return function(e,t){let n=e[e.length-1];for(let o=1;o<=t;o++){let a=progress(0,t,o);e.push(mixNumber(n,1,a))}}(t,e.length-1),t}(t)).map(t=>t*e),l=function(e,t,{clamp:n=!0,ease:o,mixer:a}={}){let s=e.length;if((0,P.k)(s===t.length,"Both input and output ranges must be the same length"),1===s)return()=>t[0];if(2===s&&e[0]===e[1])return()=>t[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());let c=function(e,t,n){let o=[],a=n||mix,s=e.length-1;for(let n=0;n<s;n++){let s=a(e[n],e[n+1]);if(t){let e=Array.isArray(t)?t[n]||b.Z:t;s=pipe(e,s)}o.push(s)}return o}(t,o,a),l=c.length,interpolator=t=>{let n=0;if(l>1)for(;n<e.length-2&&!(t<e[n+1]);n++);let o=progress(e[n],e[n+1],t);return c[n](o)};return n?t=>interpolator(clamp(e[0],e[s-1],t)):interpolator}(c,t,{ease:Array.isArray(a)?a:t.map(()=>a||eN).splice(0,t.length-1)});return{calculatedDuration:e,next:t=>(s.value=l(t),s.done=t>=e,s)}}let frameloopDriver=e=>{let passTimestamp=({timestamp:t})=>e(t);return{start:()=>_.update(passTimestamp,!0),stop:()=>w(passTimestamp),now:()=>S.isProcessing?S.timestamp:eI.now()}},eU={decay:inertia,inertia:inertia,tween:keyframes,keyframes:keyframes,spring:spring},percentToProgress=e=>e/100;let MainThreadAnimation=class MainThreadAnimation extends BaseAnimation{constructor(e){super(e),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.teardown();let{onStop:e}=this.options;e&&e()};let{name:t,motionValue:n,element:o,keyframes:a}=this.options,s=(null==o?void 0:o.KeyframeResolver)||KeyframeResolver;this.resolver=new s(a,(e,t)=>this.onKeyframesResolved(e,t),t,n,o),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(e){let t,n;let{type:o="keyframes",repeat:a=0,repeatDelay:s=0,repeatType:c,velocity:l=0}=this.options,u=is_generator_isGenerator(o)?o:eU[o]||keyframes;u!==keyframes&&"number"!=typeof e[0]&&(t=pipe(percentToProgress,mix(e[0],e[1])),e=[0,100]);let h=u({...this.options,keyframes:e});"mirror"===c&&(n=u({...this.options,keyframes:[...e].reverse(),velocity:-l})),null===h.calculatedDuration&&(h.calculatedDuration=calcGeneratorDuration(h));let{calculatedDuration:p}=h,f=p+s;return{generator:h,mirroredGenerator:n,mapPercentToKeyframes:t,calculatedDuration:p,resolvedDuration:f,totalDuration:f*(a+1)-s}}onPostResolved(){let{autoplay:e=!0}=this.options;this.play(),"paused"!==this.pendingPlayState&&e?this.state=this.pendingPlayState:this.pause()}tick(e,t=!1){let{resolved:n}=this;if(!n){let{keyframes:e}=this.options;return{done:!0,value:e[e.length-1]}}let{finalKeyframe:o,generator:a,mirroredGenerator:s,mapPercentToKeyframes:c,keyframes:l,calculatedDuration:u,totalDuration:h,resolvedDuration:p}=n;if(null===this.startTime)return a.next(0);let{delay:f,repeat:m,repeatType:g,repeatDelay:y,onUpdate:v}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-h/this.speed,this.startTime)),t?this.currentTime=e:null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=Math.round(e-this.startTime)*this.speed;let b=this.currentTime-f*(this.speed>=0?1:-1),C=this.speed>=0?b<0:b>h;this.currentTime=Math.max(b,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=h);let _=this.currentTime,w=a;if(m){let e=Math.min(this.currentTime,h)/p,t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),1===n&&t--,t=Math.min(t,m+1);let o=!!(t%2);o&&("reverse"===g?(n=1-n,y&&(n-=y/p)):"mirror"===g&&(w=s)),_=clamp(0,1,n)*p}let S=C?{done:!1,value:l[0]}:w.next(_);c&&(S.value=c(S.value));let{done:E}=S;C||null===u||(E=this.speed>=0?this.currentTime>=h:this.currentTime<=0);let T=null===this.holdTime&&("finished"===this.state||"running"===this.state&&E);return T&&void 0!==o&&(S.value=getFinalKeyframe(l,this.options,o)),v&&v(S.value),T&&this.finish(),S}get duration(){let{resolved:e}=this;return e?millisecondsToSeconds(e.calculatedDuration):0}get time(){return millisecondsToSeconds(this.currentTime)}set time(e){e=time_conversion_secondsToMilliseconds(e),this.currentTime=e,null!==this.holdTime||0===this.speed?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.speed)}get speed(){return this.playbackSpeed}set speed(e){let t=this.playbackSpeed!==e;this.playbackSpeed=e,t&&(this.time=millisecondsToSeconds(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;let{driver:e=frameloopDriver,onPlay:t,startTime:n}=this.options;this.driver||(this.driver=e(e=>this.tick(e))),t&&t();let o=this.driver.now();null!==this.holdTime?this.startTime=o-this.holdTime:this.startTime?"finished"===this.state&&(this.startTime=o):this.startTime=null!=n?n:this.calcStartTime(),"finished"===this.state&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var e;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=null!==(e=this.currentTime)&&void 0!==e?e:0}complete(){"running"!==this.state&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";let{onComplete:e}=this.options;e&&e()}cancel(){null!==this.cancelTime&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}};let eF=new Set(["opacity","clipPath","filter","transform"]);function memo_memo(e){let t;return()=>(void 0===t&&(t=e()),t)}let ez={linearEasing:void 0},eH=function(e,t){let n=memo_memo(e);return()=>{var e;return null!==(e=ez[t])&&void 0!==e?e:n()}}(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(e){return!1}return!0},"linearEasing"),cubicBezierAsString=([e,t,n,o])=>`cubic-bezier(${e}, ${t}, ${n}, ${o})`,ej={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:cubicBezierAsString([0,.65,.55,1]),circOut:cubicBezierAsString([.55,0,1,.45]),backIn:cubicBezierAsString([.31,.01,.66,-.59]),backOut:cubicBezierAsString([.33,1.53,.69,.99])};function attachTimeline(e,t){e.timeline=t,e.onfinish=null}let eV=memo_memo(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),eG={anticipate:anticipate,backInOut:I,circInOut:R};let AcceleratedAnimation=class AcceleratedAnimation extends BaseAnimation{constructor(e){super(e);let{name:t,motionValue:n,element:o,keyframes:a}=this.options;this.resolver=new DOMKeyframesResolver(a,(e,t)=>this.onKeyframesResolved(e,t),t,n,o),this.resolver.scheduleResolve()}initPlayback(e,t){var n,o;let{duration:a=300,times:s,ease:c,type:l,motionValue:u,name:h,startTime:p}=this.options;if(!(null===(n=u.owner)||void 0===n?void 0:n.current))return!1;if("string"==typeof c&&eH()&&c in eG&&(c=eG[c]),is_generator_isGenerator((o=this.options).type)||"spring"===o.type||!function isWaapiSupportedEasing(e){return!!("function"==typeof e&&eH()||!e||"string"==typeof e&&(e in ej||eH())||is_bezier_definition_isBezierDefinition(e)||Array.isArray(e)&&e.every(isWaapiSupportedEasing))}(o.ease)){let{onComplete:t,onUpdate:n,motionValue:o,element:u,...h}=this.options,p=function(e,t){let n=new MainThreadAnimation({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0}),o={done:!1,value:e[0]},a=[],s=0;for(;!o.done&&s<2e4;)a.push((o=n.sample(s)).value),s+=10;return{times:void 0,keyframes:a,duration:s-10,ease:"linear"}}(e,h);1===(e=p.keyframes).length&&(e[1]=e[0]),a=p.duration,s=p.times,c=p.ease,l="keyframes"}let f=function(e,t,n,{delay:o=0,duration:a=300,repeat:s=0,repeatType:c="loop",ease:l="easeInOut",times:u}={}){let h={[t]:n};u&&(h.offset=u);let p=function easing_mapEasingToNativeEasing(e,t){if(e)return"function"==typeof e&&eH()?linear_generateLinearEasing(e,t):is_bezier_definition_isBezierDefinition(e)?cubicBezierAsString(e):Array.isArray(e)?e.map(e=>easing_mapEasingToNativeEasing(e,t)||ej.easeOut):ej[e]}(l,a);return Array.isArray(p)&&(h.easing=p),e.animate(h,{delay:o,duration:a,easing:Array.isArray(p)?"linear":p,fill:"both",iterations:s+1,direction:"reverse"===c?"alternate":"normal"})}(u.owner.current,h,e,{...this.options,duration:a,times:s,ease:c});return f.startTime=null!=p?p:this.calcStartTime(),this.pendingTimeline?(attachTimeline(f,this.pendingTimeline),this.pendingTimeline=void 0):f.onfinish=()=>{let{onComplete:n}=this.options;u.set(getFinalKeyframe(e,this.options,t)),n&&n(),this.cancel(),this.resolveFinishedPromise()},{animation:f,duration:a,times:s,type:l,ease:c,keyframes:e}}get duration(){let{resolved:e}=this;if(!e)return 0;let{duration:t}=e;return millisecondsToSeconds(t)}get time(){let{resolved:e}=this;if(!e)return 0;let{animation:t}=e;return millisecondsToSeconds(t.currentTime||0)}set time(e){let{resolved:t}=this;if(!t)return;let{animation:n}=t;n.currentTime=time_conversion_secondsToMilliseconds(e)}get speed(){let{resolved:e}=this;if(!e)return 1;let{animation:t}=e;return t.playbackRate}set speed(e){let{resolved:t}=this;if(!t)return;let{animation:n}=t;n.playbackRate=e}get state(){let{resolved:e}=this;if(!e)return"idle";let{animation:t}=e;return t.playState}get startTime(){let{resolved:e}=this;if(!e)return null;let{animation:t}=e;return t.startTime}attachTimeline(e){if(this._resolved){let{resolved:t}=this;if(!t)return b.Z;let{animation:n}=t;attachTimeline(n,e)}else this.pendingTimeline=e;return b.Z}play(){if(this.isStopped)return;let{resolved:e}=this;if(!e)return;let{animation:t}=e;"finished"===t.playState&&this.updateFinishedPromise(),t.play()}pause(){let{resolved:e}=this;if(!e)return;let{animation:t}=e;t.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.resolveFinishedPromise(),this.updateFinishedPromise();let{resolved:e}=this;if(!e)return;let{animation:t,keyframes:n,duration:o,type:a,ease:s,times:c}=e;if("idle"===t.playState||"finished"===t.playState)return;if(this.time){let{motionValue:e,onUpdate:t,onComplete:l,element:u,...h}=this.options,p=new MainThreadAnimation({...h,keyframes:n,duration:o,type:a,ease:s,times:c,isGenerator:!0}),f=time_conversion_secondsToMilliseconds(this.time);e.setWithVelocity(p.sample(f-10).value,p.sample(f).value,10)}let{onStop:l}=this.options;l&&l(),this.cancel()}complete(){let{resolved:e}=this;e&&e.animation.finish()}cancel(){let{resolved:e}=this;e&&e.animation.cancel()}static supports(e){let{motionValue:t,name:n,repeatDelay:o,repeatType:a,damping:s,type:c}=e;return eV()&&n&&eF.has(n)&&t&&t.owner&&t.owner.current instanceof HTMLElement&&!t.owner.getProps().onUpdate&&!o&&"mirror"!==a&&0!==s&&"inertia"!==c}};let eK=memo_memo(()=>void 0!==window.ScrollTimeline);let GroupPlaybackControls=class GroupPlaybackControls{constructor(e){this.stop=()=>this.runAll("stop"),this.animations=e.filter(Boolean)}then(e,t){return Promise.all(this.animations).then(e).catch(t)}getAll(e){return this.animations[0][e]}setAll(e,t){for(let n=0;n<this.animations.length;n++)this.animations[n][e]=t}attachTimeline(e,t){let n=this.animations.map(n=>eK()&&n.attachTimeline?n.attachTimeline(e):t(n));return()=>{n.forEach((e,t)=>{e&&e(),this.animations[t].stop()})}}get time(){return this.getAll("time")}set time(e){this.setAll("time",e)}get speed(){return this.getAll("speed")}set speed(e){this.setAll("speed",e)}get startTime(){return this.getAll("startTime")}get duration(){let e=0;for(let t=0;t<this.animations.length;t++)e=Math.max(e,this.animations[t].duration);return e}runAll(e){this.animations.forEach(t=>t[e]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}};let animateMotionValue=(e,t,n,o={},a,s)=>c=>{let l=get_value_transition_getValueTransition(o,e)||{},u=l.delay||o.delay||0,{elapsed:h=0}=o;h-=time_conversion_secondsToMilliseconds(u);let p={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-h,onUpdate:e=>{t.set(e),l.onUpdate&&l.onUpdate(e)},onComplete:()=>{c(),l.onComplete&&l.onComplete()},name:e,motionValue:t,element:s?void 0:a};!function({when:e,delay:t,delayChildren:n,staggerChildren:o,staggerDirection:a,repeat:s,repeatType:c,repeatDelay:l,from:u,elapsed:h,...p}){return!!Object.keys(p).length}(l)&&(p={...p,...getDefaultTransition(e,p)}),p.duration&&(p.duration=time_conversion_secondsToMilliseconds(p.duration)),p.repeatDelay&&(p.repeatDelay=time_conversion_secondsToMilliseconds(p.repeatDelay)),void 0!==p.from&&(p.keyframes[0]=p.from);let g=!1;if(!1!==p.type&&(0!==p.duration||p.repeatDelay)||(p.duration=0,0!==p.delay||(g=!0)),(m.current||f.skipAnimations)&&(g=!0,p.duration=0,p.delay=0),g&&!s&&void 0!==t.get()){let e=getFinalKeyframe(p.keyframes,l);if(void 0!==e)return _.update(()=>{p.onUpdate(e),p.onComplete()}),new GroupPlaybackControls([])}return!s&&AcceleratedAnimation.supports(p)?new AcceleratedAnimation(p):new MainThreadAnimation(p)},isCustomValue=e=>!!(e&&"object"==typeof e&&e.mix&&e.toValue),resolveFinalValueInKeyframes=e=>isKeyframesTarget(e)?e[e.length-1]||0:e;function addUniqueItem(e,t){-1===e.indexOf(t)&&e.push(t)}function removeItem(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}let SubscriptionManager=class SubscriptionManager{constructor(){this.subscriptions=[]}add(e){return addUniqueItem(this.subscriptions,e),()=>removeItem(this.subscriptions,e)}notify(e,t,n){let o=this.subscriptions.length;if(o){if(1===o)this.subscriptions[0](e,t,n);else for(let a=0;a<o;a++){let o=this.subscriptions[a];o&&o(e,t,n)}}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}};let isFloat=e=>!isNaN(parseFloat(e)),eW={current:void 0};let MotionValue=class MotionValue{constructor(e,t={}){this.version="11.13.5",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(e,t=!0)=>{let n=eI.now();this.updatedAt!==n&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),t&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=eI.now(),null===this.canTrackVelocity&&void 0!==e&&(this.canTrackVelocity=isFloat(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new SubscriptionManager);let n=this.events[e].add(t);return"change"===e?()=>{n(),_.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(let e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e,t=!0){t&&this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e,t)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return eW.current&&eW.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){var e;let t=eI.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;let n=Math.min(this.updatedAt-this.prevUpdatedAt,30);return e=parseFloat(this.current)-parseFloat(this.prevFrameValue),n?e*(1e3/n):0}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}};function motionValue(e,t){return new MotionValue(e,t)}let camelToDash=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),e$="data-"+camelToDash("framerAppearId"),isMotionValue=e=>!!(e&&e.getVelocity);function addValueToWillChange(e,t){let n=e.getValue("willChange");if(isMotionValue(n)&&n.add)return n.add(t)}function animateTarget(e,t,{delay:n=0,transitionOverride:o,type:a}={}){var s;let{transition:c=e.getDefaultTransition(),transitionEnd:u,...h}=t;o&&(c=o);let p=[],f=a&&e.animationState&&e.animationState.getState()[a];for(let t in h){let o=e.getValue(t,null!==(s=e.latestValues[t])&&void 0!==s?s:null),a=h[t];if(void 0===a||f&&function({protectedKeys:e,needsAnimating:t},n){let o=e.hasOwnProperty(n)&&!0!==t[n];return t[n]=!1,o}(f,t))continue;let u={delay:n,...get_value_transition_getValueTransition(c||{},t)},m=!1;if(window.MotionHandoffAnimation){let n=e.props[e$];if(n){let e=window.MotionHandoffAnimation(n,t,_);null!==e&&(u.startTime=e,m=!0)}}addValueToWillChange(e,t),o.start(animateMotionValue(t,o,a,e.shouldReduceMotion&&l.has(t)?{type:!1}:u,e,m));let g=o.animation;g&&p.push(g)}return u&&Promise.all(p).then(()=>{_.update(()=>{u&&function(e,t){let n=resolveVariant(e,t),{transitionEnd:o={},transition:a={},...s}=n||{};for(let t in s={...s,...o}){let n=resolveFinalValueInKeyframes(s[t]);e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,motionValue(n))}}(e,u)})}),p}function animateVariant(e,t,n={}){var o;let a=resolveVariant(e,t,"exit"===n.type?null===(o=e.presenceContext)||void 0===o?void 0:o.custom:void 0),{transition:s=e.getDefaultTransition()||{}}=a||{};n.transitionOverride&&(s=n.transitionOverride);let c=a?()=>Promise.all(animateTarget(e,a,n)):()=>Promise.resolve(),l=e.variantChildren&&e.variantChildren.size?(o=0)=>{let{delayChildren:a=0,staggerChildren:c,staggerDirection:l}=s;return function(e,t,n=0,o=0,a=1,s){let c=[],l=(e.variantChildren.size-1)*o,u=1===a?(e=0)=>e*o:(e=0)=>l-e*o;return Array.from(e.variantChildren).sort(sortByTreeOrder).forEach((e,o)=>{e.notify("AnimationStart",t),c.push(animateVariant(e,t,{...s,delay:n+u(o)}).then(()=>e.notify("AnimationComplete",t)))}),Promise.all(c)}(e,t,a+o,c,l,n)}:()=>Promise.resolve(),{when:u}=s;if(!u)return Promise.all([c(),l(n.delay)]);{let[e,t]="beforeChildren"===u?[c,l]:[l,c];return e().then(()=>t())}}function sortByTreeOrder(e,t){return e.sortNodePosition(t)}let eJ=s.length,eY=[...a].reverse(),eQ=a.length;function createTypeState(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function createState(){return{animate:createTypeState(!0),whileInView:createTypeState(),whileHover:createTypeState(),whileTap:createTypeState(),whileDrag:createTypeState(),whileFocus:createTypeState(),exit:createTypeState()}}let Feature=class Feature{constructor(e){this.isMounted=!1,this.node=e}update(){}};let eX=0,eZ={x:!1,y:!1};function filterEvents(e){return t=>{"touch"===t.pointerType||eZ.x||eZ.y||e(t)}}new WeakSet;let is_primary_pointer_isPrimaryPointer=e=>"mouse"===e.pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary;function extractEventInfo(e){return{point:{x:e.pageX,y:e.pageY}}}let addPointerInfo=e=>t=>is_primary_pointer_isPrimaryPointer(t)&&e(t,extractEventInfo(t));function addDomEvent(e,t,n,o={passive:!0}){return e.addEventListener(t,n,o),()=>e.removeEventListener(t,n)}function addPointerEvent(e,t,n,o){return addDomEvent(e,t,addPointerInfo(n),o)}let distance=(e,t)=>Math.abs(e-t);let PanSession=class PanSession{constructor(e,t,{transformPagePoint:n,contextWindow:o,dragSnapToOrigin:a=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let e=getPanInfo(this.lastMoveEventInfo,this.history),t=null!==this.startEvent,n=function(e,t){let n=distance(e.x,t.x),o=distance(e.y,t.y);return Math.sqrt(n**2+o**2)}(e.offset,{x:0,y:0})>=3;if(!t&&!n)return;let{point:o}=e,{timestamp:a}=S;this.history.push({...o,timestamp:a});let{onStart:s,onMove:c}=this.handlers;t||(s&&s(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),c&&c(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastMoveEventInfo=transformPoint(t,this.transformPagePoint),_.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();let{onEnd:n,onSessionEnd:o,resumeAnimation:a}=this.handlers;if(this.dragSnapToOrigin&&a&&a(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let s=getPanInfo("pointercancel"===e.type?this.lastMoveEventInfo:transformPoint(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,s),o&&o(e,s)},!is_primary_pointer_isPrimaryPointer(e))return;this.dragSnapToOrigin=a,this.handlers=t,this.transformPagePoint=n,this.contextWindow=o||window;let s=extractEventInfo(e),c=transformPoint(s,this.transformPagePoint),{point:l}=c,{timestamp:u}=S;this.history=[{...l,timestamp:u}];let{onSessionStart:h}=t;h&&h(e,getPanInfo(c,this.history)),this.removeListeners=pipe(addPointerEvent(this.contextWindow,"pointermove",this.handlePointerMove),addPointerEvent(this.contextWindow,"pointerup",this.handlePointerUp),addPointerEvent(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),w(this.updatePoint)}};function transformPoint(e,t){return t?{point:t(e.point)}:e}function subtractPoint(e,t){return{x:e.x-t.x,y:e.y-t.y}}function getPanInfo({point:e},t){return{point:e,delta:subtractPoint(e,lastDevicePoint(t)),offset:subtractPoint(e,t[0]),velocity:function(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,o=null,a=lastDevicePoint(e);for(;n>=0&&(o=e[n],!(a.timestamp-o.timestamp>time_conversion_secondsToMilliseconds(.1)));)n--;if(!o)return{x:0,y:0};let s=millisecondsToSeconds(a.timestamp-o.timestamp);if(0===s)return{x:0,y:0};let c={x:(a.x-o.x)/s,y:(a.y-o.y)/s};return c.x===1/0&&(c.x=0),c.y===1/0&&(c.y=0),c}(t,0)}}function lastDevicePoint(e){return e[e.length-1]}function isRefObject(e){return e&&"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}function calcLength(e){return e.max-e.min}function calcAxisDelta(e,t,n,o=.5){e.origin=o,e.originPoint=mixNumber(t.min,t.max,e.origin),e.scale=calcLength(n)/calcLength(t),e.translate=mixNumber(n.min,n.max,e.origin)-e.originPoint,(e.scale>=.9999&&e.scale<=1.0001||isNaN(e.scale))&&(e.scale=1),(e.translate>=-.01&&e.translate<=.01||isNaN(e.translate))&&(e.translate=0)}function calcBoxDelta(e,t,n,o){calcAxisDelta(e.x,t.x,n.x,o?o.originX:void 0),calcAxisDelta(e.y,t.y,n.y,o?o.originY:void 0)}function calcRelativeAxis(e,t,n){e.min=n.min+t.min,e.max=e.min+calcLength(t)}function calcRelativeAxisPosition(e,t,n){e.min=t.min-n.min,e.max=e.min+calcLength(t)}function calcRelativePosition(e,t,n){calcRelativeAxisPosition(e.x,t.x,n.x),calcRelativeAxisPosition(e.y,t.y,n.y)}function calcRelativeAxisConstraints(e,t,n){return{min:void 0!==t?e.min+t:void 0,max:void 0!==n?e.max+n-(e.max-e.min):void 0}}function calcViewportAxisConstraints(e,t){let n=t.min-e.min,o=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,o]=[o,n]),{min:n,max:o}}function resolveAxisElastic(e,t,n){return{min:resolvePointElastic(e,t),max:resolvePointElastic(e,n)}}function resolvePointElastic(e,t){return"number"==typeof e?e:e[t]||0}let createAxisDelta=()=>({translate:0,scale:1,origin:0,originPoint:0}),createDelta=()=>({x:createAxisDelta(),y:createAxisDelta()}),createAxis=()=>({min:0,max:0}),createBox=()=>({x:createAxis(),y:createAxis()});function eachAxis(e){return[e("x"),e("y")]}function convertBoundingBoxToBox({top:e,left:t,right:n,bottom:o}){return{x:{min:t,max:n},y:{min:e,max:o}}}function isIdentityScale(e){return void 0===e||1===e}function hasScale({scale:e,scaleX:t,scaleY:n}){return!isIdentityScale(e)||!isIdentityScale(t)||!isIdentityScale(n)}function hasTransform(e){return hasScale(e)||has2DTranslate(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function has2DTranslate(e){var t,n;return(t=e.x)&&"0%"!==t||(n=e.y)&&"0%"!==n}function applyPointDelta(e,t,n,o,a){return void 0!==a&&(e=o+a*(e-o)),o+n*(e-o)+t}function applyAxisDelta(e,t=0,n=1,o,a){e.min=applyPointDelta(e.min,t,n,o,a),e.max=applyPointDelta(e.max,t,n,o,a)}function applyBoxDelta(e,{x:t,y:n}){applyAxisDelta(e.x,t.translate,t.scale,t.originPoint),applyAxisDelta(e.y,n.translate,n.scale,n.originPoint)}function translateAxis(e,t){e.min=e.min+t,e.max=e.max+t}function transformAxis(e,t,n,o,a=.5){let s=mixNumber(e.min,e.max,a);applyAxisDelta(e,t,n,s,o)}function transformBox(e,t){transformAxis(e.x,t.x,t.scaleX,t.scale,t.originX),transformAxis(e.y,t.y,t.scaleY,t.scale,t.originY)}function measureViewportBox(e,t){return convertBoundingBoxToBox(function(e,t){if(!t)return e;let n=t({x:e.left,y:e.top}),o=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:o.y,right:o.x}}(e.getBoundingClientRect(),t))}let getContextWindow=({current:e})=>e?e.ownerDocument.defaultView:null,e0=new WeakMap;let VisualElementDragControls=class VisualElementDragControls{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=createBox(),this.visualElement=e}start(e,{snapToCursor:t=!1}={}){let{presenceContext:n}=this.visualElement;if(n&&!1===n.isPresent)return;let{dragSnapToOrigin:o}=this.getProps();this.panSession=new PanSession(e,{onSessionStart:e=>{let{dragSnapToOrigin:n}=this.getProps();n?this.pauseAnimation():this.stopAnimation(),t&&this.snapToCursor(extractEventInfo(e).point)},onStart:(e,t)=>{let{drag:n,dragPropagation:o,onDragStart:a}=this.getProps();if(n&&!o&&(this.openDragLock&&this.openDragLock(),this.openDragLock="x"===n||"y"===n?eZ[n]?null:(eZ[n]=!0,()=>{eZ[n]=!1}):eZ.x||eZ.y?null:(eZ.x=eZ.y=!0,()=>{eZ.x=eZ.y=!1}),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),eachAxis(e=>{let t=this.getAxisMotionValue(e).get()||0;if(K.test(t)){let{projection:n}=this.visualElement;if(n&&n.layout){let o=n.layout.layoutBox[e];if(o){let e=calcLength(o);t=e*(parseFloat(t)/100)}}}this.originPoint[e]=t}),a&&_.postRender(()=>a(e,t)),addValueToWillChange(this.visualElement,"transform");let{animationState:s}=this.visualElement;s&&s.setActive("whileDrag",!0)},onMove:(e,t)=>{let{dragPropagation:n,dragDirectionLock:o,onDirectionLock:a,onDrag:s}=this.getProps();if(!n&&!this.openDragLock)return;let{offset:c}=t;if(o&&null===this.currentDirection){this.currentDirection=function(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}(c),null!==this.currentDirection&&a&&a(this.currentDirection);return}this.updateAxis("x",t.point,c),this.updateAxis("y",t.point,c),this.visualElement.render(),s&&s(e,t)},onSessionEnd:(e,t)=>this.stop(e,t),resumeAnimation:()=>eachAxis(e=>{var t;return"paused"===this.getAnimationState(e)&&(null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.play())})},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:o,contextWindow:getContextWindow(this.visualElement)})}stop(e,t){let n=this.isDragging;if(this.cancel(),!n)return;let{velocity:o}=t;this.startAnimation(o);let{onDragEnd:a}=this.getProps();a&&_.postRender(()=>a(e,t))}cancel(){this.isDragging=!1;let{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;let{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive("whileDrag",!1)}updateAxis(e,t,n){let{drag:o}=this.getProps();if(!n||!shouldDrag(e,o,this.currentDirection))return;let a=this.getAxisMotionValue(e),s=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(s=function(e,{min:t,max:n},o){return void 0!==t&&e<t?e=o?mixNumber(t,e,o.min):Math.max(e,t):void 0!==n&&e>n&&(e=o?mixNumber(n,e,o.max):Math.min(e,n)),e}(s,this.constraints[e],this.elastic[e])),a.set(s)}resolveConstraints(){var e;let{dragConstraints:t,dragElastic:n}=this.getProps(),o=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):null===(e=this.visualElement.projection)||void 0===e?void 0:e.layout,a=this.constraints;t&&isRefObject(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&o?this.constraints=function(e,{top:t,left:n,bottom:o,right:a}){return{x:calcRelativeAxisConstraints(e.x,n,a),y:calcRelativeAxisConstraints(e.y,t,o)}}(o.layoutBox,t):this.constraints=!1,this.elastic=function(e=.35){return!1===e?e=0:!0===e&&(e=.35),{x:resolveAxisElastic(e,"left","right"),y:resolveAxisElastic(e,"top","bottom")}}(n),a!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&eachAxis(e=>{!1!==this.constraints&&this.getAxisMotionValue(e)&&(this.constraints[e]=function(e,t){let n={};return void 0!==t.min&&(n.min=t.min-e.min),void 0!==t.max&&(n.max=t.max-e.min),n}(o.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){var e;let{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!isRefObject(t))return!1;let o=t.current;(0,P.k)(null!==o,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");let{projection:a}=this.visualElement;if(!a||!a.layout)return!1;let s=function(e,t,n){let o=measureViewportBox(e,n),{scroll:a}=t;return a&&(translateAxis(o.x,a.offset.x),translateAxis(o.y,a.offset.y)),o}(o,a.root,this.visualElement.getTransformPagePoint()),c={x:calcViewportAxisConstraints((e=a.layout.layoutBox).x,s.x),y:calcViewportAxisConstraints(e.y,s.y)};if(n){let e=n(function({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}(c));this.hasMutatedConstraints=!!e,e&&(c=convertBoundingBoxToBox(e))}return c}startAnimation(e){let{drag:t,dragMomentum:n,dragElastic:o,dragTransition:a,dragSnapToOrigin:s,onDragTransitionEnd:c}=this.getProps(),l=this.constraints||{},u=eachAxis(c=>{if(!shouldDrag(c,t,this.currentDirection))return;let u=l&&l[c]||{};s&&(u={min:0,max:0});let h={type:"inertia",velocity:n?e[c]:0,bounceStiffness:o?200:1e6,bounceDamping:o?40:1e7,timeConstant:750,restDelta:1,restSpeed:10,...a,...u};return this.startAxisValueAnimation(c,h)});return Promise.all(u).then(c)}startAxisValueAnimation(e,t){let n=this.getAxisMotionValue(e);return addValueToWillChange(this.visualElement,e),n.start(animateMotionValue(e,n,0,t,this.visualElement,!1))}stopAnimation(){eachAxis(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){eachAxis(e=>{var t;return null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.pause()})}getAnimationState(e){var t;return null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.state}getAxisMotionValue(e){let t=`_drag${e.toUpperCase()}`,n=this.visualElement.getProps(),o=n[t];return o||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){eachAxis(t=>{let{drag:n}=this.getProps();if(!shouldDrag(t,n,this.currentDirection))return;let{projection:o}=this.visualElement,a=this.getAxisMotionValue(t);if(o&&o.layout){let{min:n,max:s}=o.layout.layoutBox[t];a.set(e[t]-mixNumber(n,s,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!isRefObject(t)||!n||!this.constraints)return;this.stopAnimation();let o={x:0,y:0};eachAxis(e=>{let t=this.getAxisMotionValue(e);if(t&&!1!==this.constraints){let n=t.get();o[e]=function(e,t){let n=.5,o=calcLength(e),a=calcLength(t);return a>o?n=progress(t.min,t.max-o,e.min):o>a&&(n=progress(e.min,e.max-a,t.min)),clamp(0,1,n)}({min:n,max:n},this.constraints[e])}});let{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),eachAxis(t=>{if(!shouldDrag(t,e,null))return;let n=this.getAxisMotionValue(t),{min:a,max:s}=this.constraints[t];n.set(mixNumber(a,s,o[t]))})}addListeners(){if(!this.visualElement.current)return;e0.set(this.visualElement,this);let e=this.visualElement.current,t=addPointerEvent(e,"pointerdown",e=>{let{drag:t,dragListener:n=!0}=this.getProps();t&&n&&this.start(e)}),measureDragConstraints=()=>{let{dragConstraints:e}=this.getProps();isRefObject(e)&&e.current&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,o=n.addEventListener("measure",measureDragConstraints);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),_.read(measureDragConstraints);let a=addDomEvent(window,"resize",()=>this.scalePositionWithinConstraints()),s=n.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(eachAxis(t=>{let n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))}),this.visualElement.render())});return()=>{a(),t(),o(),s&&s()}}getProps(){let e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:o=!1,dragConstraints:a=!1,dragElastic:s=.35,dragMomentum:c=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:o,dragConstraints:a,dragElastic:s,dragMomentum:c}}};function shouldDrag(e,t,n){return(!0===t||t===e)&&(null===n||n===e)}let asyncHandler=e=>(t,n)=>{e&&_.postRender(()=>e(t,n))};var e1=n(2322),e2=n(2784),e4=n(8175),e3=n(3422);let e5=(0,e2.createContext)({}),e6={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function pixelsToPercent(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}let e8={correct:(e,t)=>{if(!t.target)return e;if("string"==typeof e){if(!$.test(e))return e;e=parseFloat(e)}let n=pixelsToPercent(e,t.target.x),o=pixelsToPercent(e,t.target.y);return`${n}% ${o}%`}},e9={},{schedule:e7,cancel:tt}=createRenderBatcher(queueMicrotask,!1);let MeasureLayoutWithContext=class MeasureLayoutWithContext extends e2.Component{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:o}=this.props,{projection:a}=e;Object.assign(e9,tr),a&&(t.group&&t.group.add(a),n&&n.register&&o&&n.register(a),a.root.didUpdate(),a.addEventListener("animationComplete",()=>{this.safeToRemove()}),a.setOptions({...a.options,onExitComplete:()=>this.safeToRemove()})),e6.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:t,visualElement:n,drag:o,isPresent:a}=this.props,s=n.projection;return s&&(s.isPresent=a,o||e.layoutDependency!==t||void 0===t?s.willUpdate():this.safeToRemove(),e.isPresent===a||(a?s.promote():s.relegate()||_.postRender(()=>{let e=s.getStack();e&&e.members.length||this.safeToRemove()}))),null}componentDidUpdate(){let{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),e7.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:o}=e;o&&(o.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(o),n&&n.deregister&&n.deregister(o))}safeToRemove(){let{safeToRemove:e}=this.props;e&&e()}render(){return null}};function MeasureLayout(e){let[t,n]=(0,e4.oO)(),o=(0,e2.useContext)(e3.p);return(0,e1.jsx)(MeasureLayoutWithContext,{...e,layoutGroup:o,switchLayoutGroup:(0,e2.useContext)(e5),isPresent:t,safeToRemove:n})}let tr={borderRadius:{...e8,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:e8,borderTopRightRadius:e8,borderBottomLeftRadius:e8,borderBottomRightRadius:e8,boxShadow:{correct:(e,{treeScale:t,projectionDelta:n})=>{let o=eC.parse(e);if(o.length>5)return e;let a=eC.createTransformer(e),s="number"!=typeof o[0]?1:0,c=n.x.scale*t.x,l=n.y.scale*t.y;o[0+s]/=c,o[1+s]/=l;let u=mixNumber(c,l,.5);return"number"==typeof o[2+s]&&(o[2+s]/=u),"number"==typeof o[3+s]&&(o[3+s]/=u),a(o)}}},tn=["TopLeft","TopRight","BottomLeft","BottomRight"],to=tn.length,asNumber=e=>"string"==typeof e?parseFloat(e):e,isPx=e=>"number"==typeof e||$.test(e);function getRadius(e,t){return void 0!==e[t]?e[t]:e.borderRadius}let ti=compress(0,.5,x),ta=compress(.5,.95,b.Z);function compress(e,t,n){return o=>o<e?0:o>t?1:n(progress(e,t,o))}function copyAxisInto(e,t){e.min=t.min,e.max=t.max}function copyBoxInto(e,t){copyAxisInto(e.x,t.x),copyAxisInto(e.y,t.y)}function copyAxisDeltaInto(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function removePointDelta(e,t,n,o,a){return e-=t,e=o+1/n*(e-o),void 0!==a&&(e=o+1/a*(e-o)),e}function removeAxisTransforms(e,t,[n,o,a],s,c){!function(e,t=0,n=1,o=.5,a,s=e,c=e){if(K.test(t)){t=parseFloat(t);let e=mixNumber(c.min,c.max,t/100);t=e-c.min}if("number"!=typeof t)return;let l=mixNumber(s.min,s.max,o);e===s&&(l-=t),e.min=removePointDelta(e.min,t,n,l,a),e.max=removePointDelta(e.max,t,n,l,a)}(e,t[n],t[o],t[a],t.scale,s,c)}let ts=["x","scaleX","originX"],tc=["y","scaleY","originY"];function removeBoxTransforms(e,t,n,o){removeAxisTransforms(e.x,t,ts,n?n.x:void 0,o?o.x:void 0),removeAxisTransforms(e.y,t,tc,n?n.y:void 0,o?o.y:void 0)}function isAxisDeltaZero(e){return 0===e.translate&&1===e.scale}function isDeltaZero(e){return isAxisDeltaZero(e.x)&&isAxisDeltaZero(e.y)}function axisEquals(e,t){return e.min===t.min&&e.max===t.max}function axisEqualsRounded(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function boxEqualsRounded(e,t){return axisEqualsRounded(e.x,t.x)&&axisEqualsRounded(e.y,t.y)}function aspectRatio(e){return calcLength(e.x)/calcLength(e.y)}function axisDeltaEquals(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}let NodeStack=class NodeStack{constructor(){this.members=[]}add(e){addUniqueItem(this.members,e),e.scheduleRender()}remove(e){if(removeItem(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){let t;let n=this.members.findIndex(t=>e===t);if(0===n)return!1;for(let e=n;e>=0;e--){let n=this.members[e];if(!1!==n.isPresent){t=n;break}}return!!t&&(this.promote(t),!0)}promote(e,t){let n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.instance&&n.scheduleRender(),e.scheduleRender(),e.resumeFrom=n,t&&(e.resumeFrom.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);let{crossfade:o}=e.options;!1===o&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{let{options:t,resumingFrom:n}=e;t.onExitComplete&&t.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}};let compareByDepth=(e,t)=>e.depth-t.depth;let FlatTree=class FlatTree{constructor(){this.children=[],this.isDirty=!1}add(e){addUniqueItem(this.children,e),this.isDirty=!0}remove(e){removeItem(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(compareByDepth),this.isDirty=!1,this.children.forEach(e)}};function resolveMotionValue(e){let t=isMotionValue(e)?e.get():e;return isCustomValue(t)?t.toValue():t}let tl={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},tu="undefined"!=typeof window&&void 0!==window.MotionDebug,td=["","X","Y","Z"],th={visibility:"hidden"},tp=0;function resetDistortingTransform(e,t,n,o){let{latestValues:a}=t;a[e]&&(n[e]=a[e],t.setStaticValue(e,0),o&&(o[e]=0))}function createProjectionNode({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:o,resetTransform:a}){return class{constructor(e={},n=null==t?void 0:t()){this.id=tp++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,tu&&(tl.totalNodes=tl.resolvedTargetDeltas=tl.recalculatedProjection=0),this.nodes.forEach(propagateDirtyNodes),this.nodes.forEach(resolveTargetDelta),this.nodes.forEach(calcProjection),this.nodes.forEach(cleanDirtyNodes),tu&&window.MotionDebug.record(tl)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new FlatTree)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new SubscriptionManager),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){let n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t,n=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=t instanceof SVGElement&&"svg"!==t.tagName,this.instance=t;let{layoutId:o,layout:a,visualElement:s}=this.options;if(s&&!s.current&&s.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),n&&(a||o)&&(this.isLayoutDirty=!0),e){let n;let resizeUnblockUpdate=()=>this.root.updateBlockedByResize=!1;e(t,()=>{this.root.updateBlockedByResize=!0,n&&n(),n=function(e,t){let n=eI.now(),checkElapsed=({timestamp:o})=>{let a=o-n;a>=t&&(w(checkElapsed),e(a-t))};return _.read(checkElapsed,!0),()=>w(checkElapsed)}(resizeUnblockUpdate,250),e6.hasAnimatedSinceResize&&(e6.hasAnimatedSinceResize=!1,this.nodes.forEach(finishAnimation))})}o&&this.root.registerSharedNode(o,this),!1!==this.options.animate&&s&&(o||a)&&this.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t,hasRelativeTargetChanged:n,layout:o})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let a=this.options.transition||s.getDefaultTransition()||tf,{onLayoutAnimationStart:c,onLayoutAnimationComplete:l}=s.getProps(),u=!this.targetLayout||!boxEqualsRounded(this.targetLayout,o)||n,h=!t&&n;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||h||t&&(u||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(e,h);let t={...get_value_transition_getValueTransition(a,"layout"),onPlay:c,onComplete:l};(s.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t)}else t||finishAnimation(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=o})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,w(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){!this.isUpdateBlocked()&&(this.isUpdating=!0,this.nodes&&this.nodes.forEach(resetSkewAndRotation),this.animationId++)}getTransformTemplate(){let{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&function cancelTreeOptimisedTransformAnimations(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let n=t.props[e$];if(window.MotionHasOptimisedAnimation(n,"transform")){let{layout:t,layoutId:o}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",_,!(t||o))}let{parent:o}=e;o&&!o.hasCheckedOptimisedAppear&&cancelTreeOptimisedTransformAnimations(o)}(this),this.root.isUpdating||this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){let t=this.path[e];t.shouldResetTransform=!0,t.updateScroll("snapshot"),t.options.layoutRoot&&t.willUpdate(!1)}let{layoutId:t,layout:n}=this.options;if(void 0===t&&!n)return;let o=this.getTransformTemplate();this.prevTransformTemplateValue=o?o(this.latestValues,""):void 0,this.updateSnapshot(),e&&this.notifyListeners("willUpdate")}update(){this.updateScheduled=!1;let e=this.isUpdateBlocked();if(e){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(clearMeasurements);return}this.isUpdating||this.nodes.forEach(clearIsLayoutDirty),this.isUpdating=!1,this.nodes.forEach(resetTransformStyle),this.nodes.forEach(updateLayout),this.nodes.forEach(notifyLayoutUpdate),this.clearAllSnapshots();let t=eI.now();S.delta=clamp(0,1e3/60,t-S.timestamp),S.timestamp=t,S.isProcessing=!0,E.update.process(S),E.preRender.process(S),E.render.process(S),S.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,e7.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(clearSnapshot),this.sharedNodes.forEach(removeLeadSnapshots)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,_.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){_.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e<this.path.length;e++){let t=this.path[e];t.updateScroll()}let e=this.layout;this.layout=this.measure(!1),this.layoutCorrected=createBox(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);let{visualElement:t}=this.options;t&&t.notify("LayoutMeasure",this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e="measure"){let t=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t){let t=o(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!a)return;let e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!isDeltaZero(this.projectionDelta),n=this.getTransformTemplate(),o=n?n(this.latestValues,""):void 0,s=o!==this.prevTransformTemplateValue;e&&(t||hasTransform(this.latestValues)||s)&&(a(this.instance,o),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){var t;let n=this.measurePageBox(),o=this.removeElementScroll(n);return e&&(o=this.removeTransform(o)),roundAxis((t=o).x),roundAxis(t.y),{animationId:this.root.animationId,measuredBox:n,layoutBox:o,latestValues:{},source:this.id}}measurePageBox(){var e;let{visualElement:t}=this.options;if(!t)return createBox();let n=t.measureViewportBox(),o=(null===(e=this.scroll)||void 0===e?void 0:e.wasRoot)||this.path.some(checkNodeWasScrollRoot);if(!o){let{scroll:e}=this.root;e&&(translateAxis(n.x,e.offset.x),translateAxis(n.y,e.offset.y))}return n}removeElementScroll(e){var t;let n=createBox();if(copyBoxInto(n,e),null===(t=this.scroll)||void 0===t?void 0:t.wasRoot)return n;for(let t=0;t<this.path.length;t++){let o=this.path[t],{scroll:a,options:s}=o;o!==this.root&&a&&s.layoutScroll&&(a.wasRoot&&copyBoxInto(n,e),translateAxis(n.x,a.offset.x),translateAxis(n.y,a.offset.y))}return n}applyTransform(e,t=!1){let n=createBox();copyBoxInto(n,e);for(let e=0;e<this.path.length;e++){let o=this.path[e];!t&&o.options.layoutScroll&&o.scroll&&o!==o.root&&transformBox(n,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),hasTransform(o.latestValues)&&transformBox(n,o.latestValues)}return hasTransform(this.latestValues)&&transformBox(n,this.latestValues),n}removeTransform(e){let t=createBox();copyBoxInto(t,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];if(!n.instance||!hasTransform(n.latestValues))continue;hasScale(n.latestValues)&&n.updateSnapshot();let o=createBox(),a=n.measurePageBox();copyBoxInto(o,a),removeBoxTransforms(t,n.latestValues,n.snapshot?n.snapshot.layoutBox:void 0,o)}return hasTransform(this.latestValues)&&removeBoxTransforms(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:void 0===e.crossfade||e.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==S.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){var t,n,o,a;let s=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=s.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=s.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=s.isSharedProjectionDirty);let c=!!this.resumingFrom||this!==s,l=!(e||c&&this.isSharedProjectionDirty||this.isProjectionDirty||(null===(t=this.parent)||void 0===t?void 0:t.isProjectionDirty)||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize);if(l)return;let{layout:u,layoutId:h}=this.options;if(this.layout&&(u||h)){if(this.resolvedRelativeTargetAt=S.timestamp,!this.targetDelta&&!this.relativeTarget){let e=this.getClosestProjectingParent();e&&e.layout&&1!==this.animationProgress?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget=createBox(),this.relativeTargetOrigin=createBox(),calcRelativePosition(this.relativeTargetOrigin,this.layout.layoutBox,e.layout.layoutBox),copyBoxInto(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(this.relativeTarget||this.targetDelta){if((this.target||(this.target=createBox(),this.targetWithTransforms=createBox()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target)?(this.forceRelativeParentToResolveTarget(),n=this.target,o=this.relativeTarget,a=this.relativeParent.target,calcRelativeAxis(n.x,o.x,a.x),calcRelativeAxis(n.y,o.y,a.y)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):copyBoxInto(this.target,this.layout.layoutBox),applyBoxDelta(this.target,this.targetDelta)):copyBoxInto(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;let e=this.getClosestProjectingParent();e&&!!e.resumingFrom==!!this.resumingFrom&&!e.options.layoutScroll&&e.target&&1!==this.animationProgress?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget=createBox(),this.relativeTargetOrigin=createBox(),calcRelativePosition(this.relativeTargetOrigin,this.target,e.target),copyBoxInto(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}tu&&tl.resolvedTargetDeltas++}}}getClosestProjectingParent(){return!this.parent||hasScale(this.parent.latestValues)||has2DTranslate(this.parent.latestValues)?void 0:this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var e;let t=this.getLead(),n=!!this.resumingFrom||this!==t,o=!0;if((this.isProjectionDirty||(null===(e=this.parent)||void 0===e?void 0:e.isProjectionDirty))&&(o=!1),n&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(o=!1),this.resolvedRelativeTargetAt===S.timestamp&&(o=!1),o)return;let{layout:a,layoutId:s}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(a||s))return;copyBoxInto(this.layoutCorrected,this.layout.layoutBox);let c=this.treeScale.x,l=this.treeScale.y;!function(e,t,n,o=!1){let a,s;let c=n.length;if(c){t.x=t.y=1;for(let l=0;l<c;l++){s=(a=n[l]).projectionDelta;let{visualElement:c}=a.options;(!c||!c.props.style||"contents"!==c.props.style.display)&&(o&&a.options.layoutScroll&&a.scroll&&a!==a.root&&transformBox(e,{x:-a.scroll.offset.x,y:-a.scroll.offset.y}),s&&(t.x*=s.x.scale,t.y*=s.y.scale,applyBoxDelta(e,s)),o&&hasTransform(a.latestValues)&&transformBox(e,a.latestValues))}t.x<1.0000000000001&&t.x>.999999999999&&(t.x=1),t.y<1.0000000000001&&t.y>.999999999999&&(t.y=1)}}(this.layoutCorrected,this.treeScale,this.path,n),t.layout&&!t.target&&(1!==this.treeScale.x||1!==this.treeScale.y)&&(t.target=t.layout.layoutBox,t.targetWithTransforms=createBox());let{target:u}=t;if(!u){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}this.projectionDelta&&this.prevProjectionDelta?(copyAxisDeltaInto(this.prevProjectionDelta.x,this.projectionDelta.x),copyAxisDeltaInto(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),calcBoxDelta(this.projectionDelta,this.layoutCorrected,u,this.latestValues),this.treeScale.x===c&&this.treeScale.y===l&&axisDeltaEquals(this.projectionDelta.x,this.prevProjectionDelta.x)&&axisDeltaEquals(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",u)),tu&&tl.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){var t;if(null===(t=this.options.visualElement)||void 0===t||t.scheduleRender(),e){let e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=createDelta(),this.projectionDelta=createDelta(),this.projectionDeltaWithTransform=createDelta()}setAnimationOrigin(e,t=!1){let n;let o=this.snapshot,a=o?o.latestValues:{},s={...this.latestValues},c=createDelta();this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let l=createBox(),u=o?o.source:void 0,h=this.layout?this.layout.source:void 0,p=u!==h,f=this.getStack(),m=!f||f.members.length<=1,g=!!(p&&!m&&!0===this.options.crossfade&&!this.path.some(hasOpacityCrossfade));this.animationProgress=0,this.mixTargetDelta=t=>{let o=t/1e3;if(mixAxisDelta(c.x,e.x,o),mixAxisDelta(c.y,e.y,o),this.setTargetDelta(c),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout){var u,h,f,y;calcRelativePosition(l,this.layout.layoutBox,this.relativeParent.layout.layoutBox),f=this.relativeTarget,y=this.relativeTargetOrigin,mixAxis(f.x,y.x,l.x,o),mixAxis(f.y,y.y,l.y,o),n&&(u=this.relativeTarget,h=n,axisEquals(u.x,h.x)&&axisEquals(u.y,h.y))&&(this.isProjectionDirty=!1),n||(n=createBox()),copyBoxInto(n,this.relativeTarget)}p&&(this.animationValues=s,function(e,t,n,o,a,s){a?(e.opacity=mixNumber(0,void 0!==n.opacity?n.opacity:1,ti(o)),e.opacityExit=mixNumber(void 0!==t.opacity?t.opacity:1,0,ta(o))):s&&(e.opacity=mixNumber(void 0!==t.opacity?t.opacity:1,void 0!==n.opacity?n.opacity:1,o));for(let a=0;a<to;a++){let s=`border${tn[a]}Radius`,c=getRadius(t,s),l=getRadius(n,s);if(void 0===c&&void 0===l)continue;c||(c=0),l||(l=0);let u=0===c||0===l||isPx(c)===isPx(l);u?(e[s]=Math.max(mixNumber(asNumber(c),asNumber(l),o),0),(K.test(l)||K.test(c))&&(e[s]+="%")):e[s]=l}(t.rotate||n.rotate)&&(e.rotate=mixNumber(t.rotate||0,n.rotate||0,o))}(s,a,this.latestValues,o,g,m)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=o},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(w(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=_.update(()=>{e6.hasAnimatedSinceResize=!0,this.currentAnimation=function(e,t,n){let o=isMotionValue(e)?e:motionValue(e);return o.start(animateMotionValue("",o,1e3,n)),o.animation}(0,0,{...e,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onComplete:()=>{e.onComplete&&e.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let e=this.getLead(),{targetWithTransforms:t,target:n,layout:o,latestValues:a}=e;if(t&&n&&o){if(this!==e&&this.layout&&o&&shouldAnimatePositionOnly(this.options.animationType,this.layout.layoutBox,o.layoutBox)){n=this.target||createBox();let t=calcLength(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;let o=calcLength(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+o}copyBoxInto(t,n),transformBox(t,a),calcBoxDelta(this.projectionDeltaWithTransform,this.layoutCorrected,t,a)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new NodeStack);let n=this.sharedNodes.get(e);n.add(t);let o=t.options.initialPromotionConfig;t.promote({transition:o?o.transition:void 0,preserveFollowOpacity:o&&o.shouldPreserveFollowOpacity?o.shouldPreserveFollowOpacity(t):void 0})}isLead(){let e=this.getStack();return!e||e.lead===this}getLead(){var e;let{layoutId:t}=this.options;return t&&(null===(e=this.getStack())||void 0===e?void 0:e.lead)||this}getPrevLead(){var e;let{layoutId:t}=this.options;return t?null===(e=this.getStack())||void 0===e?void 0:e.prevLead:void 0}getStack(){let{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){let o=this.getStack();o&&o.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){let e=this.getStack();return!!e&&e.relegate(this)}resetSkewAndRotation(){let{visualElement:e}=this.options;if(!e)return;let t=!1,{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;let o={};n.z&&resetDistortingTransform("z",e,o,this.animationValues);for(let t=0;t<td.length;t++)resetDistortingTransform(`rotate${td[t]}`,e,o,this.animationValues),resetDistortingTransform(`skew${td[t]}`,e,o,this.animationValues);for(let t in e.render(),o)e.setStaticValue(t,o[t]),this.animationValues&&(this.animationValues[t]=o[t]);e.scheduleRender()}getProjectionStyles(e){var t,n;if(!this.instance||this.isSVG)return;if(!this.isVisible)return th;let o={visibility:""},a=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,o.opacity="",o.pointerEvents=resolveMotionValue(null==e?void 0:e.pointerEvents)||"",o.transform=a?a(this.latestValues,""):"none",o;let s=this.getLead();if(!this.projectionDelta||!this.layout||!s.target){let t={};return this.options.layoutId&&(t.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,t.pointerEvents=resolveMotionValue(null==e?void 0:e.pointerEvents)||""),this.hasProjected&&!hasTransform(this.latestValues)&&(t.transform=a?a({},""):"none",this.hasProjected=!1),t}let c=s.animationValues||s.latestValues;this.applyTransformsToTarget(),o.transform=function(e,t,n){let o="",a=e.x.translate/t.x,s=e.y.translate/t.y,c=(null==n?void 0:n.z)||0;if((a||s||c)&&(o=`translate3d(${a}px, ${s}px, ${c}px) `),(1!==t.x||1!==t.y)&&(o+=`scale(${1/t.x}, ${1/t.y}) `),n){let{transformPerspective:e,rotate:t,rotateX:a,rotateY:s,skewX:c,skewY:l}=n;e&&(o=`perspective(${e}px) ${o}`),t&&(o+=`rotate(${t}deg) `),a&&(o+=`rotateX(${a}deg) `),s&&(o+=`rotateY(${s}deg) `),c&&(o+=`skewX(${c}deg) `),l&&(o+=`skewY(${l}deg) `)}let l=e.x.scale*t.x,u=e.y.scale*t.y;return(1!==l||1!==u)&&(o+=`scale(${l}, ${u})`),o||"none"}(this.projectionDeltaWithTransform,this.treeScale,c),a&&(o.transform=a(c,o.transform));let{x:l,y:u}=this.projectionDelta;for(let e in o.transformOrigin=`${100*l.origin}% ${100*u.origin}% 0`,s.animationValues?o.opacity=s===this?null!==(n=null!==(t=c.opacity)&&void 0!==t?t:this.latestValues.opacity)&&void 0!==n?n:1:this.preserveOpacity?this.latestValues.opacity:c.opacityExit:o.opacity=s===this?void 0!==c.opacity?c.opacity:"":void 0!==c.opacityExit?c.opacityExit:0,e9){if(void 0===c[e])continue;let{correct:t,applyTo:n}=e9[e],a="none"===o.transform?c[e]:t(c[e],s);if(n){let e=n.length;for(let t=0;t<e;t++)o[n[t]]=a}else o[e]=a}return this.options.layoutId&&(o.pointerEvents=s===this?resolveMotionValue(null==e?void 0:e.pointerEvents)||"":"none"),o}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>{var t;return null===(t=e.currentAnimation)||void 0===t?void 0:t.stop()}),this.root.nodes.forEach(clearMeasurements),this.root.sharedNodes.clear()}}}function updateLayout(e){e.updateLayout()}function notifyLayoutUpdate(e){var t;let n=(null===(t=e.resumeFrom)||void 0===t?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){let{layoutBox:t,measuredBox:o}=e.layout,{animationType:a}=e.options,s=n.source!==e.layout.source;"size"===a?eachAxis(e=>{let o=s?n.measuredBox[e]:n.layoutBox[e],a=calcLength(o);o.min=t[e].min,o.max=o.min+a}):shouldAnimatePositionOnly(a,n.layoutBox,t)&&eachAxis(o=>{let a=s?n.measuredBox[o]:n.layoutBox[o],c=calcLength(t[o]);a.max=a.min+c,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[o].max=e.relativeTarget[o].min+c)});let c=createDelta();calcBoxDelta(c,t,n.layoutBox);let l=createDelta();s?calcBoxDelta(l,e.applyTransform(o,!0),n.measuredBox):calcBoxDelta(l,t,n.layoutBox);let u=!isDeltaZero(c),h=!1;if(!e.resumeFrom){let o=e.getClosestProjectingParent();if(o&&!o.resumeFrom){let{snapshot:a,layout:s}=o;if(a&&s){let c=createBox();calcRelativePosition(c,n.layoutBox,a.layoutBox);let l=createBox();calcRelativePosition(l,t,s.layoutBox),boxEqualsRounded(c,l)||(h=!0),o.options.layoutRoot&&(e.relativeTarget=l,e.relativeTargetOrigin=c,e.relativeParent=o)}}}e.notifyListeners("didUpdate",{layout:t,snapshot:n,delta:l,layoutDelta:c,hasLayoutChanged:u,hasRelativeTargetChanged:h})}else if(e.isLead()){let{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function propagateDirtyNodes(e){tu&&tl.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function cleanDirtyNodes(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function clearSnapshot(e){e.clearSnapshot()}function clearMeasurements(e){e.clearMeasurements()}function clearIsLayoutDirty(e){e.isLayoutDirty=!1}function resetTransformStyle(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function finishAnimation(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function resolveTargetDelta(e){e.resolveTargetDelta()}function calcProjection(e){e.calcProjection()}function resetSkewAndRotation(e){e.resetSkewAndRotation()}function removeLeadSnapshots(e){e.removeLeadSnapshot()}function mixAxisDelta(e,t,n){e.translate=mixNumber(t.translate,0,n),e.scale=mixNumber(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function mixAxis(e,t,n,o){e.min=mixNumber(t.min,n.min,o),e.max=mixNumber(t.max,n.max,o)}function hasOpacityCrossfade(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}let tf={duration:.45,ease:[.4,0,.1,1]},userAgentContains=e=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),tm=userAgentContains("applewebkit/")&&!userAgentContains("chrome/")?Math.round:b.Z;function roundAxis(e){e.min=tm(e.min),e.max=tm(e.max)}function shouldAnimatePositionOnly(e,t,n){return"position"===e||"preserve-aspect"===e&&!(.2>=Math.abs(aspectRatio(t)-aspectRatio(n)))}function checkNodeWasScrollRoot(e){var t;return e!==e.root&&(null===(t=e.scroll)||void 0===t?void 0:t.wasRoot)}let tg=createProjectionNode({attachResizeListener:(e,t)=>addDomEvent(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),ty={current:void 0},tv=createProjectionNode({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!ty.current){let e=new tg({});e.mount(window),e.setOptions({layoutScroll:!0}),ty.current=e}return ty.current},resetTransform:(e,t)=>{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>"fixed"===window.getComputedStyle(e).position});function handleHoverEvent(e,t,n){let{props:o}=e;e.animationState&&o.whileHover&&e.animationState.setActive("whileHover","Start"===n);let a="onHover"+n,s=o[a];s&&_.postRender(()=>s(t,extractEventInfo(t)))}let is_node_or_child_isNodeOrChild=(e,t)=>!!t&&(e===t||is_node_or_child_isNodeOrChild(e,t.parentElement));function fireSyntheticPointerEvent(e,t){if(!t)return;let n=new PointerEvent("pointer"+e);t(n,extractEventInfo(n))}let tb=new WeakMap,tC=new WeakMap,fireObserverCallback=e=>{let t=tb.get(e.target);t&&t(e)},fireAllObserverCallbacks=e=>{e.forEach(fireObserverCallback)},t_={some:0,all:1};var tw=n(976);let tS=(0,e2.createContext)({});var tE=n(7967),tT=n(3617);let tk=(0,e2.createContext)({strict:!1});function isControllingVariants(e){return isAnimationControls(e.animate)||s.some(t=>isVariantLabel(e[t]))}function isVariantNode(e){return!!(isControllingVariants(e)||e.variants)}function variantLabelsAsDependency(e){return Array.isArray(e)?e.join(" "):e}let tA={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},tI={};for(let e in tA)tI[e]={isEnabled:t=>tA[e].some(e=>!!t[e])};var tx=n(3791);let tR=Symbol.for("motionComponentSymbol"),tP=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function isSVGComponent(e){if("string"!=typeof e||e.includes("-"));else if(tP.indexOf(e)>-1||/[A-Z]/u.test(e))return!0;return!1}function renderHTML(e,{style:t,vars:n},o,a){for(let s in Object.assign(e.style,t,a&&a.getProjectionStyles(o)),n)e.style.setProperty(s,n[s])}let tM=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function renderSVG(e,t,n,o){for(let n in renderHTML(e,t,void 0,o),t.attrs)e.setAttribute(tM.has(n)?n:camelToDash(n),t.attrs[n])}function isForcedMotionValue(e,{layout:t,layoutId:n}){return l.has(e)||e.startsWith("origin")||(t||void 0!==n)&&(!!e9[e]||"opacity"===e)}function scrapeMotionValuesFromProps(e,t,n){var o;let{style:a}=e,s={};for(let c in a)(isMotionValue(a[c])||t.style&&isMotionValue(t.style[c])||isForcedMotionValue(c,e)||(null===(o=null==n?void 0:n.getValue(c))||void 0===o?void 0:o.liveStyle)!==void 0)&&(s[c]=a[c]);return s}function scrape_motion_values_scrapeMotionValuesFromProps(e,t,n){let o=scrapeMotionValuesFromProps(e,t,n);for(let n in e)if(isMotionValue(e[n])||isMotionValue(t[n])){let t=-1!==c.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n;o[t]=e[n]}return o}var tO=n(3105);let makeUseVisualState=e=>(t,n)=>{let o=(0,e2.useContext)(tS),a=(0,e2.useContext)(tE.O),make=()=>(function({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},o,a,s){let c={latestValues:function(e,t,n,o){let a={},s=o(e,{});for(let e in s)a[e]=resolveMotionValue(s[e]);let{initial:c,animate:l}=e,u=isControllingVariants(e),h=isVariantNode(e);t&&h&&!u&&!1!==e.inherit&&(void 0===c&&(c=t.initial),void 0===l&&(l=t.animate));let p=!!n&&!1===n.initial;p=p||!1===c;let f=p?l:c;if(f&&"boolean"!=typeof f&&!isAnimationControls(f)){let t=Array.isArray(f)?f:[f];for(let n=0;n<t.length;n++){let o=resolveVariantFromProps(e,t[n]);if(o){let{transitionEnd:e,transition:t,...n}=o;for(let e in n){let t=n[e];if(Array.isArray(t)){let e=p?t.length-1:0;t=t[e]}null!==t&&(a[e]=t)}for(let t in e)a[t]=e[t]}}}return a}(o,a,s,e),renderState:t()};return n&&(c.mount=e=>n(o,e,c)),c})(e,t,o,a);return n?make():(0,tO.h)(make)},createHtmlRenderState=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),createSvgRenderState=()=>({...createHtmlRenderState(),attrs:{}}),getValueAsType=(e,t)=>t&&"number"==typeof e?t.transform(e):e,tN={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},tB=c.length;function buildHTMLStyles(e,t,n){let{style:o,vars:a,transformOrigin:s}=e,u=!1,h=!1;for(let e in t){let n=t[e];if(l.has(e)){u=!0;continue}if(M(e)){a[e]=n;continue}{let t=getValueAsType(n,eT[e]);e.startsWith("origin")?(h=!0,s[e]=t):o[e]=t}}if(!t.transform&&(u||n?o.transform=function(e,t,n){let o="",a=!0;for(let s=0;s<tB;s++){let l=c[s],u=e[l];if(void 0===u)continue;let h=!0;if(!(h="number"==typeof u?u===(l.startsWith("scale")?1:0):0===parseFloat(u))||n){let e=getValueAsType(u,eT[l]);if(!h){a=!1;let t=tN[l]||l;o+=`${t}(${e}) `}n&&(t[l]=e)}}return o=o.trim(),n?o=n(t,a?"":o):a&&(o="none"),o}(t,e.transform,n):o.transform&&(o.transform="none")),h){let{originX:e="50%",originY:t="50%",originZ:n=0}=s;o.transformOrigin=`${e} ${t} ${n}`}}function transform_origin_calcOrigin(e,t,n){return"string"==typeof e?e:$.transform(t+n*e)}let tD={offset:"stroke-dashoffset",array:"stroke-dasharray"},tL={offset:"strokeDashoffset",array:"strokeDasharray"};function buildSVGAttrs(e,{attrX:t,attrY:n,attrScale:o,originX:a,originY:s,pathLength:c,pathSpacing:l=1,pathOffset:u=0,...h},p,f){if(buildHTMLStyles(e,h,f),p){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:m,style:g,dimensions:y}=e;m.transform&&(y&&(g.transform=m.transform),delete m.transform),y&&(void 0!==a||void 0!==s||g.transform)&&(g.transformOrigin=function(e,t,n){let o=transform_origin_calcOrigin(t,e.x,e.width),a=transform_origin_calcOrigin(n,e.y,e.height);return`${o} ${a}`}(y,void 0!==a?a:.5,void 0!==s?s:.5)),void 0!==t&&(m.x=t),void 0!==n&&(m.y=n),void 0!==o&&(m.scale=o),void 0!==c&&function(e,t,n=1,o=0,a=!0){e.pathLength=1;let s=a?tD:tL;e[s.offset]=$.transform(-o);let c=$.transform(t),l=$.transform(n);e[s.array]=`${c} ${l}`}(m,c,l,u,!1)}let isSVGTag=e=>"string"==typeof e&&"svg"===e.toLowerCase(),tU={useVisualState:makeUseVisualState({scrapeMotionValuesFromProps:scrape_motion_values_scrapeMotionValuesFromProps,createRenderState:createSvgRenderState,onMount:(e,t,{renderState:n,latestValues:o})=>{_.read(()=>{try{n.dimensions="function"==typeof t.getBBox?t.getBBox():t.getBoundingClientRect()}catch(e){n.dimensions={x:0,y:0,width:0,height:0}}}),_.render(()=>{buildSVGAttrs(n,o,isSVGTag(t.tagName),e.transformTemplate),renderSVG(t,n)})}})},tF={useVisualState:makeUseVisualState({scrapeMotionValuesFromProps:scrapeMotionValuesFromProps,createRenderState:createHtmlRenderState})};function copyRawValuesOnly(e,t,n){for(let o in t)isMotionValue(t[o])||isForcedMotionValue(o,n)||(e[o]=t[o])}function useHTMLProps(e,t){let n={},o=function(e,t){let n=e.style||{},o={};return copyRawValuesOnly(o,n,e),Object.assign(o,function({transformTemplate:e},t){return(0,e2.useMemo)(()=>{let n=createHtmlRenderState();return buildHTMLStyles(n,t,e),Object.assign({},n.vars,n.style)},[t])}(e,t)),o}(e,t);return e.drag&&!1!==e.dragListener&&(n.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=!0===e.drag?"none":`pan-${"x"===e.drag?"y":"x"}`),void 0===e.tabIndex&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=o,n}let tq=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function isValidMotionProp(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||tq.has(e)}let shouldForward=e=>!isValidMotionProp(e);try{(g=require("@emotion/is-prop-valid").default)&&(shouldForward=e=>e.startsWith("on")?!isValidMotionProp(e):g(e))}catch(e){}function useSVGProps(e,t,n,o){let a=(0,e2.useMemo)(()=>{let n=createSvgRenderState();return buildSVGAttrs(n,t,isSVGTag(o),e.transformTemplate),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};copyRawValuesOnly(t,e.style,e),a.style={...t,...a.style}}return a}let tz={current:null},tH={current:!1},tj=new WeakMap,tV=[...ei,em,eC],findValueType=e=>tV.find(testValueType(e)),tG=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let VisualElement=class VisualElement{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:o,blockInitialAnimation:a,visualState:s},c={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=KeyframeResolver,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let e=eI.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,_.render(this.render,!1,!0))};let{latestValues:l,renderState:u}=s;this.latestValues=l,this.baseTarget={...l},this.initialValues=t.initial?{...l}:{},this.renderState=u,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=o,this.options=c,this.blockInitialAnimation=!!a,this.isControllingVariants=isControllingVariants(t),this.isVariantNode=isVariantNode(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);let{willChange:h,...p}=this.scrapeMotionValuesFromProps(t,{},this);for(let e in p){let t=p[e];void 0!==l[e]&&isMotionValue(t)&&t.set(l[e],!1)}}mount(e){this.current=e,tj.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),tH.current||function(){if(tH.current=!0,tx.j){if(window.matchMedia){let e=window.matchMedia("(prefers-reduced-motion)"),setReducedMotionPreferences=()=>tz.current=e.matches;e.addListener(setReducedMotionPreferences),setReducedMotionPreferences()}else tz.current=!1}}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||tz.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){for(let e in tj.delete(this.current),this.projection&&this.projection.unmount(),w(this.notifyUpdate),w(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this),this.events)this.events[e].clear();for(let e in this.features){let t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}bindToMotionValue(e,t){let n;this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();let o=l.has(e),a=t.on("change",t=>{this.latestValues[e]=t,this.props.onUpdate&&_.preRender(this.notifyUpdate),o&&this.projection&&(this.projection.isTransformDirty=!0)}),s=t.on("renderRequest",this.scheduleRender);window.MotionCheckAppearSync&&(n=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{a(),s(),n&&n(),t.owner&&t.stop()})}sortNodePosition(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}updateFeatures(){let e="animation";for(e in tI){let t=tI[e];if(!t)continue;let{isEnabled:n,Feature:o}=t;if(!this.features[e]&&o&&n(this.props)&&(this.features[e]=new o(this)),this.features[e]){let t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):createBox()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<tG.length;t++){let n=tG[t];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);let o="on"+n,a=e[o];a&&(this.propEventSubscriptions[n]=this.on(n,a))}this.prevMotionValues=function(e,t,n){for(let o in t){let a=t[o],s=n[o];if(isMotionValue(a))e.addValue(o,a);else if(isMotionValue(s))e.addValue(o,motionValue(a,{owner:e}));else if(s!==a){if(e.hasValue(o)){let t=e.getValue(o);!0===t.liveStyle?t.jump(a):t.hasAnimated||t.set(a)}else{let t=e.getStaticValue(o);e.addValue(o,motionValue(void 0!==t?t:a,{owner:e}))}}}for(let o in n)void 0===t[o]&&e.removeValue(o);return t}(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){let t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){let n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);let t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return void 0===n&&void 0!==t&&(n=motionValue(null===t?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){var n;let o=void 0===this.latestValues[e]&&this.current?null!==(n=this.getBaseTargetFromProps(this.props,e))&&void 0!==n?n:this.readValueFromInstance(this.current,e,this.options):this.latestValues[e];return null!=o&&("string"==typeof o&&(isNumericalString(o)||isZeroValueString(o))?o=parseFloat(o):!findValueType(o)&&eC.test(t)&&(o=animatable_none_getAnimatableNone(e,t)),this.setBaseTarget(e,isMotionValue(o)?o.get():o)),isMotionValue(o)?o.get():o}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){var t;let n;let{initial:o}=this.props;if("string"==typeof o||"object"==typeof o){let a=resolveVariantFromProps(this.props,o,null===(t=this.presenceContext)||void 0===t?void 0:t.custom);a&&(n=a[e])}if(o&&void 0!==n)return n;let a=this.getBaseTargetFromProps(this.props,e);return void 0===a||isMotionValue(a)?void 0!==this.initialValues[e]&&void 0===n?void 0:this.baseTarget[e]:a}on(e,t){return this.events[e]||(this.events[e]=new SubscriptionManager),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}};let DOMVisualElement=class DOMVisualElement extends VisualElement{constructor(){super(...arguments),this.KeyframeResolver=DOMKeyframesResolver}sortInstanceNodePosition(e,t){return 2&e.compareDocumentPosition(t)?1:-1}getBaseTargetFromProps(e,t){return e.style?e.style[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;isMotionValue(e)&&(this.childSubscription=e.on("change",e=>{this.current&&(this.current.textContent=`${e}`)}))}};let HTMLVisualElement=class HTMLVisualElement extends DOMVisualElement{constructor(){super(...arguments),this.type="html",this.renderInstance=renderHTML}readValueFromInstance(e,t){if(l.has(t)){let e=getDefaultValueType(t);return e&&e.default||0}{let n=window.getComputedStyle(e),o=(M(t)?n.getPropertyValue(t):n[t])||0;return"string"==typeof o?o.trim():o}}measureInstanceViewportBox(e,{transformPagePoint:t}){return measureViewportBox(e,t)}build(e,t,n){buildHTMLStyles(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return scrapeMotionValuesFromProps(e,t,n)}};let SVGVisualElement=class SVGVisualElement extends DOMVisualElement{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=createBox}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(l.has(t)){let e=getDefaultValueType(t);return e&&e.default||0}return t=tM.has(t)?t:camelToDash(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return scrape_motion_values_scrapeMotionValuesFromProps(e,t,n)}build(e,t,n){buildSVGAttrs(e,t,this.isSVGTag,n.transformTemplate)}renderInstance(e,t,n,o){renderSVG(e,t,n,o)}mount(e){this.isSVGTag=isSVGTag(e.tagName),super.mount(e)}};let tK=(y={animation:{Feature:class extends Feature{constructor(e){super(e),e.animationState||(e.animationState=function(e){let animate=t=>Promise.all(t.map(({animation:t,options:n})=>(function(e,t,n={}){let o;if(e.notify("AnimationStart",t),Array.isArray(t)){let a=t.map(t=>animateVariant(e,t,n));o=Promise.all(a)}else if("string"==typeof t)o=animateVariant(e,t,n);else{let a="function"==typeof t?resolveVariant(e,t,n.custom):t;o=Promise.all(animateTarget(e,a,n))}return o.then(()=>{e.notify("AnimationComplete",t)})})(e,t,n))),t=createState(),n=!0,buildResolvedTypeValues=t=>(n,o)=>{var a;let s=resolveVariant(e,o,"exit"===t?null===(a=e.presenceContext)||void 0===a?void 0:a.custom:void 0);if(s){let{transition:e,transitionEnd:t,...o}=s;n={...n,...o,...t}}return n};function animateChanges(o){let{props:a}=e,c=function getVariantContext(e){if(!e)return;if(!e.isControllingVariants){let t=e.parent&&getVariantContext(e.parent)||{};return void 0!==e.props.initial&&(t.initial=e.props.initial),t}let t={};for(let n=0;n<eJ;n++){let o=s[n],a=e.props[o];(isVariantLabel(a)||!1===a)&&(t[o]=a)}return t}(e.parent)||{},l=[],u=new Set,h={},p=1/0;for(let s=0;s<eQ;s++){var f;let m=eY[s],g=t[m],y=void 0!==a[m]?a[m]:c[m],v=isVariantLabel(y),b=m===o?g.isActive:null;!1===b&&(p=s);let C=y===c[m]&&y!==a[m]&&v;if(C&&n&&e.manuallyAnimateOnMount&&(C=!1),g.protectedKeys={...h},!g.isActive&&null===b||!y&&!g.prevProp||isAnimationControls(y)||"boolean"==typeof y)continue;let _=(f=g.prevProp,"string"==typeof y?y!==f:!!Array.isArray(y)&&!shallowCompare(y,f)),w=_||m===o&&g.isActive&&!C&&v||s>p&&v,S=!1,E=Array.isArray(y)?y:[y],T=E.reduce(buildResolvedTypeValues(m),{});!1===b&&(T={});let{prevResolvedValues:k={}}=g,I={...k,...T},markToAnimate=t=>{w=!0,u.has(t)&&(S=!0,u.delete(t)),g.needsAnimating[t]=!0;let n=e.getValue(t);n&&(n.liveStyle=!1)};for(let e in I){let t=T[e],n=k[e];if(!h.hasOwnProperty(e))(isKeyframesTarget(t)&&isKeyframesTarget(n)?shallowCompare(t,n):t===n)?void 0!==t&&u.has(e)?markToAnimate(e):g.protectedKeys[e]=!0:null!=t?markToAnimate(e):u.add(e)}g.prevProp=y,g.prevResolvedValues=T,g.isActive&&(h={...h,...T}),n&&e.blockInitialAnimation&&(w=!1);let x=C&&_,R=!x||S;w&&R&&l.push(...E.map(e=>({animation:e,options:{type:m}})))}if(u.size){let t={};u.forEach(n=>{let o=e.getBaseTarget(n),a=e.getValue(n);a&&(a.liveStyle=!0),t[n]=null!=o?o:null}),l.push({animation:t})}let m=!!l.length;return n&&(!1===a.initial||a.initial===a.animate)&&!e.manuallyAnimateOnMount&&(m=!1),n=!1,m?animate(l):Promise.resolve()}return{animateChanges,setActive:function(n,o){var a;if(t[n].isActive===o)return Promise.resolve();null===(a=e.variantChildren)||void 0===a||a.forEach(e=>{var t;return null===(t=e.animationState)||void 0===t?void 0:t.setActive(n,o)}),t[n].isActive=o;let s=animateChanges(n);for(let e in t)t[e].protectedKeys={};return s},setAnimateFunction:function(t){animate=t(e)},getState:()=>t,reset:()=>{t=createState(),n=!0}}}(e))}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();isAnimationControls(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),null===(e=this.unmountControls)||void 0===e||e.call(this)}}},exit:{Feature:class extends Feature{constructor(){super(...arguments),this.id=eX++}update(){if(!this.node.presenceContext)return;let{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;let o=this.node.animationState.setActive("exit",!e);t&&!e&&o.then(()=>t(this.id))}mount(){let{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}},inView:{Feature:class extends Feature{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();let{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:o="some",once:a}=e,s={root:t?t.current:void 0,rootMargin:n,threshold:"number"==typeof o?o:t_[o]};return function(e,t,n){let o=function({root:e,...t}){let n=e||document;tC.has(n)||tC.set(n,{});let o=tC.get(n),a=JSON.stringify(t);return o[a]||(o[a]=new IntersectionObserver(fireAllObserverCallbacks,{root:e,...t})),o[a]}(t);return tb.set(e,n),o.observe(e),()=>{tb.delete(e),o.unobserve(e)}}(this.node.current,s,e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,a&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",t);let{onViewportEnter:n,onViewportLeave:o}=this.node.getProps(),s=t?n:o;s&&s(e)})}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;let{props:e,prevProps:t}=this.node,n=["amount","margin","root"].some(function({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}(e,t));n&&this.startObserver()}unmount(){}}},tap:{Feature:class extends Feature{constructor(){super(...arguments),this.removeStartListeners=b.Z,this.removeEndListeners=b.Z,this.removeAccessibleListeners=b.Z,this.startPointerPress=(e,t)=>{if(this.isPressing)return;this.removeEndListeners();let n=this.node.getProps(),o=addPointerEvent(window,"pointerup",(e,t)=>{if(!this.checkPressEnd())return;let{onTap:n,onTapCancel:o,globalTapTarget:a}=this.node.getProps(),s=a||is_node_or_child_isNodeOrChild(this.node.current,e.target)?n:o;s&&_.update(()=>s(e,t))},{passive:!(n.onTap||n.onPointerUp)}),a=addPointerEvent(window,"pointercancel",(e,t)=>this.cancelPress(e,t),{passive:!(n.onTapCancel||n.onPointerCancel)});this.removeEndListeners=pipe(o,a),this.startPress(e,t)},this.startAccessiblePress=()=>{let e=addDomEvent(this.node.current,"keydown",e=>{"Enter"!==e.key||this.isPressing||(this.removeEndListeners(),this.removeEndListeners=addDomEvent(this.node.current,"keyup",e=>{"Enter"===e.key&&this.checkPressEnd()&&fireSyntheticPointerEvent("up",(e,t)=>{let{onTap:n}=this.node.getProps();n&&_.postRender(()=>n(e,t))})}),fireSyntheticPointerEvent("down",(e,t)=>{this.startPress(e,t)}))}),t=addDomEvent(this.node.current,"blur",()=>{this.isPressing&&fireSyntheticPointerEvent("cancel",(e,t)=>this.cancelPress(e,t))});this.removeAccessibleListeners=pipe(e,t)}}startPress(e,t){this.isPressing=!0;let{onTapStart:n,whileTap:o}=this.node.getProps();o&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),n&&_.postRender(()=>n(e,t))}checkPressEnd(){this.removeEndListeners(),this.isPressing=!1;let e=this.node.getProps();return e.whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!(eZ.x||eZ.y)}cancelPress(e,t){if(!this.checkPressEnd())return;let{onTapCancel:n}=this.node.getProps();n&&_.postRender(()=>n(e,t))}mount(){let e=this.node.getProps(),t=addPointerEvent(e.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(e.onTapStart||e.onPointerStart)}),n=addDomEvent(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=pipe(t,n)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}},focus:{Feature:class extends Feature{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch(t){e=!0}e&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=pipe(addDomEvent(this.node.current,"focus",()=>this.onFocus()),addDomEvent(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends Feature{mount(){let{current:e}=this.node;e&&(this.unmount=function(e,t,n={}){let[o,a,s]=function(e,t){let n=function(e,t,n){var o;if(e instanceof Element)return[e];if("string"==typeof e){let a=document;t&&(a=t.current);let s=null!==(o=null==n?void 0:n[e])&&void 0!==o?o:a.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e)}(e),o=new AbortController,a={passive:!0,...t,signal:o.signal};return[n,a,()=>o.abort()]}(e,n),c=filterEvents(e=>{let{target:n}=e,o=t(e);if("function"!=typeof o||!n)return;let s=filterEvents(e=>{o(e),n.removeEventListener("pointerleave",s)});n.addEventListener("pointerleave",s,a)});return o.forEach(e=>{e.addEventListener("pointerenter",c,a)}),s}(e,e=>(handleHoverEvent(this.node,e,"Start"),e=>handleHoverEvent(this.node,e,"End"))))}unmount(){}}},pan:{Feature:class extends Feature{constructor(){super(...arguments),this.removePointerDownListener=b.Z}onPointerDown(e){this.session=new PanSession(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:getContextWindow(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:o}=this.node.getProps();return{onSessionStart:asyncHandler(e),onStart:asyncHandler(t),onMove:n,onEnd:(e,t)=>{delete this.session,o&&_.postRender(()=>o(e,t))}}}mount(){this.removePointerDownListener=addPointerEvent(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends Feature{constructor(e){super(e),this.removeGroupControls=b.Z,this.removeListeners=b.Z,this.controls=new VisualElementDragControls(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||b.Z}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:tv,MeasureLayout:MeasureLayout},layout:{ProjectionNode:tv,MeasureLayout:MeasureLayout}},v=(e,t)=>isSVGComponent(e)?new SVGVisualElement(t):new HTMLVisualElement(t,{allowProjection:e!==e2.Fragment}),function(e,{forwardMotionProps:t}={forwardMotionProps:!1}){let n=isSVGComponent(e)?tU:tF,o={...n,preloadedFeatures:y,useRender:function(e=!1){return(t,n,o,{latestValues:a},s)=>{let c=isSVGComponent(t)?useSVGProps:useHTMLProps,l=c(n,a,s,t),u=function(e,t,n){let o={};for(let a in e)("values"!==a||"object"!=typeof e.values)&&(shouldForward(a)||!0===n&&isValidMotionProp(a)||!t&&!isValidMotionProp(a)||e.draggable&&a.startsWith("onDrag"))&&(o[a]=e[a]);return o}(n,"string"==typeof t,e),h=t!==e2.Fragment?{...u,...l,ref:o}:{},{children:p}=n,f=(0,e2.useMemo)(()=>isMotionValue(p)?p.get():p,[p]);return(0,e2.createElement)(t,{...h,children:f})}}(t),createVisualElement:v,Component:e};return function({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:o,Component:a}){e&&function(e){for(let t in e)tI[t]={...tI[t],...e[t]}}(e);let s=(0,e2.forwardRef)(function(e,s){var c;let l;let u={...(0,e2.useContext)(tw._),...e,layoutId:function({layoutId:e}){let t=(0,e2.useContext)(e3.p).id;return t&&void 0!==e?t+"-"+e:e}(e)},{isStatic:h}=u,p=function(e){let{initial:t,animate:n}=function(e,t){if(isControllingVariants(e)){let{initial:t,animate:n}=e;return{initial:!1===t||isVariantLabel(t)?t:void 0,animate:isVariantLabel(n)?n:void 0}}return!1!==e.inherit?t:{}}(e,(0,e2.useContext)(tS));return(0,e2.useMemo)(()=>({initial:t,animate:n}),[variantLabelsAsDependency(t),variantLabelsAsDependency(n)])}(e),f=o(e,h);if(!h&&tx.j){(0,e2.useContext)(tk).strict;let e=function(e){let{drag:t,layout:n}=tI;if(!t&&!n)return{};let o={...t,...n};return{MeasureLayout:(null==t?void 0:t.isEnabled(e))||(null==n?void 0:n.isEnabled(e))?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}(u);l=e.MeasureLayout,p.visualElement=function(e,t,n,o,a){var s,c;let{visualElement:l}=(0,e2.useContext)(tS),u=(0,e2.useContext)(tk),h=(0,e2.useContext)(tE.O),p=(0,e2.useContext)(tw._).reducedMotion,f=(0,e2.useRef)(null);o=o||u.renderer,!f.current&&o&&(f.current=o(e,{visualState:t,parent:l,props:n,presenceContext:h,blockInitialAnimation:!!h&&!1===h.initial,reducedMotionConfig:p}));let m=f.current,g=(0,e2.useContext)(e5);m&&!m.projection&&a&&("html"===m.type||"svg"===m.type)&&function(e,t,n,o){let{layoutId:a,layout:s,drag:c,dragConstraints:l,layoutScroll:u,layoutRoot:h}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:function getClosestProjectingNode(e){if(e)return!1!==e.options.allowProjection?e.projection:getClosestProjectingNode(e.parent)}(e.parent)),e.projection.setOptions({layoutId:a,layout:s,alwaysMeasureLayout:!!c||l&&isRefObject(l),visualElement:e,animationType:"string"==typeof s?s:"both",initialPromotionConfig:o,layoutScroll:u,layoutRoot:h})}(f.current,n,a,g);let y=(0,e2.useRef)(!1);(0,e2.useInsertionEffect)(()=>{m&&y.current&&m.update(n,h)});let v=n[e$],b=(0,e2.useRef)(!!v&&!(null===(s=window.MotionHandoffIsComplete)||void 0===s?void 0:s.call(window,v))&&(null===(c=window.MotionHasOptimisedAnimation)||void 0===c?void 0:c.call(window,v)));return(0,tT.L)(()=>{m&&(y.current=!0,window.MotionIsMounted=!0,m.updateFeatures(),e7.render(m.render),b.current&&m.animationState&&m.animationState.animateChanges())}),(0,e2.useEffect)(()=>{m&&(!b.current&&m.animationState&&m.animationState.animateChanges(),b.current&&(queueMicrotask(()=>{var e;null===(e=window.MotionHandoffMarkAsComplete)||void 0===e||e.call(window,v)}),b.current=!1))}),m}(a,f,u,t,e.ProjectionNode)}return(0,e1.jsxs)(tS.Provider,{value:p,children:[l&&p.visualElement?(0,e1.jsx)(l,{visualElement:p.visualElement,...u}):null,n(a,e,(c=p.visualElement,(0,e2.useCallback)(e=>{e&&f.mount&&f.mount(e),c&&(e?c.mount(e):c.unmount()),s&&("function"==typeof s?s(e):isRefObject(s)&&(s.current=e))},[c])),f,h,p.visualElement)]})});return s[tR]=a,s}(o)}),tW=function(e){if("undefined"==typeof Proxy)return e;let t=new Map;return new Proxy((...t)=>e(...t),{get:(n,o)=>"create"===o?e:(t.has(o)||t.set(o,e(o)),t.get(o))})}(tK)},3791:function(e,t,n){"use strict";n.d(t,{j:function(){return o}});let o="undefined"!=typeof window},3105:function(e,t,n){"use strict";n.d(t,{h:function(){return useConstant}});var o=n(2784);function useConstant(e){let t=(0,o.useRef)(null);return null===t.current&&(t.current=e()),t.current}},3617:function(e,t,n){"use strict";n.d(t,{L:function(){return s}});var o=n(2784),a=n(3791);let s=a.j?o.useLayoutEffect:o.useEffect},7781:function(e,t,n){"use strict";n.d(t,{K:function(){return a},k:function(){return s}});var o=n(7363);let a=o.Z,s=o.Z},7363:function(e,t,n){"use strict";n.d(t,{Z:function(){return noop}});let noop=e=>e}},function(e){var __webpack_exec__=function(t){return e(e.s=t)};e.O(0,[774,179],function(){return __webpack_exec__(6570),__webpack_exec__(5123)}),_N_E=e.O()}]);