@equinor/fusion-framework-cli 1.1.7 → 1.1.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -58,7 +58,7 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
58
58
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
59
59
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
60
60
  PERFORMANCE OF THIS SOFTWARE.
61
- ***************************************************************************** */var Uu=function(t,e){return Uu=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},Uu(t,e)};function ur(t,e){Uu(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var Te=function(){return Te=Object.assign||function(e){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},Te.apply(this,arguments)};function J(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(h){a(h)}}function c(d){try{l(n.throw(d))}catch(h){a(h)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})}function Z(t,e){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(l){return function(d){return c([l,d])}}function c(l){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return r.label++,{value:l[1],done:!1};case 5:r.label++,i=l[1],l=[0];continue;case 7:l=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){r=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){r.label=l[1];break}if(l[0]===6&&r.label<o[1]){r.label=o[1],o=l;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(l);break}o[2]&&r.ops.pop(),r.trys.pop();continue}l=e.call(t,r)}catch(d){l=[6,d],i=0}finally{n=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}function s1(){for(var t=0,e=0,r=arguments.length;e<r;e++)t+=arguments[e].length;for(var n=Array(t),i=0,e=0;e<r;e++)for(var o=arguments[e],a=0,s=o.length;a<s;a++,i++)n[i]=o[a];return n}/*! @azure/msal-common v8.0.0 2022-11-07 */var b={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=",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:"",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},_c=[b.OPENID_SCOPE,b.PROFILE_SCOPE,b.OFFLINE_ACCESS_SCOPE],Tp=s1(_c,[b.EMAIL_SCOPE]),nn;(function(t){t.CONTENT_TYPE="Content-Type",t.RETRY_AFTER="Retry-After",t.CCS_HEADER="X-AnchorMailbox",t.WWWAuthenticate="WWW-Authenticate",t.AuthenticationInfo="Authentication-Info",t.X_MS_REQUEST_ID="x-ms-request-id"})(nn||(nn={}));var ot;(function(t){t.ID_TOKEN="idtoken",t.CLIENT_INFO="client.info",t.ADAL_ID_TOKEN="adal.idtoken",t.ERROR="error",t.ERROR_DESC="error.description",t.ACTIVE_ACCOUNT="active-account",t.ACTIVE_ACCOUNT_FILTERS="active-account-filters"})(ot||(ot={}));var yd;(function(t){t.COMMON="common",t.ORGANIZATIONS="organizations",t.CONSUMERS="consumers"})(yd||(yd={}));var re;(function(t){t.CLIENT_ID="client_id",t.REDIRECT_URI="redirect_uri",t.RESPONSE_TYPE="response_type",t.RESPONSE_MODE="response_mode",t.GRANT_TYPE="grant_type",t.CLAIMS="claims",t.SCOPE="scope",t.ERROR="error",t.ERROR_DESCRIPTION="error_description",t.ACCESS_TOKEN="access_token",t.ID_TOKEN="id_token",t.REFRESH_TOKEN="refresh_token",t.EXPIRES_IN="expires_in",t.STATE="state",t.NONCE="nonce",t.PROMPT="prompt",t.SESSION_STATE="session_state",t.CLIENT_INFO="client_info",t.CODE="code",t.CODE_CHALLENGE="code_challenge",t.CODE_CHALLENGE_METHOD="code_challenge_method",t.CODE_VERIFIER="code_verifier",t.CLIENT_REQUEST_ID="client-request-id",t.X_CLIENT_SKU="x-client-SKU",t.X_CLIENT_VER="x-client-VER",t.X_CLIENT_OS="x-client-OS",t.X_CLIENT_CPU="x-client-CPU",t.X_CLIENT_CURR_TELEM="x-client-current-telemetry",t.X_CLIENT_LAST_TELEM="x-client-last-telemetry",t.X_MS_LIB_CAPABILITY="x-ms-lib-capability",t.X_APP_NAME="x-app-name",t.X_APP_VER="x-app-ver",t.POST_LOGOUT_URI="post_logout_redirect_uri",t.ID_TOKEN_HINT="id_token_hint",t.DEVICE_CODE="device_code",t.CLIENT_SECRET="client_secret",t.CLIENT_ASSERTION="client_assertion",t.CLIENT_ASSERTION_TYPE="client_assertion_type",t.TOKEN_TYPE="token_type",t.REQ_CNF="req_cnf",t.OBO_ASSERTION="assertion",t.REQUESTED_TOKEN_USE="requested_token_use",t.ON_BEHALF_OF="on_behalf_of",t.FOCI="foci",t.CCS_HEADER="X-AnchorMailbox",t.RETURN_SPA_CODE="return_spa_code",t.NATIVE_BROKER="nativebroker",t.LOGOUT_HINT="logout_hint"})(re||(re={}));var Xo;(function(t){t.ACCESS_TOKEN="access_token",t.XMS_CC="xms_cc"})(Xo||(Xo={}));var Nt={LOGIN:"login",SELECT_ACCOUNT:"select_account",CONSENT:"consent",NONE:"none",CREATE:"create",NO_SESSION:"no_session"},Is;(function(t){t.ACCOUNT="account",t.SID="sid",t.LOGIN_HINT="login_hint",t.ID_TOKEN="id_token",t.DOMAIN_HINT="domain_hint",t.ORGANIZATIONS="organizations",t.CONSUMERS="consumers",t.ACCOUNT_ID="accountIdentifier",t.HOMEACCOUNT_ID="homeAccountIdentifier"})(Is||(Is={}));var Ap={PLAIN:"plain",S256:"S256"},_d;(function(t){t.QUERY="query",t.FRAGMENT="fragment",t.FORM_POST="form_post"})(_d||(_d={}));var bd;(function(t){t.IMPLICIT_GRANT="implicit",t.AUTHORIZATION_CODE_GRANT="authorization_code",t.CLIENT_CREDENTIALS_GRANT="client_credentials",t.RESOURCE_OWNER_PASSWORD_GRANT="password",t.REFRESH_TOKEN_GRANT="refresh_token",t.DEVICE_CODE_GRANT="device_code",t.JWT_BEARER="urn:ietf:params:oauth:grant-type:jwt-bearer"})(bd||(bd={}));var Mn;(function(t){t.MSSTS_ACCOUNT_TYPE="MSSTS",t.ADFS_ACCOUNT_TYPE="ADFS",t.MSAV1_ACCOUNT_TYPE="MSA",t.GENERIC_ACCOUNT_TYPE="Generic"})(Mn||(Mn={}));var xr;(function(t){t.CACHE_KEY_SEPARATOR="-",t.CLIENT_INFO_SEPARATOR="."})(xr||(xr={}));var ce;(function(t){t.ID_TOKEN="IdToken",t.ACCESS_TOKEN="AccessToken",t.ACCESS_TOKEN_WITH_AUTH_SCHEME="AccessToken_With_AuthScheme",t.REFRESH_TOKEN="RefreshToken"})(ce||(ce={}));var no;(function(t){t.ACCOUNT="Account",t.CREDENTIAL="Credential",t.ID_TOKEN="IdToken",t.ACCESS_TOKEN="AccessToken",t.REFRESH_TOKEN="RefreshToken",t.APP_METADATA="AppMetadata",t.TEMPORARY="TempCache",t.TELEMETRY="Telemetry",t.UNDEFINED="Undefined",t.THROTTLING="Throttling"})(no||(no={}));var Ln;(function(t){t[t.ADFS=1001]="ADFS",t[t.MSA=1002]="MSA",t[t.MSSTS=1003]="MSSTS",t[t.GENERIC=1004]="GENERIC",t[t.ACCESS_TOKEN=2001]="ACCESS_TOKEN",t[t.REFRESH_TOKEN=2002]="REFRESH_TOKEN",t[t.ID_TOKEN=2003]="ID_TOKEN",t[t.APP_METADATA=3001]="APP_METADATA",t[t.UNDEFINED=9999]="UNDEFINED"})(Ln||(Ln={}));var Fu="appmetadata",vy="client_info",wd="1",Ms={CACHE_KEY:"authority-metadata",REFRESH_TIME_SECONDS:3600*24},Ar;(function(t){t.CONFIG="config",t.CACHE="cache",t.NETWORK="network",t.HARDCODED_VALUES="hardcoded_values"})(Ar||(Ar={}));var pt={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"},be;(function(t){t.BEARER="Bearer",t.POP="pop",t.SSH="ssh-cert"})(be||(be={}));var Ps={DEFAULT_THROTTLE_TIME_SECONDS:60,DEFAULT_MAX_THROTTLE_TIME_SECONDS:3600,THROTTLING_PREFIX:"throttling",X_MS_LIB_CAPABILITY_VALUE:"retry-after, h429"},Ip={INVALID_GRANT_ERROR:"invalid_grant",CLIENT_MISMATCH_ERROR:"client_mismatch"},xd;(function(t){t.username="username",t.password="password"})(xd||(xd={}));var Jo;(function(t){t[t.httpSuccess=200]="httpSuccess",t[t.httpBadRequest=400]="httpBadRequest"})(Jo||(Jo={}));var di;(function(t){t.FAILED_AUTO_DETECTION="1",t.INTERNAL_CACHE="2",t.ENVIRONMENT_VARIABLE="3",t.IMDS="4"})(di||(di={}));var Ki;(function(t){t.CONFIGURED_MATCHES_DETECTED="1",t.CONFIGURED_NO_AUTO_DETECTION="2",t.CONFIGURED_NOT_DETECTED="3",t.AUTO_DETECTION_REQUESTED_SUCCESSFUL="4",t.AUTO_DETECTION_REQUESTED_FAILED="5"})(Ki||(Ki={}));var Zi;(function(t){t.NO_CACHE_HIT="0",t.FORCE_REFRESH="1",t.NO_CACHED_ACCESS_TOKEN="2",t.CACHED_ACCESS_TOKEN_EXPIRED="3",t.REFRESH_CACHED_ACCESS_TOKEN="4"})(Zi||(Zi={}));var $u;(function(t){t.Jwt="JWT",t.Jwk="JWK"})($u||($u={}));/*! @azure/msal-common v8.0.0 2022-11-07 */var nl={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."}},Y=function(t){ur(e,t);function e(r,n,i){var o=this,a=n?r+": "+n:r;return o=t.call(this,a)||this,Object.setPrototypeOf(o,e.prototype),o.errorCode=r||b.EMPTY_STRING,o.errorMessage=n||b.EMPTY_STRING,o.subError=i||b.EMPTY_STRING,o.name="AuthError",o}return e.prototype.setCorrelationId=function(r){this.correlationId=r},e.createUnexpectedError=function(r){return new e(nl.unexpectedError.code,nl.unexpectedError.desc+": "+r)},e.createPostRequestFailed=function(r){return new e(nl.postRequestFailed.code,nl.postRequestFailed.desc+": "+r)},e}(Error);/*! @azure/msal-common v8.0.0 2022-11-07 */var Ed={createNewGuid:function(){var t="Crypto interface - createNewGuid() has not been implemented";throw Y.createUnexpectedError(t)},base64Decode:function(){var t="Crypto interface - base64Decode() has not been implemented";throw Y.createUnexpectedError(t)},base64Encode:function(){var t="Crypto interface - base64Encode() has not been implemented";throw Y.createUnexpectedError(t)},generatePkceCodes:function(){return J(this,void 0,void 0,function(){var t;return Z(this,function(e){throw t="Crypto interface - generatePkceCodes() has not been implemented",Y.createUnexpectedError(t)})})},getPublicKeyThumbprint:function(){return J(this,void 0,void 0,function(){var t;return Z(this,function(e){throw t="Crypto interface - getPublicKeyThumbprint() has not been implemented",Y.createUnexpectedError(t)})})},removeTokenBindingKey:function(){return J(this,void 0,void 0,function(){var t;return Z(this,function(e){throw t="Crypto interface - removeTokenBindingKey() has not been implemented",Y.createUnexpectedError(t)})})},clearKeystore:function(){return J(this,void 0,void 0,function(){var t;return Z(this,function(e){throw t="Crypto interface - clearKeystore() has not been implemented",Y.createUnexpectedError(t)})})},signJwt:function(){return J(this,void 0,void 0,function(){var t;return Z(this,function(e){throw t="Crypto interface - signJwt() has not been implemented",Y.createUnexpectedError(t)})})},hashString:function(){return J(this,void 0,void 0,function(){var t;return Z(this,function(e){throw t="Crypto interface - hashString() has not been implemented",Y.createUnexpectedError(t)})})}};/*! @azure/msal-common v8.0.0 2022-11-07 */var M={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."}},j=function(t){ur(e,t);function e(r,n){var i=t.call(this,r,n)||this;return i.name="ClientAuthError",Object.setPrototypeOf(i,e.prototype),i}return e.createClientInfoDecodingError=function(r){return new e(M.clientInfoDecodingError.code,M.clientInfoDecodingError.desc+" Failed with error: "+r)},e.createClientInfoEmptyError=function(){return new e(M.clientInfoEmptyError.code,""+M.clientInfoEmptyError.desc)},e.createTokenParsingError=function(r){return new e(M.tokenParsingError.code,M.tokenParsingError.desc+" Failed with error: "+r)},e.createTokenNullOrEmptyError=function(r){return new e(M.nullOrEmptyToken.code,M.nullOrEmptyToken.desc+" Raw Token Value: "+r)},e.createEndpointDiscoveryIncompleteError=function(r){return new e(M.endpointResolutionError.code,M.endpointResolutionError.desc+" Detail: "+r)},e.createNetworkError=function(r,n){return new e(M.networkError.code,M.networkError.desc+" | Fetch client threw: "+n+" | Attempted to reach: "+r.split("?")[0])},e.createUnableToGetOpenidConfigError=function(r){return new e(M.unableToGetOpenidConfigError.code,M.unableToGetOpenidConfigError.desc+" Attempted to retrieve endpoints from: "+r)},e.createHashNotDeserializedError=function(r){return new e(M.hashNotDeserialized.code,M.hashNotDeserialized.desc+" Given Object: "+r)},e.createInvalidStateError=function(r,n){return new e(M.invalidStateError.code,M.invalidStateError.desc+" Invalid State: "+r+", Root Err: "+n)},e.createStateMismatchError=function(){return new e(M.stateMismatchError.code,M.stateMismatchError.desc)},e.createStateNotFoundError=function(r){return new e(M.stateNotFoundError.code,M.stateNotFoundError.desc+": "+r)},e.createNonceMismatchError=function(){return new e(M.nonceMismatchError.code,M.nonceMismatchError.desc)},e.createAuthTimeNotFoundError=function(){return new e(M.authTimeNotFoundError.code,M.authTimeNotFoundError.desc)},e.createMaxAgeTranspiredError=function(){return new e(M.maxAgeTranspiredError.code,M.maxAgeTranspiredError.desc)},e.createNonceNotFoundError=function(r){return new e(M.nonceNotFoundError.code,M.nonceNotFoundError.desc+": "+r)},e.createMultipleMatchingTokensInCacheError=function(){return new e(M.multipleMatchingTokens.code,M.multipleMatchingTokens.desc+".")},e.createMultipleMatchingAccountsInCacheError=function(){return new e(M.multipleMatchingAccounts.code,M.multipleMatchingAccounts.desc)},e.createMultipleMatchingAppMetadataInCacheError=function(){return new e(M.multipleMatchingAppMetadata.code,M.multipleMatchingAppMetadata.desc)},e.createTokenRequestCannotBeMadeError=function(){return new e(M.tokenRequestCannotBeMade.code,M.tokenRequestCannotBeMade.desc)},e.createAppendEmptyScopeToSetError=function(r){return new e(M.appendEmptyScopeError.code,M.appendEmptyScopeError.desc+" Given Scope: "+r)},e.createRemoveEmptyScopeFromSetError=function(r){return new e(M.removeEmptyScopeError.code,M.removeEmptyScopeError.desc+" Given Scope: "+r)},e.createAppendScopeSetError=function(r){return new e(M.appendScopeSetError.code,M.appendScopeSetError.desc+" Detail Error: "+r)},e.createEmptyInputScopeSetError=function(){return new e(M.emptyInputScopeSetError.code,""+M.emptyInputScopeSetError.desc)},e.createDeviceCodeCancelledError=function(){return new e(M.DeviceCodePollingCancelled.code,""+M.DeviceCodePollingCancelled.desc)},e.createDeviceCodeExpiredError=function(){return new e(M.DeviceCodeExpired.code,""+M.DeviceCodeExpired.desc)},e.createDeviceCodeUnknownError=function(){return new e(M.DeviceCodeUnknownError.code,""+M.DeviceCodeUnknownError.desc)},e.createNoAccountInSilentRequestError=function(){return new e(M.NoAccountInSilentRequest.code,""+M.NoAccountInSilentRequest.desc)},e.createNullOrUndefinedCacheRecord=function(){return new e(M.invalidCacheRecord.code,M.invalidCacheRecord.desc)},e.createInvalidCacheEnvironmentError=function(){return new e(M.invalidCacheEnvironment.code,M.invalidCacheEnvironment.desc)},e.createNoAccountFoundError=function(){return new e(M.noAccountFound.code,M.noAccountFound.desc)},e.createCachePluginError=function(){return new e(M.CachePluginError.code,""+M.CachePluginError.desc)},e.createNoCryptoObjectError=function(r){return new e(M.noCryptoObj.code,""+M.noCryptoObj.desc+r)},e.createInvalidCacheTypeError=function(){return new e(M.invalidCacheType.code,""+M.invalidCacheType.desc)},e.createUnexpectedAccountTypeError=function(){return new e(M.unexpectedAccountType.code,""+M.unexpectedAccountType.desc)},e.createUnexpectedCredentialTypeError=function(){return new e(M.unexpectedCredentialType.code,""+M.unexpectedCredentialType.desc)},e.createInvalidAssertionError=function(){return new e(M.invalidAssertion.code,""+M.invalidAssertion.desc)},e.createInvalidCredentialError=function(){return new e(M.invalidClientCredential.code,""+M.invalidClientCredential.desc)},e.createRefreshRequiredError=function(){return new e(M.tokenRefreshRequired.code,M.tokenRefreshRequired.desc)},e.createUserTimeoutReachedError=function(){return new e(M.userTimeoutReached.code,M.userTimeoutReached.desc)},e.createTokenClaimsRequiredError=function(){return new e(M.tokenClaimsRequired.code,M.tokenClaimsRequired.desc)},e.createNoAuthCodeInServerResponseError=function(){return new e(M.noAuthorizationCodeFromServer.code,M.noAuthorizationCodeFromServer.desc)},e.createBindingKeyNotRemovedError=function(){return new e(M.bindingKeyNotRemovedError.code,M.bindingKeyNotRemovedError.desc)},e.createLogoutNotSupportedError=function(){return new e(M.logoutNotSupported.code,M.logoutNotSupported.desc)},e.createKeyIdMissingError=function(){return new e(M.keyIdMissing.code,M.keyIdMissing.desc)},e}(Y);/*! @azure/msal-common v8.0.0 2022-11-07 */var N=function(){function t(){}return t.decodeAuthToken=function(e){if(t.isEmpty(e))throw j.createTokenNullOrEmptyError(e);var r=/^([^\.\s]*)\.([^\.\s]+)\.([^\.\s]*)$/,n=r.exec(e);if(!n||n.length<4)throw j.createTokenParsingError("Given token is malformed: "+JSON.stringify(e));var i={header:n[1],JWSPayload:n[2],JWSSig:n[3]};return i},t.isEmpty=function(e){return typeof e>"u"||!e||e.length===0},t.isEmptyObj=function(e){if(e&&!t.isEmpty(e))try{var r=JSON.parse(e);return Object.keys(r).length===0}catch{}return!0},t.startsWith=function(e,r){return e.indexOf(r)===0},t.endsWith=function(e,r){return e.length>=r.length&&e.lastIndexOf(r)===e.length-r.length},t.queryStringToObject=function(e){var r={},n=e.split("&"),i=function(o){return decodeURIComponent(o.replace(/\+/g," "))};return n.forEach(function(o){if(o.trim()){var a=o.split(/=(.+)/g,2),s=a[0],c=a[1];s&&c&&(r[i(s)]=i(c))}}),r},t.trimArrayEntries=function(e){return e.map(function(r){return r.trim()})},t.removeEmptyStringsFromArray=function(e){return e.filter(function(r){return!t.isEmpty(r)})},t.jsonParseHelper=function(e){try{return JSON.parse(e)}catch{return null}},t.matchPattern=function(e,r){var n=new RegExp(e.replace(/\\/g,"\\\\").replace(/\*/g,"[^ ]*").replace(/\?/g,"\\?"));return n.test(r)},t}();/*! @azure/msal-common v8.0.0 2022-11-07 */var Qe;(function(t){t[t.Error=0]="Error",t[t.Warning=1]="Warning",t[t.Info=2]="Info",t[t.Verbose=3]="Verbose",t[t.Trace=4]="Trace"})(Qe||(Qe={}));var P0=function(){function t(e,r,n){this.level=Qe.Info;var i=function(){};this.localCallback=e.loggerCallback||i,this.piiLoggingEnabled=e.piiLoggingEnabled||!1,this.level=typeof e.logLevel=="number"?e.logLevel:Qe.Info,this.correlationId=e.correlationId||b.EMPTY_STRING,this.packageName=r||b.EMPTY_STRING,this.packageVersion=n||b.EMPTY_STRING}return t.prototype.clone=function(e,r,n){return new t({loggerCallback:this.localCallback,piiLoggingEnabled:this.piiLoggingEnabled,logLevel:this.level,correlationId:n||this.correlationId},e,r)},t.prototype.logMessage=function(e,r){if(!(r.logLevel>this.level||!this.piiLoggingEnabled&&r.containsPii)){var n=new Date().toUTCString(),i;N.isEmpty(r.correlationId)?N.isEmpty(this.correlationId)?i="["+n+"]":i="["+n+"] : ["+this.correlationId+"]":i="["+n+"] : ["+r.correlationId+"]";var o=i+" : "+this.packageName+"@"+this.packageVersion+" : "+Qe[r.logLevel]+" - "+e;this.executeCallback(r.logLevel,o,r.containsPii||!1)}},t.prototype.executeCallback=function(e,r,n){this.localCallback&&this.localCallback(e,r,n)},t.prototype.error=function(e,r){this.logMessage(e,{logLevel:Qe.Error,containsPii:!1,correlationId:r||b.EMPTY_STRING})},t.prototype.errorPii=function(e,r){this.logMessage(e,{logLevel:Qe.Error,containsPii:!0,correlationId:r||b.EMPTY_STRING})},t.prototype.warning=function(e,r){this.logMessage(e,{logLevel:Qe.Warning,containsPii:!1,correlationId:r||b.EMPTY_STRING})},t.prototype.warningPii=function(e,r){this.logMessage(e,{logLevel:Qe.Warning,containsPii:!0,correlationId:r||b.EMPTY_STRING})},t.prototype.info=function(e,r){this.logMessage(e,{logLevel:Qe.Info,containsPii:!1,correlationId:r||b.EMPTY_STRING})},t.prototype.infoPii=function(e,r){this.logMessage(e,{logLevel:Qe.Info,containsPii:!0,correlationId:r||b.EMPTY_STRING})},t.prototype.verbose=function(e,r){this.logMessage(e,{logLevel:Qe.Verbose,containsPii:!1,correlationId:r||b.EMPTY_STRING})},t.prototype.verbosePii=function(e,r){this.logMessage(e,{logLevel:Qe.Verbose,containsPii:!0,correlationId:r||b.EMPTY_STRING})},t.prototype.trace=function(e,r){this.logMessage(e,{logLevel:Qe.Trace,containsPii:!1,correlationId:r||b.EMPTY_STRING})},t.prototype.tracePii=function(e,r){this.logMessage(e,{logLevel:Qe.Trace,containsPii:!0,correlationId:r||b.EMPTY_STRING})},t.prototype.isPiiLoggingEnabled=function(){return this.piiLoggingEnabled||!1},t}();/*! @azure/msal-common v8.0.0 2022-11-07 */var gy="@azure/msal-common",Sg="8.0.0";/*! @azure/msal-common v8.0.0 2022-11-07 */var tc;(function(t){t[t.None=0]="None",t.AzurePublic="https://login.microsoftonline.com",t.AzurePpe="https://login.windows-ppe.net",t.AzureChina="https://login.chinacloudapi.cn",t.AzureGermany="https://login.microsoftonline.de",t.AzureUsGovernment="https://login.microsoftonline.us"})(tc||(tc={}));/*! @azure/msal-common v8.0.0 2022-11-07 */var rc=function(){function t(){}return t.prototype.generateAccountId=function(){return t.generateAccountIdForCacheKey(this.homeAccountId,this.environment)},t.prototype.generateCredentialId=function(){return t.generateCredentialIdForCacheKey(this.credentialType,this.clientId,this.realm,this.familyId)},t.prototype.generateTarget=function(){return t.generateTargetForCacheKey(this.target)},t.prototype.generateCredentialKey=function(){return t.generateCredentialCacheKey(this.homeAccountId,this.environment,this.credentialType,this.clientId,this.realm,this.target,this.familyId,this.tokenType,this.requestedClaimsHash)},t.prototype.generateType=function(){switch(this.credentialType){case ce.ID_TOKEN:return Ln.ID_TOKEN;case ce.ACCESS_TOKEN:case ce.ACCESS_TOKEN_WITH_AUTH_SCHEME:return Ln.ACCESS_TOKEN;case ce.REFRESH_TOKEN:return Ln.REFRESH_TOKEN;default:throw j.createUnexpectedCredentialTypeError()}},t.getCredentialType=function(e){return e.indexOf(ce.ACCESS_TOKEN.toLowerCase())!==-1?e.indexOf(ce.ACCESS_TOKEN_WITH_AUTH_SCHEME.toLowerCase())!==-1?ce.ACCESS_TOKEN_WITH_AUTH_SCHEME:ce.ACCESS_TOKEN:e.indexOf(ce.ID_TOKEN.toLowerCase())!==-1?ce.ID_TOKEN:e.indexOf(ce.REFRESH_TOKEN.toLowerCase())!==-1?ce.REFRESH_TOKEN:b.NOT_DEFINED},t.generateCredentialCacheKey=function(e,r,n,i,o,a,s,c,l){var d=[this.generateAccountIdForCacheKey(e,r),this.generateCredentialIdForCacheKey(n,i,o,s),this.generateTargetForCacheKey(a),this.generateClaimsHashForCacheKey(l),this.generateSchemeForCacheKey(c)];return d.join(xr.CACHE_KEY_SEPARATOR).toLowerCase()},t.generateAccountIdForCacheKey=function(e,r){var n=[e,r];return n.join(xr.CACHE_KEY_SEPARATOR).toLowerCase()},t.generateCredentialIdForCacheKey=function(e,r,n,i){var o=e===ce.REFRESH_TOKEN&&i||r,a=[e,o,n||b.EMPTY_STRING];return a.join(xr.CACHE_KEY_SEPARATOR).toLowerCase()},t.generateTargetForCacheKey=function(e){return(e||b.EMPTY_STRING).toLowerCase()},t.generateClaimsHashForCacheKey=function(e){return(e||b.EMPTY_STRING).toLowerCase()},t.generateSchemeForCacheKey=function(e){return e&&e.toLowerCase()!==be.BEARER.toLowerCase()?e.toLowerCase():b.EMPTY_STRING},t}();/*! @azure/msal-common v8.0.0 2022-11-07 */var te={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."},nonArrayScopesError:{code:"nonarray_input_scopes_error",desc:"Scopes cannot be passed as non-array."},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"}},He=function(t){ur(e,t);function e(r,n){var i=t.call(this,r,n)||this;return i.name="ClientConfigurationError",Object.setPrototypeOf(i,e.prototype),i}return e.createRedirectUriEmptyError=function(){return new e(te.redirectUriNotSet.code,te.redirectUriNotSet.desc)},e.createPostLogoutRedirectUriEmptyError=function(){return new e(te.postLogoutUriNotSet.code,te.postLogoutUriNotSet.desc)},e.createClaimsRequestParsingError=function(r){return new e(te.claimsRequestParsingError.code,te.claimsRequestParsingError.desc+" Given value: "+r)},e.createInsecureAuthorityUriError=function(r){return new e(te.authorityUriInsecure.code,te.authorityUriInsecure.desc+" Given URI: "+r)},e.createUrlParseError=function(r){return new e(te.urlParseError.code,te.urlParseError.desc+" Given Error: "+r)},e.createUrlEmptyError=function(){return new e(te.urlEmptyError.code,te.urlEmptyError.desc)},e.createEmptyScopesArrayError=function(){return new e(te.emptyScopesError.code,""+te.emptyScopesError.desc)},e.createClientIdSingleScopeError=function(r){return new e(te.clientIdSingleScopeError.code,te.clientIdSingleScopeError.desc+" Given Scopes: "+r)},e.createInvalidPromptError=function(r){return new e(te.invalidPrompt.code,te.invalidPrompt.desc+" Given value: "+r)},e.createInvalidClaimsRequestError=function(){return new e(te.invalidClaimsRequest.code,te.invalidClaimsRequest.desc)},e.createEmptyLogoutRequestError=function(){return new e(te.logoutRequestEmptyError.code,te.logoutRequestEmptyError.desc)},e.createEmptyTokenRequestError=function(){return new e(te.tokenRequestEmptyError.code,te.tokenRequestEmptyError.desc)},e.createInvalidCodeChallengeMethodError=function(){return new e(te.invalidCodeChallengeMethod.code,te.invalidCodeChallengeMethod.desc)},e.createInvalidCodeChallengeParamsError=function(){return new e(te.invalidCodeChallengeParams.code,te.invalidCodeChallengeParams.desc)},e.createInvalidCloudDiscoveryMetadataError=function(){return new e(te.invalidCloudDiscoveryMetadata.code,te.invalidCloudDiscoveryMetadata.desc)},e.createInvalidAuthorityMetadataError=function(){return new e(te.invalidAuthorityMetadata.code,te.invalidAuthorityMetadata.desc)},e.createUntrustedAuthorityError=function(){return new e(te.untrustedAuthority.code,te.untrustedAuthority.desc)},e.createInvalidAzureCloudInstanceError=function(){return new e(te.invalidAzureCloudInstance.code,te.invalidAzureCloudInstance.desc)},e.createMissingSshJwkError=function(){return new e(te.missingSshJwk.code,te.missingSshJwk.desc)},e.createMissingSshKidError=function(){return new e(te.missingSshKid.code,te.missingSshKid.desc)},e.createMissingNonceAuthenticationHeadersError=function(){return new e(te.missingNonceAuthenticationHeader.code,te.missingNonceAuthenticationHeader.desc)},e.createInvalidAuthenticationHeaderError=function(r,n){return new e(te.invalidAuthenticationHeader.code,te.invalidAuthenticationHeader.desc+". Invalid header: "+r+". Details: "+n)},e}(j);/*! @azure/msal-common v8.0.0 2022-11-07 */var Wt=function(){function t(e){var r=this,n=e?N.trimArrayEntries(s1(e)):[],i=n?N.removeEmptyStringsFromArray(n):[];this.validateInputScopes(i),this.scopes=new Set,i.forEach(function(o){return r.scopes.add(o)})}return t.fromString=function(e){var r=e||b.EMPTY_STRING,n=r.split(" ");return new t(n)},t.prototype.validateInputScopes=function(e){if(!e||e.length<1)throw He.createEmptyScopesArrayError()},t.prototype.containsScope=function(e){var r=this.printScopesLowerCase().split(" "),n=new t(r);return N.isEmpty(e)?!1:n.scopes.has(e.toLowerCase())},t.prototype.containsScopeSet=function(e){var r=this;return!e||e.scopes.size<=0?!1:this.scopes.size>=e.scopes.size&&e.asArray().every(function(n){return r.containsScope(n)})},t.prototype.containsOnlyOIDCScopes=function(){var e=this,r=0;return Tp.forEach(function(n){e.containsScope(n)&&(r+=1)}),this.scopes.size===r},t.prototype.appendScope=function(e){N.isEmpty(e)||this.scopes.add(e.trim())},t.prototype.appendScopes=function(e){var r=this;try{e.forEach(function(n){return r.appendScope(n)})}catch(n){throw j.createAppendScopeSetError(n)}},t.prototype.removeScope=function(e){if(N.isEmpty(e))throw j.createRemoveEmptyScopeFromSetError(e);this.scopes.delete(e.trim())},t.prototype.removeOIDCScopes=function(){var e=this;Tp.forEach(function(r){e.scopes.delete(r)})},t.prototype.unionScopeSets=function(e){if(!e)throw j.createEmptyInputScopeSetError();var r=new Set;return e.scopes.forEach(function(n){return r.add(n.toLowerCase())}),this.scopes.forEach(function(n){return r.add(n.toLowerCase())}),r},t.prototype.intersectingScopeSets=function(e){if(!e)throw j.createEmptyInputScopeSetError();e.containsOnlyOIDCScopes()||e.removeOIDCScopes();var r=this.unionScopeSets(e),n=e.getScopeCount(),i=this.getScopeCount(),o=r.size;return o<i+n},t.prototype.getScopeCount=function(){return this.scopes.size},t.prototype.asArray=function(){var e=[];return this.scopes.forEach(function(r){return e.push(r)}),e},t.prototype.printScopes=function(){if(this.scopes){var e=this.asArray();return e.join(" ")}return b.EMPTY_STRING},t.prototype.printScopesLowerCase=function(){return this.printScopes().toLowerCase()},t}();/*! @azure/msal-common v8.0.0 2022-11-07 */function Cd(t,e){if(N.isEmpty(t))throw j.createClientInfoEmptyError();try{var r=e.base64Decode(t);return JSON.parse(r)}catch(n){throw j.createClientInfoDecodingError(n.message)}}function Zo(t){if(N.isEmpty(t))throw j.createClientInfoDecodingError("Home account ID was empty.");var e=t.split(xr.CLIENT_INFO_SEPARATOR,2);return{uid:e[0],utid:e.length<2?b.EMPTY_STRING:e[1]}}/*! @azure/msal-common v8.0.0 2022-11-07 */var Hr;(function(t){t[t.Default=0]="Default",t[t.Adfs=1]="Adfs",t[t.Dsts=2]="Dsts"})(Hr||(Hr={}));/*! @azure/msal-common v8.0.0 2022-11-07 */var _t=function(){function t(){}return t.prototype.generateAccountId=function(){var e=[this.homeAccountId,this.environment];return e.join(xr.CACHE_KEY_SEPARATOR).toLowerCase()},t.prototype.generateAccountKey=function(){return t.generateAccountCacheKey({homeAccountId:this.homeAccountId,environment:this.environment,tenantId:this.realm,username:this.username,localAccountId:this.localAccountId})},t.prototype.generateType=function(){switch(this.authorityType){case Mn.ADFS_ACCOUNT_TYPE:return Ln.ADFS;case Mn.MSAV1_ACCOUNT_TYPE:return Ln.MSA;case Mn.MSSTS_ACCOUNT_TYPE:return Ln.MSSTS;case Mn.GENERIC_ACCOUNT_TYPE:return Ln.GENERIC;default:throw j.createUnexpectedAccountTypeError()}},t.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}},t.generateAccountCacheKey=function(e){var r=[e.homeAccountId,e.environment||b.EMPTY_STRING,e.tenantId||b.EMPTY_STRING];return r.join(xr.CACHE_KEY_SEPARATOR).toLowerCase()},t.createAccount=function(e,r,n,i,o,a,s,c){var l,d,h,u,f,v,g=new t;g.authorityType=Mn.MSSTS_ACCOUNT_TYPE,g.clientInfo=e,g.homeAccountId=r,g.nativeAccountId=c;var x=s||i&&i.getPreferredCache();if(!x)throw j.createInvalidCacheEnvironmentError();if(g.environment=x,g.realm=((l=n==null?void 0:n.claims)===null||l===void 0?void 0:l.tid)||b.EMPTY_STRING,n){g.idTokenClaims=n.claims,g.localAccountId=((d=n==null?void 0:n.claims)===null||d===void 0?void 0:d.oid)||((h=n==null?void 0:n.claims)===null||h===void 0?void 0:h.sub)||b.EMPTY_STRING;var m=(u=n==null?void 0:n.claims)===null||u===void 0?void 0:u.preferred_username,p=!((f=n==null?void 0:n.claims)===null||f===void 0)&&f.emails?n.claims.emails[0]:null;g.username=m||p||b.EMPTY_STRING,g.name=(v=n==null?void 0:n.claims)===null||v===void 0?void 0:v.name}return g.cloudGraphHostName=o,g.msGraphHost=a,g},t.createGenericAccount=function(e,r,n,i,o,a){var s,c,l,d,h=new t;h.authorityType=n&&n.authorityType===Hr.Adfs?Mn.ADFS_ACCOUNT_TYPE:Mn.GENERIC_ACCOUNT_TYPE,h.homeAccountId=e,h.realm=b.EMPTY_STRING;var u=a||n&&n.getPreferredCache();if(!u)throw j.createInvalidCacheEnvironmentError();return r&&(h.localAccountId=((s=r==null?void 0:r.claims)===null||s===void 0?void 0:s.oid)||((c=r==null?void 0:r.claims)===null||c===void 0?void 0:c.sub)||b.EMPTY_STRING,h.username=((l=r==null?void 0:r.claims)===null||l===void 0?void 0:l.upn)||b.EMPTY_STRING,h.name=((d=r==null?void 0:r.claims)===null||d===void 0?void 0:d.name)||b.EMPTY_STRING,h.idTokenClaims=r==null?void 0:r.claims),h.environment=u,h.cloudGraphHostName=i,h.msGraphHost=o,h},t.generateHomeAccountId=function(e,r,n,i,o){var a,s=!((a=o==null?void 0:o.claims)===null||a===void 0)&&a.sub?o.claims.sub:b.EMPTY_STRING;if(r===Hr.Adfs||r===Hr.Dsts)return s;if(e)try{var c=Cd(e,i);if(!N.isEmpty(c.uid)&&!N.isEmpty(c.utid))return""+c.uid+xr.CLIENT_INFO_SEPARATOR+c.utid}catch{}return n.verbose("No client info in response"),s},t.isAccountEntity=function(e){return e?e.hasOwnProperty("homeAccountId")&&e.hasOwnProperty("environment")&&e.hasOwnProperty("realm")&&e.hasOwnProperty("localAccountId")&&e.hasOwnProperty("username")&&e.hasOwnProperty("authorityType"):!1},t.accountInfoIsEqual=function(e,r,n){if(!e||!r)return!1;var i=!0;if(n){var o=e.idTokenClaims||{},a=r.idTokenClaims||{};i=o.iat===a.iat&&o.nonce===a.nonce}return e.homeAccountId===r.homeAccountId&&e.localAccountId===r.localAccountId&&e.username===r.username&&e.tenantId===r.tenantId&&e.environment===r.environment&&e.nativeAccountId===r.nativeAccountId&&i},t}();/*! @azure/msal-common v8.0.0 2022-11-07 */var wn=function(){function t(e,r){if(N.isEmpty(e))throw j.createTokenNullOrEmptyError(e);this.rawToken=e,this.claims=t.extractTokenClaims(e,r)}return t.extractTokenClaims=function(e,r){var n=N.decodeAuthToken(e);try{var i=n.JWSPayload,o=r.base64Decode(i);return JSON.parse(o)}catch(a){throw j.createTokenParsingError(a)}},t.checkMaxAge=function(e,r){var n=3e5;if(r===0||Date.now()-n>e+r)throw j.createMaxAgeTranspiredError()},t}();/*! @azure/msal-common v8.0.0 2022-11-07 */var Wr=function(){function t(e,r){this.clientId=e,this.cryptoImpl=r}return t.prototype.getAllAccounts=function(){var e=this,r=this.getAccountsFilteredBy(),n=Object.keys(r).map(function(a){return r[a]}),i=n.length;if(i<1)return[];var o=n.map(function(a){var s=t.toObject(new _t,a),c=s.getAccountInfo(),l=e.readIdTokenFromCache(e.clientId,c);return l&&!c.idTokenClaims&&(c.idToken=l.secret,c.idTokenClaims=new wn(l.secret,e.cryptoImpl).claims),c});return o},t.prototype.saveCacheRecord=function(e){return J(this,void 0,void 0,function(){return Z(this,function(r){switch(r.label){case 0:if(!e)throw j.createNullOrUndefinedCacheRecord();return e.account&&this.setAccount(e.account),e.idToken&&this.setIdTokenCredential(e.idToken),e.accessToken?[4,this.saveAccessToken(e.accessToken)]:[3,2];case 1:r.sent(),r.label=2;case 2:return e.refreshToken&&this.setRefreshTokenCredential(e.refreshToken),e.appMetadata&&this.setAppMetadata(e.appMetadata),[2]}})})},t.prototype.saveAccessToken=function(e){return J(this,void 0,void 0,function(){var r,n,i,o,a=this;return Z(this,function(s){switch(s.label){case 0:return r=this.getCredentialsFilteredBy({clientId:e.clientId,credentialType:e.credentialType,environment:e.environment,homeAccountId:e.homeAccountId,realm:e.realm,tokenType:e.tokenType,requestedClaimsHash:e.requestedClaimsHash}),n=Wt.fromString(e.target),i=Object.keys(r.accessTokens).map(function(c){return r.accessTokens[c]}),i?(o=[],i.forEach(function(c){var l=Wt.fromString(c.target);l.intersectingScopeSets(n)&&o.push(a.removeCredential(c))}),[4,Promise.all(o)]):[3,2];case 1:s.sent(),s.label=2;case 2:return this.setAccessTokenCredential(e),[2]}})})},t.prototype.getAccountsFilteredBy=function(e){return this.getAccountsFilteredByInternal(e?e.homeAccountId:b.EMPTY_STRING,e?e.environment:b.EMPTY_STRING,e?e.realm:b.EMPTY_STRING,e?e.nativeAccountId:b.EMPTY_STRING)},t.prototype.getAccountsFilteredByInternal=function(e,r,n,i){var o=this,a=this.getKeys(),s={};return a.forEach(function(c){var l=o.getAccount(c);!l||!!e&&!o.matchHomeAccountId(l,e)||!!r&&!o.matchEnvironment(l,r)||!!n&&!o.matchRealm(l,n)||!!i&&!o.matchNativeAccountId(l,i)||(s[c]=l)}),s},t.prototype.getCredentialsFilteredBy=function(e){return this.getCredentialsFilteredByInternal(e.homeAccountId,e.environment,e.credentialType,e.clientId,e.familyId,e.realm,e.target,e.userAssertionHash,e.tokenType,e.keyId,e.requestedClaimsHash)},t.prototype.getCredentialsFilteredByInternal=function(e,r,n,i,o,a,s,c,l,d,h){var u=this,f=this.getKeys(),v={idTokens:{},accessTokens:{},refreshTokens:{}};return f.forEach(function(g){var x=rc.getCredentialType(g);if(x!==b.NOT_DEFINED){var m=u.getSpecificCredential(g,x);if(!!m&&!(!!c&&!u.matchUserAssertionHash(m,c))&&!(typeof e=="string"&&!u.matchHomeAccountId(m,e))&&!(!!r&&!u.matchEnvironment(m,r))&&!(!!a&&!u.matchRealm(m,a))&&!(!!n&&!u.matchCredentialType(m,n))&&!(!!i&&!u.matchClientId(m,i))&&!(!!o&&!u.matchFamilyId(m,o))&&!(!!s&&!u.matchTarget(m,s))&&!((h||m.requestedClaimsHash)&&m.requestedClaimsHash!==h)&&!(n===ce.ACCESS_TOKEN_WITH_AUTH_SCHEME&&(!!l&&!u.matchTokenType(m,l)||l===be.SSH&&d&&!u.matchKeyId(m,d)))){var p=u.updateCredentialCacheKey(g,m);switch(x){case ce.ID_TOKEN:v.idTokens[p]=m;break;case ce.ACCESS_TOKEN:case ce.ACCESS_TOKEN_WITH_AUTH_SCHEME:v.accessTokens[p]=m;break;case ce.REFRESH_TOKEN:v.refreshTokens[p]=m;break}}}}),v},t.prototype.getAppMetadataFilteredBy=function(e){return this.getAppMetadataFilteredByInternal(e.environment,e.clientId)},t.prototype.getAppMetadataFilteredByInternal=function(e,r){var n=this,i=this.getKeys(),o={};return i.forEach(function(a){if(!!n.isAppMetadata(a)){var s=n.getAppMetadata(a);!s||!!e&&!n.matchEnvironment(s,e)||!!r&&!n.matchClientId(s,r)||(o[a]=s)}}),o},t.prototype.getAuthorityMetadataByAlias=function(e){var r=this,n=this.getAuthorityMetadataKeys(),i=null;return n.forEach(function(o){if(!(!r.isAuthorityMetadata(o)||o.indexOf(r.clientId)===-1)){var a=r.getAuthorityMetadata(o);!a||a.aliases.indexOf(e)!==-1&&(i=a)}}),i},t.prototype.removeAllAccounts=function(){return J(this,void 0,void 0,function(){var e,r,n=this;return Z(this,function(i){switch(i.label){case 0:return e=this.getKeys(),r=[],e.forEach(function(o){var a=n.getAccount(o);!a||r.push(n.removeAccount(o))}),[4,Promise.all(r)];case 1:return i.sent(),[2,!0]}})})},t.prototype.removeAccount=function(e){return J(this,void 0,void 0,function(){var r;return Z(this,function(n){switch(n.label){case 0:if(r=this.getAccount(e),!r)throw j.createNoAccountFoundError();return[4,this.removeAccountContext(r)];case 1:return[2,n.sent()&&this.removeItem(e,no.ACCOUNT)]}})})},t.prototype.removeAccountContext=function(e){return J(this,void 0,void 0,function(){var r,n,i,o=this;return Z(this,function(a){switch(a.label){case 0:return r=this.getKeys(),n=e.generateAccountId(),i=[],r.forEach(function(s){var c=rc.getCredentialType(s);if(c!==b.NOT_DEFINED){var l=o.getSpecificCredential(s,c);!!l&&n===l.generateAccountId()&&i.push(o.removeCredential(l))}}),[4,Promise.all(i)];case 1:return a.sent(),[2,!0]}})})},t.prototype.removeCredential=function(e){return J(this,void 0,void 0,function(){var r,n,i;return Z(this,function(o){switch(o.label){case 0:if(r=e.generateCredentialKey(),e.credentialType.toLowerCase()!==ce.ACCESS_TOKEN_WITH_AUTH_SCHEME.toLowerCase())return[3,4];if(e.tokenType!==be.POP)return[3,4];if(n=e,i=n.keyId,!i)return[3,4];o.label=1;case 1:return o.trys.push([1,3,,4]),[4,this.cryptoImpl.removeTokenBindingKey(i)];case 2:return o.sent(),[3,4];case 3:throw o.sent(),j.createBindingKeyNotRemovedError();case 4:return[2,this.removeItem(r,no.CREDENTIAL)]}})})},t.prototype.removeAppMetadata=function(){var e=this,r=this.getKeys();return r.forEach(function(n){e.isAppMetadata(n)&&e.removeItem(n,no.APP_METADATA)}),!0},t.prototype.readCacheRecord=function(e,r,n,i){var o=this.readAccountFromCache(e),a=this.readIdTokenFromCache(r,e),s=this.readAccessTokenFromCache(r,e,n),c=this.readRefreshTokenFromCache(r,e,!1),l=this.readAppMetadataFromCache(i,r);return o&&a&&(o.idTokenClaims=new wn(a.secret,this.cryptoImpl).claims),{account:o,idToken:a,accessToken:s,refreshToken:c,appMetadata:l}},t.prototype.readAccountFromCache=function(e){var r=_t.generateAccountCacheKey(e);return this.getAccount(r)},t.prototype.readAccountFromCacheWithNativeAccountId=function(e){var r={nativeAccountId:e},n=this.getAccountsFilteredBy(r),i=Object.keys(n).map(function(o){return n[o]});if(i.length<1)return null;if(i.length>1)throw j.createMultipleMatchingAccountsInCacheError();return n[0]},t.prototype.readIdTokenFromCache=function(e,r){var n={homeAccountId:r.homeAccountId,environment:r.environment,credentialType:ce.ID_TOKEN,clientId:e,realm:r.tenantId},i=this.getCredentialsFilteredBy(n),o=Object.keys(i.idTokens).map(function(s){return i.idTokens[s]}),a=o.length;if(a<1)return null;if(a>1)throw j.createMultipleMatchingTokensInCacheError();return o[0]},t.prototype.readAccessTokenFromCache=function(e,r,n){var i=new Wt(n.scopes||[]),o=n.authenticationScheme||be.BEARER,a=o&&o.toLowerCase()!==be.BEARER.toLowerCase()?ce.ACCESS_TOKEN_WITH_AUTH_SCHEME:ce.ACCESS_TOKEN,s={homeAccountId:r.homeAccountId,environment:r.environment,credentialType:a,clientId:e,realm:r.tenantId,target:i.printScopesLowerCase(),tokenType:o,keyId:n.sshKid,requestedClaimsHash:n.requestedClaimsHash},c=this.getCredentialsFilteredBy(s),l=Object.keys(c.accessTokens).map(function(h){return c.accessTokens[h]}),d=l.length;if(d<1)return null;if(d>1)throw j.createMultipleMatchingTokensInCacheError();return l[0]},t.prototype.readRefreshTokenFromCache=function(e,r,n){var i=n?wd:void 0,o={homeAccountId:r.homeAccountId,environment:r.environment,credentialType:ce.REFRESH_TOKEN,clientId:e,familyId:i},a=this.getCredentialsFilteredBy(o),s=Object.keys(a.refreshTokens).map(function(l){return a.refreshTokens[l]}),c=s.length;return c<1?null:s[0]},t.prototype.readAppMetadataFromCache=function(e,r){var n={environment:e,clientId:r},i=this.getAppMetadataFilteredBy(n),o=Object.keys(i).map(function(s){return i[s]}),a=o.length;if(a<1)return null;if(a>1)throw j.createMultipleMatchingAppMetadataInCacheError();return o[0]},t.prototype.isAppMetadataFOCI=function(e,r){var n=this.readAppMetadataFromCache(e,r);return!!(n&&n.familyId===wd)},t.prototype.matchHomeAccountId=function(e,r){return typeof e.homeAccountId=="string"&&r===e.homeAccountId},t.prototype.matchUserAssertionHash=function(e,r){return!!(e.userAssertionHash&&r===e.userAssertionHash)},t.prototype.matchEnvironment=function(e,r){var n=this.getAuthorityMetadataByAlias(r);return!!(n&&n.aliases.indexOf(e.environment)>-1)},t.prototype.matchCredentialType=function(e,r){return e.credentialType&&r.toLowerCase()===e.credentialType.toLowerCase()},t.prototype.matchClientId=function(e,r){return!!(e.clientId&&r===e.clientId)},t.prototype.matchFamilyId=function(e,r){return!!(e.familyId&&r===e.familyId)},t.prototype.matchRealm=function(e,r){return!!(e.realm&&r===e.realm)},t.prototype.matchNativeAccountId=function(e,r){return!!(e.nativeAccountId&&r===e.nativeAccountId)},t.prototype.matchTarget=function(e,r){var n=e.credentialType!==ce.ACCESS_TOKEN&&e.credentialType!==ce.ACCESS_TOKEN_WITH_AUTH_SCHEME;if(n||!e.target)return!1;var i=Wt.fromString(e.target),o=Wt.fromString(r);return o.containsOnlyOIDCScopes()?o.removeScope(b.OFFLINE_ACCESS_SCOPE):o.removeOIDCScopes(),i.containsScopeSet(o)},t.prototype.matchTokenType=function(e,r){return!!(e.tokenType&&e.tokenType===r)},t.prototype.matchKeyId=function(e,r){return!!(e.keyId&&e.keyId===r)},t.prototype.isAppMetadata=function(e){return e.indexOf(Fu)!==-1},t.prototype.isAuthorityMetadata=function(e){return e.indexOf(Ms.CACHE_KEY)!==-1},t.prototype.generateAuthorityMetadataCacheKey=function(e){return Ms.CACHE_KEY+"-"+this.clientId+"-"+e},t.prototype.getSpecificCredential=function(e,r){switch(r){case ce.ID_TOKEN:return this.getIdTokenCredential(e);case ce.ACCESS_TOKEN:case ce.ACCESS_TOKEN_WITH_AUTH_SCHEME:return this.getAccessTokenCredential(e);case ce.REFRESH_TOKEN:return this.getRefreshTokenCredential(e);default:return null}},t.toObject=function(e,r){for(var n in r)e[n]=r[n];return e},t}(),yy=function(t){ur(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.setAccount=function(){var r="Storage interface - setAccount() has not been implemented for the cacheStorage interface.";throw Y.createUnexpectedError(r)},e.prototype.getAccount=function(){var r="Storage interface - getAccount() has not been implemented for the cacheStorage interface.";throw Y.createUnexpectedError(r)},e.prototype.setIdTokenCredential=function(){var r="Storage interface - setIdTokenCredential() has not been implemented for the cacheStorage interface.";throw Y.createUnexpectedError(r)},e.prototype.getIdTokenCredential=function(){var r="Storage interface - getIdTokenCredential() has not been implemented for the cacheStorage interface.";throw Y.createUnexpectedError(r)},e.prototype.setAccessTokenCredential=function(){var r="Storage interface - setAccessTokenCredential() has not been implemented for the cacheStorage interface.";throw Y.createUnexpectedError(r)},e.prototype.getAccessTokenCredential=function(){var r="Storage interface - getAccessTokenCredential() has not been implemented for the cacheStorage interface.";throw Y.createUnexpectedError(r)},e.prototype.setRefreshTokenCredential=function(){var r="Storage interface - setRefreshTokenCredential() has not been implemented for the cacheStorage interface.";throw Y.createUnexpectedError(r)},e.prototype.getRefreshTokenCredential=function(){var r="Storage interface - getRefreshTokenCredential() has not been implemented for the cacheStorage interface.";throw Y.createUnexpectedError(r)},e.prototype.setAppMetadata=function(){var r="Storage interface - setAppMetadata() has not been implemented for the cacheStorage interface.";throw Y.createUnexpectedError(r)},e.prototype.getAppMetadata=function(){var r="Storage interface - getAppMetadata() has not been implemented for the cacheStorage interface.";throw Y.createUnexpectedError(r)},e.prototype.setServerTelemetry=function(){var r="Storage interface - setServerTelemetry() has not been implemented for the cacheStorage interface.";throw Y.createUnexpectedError(r)},e.prototype.getServerTelemetry=function(){var r="Storage interface - getServerTelemetry() has not been implemented for the cacheStorage interface.";throw Y.createUnexpectedError(r)},e.prototype.setAuthorityMetadata=function(){var r="Storage interface - setAuthorityMetadata() has not been implemented for the cacheStorage interface.";throw Y.createUnexpectedError(r)},e.prototype.getAuthorityMetadata=function(){var r="Storage interface - getAuthorityMetadata() has not been implemented for the cacheStorage interface.";throw Y.createUnexpectedError(r)},e.prototype.getAuthorityMetadataKeys=function(){var r="Storage interface - getAuthorityMetadataKeys() has not been implemented for the cacheStorage interface.";throw Y.createUnexpectedError(r)},e.prototype.setThrottlingCache=function(){var r="Storage interface - setThrottlingCache() has not been implemented for the cacheStorage interface.";throw Y.createUnexpectedError(r)},e.prototype.getThrottlingCache=function(){var r="Storage interface - getThrottlingCache() has not been implemented for the cacheStorage interface.";throw Y.createUnexpectedError(r)},e.prototype.removeItem=function(){var r="Storage interface - removeItem() has not been implemented for the cacheStorage interface.";throw Y.createUnexpectedError(r)},e.prototype.containsKey=function(){var r="Storage interface - containsKey() has not been implemented for the cacheStorage interface.";throw Y.createUnexpectedError(r)},e.prototype.getKeys=function(){var r="Storage interface - getKeys() has not been implemented for the cacheStorage interface.";throw Y.createUnexpectedError(r)},e.prototype.clear=function(){return J(this,void 0,void 0,function(){var r;return Z(this,function(n){throw r="Storage interface - clear() has not been implemented for the cacheStorage interface.",Y.createUnexpectedError(r)})})},e.prototype.updateCredentialCacheKey=function(){var r="Storage interface - updateCredentialCacheKey() has not been implemented for the cacheStorage interface.";throw Y.createUnexpectedError(r)},e}(Wr);/*! @azure/msal-common v8.0.0 2022-11-07 */var _y=300,kg={tokenRenewalOffsetSeconds:_y,preventCorsPreflight:!1,proxyUrl:b.EMPTY_STRING},by={loggerCallback:function(){},piiLoggingEnabled:!1,logLevel:Qe.Info,correlationId:b.EMPTY_STRING},wy={sendGetRequestAsync:function(){return J(this,void 0,void 0,function(){var t;return Z(this,function(e){throw t="Network interface - sendGetRequestAsync() has not been implemented",Y.createUnexpectedError(t)})})},sendPostRequestAsync:function(){return J(this,void 0,void 0,function(){var t;return Z(this,function(e){throw t="Network interface - sendPostRequestAsync() has not been implemented",Y.createUnexpectedError(t)})})}},xy={sku:b.SKU,version:Sg,cpu:b.EMPTY_STRING,os:b.EMPTY_STRING},Ey={clientSecret:b.EMPTY_STRING,clientAssertion:void 0},Cy={azureCloudInstance:tc.None,tenant:""+b.DEFAULT_COMMON_TENANT},zy={application:{appName:"",appVersion:""}};function Sy(t){var e=t.authOptions,r=t.systemOptions,n=t.loggerOptions,i=t.storageInterface,o=t.networkInterface,a=t.cryptoInterface,s=t.clientCredentials,c=t.libraryInfo,l=t.telemetry,d=t.serverTelemetryManager,h=t.persistencePlugin,u=t.serializableCache,f=Te(Te({},by),n);return{authOptions:ky(e),systemOptions:Te(Te({},kg),r),loggerOptions:f,storageInterface:i||new yy(e.clientId,Ed),networkInterface:o||wy,cryptoInterface:a||Ed,clientCredentials:s||Ey,libraryInfo:Te(Te({},xy),c),telemetry:Te(Te({},zy),l),serverTelemetryManager:d||null,persistencePlugin:h||null,serializableCache:u||null}}function ky(t){return Te({clientCapabilities:[],azureCloudOptions:Cy,skipAuthorityMetadataCache:!1},t)}/*! @azure/msal-common v8.0.0 2022-11-07 */var go=function(t){ur(e,t);function e(r,n,i){var o=t.call(this,r,n,i)||this;return o.name="ServerError",Object.setPrototypeOf(o,e.prototype),o}return e}(Y);/*! @azure/msal-common v8.0.0 2022-11-07 */var zd=function(){function t(){}return t.generateThrottlingStorageKey=function(e){return Ps.THROTTLING_PREFIX+"."+JSON.stringify(e)},t.preProcess=function(e,r){var n,i=t.generateThrottlingStorageKey(r),o=e.getThrottlingCache(i);if(o){if(o.throttleTime<Date.now()){e.removeItem(i,no.THROTTLING);return}throw new go(((n=o.errorCodes)===null||n===void 0?void 0:n.join(" "))||b.EMPTY_STRING,o.errorMessage,o.subError)}},t.postProcess=function(e,r,n){if(t.checkResponseStatus(n)||t.checkResponseForRetryAfter(n)){var i={throttleTime:t.calculateThrottleTime(parseInt(n.headers[nn.RETRY_AFTER])),error:n.body.error,errorCodes:n.body.error_codes,errorMessage:n.body.error_description,subError:n.body.suberror};e.setThrottlingCache(t.generateThrottlingStorageKey(r),i)}},t.checkResponseStatus=function(e){return e.status===429||e.status>=500&&e.status<600},t.checkResponseForRetryAfter=function(e){return e.headers?e.headers.hasOwnProperty(nn.RETRY_AFTER)&&(e.status<200||e.status>=300):!1},t.calculateThrottleTime=function(e){var r=e<=0?0:e,n=Date.now()/1e3;return Math.floor(Math.min(n+(r||Ps.DEFAULT_THROTTLE_TIME_SECONDS),n+Ps.DEFAULT_MAX_THROTTLE_TIME_SECONDS)*1e3)},t.removeThrottle=function(e,r,n,i){var o={clientId:r,authority:n.authority,scopes:n.scopes,homeAccountIdentifier:i,claims:n.claims,authenticationScheme:n.authenticationScheme,resourceRequestMethod:n.resourceRequestMethod,resourceRequestUri:n.resourceRequestUri,shrClaims:n.shrClaims,sshKid:n.sshKid},a=this.generateThrottlingStorageKey(o);return e.removeItem(a,no.THROTTLING)},t}();/*! @azure/msal-common v8.0.0 2022-11-07 */var Ty=function(){function t(e,r){this.networkClient=e,this.cacheManager=r}return t.prototype.sendPostRequest=function(e,r,n){return J(this,void 0,void 0,function(){var i,o;return Z(this,function(a){switch(a.label){case 0:zd.preProcess(this.cacheManager,e),a.label=1;case 1:return a.trys.push([1,3,,4]),[4,this.networkClient.sendPostRequestAsync(r,n)];case 2:return i=a.sent(),[3,4];case 3:throw o=a.sent(),o instanceof Y?o:j.createNetworkError(r,o);case 4:return zd.postProcess(this.cacheManager,e,i),[2,i]}})})},t}();/*! @azure/msal-common v8.0.0 2022-11-07 */var _r;(function(t){t.HOME_ACCOUNT_ID="home_account_id",t.UPN="UPN"})(_r||(_r={}));/*! @azure/msal-common v8.0.0 2022-11-07 */var R0=function(){function t(e,r){this.config=Sy(e),this.logger=new P0(this.config.loggerOptions,gy,Sg),this.cryptoUtils=this.config.cryptoInterface,this.cacheManager=this.config.storageInterface,this.networkClient=this.config.networkInterface,this.networkManager=new Ty(this.networkClient,this.cacheManager),this.serverTelemetryManager=this.config.serverTelemetryManager,this.authority=this.config.authOptions.authority,this.performanceClient=r}return t.prototype.createTokenRequestHeaders=function(e){var r={};if(r[nn.CONTENT_TYPE]=b.URL_FORM_CONTENT_TYPE,!this.config.systemOptions.preventCorsPreflight&&e)switch(e.type){case _r.HOME_ACCOUNT_ID:try{var n=Zo(e.credential);r[nn.CCS_HEADER]="Oid:"+n.uid+"@"+n.utid}catch(i){this.logger.verbose("Could not parse home account ID for CCS Header: "+i)}break;case _r.UPN:r[nn.CCS_HEADER]="UPN: "+e.credential;break}return r},t.prototype.executePostToTokenEndpoint=function(e,r,n,i){return J(this,void 0,void 0,function(){var o;return Z(this,function(a){switch(a.label){case 0:return[4,this.networkManager.sendPostRequest(i,e,{body:r,headers:n,proxyUrl:this.config.systemOptions.proxyUrl})];case 1:return o=a.sent(),this.config.serverTelemetryManager&&o.status<500&&o.status!==429&&this.config.serverTelemetryManager.clearTelemetryCache(),[2,o]}})})},t.prototype.updateAuthority=function(e){if(!e.discoveryComplete())throw j.createEndpointDiscoveryIncompleteError("Updated authority has not completed endpoint discovery.");this.authority=e},t}();/*! @azure/msal-common v8.0.0 2022-11-07 */var ji=function(){function t(){}return t.validateRedirectUri=function(e){if(N.isEmpty(e))throw He.createRedirectUriEmptyError()},t.validatePrompt=function(e){var r=[];for(var n in Nt)r.push(Nt[n]);if(r.indexOf(e)<0)throw He.createInvalidPromptError(e)},t.validateClaims=function(e){try{JSON.parse(e)}catch{throw He.createInvalidClaimsRequestError()}},t.validateCodeChallengeParams=function(e,r){if(N.isEmpty(e)||N.isEmpty(r))throw He.createInvalidCodeChallengeParamsError();this.validateCodeChallengeMethod(r)},t.validateCodeChallengeMethod=function(e){if([Ap.PLAIN,Ap.S256].indexOf(e)<0)throw He.createInvalidCodeChallengeMethodError()},t.sanitizeEQParams=function(e,r){return e?(r.forEach(function(n,i){e[i]&&delete e[i]}),e):{}},t}();/*! @azure/msal-common v8.0.0 2022-11-07 */var ea=function(){function t(){this.parameters=new Map}return t.prototype.addResponseTypeCode=function(){this.parameters.set(re.RESPONSE_TYPE,encodeURIComponent(b.CODE_RESPONSE_TYPE))},t.prototype.addResponseTypeForTokenAndIdToken=function(){this.parameters.set(re.RESPONSE_TYPE,encodeURIComponent(b.TOKEN_RESPONSE_TYPE+" "+b.ID_TOKEN_RESPONSE_TYPE))},t.prototype.addResponseMode=function(e){this.parameters.set(re.RESPONSE_MODE,encodeURIComponent(e||_d.QUERY))},t.prototype.addNativeBroker=function(){this.parameters.set(re.NATIVE_BROKER,encodeURIComponent("1"))},t.prototype.addScopes=function(e,r){r===void 0&&(r=!0);var n=r?s1(e||[],_c):e||[],i=new Wt(n);this.parameters.set(re.SCOPE,encodeURIComponent(i.printScopes()))},t.prototype.addClientId=function(e){this.parameters.set(re.CLIENT_ID,encodeURIComponent(e))},t.prototype.addRedirectUri=function(e){ji.validateRedirectUri(e),this.parameters.set(re.REDIRECT_URI,encodeURIComponent(e))},t.prototype.addPostLogoutRedirectUri=function(e){ji.validateRedirectUri(e),this.parameters.set(re.POST_LOGOUT_URI,encodeURIComponent(e))},t.prototype.addIdTokenHint=function(e){this.parameters.set(re.ID_TOKEN_HINT,encodeURIComponent(e))},t.prototype.addDomainHint=function(e){this.parameters.set(Is.DOMAIN_HINT,encodeURIComponent(e))},t.prototype.addLoginHint=function(e){this.parameters.set(Is.LOGIN_HINT,encodeURIComponent(e))},t.prototype.addCcsUpn=function(e){this.parameters.set(nn.CCS_HEADER,encodeURIComponent("UPN:"+e))},t.prototype.addCcsOid=function(e){this.parameters.set(nn.CCS_HEADER,encodeURIComponent("Oid:"+e.uid+"@"+e.utid))},t.prototype.addSid=function(e){this.parameters.set(Is.SID,encodeURIComponent(e))},t.prototype.addClaims=function(e,r){var n=this.addClientCapabilitiesToClaims(e,r);ji.validateClaims(n),this.parameters.set(re.CLAIMS,encodeURIComponent(n))},t.prototype.addCorrelationId=function(e){this.parameters.set(re.CLIENT_REQUEST_ID,encodeURIComponent(e))},t.prototype.addLibraryInfo=function(e){this.parameters.set(re.X_CLIENT_SKU,e.sku),this.parameters.set(re.X_CLIENT_VER,e.version),e.os&&this.parameters.set(re.X_CLIENT_OS,e.os),e.cpu&&this.parameters.set(re.X_CLIENT_CPU,e.cpu)},t.prototype.addApplicationTelemetry=function(e){e!=null&&e.appName&&this.parameters.set(re.X_APP_NAME,e.appName),e!=null&&e.appVersion&&this.parameters.set(re.X_APP_VER,e.appVersion)},t.prototype.addPrompt=function(e){ji.validatePrompt(e),this.parameters.set(""+re.PROMPT,encodeURIComponent(e))},t.prototype.addState=function(e){N.isEmpty(e)||this.parameters.set(re.STATE,encodeURIComponent(e))},t.prototype.addNonce=function(e){this.parameters.set(re.NONCE,encodeURIComponent(e))},t.prototype.addCodeChallengeParams=function(e,r){if(ji.validateCodeChallengeParams(e,r),e&&r)this.parameters.set(re.CODE_CHALLENGE,encodeURIComponent(e)),this.parameters.set(re.CODE_CHALLENGE_METHOD,encodeURIComponent(r));else throw He.createInvalidCodeChallengeParamsError()},t.prototype.addAuthorizationCode=function(e){this.parameters.set(re.CODE,encodeURIComponent(e))},t.prototype.addDeviceCode=function(e){this.parameters.set(re.DEVICE_CODE,encodeURIComponent(e))},t.prototype.addRefreshToken=function(e){this.parameters.set(re.REFRESH_TOKEN,encodeURIComponent(e))},t.prototype.addCodeVerifier=function(e){this.parameters.set(re.CODE_VERIFIER,encodeURIComponent(e))},t.prototype.addClientSecret=function(e){this.parameters.set(re.CLIENT_SECRET,encodeURIComponent(e))},t.prototype.addClientAssertion=function(e){N.isEmpty(e)||this.parameters.set(re.CLIENT_ASSERTION,encodeURIComponent(e))},t.prototype.addClientAssertionType=function(e){N.isEmpty(e)||this.parameters.set(re.CLIENT_ASSERTION_TYPE,encodeURIComponent(e))},t.prototype.addOboAssertion=function(e){this.parameters.set(re.OBO_ASSERTION,encodeURIComponent(e))},t.prototype.addRequestTokenUse=function(e){this.parameters.set(re.REQUESTED_TOKEN_USE,encodeURIComponent(e))},t.prototype.addGrantType=function(e){this.parameters.set(re.GRANT_TYPE,encodeURIComponent(e))},t.prototype.addClientInfo=function(){this.parameters.set(vy,"1")},t.prototype.addExtraQueryParameters=function(e){var r=this;ji.sanitizeEQParams(e,this.parameters),Object.keys(e).forEach(function(n){r.parameters.set(n,e[n])})},t.prototype.addClientCapabilitiesToClaims=function(e,r){var n;if(!e)n={};else try{n=JSON.parse(e)}catch{throw He.createInvalidClaimsRequestError()}return r&&r.length>0&&(n.hasOwnProperty(Xo.ACCESS_TOKEN)||(n[Xo.ACCESS_TOKEN]={}),n[Xo.ACCESS_TOKEN][Xo.XMS_CC]={values:r}),JSON.stringify(n)},t.prototype.addUsername=function(e){this.parameters.set(xd.username,encodeURIComponent(e))},t.prototype.addPassword=function(e){this.parameters.set(xd.password,encodeURIComponent(e))},t.prototype.addPopToken=function(e){N.isEmpty(e)||(this.parameters.set(re.TOKEN_TYPE,be.POP),this.parameters.set(re.REQ_CNF,encodeURIComponent(e)))},t.prototype.addSshJwk=function(e){N.isEmpty(e)||(this.parameters.set(re.TOKEN_TYPE,be.SSH),this.parameters.set(re.REQ_CNF,encodeURIComponent(e)))},t.prototype.addServerTelemetry=function(e){this.parameters.set(re.X_CLIENT_CURR_TELEM,e.generateCurrentRequestHeaderValue()),this.parameters.set(re.X_CLIENT_LAST_TELEM,e.generateLastRequestHeaderValue())},t.prototype.addThrottling=function(){this.parameters.set(re.X_MS_LIB_CAPABILITY,Ps.X_MS_LIB_CAPABILITY_VALUE)},t.prototype.addLogoutHint=function(e){this.parameters.set(re.LOGOUT_HINT,encodeURIComponent(e))},t.prototype.createQueryString=function(){var e=new Array;return this.parameters.forEach(function(r,n){e.push(n+"="+r)}),e.join("&")},t}();/*! @azure/msal-common v8.0.0 2022-11-07 */var nc=function(t){ur(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.createIdTokenEntity=function(r,n,i,o,a){var s=new e;return s.credentialType=ce.ID_TOKEN,s.homeAccountId=r,s.environment=n,s.clientId=o,s.secret=i,s.realm=a,s},e.isIdTokenEntity=function(r){return r?r.hasOwnProperty("homeAccountId")&&r.hasOwnProperty("environment")&&r.hasOwnProperty("credentialType")&&r.hasOwnProperty("realm")&&r.hasOwnProperty("clientId")&&r.hasOwnProperty("secret")&&r.credentialType===ce.ID_TOKEN:!1},e}(rc);/*! @azure/msal-common v8.0.0 2022-11-07 */var Vr=function(){function t(){}return t.nowSeconds=function(){return Math.round(new Date().getTime()/1e3)},t.isTokenExpired=function(e,r){var n=Number(e)||0,i=t.nowSeconds()+r;return i>n},t.wasClockTurnedBack=function(e){var r=Number(e);return r>t.nowSeconds()},t.delay=function(e,r){return new Promise(function(n){return setTimeout(function(){return n(r)},e)})},t}();/*! @azure/msal-common v8.0.0 2022-11-07 */var ic=function(t){ur(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.createAccessTokenEntity=function(r,n,i,o,a,s,c,l,d,h,u,f,v,g,x){var m,p,y=new e;y.homeAccountId=r,y.credentialType=ce.ACCESS_TOKEN,y.secret=i;var w=Vr.nowSeconds();if(y.cachedAt=w.toString(),y.expiresOn=c.toString(),y.extendedExpiresOn=l.toString(),h&&(y.refreshOn=h.toString()),y.environment=n,y.clientId=o,y.realm=a,y.target=s,y.userAssertionHash=f,y.tokenType=N.isEmpty(u)?be.BEARER:u,g&&(y.requestedClaims=g,y.requestedClaimsHash=x),((m=y.tokenType)===null||m===void 0?void 0:m.toLowerCase())!==be.BEARER.toLowerCase())switch(y.credentialType=ce.ACCESS_TOKEN_WITH_AUTH_SCHEME,y.tokenType){case be.POP:var T=wn.extractTokenClaims(i,d);if(!(!((p=T==null?void 0:T.cnf)===null||p===void 0)&&p.kid))throw j.createTokenClaimsRequiredError();y.keyId=T.cnf.kid;break;case be.SSH:y.keyId=v}return y},e.isAccessTokenEntity=function(r){return r?r.hasOwnProperty("homeAccountId")&&r.hasOwnProperty("environment")&&r.hasOwnProperty("credentialType")&&r.hasOwnProperty("realm")&&r.hasOwnProperty("clientId")&&r.hasOwnProperty("secret")&&r.hasOwnProperty("target")&&(r.credentialType===ce.ACCESS_TOKEN||r.credentialType===ce.ACCESS_TOKEN_WITH_AUTH_SCHEME):!1},e}(rc);/*! @azure/msal-common v8.0.0 2022-11-07 */var Sd=function(t){ur(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.createRefreshTokenEntity=function(r,n,i,o,a,s){var c=new e;return c.clientId=o,c.credentialType=ce.REFRESH_TOKEN,c.environment=n,c.homeAccountId=r,c.secret=i,c.userAssertionHash=s,a&&(c.familyId=a),c},e.isRefreshTokenEntity=function(r){return r?r.hasOwnProperty("homeAccountId")&&r.hasOwnProperty("environment")&&r.hasOwnProperty("credentialType")&&r.hasOwnProperty("clientId")&&r.hasOwnProperty("secret")&&r.credentialType===ce.REFRESH_TOKEN:!1},e}(rc);/*! @azure/msal-common v8.0.0 2022-11-07 */var Mp=["interaction_required","consent_required","login_required"],Ay=["message_only","additional_action","basic_action","user_password_expired","consent_required"],cs={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."}},Zr=function(t){ur(e,t);function e(r,n,i){var o=t.call(this,r,n,i)||this;return o.name="InteractionRequiredAuthError",Object.setPrototypeOf(o,e.prototype),o}return e.isInteractionRequiredError=function(r,n,i){var o=!!r&&Mp.indexOf(r)>-1,a=!!i&&Ay.indexOf(i)>-1,s=!!n&&Mp.some(function(c){return n.indexOf(c)>-1});return o||s||a},e.createNoTokensFoundError=function(){return new e(cs.noTokensFoundError.code,cs.noTokensFoundError.desc)},e.createNativeAccountUnavailableError=function(){return new e(cs.native_account_unavailable.code,cs.native_account_unavailable.desc)},e}(Y);/*! @azure/msal-common v8.0.0 2022-11-07 */var Il=function(){function t(e,r,n,i,o){this.account=e||null,this.idToken=r||null,this.accessToken=n||null,this.refreshToken=i||null,this.appMetadata=o||null}return t}();/*! @azure/msal-common v8.0.0 2022-11-07 */var Un=function(){function t(){}return t.setRequestState=function(e,r,n){var i=t.generateLibraryState(e,n);return N.isEmpty(r)?i:""+i+b.RESOURCE_DELIM+r},t.generateLibraryState=function(e,r){if(!e)throw j.createNoCryptoObjectError("generateLibraryState");var n={id:e.createNewGuid()};r&&(n.meta=r);var i=JSON.stringify(n);return e.base64Encode(i)},t.parseRequestState=function(e,r){if(!e)throw j.createNoCryptoObjectError("parseRequestState");if(N.isEmpty(r))throw j.createInvalidStateError(r,"Null, undefined or empty state");try{var n=r.split(b.RESOURCE_DELIM),i=n[0],o=n.length>1?n.slice(1).join(b.RESOURCE_DELIM):b.EMPTY_STRING,a=e.base64Decode(i),s=JSON.parse(a);return{userRequestState:N.isEmpty(o)?b.EMPTY_STRING:o,libraryState:s}}catch(c){throw j.createInvalidStateError(r,c)}},t}();/*! @azure/msal-common v8.0.0 2022-11-07 */var me=function(){function t(e){if(this._urlString=e,N.isEmpty(this._urlString))throw He.createUrlEmptyError();N.isEmpty(this.getHash())&&(this._urlString=t.canonicalizeUri(e))}return Object.defineProperty(t.prototype,"urlString",{get:function(){return this._urlString},enumerable:!1,configurable:!0}),t.canonicalizeUri=function(e){if(e){var r=e.toLowerCase();return N.endsWith(r,"?")?r=r.slice(0,-1):N.endsWith(r,"?/")&&(r=r.slice(0,-2)),N.endsWith(r,"/")||(r+="/"),r}return e},t.prototype.validateAsUri=function(){var e;try{e=this.getUrlComponents()}catch(r){throw He.createUrlParseError(r)}if(!e.HostNameAndPort||!e.PathSegments)throw He.createUrlParseError("Given url string: "+this.urlString);if(!e.Protocol||e.Protocol.toLowerCase()!=="https:")throw He.createInsecureAuthorityUriError(this.urlString)},t.appendQueryString=function(e,r){return N.isEmpty(r)?e:e.indexOf("?")<0?e+"?"+r:e+"&"+r},t.removeHashFromUrl=function(e){return t.canonicalizeUri(e.split("#")[0])},t.prototype.replaceTenantPath=function(e){var r=this.getUrlComponents(),n=r.PathSegments;return e&&n.length!==0&&(n[0]===yd.COMMON||n[0]===yd.ORGANIZATIONS)&&(n[0]=e),t.constructAuthorityUriFromObject(r)},t.prototype.getHash=function(){return t.parseHash(this.urlString)},t.prototype.getUrlComponents=function(){var e=RegExp("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?"),r=this.urlString.match(e);if(!r)throw He.createUrlParseError("Given url string: "+this.urlString);var n={Protocol:r[1],HostNameAndPort:r[4],AbsolutePath:r[5],QueryString:r[7]},i=n.AbsolutePath.split("/");return i=i.filter(function(o){return o&&o.length>0}),n.PathSegments=i,!N.isEmpty(n.QueryString)&&n.QueryString.endsWith("/")&&(n.QueryString=n.QueryString.substring(0,n.QueryString.length-1)),n},t.getDomainFromUrl=function(e){var r=RegExp("^([^:/?#]+://)?([^/?#]*)"),n=e.match(r);if(!n)throw He.createUrlParseError("Given url string: "+e);return n[2]},t.getAbsoluteUrl=function(e,r){if(e[0]===b.FORWARD_SLASH){var n=new t(r),i=n.getUrlComponents();return i.Protocol+"//"+i.HostNameAndPort+e}return e},t.parseHash=function(e){var r=e.indexOf("#"),n=e.indexOf("#/");return n>-1?e.substring(n+2):r>-1?e.substring(r+1):b.EMPTY_STRING},t.parseQueryString=function(e){var r=e.indexOf("?"),n=e.indexOf("/?");return n>-1?e.substring(n+2):r>-1?e.substring(r+1):b.EMPTY_STRING},t.constructAuthorityUriFromObject=function(e){return new t(e.Protocol+"//"+e.HostNameAndPort+"/"+e.PathSegments.join("/"))},t.getDeserializedHash=function(e){if(N.isEmpty(e))return{};var r=t.parseHash(e),n=N.queryStringToObject(N.isEmpty(r)?e:r);if(!n)throw j.createHashNotDeserializedError(JSON.stringify(n));return n},t.getDeserializedQueryString=function(e){if(N.isEmpty(e))return{};var r=t.parseQueryString(e),n=N.queryStringToObject(N.isEmpty(r)?e:r);if(!n)throw j.createHashNotDeserializedError(JSON.stringify(n));return n},t.hashContainsKnownProperties=function(e){if(N.isEmpty(e)||e.indexOf("=")<0)return!1;var r=t.getDeserializedHash(e);return!!(r.code||r.error_description||r.error||r.state)},t}();/*! @azure/msal-common v8.0.0 2022-11-07 */var ju;(function(t){t.SW="sw",t.UHW="uhw"})(ju||(ju={}));var xa=function(){function t(e){this.cryptoUtils=e}return t.prototype.generateCnf=function(e){return J(this,void 0,void 0,function(){var r,n,i;return Z(this,function(o){switch(o.label){case 0:return[4,this.generateKid(e)];case 1:return r=o.sent(),n=this.cryptoUtils.base64Encode(JSON.stringify(r)),i={kid:r.kid,reqCnfString:n},[4,this.cryptoUtils.hashString(n)];case 2:return[2,(i.reqCnfHash=o.sent(),i)]}})})},t.prototype.generateKid=function(e){return J(this,void 0,void 0,function(){var r;return Z(this,function(n){switch(n.label){case 0:return[4,this.cryptoUtils.getPublicKeyThumbprint(e)];case 1:return r=n.sent(),[2,{kid:r,xms_ksl:ju.SW}]}})})},t.prototype.signPopToken=function(e,r,n){return J(this,void 0,void 0,function(){return Z(this,function(i){return[2,this.signPayload(e,r,n)]})})},t.prototype.signPayload=function(e,r,n,i){return J(this,void 0,void 0,function(){var o,a,s,c,l,d;return Z(this,function(h){switch(h.label){case 0:return o=n.resourceRequestMethod,a=n.resourceRequestUri,s=n.shrClaims,c=n.shrNonce,l=a?new me(a):void 0,d=l==null?void 0:l.getUrlComponents(),[4,this.cryptoUtils.signJwt(Te({at:e,ts:Vr.nowSeconds(),m:o==null?void 0:o.toUpperCase(),u:d==null?void 0:d.HostNameAndPort,nonce:c||this.cryptoUtils.createNewGuid(),p:d==null?void 0:d.AbsolutePath,q:d!=null&&d.QueryString?[[],d.QueryString]:void 0,client_claims:s||void 0},i),r,n.correlationId)];case 1:return[2,h.sent()]}})})},t}();/*! @azure/msal-common v8.0.0 2022-11-07 */var Bu=function(){function t(){}return t.prototype.generateAppMetadataKey=function(){return t.generateAppMetadataCacheKey(this.environment,this.clientId)},t.generateAppMetadataCacheKey=function(e,r){var n=[Fu,e,r];return n.join(xr.CACHE_KEY_SEPARATOR).toLowerCase()},t.createAppMetadataEntity=function(e,r,n){var i=new t;return i.clientId=e,i.environment=r,n&&(i.familyId=n),i},t.isAppMetadataEntity=function(e,r){return r?e.indexOf(Fu)===0&&r.hasOwnProperty("clientId")&&r.hasOwnProperty("environment"):!1},t}();/*! @azure/msal-common v8.0.0 2022-11-07 */var Iy=function(){function t(e,r){this.cache=e,this.hasChanged=r}return Object.defineProperty(t.prototype,"cacheHasChanged",{get:function(){return this.hasChanged},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tokenCache",{get:function(){return this.cache},enumerable:!1,configurable:!0}),t}();/*! @azure/msal-common v8.0.0 2022-11-07 */var kd=function(){function t(e,r,n,i,o,a){this.clientId=e,this.cacheStorage=r,this.cryptoObj=n,this.logger=i,this.serializableCache=o,this.persistencePlugin=a}return t.prototype.validateServerAuthorizationCodeResponse=function(e,r,n){if(!e.state||!r)throw e.state?j.createStateNotFoundError("Cached State"):j.createStateNotFoundError("Server State");if(decodeURIComponent(e.state)!==decodeURIComponent(r))throw j.createStateMismatchError();if(e.error||e.error_description||e.suberror)throw Zr.isInteractionRequiredError(e.error,e.error_description,e.suberror)?new Zr(e.error||b.EMPTY_STRING,e.error_description,e.suberror):new go(e.error||b.EMPTY_STRING,e.error_description,e.suberror);e.client_info&&Cd(e.client_info,n)},t.prototype.validateTokenResponse=function(e){if(e.error||e.error_description||e.suberror){if(Zr.isInteractionRequiredError(e.error,e.error_description,e.suberror))throw new Zr(e.error,e.error_description,e.suberror);var r=e.error_codes+" - ["+e.timestamp+"]: "+e.error_description+" - Correlation ID: "+e.correlation_id+" - Trace ID: "+e.trace_id;throw new go(e.error,r,e.suberror)}},t.prototype.handleServerTokenResponse=function(e,r,n,i,o,a,s,c,l){return J(this,void 0,void 0,function(){var d,h,u,f,v,g,x;return Z(this,function(m){switch(m.label){case 0:if(e.id_token){if(d=new wn(e.id_token||b.EMPTY_STRING,this.cryptoObj),o&&!N.isEmpty(o.nonce)&&d.claims.nonce!==o.nonce)throw j.createNonceMismatchError();if(i.maxAge||i.maxAge===0){if(h=d.claims.auth_time,!h)throw j.createAuthTimeNotFoundError();wn.checkMaxAge(h,i.maxAge)}}this.homeAccountIdentifier=_t.generateHomeAccountId(e.client_info||b.EMPTY_STRING,r.authorityType,this.logger,this.cryptoObj,d),!!o&&!!o.state&&(u=Un.parseRequestState(this.cryptoObj,o.state)),e.key_id=e.key_id||i.sshKid||void 0,f=this.generateCacheRecord(e,r,n,i,d,a,o),m.label=1;case 1:return m.trys.push([1,,5,8]),this.persistencePlugin&&this.serializableCache?(this.logger.verbose("Persistence enabled, calling beforeCacheAccess"),v=new Iy(this.serializableCache,!0),[4,this.persistencePlugin.beforeCacheAccess(v)]):[3,3];case 2:m.sent(),m.label=3;case 3:return s&&!c&&f.account&&(g=f.account.generateAccountKey(),x=this.cacheStorage.getAccount(g),!x)?(this.logger.warning("Account used to refresh tokens not in persistence, refreshed tokens will not be stored in the cache"),[2,t.generateAuthenticationResult(this.cryptoObj,r,f,!1,i,d,u,void 0,l)]):[4,this.cacheStorage.saveCacheRecord(f)];case 4:return m.sent(),[3,8];case 5:return this.persistencePlugin&&this.serializableCache&&v?(this.logger.verbose("Persistence enabled, calling afterCacheAccess"),[4,this.persistencePlugin.afterCacheAccess(v)]):[3,7];case 6:m.sent(),m.label=7;case 7:return[7];case 8:return[2,t.generateAuthenticationResult(this.cryptoObj,r,f,!1,i,d,u,e.spa_code,l)]}})})},t.prototype.generateCacheRecord=function(e,r,n,i,o,a,s){var c=r.getPreferredCache();if(N.isEmpty(c))throw j.createInvalidCacheEnvironmentError();var l,d;!N.isEmpty(e.id_token)&&!!o&&(l=nc.createIdTokenEntity(this.homeAccountIdentifier,c,e.id_token||b.EMPTY_STRING,this.clientId,o.claims.tid||b.EMPTY_STRING),d=this.generateAccountEntity(e,o,r,s));var h=null;if(!N.isEmpty(e.access_token)){var u=e.scope?Wt.fromString(e.scope):new Wt(i.scopes||[]),f=(typeof e.expires_in=="string"?parseInt(e.expires_in,10):e.expires_in)||0,v=(typeof e.ext_expires_in=="string"?parseInt(e.ext_expires_in,10):e.ext_expires_in)||0,g=(typeof e.refresh_in=="string"?parseInt(e.refresh_in,10):e.refresh_in)||void 0,x=n+f,m=x+v,p=g&&g>0?n+g:void 0;h=ic.createAccessTokenEntity(this.homeAccountIdentifier,c,e.access_token||b.EMPTY_STRING,this.clientId,o?o.claims.tid||b.EMPTY_STRING:r.tenant,u.printScopes(),x,m,this.cryptoObj,p,e.token_type,a,e.key_id,i.claims,i.requestedClaimsHash)}var y=null;N.isEmpty(e.refresh_token)||(y=Sd.createRefreshTokenEntity(this.homeAccountIdentifier,c,e.refresh_token||b.EMPTY_STRING,this.clientId,e.foci,a));var w=null;return N.isEmpty(e.foci)||(w=Bu.createAppMetadataEntity(this.clientId,c,e.foci)),new Il(d,l,h,y,w)},t.prototype.generateAccountEntity=function(e,r,n,i){var o=n.authorityType,a=i?i.cloud_graph_host_name:b.EMPTY_STRING,s=i?i.msgraph_host:b.EMPTY_STRING;if(o===Hr.Adfs)return this.logger.verbose("Authority type is ADFS, creating ADFS account"),_t.createGenericAccount(this.homeAccountIdentifier,r,n,a,s);if(N.isEmpty(e.client_info)&&n.protocolMode==="AAD")throw j.createClientInfoEmptyError();return e.client_info?_t.createAccount(e.client_info,this.homeAccountIdentifier,r,n,a,s):_t.createGenericAccount(this.homeAccountIdentifier,r,n,a,s)},t.generateAuthenticationResult=function(e,r,n,i,o,a,s,c,l){var d,h,u;return J(this,void 0,void 0,function(){var f,v,g,x,m,p,y,w,T,L,V;return Z(this,function(D){switch(D.label){case 0:if(f=b.EMPTY_STRING,v=[],g=null,m=b.EMPTY_STRING,!n.accessToken)return[3,4];if(n.accessToken.tokenType!==be.POP)return[3,2];if(p=new xa(e),y=n.accessToken,w=y.secret,T=y.keyId,!T)throw j.createKeyIdMissingError();return[4,p.signPopToken(w,T,o)];case 1:return f=D.sent(),[3,3];case 2:f=n.accessToken.secret,D.label=3;case 3:v=Wt.fromString(n.accessToken.target).asArray(),g=new Date(Number(n.accessToken.expiresOn)*1e3),x=new Date(Number(n.accessToken.extendedExpiresOn)*1e3),D.label=4;case 4:return n.appMetadata&&(m=n.appMetadata.familyId===wd?wd:b.EMPTY_STRING),L=(a==null?void 0:a.claims.oid)||(a==null?void 0:a.claims.sub)||b.EMPTY_STRING,V=(a==null?void 0:a.claims.tid)||b.EMPTY_STRING,[2,{authority:r.canonicalAuthority,uniqueId:L,tenantId:V,scopes:v,account:n.account?n.account.getAccountInfo():null,idToken:a?a.rawToken:b.EMPTY_STRING,idTokenClaims:a?a.claims:{},accessToken:f,fromCache:i,expiresOn:g,correlationId:o.correlationId,requestId:l||b.EMPTY_STRING,extExpiresOn:x,familyId:m,tokenType:((d=n.accessToken)===null||d===void 0?void 0:d.tokenType)||b.EMPTY_STRING,state:s?s.userRequestState:b.EMPTY_STRING,cloudGraphHostName:((h=n.account)===null||h===void 0?void 0:h.cloudGraphHostName)||b.EMPTY_STRING,msGraphHost:((u=n.account)===null||u===void 0?void 0:u.msGraphHost)||b.EMPTY_STRING,code:c,fromNativeBroker:!1}]}})})},t}();/*! @azure/msal-common v8.0.0 2022-11-07 */var Tg=function(t){ur(e,t);function e(r){var n=t.call(this,r)||this;return n.includeRedirectUri=!0,n}return e.prototype.getAuthCodeUrl=function(r){return J(this,void 0,void 0,function(){var n;return Z(this,function(i){switch(i.label){case 0:return[4,this.createAuthCodeUrlQueryString(r)];case 1:return n=i.sent(),[2,me.appendQueryString(this.authority.authorizationEndpoint,n)]}})})},e.prototype.acquireToken=function(r,n){var i;return J(this,void 0,void 0,function(){var o,a,s,c;return Z(this,function(l){switch(l.label){case 0:if(this.logger.info("in acquireToken call"),!r||N.isEmpty(r.code))throw j.createTokenRequestCannotBeMadeError();return o=Vr.nowSeconds(),[4,this.executeTokenRequest(this.authority,r)];case 1:return a=l.sent(),s=(i=a.headers)===null||i===void 0?void 0:i[nn.X_MS_REQUEST_ID],c=new kd(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,this.config.serializableCache,this.config.persistencePlugin),c.validateTokenResponse(a.body),[4,c.handleServerTokenResponse(a.body,this.authority,o,r,n,void 0,void 0,void 0,s)];case 2:return[2,l.sent()]}})})},e.prototype.handleFragmentResponse=function(r,n){var i=new kd(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,null,null),o=new me(r),a=me.getDeserializedHash(o.getHash());if(i.validateServerAuthorizationCodeResponse(a,n,this.cryptoUtils),!a.code)throw j.createNoAuthCodeInServerResponseError();return Te(Te({},a),{code:a.code})},e.prototype.getLogoutUri=function(r){if(!r)throw He.createEmptyLogoutRequestError();var n=this.createLogoutUrlQueryString(r);return me.appendQueryString(this.authority.endSessionEndpoint,n)},e.prototype.executeTokenRequest=function(r,n){return J(this,void 0,void 0,function(){var i,o,a,s,c,l,d;return Z(this,function(h){switch(h.label){case 0:return i={clientId:this.config.authOptions.clientId,authority:r.canonicalAuthority,scopes:n.scopes,claims:n.claims,authenticationScheme:n.authenticationScheme,resourceRequestMethod:n.resourceRequestMethod,resourceRequestUri:n.resourceRequestUri,shrClaims:n.shrClaims,sshKid:n.sshKid},[4,this.createTokenRequestBody(n)];case 1:if(o=h.sent(),a=this.createTokenQueryParameters(n),s=void 0,n.clientInfo)try{c=Cd(n.clientInfo,this.cryptoUtils),s={credential:""+c.uid+xr.CLIENT_INFO_SEPARATOR+c.utid,type:_r.HOME_ACCOUNT_ID}}catch(u){this.logger.verbose("Could not parse client info for CCS Header: "+u)}return l=this.createTokenRequestHeaders(s||n.ccsCredential),d=N.isEmpty(a)?r.tokenEndpoint:r.tokenEndpoint+"?"+a,[2,this.executePostToTokenEndpoint(d,o,l,i)]}})})},e.prototype.createTokenQueryParameters=function(r){var n=new ea;return r.tokenQueryParameters&&n.addExtraQueryParameters(r.tokenQueryParameters),n.createQueryString()},e.prototype.createTokenRequestBody=function(r){return J(this,void 0,void 0,function(){var n,i,o,a,s,c,l,l,d;return Z(this,function(h){switch(h.label){case 0:return n=new ea,n.addClientId(this.config.authOptions.clientId),this.includeRedirectUri?n.addRedirectUri(r.redirectUri):ji.validateRedirectUri(r.redirectUri),n.addScopes(r.scopes),n.addAuthorizationCode(r.code),n.addLibraryInfo(this.config.libraryInfo),n.addApplicationTelemetry(this.config.telemetry.application),n.addThrottling(),this.serverTelemetryManager&&n.addServerTelemetry(this.serverTelemetryManager),r.codeVerifier&&n.addCodeVerifier(r.codeVerifier),this.config.clientCredentials.clientSecret&&n.addClientSecret(this.config.clientCredentials.clientSecret),this.config.clientCredentials.clientAssertion&&(i=this.config.clientCredentials.clientAssertion,n.addClientAssertion(i.assertion),n.addClientAssertionType(i.assertionType)),n.addGrantType(bd.AUTHORIZATION_CODE_GRANT),n.addClientInfo(),r.authenticationScheme!==be.POP?[3,2]:(o=new xa(this.cryptoUtils),[4,o.generateCnf(r)]);case 1:return a=h.sent(),n.addPopToken(a.reqCnfString),[3,3];case 2:if(r.authenticationScheme===be.SSH)if(r.sshJwk)n.addSshJwk(r.sshJwk);else throw He.createMissingSshJwkError();h.label=3;case 3:if(s=r.correlationId||this.config.cryptoInterface.createNewGuid(),n.addCorrelationId(s),(!N.isEmptyObj(r.claims)||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&n.addClaims(r.claims,this.config.authOptions.clientCapabilities),c=void 0,r.clientInfo)try{l=Cd(r.clientInfo,this.cryptoUtils),c={credential:""+l.uid+xr.CLIENT_INFO_SEPARATOR+l.utid,type:_r.HOME_ACCOUNT_ID}}catch(u){this.logger.verbose("Could not parse client info for CCS Header: "+u)}else c=r.ccsCredential;if(this.config.systemOptions.preventCorsPreflight&&c)switch(c.type){case _r.HOME_ACCOUNT_ID:try{l=Zo(c.credential),n.addCcsOid(l)}catch(u){this.logger.verbose("Could not parse home account ID for CCS Header: "+u)}break;case _r.UPN:n.addCcsUpn(c.credential);break}return r.tokenBodyParameters&&n.addExtraQueryParameters(r.tokenBodyParameters),r.enableSpaAuthorizationCode&&(!r.tokenBodyParameters||!r.tokenBodyParameters[re.RETURN_SPA_CODE])&&n.addExtraQueryParameters((d={},d[re.RETURN_SPA_CODE]="1",d)),[2,n.createQueryString()]}})})},e.prototype.createAuthCodeUrlQueryString=function(r){return J(this,void 0,void 0,function(){var n,i,o,a,s,c,c,c,l,d;return Z(this,function(h){switch(h.label){case 0:if(n=new ea,n.addClientId(this.config.authOptions.clientId),i=s1(r.scopes||[],r.extraScopesToConsent||[]),n.addScopes(i),n.addRedirectUri(r.redirectUri),o=r.correlationId||this.config.cryptoInterface.createNewGuid(),n.addCorrelationId(o),n.addResponseMode(r.responseMode),n.addResponseTypeCode(),n.addLibraryInfo(this.config.libraryInfo),n.addApplicationTelemetry(this.config.telemetry.application),n.addClientInfo(),r.codeChallenge&&r.codeChallengeMethod&&n.addCodeChallengeParams(r.codeChallenge,r.codeChallengeMethod),r.prompt&&n.addPrompt(r.prompt),r.domainHint&&n.addDomainHint(r.domainHint),r.prompt!==Nt.SELECT_ACCOUNT)if(r.sid&&r.prompt===Nt.NONE)this.logger.verbose("createAuthCodeUrlQueryString: Prompt is none, adding sid from request"),n.addSid(r.sid);else if(r.account){if(a=this.extractAccountSid(r.account),s=this.extractLoginHint(r.account),s){this.logger.verbose("createAuthCodeUrlQueryString: login_hint claim present on account"),n.addLoginHint(s);try{c=Zo(r.account.homeAccountId),n.addCcsOid(c)}catch{this.logger.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header")}}else if(a&&r.prompt===Nt.NONE){this.logger.verbose("createAuthCodeUrlQueryString: Prompt is none, adding sid from account"),n.addSid(a);try{c=Zo(r.account.homeAccountId),n.addCcsOid(c)}catch{this.logger.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header")}}else if(r.loginHint)this.logger.verbose("createAuthCodeUrlQueryString: Adding login_hint from request"),n.addLoginHint(r.loginHint),n.addCcsUpn(r.loginHint);else if(r.account.username){this.logger.verbose("createAuthCodeUrlQueryString: Adding login_hint from account"),n.addLoginHint(r.account.username);try{c=Zo(r.account.homeAccountId),n.addCcsOid(c)}catch{this.logger.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header")}}}else r.loginHint&&(this.logger.verbose("createAuthCodeUrlQueryString: No account, adding login_hint from request"),n.addLoginHint(r.loginHint),n.addCcsUpn(r.loginHint));else this.logger.verbose("createAuthCodeUrlQueryString: Prompt is select_account, ignoring account hints");return r.nonce&&n.addNonce(r.nonce),r.state&&n.addState(r.state),(!N.isEmpty(r.claims)||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&n.addClaims(r.claims,this.config.authOptions.clientCapabilities),r.extraQueryParameters&&n.addExtraQueryParameters(r.extraQueryParameters),r.nativeBroker?(n.addNativeBroker(),r.authenticationScheme!==be.POP?[3,2]:(l=new xa(this.cryptoUtils),[4,l.generateCnf(r)])):[3,2];case 1:d=h.sent(),n.addPopToken(d.reqCnfHash),h.label=2;case 2:return[2,n.createQueryString()]}})})},e.prototype.createLogoutUrlQueryString=function(r){var n=new ea;return r.postLogoutRedirectUri&&n.addPostLogoutRedirectUri(r.postLogoutRedirectUri),r.correlationId&&n.addCorrelationId(r.correlationId),r.idTokenHint&&n.addIdTokenHint(r.idTokenHint),r.state&&n.addState(r.state),r.logoutHint&&n.addLogoutHint(r.logoutHint),r.extraQueryParameters&&n.addExtraQueryParameters(r.extraQueryParameters),n.createQueryString()},e.prototype.extractAccountSid=function(r){var n;return((n=r.idTokenClaims)===null||n===void 0?void 0:n.sid)||null},e.prototype.extractLoginHint=function(r){var n;return((n=r.idTokenClaims)===null||n===void 0?void 0:n.login_hint)||null},e}(R0);/*! @azure/msal-common v8.0.0 2022-11-07 */var lt;(function(t){t.AcquireTokenByCode="acquireTokenByCode",t.AcquireTokenByRefreshToken="acquireTokenByRefreshToken",t.AcquireTokenSilent="acquireTokenSilent",t.AcquireTokenSilentAsync="acquireTokenSilentAsync",t.AcquireTokenPopup="acquireTokenPopup",t.CryptoOptsGetPublicKeyThumbprint="cryptoOptsGetPublicKeyThumbprint",t.CryptoOptsSignJwt="cryptoOptsSignJwt",t.SilentCacheClientAcquireToken="silentCacheClientAcquireToken",t.SilentIframeClientAcquireToken="silentIframeClientAcquireToken",t.SilentRefreshClientAcquireToken="silentRefreshClientAcquireToken",t.SsoSilent="ssoSilent",t.StandardInteractionClientGetDiscoveredAuthority="standardInteractionClientGetDiscoveredAuthority",t.FetchAccountIdWithNativeBroker="fetchAccountIdWithNativeBroker",t.NativeInteractionClientAcquireToken="nativeInteractionClientAcquireToken",t.BaseClientCreateTokenRequestHeaders="baseClientCreateTokenRequestHeaders",t.BrokerHandhshake="brokerHandshake",t.AcquireTokenByRefreshTokenInBroker="acquireTokenByRefreshTokenInBroker",t.AcquireTokenByBroker="acquireTokenByBroker",t.RefreshTokenClientExecuteTokenRequest="refreshTokenClientExecuteTokenRequest",t.RefreshTokenClientAcquireToken="refreshTokenClientAcquireToken",t.RefreshTokenClientAcquireTokenWithCachedRefreshToken="refreshTokenClientAcquireTokenWithCachedRefreshToken"})(lt||(lt={}));var ta;(function(t){t[t.NotStarted=0]="NotStarted",t[t.InProgress=1]="InProgress",t[t.Completed=2]="Completed"})(ta||(ta={}));/*! @azure/msal-common v8.0.0 2022-11-07 */var Ag=function(t){ur(e,t);function e(r,n){return t.call(this,r,n)||this}return e.prototype.acquireToken=function(r){var n,i,o;return J(this,void 0,void 0,function(){var a,s,c,l,d,h=this;return Z(this,function(u){switch(u.label){case 0:return a=(n=this.performanceClient)===null||n===void 0?void 0:n.startMeasurement(lt.RefreshTokenClientAcquireToken,r.correlationId),this.logger.verbose("RefreshTokenClientAcquireToken called",r.correlationId),s=Vr.nowSeconds(),[4,this.executeTokenRequest(r,this.authority)];case 1:return c=u.sent(),a==null||a.addStaticFields({refreshTokenSize:((i=c.body.refresh_token)===null||i===void 0?void 0:i.length)||0}),l=(o=c.headers)===null||o===void 0?void 0:o[nn.X_MS_REQUEST_ID],d=new kd(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,this.config.serializableCache,this.config.persistencePlugin),d.validateTokenResponse(c.body),[2,d.handleServerTokenResponse(c.body,this.authority,s,r,void 0,void 0,!0,r.forceCache,l).then(function(f){return a==null||a.endMeasurement({success:!0}),f}).catch(function(f){throw h.logger.verbose("Error in fetching refresh token",r.correlationId),a==null||a.endMeasurement({errorCode:f.errorCode,subErrorCode:f.subError,success:!1}),f})]}})})},e.prototype.acquireTokenByRefreshToken=function(r){return J(this,void 0,void 0,function(){var n,i,o;return Z(this,function(a){if(!r)throw He.createEmptyTokenRequestError();if(!r.account)throw j.createNoAccountInSilentRequestError();if(n=this.cacheManager.isAppMetadataFOCI(r.account.environment,this.config.authOptions.clientId),n)try{return[2,this.acquireTokenWithCachedRefreshToken(r,!0)]}catch(s){if(i=s instanceof Zr&&s.errorCode===cs.noTokensFoundError.code,o=s instanceof go&&s.errorCode===Ip.INVALID_GRANT_ERROR&&s.subError===Ip.CLIENT_MISMATCH_ERROR,i||o)return[2,this.acquireTokenWithCachedRefreshToken(r,!1)];throw s}return[2,this.acquireTokenWithCachedRefreshToken(r,!1)]})})},e.prototype.acquireTokenWithCachedRefreshToken=function(r,n){var i;return J(this,void 0,void 0,function(){var o,a,s;return Z(this,function(c){if(o=(i=this.performanceClient)===null||i===void 0?void 0:i.startMeasurement(lt.RefreshTokenClientAcquireTokenWithCachedRefreshToken,r.correlationId),this.logger.verbose("RefreshTokenClientAcquireTokenWithCachedRefreshToken called",r.correlationId),a=this.cacheManager.readRefreshTokenFromCache(this.config.authOptions.clientId,r.account,n),!a)throw o==null||o.discardMeasurement(),Zr.createNoTokensFoundError();return o==null||o.endMeasurement({success:!0}),s=Te(Te({},r),{refreshToken:a.secret,authenticationScheme:r.authenticationScheme||be.BEARER,ccsCredential:{credential:r.account.homeAccountId,type:_r.HOME_ACCOUNT_ID}}),[2,this.acquireToken(s)]})})},e.prototype.executeTokenRequest=function(r,n){var i;return J(this,void 0,void 0,function(){var o,a,s,c,l,d;return Z(this,function(h){switch(h.label){case 0:return o=(i=this.performanceClient)===null||i===void 0?void 0:i.startMeasurement(lt.RefreshTokenClientExecuteTokenRequest,r.correlationId),[4,this.createTokenRequestBody(r)];case 1:return a=h.sent(),s=this.createTokenQueryParameters(r),c=this.createTokenRequestHeaders(r.ccsCredential),l={clientId:this.config.authOptions.clientId,authority:n.canonicalAuthority,scopes:r.scopes,claims:r.claims,authenticationScheme:r.authenticationScheme,resourceRequestMethod:r.resourceRequestMethod,resourceRequestUri:r.resourceRequestUri,shrClaims:r.shrClaims,sshKid:r.sshKid},d=me.appendQueryString(n.tokenEndpoint,s),[2,this.executePostToTokenEndpoint(d,a,c,l).then(function(u){return o==null||o.endMeasurement({success:!0}),u}).catch(function(u){throw o==null||o.endMeasurement({success:!1}),u})]}})})},e.prototype.createTokenQueryParameters=function(r){var n=new ea;return r.tokenQueryParameters&&n.addExtraQueryParameters(r.tokenQueryParameters),n.createQueryString()},e.prototype.createTokenRequestBody=function(r){var n;return J(this,void 0,void 0,function(){var i,o,a,s,c,l,d;return Z(this,function(h){switch(h.label){case 0:return i=r.correlationId,o=(n=this.performanceClient)===null||n===void 0?void 0:n.startMeasurement(lt.BaseClientCreateTokenRequestHeaders,i),a=new ea,a.addClientId(this.config.authOptions.clientId),a.addScopes(r.scopes),a.addGrantType(bd.REFRESH_TOKEN_GRANT),a.addClientInfo(),a.addLibraryInfo(this.config.libraryInfo),a.addApplicationTelemetry(this.config.telemetry.application),a.addThrottling(),this.serverTelemetryManager&&a.addServerTelemetry(this.serverTelemetryManager),a.addCorrelationId(i),a.addRefreshToken(r.refreshToken),this.config.clientCredentials.clientSecret&&a.addClientSecret(this.config.clientCredentials.clientSecret),this.config.clientCredentials.clientAssertion&&(s=this.config.clientCredentials.clientAssertion,a.addClientAssertion(s.assertion),a.addClientAssertionType(s.assertionType)),r.authenticationScheme!==be.POP?[3,2]:(c=new xa(this.cryptoUtils),[4,c.generateCnf(r)]);case 1:return l=h.sent(),a.addPopToken(l.reqCnfString),[3,3];case 2:if(r.authenticationScheme===be.SSH)if(r.sshJwk)a.addSshJwk(r.sshJwk);else throw o==null||o.endMeasurement({success:!1}),He.createMissingSshJwkError();h.label=3;case 3:if((!N.isEmptyObj(r.claims)||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&a.addClaims(r.claims,this.config.authOptions.clientCapabilities),this.config.systemOptions.preventCorsPreflight&&r.ccsCredential)switch(r.ccsCredential.type){case _r.HOME_ACCOUNT_ID:try{d=Zo(r.ccsCredential.credential),a.addCcsOid(d)}catch(u){this.logger.verbose("Could not parse home account ID for CCS Header: "+u)}break;case _r.UPN:a.addCcsUpn(r.ccsCredential.credential);break}return o==null||o.endMeasurement({success:!0}),[2,a.createQueryString()]}})})},e}(R0);/*! @azure/msal-common v8.0.0 2022-11-07 */var My=function(t){ur(e,t);function e(r,n){return t.call(this,r,n)||this}return e.prototype.acquireToken=function(r){return J(this,void 0,void 0,function(){var n,i;return Z(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,this.acquireCachedToken(r)];case 1:return[2,o.sent()];case 2:if(n=o.sent(),n instanceof j&&n.errorCode===M.tokenRefreshRequired.code)return i=new Ag(this.config,this.performanceClient),[2,i.acquireTokenByRefreshToken(r)];throw n;case 3:return[2]}})})},e.prototype.acquireCachedToken=function(r){var n,i,o,a;return J(this,void 0,void 0,function(){var s,c;return Z(this,function(l){switch(l.label){case 0:if(!r)throw He.createEmptyTokenRequestError();if(r.forceRefresh)throw(n=this.serverTelemetryManager)===null||n===void 0||n.setCacheOutcome(Zi.FORCE_REFRESH),this.logger.info("SilentFlowClient:acquireCachedToken - Skipping cache because forceRefresh is true."),j.createRefreshRequiredError();if(!r.account)throw j.createNoAccountInSilentRequestError();if(s=r.authority||this.authority.getPreferredCache(),c=this.cacheManager.readCacheRecord(r.account,this.config.authOptions.clientId,r,s),c.accessToken){if(Vr.wasClockTurnedBack(c.accessToken.cachedAt)||Vr.isTokenExpired(c.accessToken.expiresOn,this.config.systemOptions.tokenRenewalOffsetSeconds))throw(o=this.serverTelemetryManager)===null||o===void 0||o.setCacheOutcome(Zi.CACHED_ACCESS_TOKEN_EXPIRED),this.logger.info("SilentFlowClient:acquireCachedToken - Cached access token is expired or will expire within "+this.config.systemOptions.tokenRenewalOffsetSeconds+" seconds."),j.createRefreshRequiredError();if(c.accessToken.refreshOn&&Vr.isTokenExpired(c.accessToken.refreshOn,0))throw(a=this.serverTelemetryManager)===null||a===void 0||a.setCacheOutcome(Zi.REFRESH_CACHED_ACCESS_TOKEN),this.logger.info("SilentFlowClient:acquireCachedToken - Cached access token's refreshOn property has been exceeded'."),j.createRefreshRequiredError()}else throw(i=this.serverTelemetryManager)===null||i===void 0||i.setCacheOutcome(Zi.NO_CACHED_ACCESS_TOKEN),this.logger.info("SilentFlowClient:acquireCachedToken - No access token found in cache for the given properties."),j.createRefreshRequiredError();return this.config.serverTelemetryManager&&this.config.serverTelemetryManager.incrementCacheHits(),[4,this.generateResultFromCacheRecord(c,r)];case 1:return[2,l.sent()]}})})},e.prototype.generateResultFromCacheRecord=function(r,n){return J(this,void 0,void 0,function(){var i,o;return Z(this,function(a){switch(a.label){case 0:if(r.idToken&&(i=new wn(r.idToken.secret,this.config.cryptoInterface)),n.maxAge||n.maxAge===0){if(o=i==null?void 0:i.claims.auth_time,!o)throw j.createAuthTimeNotFoundError();wn.checkMaxAge(o,n.maxAge)}return[4,kd.generateAuthenticationResult(this.cryptoUtils,this.authority,r,!0,n,i)];case 1:return[2,a.sent()]}})})},e}(R0);/*! @azure/msal-common v8.0.0 2022-11-07 */function Py(t){return t.hasOwnProperty("authorization_endpoint")&&t.hasOwnProperty("token_endpoint")&&t.hasOwnProperty("issuer")&&t.hasOwnProperty("jwks_uri")}/*! @azure/msal-common v8.0.0 2022-11-07 */var Ig={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"]}]}}},Pp=Ig.endpointMetadata,Rp=Ig.instanceDiscoveryMetadata;/*! @azure/msal-common v8.0.0 2022-11-07 */var Td;(function(t){t.AAD="AAD",t.OIDC="OIDC"})(Td||(Td={}));/*! @azure/msal-common v8.0.0 2022-11-07 */var qu=function(){function t(){this.expiresAt=Vr.nowSeconds()+Ms.REFRESH_TIME_SECONDS}return t.prototype.updateCloudDiscoveryMetadata=function(e,r){this.aliases=e.aliases,this.preferred_cache=e.preferred_cache,this.preferred_network=e.preferred_network,this.aliasesFromNetwork=r},t.prototype.updateEndpointMetadata=function(e,r){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=r,this.jwks_uri=e.jwks_uri},t.prototype.updateCanonicalAuthority=function(e){this.canonical_authority=e},t.prototype.resetExpiresAt=function(){this.expiresAt=Vr.nowSeconds()+Ms.REFRESH_TIME_SECONDS},t.prototype.isExpired=function(){return this.expiresAt<=Vr.nowSeconds()},t.isAuthorityMetadataEntity=function(e,r){return r?e.indexOf(Ms.CACHE_KEY)===0&&r.hasOwnProperty("aliases")&&r.hasOwnProperty("preferred_cache")&&r.hasOwnProperty("preferred_network")&&r.hasOwnProperty("canonical_authority")&&r.hasOwnProperty("authorization_endpoint")&&r.hasOwnProperty("token_endpoint")&&r.hasOwnProperty("issuer")&&r.hasOwnProperty("aliasesFromNetwork")&&r.hasOwnProperty("endpointsFromNetwork")&&r.hasOwnProperty("expiresAt")&&r.hasOwnProperty("jwks_uri"):!1},t}();/*! @azure/msal-common v8.0.0 2022-11-07 */function Ry(t){return t.hasOwnProperty("tenant_discovery_endpoint")&&t.hasOwnProperty("metadata")}/*! @azure/msal-common v8.0.0 2022-11-07 */var Hy=function(){function t(e){this.networkInterface=e}return t.prototype.detectRegion=function(e,r,n){return J(this,void 0,void 0,function(){var i,o,a,s,c;return Z(this,function(l){switch(l.label){case 0:if(i=e,i)return[3,8];o=t.IMDS_OPTIONS,n&&(o.proxyUrl=n),l.label=1;case 1:return l.trys.push([1,6,,7]),[4,this.getRegionFromIMDS(b.IMDS_VERSION,o)];case 2:return a=l.sent(),a.status===Jo.httpSuccess&&(i=a.body,r.region_source=di.IMDS),a.status!==Jo.httpBadRequest?[3,5]:[4,this.getCurrentVersion(o)];case 3:return s=l.sent(),s?[4,this.getRegionFromIMDS(s,o)]:(r.region_source=di.FAILED_AUTO_DETECTION,[2,null]);case 4:c=l.sent(),c.status===Jo.httpSuccess&&(i=c.body,r.region_source=di.IMDS),l.label=5;case 5:return[3,7];case 6:return l.sent(),r.region_source=di.FAILED_AUTO_DETECTION,[2,null];case 7:return[3,9];case 8:r.region_source=di.ENVIRONMENT_VARIABLE,l.label=9;case 9:return i||(r.region_source=di.FAILED_AUTO_DETECTION),[2,i||null]}})})},t.prototype.getRegionFromIMDS=function(e,r){return J(this,void 0,void 0,function(){return Z(this,function(n){return[2,this.networkInterface.sendGetRequestAsync(b.IMDS_ENDPOINT+"?api-version="+e+"&format=text",r,b.IMDS_TIMEOUT)]})})},t.prototype.getCurrentVersion=function(e){return J(this,void 0,void 0,function(){var r;return Z(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.networkInterface.sendGetRequestAsync(b.IMDS_ENDPOINT+"?format=json",e)];case 1:return r=n.sent(),r.status===Jo.httpBadRequest&&r.body&&r.body["newest-versions"]&&r.body["newest-versions"].length>0?[2,r.body["newest-versions"][0]]:[2,null];case 2:return n.sent(),[2,null];case 3:return[2]}})})},t.IMDS_OPTIONS={headers:{Metadata:"true"}},t}();/*! @azure/msal-common v8.0.0 2022-11-07 */var Ad=function(){function t(e,r,n,i,o){this.canonicalAuthority=e,this._canonicalAuthority.validateAsUri(),this.networkInterface=r,this.cacheManager=n,this.authorityOptions=i,this.regionDiscovery=new Hy(r),this.regionDiscoveryMetadata={region_used:void 0,region_source:void 0,region_outcome:void 0},this.proxyUrl=o||b.EMPTY_STRING}return Object.defineProperty(t.prototype,"authorityType",{get:function(){var e=this.canonicalAuthorityUrlComponents.PathSegments;if(e.length)switch(e[0].toLowerCase()){case b.ADFS:return Hr.Adfs;case b.DSTS:return Hr.Dsts}return Hr.Default},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"protocolMode",{get:function(){return this.authorityOptions.protocolMode},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"options",{get:function(){return this.authorityOptions},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"canonicalAuthority",{get:function(){return this._canonicalAuthority.urlString},set:function(e){this._canonicalAuthority=new me(e),this._canonicalAuthority.validateAsUri(),this._canonicalAuthorityUrlComponents=null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"canonicalAuthorityUrlComponents",{get:function(){return this._canonicalAuthorityUrlComponents||(this._canonicalAuthorityUrlComponents=this._canonicalAuthority.getUrlComponents()),this._canonicalAuthorityUrlComponents},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hostnameAndPort",{get:function(){return this.canonicalAuthorityUrlComponents.HostNameAndPort.toLowerCase()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tenant",{get:function(){return this.canonicalAuthorityUrlComponents.PathSegments[0]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"authorizationEndpoint",{get:function(){if(this.discoveryComplete()){var e=this.replacePath(this.metadata.authorization_endpoint);return this.replaceTenant(e)}else throw j.createEndpointDiscoveryIncompleteError("Discovery incomplete.")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tokenEndpoint",{get:function(){if(this.discoveryComplete()){var e=this.replacePath(this.metadata.token_endpoint);return this.replaceTenant(e)}else throw j.createEndpointDiscoveryIncompleteError("Discovery incomplete.")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"deviceCodeEndpoint",{get:function(){if(this.discoveryComplete()){var e=this.replacePath(this.metadata.token_endpoint.replace("/token","/devicecode"));return this.replaceTenant(e)}else throw j.createEndpointDiscoveryIncompleteError("Discovery incomplete.")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"endSessionEndpoint",{get:function(){if(this.discoveryComplete()){if(!this.metadata.end_session_endpoint)throw j.createLogoutNotSupportedError();var e=this.replacePath(this.metadata.end_session_endpoint);return this.replaceTenant(e)}else throw j.createEndpointDiscoveryIncompleteError("Discovery incomplete.")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"selfSignedJwtAudience",{get:function(){if(this.discoveryComplete()){var e=this.replacePath(this.metadata.issuer);return this.replaceTenant(e)}else throw j.createEndpointDiscoveryIncompleteError("Discovery incomplete.")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"jwksUri",{get:function(){if(this.discoveryComplete()){var e=this.replacePath(this.metadata.jwks_uri);return this.replaceTenant(e)}else throw j.createEndpointDiscoveryIncompleteError("Discovery incomplete.")},enumerable:!1,configurable:!0}),t.prototype.replaceTenant=function(e){return e.replace(/{tenant}|{tenantid}/g,this.tenant)},t.prototype.replacePath=function(e){var r=e,n=new me(this.metadata.canonical_authority),i=n.getUrlComponents().PathSegments,o=this.canonicalAuthorityUrlComponents.PathSegments;return o.forEach(function(a,s){var c=i[s];a!==c&&(r=r.replace("/"+c+"/","/"+a+"/"))}),r},Object.defineProperty(t.prototype,"defaultOpenIdConfigurationEndpoint",{get:function(){return this.authorityType===Hr.Adfs||this.authorityType===Hr.Dsts||this.protocolMode===Td.OIDC?this.canonicalAuthority+".well-known/openid-configuration":this.canonicalAuthority+"v2.0/.well-known/openid-configuration"},enumerable:!1,configurable:!0}),t.prototype.discoveryComplete=function(){return!!this.metadata},t.prototype.resolveEndpointsAsync=function(){return J(this,void 0,void 0,function(){var e,r,n,i;return Z(this,function(o){switch(o.label){case 0:return e=this.cacheManager.getAuthorityMetadataByAlias(this.hostnameAndPort),e||(e=new qu,e.updateCanonicalAuthority(this.canonicalAuthority)),[4,this.updateCloudDiscoveryMetadata(e)];case 1:return r=o.sent(),this.canonicalAuthority=this.canonicalAuthority.replace(this.hostnameAndPort,e.preferred_network),[4,this.updateEndpointMetadata(e)];case 2:return n=o.sent(),r!==Ar.CACHE&&n!==Ar.CACHE&&(e.resetExpiresAt(),e.updateCanonicalAuthority(this.canonicalAuthority)),i=this.cacheManager.generateAuthorityMetadataCacheKey(e.preferred_cache),this.cacheManager.setAuthorityMetadata(i,e),this.metadata=e,[2]}})})},t.prototype.updateEndpointMetadata=function(e){var r,n;return J(this,void 0,void 0,function(){var i,o;return Z(this,function(a){switch(a.label){case 0:return i=this.getEndpointMetadataFromConfig(),i?(e.updateEndpointMetadata(i,!1),[2,Ar.CONFIG]):this.isAuthoritySameType(e)&&e.endpointsFromNetwork&&!e.isExpired()?[2,Ar.CACHE]:(o=this.getEndpointMetadataFromHardcodedValues(),[4,this.getEndpointMetadataFromNetwork()]);case 1:return i=a.sent(),i?!((r=this.authorityOptions.azureRegionConfiguration)===null||r===void 0)&&r.azureRegion?[4,this.updateMetadataWithRegionalInformation(i)]:[3,3]:[3,4];case 2:i=a.sent(),a.label=3;case 3:return e.updateEndpointMetadata(i,!0),[2,Ar.NETWORK];case 4:return o&&!this.authorityOptions.skipAuthorityMetadataCache?!((n=this.authorityOptions.azureRegionConfiguration)===null||n===void 0)&&n.azureRegion?[4,this.updateMetadataWithRegionalInformation(o)]:[3,6]:[3,7];case 5:o=a.sent(),a.label=6;case 6:return e.updateEndpointMetadata(o,!1),[2,Ar.HARDCODED_VALUES];case 7:throw j.createUnableToGetOpenidConfigError(this.defaultOpenIdConfigurationEndpoint)}})})},t.prototype.isAuthoritySameType=function(e){var r=new me(e.canonical_authority),n=r.getUrlComponents().PathSegments;return n.length===this.canonicalAuthorityUrlComponents.PathSegments.length},t.prototype.getEndpointMetadataFromConfig=function(){if(this.authorityOptions.authorityMetadata)try{return JSON.parse(this.authorityOptions.authorityMetadata)}catch{throw He.createInvalidAuthorityMetadataError()}return null},t.prototype.getEndpointMetadataFromNetwork=function(){return J(this,void 0,void 0,function(){var e,r;return Z(this,function(n){switch(n.label){case 0:e={},this.proxyUrl&&(e.proxyUrl=this.proxyUrl),n.label=1;case 1:return n.trys.push([1,3,,4]),[4,this.networkInterface.sendGetRequestAsync(this.defaultOpenIdConfigurationEndpoint,e)];case 2:return r=n.sent(),[2,Py(r.body)?r.body:null];case 3:return n.sent(),[2,null];case 4:return[2]}})})},t.prototype.getEndpointMetadataFromHardcodedValues=function(){return this.canonicalAuthority in Pp?Pp[this.canonicalAuthority]:null},t.prototype.updateMetadataWithRegionalInformation=function(e){var r,n,i,o,a;return J(this,void 0,void 0,function(){var s,c;return Z(this,function(l){switch(l.label){case 0:return[4,this.regionDiscovery.detectRegion((r=this.authorityOptions.azureRegionConfiguration)===null||r===void 0?void 0:r.environmentRegion,this.regionDiscoveryMetadata,this.proxyUrl)];case 1:return s=l.sent(),c=((n=this.authorityOptions.azureRegionConfiguration)===null||n===void 0?void 0:n.azureRegion)===b.AZURE_REGION_AUTO_DISCOVER_FLAG?s:(i=this.authorityOptions.azureRegionConfiguration)===null||i===void 0?void 0:i.azureRegion,((o=this.authorityOptions.azureRegionConfiguration)===null||o===void 0?void 0:o.azureRegion)===b.AZURE_REGION_AUTO_DISCOVER_FLAG?this.regionDiscoveryMetadata.region_outcome=s?Ki.AUTO_DETECTION_REQUESTED_SUCCESSFUL:Ki.AUTO_DETECTION_REQUESTED_FAILED:s?this.regionDiscoveryMetadata.region_outcome=((a=this.authorityOptions.azureRegionConfiguration)===null||a===void 0?void 0:a.azureRegion)===s?Ki.CONFIGURED_MATCHES_DETECTED:Ki.CONFIGURED_NOT_DETECTED:this.regionDiscoveryMetadata.region_outcome=Ki.CONFIGURED_NO_AUTO_DETECTION,c?(this.regionDiscoveryMetadata.region_used=c,[2,t.replaceWithRegionalInformation(e,c)]):[2,e]}})})},t.prototype.updateCloudDiscoveryMetadata=function(e){return J(this,void 0,void 0,function(){var r,n;return Z(this,function(i){switch(i.label){case 0:return r=this.getCloudDiscoveryMetadataFromConfig(),r?(e.updateCloudDiscoveryMetadata(r,!1),[2,Ar.CONFIG]):this.isAuthoritySameType(e)&&e.aliasesFromNetwork&&!e.isExpired()?[2,Ar.CACHE]:(n=this.getCloudDiscoveryMetadataFromHarcodedValues(),[4,this.getCloudDiscoveryMetadataFromNetwork()]);case 1:if(r=i.sent(),r)return e.updateCloudDiscoveryMetadata(r,!0),[2,Ar.NETWORK];if(n&&!this.options.skipAuthorityMetadataCache)return e.updateCloudDiscoveryMetadata(n,!1),[2,Ar.HARDCODED_VALUES];throw He.createUntrustedAuthorityError()}})})},t.prototype.getCloudDiscoveryMetadataFromConfig=function(){if(this.authorityOptions.cloudDiscoveryMetadata)try{var e=JSON.parse(this.authorityOptions.cloudDiscoveryMetadata),r=t.getCloudDiscoveryMetadataFromNetworkResponse(e.metadata,this.hostnameAndPort);if(r)return r}catch{throw He.createInvalidCloudDiscoveryMetadataError()}return this.isInKnownAuthorities()?t.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort):null},t.prototype.getCloudDiscoveryMetadataFromNetwork=function(){return J(this,void 0,void 0,function(){var e,r,n,i,o;return Z(this,function(a){switch(a.label){case 0:e=""+b.AAD_INSTANCE_DISCOVERY_ENDPT+this.canonicalAuthority+"oauth2/v2.0/authorize",r={},this.proxyUrl&&(r.proxyUrl=this.proxyUrl),n=null,a.label=1;case 1:return a.trys.push([1,3,,4]),[4,this.networkInterface.sendGetRequestAsync(e,r)];case 2:return i=a.sent(),o=Ry(i.body)?i.body.metadata:[],o.length===0?[2,null]:(n=t.getCloudDiscoveryMetadataFromNetworkResponse(o,this.hostnameAndPort),[3,4]);case 3:return a.sent(),[2,null];case 4:return n||(n=t.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort)),[2,n]}})})},t.prototype.getCloudDiscoveryMetadataFromHarcodedValues=function(){return this.canonicalAuthority in Rp?Rp[this.canonicalAuthority]:null},t.prototype.isInKnownAuthorities=function(){var e=this,r=this.authorityOptions.knownAuthorities.filter(function(n){return me.getDomainFromUrl(n).toLowerCase()===e.hostnameAndPort});return r.length>0},t.generateAuthority=function(e,r){var n;if(r&&r.azureCloudInstance!==tc.None){var i=r.tenant?r.tenant:b.DEFAULT_COMMON_TENANT;n=r.azureCloudInstance+"/"+i+"/"}return n||e},t.createCloudDiscoveryMetadataFromHost=function(e){return{preferred_network:e,preferred_cache:e,aliases:[e]}},t.getCloudDiscoveryMetadataFromNetworkResponse=function(e,r){for(var n=0;n<e.length;n++){var i=e[n];if(i.aliases.indexOf(r)>-1)return i}return null},t.prototype.getPreferredCache=function(){if(this.discoveryComplete())return this.metadata.preferred_cache;throw j.createEndpointDiscoveryIncompleteError("Discovery incomplete.")},t.prototype.isAlias=function(e){return this.metadata.aliases.indexOf(e)>-1},t.isPublicCloudAuthority=function(e){return b.KNOWN_PUBLIC_CLOUDS.indexOf(e)>=0},t.buildRegionalAuthorityString=function(e,r,n){var i=new me(e);i.validateAsUri();var o=i.getUrlComponents(),a=r+"."+o.HostNameAndPort;this.isPublicCloudAuthority(o.HostNameAndPort)&&(a=r+"."+b.REGIONAL_AUTH_PUBLIC_CLOUD_SUFFIX);var s=me.constructAuthorityUriFromObject(Te(Te({},i.getUrlComponents()),{HostNameAndPort:a})).urlString;return n?s+"?"+n:s},t.replaceWithRegionalInformation=function(e,r){return e.authorization_endpoint=t.buildRegionalAuthorityString(e.authorization_endpoint,r),e.token_endpoint=t.buildRegionalAuthorityString(e.token_endpoint,r,b.REGIONAL_AUTH_NON_MSI_QUERY_STRING),e.end_session_endpoint&&(e.end_session_endpoint=t.buildRegionalAuthorityString(e.end_session_endpoint,r)),e},t}();/*! @azure/msal-common v8.0.0 2022-11-07 */var Id=function(){function t(){}return t.createDiscoveredInstance=function(e,r,n,i,o){return J(this,void 0,void 0,function(){var a,s;return Z(this,function(c){switch(c.label){case 0:a=t.createInstance(e,r,n,i,o),c.label=1;case 1:return c.trys.push([1,3,,4]),[4,a.resolveEndpointsAsync()];case 2:return c.sent(),[2,a];case 3:throw s=c.sent(),j.createEndpointDiscoveryIncompleteError(s);case 4:return[2]}})})},t.createInstance=function(e,r,n,i,o){if(N.isEmpty(e))throw He.createUrlEmptyError();return new Ad(e,r,n,i,o)},t}();/*! @azure/msal-common v8.0.0 2022-11-07 */var Md=function(){function t(){this.failedRequests=[],this.errors=[],this.cacheHits=0}return t.isServerTelemetryEntity=function(e,r){var n=e.indexOf(pt.CACHE_KEY)===0,i=!0;return r&&(i=r.hasOwnProperty("failedRequests")&&r.hasOwnProperty("errors")&&r.hasOwnProperty("cacheHits")),n&&i},t}();/*! @azure/msal-common v8.0.0 2022-11-07 */var Hp=function(){function t(){}return t.isThrottlingEntity=function(e,r){var n=!1;e&&(n=e.indexOf(Ps.THROTTLING_PREFIX)===0);var i=!0;return r&&(i=r.hasOwnProperty("throttleTime")),n&&i},t}();/*! @azure/msal-common v8.0.0 2022-11-07 */var Ly={sendGetRequestAsync:function(){var t="Network interface - sendGetRequestAsync() has not been implemented for the Network interface.";return Promise.reject(Y.createUnexpectedError(t))},sendPostRequestAsync:function(){var t="Network interface - sendPostRequestAsync() has not been implemented for the Network interface.";return Promise.reject(Y.createUnexpectedError(t))}};/*! @azure/msal-common v8.0.0 2022-11-07 */var il={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."}},Lp=function(t){ur(e,t);function e(r,n){var i=t.call(this,r,n)||this;return i.name="JoseHeaderError",Object.setPrototypeOf(i,e.prototype),i}return e.createMissingKidError=function(){return new e(il.missingKidError.code,il.missingKidError.desc)},e.createMissingAlgError=function(){return new e(il.missingAlgError.code,il.missingAlgError.desc)},e}(Y);/*! @azure/msal-common v8.0.0 2022-11-07 */var Oy=function(){function t(e){this.typ=e.typ,this.alg=e.alg,this.kid=e.kid}return t.getShrHeaderString=function(e){if(!e.kid)throw Lp.createMissingKidError();if(!e.alg)throw Lp.createMissingAlgError();var r=new t({typ:e.typ||$u.Jwt,kid:e.kid,alg:e.alg});return JSON.stringify(r)},t}();/*! @azure/msal-common v8.0.0 2022-11-07 */var Dy=function(){function t(e,r){this.cacheOutcome=Zi.NO_CACHE_HIT,this.cacheManager=r,this.apiId=e.apiId,this.correlationId=e.correlationId,this.wrapperSKU=e.wrapperSKU||b.EMPTY_STRING,this.wrapperVer=e.wrapperVer||b.EMPTY_STRING,this.telemetryCacheKey=pt.CACHE_KEY+xr.CACHE_KEY_SEPARATOR+e.clientId}return t.prototype.generateCurrentRequestHeaderValue=function(){var e=""+this.apiId+pt.VALUE_SEPARATOR+this.cacheOutcome,r=[this.wrapperSKU,this.wrapperVer].join(pt.VALUE_SEPARATOR),n=this.getRegionDiscoveryFields(),i=[e,n].join(pt.VALUE_SEPARATOR);return[pt.SCHEMA_VERSION,i,r].join(pt.CATEGORY_SEPARATOR)},t.prototype.generateLastRequestHeaderValue=function(){var e=this.getLastRequests(),r=t.maxErrorsToSend(e),n=e.failedRequests.slice(0,2*r).join(pt.VALUE_SEPARATOR),i=e.errors.slice(0,r).join(pt.VALUE_SEPARATOR),o=e.errors.length,a=r<o?pt.OVERFLOW_TRUE:pt.OVERFLOW_FALSE,s=[o,a].join(pt.VALUE_SEPARATOR);return[pt.SCHEMA_VERSION,e.cacheHits,n,i,s].join(pt.CATEGORY_SEPARATOR)},t.prototype.cacheFailedRequest=function(e){var r=this.getLastRequests();r.errors.length>=pt.MAX_CACHED_ERRORS&&(r.failedRequests.shift(),r.failedRequests.shift(),r.errors.shift()),r.failedRequests.push(this.apiId,this.correlationId),N.isEmpty(e.subError)?N.isEmpty(e.errorCode)?!!e&&e.toString()?r.errors.push(e.toString()):r.errors.push(pt.UNKNOWN_ERROR):r.errors.push(e.errorCode):r.errors.push(e.subError),this.cacheManager.setServerTelemetry(this.telemetryCacheKey,r)},t.prototype.incrementCacheHits=function(){var e=this.getLastRequests();return e.cacheHits+=1,this.cacheManager.setServerTelemetry(this.telemetryCacheKey,e),e.cacheHits},t.prototype.getLastRequests=function(){var e=new Md,r=this.cacheManager.getServerTelemetry(this.telemetryCacheKey);return r||e},t.prototype.clearTelemetryCache=function(){var e=this.getLastRequests(),r=t.maxErrorsToSend(e),n=e.errors.length;if(r===n)this.cacheManager.removeItem(this.telemetryCacheKey);else{var i=new Md;i.failedRequests=e.failedRequests.slice(r*2),i.errors=e.errors.slice(r),this.cacheManager.setServerTelemetry(this.telemetryCacheKey,i)}},t.maxErrorsToSend=function(e){var r,n=0,i=0,o=e.errors.length;for(r=0;r<o;r++){var a=e.failedRequests[2*r]||b.EMPTY_STRING,s=e.failedRequests[2*r+1]||b.EMPTY_STRING,c=e.errors[r]||b.EMPTY_STRING;if(i+=a.toString().length+s.toString().length+c.length+3,i<pt.MAX_LAST_HEADER_BYTES)n+=1;else break}return n},t.prototype.getRegionDiscoveryFields=function(){var e=[];return e.push(this.regionUsed||b.EMPTY_STRING),e.push(this.regionSource||b.EMPTY_STRING),e.push(this.regionOutcome||b.EMPTY_STRING),e.join(",")},t.prototype.updateRegionDiscoveryMetadata=function(e){this.regionUsed=e.region_used,this.regionSource=e.region_source,this.regionOutcome=e.region_outcome},t.prototype.setCacheOutcome=function(e){this.cacheOutcome=e},t}();/*! @azure/msal-common v8.0.0 2022-11-07 */var Mg=function(){function t(e,r,n,i,o,a){this.authority=r,this.libraryName=i,this.libraryVersion=o,this.applicationTelemetry=a,this.clientId=e,this.logger=n,this.callbacks=new Map,this.eventsByCorrelationId=new Map,this.staticFieldsByCorrelationId=new Map,this.measurementsById=new Map}return t.prototype.startMeasurement=function(e,r){var n=this,i,o,a=r||this.generateId();r||this.logger.info("PerformanceClient: No correlation id provided for "+e+", generating",a),this.logger.trace("PerformanceClient: Performance measurement started for "+e,a);var s=this.startPerformanceMeasuremeant(e,a);s.startMeasurement();var c={eventId:this.generateId(),status:ta.InProgress,authority:this.authority,libraryName:this.libraryName,libraryVersion:this.libraryVersion,clientId:this.clientId,name:e,startTimeMs:Date.now(),correlationId:a};this.cacheEventByCorrelationId(c);var l={appName:(i=this.applicationTelemetry)===null||i===void 0?void 0:i.appName,appVersion:(o=this.applicationTelemetry)===null||o===void 0?void 0:o.appVersion};return this.addStaticFields(l,a),this.cacheMeasurement(c,s),{endMeasurement:function(d){var h=n.endMeasurement(Te(Te({},c),d));return h&&n.cacheEventByCorrelationId(h),h},flushMeasurement:function(){return n.flushMeasurements(c.name,c.correlationId)},discardMeasurement:function(){return n.discardMeasurements(c.correlationId)},addStaticFields:function(d){return n.addStaticFields(d,c.correlationId)},measurement:s,event:c}},t.prototype.endMeasurement=function(e){var r=this.measurementsById.get(e.eventId);if(r){this.measurementsById.delete(e.eventId),r.endMeasurement();var n=r.flushMeasurement();if(n!==null){this.logger.trace("PerformanceClient: Performance measurement ended for "+e.name+": "+n+" ms",e.correlationId);var i=Te(Te({durationMs:Math.round(n)},e),{status:ta.Completed});return i}else this.logger.trace("PerformanceClient: Performance measurement not taken",e.correlationId)}else this.logger.trace("PerformanceClient: Measurement not found for "+e.eventId,e.correlationId);return null},t.prototype.addStaticFields=function(e,r){var n=this.staticFieldsByCorrelationId.get(r);n?(this.logger.trace("PerformanceClient: Updating static fields"),this.staticFieldsByCorrelationId.set(r,Te(Te({},n),e))):(this.logger.trace("PerformanceClient: Adding static fields"),this.staticFieldsByCorrelationId.set(r,e))},t.prototype.cacheEventByCorrelationId=function(e){var r=this.eventsByCorrelationId.get(e.correlationId);r?(this.logger.trace("PerformanceClient: Performance measurement for "+e.name+" added/updated",e.correlationId),r.set(e.eventId,e)):(this.logger.trace("PerformanceClient: Performance measurement for "+e.name+" started",e.correlationId),this.eventsByCorrelationId.set(e.correlationId,new Map().set(e.eventId,e)))},t.prototype.cacheMeasurement=function(e,r){this.measurementsById.set(e.eventId,r)},t.prototype.flushMeasurements=function(e,r){var n=this;this.logger.trace("PerformanceClient: Performance measurements flushed for "+e,r);var i=this.eventsByCorrelationId.get(r);if(i){this.discardMeasurements(r);var o=[];i.forEach(function(u){if(u.name!==e&&u.status!==ta.Completed){n.logger.trace("PerformanceClient: Incomplete submeasurement "+u.name+" found for "+e,r);var f=n.endMeasurement(u);f&&o.push(f)}o.push(u)});var a=o.sort(function(u,f){return u.startTimeMs-f.startTimeMs}),s=a.filter(function(u){return u.name===e&&u.status===ta.Completed});if(s.length>0){s.length>1&&this.logger.verbose("PerformanceClient: Multiple distinct top-level performance events found, using the first",r);var c=s[0];this.logger.verbose("PerformanceClient: Measurement found for "+e,r);var l=a.reduce(function(u,f){if(f.name!==e){n.logger.trace("PerformanceClient: Complete submeasurement found for "+f.name,r);var v=f.name+"DurationMs";u[v]?n.logger.verbose("PerformanceClient: Submeasurement for "+e+" already exists for "+f.name+", ignoring",r):u[v]=f.durationMs}return u},c),d=this.staticFieldsByCorrelationId.get(r),h=Te(Te({},l),d);this.emitEvents([h],l.correlationId)}else this.logger.verbose("PerformanceClient: No completed top-level measurements found for "+e,r)}else this.logger.verbose("PerformanceClient: No measurements found",r)},t.prototype.discardMeasurements=function(e){this.logger.trace("PerformanceClient: Performance measurements discarded",e),this.eventsByCorrelationId.delete(e)},t.prototype.addPerformanceCallback=function(e){var r=this.generateId();return this.callbacks.set(r,e),this.logger.verbose("PerformanceClient: Performance callback registered with id: "+r),r},t.prototype.removePerformanceCallback=function(e){var r=this.callbacks.delete(e);return r?this.logger.verbose("PerformanceClient: Performance callback "+e+" removed."):this.logger.verbose("PerformanceClient: Performance callback "+e+" not removed."),r},t.prototype.emitEvents=function(e,r){var n=this;this.logger.verbose("PerformanceClient: Emitting performance events",r),this.callbacks.forEach(function(i,o){n.logger.trace("PerformanceClient: Emitting event to callback "+o,r),i.apply(null,[e])})},t}();/*! @azure/msal-common v8.0.0 2022-11-07 */var Ny=function(){function t(){}return t.prototype.startMeasurement=function(){},t.prototype.endMeasurement=function(){},t.prototype.flushMeasurement=function(){return null},t}(),Vy=function(t){ur(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.generateId=function(){return"callback-id"},e.prototype.startPerformanceMeasuremeant=function(){return new Ny},e}(Mg);/*! @azure/msal-browser v2.31.0 2022-11-07 */var I={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."},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."}},O=function(t){xt(e,t);function e(r,n){var i=t.call(this,r,n)||this;return Object.setPrototypeOf(i,e.prototype),i.name="BrowserAuthError",i}return e.createPkceNotGeneratedError=function(r){return new e(I.pkceNotGenerated.code,I.pkceNotGenerated.desc+" Detail:"+r)},e.createCryptoNotAvailableError=function(r){return new e(I.cryptoDoesNotExist.code,I.cryptoDoesNotExist.desc+" Detail:"+r)},e.createHttpMethodNotImplementedError=function(r){return new e(I.httpMethodNotImplementedError.code,I.httpMethodNotImplementedError.desc+" Given Method: "+r)},e.createEmptyNavigationUriError=function(){return new e(I.emptyNavigateUriError.code,I.emptyNavigateUriError.desc)},e.createEmptyHashError=function(r){return new e(I.hashEmptyError.code,I.hashEmptyError.desc+" Given Url: "+r)},e.createHashDoesNotContainStateError=function(){return new e(I.hashDoesNotContainStateError.code,I.hashDoesNotContainStateError.desc)},e.createHashDoesNotContainKnownPropertiesError=function(){return new e(I.hashDoesNotContainKnownPropertiesError.code,I.hashDoesNotContainKnownPropertiesError.desc)},e.createUnableToParseStateError=function(){return new e(I.unableToParseStateError.code,I.unableToParseStateError.desc)},e.createStateInteractionTypeMismatchError=function(){return new e(I.stateInteractionTypeMismatchError.code,I.stateInteractionTypeMismatchError.desc)},e.createInteractionInProgressError=function(){return new e(I.interactionInProgress.code,I.interactionInProgress.desc)},e.createPopupWindowError=function(r){var n=I.popupWindowError.desc;return n=N.isEmpty(r)?n:n+" Details: "+r,new e(I.popupWindowError.code,n)},e.createEmptyWindowCreatedError=function(){return new e(I.emptyWindowError.code,I.emptyWindowError.desc)},e.createUserCancelledError=function(){return new e(I.userCancelledError.code,I.userCancelledError.desc)},e.createMonitorPopupTimeoutError=function(){return new e(I.monitorPopupTimeoutError.code,I.monitorPopupTimeoutError.desc)},e.createMonitorIframeTimeoutError=function(){return new e(I.monitorIframeTimeoutError.code,I.monitorIframeTimeoutError.desc)},e.createRedirectInIframeError=function(r){return new e(I.redirectInIframeError.code,I.redirectInIframeError.desc+" (window.parent !== window) => "+r)},e.createBlockReloadInHiddenIframeError=function(){return new e(I.blockTokenRequestsInHiddenIframeError.code,I.blockTokenRequestsInHiddenIframeError.desc)},e.createBlockAcquireTokenInPopupsError=function(){return new e(I.blockAcquireTokenInPopupsError.code,I.blockAcquireTokenInPopupsError.desc)},e.createIframeClosedPrematurelyError=function(){return new e(I.iframeClosedPrematurelyError.code,I.iframeClosedPrematurelyError.desc)},e.createSilentLogoutUnsupportedError=function(){return new e(I.silentLogoutUnsupportedError.code,I.silentLogoutUnsupportedError.desc)},e.createNoAccountError=function(){return new e(I.noAccountError.code,I.noAccountError.desc)},e.createSilentPromptValueError=function(r){return new e(I.silentPromptValueError.code,I.silentPromptValueError.desc+" Given value: "+r)},e.createUnableToParseTokenRequestCacheError=function(){return new e(I.unableToParseTokenRequestCacheError.code,I.unableToParseTokenRequestCacheError.desc)},e.createNoTokenRequestCacheError=function(){return new e(I.noTokenRequestCacheError.code,I.noTokenRequestCacheError.desc)},e.createAuthRequestNotSetError=function(){return new e(I.authRequestNotSet.code,I.authRequestNotSet.desc)},e.createNoCachedAuthorityError=function(){return new e(I.noCachedAuthorityError.code,I.noCachedAuthorityError.desc)},e.createInvalidCacheTypeError=function(){return new e(I.invalidCacheType.code,""+I.invalidCacheType.desc)},e.createNonBrowserEnvironmentError=function(){return new e(I.notInBrowserEnvironment.code,I.notInBrowserEnvironment.desc)},e.createDatabaseNotOpenError=function(){return new e(I.databaseNotOpen.code,I.databaseNotOpen.desc)},e.createNoNetworkConnectivityError=function(){return new e(I.noNetworkConnectivity.code,I.noNetworkConnectivity.desc)},e.createPostRequestFailedError=function(r,n){return new e(I.postRequestFailed.code,I.postRequestFailed.desc+" | Network client threw: "+r+" | Attempted to reach: "+n.split("?")[0])},e.createGetRequestFailedError=function(r,n){return new e(I.getRequestFailed.code,I.getRequestFailed.desc+" | Network client threw: "+r+" | Attempted to reach: "+n.split("?")[0])},e.createFailedToParseNetworkResponseError=function(r){return new e(I.failedToParseNetworkResponse.code,I.failedToParseNetworkResponse.desc+" | Attempted to reach: "+r.split("?")[0])},e.createUnableToLoadTokenError=function(r){return new e(I.unableToLoadTokenError.code,I.unableToLoadTokenError.desc+" | "+r)},e.createSigningKeyNotFoundInStorageError=function(r){return new e(I.signingKeyNotFoundInStorage.code,I.signingKeyNotFoundInStorage.desc+" | No match found for KeyId: "+r)},e.createAuthCodeRequiredError=function(){return new e(I.authCodeRequired.code,I.authCodeRequired.desc)},e.createAuthCodeOrNativeAccountIdRequiredError=function(){return new e(I.authCodeOrNativeAccountRequired.code,I.authCodeOrNativeAccountRequired.desc)},e.createDatabaseUnavailableError=function(){return new e(I.databaseUnavailable.code,I.databaseUnavailable.desc)},e.createUnableToAcquireTokenFromNativePlatformError=function(){return new e(I.unableToAcquireTokenFromNativePlatform.code,I.unableToAcquireTokenFromNativePlatform.desc)},e.createNativeHandshakeTimeoutError=function(){return new e(I.nativeHandshakeTimeout.code,I.nativeHandshakeTimeout.desc)},e.createNativeExtensionNotInstalledError=function(){return new e(I.nativeExtensionNotInstalled.code,I.nativeExtensionNotInstalled.desc)},e.createNativeConnectionNotEstablishedError=function(){return new e(I.nativeConnectionNotEstablished.code,I.nativeConnectionNotEstablished.desc)},e.createNativeBrokerCalledBeforeInitialize=function(){return new e(I.nativeBrokerCalledBeforeInitialize.code,I.nativeBrokerCalledBeforeInitialize.desc)},e.createNativePromptParameterNotSupportedError=function(){return new e(I.nativePromptNotSupported.code,I.nativePromptNotSupported.desc)},e}(Y);/*! @azure/msal-browser v2.31.0 2022-11-07 */var Jr={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"},ls={CHANNEL_ID:"53ee284d-920a-4b59-9d30-a60315b26836",PREFERRED_EXTENSION_ID:"ppnbnpeolgkicgegkbkbjmhlideopiji",MATS_TELEMETRY:"MATS"},On;(function(t){t.HandshakeRequest="Handshake",t.HandshakeResponse="HandshakeResponse",t.GetToken="GetToken",t.Response="Response"})(On||(On={}));var Ot;(function(t){t.LocalStorage="localStorage",t.SessionStorage="sessionStorage",t.MemoryStorage="memoryStorage"})(Ot||(Ot={}));var un;(function(t){t.GET="GET",t.POST="POST"})(un||(un={}));var ge;(function(t){t.AUTHORITY="authority",t.ACQUIRE_TOKEN_ACCOUNT="acquireToken.account",t.SESSION_STATE="session.state",t.REQUEST_STATE="request.state",t.NONCE_IDTOKEN="nonce.id_token",t.ORIGIN_URI="request.origin",t.RENEW_STATUS="token.renew.status",t.URL_HASH="urlHash",t.REQUEST_PARAMS="request.params",t.SCOPES="scopes",t.INTERACTION_STATUS_KEY="interaction.status",t.CCS_CREDENTIAL="ccs.credential",t.CORRELATION_ID="request.correlationId",t.NATIVE_REQUEST="request.native"})(ge||(ge={}));var ra;(function(t){t.WRAPPER_SKU="wrapper.sku",t.WRAPPER_VER="wrapper.version"})(ra||(ra={}));var Ae;(function(t){t[t.acquireTokenRedirect=861]="acquireTokenRedirect",t[t.acquireTokenPopup=862]="acquireTokenPopup",t[t.ssoSilent=863]="ssoSilent",t[t.acquireTokenSilent_authCode=864]="acquireTokenSilent_authCode",t[t.handleRedirectPromise=865]="handleRedirectPromise",t[t.acquireTokenByCode=866]="acquireTokenByCode",t[t.acquireTokenSilent_silentFlow=61]="acquireTokenSilent_silentFlow",t[t.logout=961]="logout",t[t.logoutPopup=962]="logoutPopup"})(Ae||(Ae={}));var G;(function(t){t.Redirect="redirect",t.Popup="popup",t.Silent="silent",t.None="none"})(G||(G={}));var Op;(function(t){t.Startup="startup",t.Login="login",t.Logout="logout",t.AcquireToken="acquireToken",t.SsoSilent="ssoSilent",t.HandleRedirect="handleRedirect",t.None="none"})(Op||(Op={}));var Dp={scopes:_c},Ea="jwk",Np;(function(t){t.React="@azure/msal-react",t.Angular="@azure/msal-angular"})(Np||(Np={}));var Gu="msal.db",Uy=1,Fy=Gu+".keys",or;(function(t){t[t.Default=0]="Default",t[t.AccessToken=1]="AccessToken",t[t.AccessTokenAndRefreshToken=2]="AccessTokenAndRefreshToken",t[t.RefreshToken=3]="RefreshToken",t[t.RefreshTokenAndNetwork=4]="RefreshTokenAndNetwork",t[t.Skip=5]="Skip"})(or||(or={}));/*! @azure/msal-browser v2.31.0 2022-11-07 */var nr={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."},invalidCallbackObject:{code:"invalid_callback_object",desc:"The object passed for the callback was invalid. 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."}},Pd=function(t){xt(e,t);function e(r,n){var i=t.call(this,r,n)||this;return i.name="BrowserConfigurationAuthError",Object.setPrototypeOf(i,e.prototype),i}return e.createRedirectUriEmptyError=function(){return new e(nr.redirectUriNotSet.code,nr.redirectUriNotSet.desc)},e.createPostLogoutRedirectUriEmptyError=function(){return new e(nr.postLogoutUriNotSet.code,nr.postLogoutUriNotSet.desc)},e.createStorageNotSupportedError=function(r){return new e(nr.storageNotSupportedError.code,nr.storageNotSupportedError.desc+" Given Location: "+r)},e.createRedirectCallbacksNotSetError=function(){return new e(nr.noRedirectCallbacksSet.code,nr.noRedirectCallbacksSet.desc)},e.createStubPcaInstanceCalledError=function(){return new e(nr.stubPcaInstanceCalled.code,nr.stubPcaInstanceCalled.desc)},e.createInMemoryRedirectUnavailableError=function(){return new e(nr.inMemRedirectUnavailable.code,nr.inMemRedirectUnavailable.desc)},e.createEntropyNotProvided=function(){return new e(nr.entropyNotProvided.code,nr.entropyNotProvided.desc)},e}(Y);/*! @azure/msal-browser v2.31.0 2022-11-07 */var Vp=function(){function t(e){this.validateWindowStorage(e),this.windowStorage=window[e]}return t.prototype.validateWindowStorage=function(e){if(e!==Ot.LocalStorage&&e!==Ot.SessionStorage)throw Pd.createStorageNotSupportedError(e);var r=!!window[e];if(!r)throw Pd.createStorageNotSupportedError(e)},t.prototype.getItem=function(e){return this.windowStorage.getItem(e)},t.prototype.setItem=function(e,r){this.windowStorage.setItem(e,r)},t.prototype.removeItem=function(e){this.windowStorage.removeItem(e)},t.prototype.getKeys=function(){return Object.keys(this.windowStorage)},t.prototype.containsKey=function(e){return this.windowStorage.hasOwnProperty(e)},t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var Ku=function(){function t(){this.cache=new Map}return t.prototype.getItem=function(e){return this.cache.get(e)||null},t.prototype.setItem=function(e,r){this.cache.set(e,r)},t.prototype.removeItem=function(e){this.cache.delete(e)},t.prototype.getKeys=function(){var e=[];return this.cache.forEach(function(r,n){e.push(n)}),e},t.prototype.containsKey=function(e){return this.cache.has(e)},t.prototype.clear=function(){this.cache.clear()},t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var Pg=function(){function t(){}return t.extractBrowserRequestState=function(e,r){if(N.isEmpty(r))return null;try{var n=Un.parseRequestState(e,r);return n.libraryState.meta}catch(i){throw j.createInvalidStateError(r,i)}},t.parseServerResponseFromHash=function(e){if(!e)return{};var r=new me(e);return me.getDeserializedHash(r.getHash())},t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var Wu=function(t){xt(e,t);function e(r,n,i,o){var a=t.call(this,r,i)||this;return a.COOKIE_LIFE_MULTIPLIER=24*60*60*1e3,a.cacheConfig=n,a.logger=o,a.internalStorage=new Ku,a.browserStorage=a.setupBrowserStorage(a.cacheConfig.cacheLocation),a.temporaryCacheStorage=a.setupTemporaryCacheStorage(a.cacheConfig.cacheLocation),a.migrateCacheEntries(),a}return e.prototype.setupBrowserStorage=function(r){switch(r){case Ot.LocalStorage:case Ot.SessionStorage:try{return new Vp(r)}catch(n){this.logger.verbose(n);break}}return this.cacheConfig.cacheLocation=Ot.MemoryStorage,new Ku},e.prototype.setupTemporaryCacheStorage=function(r){switch(r){case Ot.LocalStorage:case Ot.SessionStorage:try{return new Vp(Ot.SessionStorage)}catch(n){return this.logger.verbose(n),this.internalStorage}case Ot.MemoryStorage:default:return this.internalStorage}},e.prototype.migrateCacheEntries=function(){var r=this,n=b.CACHE_PREFIX+"."+ot.ID_TOKEN,i=b.CACHE_PREFIX+"."+ot.CLIENT_INFO,o=b.CACHE_PREFIX+"."+ot.ERROR,a=b.CACHE_PREFIX+"."+ot.ERROR_DESC,s=this.browserStorage.getItem(n),c=this.browserStorage.getItem(i),l=this.browserStorage.getItem(o),d=this.browserStorage.getItem(a),h=[s,c,l,d],u=[ot.ID_TOKEN,ot.CLIENT_INFO,ot.ERROR,ot.ERROR_DESC];u.forEach(function(f,v){return r.migrateCacheEntry(f,h[v])})},e.prototype.migrateCacheEntry=function(r,n){n&&this.setTemporaryCache(r,n,!0)},e.prototype.validateAndParseJson=function(r){try{var n=JSON.parse(r);return n&&typeof n=="object"?n:null}catch{return null}},e.prototype.getItem=function(r){return this.browserStorage.getItem(r)},e.prototype.setItem=function(r,n){this.browserStorage.setItem(r,n)},e.prototype.getAccount=function(r){var n=this.getItem(r);if(!n)return null;var i=this.validateAndParseJson(n);return!i||!_t.isAccountEntity(i)?null:Wr.toObject(new _t,i)},e.prototype.setAccount=function(r){this.logger.trace("BrowserCacheManager.setAccount called");var n=r.generateAccountKey();this.setItem(n,JSON.stringify(r))},e.prototype.getIdTokenCredential=function(r){var n=this.getItem(r);if(!n)return this.logger.trace("BrowserCacheManager.getIdTokenCredential: called, no cache hit"),null;var i=this.validateAndParseJson(n);return!i||!nc.isIdTokenEntity(i)?(this.logger.trace("BrowserCacheManager.getIdTokenCredential: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getIdTokenCredential: cache hit"),Wr.toObject(new nc,i))},e.prototype.setIdTokenCredential=function(r){this.logger.trace("BrowserCacheManager.setIdTokenCredential called");var n=r.generateCredentialKey();this.setItem(n,JSON.stringify(r))},e.prototype.getAccessTokenCredential=function(r){var n=this.getItem(r);if(!n)return this.logger.trace("BrowserCacheManager.getAccessTokenCredential: called, no cache hit"),null;var i=this.validateAndParseJson(n);return!i||!ic.isAccessTokenEntity(i)?(this.logger.trace("BrowserCacheManager.getAccessTokenCredential: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getAccessTokenCredential: cache hit"),Wr.toObject(new ic,i))},e.prototype.setAccessTokenCredential=function(r){this.logger.trace("BrowserCacheManager.setAccessTokenCredential called");var n=r.generateCredentialKey();this.setItem(n,JSON.stringify(r))},e.prototype.getRefreshTokenCredential=function(r){var n=this.getItem(r);if(!n)return this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: called, no cache hit"),null;var i=this.validateAndParseJson(n);return!i||!Sd.isRefreshTokenEntity(i)?(this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: cache hit"),Wr.toObject(new Sd,i))},e.prototype.setRefreshTokenCredential=function(r){this.logger.trace("BrowserCacheManager.setRefreshTokenCredential called");var n=r.generateCredentialKey();this.setItem(n,JSON.stringify(r))},e.prototype.getAppMetadata=function(r){var n=this.getItem(r);if(!n)return this.logger.trace("BrowserCacheManager.getAppMetadata: called, no cache hit"),null;var i=this.validateAndParseJson(n);return!i||!Bu.isAppMetadataEntity(r,i)?(this.logger.trace("BrowserCacheManager.getAppMetadata: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getAppMetadata: cache hit"),Wr.toObject(new Bu,i))},e.prototype.setAppMetadata=function(r){this.logger.trace("BrowserCacheManager.setAppMetadata called");var n=r.generateAppMetadataKey();this.setItem(n,JSON.stringify(r))},e.prototype.getServerTelemetry=function(r){var n=this.getItem(r);if(!n)return this.logger.trace("BrowserCacheManager.getServerTelemetry: called, no cache hit"),null;var i=this.validateAndParseJson(n);return!i||!Md.isServerTelemetryEntity(r,i)?(this.logger.trace("BrowserCacheManager.getServerTelemetry: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getServerTelemetry: cache hit"),Wr.toObject(new Md,i))},e.prototype.setServerTelemetry=function(r,n){this.logger.trace("BrowserCacheManager.setServerTelemetry called"),this.setItem(r,JSON.stringify(n))},e.prototype.getAuthorityMetadata=function(r){var n=this.internalStorage.getItem(r);if(!n)return this.logger.trace("BrowserCacheManager.getAuthorityMetadata: called, no cache hit"),null;var i=this.validateAndParseJson(n);return i&&qu.isAuthorityMetadataEntity(r,i)?(this.logger.trace("BrowserCacheManager.getAuthorityMetadata: cache hit"),Wr.toObject(new qu,i)):null},e.prototype.getAuthorityMetadataKeys=function(){var r=this,n=this.internalStorage.getKeys();return n.filter(function(i){return r.isAuthorityMetadata(i)})},e.prototype.setWrapperMetadata=function(r,n){this.internalStorage.setItem(ra.WRAPPER_SKU,r),this.internalStorage.setItem(ra.WRAPPER_VER,n)},e.prototype.getWrapperMetadata=function(){var r=this.internalStorage.getItem(ra.WRAPPER_SKU)||b.EMPTY_STRING,n=this.internalStorage.getItem(ra.WRAPPER_VER)||b.EMPTY_STRING;return[r,n]},e.prototype.setAuthorityMetadata=function(r,n){this.logger.trace("BrowserCacheManager.setAuthorityMetadata called"),this.internalStorage.setItem(r,JSON.stringify(n))},e.prototype.getActiveAccount=function(){var r=this.generateCacheKey(ot.ACTIVE_ACCOUNT_FILTERS),n=this.getItem(r);if(!n){this.logger.trace("No active account filters cache schema found, looking for legacy schema");var i=this.generateCacheKey(ot.ACTIVE_ACCOUNT),o=this.getItem(i);if(!o)return this.logger.trace("No active account found"),null;var a=this.getAccountInfoByFilter({localAccountId:o})[0]||null;return a?(this.logger.trace("Legacy active account cache schema found"),this.logger.trace("Adding active account filters cache schema"),this.setActiveAccount(a),a):null}var s=this.validateAndParseJson(n);return s?(this.logger.trace("Active account filters schema found"),this.getAccountInfoByFilter({homeAccountId:s.homeAccountId,localAccountId:s.localAccountId})[0]||null):(this.logger.trace("No active account found"),null)},e.prototype.setActiveAccount=function(r){var n=this.generateCacheKey(ot.ACTIVE_ACCOUNT_FILTERS),i=this.generateCacheKey(ot.ACTIVE_ACCOUNT);if(r){this.logger.verbose("setActiveAccount: Active account set");var o={homeAccountId:r.homeAccountId,localAccountId:r.localAccountId};this.browserStorage.setItem(n,JSON.stringify(o)),this.browserStorage.setItem(i,r.localAccountId)}else this.logger.verbose("setActiveAccount: No account passed, active account not set"),this.browserStorage.removeItem(n),this.browserStorage.removeItem(i)},e.prototype.getAccountInfoByFilter=function(r){var n=this.getAllAccounts();return n.filter(function(i){return!(r.username&&r.username.toLowerCase()!==i.username.toLowerCase()||r.homeAccountId&&r.homeAccountId!==i.homeAccountId||r.localAccountId&&r.localAccountId!==i.localAccountId||r.tenantId&&r.tenantId!==i.tenantId||r.environment&&r.environment!==i.environment)})},e.prototype.getAccountInfoByHints=function(r,n){var i=this.getAllAccounts().filter(function(o){if(n){var a=o.idTokenClaims&&o.idTokenClaims.sid;return n===a}return r?r===o.username:!1});if(i.length===1)return i[0];if(i.length>1)throw j.createMultipleMatchingAccountsInCacheError();return null},e.prototype.getThrottlingCache=function(r){var n=this.getItem(r);if(!n)return this.logger.trace("BrowserCacheManager.getThrottlingCache: called, no cache hit"),null;var i=this.validateAndParseJson(n);return!i||!Hp.isThrottlingEntity(r,i)?(this.logger.trace("BrowserCacheManager.getThrottlingCache: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getThrottlingCache: cache hit"),Wr.toObject(new Hp,i))},e.prototype.setThrottlingCache=function(r,n){this.logger.trace("BrowserCacheManager.setThrottlingCache called"),this.setItem(r,JSON.stringify(n))},e.prototype.getTemporaryCache=function(r,n){var i=n?this.generateCacheKey(r):r;if(this.cacheConfig.storeAuthStateInCookie){var o=this.getItemCookie(i);if(o)return this.logger.trace("BrowserCacheManager.getTemporaryCache: storeAuthStateInCookies set to true, retrieving from cookies"),o}var a=this.temporaryCacheStorage.getItem(i);if(!a){if(this.cacheConfig.cacheLocation===Ot.LocalStorage){var s=this.browserStorage.getItem(i);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},e.prototype.setTemporaryCache=function(r,n,i){var o=i?this.generateCacheKey(r):r;this.temporaryCacheStorage.setItem(o,n),this.cacheConfig.storeAuthStateInCookie&&(this.logger.trace("BrowserCacheManager.setTemporaryCache: storeAuthStateInCookie set to true, setting item cookie"),this.setItemCookie(o,n))},e.prototype.removeItem=function(r){return this.browserStorage.removeItem(r),this.temporaryCacheStorage.removeItem(r),this.cacheConfig.storeAuthStateInCookie&&(this.logger.trace("BrowserCacheManager.removeItem: storeAuthStateInCookie is true, clearing item cookie"),this.clearItemCookie(r)),!0},e.prototype.containsKey=function(r){return this.browserStorage.containsKey(r)||this.temporaryCacheStorage.containsKey(r)},e.prototype.getKeys=function(){return M0(this.browserStorage.getKeys(),this.temporaryCacheStorage.getKeys())},e.prototype.clear=function(){return S(this,void 0,void 0,function(){var r=this;return k(this,function(n){switch(n.label){case 0:return[4,this.removeAllAccounts()];case 1:return n.sent(),this.removeAppMetadata(),this.getKeys().forEach(function(i){(r.browserStorage.containsKey(i)||r.temporaryCacheStorage.containsKey(i))&&(i.indexOf(b.CACHE_PREFIX)!==-1||i.indexOf(r.clientId)!==-1)&&r.removeItem(i)}),this.internalStorage.clear(),[2]}})})},e.prototype.setItemCookie=function(r,n,i){var o=encodeURIComponent(r)+"="+encodeURIComponent(n)+";path=/;SameSite=Lax;";if(i){var a=this.getCookieExpirationTime(i);o+="expires="+a+";"}this.cacheConfig.secureCookies&&(o+="Secure;"),document.cookie=o},e.prototype.getItemCookie=function(r){for(var n=encodeURIComponent(r)+"=",i=document.cookie.split(";"),o=0;o<i.length;o++){for(var a=i[o];a.charAt(0)===" ";)a=a.substring(1);if(a.indexOf(n)===0)return decodeURIComponent(a.substring(n.length,a.length))}return b.EMPTY_STRING},e.prototype.clearMsalCookies=function(){var r=this,n=b.CACHE_PREFIX+"."+this.clientId,i=document.cookie.split(";");i.forEach(function(o){for(;o.charAt(0)===" ";)o=o.substring(1);if(o.indexOf(n)===0){var a=o.split("=")[0];r.clearItemCookie(a)}})},e.prototype.clearItemCookie=function(r){this.setItemCookie(r,b.EMPTY_STRING,-1)},e.prototype.getCookieExpirationTime=function(r){var n=new Date,i=new Date(n.getTime()+r*this.COOKIE_LIFE_MULTIPLIER);return i.toUTCString()},e.prototype.getCache=function(){return this.browserStorage},e.prototype.setCache=function(){},e.prototype.generateCacheKey=function(r){var n=this.validateAndParseJson(r);return n?JSON.stringify(r):N.startsWith(r,b.CACHE_PREFIX)||N.startsWith(r,ot.ADAL_ID_TOKEN)?r:b.CACHE_PREFIX+"."+this.clientId+"."+r},e.prototype.generateAuthorityKey=function(r){var n=Un.parseRequestState(this.cryptoImpl,r).libraryState.id;return this.generateCacheKey(ge.AUTHORITY+"."+n)},e.prototype.generateNonceKey=function(r){var n=Un.parseRequestState(this.cryptoImpl,r).libraryState.id;return this.generateCacheKey(ge.NONCE_IDTOKEN+"."+n)},e.prototype.generateStateKey=function(r){var n=Un.parseRequestState(this.cryptoImpl,r).libraryState.id;return this.generateCacheKey(ge.REQUEST_STATE+"."+n)},e.prototype.getCachedAuthority=function(r){var n=this.generateStateKey(r),i=this.getTemporaryCache(n);if(!i)return null;var o=this.generateAuthorityKey(i);return this.getTemporaryCache(o)},e.prototype.updateCacheEntries=function(r,n,i,o,a){this.logger.trace("BrowserCacheManager.updateCacheEntries called");var s=this.generateStateKey(r);this.setTemporaryCache(s,r,!1);var c=this.generateNonceKey(r);this.setTemporaryCache(c,n,!1);var l=this.generateAuthorityKey(r);if(this.setTemporaryCache(l,i,!1),a){var d={credential:a.homeAccountId,type:_r.HOME_ACCOUNT_ID};this.setTemporaryCache(ge.CCS_CREDENTIAL,JSON.stringify(d),!0)}else if(!N.isEmpty(o)){var d={credential:o,type:_r.UPN};this.setTemporaryCache(ge.CCS_CREDENTIAL,JSON.stringify(d),!0)}},e.prototype.resetRequestCache=function(r){var n=this;this.logger.trace("BrowserCacheManager.resetRequestCache called"),N.isEmpty(r)||this.getKeys().forEach(function(i){i.indexOf(r)!==-1&&n.removeItem(i)}),r&&(this.removeItem(this.generateStateKey(r)),this.removeItem(this.generateNonceKey(r)),this.removeItem(this.generateAuthorityKey(r))),this.removeItem(this.generateCacheKey(ge.REQUEST_PARAMS)),this.removeItem(this.generateCacheKey(ge.ORIGIN_URI)),this.removeItem(this.generateCacheKey(ge.URL_HASH)),this.removeItem(this.generateCacheKey(ge.CORRELATION_ID)),this.removeItem(this.generateCacheKey(ge.CCS_CREDENTIAL)),this.removeItem(this.generateCacheKey(ge.NATIVE_REQUEST)),this.setInteractionInProgress(!1)},e.prototype.cleanRequestByState=function(r){if(this.logger.trace("BrowserCacheManager.cleanRequestByState called"),r){var n=this.generateStateKey(r),i=this.temporaryCacheStorage.getItem(n);this.logger.infoPii("BrowserCacheManager.cleanRequestByState: Removing temporary cache items for state: "+i),this.resetRequestCache(i||b.EMPTY_STRING)}this.clearMsalCookies()},e.prototype.cleanRequestByInteractionType=function(r){var n=this;this.logger.trace("BrowserCacheManager.cleanRequestByInteractionType called"),this.getKeys().forEach(function(i){if(i.indexOf(ge.REQUEST_STATE)!==-1){var o=n.temporaryCacheStorage.getItem(i);if(!!o){var a=Pg.extractBrowserRequestState(n.cryptoImpl,o);a&&a.interactionType===r&&(n.logger.infoPii("BrowserCacheManager.cleanRequestByInteractionType: Removing temporary cache items for state: "+o),n.resetRequestCache(o))}}}),this.clearMsalCookies(),this.setInteractionInProgress(!1)},e.prototype.cacheCodeRequest=function(r,n){this.logger.trace("BrowserCacheManager.cacheCodeRequest called");var i=n.base64Encode(JSON.stringify(r));this.setTemporaryCache(ge.REQUEST_PARAMS,i,!0)},e.prototype.getCachedRequest=function(r,n){this.logger.trace("BrowserCacheManager.getCachedRequest called");var i=this.getTemporaryCache(ge.REQUEST_PARAMS,!0);if(!i)throw O.createNoTokenRequestCacheError();var o=this.validateAndParseJson(n.base64Decode(i));if(!o)throw O.createUnableToParseTokenRequestCacheError();if(this.removeItem(this.generateCacheKey(ge.REQUEST_PARAMS)),N.isEmpty(o.authority)){var a=this.generateAuthorityKey(r),s=this.getTemporaryCache(a);if(!s)throw O.createNoCachedAuthorityError();o.authority=s}return o},e.prototype.getCachedNativeRequest=function(){this.logger.trace("BrowserCacheManager.getCachedNativeRequest called");var r=this.getTemporaryCache(ge.NATIVE_REQUEST,!0);if(!r)return this.logger.trace("BrowserCacheManager.getCachedNativeRequest: No cached native request found"),null;var n=this.validateAndParseJson(r);return n||(this.logger.error("BrowserCacheManager.getCachedNativeRequest: Unable to parse native request"),null)},e.prototype.isInteractionInProgress=function(r){var n=this.getInteractionInProgress();return r?n===this.clientId:!!n},e.prototype.getInteractionInProgress=function(){var r=b.CACHE_PREFIX+"."+ge.INTERACTION_STATUS_KEY;return this.getTemporaryCache(r,!1)},e.prototype.setInteractionInProgress=function(r){var n=b.CACHE_PREFIX+"."+ge.INTERACTION_STATUS_KEY;if(r){if(this.getInteractionInProgress())throw O.createInteractionInProgressError();this.setTemporaryCache(n,this.clientId,!1)}else!r&&this.getInteractionInProgress()===this.clientId&&this.removeItem(n)},e.prototype.getLegacyLoginHint=function(){var r=this.getTemporaryCache(ot.ADAL_ID_TOKEN);r&&(this.browserStorage.removeItem(ot.ADAL_ID_TOKEN),this.logger.verbose("Cached ADAL id token retrieved."));var n=this.getTemporaryCache(ot.ID_TOKEN,!0);n&&(this.removeItem(this.generateCacheKey(ot.ID_TOKEN)),this.logger.verbose("Cached MSAL.js v1 id token retrieved"));var i=n||r;if(i){var o=new wn(i,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},e.prototype.updateCredentialCacheKey=function(r,n){var i=n.generateCredentialKey();if(r!==i){var o=this.getItem(r);if(o)return this.removeItem(r),this.setItem(i,o),this.logger.verbose("Updated an outdated "+n.credentialType+" cache key"),i;this.logger.error("Attempted to update an outdated "+n.credentialType+" cache key but no item matching the outdated key was found in storage")}return r},e}(Wr),$y=function(t,e){var r={cacheLocation:Ot.MemoryStorage,storeAuthStateInCookie:!1,secureCookies:!1};return new Wu(t,r,Ed,e)};/*! @azure/msal-browser v2.31.0 2022-11-07 */var ih="@azure/msal-browser",Rs="2.31.0";/*! @azure/msal-browser v2.31.0 2022-11-07 */var jy=function(){function t(){}return t.prototype.sendGetRequestAsync=function(e,r){return S(this,void 0,void 0,function(){var n,i,o;return k(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,fetch(e,{method:un.GET,headers:this.getFetchHeaders(r)})];case 1:return n=a.sent(),[3,3];case 2:throw i=a.sent(),window.navigator.onLine?O.createGetRequestFailedError(i,e):O.createNoNetworkConnectivityError();case 3:return a.trys.push([3,5,,6]),o={headers:this.getHeaderDict(n.headers)},[4,n.json()];case 4:return[2,(o.body=a.sent(),o.status=n.status,o)];case 5:throw a.sent(),O.createFailedToParseNetworkResponseError(e);case 6:return[2]}})})},t.prototype.sendPostRequestAsync=function(e,r){return S(this,void 0,void 0,function(){var n,i,o,a;return k(this,function(s){switch(s.label){case 0:n=r&&r.body||b.EMPTY_STRING,s.label=1;case 1:return s.trys.push([1,3,,4]),[4,fetch(e,{method:un.POST,headers:this.getFetchHeaders(r),body:n})];case 2:return i=s.sent(),[3,4];case 3:throw o=s.sent(),window.navigator.onLine?O.createPostRequestFailedError(o,e):O.createNoNetworkConnectivityError();case 4:return s.trys.push([4,6,,7]),a={headers:this.getHeaderDict(i.headers)},[4,i.json()];case 5:return[2,(a.body=s.sent(),a.status=i.status,a)];case 6:throw s.sent(),O.createFailedToParseNetworkResponseError(e);case 7:return[2]}})})},t.prototype.getFetchHeaders=function(e){var r=new Headers;if(!(e&&e.headers))return r;var n=e.headers;return Object.keys(n).forEach(function(i){r.append(i,n[i])}),r},t.prototype.getHeaderDict=function(e){var r={};return e.forEach(function(n,i){r[i]=n}),r},t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var By=function(){function t(){}return t.prototype.sendGetRequestAsync=function(e,r){return S(this,void 0,void 0,function(){return k(this,function(n){return[2,this.sendRequestAsync(e,un.GET,r)]})})},t.prototype.sendPostRequestAsync=function(e,r){return S(this,void 0,void 0,function(){return k(this,function(n){return[2,this.sendRequestAsync(e,un.POST,r)]})})},t.prototype.sendRequestAsync=function(e,r,n){var i=this;return new Promise(function(o,a){var s=new XMLHttpRequest;if(s.open(r,e,!0),i.setXhrHeaders(s,n),s.onload=function(){(s.status<200||s.status>=300)&&(r===un.POST?a(O.createPostRequestFailedError("Failed with status "+s.status,e)):a(O.createGetRequestFailedError("Failed with status "+s.status,e)));try{var c=JSON.parse(s.responseText),l={headers:i.getHeaderDict(s),body:c,status:s.status};o(l)}catch{a(O.createFailedToParseNetworkResponseError(e))}},s.onerror=function(){window.navigator.onLine?r===un.POST?a(O.createPostRequestFailedError("Failed with status "+s.status,e)):a(O.createGetRequestFailedError("Failed with status "+s.status,e)):a(O.createNoNetworkConnectivityError())},r===un.POST&&n&&n.body)s.send(n.body);else if(r===un.GET)s.send();else throw O.createHttpMethodNotImplementedError(r)})},t.prototype.setXhrHeaders=function(e,r){if(r&&r.headers){var n=r.headers;Object.keys(n).forEach(function(i){e.setRequestHeader(i,n[i])})}},t.prototype.getHeaderDict=function(e){var r=e.getAllResponseHeaders(),n=r.trim().split(/[\r\n]+/),i={};return n.forEach(function(o){var a=o.split(": "),s=a.shift(),c=a.join(": ");s&&c&&(i[s]=c)}),i},t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var We=function(){function t(){}return t.clearHash=function(e){e.location.hash=b.EMPTY_STRING,typeof e.history.replaceState=="function"&&e.history.replaceState(null,b.EMPTY_STRING,""+e.location.origin+e.location.pathname+e.location.search)},t.replaceHash=function(e){var r=e.split("#");r.shift(),window.location.hash=r.length>0?r.join("#"):b.EMPTY_STRING},t.isInIframe=function(){return window.parent!==window},t.isInPopup=function(){return typeof window<"u"&&!!window.opener&&window.opener!==window&&typeof window.name=="string"&&window.name.indexOf(Jr.POPUP_NAME_PREFIX+".")===0},t.getCurrentUri=function(){return window.location.href.split("?")[0].split("#")[0]},t.getHomepage=function(){var e=new me(window.location.href),r=e.getUrlComponents();return r.Protocol+"//"+r.HostNameAndPort+"/"},t.getBrowserNetworkClient=function(){return window.fetch&&window.Headers?new jy:new By},t.blockReloadInHiddenIframes=function(){var e=me.hashContainsKnownProperties(window.location.hash);if(e&&t.isInIframe())throw O.createBlockReloadInHiddenIframeError()},t.blockRedirectInIframe=function(e,r){var n=t.isInIframe();if(e===G.Redirect&&n&&!r)throw O.createRedirectInIframeError(n)},t.blockAcquireTokenInPopups=function(){if(t.isInPopup())throw O.createBlockAcquireTokenInPopupsError()},t.blockNonBrowserEnvironment=function(e){if(!e)throw O.createNonBrowserEnvironmentError()},t.blockNativeBrokerCalledBeforeInitialized=function(e,r){if(e&&!r)throw O.createNativeBrokerCalledBeforeInitialize()},t.detectIEOrEdge=function(){var e=window.navigator.userAgent,r=e.indexOf("MSIE "),n=e.indexOf("Trident/"),i=e.indexOf("Edge/"),o=r>0||n>0,a=i>0;return o||a},t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var Rg=function(){function t(e,r,n,i,o,a,s,c,l){this.config=e,this.browserStorage=r,this.browserCrypto=n,this.networkClient=this.config.system.networkClient,this.eventHandler=o,this.navigationClient=a,this.nativeMessageHandler=c,this.correlationId=l||this.browserCrypto.createNewGuid(),this.logger=i.clone(Jr.MSAL_SKU,Rs,this.correlationId),this.performanceClient=s}return t.prototype.clearCacheOnLogout=function(e){return S(this,void 0,void 0,function(){return k(this,function(r){switch(r.label){case 0:if(!e)return[3,5];_t.accountInfoIsEqual(e,this.browserStorage.getActiveAccount(),!1)&&(this.logger.verbose("Setting active account to null"),this.browserStorage.setActiveAccount(null)),r.label=1;case 1:return r.trys.push([1,3,,4]),[4,this.browserStorage.removeAccount(_t.generateAccountCacheKey(e))];case 2:return r.sent(),this.logger.verbose("Cleared cache items belonging to the account provided in the logout request."),[3,4];case 3:return r.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 r.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 r.sent(),[4,this.browserCrypto.clearKeystore()];case 7:return r.sent(),[3,9];case 8:return r.sent(),this.logger.error("Attempted to clear all MSAL cache items and failed. Local cache unchanged."),[3,9];case 9:return[2]}})})},t.prototype.initializeBaseRequest=function(e){return S(this,void 0,void 0,function(){var r,n,i,o;return k(this,function(a){switch(a.label){case 0:if(this.logger.verbose("Initializing BaseAuthRequest"),r=e.authority||this.config.auth.authority,n=M0(e&&e.scopes||[]),i=W(W({},e),{correlationId:this.correlationId,authority:r,scopes:n}),!i.authenticationScheme)i.authenticationScheme=be.BEARER,this.logger.verbose(`Authentication Scheme wasn't explicitly set in request, defaulting to "Bearer" request`);else{if(i.authenticationScheme===be.SSH){if(!e.sshJwk)throw He.createMissingSshJwkError();if(!e.sshKid)throw He.createMissingSshKidError()}this.logger.verbose('Authentication Scheme set to "'+i.authenticationScheme+'" as configured in Auth request')}return e.claims&&!N.isEmpty(e.claims)?(o=i,[4,this.browserCrypto.hashString(e.claims)]):[3,2];case 1:o.requestedClaimsHash=a.sent(),a.label=2;case 2:return[2,i]}})})},t.prototype.getRedirectUri=function(e){this.logger.verbose("getRedirectUri called");var r=e||this.config.auth.redirectUri||We.getCurrentUri();return me.getAbsoluteUrl(r,We.getCurrentUri())},t.prototype.initializeServerTelemetryManager=function(e,r){this.logger.verbose("initializeServerTelemetryManager called");var n={clientId:this.config.auth.clientId,correlationId:this.correlationId,apiId:e,forceRefresh:r||!1,wrapperSKU:this.browserStorage.getWrapperMetadata()[0],wrapperVer:this.browserStorage.getWrapperMetadata()[1]};return new Dy(n,this.browserStorage)},t.prototype.getDiscoveredAuthority=function(e){return S(this,void 0,void 0,function(){var r;return k(this,function(n){switch(n.label){case 0:return this.logger.verbose("getDiscoveredAuthority called"),r={protocolMode:this.config.auth.protocolMode,knownAuthorities:this.config.auth.knownAuthorities,cloudDiscoveryMetadata:this.config.auth.cloudDiscoveryMetadata,authorityMetadata:this.config.auth.authorityMetadata},e?(this.logger.verbose("Creating discovered authority with request authority"),[4,Id.createDiscoveredInstance(e,this.config.system.networkClient,this.browserStorage,r)]):[3,2];case 1:return[2,n.sent()];case 2:return this.logger.verbose("Creating discovered authority with configured authority"),[4,Id.createDiscoveredInstance(this.config.auth.authority,this.config.system.networkClient,this.browserStorage,r)];case 3:return[2,n.sent()]}})})},t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var Pa=function(t){xt(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.initializeAuthorizationCodeRequest=function(r){return S(this,void 0,void 0,function(){var n,i;return k(this,function(o){switch(o.label){case 0:return this.logger.verbose("initializeAuthorizationRequest called",r.correlationId),[4,this.browserCrypto.generatePkceCodes()];case 1:return n=o.sent(),i=W(W({},r),{redirectUri:r.redirectUri,code:b.EMPTY_STRING,codeVerifier:n.verifier}),r.codeChallenge=n.challenge,r.codeChallengeMethod=b.S256_CODE_CHALLENGE_METHOD,[2,i]}})})},e.prototype.initializeLogoutRequest=function(r){this.logger.verbose("initializeLogoutRequest called",r==null?void 0:r.correlationId);var n=W({correlationId:this.correlationId||this.browserCrypto.createNewGuid()},r);if(r)if(r.logoutHint)this.logger.verbose("logoutHint has already been set in logoutRequest");else if(r.account){var i=this.getLogoutHintFromIdTokenClaims(r.account);i&&(this.logger.verbose("Setting logoutHint to login_hint ID Token Claim value for the account provided"),n.logoutHint=i)}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!r||r.postLogoutRedirectUri!==null?r&&r.postLogoutRedirectUri?(this.logger.verbose("Setting postLogoutRedirectUri to uri set on logout request",n.correlationId),n.postLogoutRedirectUri=me.getAbsoluteUrl(r.postLogoutRedirectUri,We.getCurrentUri())):this.config.auth.postLogoutRedirectUri===null?this.logger.verbose("postLogoutRedirectUri configured as null and no uri set on request, not passing post logout redirect",n.correlationId):this.config.auth.postLogoutRedirectUri?(this.logger.verbose("Setting postLogoutRedirectUri to configured uri",n.correlationId),n.postLogoutRedirectUri=me.getAbsoluteUrl(this.config.auth.postLogoutRedirectUri,We.getCurrentUri())):(this.logger.verbose("Setting postLogoutRedirectUri to current page",n.correlationId),n.postLogoutRedirectUri=me.getAbsoluteUrl(We.getCurrentUri(),We.getCurrentUri())):this.logger.verbose("postLogoutRedirectUri passed as null, not setting post logout redirect uri",n.correlationId),n},e.prototype.getLogoutHintFromIdTokenClaims=function(r){var n=r.idTokenClaims;if(n){if(n.login_hint)return n.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},e.prototype.createAuthCodeClient=function(r,n,i){return S(this,void 0,void 0,function(){var o;return k(this,function(a){switch(a.label){case 0:return[4,this.getClientConfiguration(r,n,i)];case 1:return o=a.sent(),[2,new Tg(o)]}})})},e.prototype.getClientConfiguration=function(r,n,i){return S(this,void 0,void 0,function(){var o;return k(this,function(a){switch(a.label){case 0:return this.logger.verbose("getClientConfiguration called",this.correlationId),[4,this.getDiscoveredAuthority(n,i)];case 1:return o=a.sent(),[2,{authOptions:{clientId:this.config.auth.clientId,authority:o,clientCapabilities:this.config.auth.clientCapabilities},systemOptions:{tokenRenewalOffsetSeconds:this.config.system.tokenRenewalOffsetSeconds,preventCorsPreflight:!0},loggerOptions:{loggerCallback:this.config.system.loggerOptions.loggerCallback,piiLoggingEnabled:this.config.system.loggerOptions.piiLoggingEnabled,logLevel:this.config.system.loggerOptions.logLevel,correlationId:this.correlationId},cryptoInterface:this.browserCrypto,networkInterface:this.networkClient,storageInterface:this.browserStorage,serverTelemetryManager:r,libraryInfo:{sku:Jr.MSAL_SKU,version:Rs,cpu:b.EMPTY_STRING,os:b.EMPTY_STRING},telemetry:this.config.telemetry}]}})})},e.prototype.validateAndExtractStateFromHash=function(r,n,i){if(this.logger.verbose("validateAndExtractStateFromHash called",i),!r.state)throw O.createHashDoesNotContainStateError();var o=Pg.extractBrowserRequestState(this.browserCrypto,r.state);if(!o)throw O.createUnableToParseStateError();if(o.interactionType!==n)throw O.createStateInteractionTypeMismatchError();return this.logger.verbose("Returning state from hash",i),r.state},e.prototype.getDiscoveredAuthority=function(r,n){return S(this,void 0,void 0,function(){var i,o,a,s;return k(this,function(c){switch(c.label){case 0:return this.logger.verbose("getDiscoveredAuthority called",this.correlationId),i=this.performanceClient.startMeasurement(lt.StandardInteractionClientGetDiscoveredAuthority,this.correlationId),o={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},a=r||this.config.auth.authority,s=Ad.generateAuthority(a,n||this.config.auth.azureCloudOptions),this.logger.verbose("Creating discovered authority with configured authority",this.correlationId),[4,Id.createDiscoveredInstance(s,this.config.system.networkClient,this.browserStorage,o).then(function(l){return i.endMeasurement({success:!0}),l}).catch(function(l){throw i.endMeasurement({errorCode:l.errorCode,subErrorCode:l.subError,success:!1}),l})];case 1:return[2,c.sent()]}})})},e.prototype.initializeAuthorizationRequest=function(r,n){return S(this,void 0,void 0,function(){var i,o,a,s,c,l,d;return k(this,function(h){switch(h.label){case 0:return this.logger.verbose("initializeAuthorizationRequest called",this.correlationId),i=this.getRedirectUri(r.redirectUri),o={interactionType:n},a=Un.setRequestState(this.browserCrypto,r&&r.state||b.EMPTY_STRING,o),c=[{}],[4,this.initializeBaseRequest(r)];case 1:return s=W.apply(void 0,[W.apply(void 0,c.concat([h.sent()])),{redirectUri:i,state:a,nonce:r.nonce||this.browserCrypto.createNewGuid(),responseMode:_d.FRAGMENT}]),l=r.account||this.browserStorage.getActiveAccount(),l&&(this.logger.verbose("Setting validated request account",this.correlationId),this.logger.verbosePii("Setting validated request account: "+l.homeAccountId,this.correlationId),s.account=l),N.isEmpty(s.loginHint)&&!l&&(d=this.browserStorage.getLegacyLoginHint(),d&&(s.loginHint=d)),[2,s]}})})},e}(Rg);/*! @azure/msal-browser v2.31.0 2022-11-07 */var H0=function(){function t(e,r,n,i){this.authModule=e,this.browserStorage=r,this.authCodeRequest=n,this.logger=i}return t.prototype.handleCodeResponseFromHash=function(e,r,n,i){return S(this,void 0,void 0,function(){var o,a,s;return k(this,function(c){if(this.logger.verbose("InteractionHandler.handleCodeResponse called"),N.isEmpty(e))throw O.createEmptyHashError(e);if(o=this.browserStorage.generateStateKey(r),a=this.browserStorage.getTemporaryCache(o),!a)throw j.createStateNotFoundError("Cached State");try{s=this.authModule.handleFragmentResponse(e,a)}catch(l){throw l instanceof go&&l.subError===I.userCancelledError.code?O.createUserCancelledError():l}return[2,this.handleCodeResponseFromServer(s,r,n,i)]})})},t.prototype.handleCodeResponseFromServer=function(e,r,n,i,o){return o===void 0&&(o=!0),S(this,void 0,void 0,function(){var a,s,c,l,d,h;return k(this,function(u){switch(u.label){case 0:if(this.logger.trace("InteractionHandler.handleCodeResponseFromServer called"),a=this.browserStorage.generateStateKey(r),s=this.browserStorage.getTemporaryCache(a),!s)throw j.createStateNotFoundError("Cached State");return c=this.browserStorage.generateNonceKey(s),l=this.browserStorage.getTemporaryCache(c),this.authCodeRequest.code=e.code,e.cloud_instance_host_name?[4,this.updateTokenEndpointAuthority(e.cloud_instance_host_name,n,i)]:[3,2];case 1:u.sent(),u.label=2;case 2:return o&&(e.nonce=l||void 0),e.state=s,e.client_info?this.authCodeRequest.clientInfo=e.client_info:(d=this.checkCcsCredentials(),d&&(this.authCodeRequest.ccsCredential=d)),[4,this.authModule.acquireToken(this.authCodeRequest,e)];case 3:return h=u.sent(),this.browserStorage.cleanRequestByState(r),[2,h]}})})},t.prototype.updateTokenEndpointAuthority=function(e,r,n){return S(this,void 0,void 0,function(){var i,o;return k(this,function(a){switch(a.label){case 0:return i="https://"+e+"/"+r.tenant+"/",[4,Id.createDiscoveredInstance(i,n,this.browserStorage,r.options)];case 1:return o=a.sent(),this.authModule.updateAuthority(o),[2]}})})},t.prototype.checkCcsCredentials=function(){var e=this.browserStorage.getTemporaryCache(ge.CCS_CREDENTIAL,!0);if(e)try{return JSON.parse(e)}catch{this.authModule.logger.error("Cache credential could not be parsed"),this.authModule.logger.errorPii("Cache credential could not be parsed: "+e)}return null},t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var Up=function(t){xt(e,t);function e(r,n,i,o,a){var s=t.call(this,r,n,i,o)||this;return s.browserCrypto=a,s}return e.prototype.initiateAuthRequest=function(r,n){return S(this,void 0,void 0,function(){var i,o;return k(this,function(a){switch(a.label){case 0:return this.logger.verbose("RedirectHandler.initiateAuthRequest called"),N.isEmpty(r)?[3,7]:(n.redirectStartPage&&(this.logger.verbose("RedirectHandler.initiateAuthRequest: redirectStartPage set, caching start page"),this.browserStorage.setTemporaryCache(ge.ORIGIN_URI,n.redirectStartPage,!0)),this.browserStorage.setTemporaryCache(ge.CORRELATION_ID,this.authCodeRequest.correlationId,!0),this.browserStorage.cacheCodeRequest(this.authCodeRequest,this.browserCrypto),this.logger.infoPii("RedirectHandler.initiateAuthRequest: Navigate to: "+r),i={apiId:Ae.acquireTokenRedirect,timeout:n.redirectTimeout,noHistory:!1},typeof n.onRedirectNavigate!="function"?[3,4]:(this.logger.verbose("RedirectHandler.initiateAuthRequest: Invoking onRedirectNavigate callback"),o=n.onRedirectNavigate(r),o===!1?[3,2]:(this.logger.verbose("RedirectHandler.initiateAuthRequest: onRedirectNavigate did not return false, navigating"),[4,n.navigationClient.navigateExternal(r,i)])));case 1:return a.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,n.navigationClient.navigateExternal(r,i)];case 5:return a.sent(),[2];case 6:return[3,8];case 7:throw this.logger.info("RedirectHandler.initiateAuthRequest: Navigate url is empty"),O.createEmptyNavigationUriError();case 8:return[2]}})})},e.prototype.handleCodeResponseFromHash=function(r,n,i,o){return S(this,void 0,void 0,function(){var a,s,c,l,d,h,u;return k(this,function(f){switch(f.label){case 0:if(this.logger.verbose("RedirectHandler.handleCodeResponse called"),N.isEmpty(r))throw O.createEmptyHashError(r);if(this.browserStorage.setInteractionInProgress(!1),a=this.browserStorage.generateStateKey(n),s=this.browserStorage.getTemporaryCache(a),!s)throw j.createStateNotFoundError("Cached State");try{c=this.authModule.handleFragmentResponse(r,s)}catch(v){throw v instanceof go&&v.subError===I.userCancelledError.code?O.createUserCancelledError():v}return l=this.browserStorage.generateNonceKey(s),d=this.browserStorage.getTemporaryCache(l),this.authCodeRequest.code=c.code,c.cloud_instance_host_name?[4,this.updateTokenEndpointAuthority(c.cloud_instance_host_name,i,o)]:[3,2];case 1:f.sent(),f.label=2;case 2:return c.nonce=d||void 0,c.state=s,c.client_info?this.authCodeRequest.clientInfo=c.client_info:(h=this.checkCcsCredentials(),h&&(this.authCodeRequest.ccsCredential=h)),[4,this.authModule.acquireToken(this.authCodeRequest,c)];case 3:return u=f.sent(),this.browserStorage.cleanRequestByState(n),[2,u]}})})},e}(H0);/*! @azure/msal-browser v2.31.0 2022-11-07 */var X;(function(t){t.INITIALIZE_START="msal:initializeStart",t.INITIALIZE_END="msal:initializeEnd",t.ACCOUNT_ADDED="msal:accountAdded",t.ACCOUNT_REMOVED="msal:accountRemoved",t.LOGIN_START="msal:loginStart",t.LOGIN_SUCCESS="msal:loginSuccess",t.LOGIN_FAILURE="msal:loginFailure",t.ACQUIRE_TOKEN_START="msal:acquireTokenStart",t.ACQUIRE_TOKEN_SUCCESS="msal:acquireTokenSuccess",t.ACQUIRE_TOKEN_FAILURE="msal:acquireTokenFailure",t.ACQUIRE_TOKEN_NETWORK_START="msal:acquireTokenFromNetworkStart",t.SSO_SILENT_START="msal:ssoSilentStart",t.SSO_SILENT_SUCCESS="msal:ssoSilentSuccess",t.SSO_SILENT_FAILURE="msal:ssoSilentFailure",t.ACQUIRE_TOKEN_BY_CODE_START="msal:acquireTokenByCodeStart",t.ACQUIRE_TOKEN_BY_CODE_SUCCESS="msal:acquireTokenByCodeSuccess",t.ACQUIRE_TOKEN_BY_CODE_FAILURE="msal:acquireTokenByCodeFailure",t.HANDLE_REDIRECT_START="msal:handleRedirectStart",t.HANDLE_REDIRECT_END="msal:handleRedirectEnd",t.POPUP_OPENED="msal:popupOpened",t.LOGOUT_START="msal:logoutStart",t.LOGOUT_SUCCESS="msal:logoutSuccess",t.LOGOUT_FAILURE="msal:logoutFailure",t.LOGOUT_END="msal:logoutEnd"})(X||(X={}));/*! @azure/msal-browser v2.31.0 2022-11-07 */var hi;(function(t){t.USER_INTERACTION_REQUIRED="USER_INTERACTION_REQUIRED",t.USER_CANCEL="USER_CANCEL",t.NO_NETWORK="NO_NETWORK",t.TRANSIENT_ERROR="TRANSIENT_ERROR",t.PERSISTENT_ERROR="PERSISTENT_ERROR",t.DISABLED="DISABLED",t.ACCOUNT_UNAVAILABLE="ACCOUNT_UNAVAILABLE"})(hi||(hi={}));var Ya={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"}},mn=function(t){xt(e,t);function e(r,n,i){var o=t.call(this,r,n)||this;return Object.setPrototypeOf(o,e.prototype),o.name="NativeAuthError",o.ext=i,o}return e.prototype.isFatal=function(){if(this.ext&&this.ext.status&&(this.ext.status===hi.PERSISTENT_ERROR||this.ext.status===hi.DISABLED))return!0;switch(this.errorCode){case Ya.extensionError.code:return!0;default:return!1}},e.createError=function(r,n,i){if(i&&i.status)switch(i.status){case hi.ACCOUNT_UNAVAILABLE:return Zr.createNativeAccountUnavailableError();case hi.USER_INTERACTION_REQUIRED:return new Zr(r,n);case hi.USER_CANCEL:return O.createUserCancelledError();case hi.NO_NETWORK:return O.createNoNetworkConnectivityError()}return new e(r,n,i)},e.createUserSwitchError=function(){return new e(Ya.userSwitch.code,Ya.userSwitch.desc)},e.createTokensNotFoundInCacheError=function(){return new e(Ya.tokensNotFoundInCache.code,Ya.tokensNotFoundInCache.desc)},e}(Y);/*! @azure/msal-browser v2.31.0 2022-11-07 */var Hg=function(t){xt(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.acquireToken=function(r){return S(this,void 0,void 0,function(){var n,i,o,a,s;return k(this,function(c){switch(c.label){case 0:return n=this.performanceClient.startMeasurement(lt.SilentCacheClientAcquireToken,r.correlationId),i=this.initializeServerTelemetryManager(Ae.acquireTokenSilent_silentFlow),[4,this.createSilentFlowClient(i,r.authority,r.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(r)];case 3:return a=c.sent(),n.endMeasurement({success:!0,fromCache:!0}),[2,a];case 4:throw s=c.sent(),s instanceof O&&s.errorCode===I.signingKeyNotFoundInStorage.code&&this.logger.verbose("Signing keypair for bound access token not found. Refreshing bound access token and generating a new crypto keypair."),n.endMeasurement({errorCode:s instanceof Y&&s.errorCode||void 0,subErrorCode:s instanceof Y&&s.subError||void 0,success:!1}),s;case 5:return[2]}})})},e.prototype.logout=function(){return Promise.reject(O.createSilentLogoutUnsupportedError())},e.prototype.createSilentFlowClient=function(r,n,i){return S(this,void 0,void 0,function(){var o;return k(this,function(a){switch(a.label){case 0:return[4,this.getClientConfiguration(r,n,i)];case 1:return o=a.sent(),[2,new My(o,this.performanceClient)]}})})},e.prototype.initializeSilentRequest=function(r,n){return S(this,void 0,void 0,function(){var i;return k(this,function(o){switch(o.label){case 0:return i=[W({},r)],[4,this.initializeBaseRequest(r)];case 1:return[2,W.apply(void 0,[W.apply(void 0,i.concat([o.sent()])),{account:n,forceRefresh:r.forceRefresh||!1}])]}})})},e}(Pa);/*! @azure/msal-browser v2.31.0 2022-11-07 */var ua=function(t){xt(e,t);function e(r,n,i,o,a,s,c,l,d,h,u,f){var v=t.call(this,r,n,i,o,a,s,l,d,f)||this;return v.apiId=c,v.accountId=h,v.nativeMessageHandler=d,v.nativeStorageManager=u,v.silentCacheClient=new Hg(r,v.nativeStorageManager,i,o,a,s,l,d,f),v}return e.prototype.acquireToken=function(r){return S(this,void 0,void 0,function(){var n,i,o,a,s,c,l;return k(this,function(d){switch(d.label){case 0:return this.logger.trace("NativeInteractionClient - acquireToken called."),n=this.performanceClient.startMeasurement(lt.NativeInteractionClientAcquireToken,r.correlationId),i=Vr.nowSeconds(),[4,this.initializeNativeRequest(r)];case 1:o=d.sent(),d.label=2;case 2:return d.trys.push([2,4,,5]),[4,this.acquireTokensFromCache(this.accountId,o)];case 3:return a=d.sent(),n.endMeasurement({success:!0,isNativeBroker:!1,fromCache:!0}),[2,a];case 4:return d.sent(),this.logger.info("MSAL internal Cache does not contain tokens, proceed to make a native call"),[3,5];case 5:return s={method:On.GetToken,request:o},[4,this.nativeMessageHandler.sendMessage(s)];case 6:return c=d.sent(),l=this.validateNativeResponse(c),[2,this.handleNativeResponse(l,o,i).then(function(h){return n.endMeasurement({success:!0,isNativeBroker:!0,requestId:h.requestId}),h}).catch(function(h){throw n.endMeasurement({success:!1,errorCode:h.errorCode,subErrorCode:h.subError,isNativeBroker:!0}),h})]}})})},e.prototype.createSilentCacheRequest=function(r,n){return{authority:r.authority,correlationId:this.correlationId,scopes:Wt.fromString(r.scope).asArray(),account:n,forceRefresh:!1}},e.prototype.acquireTokensFromCache=function(r,n){return S(this,void 0,void 0,function(){var i,o,a,s,c;return k(this,function(l){switch(l.label){case 0:if(i=this.browserStorage.readAccountFromCacheWithNativeAccountId(r),!i)throw j.createNoAccountFoundError();o=i.getAccountInfo(),l.label=1;case 1:return l.trys.push([1,3,,4]),a=this.createSilentCacheRequest(n,o),[4,this.silentCacheClient.acquireToken(a)];case 2:return s=l.sent(),[2,s];case 3:throw c=l.sent(),c;case 4:return[2]}})})},e.prototype.acquireTokenRedirect=function(r){return S(this,void 0,void 0,function(){var n,i,o,a,s,c;return k(this,function(l){switch(l.label){case 0:return this.logger.trace("NativeInteractionClient - acquireTokenRedirect called."),[4,this.initializeNativeRequest(r)];case 1:n=l.sent(),i={method:On.GetToken,request:n},l.label=2;case 2:return l.trys.push([2,4,,5]),[4,this.nativeMessageHandler.sendMessage(i)];case 3:return o=l.sent(),this.validateNativeResponse(o),[3,5];case 4:if(a=l.sent(),a instanceof mn&&a.isFatal())throw a;return[3,5];case 5:return this.browserStorage.setTemporaryCache(ge.NATIVE_REQUEST,JSON.stringify(n),!0),s={apiId:Ae.acquireTokenRedirect,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},c=this.config.auth.navigateToLoginRequestUrl?window.location.href:this.getRedirectUri(r.redirectUri),[4,this.navigationClient.navigateExternal(c,s)];case 6:return l.sent(),[2]}})})},e.prototype.handleRedirectPromise=function(){return S(this,void 0,void 0,function(){var r,n,i,o,a,s,c,l;return k(this,function(d){switch(d.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(r=this.browserStorage.getCachedNativeRequest(),!r)return this.logger.verbose("NativeInteractionClient - handleRedirectPromise called but there is no cached request, returning null."),[2,null];n=r.prompt,i=kp(r,["prompt"]),n&&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(ge.NATIVE_REQUEST)),o={method:On.GetToken,request:i},a=Vr.nowSeconds(),d.label=1;case 1:return d.trys.push([1,3,,4]),this.logger.verbose("NativeInteractionClient - handleRedirectPromise sending message to native broker."),[4,this.nativeMessageHandler.sendMessage(o)];case 2:return s=d.sent(),this.validateNativeResponse(s),c=this.handleNativeResponse(s,i,a),this.browserStorage.setInteractionInProgress(!1),[2,c];case 3:throw l=d.sent(),this.browserStorage.setInteractionInProgress(!1),l;case 4:return[2]}})})},e.prototype.logout=function(){return this.logger.trace("NativeInteractionClient - logout called."),Promise.reject("Logout not implemented yet")},e.prototype.handleNativeResponse=function(r,n,i){return S(this,void 0,void 0,function(){var o,a,s,c,l,d,h,u,f,v,g,x,m,p,y,w,T,L,V,D,ye=this;return k(this,function(Q){switch(Q.label){case 0:if(this.logger.trace("NativeInteractionClient - handleNativeResponse called."),o=this.getMATSFromResponse(r),this.performanceClient.addStaticFields({extensionId:this.nativeMessageHandler.getExtensionId(),extensionVersion:this.nativeMessageHandler.getExtensionVersion(),matsBrokerVersion:o?o.broker_version:void 0,matsAccountJoinOnStart:o?o.account_join_on_start:void 0,matsAccountJoinOnEnd:o?o.account_join_on_end:void 0,matsDeviceJoin:o?o.device_join:void 0,matsPromptBehavior:o?o.prompt_behavior:void 0,matsApiErrorCode:o?o.api_error_code:void 0,matsUiVisible:o?o.ui_visible:void 0,matsSilentCode:o?o.silent_code:void 0,matsSilentBiSubCode:o?o.silent_bi_sub_code:void 0,matsSilentMessage:o?o.silent_message:void 0,matsSilentStatus:o?o.silent_status:void 0,matsHttpStatus:o?o.http_status:void 0,matsHttpEventCount:o?o.http_event_count:void 0},this.correlationId),r.account.id!==n.accountId)throw mn.createUserSwitchError();return a=new wn(r.id_token||b.EMPTY_STRING,this.browserCrypto),[4,this.getDiscoveredAuthority(n.authority)];case 1:switch(s=Q.sent(),c=s.getPreferredCache(),l=_t.generateHomeAccountId(r.client_info||b.EMPTY_STRING,Hr.Default,this.logger,this.browserCrypto,a),d=_t.createAccount(r.client_info,l,a,void 0,void 0,void 0,c,r.account.id),this.browserStorage.setAccount(d),h=r.scope?Wt.fromString(r.scope):Wt.fromString(n.scope),u=r.account.properties||{},f=u.UID||a.claims.oid||a.claims.sub||b.EMPTY_STRING,v=u.TenantId||a.claims.tid||b.EMPTY_STRING,x=be.BEARER,m=n.tokenType,m){case be.POP:return[3,2]}return[3,4];case 2:if(x=be.POP,r.shr)return this.logger.trace("handleNativeServerResponse: SHR is enabled in native layer"),g=r.shr,[3,5];if(p=new xa(this.browserCrypto),y={resourceRequestMethod:n.resourceRequestMethod,resourceRequestUri:n.resourceRequestUri,shrClaims:n.shrClaims,shrNonce:n.shrNonce},!n.keyId)throw j.createKeyIdMissingError();return[4,p.signPopToken(r.access_token,n.keyId,y)];case 3:return g=Q.sent(),[3,5];case 4:g=r.access_token,Q.label=5;case 5:return w={authority:s.canonicalAuthority,uniqueId:f,tenantId:v,scopes:h.asArray(),account:d.getAccountInfo(),idToken:r.id_token,idTokenClaims:a.claims,accessToken:g,fromCache:o?this.isResponseFromCache(o):!1,expiresOn:new Date(Number(i+r.expires_in)*1e3),tokenType:x,correlationId:this.correlationId,state:r.state,fromNativeBroker:!0},T=nc.createIdTokenEntity(l,n.authority,r.id_token||b.EMPTY_STRING,n.clientId,a.claims.tid||b.EMPTY_STRING),this.nativeStorageManager.setIdTokenCredential(T),L=x===be.POP?b.SHR_NONCE_VALIDITY:(typeof r.expires_in=="string"?parseInt(r.expires_in,10):r.expires_in)||0,V=i+L,D=ic.createAccessTokenEntity(l,n.authority,g,n.clientId,v,h.printScopes(),V,0,this.browserCrypto),this.nativeStorageManager.setAccessTokenCredential(D),this.browserStorage.removeAccountContext(d).catch(function(qt){ye.logger.error("Error occurred while removing account context from browser storage. "+qt)}),[2,w]}})})},e.prototype.validateNativeResponse=function(r){if(r.hasOwnProperty("access_token")&&r.hasOwnProperty("id_token")&&r.hasOwnProperty("client_info")&&r.hasOwnProperty("account")&&r.hasOwnProperty("scope")&&r.hasOwnProperty("expires_in"))return r;throw mn.createUnexpectedError("Response missing expected properties.")},e.prototype.getMATSFromResponse=function(r){if(r.properties.MATS)try{return JSON.parse(r.properties.MATS)}catch{this.logger.error("NativeInteractionClient - Error parsing MATS telemetry, returning null instead")}return null},e.prototype.isResponseFromCache=function(r){return typeof r.is_cached>"u"?(this.logger.verbose("NativeInteractionClient - MATS telemetry does not contain field indicating if response was served from cache. Returning false."),!1):!!r.is_cached},e.prototype.initializeNativeRequest=function(r){return S(this,void 0,void 0,function(){var n,i,o,a,s,c,l,d,h,u,f=this;return k(this,function(v){switch(v.label){case 0:return this.logger.trace("NativeInteractionClient - initializeNativeRequest called"),n=r.authority||this.config.auth.authority,i=new me(n),i.validateAsUri(),o=r.scopes,a=kp(r,["scopes"]),s=new Wt(o||[]),s.appendScopes(_c),c=function(){switch(f.apiId){case Ae.ssoSilent:case Ae.acquireTokenSilent_silentFlow:return f.logger.trace("initializeNativeRequest: silent request sets prompt to none"),Nt.NONE}if(!r.prompt){f.logger.trace("initializeNativeRequest: prompt was not provided");return}switch(r.prompt){case Nt.NONE:case Nt.CONSENT:case Nt.LOGIN:return f.logger.trace("initializeNativeRequest: prompt is compatible with native flow"),r.prompt;default:throw f.logger.trace("initializeNativeRequest: prompt = "+r.prompt+" is not compatible with native flow"),O.createNativePromptParameterNotSupportedError()}},l=W(W({},a),{accountId:this.accountId,clientId:this.config.auth.clientId,authority:i.urlString,scope:s.printScopes(),redirectUri:this.getRedirectUri(r.redirectUri),prompt:c(),correlationId:this.correlationId,tokenType:r.authenticationScheme,windowTitleSubstring:document.title,extraParameters:W(W(W({},r.extraQueryParameters),r.tokenQueryParameters),{telemetry:ls.MATS_TELEMETRY}),extendedExpiryToken:!1}),r.authenticationScheme!==be.POP?[3,2]:(d={resourceRequestUri:r.resourceRequestUri,resourceRequestMethod:r.resourceRequestMethod,shrClaims:r.shrClaims,shrNonce:r.shrNonce},h=new xa(this.browserCrypto),[4,h.generateCnf(d)]);case 1:u=v.sent(),l.reqCnf=u.reqCnfHash,l.keyId=u.kid,v.label=2;case 2:return[2,l]}})})},e}(Rg);/*! @azure/msal-browser v2.31.0 2022-11-07 */var io=function(){function t(e,r,n){this.logger=e,this.handshakeTimeoutMs=r,this.extensionId=n,this.resolvers=new Map,this.handshakeResolvers=new Map,this.responseId=0,this.messageChannel=new MessageChannel,this.windowListener=this.onWindowMessage.bind(this)}return t.prototype.sendMessage=function(e){return S(this,void 0,void 0,function(){var r,n=this;return k(this,function(i){return this.logger.trace("NativeMessageHandler - sendMessage called."),r={channel:ls.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(r)),this.messageChannel.port1.postMessage(r),[2,new Promise(function(o,a){n.resolvers.set(r.responseId,{resolve:o,reject:a})})]})})},t.createProvider=function(e,r){return S(this,void 0,void 0,function(){var n,i;return k(this,function(o){switch(o.label){case 0:e.trace("NativeMessageHandler - createProvider called."),o.label=1;case 1:return o.trys.push([1,3,,5]),n=new t(e,r,ls.PREFERRED_EXTENSION_ID),[4,n.sendHandshakeRequest()];case 2:return o.sent(),[2,n];case 3:return o.sent(),i=new t(e,r),[4,i.sendHandshakeRequest()];case 4:return o.sent(),[2,i];case 5:return[2]}})})},t.prototype.sendHandshakeRequest=function(){return S(this,void 0,void 0,function(){var e,r=this;return k(this,function(n){return this.logger.trace("NativeMessageHandler - sendHandshakeRequest called."),window.addEventListener("message",this.windowListener,!1),e={channel:ls.CHANNEL_ID,extensionId:this.extensionId,responseId:this.responseId++,body:{method:On.HandshakeRequest}},this.messageChannel.port1.onmessage=function(i){r.onChannelMessage(i)},window.postMessage(e,window.origin,[this.messageChannel.port2]),[2,new Promise(function(i,o){r.handshakeResolvers.set(e.responseId,{resolve:i,reject:o}),r.timeoutId=window.setTimeout(function(){window.removeEventListener("message",r.windowListener,!1),r.messageChannel.port1.close(),r.messageChannel.port2.close(),o(O.createNativeHandshakeTimeoutError()),r.handshakeResolvers.delete(e.responseId)},r.handshakeTimeoutMs)})]})})},t.prototype.onWindowMessage=function(e){if(this.logger.trace("NativeMessageHandler - onWindowMessage called"),e.source===window){var r=e.data;if(!(!r.channel||r.channel!==ls.CHANNEL_ID)&&!(r.extensionId&&r.extensionId!==this.extensionId)&&r.body.method===On.HandshakeRequest){this.logger.verbose(r.extensionId?"Extension with id: "+r.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(r.responseId);n&&n.reject(O.createNativeExtensionNotInstalledError())}}},t.prototype.onChannelMessage=function(e){this.logger.trace("NativeMessageHandler - onChannelMessage called.");var r=e.data,n=this.resolvers.get(r.responseId),i=this.handshakeResolvers.get(r.responseId);try{var o=r.body.method;if(o===On.Response){if(!n)return;var a=r.body.response;if(this.logger.trace("NativeMessageHandler - Received response from browser extension"),this.logger.tracePii("NativeMessageHandler - Received response from browser extension: "+JSON.stringify(a)),a.status!=="Success")n.reject(mn.createError(a.code,a.description,a.ext));else if(a.result)a.result.code&&a.result.description?n.reject(mn.createError(a.result.code,a.result.description,a.result.ext)):n.resolve(a.result);else throw Y.createUnexpectedError("Event does not contain result.");this.resolvers.delete(r.responseId)}else if(o===On.HandshakeResponse){if(!i)return;clearTimeout(this.timeoutId),window.removeEventListener("message",this.windowListener,!1),this.extensionId=r.extensionId,this.extensionVersion=r.body.version,this.logger.verbose("NativeMessageHandler - Received HandshakeResponse from extension: "+this.extensionId),i.resolve(),this.handshakeResolvers.delete(r.responseId)}}catch(s){this.logger.error("Error parsing response from WAM Extension"),this.logger.errorPii("Error parsing response from WAM Extension: "+s.toString()),this.logger.errorPii("Unable to parse "+e),n?n.reject(s):i&&i.reject(s)}},t.prototype.getExtensionId=function(){return this.extensionId},t.prototype.getExtensionVersion=function(){return this.extensionVersion},t.isNativeAvailable=function(e,r,n,i){if(r.trace("isNativeAvailable called"),!e.system.allowNativeBroker)return r.trace("isNativeAvailable: allowNativeBroker is not enabled, returning false"),!1;if(!n)return r.trace("isNativeAvailable: WAM extension provider is not initialized, returning false"),!1;if(i)switch(i){case be.BEARER:case be.POP:return r.trace("isNativeAvailable: authenticationScheme is supported, returning true"),!0;default:return r.trace("isNativeAvailable: authenticationScheme is not supported, returning false"),!1}return!0},t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var qy=function(t){xt(e,t);function e(r,n,i,o,a,s,c,l,d,h){var u=t.call(this,r,n,i,o,a,s,c,d,h)||this;return u.nativeStorage=l,u}return e.prototype.acquireToken=function(r){return S(this,void 0,void 0,function(){var n,i,o,a,s,c,l,d,h,u=this;return k(this,function(f){switch(f.label){case 0:return[4,this.initializeAuthorizationRequest(r,G.Redirect)];case 1:n=f.sent(),this.browserStorage.updateCacheEntries(n.state,n.nonce,n.authority,n.loginHint||b.EMPTY_STRING,n.account||null),i=this.initializeServerTelemetryManager(Ae.acquireTokenRedirect),o=function(v){v.persisted&&(u.logger.verbose("Page was restored from back/forward cache. Clearing temporary cache."),u.browserStorage.cleanRequestByState(n.state))},f.label=2;case 2:return f.trys.push([2,7,,8]),[4,this.initializeAuthorizationCodeRequest(n)];case 3:return a=f.sent(),[4,this.createAuthCodeClient(i,n.authority,n.azureCloudOptions)];case 4:return s=f.sent(),this.logger.verbose("Auth code client created"),c=new Up(s,this.browserStorage,a,this.logger,this.browserCrypto),[4,s.getAuthCodeUrl(W(W({},n),{nativeBroker:io.isNativeAvailable(this.config,this.logger,this.nativeMessageHandler,r.authenticationScheme)}))];case 5:return l=f.sent(),d=this.getRedirectStartPage(r.redirectStartPage),this.logger.verbosePii("Redirect start page: "+d),window.addEventListener("pageshow",o),[4,c.initiateAuthRequest(l,{navigationClient:this.navigationClient,redirectTimeout:this.config.system.redirectNavigationTimeout,redirectStartPage:d,onRedirectNavigate:r.onRedirectNavigate})];case 6:return[2,f.sent()];case 7:throw h=f.sent(),h instanceof Y&&h.setCorrelationId(this.correlationId),window.removeEventListener("pageshow",o),i.cacheFailedRequest(h),this.browserStorage.cleanRequestByState(n.state),h;case 8:return[2]}})})},e.prototype.handleRedirectPromise=function(r){return S(this,void 0,void 0,function(){var n,i,o,a,s,c,l,d,h,u,f,v;return k(this,function(g){switch(g.label){case 0:n=this.initializeServerTelemetryManager(Ae.handleRedirectPromise),g.label=1;case 1:if(g.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(i=this.getRedirectResponseHash(r||window.location.hash),!i)return this.logger.info("handleRedirectPromise did not detect a response hash as a result of a redirect. Cleaning temporary cache."),this.browserStorage.cleanRequestByInteractionType(G.Redirect),[2,null];o=void 0;try{a=me.getDeserializedHash(i),o=this.validateAndExtractStateFromHash(a,G.Redirect),this.logger.verbose("State extracted from hash")}catch(x){return this.logger.info("handleRedirectPromise was unable to extract state due to: "+x),this.browserStorage.cleanRequestByInteractionType(G.Redirect),[2,null]}return s=this.browserStorage.getTemporaryCache(ge.ORIGIN_URI,!0)||b.EMPTY_STRING,c=me.removeHashFromUrl(s),l=me.removeHashFromUrl(window.location.href),c===l&&this.config.auth.navigateToLoginRequestUrl?(this.logger.verbose("Current page is loginRequestUrl, handling hash"),[4,this.handleHash(i,o,n)]):[3,3];case 2:return d=g.sent(),s.indexOf("#")>-1&&We.replaceHash(s),[2,d];case 3:return this.config.auth.navigateToLoginRequestUrl?[3,4]:(this.logger.verbose("NavigateToLoginRequestUrl set to false, handling hash"),[2,this.handleHash(i,o,n)]);case 4:return!We.isInIframe()||this.config.system.allowRedirectInIframe?(this.browserStorage.setTemporaryCache(ge.URL_HASH,i,!0),h={apiId:Ae.handleRedirectPromise,timeout:this.config.system.redirectNavigationTimeout,noHistory:!0},u=!0,!s||s==="null"?(f=We.getHomepage(),this.browserStorage.setTemporaryCache(ge.ORIGIN_URI,f,!0),this.logger.warning("Unable to get valid login request url from cache, redirecting to home page"),[4,this.navigationClient.navigateInternal(f,h)]):[3,6]):[3,9];case 5:return u=g.sent(),[3,8];case 6:return this.logger.verbose("Navigating to loginRequestUrl: "+s),[4,this.navigationClient.navigateInternal(s,h)];case 7:u=g.sent(),g.label=8;case 8:if(!u)return[2,this.handleHash(i,o,n)];g.label=9;case 9:return[2,null];case 10:throw v=g.sent(),v instanceof Y&&v.setCorrelationId(this.correlationId),n.cacheFailedRequest(v),this.browserStorage.cleanRequestByInteractionType(G.Redirect),v;case 11:return[2]}})})},e.prototype.getRedirectResponseHash=function(r){this.logger.verbose("getRedirectResponseHash called");var n=me.hashContainsKnownProperties(r);if(n)return We.clearHash(window),this.logger.verbose("Hash contains known properties, returning response hash"),r;var i=this.browserStorage.getTemporaryCache(ge.URL_HASH,!0);return this.browserStorage.removeItem(this.browserStorage.generateCacheKey(ge.URL_HASH)),this.logger.verbose("Hash does not contain known properties, returning cached hash"),i},e.prototype.handleHash=function(r,n,i){return S(this,void 0,void 0,function(){var o,a,s,c,l,d,h,u=this;return k(this,function(f){switch(f.label){case 0:if(o=this.browserStorage.getCachedRequest(n,this.browserCrypto),this.logger.verbose("handleHash called, retrieved cached request"),a=me.getDeserializedHash(r),a.accountId){if(this.logger.verbose("Account id found in hash, calling WAM for token"),!this.nativeMessageHandler)throw O.createNativeConnectionNotEstablishedError();return s=new ua(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,Ae.acquireTokenPopup,this.performanceClient,this.nativeMessageHandler,a.accountId,this.browserStorage,o.correlationId),c=Un.parseRequestState(this.browserCrypto,n).userRequestState,[2,s.acquireToken(W(W({},o),{state:c,prompt:void 0})).finally(function(){u.browserStorage.cleanRequestByState(n)})]}if(l=this.browserStorage.getCachedAuthority(n),!l)throw O.createNoCachedAuthorityError();return[4,this.createAuthCodeClient(i,l)];case 1:return d=f.sent(),this.logger.verbose("Auth code client created"),zd.removeThrottle(this.browserStorage,this.config.auth.clientId,o),h=new Up(d,this.browserStorage,o,this.logger,this.browserCrypto),[4,h.handleCodeResponseFromHash(r,n,d.authority,this.networkClient)];case 2:return[2,f.sent()]}})})},e.prototype.logout=function(r){return S(this,void 0,void 0,function(){var n,i,o,a,s,c,l;return k(this,function(d){switch(d.label){case 0:this.logger.verbose("logoutRedirect called"),n=this.initializeLogoutRequest(r),i=this.initializeServerTelemetryManager(Ae.logout),d.label=1;case 1:return d.trys.push([1,10,,11]),this.eventHandler.emitEvent(X.LOGOUT_START,G.Redirect,r),[4,this.clearCacheOnLogout(n.account)];case 2:return d.sent(),o={apiId:Ae.logout,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},[4,this.createAuthCodeClient(i,r&&r.authority)];case 3:return a=d.sent(),this.logger.verbose("Auth code client created"),s=a.getLogoutUri(n),this.eventHandler.emitEvent(X.LOGOUT_SUCCESS,G.Redirect,n),r&&typeof r.onRedirectNavigate=="function"?(c=r.onRedirectNavigate(s),c===!1?[3,5]:(this.logger.verbose("Logout onRedirectNavigate did not return false, navigating"),this.browserStorage.getInteractionInProgress()||this.browserStorage.setInteractionInProgress(!0),[4,this.navigationClient.navigateExternal(s,o)])):[3,7];case 4:return d.sent(),[2];case 5:this.browserStorage.setInteractionInProgress(!1),this.logger.verbose("Logout onRedirectNavigate returned false, stopping navigation"),d.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 d.sent(),[2];case 9:return[3,11];case 10:throw l=d.sent(),l instanceof Y&&l.setCorrelationId(this.correlationId),i.cacheFailedRequest(l),this.eventHandler.emitEvent(X.LOGOUT_FAILURE,G.Redirect,null,l),this.eventHandler.emitEvent(X.LOGOUT_END,G.Redirect),l;case 11:return this.eventHandler.emitEvent(X.LOGOUT_END,G.Redirect),[2]}})})},e.prototype.getRedirectStartPage=function(r){var n=r||window.location.href;return me.getAbsoluteUrl(n,We.getCurrentUri())},e}(Pa);/*! @azure/msal-browser v2.31.0 2022-11-07 */var Gy=function(t){xt(e,t);function e(r,n,i,o,a,s,c,l,d,h){var u=t.call(this,r,n,i,o,a,s,c,d,h)||this;return u.unloadWindow=u.unloadWindow.bind(u),u.nativeStorage=l,u}return e.prototype.acquireToken=function(r){try{var n=this.generatePopupName(r.scopes||_c,r.authority||this.config.auth.authority),i=r.popupWindowAttributes||{};if(this.config.system.asyncPopups)return this.logger.verbose("asyncPopups set to true, acquiring token"),this.acquireTokenPopupAsync(r,n,i);this.logger.verbose("asyncPopup set to false, opening popup before acquiring token");var o=this.openSizedPopup("about:blank",n,i);return this.acquireTokenPopupAsync(r,n,i,o)}catch(a){return Promise.reject(a)}},e.prototype.logout=function(r){try{this.logger.verbose("logoutPopup called");var n=this.initializeLogoutRequest(r),i=this.generateLogoutPopupName(n),o=r&&r.authority,a=r&&r.mainWindowRedirectUri,s=(r==null?void 0:r.popupWindowAttributes)||{};if(this.config.system.asyncPopups)return this.logger.verbose("asyncPopups set to true"),this.logoutPopupAsync(n,i,s,o,void 0,a);this.logger.verbose("asyncPopup set to false, opening popup");var c=this.openSizedPopup("about:blank",i,s);return this.logoutPopupAsync(n,i,s,o,c,a)}catch(l){return Promise.reject(l)}},e.prototype.acquireTokenPopupAsync=function(r,n,i,o){return S(this,void 0,void 0,function(){var a,s,c,l,d,h,u,f,v,g,x,m,p,y,w,T,L,V=this;return k(this,function(D){switch(D.label){case 0:return this.logger.verbose("acquireTokenPopupAsync called"),a=this.initializeServerTelemetryManager(Ae.acquireTokenPopup),[4,this.initializeAuthorizationRequest(r,G.Popup)];case 1:s=D.sent(),this.browserStorage.updateCacheEntries(s.state,s.nonce,s.authority,s.loginHint||b.EMPTY_STRING,s.account||null),D.label=2;case 2:return D.trys.push([2,8,,9]),[4,this.initializeAuthorizationCodeRequest(s)];case 3:return c=D.sent(),[4,this.createAuthCodeClient(a,s.authority,s.azureCloudOptions)];case 4:return l=D.sent(),this.logger.verbose("Auth code client created"),d=io.isNativeAvailable(this.config,this.logger,this.nativeMessageHandler,r.authenticationScheme),h=void 0,d&&(h=this.performanceClient.startMeasurement(lt.FetchAccountIdWithNativeBroker,r.correlationId)),[4,l.getAuthCodeUrl(W(W({},s),{nativeBroker:d}))];case 5:return u=D.sent(),f=new H0(l,this.browserStorage,c,this.logger),v={popup:o,popupName:n,popupWindowAttributes:i},g=this.initiateAuthRequest(u,v),this.eventHandler.emitEvent(X.POPUP_OPENED,G.Popup,{popupWindow:g},null),[4,this.monitorPopupForHash(g)];case 6:if(x=D.sent(),m=me.getDeserializedHash(x),p=this.validateAndExtractStateFromHash(m,G.Popup,s.correlationId),zd.removeThrottle(this.browserStorage,this.config.auth.clientId,c),m.accountId){if(this.logger.verbose("Account id found in hash, calling WAM for token"),h&&h.endMeasurement({success:!0,isNativeBroker:!0}),!this.nativeMessageHandler)throw O.createNativeConnectionNotEstablishedError();return y=new ua(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,Ae.acquireTokenPopup,this.performanceClient,this.nativeMessageHandler,m.accountId,this.nativeStorage,s.correlationId),w=Un.parseRequestState(this.browserCrypto,p).userRequestState,[2,y.acquireToken(W(W({},s),{state:w,prompt:void 0})).finally(function(){V.browserStorage.cleanRequestByState(p)})]}return[4,f.handleCodeResponseFromHash(x,p,l.authority,this.networkClient)];case 7:return T=D.sent(),[2,T];case 8:throw L=D.sent(),o&&o.close(),L instanceof Y&&L.setCorrelationId(this.correlationId),a.cacheFailedRequest(L),this.browserStorage.cleanRequestByState(s.state),L;case 9:return[2]}})})},e.prototype.logoutPopupAsync=function(r,n,i,o,a,s){return S(this,void 0,void 0,function(){var c,l,d,h,u,f,v;return k(this,function(g){switch(g.label){case 0:this.logger.verbose("logoutPopupAsync called"),this.eventHandler.emitEvent(X.LOGOUT_START,G.Popup,r),c=this.initializeServerTelemetryManager(Ae.logoutPopup),g.label=1;case 1:return g.trys.push([1,5,,6]),[4,this.clearCacheOnLogout(r.account)];case 2:return g.sent(),[4,this.createAuthCodeClient(c,o)];case 3:return l=g.sent(),this.logger.verbose("Auth code client created"),d=l.getLogoutUri(r),this.eventHandler.emitEvent(X.LOGOUT_SUCCESS,G.Popup,r),h=this.openPopup(d,{popupName:n,popupWindowAttributes:i,popup:a}),this.eventHandler.emitEvent(X.POPUP_OPENED,G.Popup,{popupWindow:h},null),[4,this.waitForLogoutPopup(h)];case 4:return g.sent(),s?(u={apiId:Ae.logoutPopup,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},f=me.getAbsoluteUrl(s,We.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,u)):this.logger.verbose("No main window navigation requested"),[3,6];case 5:throw v=g.sent(),a&&a.close(),v instanceof Y&&v.setCorrelationId(this.correlationId),this.browserStorage.setInteractionInProgress(!1),this.eventHandler.emitEvent(X.LOGOUT_FAILURE,G.Popup,null,v),this.eventHandler.emitEvent(X.LOGOUT_END,G.Popup),c.cacheFailedRequest(v),v;case 6:return this.eventHandler.emitEvent(X.LOGOUT_END,G.Popup),[2]}})})},e.prototype.initiateAuthRequest=function(r,n){if(N.isEmpty(r))throw this.logger.error("Navigate url is empty"),O.createEmptyNavigationUriError();return this.logger.infoPii("Navigate to: "+r),this.openPopup(r,n)},e.prototype.monitorPopupForHash=function(r){var n=this;return new Promise(function(i,o){var a=n.config.system.windowHashTimeout/n.config.system.pollIntervalMilliseconds,s=0;n.logger.verbose("PopupHandler.monitorPopupForHash - polling started");var c=setInterval(function(){if(r.closed){n.logger.error("PopupHandler.monitorPopupForHash - window closed"),n.cleanPopup(),clearInterval(c),o(O.createUserCancelledError());return}var l=b.EMPTY_STRING,d=b.EMPTY_STRING;try{l=r.location.href,d=r.location.hash}catch{}N.isEmpty(l)||l==="about:blank"||(n.logger.verbose("PopupHandler.monitorPopupForHash - popup window is on same origin as caller"),s++,d?(n.logger.verbose("PopupHandler.monitorPopupForHash - found hash in url"),clearInterval(c),n.cleanPopup(r),me.hashContainsKnownProperties(d)?(n.logger.verbose("PopupHandler.monitorPopupForHash - hash contains known properties, returning."),i(d)):(n.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."),n.logger.errorPii("PopupHandler.monitorPopupForHash - hash found: "+d),o(O.createHashDoesNotContainKnownPropertiesError()))):s>a&&(n.logger.error("PopupHandler.monitorPopupForHash - unable to find hash in url, timing out"),clearInterval(c),o(O.createMonitorPopupTimeoutError())))},n.config.system.pollIntervalMilliseconds)})},e.prototype.waitForLogoutPopup=function(r){var n=this;return new Promise(function(i){n.logger.verbose("PopupHandler.waitForLogoutPopup - polling started");var o=setInterval(function(){r.closed&&(n.logger.error("PopupHandler.waitForLogoutPopup - window closed"),n.cleanPopup(),clearInterval(o),i());var a=b.EMPTY_STRING;try{a=r.location.href}catch{}N.isEmpty(a)||a==="about:blank"||(n.logger.verbose("PopupHandler.waitForLogoutPopup - popup window is on same origin as caller, closing."),clearInterval(o),n.cleanPopup(r),i())},n.config.system.pollIntervalMilliseconds)})},e.prototype.openPopup=function(r,n){try{var i=void 0;if(n.popup?(i=n.popup,this.logger.verbosePii("Navigating popup window to: "+r),i.location.assign(r)):typeof n.popup>"u"&&(this.logger.verbosePii("Opening popup window to: "+r),i=this.openSizedPopup(r,n.popupName,n.popupWindowAttributes)),!i)throw O.createEmptyWindowCreatedError();return i.focus&&i.focus(),this.currentWindow=i,window.addEventListener("beforeunload",this.unloadWindow),i}catch(o){throw this.logger.error("error opening popup "+o.message),this.browserStorage.setInteractionInProgress(!1),O.createPopupWindowError(o.toString())}},e.prototype.openSizedPopup=function(r,n,i){var o,a,s,c,l=window.screenLeft?window.screenLeft:window.screenX,d=window.screenTop?window.screenTop:window.screenY,h=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,u=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,f=(o=i.popupSize)===null||o===void 0?void 0:o.width,v=(a=i.popupSize)===null||a===void 0?void 0:a.height,g=(s=i.popupPosition)===null||s===void 0?void 0:s.top,x=(c=i.popupPosition)===null||c===void 0?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=Jr.POPUP_WIDTH),(!v||v<0||v>u)&&(this.logger.verbose("Default popup window height used. Window height not configured or invalid."),v=Jr.POPUP_HEIGHT),(!g||g<0||g>u)&&(this.logger.verbose("Default popup window top position used. Window top not configured or invalid."),g=Math.max(0,u/2-Jr.POPUP_HEIGHT/2+d)),(!x||x<0||x>h)&&(this.logger.verbose("Default popup window left position used. Window left not configured or invalid."),x=Math.max(0,h/2-Jr.POPUP_WIDTH/2+l)),window.open(r,n,"width="+f+", height="+v+", top="+g+", left="+x+", scrollbars=yes")},e.prototype.unloadWindow=function(r){this.browserStorage.cleanRequestByInteractionType(G.Popup),this.currentWindow&&this.currentWindow.close(),r.preventDefault()},e.prototype.cleanPopup=function(r){r&&r.close(),window.removeEventListener("beforeunload",this.unloadWindow),this.browserStorage.setInteractionInProgress(!1)},e.prototype.generatePopupName=function(r,n){return Jr.POPUP_NAME_PREFIX+"."+this.config.auth.clientId+"."+r.join("-")+"."+n+"."+this.correlationId},e.prototype.generateLogoutPopupName=function(r){var n=r.account&&r.account.homeAccountId;return Jr.POPUP_NAME_PREFIX+"."+this.config.auth.clientId+"."+n+"."+this.correlationId},e}(Pa);/*! @azure/msal-browser v2.31.0 2022-11-07 */var Ky=function(){function t(){}return t.prototype.navigateInternal=function(e,r){return t.defaultNavigateWindow(e,r)},t.prototype.navigateExternal=function(e,r){return t.defaultNavigateWindow(e,r)},t.defaultNavigateWindow=function(e,r){return r.noHistory?window.location.replace(e):window.location.assign(e),new Promise(function(n){setTimeout(function(){n(!0)},r.timeout)})},t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var Wy=6e4,Yu=6e3,Yy=3e4,Qy=2e3;function Xy(t,e){var r=t.auth,n=t.cache,i=t.system,o=t.telemetry,a={clientId:b.EMPTY_STRING,authority:""+b.DEFAULT_AUTHORITY,knownAuthorities:[],cloudDiscoveryMetadata:b.EMPTY_STRING,authorityMetadata:b.EMPTY_STRING,redirectUri:b.EMPTY_STRING,postLogoutRedirectUri:b.EMPTY_STRING,navigateToLoginRequestUrl:!0,clientCapabilities:[],protocolMode:Td.AAD,azureCloudOptions:{azureCloudInstance:tc.None,tenant:b.EMPTY_STRING},skipAuthorityMetadataCache:!1},s={cacheLocation:Ot.SessionStorage,storeAuthStateInCookie:!1,secureCookies:!1},c={loggerCallback:function(){},logLevel:Qe.Info,piiLoggingEnabled:!1},l=W(W({},kg),{loggerOptions:c,networkClient:e?We.getBrowserNetworkClient():Ly,navigationClient:new Ky,loadFrameTimeout:0,windowHashTimeout:(i==null?void 0:i.loadFrameTimeout)||Wy,iframeHashTimeout:(i==null?void 0:i.loadFrameTimeout)||Yu,navigateFrameWait:e&&We.detectIEOrEdge()?500:0,redirectNavigationTimeout:Yy,asyncPopups:!1,allowRedirectInIframe:!1,allowNativeBroker:!1,nativeBrokerHandshakeTimeout:(i==null?void 0:i.nativeBrokerHandshakeTimeout)||Qy,pollIntervalMilliseconds:Jr.DEFAULT_POLL_INTERVAL_MS,cryptoOptions:{useMsrCrypto:!1,entropy:void 0}}),d={application:{appName:b.EMPTY_STRING,appVersion:b.EMPTY_STRING}},h={auth:W(W({},a),r),cache:W(W({},s),n),system:W(W({},l),i),telemetry:W(W({},d),o)};return h}/*! @azure/msal-browser v2.31.0 2022-11-07 */var Lg=function(t){xt(e,t);function e(r,n,i,o,a){var s=t.call(this,r,n,i,o)||this;return s.navigateFrameWait=a.navigateFrameWait,s.pollIntervalMilliseconds=a.pollIntervalMilliseconds,s}return e.prototype.initiateAuthRequest=function(r){return S(this,void 0,void 0,function(){var n;return k(this,function(i){switch(i.label){case 0:if(N.isEmpty(r))throw this.logger.info("Navigate url is empty"),O.createEmptyNavigationUriError();return this.navigateFrameWait?[4,this.loadFrame(r)]:[3,2];case 1:return n=i.sent(),[3,3];case 2:n=this.loadFrameSync(r),i.label=3;case 3:return[2,n]}})})},e.prototype.monitorIframeForHash=function(r,n){var i=this;return new Promise(function(o,a){n<Yu&&i.logger.warning("system.loadFrameTimeout or system.iframeHashTimeout set to lower ("+n+"ms) than the default ("+Yu+"ms). This may result in timeouts.");var s=window.performance.now(),c=s+n,l=setInterval(function(){if(window.performance.now()>c){i.removeHiddenIframe(r),clearInterval(l),a(O.createMonitorIframeTimeoutError());return}var d=b.EMPTY_STRING,h=r.contentWindow;try{d=h?h.location.href:b.EMPTY_STRING}catch{}if(!N.isEmpty(d)){var u=h?h.location.hash:b.EMPTY_STRING;if(me.hashContainsKnownProperties(u)){i.removeHiddenIframe(r),clearInterval(l),o(u);return}}},i.pollIntervalMilliseconds)})},e.prototype.loadFrame=function(r){var n=this;return new Promise(function(i,o){var a=n.createHiddenIframe();setTimeout(function(){if(!a){o("Unable to load iframe");return}a.src=r,i(a)},n.navigateFrameWait)})},e.prototype.loadFrameSync=function(r){var n=this.createHiddenIframe();return n.src=r,n},e.prototype.createHiddenIframe=function(){var r=document.createElement("iframe");return r.style.visibility="hidden",r.style.position="absolute",r.style.width=r.style.height="0",r.style.border="0",r.setAttribute("sandbox","allow-scripts allow-same-origin allow-forms"),document.getElementsByTagName("body")[0].appendChild(r),r},e.prototype.removeHiddenIframe=function(r){document.body===r.parentNode&&document.body.removeChild(r)},e}(H0);/*! @azure/msal-browser v2.31.0 2022-11-07 */var Jy=function(t){xt(e,t);function e(r,n,i,o,a,s,c,l,d,h,u){var f=t.call(this,r,n,i,o,a,s,l,h,u)||this;return f.apiId=c,f.nativeStorage=d,f}return e.prototype.acquireToken=function(r){return S(this,void 0,void 0,function(){var n,i,o,a,s;return k(this,function(c){switch(c.label){case 0:if(this.logger.verbose("acquireTokenByIframe called"),n=this.performanceClient.startMeasurement(lt.SilentIframeClientAcquireToken,r.correlationId),N.isEmpty(r.loginHint)&&N.isEmpty(r.sid)&&(!r.account||N.isEmpty(r.account.username))&&this.logger.warning("No user hint provided. The authorization server may need more information to complete this request."),r.prompt&&r.prompt!==Nt.NONE&&r.prompt!==Nt.NO_SESSION)throw n.endMeasurement({success:!1}),O.createSilentPromptValueError(r.prompt);return[4,this.initializeAuthorizationRequest(W(W({},r),{prompt:r.prompt||Nt.NONE}),G.Silent)];case 1:i=c.sent(),this.browserStorage.updateCacheEntries(i.state,i.nonce,i.authority,i.loginHint||b.EMPTY_STRING,i.account||null),o=this.initializeServerTelemetryManager(this.apiId),c.label=2;case 2:return c.trys.push([2,5,,6]),[4,this.createAuthCodeClient(o,i.authority,i.azureCloudOptions)];case 3:return a=c.sent(),this.logger.verbose("Auth code client created"),[4,this.silentTokenHelper(a,i).then(function(l){return n.endMeasurement({success:!0,fromCache:!1,requestId:l.requestId}),l})];case 4:return[2,c.sent()];case 5:throw s=c.sent(),s instanceof Y&&s.setCorrelationId(this.correlationId),o.cacheFailedRequest(s),this.browserStorage.cleanRequestByState(i.state),n.endMeasurement({errorCode:s instanceof Y&&s.errorCode||void 0,subErrorCode:s instanceof Y&&s.subError||void 0,success:!1}),s;case 6:return[2]}})})},e.prototype.logout=function(){return Promise.reject(O.createSilentLogoutUnsupportedError())},e.prototype.silentTokenHelper=function(r,n){return S(this,void 0,void 0,function(){var i,o,a,s,c,l,d,h,u,f=this;return k(this,function(v){switch(v.label){case 0:return[4,this.initializeAuthorizationCodeRequest(n)];case 1:return i=v.sent(),[4,r.getAuthCodeUrl(W(W({},n),{nativeBroker:io.isNativeAvailable(this.config,this.logger,this.nativeMessageHandler,n.authenticationScheme)}))];case 2:return o=v.sent(),a=new Lg(r,this.browserStorage,i,this.logger,this.config.system),[4,a.initiateAuthRequest(o)];case 3:return s=v.sent(),[4,a.monitorIframeForHash(s,this.config.system.iframeHashTimeout)];case 4:if(c=v.sent(),l=me.getDeserializedHash(c),d=this.validateAndExtractStateFromHash(l,G.Silent,i.correlationId),l.accountId){if(this.logger.verbose("Account id found in hash, calling WAM for token"),!this.nativeMessageHandler)throw O.createNativeConnectionNotEstablishedError();return h=new ua(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.apiId,this.performanceClient,this.nativeMessageHandler,l.accountId,this.browserStorage,this.correlationId),u=Un.parseRequestState(this.browserCrypto,d).userRequestState,[2,h.acquireToken(W(W({},n),{state:u,prompt:n.prompt||Nt.NONE})).finally(function(){f.browserStorage.cleanRequestByState(d)})]}return[2,a.handleCodeResponseFromHash(c,d,r.authority,this.networkClient)]}})})},e}(Pa);/*! @azure/msal-browser v2.31.0 2022-11-07 */var Zy=function(t){xt(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.acquireToken=function(r){return S(this,void 0,void 0,function(){var n,i,o,a,s,c=this;return k(this,function(l){switch(l.label){case 0:return i=[W({},r)],[4,this.initializeBaseRequest(r)];case 1:return n=W.apply(void 0,i.concat([l.sent()])),o=this.performanceClient.startMeasurement(lt.SilentRefreshClientAcquireToken,n.correlationId),a=this.initializeServerTelemetryManager(Ae.acquireTokenSilent_silentFlow),[4,this.createRefreshTokenClient(a,n.authority,n.azureCloudOptions)];case 2:return s=l.sent(),this.logger.verbose("Refresh token client created"),[2,s.acquireTokenByRefreshToken(n).then(function(d){return o.endMeasurement({success:!0,fromCache:d.fromCache,requestId:d.requestId}),d}).catch(function(d){throw d instanceof Y&&d.setCorrelationId(c.correlationId),a.cacheFailedRequest(d),o.endMeasurement({errorCode:d.errorCode,subErrorCode:d.subError,success:!1}),d})]}})})},e.prototype.logout=function(){return Promise.reject(O.createSilentLogoutUnsupportedError())},e.prototype.createRefreshTokenClient=function(r,n,i){return S(this,void 0,void 0,function(){var o;return k(this,function(a){switch(a.label){case 0:return[4,this.getClientConfiguration(r,n,i)];case 1:return o=a.sent(),[2,new Ag(o,this.performanceClient)]}})})},e}(Pa);/*! @azure/msal-browser v2.31.0 2022-11-07 */var e_=function(){function t(e,r){this.eventCallbacks=new Map,this.logger=e,this.browserCrypto=r,this.listeningToStorageEvents=!1,this.handleAccountCacheChange=this.handleAccountCacheChange.bind(this)}return t.prototype.addEventCallback=function(e){if(typeof window<"u"){var r=this.browserCrypto.createNewGuid();return this.eventCallbacks.set(r,e),this.logger.verbose("Event callback registered with id: "+r),r}return null},t.prototype.removeEventCallback=function(e){this.eventCallbacks.delete(e),this.logger.verbose("Event callback "+e+" removed.")},t.prototype.enableAccountStorageEvents=function(){typeof window>"u"||(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)))},t.prototype.disableAccountStorageEvents=function(){typeof window>"u"||(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."))},t.prototype.emitEvent=function(e,r,n,i){var o=this;if(typeof window<"u"){var a={eventType:e,interactionType:r||null,payload:n||null,error:i||null,timestamp:Date.now()};this.logger.info("Emitting event: "+e),this.eventCallbacks.forEach(function(s,c){o.logger.verbose("Emitting event to callback "+c+": "+e),s.apply(null,[a])})}},t.prototype.handleAccountCacheChange=function(e){try{var r=e.newValue||e.oldValue;if(!r)return;var n=JSON.parse(r);if(typeof n!="object"||!_t.isAccountEntity(n))return;var i=Wr.toObject(new _t,n),o=i.getAccountInfo();!e.oldValue&&e.newValue?(this.logger.info("Account was added to cache in a different window"),this.emitEvent(X.ACCOUNT_ADDED,void 0,o)):!e.newValue&&e.oldValue&&(this.logger.info("Account was removed from cache in a different window"),this.emitEvent(X.ACCOUNT_REMOVED,void 0,o))}catch{return}},t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var Pt=function(){function t(){}return t.decimalToHex=function(e){for(var r=e.toString(16);r.length<2;)r="0"+r;return r},t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var Og=function(){function t(e){this.cryptoObj=e}return t.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,Pt.decimalToHex(e[0])+Pt.decimalToHex(e[1])+Pt.decimalToHex(e[2])+Pt.decimalToHex(e[3])+"-"+Pt.decimalToHex(e[4])+Pt.decimalToHex(e[5])+"-"+Pt.decimalToHex(e[6])+Pt.decimalToHex(e[7])+"-"+Pt.decimalToHex(e[8])+Pt.decimalToHex(e[9])+"-"+Pt.decimalToHex(e[10])+Pt.decimalToHex(e[11])+Pt.decimalToHex(e[12])+Pt.decimalToHex(e[13])+Pt.decimalToHex(e[14])+Pt.decimalToHex(e[15])}catch{for(var r="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx",n="0123456789abcdef",i=0,o=b.EMPTY_STRING,a=0;a<36;a++)r[a]!=="-"&&r[a]!=="4"&&(i=Math.random()*16|0),r[a]==="x"?o+=n[i]:r[a]==="y"?(i&=3,i|=8,o+=n[i]):o+=r[a];return o}},t.prototype.isGuid=function(e){var r=/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;return r.test(e)},t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var Fn=function(){function t(){}return t.stringToUtf8Arr=function(e){for(var r,n=0,i=e.length,o=0;o<i;o++)r=e.charCodeAt(o),n+=r<128?1:r<2048?2:r<65536?3:r<2097152?4:r<67108864?5:6;for(var a=new Uint8Array(n),s=0,c=0;s<n;c++)r=e.charCodeAt(c),r<128?a[s++]=r:r<2048?(a[s++]=192+(r>>>6),a[s++]=128+(r&63)):r<65536?(a[s++]=224+(r>>>12),a[s++]=128+(r>>>6&63),a[s++]=128+(r&63)):r<2097152?(a[s++]=240+(r>>>18),a[s++]=128+(r>>>12&63),a[s++]=128+(r>>>6&63),a[s++]=128+(r&63)):r<67108864?(a[s++]=248+(r>>>24),a[s++]=128+(r>>>18&63),a[s++]=128+(r>>>12&63),a[s++]=128+(r>>>6&63),a[s++]=128+(r&63)):(a[s++]=252+(r>>>30),a[s++]=128+(r>>>24&63),a[s++]=128+(r>>>18&63),a[s++]=128+(r>>>12&63),a[s++]=128+(r>>>6&63),a[s++]=128+(r&63));return a},t.stringToArrayBuffer=function(e){for(var r=new ArrayBuffer(e.length),n=new Uint8Array(r),i=0;i<e.length;i++)n[i]=e.charCodeAt(i);return r},t.utf8ArrToString=function(e){for(var r=b.EMPTY_STRING,n=void 0,i=e.length,o=0;o<i;o++)n=e[o],r+=String.fromCharCode(n>251&&n<254&&o+5<i?(n-252)*1073741824+(e[++o]-128<<24)+(e[++o]-128<<18)+(e[++o]-128<<12)+(e[++o]-128<<6)+e[++o]-128:n>247&&n<252&&o+4<i?(n-248<<24)+(e[++o]-128<<18)+(e[++o]-128<<12)+(e[++o]-128<<6)+e[++o]-128:n>239&&n<248&&o+3<i?(n-240<<18)+(e[++o]-128<<12)+(e[++o]-128<<6)+e[++o]-128:n>223&&n<240&&o+2<i?(n-224<<12)+(e[++o]-128<<6)+e[++o]-128:n>191&&n<224&&o+1<i?(n-192<<6)+e[++o]-128:n);return r},t.getSortedObjectString=function(e){return JSON.stringify(e,Object.keys(e).sort())},t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var Dg=function(){function t(){}return t.prototype.urlEncode=function(e){return encodeURIComponent(this.encode(e).replace(/=/g,b.EMPTY_STRING).replace(/\+/g,"-").replace(/\//g,"_"))},t.prototype.urlEncodeArr=function(e){return this.base64EncArr(e).replace(/=/g,b.EMPTY_STRING).replace(/\+/g,"-").replace(/\//g,"_")},t.prototype.encode=function(e){var r=Fn.stringToUtf8Arr(e);return this.base64EncArr(r)},t.prototype.base64EncArr=function(e){for(var r=(3-e.length%3)%3,n=b.EMPTY_STRING,i=void 0,o=e.length,a=0,s=0;s<o;s++)i=s%3,a|=e[s]<<(16>>>i&24),(i===2||e.length-s===1)&&(n+=String.fromCharCode(this.uint6ToB64(a>>>18&63),this.uint6ToB64(a>>>12&63),this.uint6ToB64(a>>>6&63),this.uint6ToB64(a&63)),a=0);return r===0?n:n.substring(0,n.length-r)+(r===1?"=":"==")},t.prototype.uint6ToB64=function(e){return e<26?e+65:e<52?e+71:e<62?e-4:e===62?43:e===63?47:65},t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var t_=function(){function t(){}return t.prototype.decode=function(e){var r=e.replace(/-/g,"+").replace(/_/g,"/");switch(r.length%4){case 0:break;case 2:r+="==";break;case 3:r+="=";break;default:throw new Error("Invalid base64 string")}var n=this.base64DecToArr(r);return Fn.utf8ArrToString(n)},t.prototype.base64DecToArr=function(e,r){for(var n=e.replace(/[^A-Za-z0-9\+\/]/g,b.EMPTY_STRING),i=n.length,o=r?Math.ceil((i*3+1>>>2)/r)*r:i*3+1>>>2,a=new Uint8Array(o),s=void 0,c=void 0,l=0,d=0,h=0;h<i;h++)if(c=h&3,l|=this.b64ToUint6(n.charCodeAt(h))<<18-6*c,c===3||i-h===1){for(s=0;s<3&&d<o;s++,d++)a[d]=l>>>(16>>>s&24)&255;l=0}return a},t.prototype.b64ToUint6=function(e){return e>64&&e<91?e-65:e>96&&e<123?e-71:e>47&&e<58?e+4:e===43?62:e===47?63:0},t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var r_=32,n_=function(){function t(e){this.base64Encode=new Dg,this.cryptoObj=e}return t.prototype.generateCodes=function(){return S(this,void 0,void 0,function(){var e,r;return k(this,function(n){switch(n.label){case 0:return e=this.generateCodeVerifier(),[4,this.generateCodeChallengeFromVerifier(e)];case 1:return r=n.sent(),[2,{verifier:e,challenge:r}]}})})},t.prototype.generateCodeVerifier=function(){try{var e=new Uint8Array(r_);this.cryptoObj.getRandomValues(e);var r=this.base64Encode.urlEncodeArr(e);return r}catch(n){throw O.createPkceNotGeneratedError(n)}},t.prototype.generateCodeChallengeFromVerifier=function(e){return S(this,void 0,void 0,function(){var r,n;return k(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,this.cryptoObj.sha256Digest(e)];case 1:return r=i.sent(),[2,this.base64Encode.urlEncodeArr(new Uint8Array(r))];case 2:throw n=i.sent(),O.createPkceNotGeneratedError(n);case 3:return[2]}})})},t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var i_=function(){function t(){}return t.prototype.getRandomValues=function(e){return window.crypto.getRandomValues(e)},t.prototype.generateKey=function(e,r,n){return S(this,void 0,void 0,function(){return k(this,function(i){return[2,window.crypto.subtle.generateKey(e,r,n)]})})},t.prototype.exportKey=function(e){return S(this,void 0,void 0,function(){return k(this,function(r){return[2,window.crypto.subtle.exportKey(Ea,e)]})})},t.prototype.importKey=function(e,r,n,i){return S(this,void 0,void 0,function(){return k(this,function(o){return[2,window.crypto.subtle.importKey(Ea,e,r,n,i)]})})},t.prototype.sign=function(e,r,n){return S(this,void 0,void 0,function(){return k(this,function(i){return[2,window.crypto.subtle.sign(e,r,n)]})})},t.prototype.digest=function(e,r){return S(this,void 0,void 0,function(){return k(this,function(n){return[2,window.crypto.subtle.digest(e,r)]})})},t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var o_=function(){function t(){}return t.prototype.initPrng=function(e){return window.msrCrypto.initPrng(M0(e))},t.prototype.getRandomValues=function(e){return window.msrCrypto.getRandomValues(e)},t.prototype.generateKey=function(e,r,n){return S(this,void 0,void 0,function(){return k(this,function(i){return[2,window.msrCrypto.subtle.generateKey(e,r,n)]})})},t.prototype.exportKey=function(e){return S(this,void 0,void 0,function(){return k(this,function(r){return[2,window.msrCrypto.subtle.exportKey(Ea,e)]})})},t.prototype.importKey=function(e,r,n,i){return S(this,void 0,void 0,function(){return k(this,function(o){return[2,window.msrCrypto.subtle.importKey(Ea,e,r,n,i)]})})},t.prototype.sign=function(e,r,n){return S(this,void 0,void 0,function(){return k(this,function(i){return[2,window.msrCrypto.subtle.sign(e,r,n)]})})},t.prototype.digest=function(e,r){return S(this,void 0,void 0,function(){return k(this,function(n){return[2,window.msrCrypto.subtle.digest(e,r)]})})},t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var a_=function(){function t(){}return t.prototype.getRandomValues=function(e){return window.msCrypto.getRandomValues(e)},t.prototype.generateKey=function(e,r,n){return S(this,void 0,void 0,function(){return k(this,function(i){return[2,new Promise(function(o,a){var s=window.msCrypto.subtle.generateKey(e,r,n);s.addEventListener("complete",function(c){o(c.target.result)}),s.addEventListener("error",function(c){a(c)})})]})})},t.prototype.exportKey=function(e){return S(this,void 0,void 0,function(){return k(this,function(r){return[2,new Promise(function(n,i){var o=window.msCrypto.subtle.exportKey(Ea,e);o.addEventListener("complete",function(a){var s=a.target.result,c=Fn.utf8ArrToString(new Uint8Array(s)).replace(/\r/g,b.EMPTY_STRING).replace(/\n/g,b.EMPTY_STRING).replace(/\t/g,b.EMPTY_STRING).split(" ").join(b.EMPTY_STRING).replace("\0",b.EMPTY_STRING);try{n(JSON.parse(c))}catch(l){i(l)}}),o.addEventListener("error",function(a){i(a)})})]})})},t.prototype.importKey=function(e,r,n,i){return S(this,void 0,void 0,function(){var o,a;return k(this,function(s){return o=Fn.getSortedObjectString(e),a=Fn.stringToArrayBuffer(o),[2,new Promise(function(c,l){var d=window.msCrypto.subtle.importKey(Ea,a,r,n,i);d.addEventListener("complete",function(h){c(h.target.result)}),d.addEventListener("error",function(h){l(h)})})]})})},t.prototype.sign=function(e,r,n){return S(this,void 0,void 0,function(){return k(this,function(i){return[2,new Promise(function(o,a){var s=window.msCrypto.subtle.sign(e,r,n);s.addEventListener("complete",function(c){o(c.target.result)}),s.addEventListener("error",function(c){a(c)})})]})})},t.prototype.digest=function(e,r){return S(this,void 0,void 0,function(){return k(this,function(n){return[2,new Promise(function(i,o){var a=window.msCrypto.subtle.digest(e,r.buffer);a.addEventListener("complete",function(s){i(s.target.result)}),a.addEventListener("error",function(s){o(s)})})]})})},t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var s_="RSASSA-PKCS1-v1_5",Fp="SHA-256",c_=2048,l_=new Uint8Array([1,0,1]),Ng=function(){function t(e,r){var n,i;if(this.logger=e,this.cryptoOptions=r,this.hasBrowserCrypto())this.logger.verbose("BrowserCrypto: modern crypto interface available"),this.subtleCrypto=new i_;else if(this.hasIECrypto())this.logger.verbose("BrowserCrypto: MS crypto interface available"),this.subtleCrypto=new a_;else if(this.hasMsrCrypto()&&((n=this.cryptoOptions)===null||n===void 0?void 0:n.useMsrCrypto))this.logger.verbose("BrowserCrypto: MSR crypto interface available"),this.subtleCrypto=new o_;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."),O.createCryptoNotAvailableError("Browser crypto, msCrypto, or msrCrypto interfaces not available.");if(this.subtleCrypto.initPrng){if(this.logger.verbose("BrowserCrypto: Interface requires entropy"),!(!((i=this.cryptoOptions)===null||i===void 0)&&i.entropy))throw this.logger.error("BrowserCrypto: Interface requires entropy but none provided."),Pd.createEntropyNotProvided();this.logger.verbose("BrowserCrypto: Entropy provided"),this.subtleCrypto.initPrng(this.cryptoOptions.entropy)}this.keygenAlgorithmOptions={name:s_,hash:Fp,modulusLength:c_,publicExponent:l_}}return t.prototype.hasIECrypto=function(){return"msCrypto"in window},t.prototype.hasBrowserCrypto=function(){return"crypto"in window},t.prototype.hasMsrCrypto=function(){return"msrCrypto"in window},t.prototype.sha256Digest=function(e){return S(this,void 0,void 0,function(){var r;return k(this,function(n){return r=Fn.stringToUtf8Arr(e),[2,this.subtleCrypto.digest({name:Fp},r)]})})},t.prototype.getRandomValues=function(e){return this.subtleCrypto.getRandomValues(e)},t.prototype.generateKeyPair=function(e,r){return S(this,void 0,void 0,function(){return k(this,function(n){return[2,this.subtleCrypto.generateKey(this.keygenAlgorithmOptions,e,r)]})})},t.prototype.exportJwk=function(e){return S(this,void 0,void 0,function(){return k(this,function(r){return[2,this.subtleCrypto.exportKey(e)]})})},t.prototype.importJwk=function(e,r,n){return S(this,void 0,void 0,function(){return k(this,function(i){return[2,this.subtleCrypto.importKey(e,this.keygenAlgorithmOptions,r,n)]})})},t.prototype.sign=function(e,r){return S(this,void 0,void 0,function(){return k(this,function(n){return[2,this.subtleCrypto.sign(this.keygenAlgorithmOptions,e,r)]})})},t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var d_=function(){function t(){this.dbName=Gu,this.version=Uy,this.tableName=Fy,this.dbOpen=!1}return t.prototype.open=function(){return S(this,void 0,void 0,function(){var e=this;return k(this,function(r){return[2,new Promise(function(n,i){var o=window.indexedDB.open(e.dbName,e.version);o.addEventListener("upgradeneeded",function(a){var s=a;s.target.result.createObjectStore(e.tableName)}),o.addEventListener("success",function(a){var s=a;e.db=s.target.result,e.dbOpen=!0,n()}),o.addEventListener("error",function(){return i(O.createDatabaseUnavailableError())})})]})})},t.prototype.closeConnection=function(){var e=this.db;e&&this.dbOpen&&(e.close(),this.dbOpen=!1)},t.prototype.validateDbIsOpen=function(){return S(this,void 0,void 0,function(){return k(this,function(e){switch(e.label){case 0:return this.dbOpen?[3,2]:[4,this.open()];case 1:return[2,e.sent()];case 2:return[2]}})})},t.prototype.getItem=function(e){return S(this,void 0,void 0,function(){var r=this;return k(this,function(n){switch(n.label){case 0:return[4,this.validateDbIsOpen()];case 1:return n.sent(),[2,new Promise(function(i,o){if(!r.db)return o(O.createDatabaseNotOpenError());var a=r.db.transaction([r.tableName],"readonly"),s=a.objectStore(r.tableName),c=s.get(e);c.addEventListener("success",function(l){var d=l;r.closeConnection(),i(d.target.result)}),c.addEventListener("error",function(l){r.closeConnection(),o(l)})})]}})})},t.prototype.setItem=function(e,r){return S(this,void 0,void 0,function(){var n=this;return k(this,function(i){switch(i.label){case 0:return[4,this.validateDbIsOpen()];case 1:return i.sent(),[2,new Promise(function(o,a){if(!n.db)return a(O.createDatabaseNotOpenError());var s=n.db.transaction([n.tableName],"readwrite"),c=s.objectStore(n.tableName),l=c.put(r,e);l.addEventListener("success",function(){n.closeConnection(),o()}),l.addEventListener("error",function(d){n.closeConnection(),a(d)})})]}})})},t.prototype.removeItem=function(e){return S(this,void 0,void 0,function(){var r=this;return k(this,function(n){switch(n.label){case 0:return[4,this.validateDbIsOpen()];case 1:return n.sent(),[2,new Promise(function(i,o){if(!r.db)return o(O.createDatabaseNotOpenError());var a=r.db.transaction([r.tableName],"readwrite"),s=a.objectStore(r.tableName),c=s.delete(e);c.addEventListener("success",function(){r.closeConnection(),i()}),c.addEventListener("error",function(l){r.closeConnection(),o(l)})})]}})})},t.prototype.getKeys=function(){return S(this,void 0,void 0,function(){var e=this;return k(this,function(r){switch(r.label){case 0:return[4,this.validateDbIsOpen()];case 1:return r.sent(),[2,new Promise(function(n,i){if(!e.db)return i(O.createDatabaseNotOpenError());var o=e.db.transaction([e.tableName],"readonly"),a=o.objectStore(e.tableName),s=a.getAllKeys();s.addEventListener("success",function(c){var l=c;e.closeConnection(),n(l.target.result)}),s.addEventListener("error",function(c){e.closeConnection(),i(c)})})]}})})},t.prototype.containsKey=function(e){return S(this,void 0,void 0,function(){var r=this;return k(this,function(n){switch(n.label){case 0:return[4,this.validateDbIsOpen()];case 1:return n.sent(),[2,new Promise(function(i,o){if(!r.db)return o(O.createDatabaseNotOpenError());var a=r.db.transaction([r.tableName],"readonly"),s=a.objectStore(r.tableName),c=s.count(e);c.addEventListener("success",function(l){var d=l;r.closeConnection(),i(d.target.result===1)}),c.addEventListener("error",function(l){r.closeConnection(),o(l)})})]}})})},t.prototype.deleteDatabase=function(){return S(this,void 0,void 0,function(){return k(this,function(e){return this.db&&this.dbOpen&&this.closeConnection(),[2,new Promise(function(r,n){var i=window.indexedDB.deleteDatabase(Gu);i.addEventListener("success",function(){return r(!0)}),i.addEventListener("blocked",function(){return r(!0)}),i.addEventListener("error",function(){return n(!1)})})]})})},t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var $p=function(){function t(e,r){this.inMemoryCache=new Ku,this.indexedDBCache=new d_,this.logger=e,this.storeName=r}return t.prototype.handleDatabaseAccessError=function(e){if(e instanceof O&&e.errorCode===I.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},t.prototype.getItem=function(e){return S(this,void 0,void 0,function(){var r,n;return k(this,function(i){switch(i.label){case 0:if(r=this.inMemoryCache.getItem(e),r)return[3,4];i.label=1;case 1:return i.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,i.sent()];case 3:return n=i.sent(),this.handleDatabaseAccessError(n),[3,4];case 4:return[2,r]}})})},t.prototype.setItem=function(e,r){return S(this,void 0,void 0,function(){var n;return k(this,function(i){switch(i.label){case 0:this.inMemoryCache.setItem(e,r),i.label=1;case 1:return i.trys.push([1,3,,4]),[4,this.indexedDBCache.setItem(e,r)];case 2:return i.sent(),[3,4];case 3:return n=i.sent(),this.handleDatabaseAccessError(n),[3,4];case 4:return[2]}})})},t.prototype.removeItem=function(e){return S(this,void 0,void 0,function(){var r;return k(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 r=n.sent(),this.handleDatabaseAccessError(r),[3,4];case 4:return[2]}})})},t.prototype.getKeys=function(){return S(this,void 0,void 0,function(){var e,r;return k(this,function(n){switch(n.label){case 0:if(e=this.inMemoryCache.getKeys(),e.length!==0)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 r=n.sent(),this.handleDatabaseAccessError(r),[3,4];case 4:return[2,e]}})})},t.prototype.containsKey=function(e){return S(this,void 0,void 0,function(){var r,n;return k(this,function(i){switch(i.label){case 0:if(r=this.inMemoryCache.containsKey(e),r)return[3,4];i.label=1;case 1:return i.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,i.sent()];case 3:return n=i.sent(),this.handleDatabaseAccessError(n),[3,4];case 4:return[2,r]}})})},t.prototype.clearInMemory=function(){this.logger.verbose("Deleting in-memory keystore "+this.storeName),this.inMemoryCache.clear(),this.logger.verbose("In-memory keystore "+this.storeName+" deleted")},t.prototype.clearPersistent=function(){return S(this,void 0,void 0,function(){var e,r;return k(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(),e&&this.logger.verbose("Persistent keystore deleted"),[2,e];case 2:return r=n.sent(),this.handleDatabaseAccessError(r),[2,!1];case 3:return[2]}})})},t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var Rd;(function(t){t.asymmetricKeys="asymmetricKeys",t.symmetricKeys="symmetricKeys"})(Rd||(Rd={}));var h_=function(){function t(e){this.logger=e,this.asymmetricKeys=new $p(this.logger,Rd.asymmetricKeys),this.symmetricKeys=new $p(this.logger,Rd.symmetricKeys)}return t.prototype.clear=function(){return S(this,void 0,void 0,function(){var e;return k(this,function(r){switch(r.label){case 0:this.asymmetricKeys.clearInMemory(),this.symmetricKeys.clearInMemory(),r.label=1;case 1:return r.trys.push([1,3,,4]),[4,this.asymmetricKeys.clearPersistent()];case 2:return r.sent(),[2,!0];case 3:return e=r.sent(),e 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]}})})},t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var u_=function(){function t(e,r,n){this.logger=e,this.browserCrypto=new Ng(this.logger,n),this.b64Encode=new Dg,this.b64Decode=new t_,this.guidGenerator=new Og(this.browserCrypto),this.pkceGenerator=new n_(this.browserCrypto),this.cache=new h_(this.logger),this.performanceClient=r}return t.prototype.createNewGuid=function(){return this.guidGenerator.generateGuid()},t.prototype.base64Encode=function(e){return this.b64Encode.encode(e)},t.prototype.base64Decode=function(e){return this.b64Decode.decode(e)},t.prototype.generatePkceCodes=function(){return S(this,void 0,void 0,function(){return k(this,function(e){return[2,this.pkceGenerator.generateCodes()]})})},t.prototype.getPublicKeyThumbprint=function(e){var r;return S(this,void 0,void 0,function(){var n,i,o,a,s,c,l,d;return k(this,function(h){switch(h.label){case 0:return n=(r=this.performanceClient)===null||r===void 0?void 0:r.startMeasurement(lt.CryptoOptsGetPublicKeyThumbprint,e.correlationId),[4,this.browserCrypto.generateKeyPair(t.EXTRACTABLE,t.POP_KEY_USAGES)];case 1:return i=h.sent(),[4,this.browserCrypto.exportJwk(i.publicKey)];case 2:return o=h.sent(),a={e:o.e,kty:o.kty,n:o.n},s=Fn.getSortedObjectString(a),[4,this.hashString(s)];case 3:return c=h.sent(),[4,this.browserCrypto.exportJwk(i.privateKey)];case 4:return l=h.sent(),[4,this.browserCrypto.importJwk(l,!1,["sign"])];case 5:return d=h.sent(),[4,this.cache.asymmetricKeys.setItem(c,{privateKey:d,publicKey:i.publicKey,requestMethod:e.resourceRequestMethod,requestUri:e.resourceRequestUri})];case 6:return h.sent(),n&&n.endMeasurement({success:!0}),[2,c]}})})},t.prototype.removeTokenBindingKey=function(e){return S(this,void 0,void 0,function(){var r;return k(this,function(n){switch(n.label){case 0:return[4,this.cache.asymmetricKeys.removeItem(e)];case 1:return n.sent(),[4,this.cache.asymmetricKeys.containsKey(e)];case 2:return r=n.sent(),[2,!r]}})})},t.prototype.clearKeystore=function(){return S(this,void 0,void 0,function(){return k(this,function(e){switch(e.label){case 0:return[4,this.cache.clear()];case 1:return[2,e.sent()]}})})},t.prototype.signJwt=function(e,r,n){var i;return S(this,void 0,void 0,function(){var o,a,s,c,l,d,h,u,f,v,g,x,m;return k(this,function(p){switch(p.label){case 0:return o=(i=this.performanceClient)===null||i===void 0?void 0:i.startMeasurement(lt.CryptoOptsSignJwt,n),[4,this.cache.asymmetricKeys.getItem(r)];case 1:if(a=p.sent(),!a)throw O.createSigningKeyNotFoundInStorageError(r);return[4,this.browserCrypto.exportJwk(a.publicKey)];case 2:return s=p.sent(),c=Fn.getSortedObjectString(s),l=this.b64Encode.urlEncode(JSON.stringify({kid:r})),d=Oy.getShrHeaderString({kid:l,alg:s.alg}),h=this.b64Encode.urlEncode(d),e.cnf={jwk:JSON.parse(c)},u=this.b64Encode.urlEncode(JSON.stringify(e)),f=h+"."+u,v=Fn.stringToArrayBuffer(f),[4,this.browserCrypto.sign(a.privateKey,v)];case 3:return g=p.sent(),x=this.b64Encode.urlEncodeArr(new Uint8Array(g)),m=f+"."+x,o&&o.endMeasurement({success:!0}),[2,m]}})})},t.prototype.hashString=function(e){return S(this,void 0,void 0,function(){var r,n;return k(this,function(i){switch(i.label){case 0:return[4,this.browserCrypto.sha256Digest(e)];case 1:return r=i.sent(),n=new Uint8Array(r),[2,this.b64Encode.urlEncodeArr(n)]}})})},t.POP_KEY_USAGES=["sign","verify"],t.EXTRACTABLE=!0,t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var f_=function(){function t(e,r,n,i){this.isBrowserEnvironment=typeof window<"u",this.config=e,this.storage=r,this.logger=n,this.cryptoObj=i}return t.prototype.loadExternalTokens=function(e,r,n){if(this.logger.info("TokenCache - loadExternalTokens called"),!r.id_token)throw O.createUnableToLoadTokenError("Please ensure server response includes id token.");var i=new wn(r.id_token,this.cryptoObj),o,a;if(e.account){var s=this.loadAccount(i,e.account.environment,void 0,void 0,e.account.homeAccountId);o=new Il(s,this.loadIdToken(i,s.homeAccountId,e.account.environment,e.account.tenantId),this.loadAccessToken(e,r,s.homeAccountId,e.account.environment,e.account.tenantId,n),this.loadRefreshToken(e,r,s.homeAccountId,e.account.environment))}else if(e.authority){var c=Ad.generateAuthority(e.authority,e.azureCloudOptions),l={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 Ad(c,this.config.system.networkClient,this.storage,l),n.clientInfo){this.logger.trace("TokenCache - homeAccountId from options");var s=this.loadAccount(i,a.hostnameAndPort,n.clientInfo,a.authorityType);o=new Il(s,this.loadIdToken(i,s.homeAccountId,a.hostnameAndPort,a.tenant),this.loadAccessToken(e,r,s.homeAccountId,a.hostnameAndPort,a.tenant,n),this.loadRefreshToken(e,r,s.homeAccountId,a.hostnameAndPort))}else if(r.client_info){this.logger.trace("TokenCache - homeAccountId from response");var s=this.loadAccount(i,a.hostnameAndPort,r.client_info,a.authorityType);o=new Il(s,this.loadIdToken(i,s.homeAccountId,a.hostnameAndPort,a.tenant),this.loadAccessToken(e,r,s.homeAccountId,a.hostnameAndPort,a.tenant,n),this.loadRefreshToken(e,r,s.homeAccountId,a.hostnameAndPort))}else throw O.createUnableToLoadTokenError("Please provide clientInfo in the response or options.")}else throw O.createUnableToLoadTokenError("Please provide a request with an account or a request with authority.");return this.generateAuthenticationResult(e,i,o,a)},t.prototype.loadAccount=function(e,r,n,i,o){var a;if(o?a=o:i!==void 0&&n&&(a=_t.generateHomeAccountId(n,i,this.logger,this.cryptoObj,e)),!a)throw O.createUnableToLoadTokenError("Unexpected missing homeAccountId");var s=n?_t.createAccount(n,a,e,void 0,void 0,void 0,r):_t.createGenericAccount(a,e,void 0,void 0,void 0,r);if(this.isBrowserEnvironment)return this.logger.verbose("TokenCache - loading account"),this.storage.setAccount(s),s;throw O.createUnableToLoadTokenError("loadExternalTokens is designed to work in browser environments only.")},t.prototype.loadIdToken=function(e,r,n,i){var o=nc.createIdTokenEntity(r,n,e.rawToken,this.config.auth.clientId,i);if(this.isBrowserEnvironment)return this.logger.verbose("TokenCache - loading id token"),this.storage.setIdTokenCredential(o),o;throw O.createUnableToLoadTokenError("loadExternalTokens is designed to work in browser environments only.")},t.prototype.loadAccessToken=function(e,r,n,i,o,a){if(!r.access_token)return this.logger.verbose("TokenCache - No access token provided for caching"),null;if(!r.expires_in)throw O.createUnableToLoadTokenError("Please ensure server response includes expires_in value.");if(!a.extendedExpiresOn)throw O.createUnableToLoadTokenError("Please provide an extendedExpiresOn value in the options.");var s=new Wt(e.scopes).printScopes(),c=a.expiresOn||r.expires_in+new Date().getTime()/1e3,l=a.extendedExpiresOn,d=ic.createAccessTokenEntity(n,i,r.access_token,this.config.auth.clientId,o,s,c,l,this.cryptoObj);if(this.isBrowserEnvironment)return this.logger.verbose("TokenCache - loading access token"),this.storage.setAccessTokenCredential(d),d;throw O.createUnableToLoadTokenError("loadExternalTokens is designed to work in browser environments only.")},t.prototype.loadRefreshToken=function(e,r,n,i){if(!r.refresh_token)return this.logger.verbose("TokenCache - No refresh token provided for caching"),null;var o=Sd.createRefreshTokenEntity(n,i,r.refresh_token,this.config.auth.clientId);if(this.isBrowserEnvironment)return this.logger.verbose("TokenCache - loading refresh token"),this.storage.setRefreshTokenCredential(o),o;throw O.createUnableToLoadTokenError("loadExternalTokens is designed to work in browser environments only.")},t.prototype.generateAuthenticationResult=function(e,r,n,i){var o,a,s,c=b.EMPTY_STRING,l=[],d=null,h;n!=null&&n.accessToken&&(c=n.accessToken.secret,l=Wt.fromString(n.accessToken.target).asArray(),d=new Date(Number(n.accessToken.expiresOn)*1e3),h=new Date(Number(n.accessToken.extendedExpiresOn)*1e3));var u=(r==null?void 0:r.claims.oid)||(r==null?void 0:r.claims.sub)||b.EMPTY_STRING,f=(r==null?void 0:r.claims.tid)||b.EMPTY_STRING;return{authority:i?i.canonicalAuthority:b.EMPTY_STRING,uniqueId:u,tenantId:f,scopes:l,account:n!=null&&n.account?n.account.getAccountInfo():null,idToken:r?r.rawToken:b.EMPTY_STRING,idTokenClaims:r?r.claims:{},accessToken:c,fromCache:!0,expiresOn:d,correlationId:e.correlationId||b.EMPTY_STRING,requestId:b.EMPTY_STRING,extExpiresOn:h,familyId:b.EMPTY_STRING,tokenType:((o=n==null?void 0:n.accessToken)===null||o===void 0?void 0:o.tokenType)||b.EMPTY_STRING,state:b.EMPTY_STRING,cloudGraphHostName:((a=n==null?void 0:n.account)===null||a===void 0?void 0:a.cloudGraphHostName)||b.EMPTY_STRING,msGraphHost:((s=n==null?void 0:n.account)===null||s===void 0?void 0:s.msGraphHost)||b.EMPTY_STRING,code:void 0,fromNativeBroker:!1}},t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var p_=function(t){xt(e,t);function e(r){var n=t.call(this,r)||this;return n.includeRedirectUri=!1,n}return e}(Tg);/*! @azure/msal-browser v2.31.0 2022-11-07 */var m_=function(t){xt(e,t);function e(r,n,i,o,a,s,c,l,d,h){var u=t.call(this,r,n,i,o,a,s,l,d,h)||this;return u.apiId=c,u}return e.prototype.acquireToken=function(r){return S(this,void 0,void 0,function(){var n,i,o,a,s,c,l;return k(this,function(d){switch(d.label){case 0:if(this.logger.trace("SilentAuthCodeClient.acquireToken called"),!r.code)throw O.createAuthCodeRequiredError();return[4,this.initializeAuthorizationRequest(r,G.Silent)];case 1:n=d.sent(),this.browserStorage.updateCacheEntries(n.state,n.nonce,n.authority,n.loginHint||b.EMPTY_STRING,n.account||null),i=this.initializeServerTelemetryManager(this.apiId),d.label=2;case 2:return d.trys.push([2,4,,5]),o=W(W({},n),{code:r.code}),[4,this.getClientConfiguration(i,n.authority)];case 3:return a=d.sent(),s=new p_(a),this.logger.verbose("Auth code client created"),c=new Lg(s,this.browserStorage,o,this.logger,this.config.system),[2,c.handleCodeResponseFromServer({code:r.code,msgraph_host:r.msGraphHost,cloud_graph_host_name:r.cloudGraphHostName,cloud_instance_host_name:r.cloudInstanceHostName},n.state,s.authority,this.networkClient,!1)];case 4:throw l=d.sent(),l instanceof Y&&l.setCorrelationId(this.correlationId),i.cacheFailedRequest(l),this.browserStorage.cleanRequestByState(n.state),l;case 5:return[2]}})})},e.prototype.logout=function(){return Promise.reject(O.createSilentLogoutUnsupportedError())},e}(Pa);/*! @azure/msal-browser v2.31.0 2022-11-07 */var v_=function(){function t(e,r){this.correlationId=r,this.measureName="msal.measure."+e+"."+this.correlationId,this.startMark="msal.start."+e+"."+this.correlationId,this.endMark="msal.end."+e+"."+this.correlationId}return t.supportsBrowserPerformance=function(){return typeof window<"u"&&typeof window.performance<"u"&&typeof window.performance.mark=="function"&&typeof window.performance.measure=="function"&&typeof window.performance.clearMarks=="function"&&typeof window.performance.clearMeasures=="function"&&typeof window.performance.getEntriesByName=="function"},t.prototype.startMeasurement=function(){if(t.supportsBrowserPerformance())try{window.performance.mark(this.startMark)}catch{}},t.prototype.endMeasurement=function(){if(t.supportsBrowserPerformance())try{window.performance.mark(this.endMark),window.performance.measure(this.measureName,this.startMark,this.endMark)}catch{}},t.prototype.flushMeasurement=function(){if(t.supportsBrowserPerformance())try{var e=window.performance.getEntriesByName(this.measureName,"measure");if(e.length>0){var r=e[0].duration;return window.performance.clearMeasures(this.measureName),window.performance.clearMarks(this.startMark),window.performance.clearMarks(this.endMark),r}}catch{}return null},t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var g_=function(t){xt(e,t);function e(r,n,i,o,a,s,c){var l=t.call(this,r,n,i,o,a,s)||this;return l.browserCrypto=new Ng(l.logger,c),l.guidGenerator=new Og(l.browserCrypto),l}return e.prototype.startPerformanceMeasuremeant=function(r,n){return new v_(r,n)},e.prototype.generateId=function(){return this.guidGenerator.generateGuid()},e.prototype.getPageVisibility=function(){var r;return((r=document.visibilityState)===null||r===void 0?void 0:r.toString())||null},e.prototype.startMeasurement=function(r,n){var i=this,o=this.getPageVisibility(),a=t.prototype.startMeasurement.call(this,r,n);return W(W({},a),{endMeasurement:function(s){return a.endMeasurement(W({startPageVisibility:o,endPageVisibility:i.getPageVisibility()},s))}})},e}(Mg);/*! @azure/msal-browser v2.31.0 2022-11-07 */var y_=function(){function t(e){this.isBrowserEnvironment=typeof window<"u",this.config=Xy(e,this.isBrowserEnvironment),this.initialized=!1,this.logger=new P0(this.config.system.loggerOptions,ih,Rs),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 g_(this.config.auth.clientId,this.config.auth.authority,this.logger,ih,Rs,this.config.telemetry.application,this.config.system.cryptoOptions):new Vy(this.config.auth.clientId,this.config.auth.authority,this.logger,ih,Rs,this.config.telemetry.application),this.browserCrypto=this.isBrowserEnvironment?new u_(this.logger,this.performanceClient,this.config.system.cryptoOptions):Ed,this.eventHandler=new e_(this.logger,this.browserCrypto),this.browserStorage=this.isBrowserEnvironment?new Wu(this.config.auth.clientId,this.config.cache,this.browserCrypto,this.logger):$y(this.config.auth.clientId,this.logger);var r={cacheLocation:Ot.MemoryStorage,storeAuthStateInCookie:!1,secureCookies:!1};this.nativeInternalStorage=new Wu(this.config.auth.clientId,r,this.browserCrypto,this.logger),this.tokenCache=new f_(this.config,this.browserStorage,this.logger,this.browserCrypto)}return t.prototype.initialize=function(){return S(this,void 0,void 0,function(){var e,r;return k(this,function(n){switch(n.label){case 0:if(this.logger.trace("initialize called"),this.initialized)return this.logger.info("initialize has already been called, exiting early."),[2];if(this.eventHandler.emitEvent(X.INITIALIZE_START),!this.config.system.allowNativeBroker)return[3,4];n.label=1;case 1:return n.trys.push([1,3,,4]),e=this,[4,io.createProvider(this.logger,this.config.system.nativeBrokerHandshakeTimeout)];case 2:return e.nativeExtensionProvider=n.sent(),[3,4];case 3:return r=n.sent(),this.logger.verbose(r),[3,4];case 4:return this.initialized=!0,this.eventHandler.emitEvent(X.INITIALIZE_END),[2]}})})},t.prototype.handleRedirectPromise=function(e){return S(this,void 0,void 0,function(){var r,n,i,o,a,s,c,l,d=this;return k(this,function(h){return this.logger.verbose("handleRedirectPromise called"),We.blockNativeBrokerCalledBeforeInitialized(this.config.system.allowNativeBroker,this.initialized),r=this.getAllAccounts(),this.isBrowserEnvironment?(n=e||b.EMPTY_STRING,i=this.redirectResponse.get(n),typeof i>"u"?(this.eventHandler.emitEvent(X.HANDLE_REDIRECT_START,G.Redirect),this.logger.verbose("handleRedirectPromise has been called for the first time, storing the promise"),o=this.browserStorage.getCachedNativeRequest(),a=void 0,o&&io.isNativeAvailable(this.config,this.logger,this.nativeExtensionProvider)&&this.nativeExtensionProvider&&!e?(this.logger.trace("handleRedirectPromise - acquiring token from native platform"),s=new ua(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,Ae.handleRedirectPromise,this.performanceClient,this.nativeExtensionProvider,o.accountId,this.nativeInternalStorage,o.correlationId),a=s.handleRedirectPromise()):(this.logger.trace("handleRedirectPromise - acquiring token from web flow"),c=this.browserStorage.getTemporaryCache(ge.CORRELATION_ID,!0)||b.EMPTY_STRING,l=this.createRedirectClient(c),a=l.handleRedirectPromise(e)),i=a.then(function(u){if(u){var f=r.length<d.getAllAccounts().length;f?(d.eventHandler.emitEvent(X.LOGIN_SUCCESS,G.Redirect,u),d.logger.verbose("handleRedirectResponse returned result, login success")):(d.eventHandler.emitEvent(X.ACQUIRE_TOKEN_SUCCESS,G.Redirect,u),d.logger.verbose("handleRedirectResponse returned result, acquire token success"))}return d.eventHandler.emitEvent(X.HANDLE_REDIRECT_END,G.Redirect),u}).catch(function(u){throw r.length>0?d.eventHandler.emitEvent(X.ACQUIRE_TOKEN_FAILURE,G.Redirect,null,u):d.eventHandler.emitEvent(X.LOGIN_FAILURE,G.Redirect,null,u),d.eventHandler.emitEvent(X.HANDLE_REDIRECT_END,G.Redirect),u}),this.redirectResponse.set(n,i)):this.logger.verbose("handleRedirectPromise has been called previously, returning the result from the first call"),[2,i]):(this.logger.verbose("handleRedirectPromise returns null, not browser environment"),[2,null])})})},t.prototype.acquireTokenRedirect=function(e){return S(this,void 0,void 0,function(){var r,n,i,o,a,s=this;return k(this,function(c){return r=this.getRequestCorrelationId(e),this.logger.verbose("acquireTokenRedirect called",r),this.preflightBrowserEnvironmentCheck(G.Redirect),n=this.getAllAccounts().length>0,n?this.eventHandler.emitEvent(X.ACQUIRE_TOKEN_START,G.Redirect,e):this.eventHandler.emitEvent(X.LOGIN_START,G.Redirect,e),this.nativeExtensionProvider&&this.canUseNative(e)?(o=new ua(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,Ae.acquireTokenRedirect,this.performanceClient,this.nativeExtensionProvider,this.getNativeAccountId(e),this.nativeInternalStorage,e.correlationId),i=o.acquireTokenRedirect(e).catch(function(l){if(l instanceof mn&&l.isFatal()){s.nativeExtensionProvider=void 0;var d=s.createRedirectClient(e.correlationId);return d.acquireToken(e)}else if(l instanceof Zr){s.logger.verbose("acquireTokenRedirect - Resolving interaction required error thrown by native broker by falling back to web flow");var d=s.createRedirectClient(e.correlationId);return d.acquireToken(e)}throw s.browserStorage.setInteractionInProgress(!1),l})):(a=this.createRedirectClient(e.correlationId),i=a.acquireToken(e)),[2,i.catch(function(l){throw n?s.eventHandler.emitEvent(X.ACQUIRE_TOKEN_FAILURE,G.Redirect,null,l):s.eventHandler.emitEvent(X.LOGIN_FAILURE,G.Redirect,null,l),l})]})})},t.prototype.acquireTokenPopup=function(e){var r=this,n=this.getRequestCorrelationId(e),i=this.performanceClient.startMeasurement(lt.AcquireTokenPopup,n);try{this.logger.verbose("acquireTokenPopup called",n),this.preflightBrowserEnvironmentCheck(G.Popup)}catch(c){return Promise.reject(c)}var o=this.getAllAccounts();o.length>0?this.eventHandler.emitEvent(X.ACQUIRE_TOKEN_START,G.Popup,e):this.eventHandler.emitEvent(X.LOGIN_START,G.Popup,e);var a;if(this.canUseNative(e))a=this.acquireTokenNative(e,Ae.acquireTokenPopup).then(function(c){return r.browserStorage.setInteractionInProgress(!1),i.endMeasurement({success:!0,isNativeBroker:!0,requestId:c.requestId}),i.flushMeasurement(),c}).catch(function(c){if(c instanceof mn&&c.isFatal()){r.nativeExtensionProvider=void 0;var l=r.createPopupClient(e.correlationId);return l.acquireToken(e)}else if(c instanceof Zr){r.logger.verbose("acquireTokenPopup - Resolving interaction required error thrown by native broker by falling back to web flow");var l=r.createPopupClient(e.correlationId);return l.acquireToken(e)}throw r.browserStorage.setInteractionInProgress(!1),c});else{var s=this.createPopupClient(e.correlationId);a=s.acquireToken(e)}return a.then(function(c){var l=o.length<r.getAllAccounts().length;return l?r.eventHandler.emitEvent(X.LOGIN_SUCCESS,G.Popup,c):r.eventHandler.emitEvent(X.ACQUIRE_TOKEN_SUCCESS,G.Popup,c),i.addStaticFields({accessTokenSize:c.accessToken.length,idTokenSize:c.idToken.length}),i.endMeasurement({success:!0,requestId:c.requestId}),i.flushMeasurement(),c}).catch(function(c){return o.length>0?r.eventHandler.emitEvent(X.ACQUIRE_TOKEN_FAILURE,G.Popup,null,c):r.eventHandler.emitEvent(X.LOGIN_FAILURE,G.Popup,null,c),i.endMeasurement({errorCode:c.errorCode,subErrorCode:c.subError,success:!1}),i.flushMeasurement(),Promise.reject(c)})},t.prototype.ssoSilent=function(e){return S(this,void 0,void 0,function(){var r,n,i,o,a,s=this;return k(this,function(c){return r=this.getRequestCorrelationId(e),n=W(W({},e),{prompt:e.prompt,correlationId:r}),this.preflightBrowserEnvironmentCheck(G.Silent),i=this.performanceClient.startMeasurement(lt.SsoSilent,r),this.logger.verbose("ssoSilent called",r),this.eventHandler.emitEvent(X.SSO_SILENT_START,G.Silent,n),this.canUseNative(n)?o=this.acquireTokenNative(n,Ae.ssoSilent).catch(function(l){if(l instanceof mn&&l.isFatal()){s.nativeExtensionProvider=void 0;var d=s.createSilentIframeClient(n.correlationId);return d.acquireToken(n)}throw l}):(a=this.createSilentIframeClient(n.correlationId),o=a.acquireToken(n)),[2,o.then(function(l){return s.eventHandler.emitEvent(X.SSO_SILENT_SUCCESS,G.Silent,l),i.addStaticFields({accessTokenSize:l.accessToken.length,idTokenSize:l.idToken.length}),i.endMeasurement({success:!0,isNativeBroker:l.fromNativeBroker,requestId:l.requestId}),i.flushMeasurement(),l}).catch(function(l){throw s.eventHandler.emitEvent(X.SSO_SILENT_FAILURE,G.Silent,null,l),i.endMeasurement({errorCode:l.errorCode,subErrorCode:l.subError,success:!1}),i.flushMeasurement(),l})]})})},t.prototype.acquireTokenByCode=function(e){return S(this,void 0,void 0,function(){var r,n,i,o,a=this;return k(this,function(s){r=this.getRequestCorrelationId(e),this.preflightBrowserEnvironmentCheck(G.Silent),this.logger.trace("acquireTokenByCode called",r),this.eventHandler.emitEvent(X.ACQUIRE_TOKEN_BY_CODE_START,G.Silent,e),n=this.performanceClient.startMeasurement(lt.AcquireTokenByCode,e.correlationId);try{if(e.code)return i=e.code,o=this.hybridAuthCodeResponses.get(i),o?(this.logger.verbose("Existing acquireTokenByCode request found",e.correlationId),n.endMeasurement({success:!0}),n.discardMeasurement()):(this.logger.verbose("Initiating new acquireTokenByCode request",r),o=this.acquireTokenByCodeAsync(W(W({},e),{correlationId:r})).then(function(c){return a.eventHandler.emitEvent(X.ACQUIRE_TOKEN_BY_CODE_SUCCESS,G.Silent,c),a.hybridAuthCodeResponses.delete(i),n.addStaticFields({accessTokenSize:c.accessToken.length,idTokenSize:c.idToken.length}),n.endMeasurement({success:!0,isNativeBroker:c.fromNativeBroker,requestId:c.requestId}),n.flushMeasurement(),c}).catch(function(c){throw a.hybridAuthCodeResponses.delete(i),a.eventHandler.emitEvent(X.ACQUIRE_TOKEN_BY_CODE_FAILURE,G.Silent,null,c),n.endMeasurement({errorCode:c.errorCode,subErrorCode:c.subError,success:!1}),n.flushMeasurement(),c}),this.hybridAuthCodeResponses.set(i,o)),[2,o];if(e.nativeAccountId){if(this.canUseNative(e,e.nativeAccountId))return[2,this.acquireTokenNative(e,Ae.acquireTokenByCode,e.nativeAccountId).catch(function(c){throw c instanceof mn&&c.isFatal()&&(a.nativeExtensionProvider=void 0),c})];throw O.createUnableToAcquireTokenFromNativePlatformError()}else throw O.createAuthCodeOrNativeAccountIdRequiredError()}catch(c){throw this.eventHandler.emitEvent(X.ACQUIRE_TOKEN_BY_CODE_FAILURE,G.Silent,null,c),n.endMeasurement({errorCode:c instanceof Y&&c.errorCode||void 0,subErrorCode:c instanceof Y&&c.subError||void 0,success:!1}),c}return[2]})})},t.prototype.acquireTokenByCodeAsync=function(e){return S(this,void 0,void 0,function(){var r,n;return k(this,function(i){switch(i.label){case 0:return this.logger.trace("acquireTokenByCodeAsync called",e.correlationId),r=this.createSilentAuthCodeClient(e.correlationId),[4,r.acquireToken(e)];case 1:return n=i.sent(),[2,n]}})})},t.prototype.acquireTokenFromCache=function(e,r,n){return S(this,void 0,void 0,function(){return k(this,function(i){switch(n.cacheLookupPolicy){case or.Default:case or.AccessToken:case or.AccessTokenAndRefreshToken:return[2,e.acquireToken(r)];default:throw j.createRefreshRequiredError()}return[2]})})},t.prototype.acquireTokenByRefreshToken=function(e,r){return S(this,void 0,void 0,function(){var n;return k(this,function(i){switch(r.cacheLookupPolicy){case or.Default:case or.AccessTokenAndRefreshToken:case or.RefreshToken:case or.RefreshTokenAndNetwork:return n=this.createSilentRefreshClient(e.correlationId),[2,n.acquireToken(e)];default:throw j.createRefreshRequiredError()}return[2]})})},t.prototype.acquireTokenBySilentIframe=function(e){return S(this,void 0,void 0,function(){var r;return k(this,function(n){return r=this.createSilentIframeClient(e.correlationId),[2,r.acquireToken(e)]})})},t.prototype.logout=function(e){return S(this,void 0,void 0,function(){var r;return k(this,function(n){return r=this.getRequestCorrelationId(e),this.logger.warning("logout API is deprecated and will be removed in msal-browser v3.0.0. Use logoutRedirect instead.",r),[2,this.logoutRedirect(W({correlationId:r},e))]})})},t.prototype.logoutRedirect=function(e){return S(this,void 0,void 0,function(){var r,n;return k(this,function(i){return r=this.getRequestCorrelationId(e),this.preflightBrowserEnvironmentCheck(G.Redirect),n=this.createRedirectClient(r),[2,n.logout(e)]})})},t.prototype.logoutPopup=function(e){try{var r=this.getRequestCorrelationId(e);this.preflightBrowserEnvironmentCheck(G.Popup);var n=this.createPopupClient(r);return n.logout(e)}catch(i){return Promise.reject(i)}},t.prototype.getAllAccounts=function(){return this.logger.verbose("getAllAccounts called"),this.isBrowserEnvironment?this.browserStorage.getAllAccounts():[]},t.prototype.getAccountByUsername=function(e){var r=this.getAllAccounts();return!N.isEmpty(e)&&r&&r.length?(this.logger.verbose("Account matching username found, returning"),this.logger.verbosePii("Returning signed-in accounts matching username: "+e),r.filter(function(n){return n.username.toLowerCase()===e.toLowerCase()})[0]||null):(this.logger.verbose("getAccountByUsername: No matching account found, returning null"),null)},t.prototype.getAccountByHomeId=function(e){var r=this.getAllAccounts();return!N.isEmpty(e)&&r&&r.length?(this.logger.verbose("Account matching homeAccountId found, returning"),this.logger.verbosePii("Returning signed-in accounts matching homeAccountId: "+e),r.filter(function(n){return n.homeAccountId===e})[0]||null):(this.logger.verbose("getAccountByHomeId: No matching account found, returning null"),null)},t.prototype.getAccountByLocalId=function(e){var r=this.getAllAccounts();return!N.isEmpty(e)&&r&&r.length?(this.logger.verbose("Account matching localAccountId found, returning"),this.logger.verbosePii("Returning signed-in accounts matching localAccountId: "+e),r.filter(function(n){return n.localAccountId===e})[0]||null):(this.logger.verbose("getAccountByLocalId: No matching account found, returning null"),null)},t.prototype.setActiveAccount=function(e){this.browserStorage.setActiveAccount(e)},t.prototype.getActiveAccount=function(){return this.browserStorage.getActiveAccount()},t.prototype.preflightBrowserEnvironmentCheck=function(e,r){if(r===void 0&&(r=!0),this.logger.verbose("preflightBrowserEnvironmentCheck started"),We.blockNonBrowserEnvironment(this.isBrowserEnvironment),We.blockRedirectInIframe(e,this.config.system.allowRedirectInIframe),We.blockReloadInHiddenIframes(),We.blockAcquireTokenInPopups(),We.blockNativeBrokerCalledBeforeInitialized(this.config.system.allowNativeBroker,this.initialized),e===G.Redirect&&this.config.cache.cacheLocation===Ot.MemoryStorage&&!this.config.cache.storeAuthStateInCookie)throw Pd.createInMemoryRedirectUnavailableError();(e===G.Redirect||e===G.Popup)&&this.preflightInteractiveRequest(r)},t.prototype.preflightInteractiveRequest=function(e){this.logger.verbose("preflightInteractiveRequest called, validating app environment"),We.blockReloadInHiddenIframes(),e&&this.browserStorage.setInteractionInProgress(!0)},t.prototype.acquireTokenNative=function(e,r,n){return S(this,void 0,void 0,function(){var i;return k(this,function(o){if(this.logger.trace("acquireTokenNative called"),!this.nativeExtensionProvider)throw O.createNativeConnectionNotEstablishedError();return i=new ua(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,r,this.performanceClient,this.nativeExtensionProvider,n||this.getNativeAccountId(e),this.nativeInternalStorage,e.correlationId),[2,i.acquireToken(e)]})})},t.prototype.canUseNative=function(e,r){if(this.logger.trace("canUseNative called"),!io.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 Nt.NONE:case Nt.CONSENT:case Nt.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!r&&!this.getNativeAccountId(e)?(this.logger.trace("canUseNative: nativeAccountId is not available, returning false"),!1):!0},t.prototype.getNativeAccountId=function(e){var r=e.account||this.browserStorage.getAccountInfoByHints(e.loginHint,e.sid)||this.getActiveAccount();return r&&r.nativeAccountId||""},t.prototype.createPopupClient=function(e){return new Gy(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeInternalStorage,this.nativeExtensionProvider,e)},t.prototype.createRedirectClient=function(e){return new qy(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeInternalStorage,this.nativeExtensionProvider,e)},t.prototype.createSilentIframeClient=function(e){return new Jy(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,Ae.ssoSilent,this.performanceClient,this.nativeInternalStorage,this.nativeExtensionProvider,e)},t.prototype.createSilentCacheClient=function(e){return new Hg(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeExtensionProvider,e)},t.prototype.createSilentRefreshClient=function(e){return new Zy(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeExtensionProvider,e)},t.prototype.createSilentAuthCodeClient=function(e){return new m_(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,Ae.acquireTokenByCode,this.performanceClient,this.nativeExtensionProvider,e)},t.prototype.addEventCallback=function(e){return this.eventHandler.addEventCallback(e)},t.prototype.removeEventCallback=function(e){this.eventHandler.removeEventCallback(e)},t.prototype.addPerformanceCallback=function(e){return this.performanceClient.addPerformanceCallback(e)},t.prototype.removePerformanceCallback=function(e){return this.performanceClient.removePerformanceCallback(e)},t.prototype.enableAccountStorageEvents=function(){this.eventHandler.enableAccountStorageEvents()},t.prototype.disableAccountStorageEvents=function(){this.eventHandler.disableAccountStorageEvents()},t.prototype.getTokenCache=function(){return this.tokenCache},t.prototype.getLogger=function(){return this.logger},t.prototype.setLogger=function(e){this.logger=e},t.prototype.initializeWrapperLibrary=function(e,r){this.browserStorage.setWrapperMetadata(e,r)},t.prototype.setNavigationClient=function(e){this.navigationClient=e},t.prototype.getConfiguration=function(){return this.config},t.prototype.getRequestCorrelationId=function(e){return e!=null&&e.correlationId?e.correlationId:this.isBrowserEnvironment?this.browserCrypto.createNewGuid():b.EMPTY_STRING},t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var __=function(t){xt(e,t);function e(r){var n=t.call(this,r)||this;return n.activeSilentTokenRequests=new Map,n}return e.prototype.loginRedirect=function(r){return S(this,void 0,void 0,function(){var n;return k(this,function(i){return n=this.getRequestCorrelationId(r),this.logger.verbose("loginRedirect called",n),[2,this.acquireTokenRedirect(W({correlationId:n},r||Dp))]})})},e.prototype.loginPopup=function(r){var n=this.getRequestCorrelationId(r);return this.logger.verbose("loginPopup called",n),this.acquireTokenPopup(W({correlationId:n},r||Dp))},e.prototype.acquireTokenSilent=function(r){return S(this,void 0,void 0,function(){var n,i,o,a,s,c,l,d=this;return k(this,function(h){if(n=this.getRequestCorrelationId(r),i=this.performanceClient.startMeasurement(lt.AcquireTokenSilent,n),i.addStaticFields({cacheLookupPolicy:r.cacheLookupPolicy}),this.preflightBrowserEnvironmentCheck(G.Silent),this.logger.verbose("acquireTokenSilent called",n),o=r.account||this.getActiveAccount(),!o)throw O.createNoAccountError();return a={clientId:this.config.auth.clientId,authority:r.authority||b.EMPTY_STRING,scopes:r.scopes,homeAccountIdentifier:o.homeAccountId,claims:r.claims,authenticationScheme:r.authenticationScheme,resourceRequestMethod:r.resourceRequestMethod,resourceRequestUri:r.resourceRequestUri,shrClaims:r.shrClaims,sshKid:r.sshKid},s=JSON.stringify(a),c=this.activeSilentTokenRequests.get(s),typeof c>"u"?(this.logger.verbose("acquireTokenSilent called for the first time, storing active request",n),l=this.acquireTokenSilentAsync(W(W({},r),{correlationId:n}),o).then(function(u){return d.activeSilentTokenRequests.delete(s),i.addStaticFields({accessTokenSize:u.accessToken.length,idTokenSize:u.idToken.length}),i.endMeasurement({success:!0,fromCache:u.fromCache,isNativeBroker:u.fromNativeBroker,requestId:u.requestId}),i.flushMeasurement(),u}).catch(function(u){throw d.activeSilentTokenRequests.delete(s),i.endMeasurement({errorCode:u.errorCode,subErrorCode:u.subError,success:!1}),i.flushMeasurement(),u}),this.activeSilentTokenRequests.set(s,l),[2,l]):(this.logger.verbose("acquireTokenSilent has been called previously, returning the result from the first call",n),i.endMeasurement({success:!0}),i.discardMeasurement(),[2,c])})})},e.prototype.acquireTokenSilentAsync=function(r,n){return S(this,void 0,void 0,function(){var i,o,a,s,c,l,d=this;return k(this,function(h){switch(h.label){case 0:return this.eventHandler.emitEvent(X.ACQUIRE_TOKEN_START,G.Silent,r),i=this.performanceClient.startMeasurement(lt.AcquireTokenSilentAsync,r.correlationId),io.isNativeAvailable(this.config,this.logger,this.nativeExtensionProvider,r.authenticationScheme)&&n.nativeAccountId?(this.logger.verbose("acquireTokenSilent - attempting to acquire token from native platform"),a=W(W({},r),{account:n}),o=this.acquireTokenNative(a,Ae.acquireTokenSilent_silentFlow).catch(function(u){return S(d,void 0,void 0,function(){var f;return k(this,function(v){if(u instanceof mn&&u.isFatal())return this.logger.verbose("acquireTokenSilent - native platform unavailable, falling back to web flow"),this.nativeExtensionProvider=void 0,f=this.createSilentIframeClient(r.correlationId),[2,f.acquireToken(r)];throw u})})}),[3,3]):[3,1];case 1:return this.logger.verbose("acquireTokenSilent - attempting to acquire token from web flow"),s=this.createSilentCacheClient(r.correlationId),[4,s.initializeSilentRequest(r,n)];case 2:c=h.sent(),l=W(W({},r),{cacheLookupPolicy:r.cacheLookupPolicy||or.Default}),o=this.acquireTokenFromCache(s,c,l).catch(function(u){if(l.cacheLookupPolicy===or.AccessToken)throw u;return We.blockReloadInHiddenIframes(),d.eventHandler.emitEvent(X.ACQUIRE_TOKEN_NETWORK_START,G.Silent,c),d.acquireTokenByRefreshToken(c,l).catch(function(f){var v=f instanceof go,g=f instanceof Zr,x=f.errorCode===Jr.INVALID_GRANT_ERROR;if((!v||!x||g||l.cacheLookupPolicy===or.AccessTokenAndRefreshToken||l.cacheLookupPolicy===or.RefreshToken)&&l.cacheLookupPolicy!==or.Skip)throw f;return d.logger.verbose("Refresh token expired/invalid or CacheLookupPolicy is set to Skip, attempting acquire token by iframe.",r.correlationId),d.acquireTokenBySilentIframe(c)})}),h.label=3;case 3:return[2,o.then(function(u){return d.eventHandler.emitEvent(X.ACQUIRE_TOKEN_SUCCESS,G.Silent,u),i.endMeasurement({success:!0,fromCache:u.fromCache,isNativeBroker:u.fromNativeBroker,requestId:u.requestId}),u}).catch(function(u){throw d.eventHandler.emitEvent(X.ACQUIRE_TOKEN_FAILURE,G.Silent,null,u),i.endMeasurement({errorCode:u.errorCode,subErrorCode:u.subError,success:!1}),u})]}})})},e}(y_);const jp="redirect";var Bp=globalThis&&globalThis.__awaiter||function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(h){a(h)}}function c(d){try{l(n.throw(d))}catch(h){a(h)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};class b_ extends __{get account(){return this.getAllAccounts().find(n=>{var i;return((i=n.idTokenClaims)===null||i===void 0?void 0:i.aud)===this.clientId})}get hasValidClaims(){var e;const r=(e=this.account)===null||e===void 0?void 0:e.idTokenClaims;if(r){const n=Math.ceil(Date.now()/1e3);return r.exp>n}return!1}get clientId(){var e;return(e=this.config.auth)===null||e===void 0?void 0:e.clientId}get requestOrigin(){return this.browserStorage.getTemporaryCache("request.origin",!0)}constructor(e,r){super(r),this.tenantId=e}login(e,r=jp,n=!0){var i;return Bp(this,void 0,void 0,function*(){const o=(e==null?void 0:e.loginHint)||((i=this.account)===null||i===void 0?void 0:i.username),a=(e==null?void 0:e.scopes)||[],s=Object.assign(Object.assign({},e),{loginHint:o,scopes:a});if(o&&n){this.logger.verbose("Attempting to login in silently");try{return yield this.ssoSilent(s)}catch{this.logger.verbose("Silent login attempt failed")}}switch(this.logger.verbose(`Attempting to login in by [${r}]`),r){case"popup":return this.loginPopup(s);case"redirect":return this.loginRedirect(s)}})}acquireToken(e={scopes:[]},r=jp,n=!0){return Bp(this,void 0,void 0,function*(){const i=yield this.account;if(n&&i){this.logger.verbose("Attempting to acquire token in silently");try{return yield this.acquireTokenSilent(Object.assign({account:i},e))}catch{this.logger.info("Expected to navigate away from the current page but timeout occurred.")}}switch(this.logger.verbose(`Attempting to acquire token by [${r}]`),r){case"popup":return this.acquireTokenPopup(e);case"redirect":return this.acquireTokenRedirect(e)}})}}const w_=(t,e=window.location.origin)=>{t=t.match(/^http[s]?/)?t:e+t;const{origin:r,pathname:n}=new URL(t);return r+n.replace(/([^:]\/)\/+/g,"$1")},x_=(t,e,r,n,i)=>{const o=Object.assign({clientId:e,redirectUri:w_(r||""),navigateToLoginRequestUrl:!1,authority:`https://login.microsoftonline.com/${t}`},n==null?void 0:n.auth),a=Object.assign({cacheLocation:"localStorage"},n==null?void 0:n.cache),s=n==null?void 0:n.system;return new(i||b_)(t,{auth:o,cache:a,system:s})};class Vg extends P0{constructor(e){super({logLevel:e,loggerCallback:(...r)=>this.loggerCallback(...r)}),this.getLogType=r=>{switch(r){case Qe.Error:return"error";case Qe.Warning:return"warn";case Qe.Info:return"info";case Qe.Verbose:default:return"debug"}}}loggerCallback(e,r,n){console[this.getLogType(e)]("%c FUSION::MSAL %c %s","border: 1px solid;","border: none;",r)}}var oh=globalThis&&globalThis.__awaiter||function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(h){a(h)}}function c(d){try{l(n.throw(d))}catch(h){a(h)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const E_="default";class C_{get defaultClient(){return this.getClient(E_)}get defaultAccount(){return this.defaultClient.account}get defaultConfig(){return this._config.defaultConfig}constructor(e){this._config=e,this._clients={}}getClient(e){return this._clients[e]||(this._clients[e]=this.createClient(e)),this._clients[e]}createClient(e){const r=e?this._config.getClientConfig(e):this._config.defaultConfig;if(!r)throw Error("Could not find any config");const n=x_(r.tenantId,r.clientId,r.redirectUri,r.config);return n.setLogger(new Vg(0)),n}handleRedirect(){return oh(this,void 0,void 0,function*(){const{redirectUri:e}=this.defaultConfig||{};if(window.location.pathname===e){const r=this.defaultClient,n=r.getLogger(),{requestOrigin:i}=r;yield r.handleRedirectPromise(),i===e?(n.warning(`detected callback loop from url ${e}, redirecting to root`),window.location.replace("/")):window.location.replace(i||"/")}return null})}acquireToken(e){return this.defaultClient.acquireToken(e)}acquireAccessToken(e){return oh(this,void 0,void 0,function*(){const r=yield this.acquireToken(e);return r?r.accessToken:void 0})}login(){return oh(this,void 0,void 0,function*(){yield this.defaultClient.login()})}}var z_=globalThis&&globalThis.__awaiter||function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(h){a(h)}}function c(d){try{l(n.throw(d))}catch(h){a(h)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const Ug={name:"auth",configure:t=>{var e;const r=new py;return!((e=t==null?void 0:t.auth)===null||e===void 0)&&e.defaultConfig&&r.configureDefault(t.auth.defaultConfig),r},initialize:({config:t})=>z_(void 0,void 0,void 0,function*(){const e=new C_(t);return t.requiresAuth&&(yield e.handleRedirect(),e.defaultAccount||(yield e.login())),e})},S_=(t,e)=>({module:Ug,configure:r=>{r.configureDefault(t),(e==null?void 0:e.requiresAuth)!==void 0&&(r.requiresAuth=e==null?void 0:e.requiresAuth);const{clients:n}=e!=null?e:{};n&&Object.entries(n).forEach(([i,o])=>r.configureClient(i,o))}});var Fg=globalThis&&globalThis.__awaiter||function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(h){a(h)}}function c(d){try{l(n.throw(d))}catch(h){a(h)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const k_=t=>{var e;return{id:t.id,isChildType:t.isChildType,parentTypeIds:(e=t.parentTypeIds)!==null&&e!==void 0?e:[]}},$g=t=>{var e,r,n,i;return{id:t.id,externalId:(e=t.externalId)!==null&&e!==void 0?e:void 0,isActive:t.isActive,isDeleted:t.isDeleted,created:new Date(t.created),source:(r=t.source)!==null&&r!==void 0?r:void 0,title:(n=t.title)!==null&&n!==void 0?n:void 0,type:k_(t.type),value:(i=t.value)!==null&&i!==void 0?i:{}}},T_=t=>Fg(void 0,void 0,void 0,function*(){const e=yield t.json();return $g(e)}),A_=t=>Fg(void 0,void 0,void 0,function*(){return(yield t.json()).map($g)});var I_=globalThis&&globalThis.__classPrivateFieldSet||function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},M_=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Ml;class P_{constructor(e,r={}){this.config=r,Ml.set(this,void 0),I_(this,Ml,e,"f")}requireInstance(e){return M_(this,Ml,"f").requireInstance(e)}setContextType(e){this.config.contextType=e}setContextFilter(e){this.config.contextFilter=e}setContextClient(e,r=1*60*1e3){this.config.client={get:typeof e.get=="function"?{key:({id:n})=>n,client:{fn:e.get},expire:r}:e.get,query:typeof e.query=="function"?{key:n=>JSON.stringify(n),client:{fn:e.query},expire:r}:e.query}}}Ml=new WeakMap;var ol=globalThis&&globalThis.__awaiter||function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(h){a(h)}}function c(d){try{l(n.throw(d))}catch(h){a(h)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})},qp=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Pl;class R_{constructor(){this.defaultExpireTime=1*60*1e3,Pl.set(this,[])}addConfigBuilder(e){qp(this,Pl,"f").push(e)}_getServiceProvider(e){var r;return ol(this,void 0,void 0,function*(){if(e.hasModule("services"))return e.requireInstance("services");{const n=(r=e.ref)===null||r===void 0?void 0:r.services;if(n)return n;throw Error("no service services provider configures [ServicesModule]")}})}createConfig(e){var r;return ol(this,void 0,void 0,function*(){const n=yield qp(this,Pl,"f").reduce((i,o)=>ol(this,void 0,void 0,function*(){const a=new P_(e,yield i);return yield Promise.resolve(o(a)),Object.assign(i,a.config)}),Promise.resolve({}));return(r=n.client)!==null&&r!==void 0||(n.client=yield(()=>ol(this,void 0,void 0,function*(){const o=yield(yield this._getServiceProvider(e)).createContextClient("json$");return{get:{client:{fn:a=>o.get("v1",a,{selector:T_})},key:({id:a})=>a,expire:this.defaultExpireTime},query:{client:{fn:a=>o.query("v1",{query:a},{selector:A_})},key:a=>JSON.stringify(a),expire:this.defaultExpireTime}}}))()),n})}}Pl=new WeakMap;var Gp;(function(t){t.IDLE="idle",t.ACTIVE="active",t.FAILED="failed",t.CANCELED="canceled"})(Gp||(Gp={}));const H_=t=>e=>e.pipe(Ji(t)),L_=t=>t.pipe(Xt(e=>e.value));var al,O_=new Uint8Array(16);function D_(){if(!al&&(al=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!al))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return al(O_)}const N_=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function jg(t){return typeof t=="string"&&N_.test(t)}var mt=[];for(var ah=0;ah<256;++ah)mt.push((ah+256).toString(16).substr(1));function Bg(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=(mt[t[e+0]]+mt[t[e+1]]+mt[t[e+2]]+mt[t[e+3]]+"-"+mt[t[e+4]]+mt[t[e+5]]+"-"+mt[t[e+6]]+mt[t[e+7]]+"-"+mt[t[e+8]]+mt[t[e+9]]+"-"+mt[t[e+10]]+mt[t[e+11]]+mt[t[e+12]]+mt[t[e+13]]+mt[t[e+14]]+mt[t[e+15]]).toLowerCase();if(!jg(r))throw TypeError("Stringified UUID is invalid");return r}function V_(t){if(!jg(t))throw TypeError("Invalid UUID");var e,r=new Uint8Array(16);return r[0]=(e=parseInt(t.slice(0,8),16))>>>24,r[1]=e>>>16&255,r[2]=e>>>8&255,r[3]=e&255,r[4]=(e=parseInt(t.slice(9,13),16))>>>8,r[5]=e&255,r[6]=(e=parseInt(t.slice(14,18),16))>>>8,r[7]=e&255,r[8]=(e=parseInt(t.slice(19,23),16))>>>8,r[9]=e&255,r[10]=(e=parseInt(t.slice(24,36),16))/1099511627776&255,r[11]=e/4294967296&255,r[12]=e>>>24&255,r[13]=e>>>16&255,r[14]=e>>>8&255,r[15]=e&255,r}function U_(t){t=unescape(encodeURIComponent(t));for(var e=[],r=0;r<t.length;++r)e.push(t.charCodeAt(r));return e}var F_="6ba7b810-9dad-11d1-80b4-00c04fd430c8",$_="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function j_(t,e,r){function n(i,o,a,s){if(typeof i=="string"&&(i=U_(i)),typeof o=="string"&&(o=V_(o)),o.length!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var c=new Uint8Array(16+i.length);if(c.set(o),c.set(i,o.length),c=r(c),c[6]=c[6]&15|e,c[8]=c[8]&63|128,a){s=s||0;for(var l=0;l<16;++l)a[s+l]=c[l];return a}return Bg(c)}try{n.name=t}catch{}return n.DNS=F_,n.URL=$_,n}function qg(t,e,r){t=t||{};var n=t.random||(t.rng||D_)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,e){r=r||0;for(var i=0;i<16;++i)e[r+i]=n[i];return e}return Bg(n)}function B_(t,e,r,n){switch(t){case 0:return e&r^~e&n;case 1:return e^r^n;case 2:return e&r^e&n^r&n;case 3:return e^r^n}}function sh(t,e){return t<<e|t>>>32-e}function q_(t){var e=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof t=="string"){var n=unescape(encodeURIComponent(t));t=[];for(var i=0;i<n.length;++i)t.push(n.charCodeAt(i))}else Array.isArray(t)||(t=Array.prototype.slice.call(t));t.push(128);for(var o=t.length/4+2,a=Math.ceil(o/16),s=new Array(a),c=0;c<a;++c){for(var l=new Uint32Array(16),d=0;d<16;++d)l[d]=t[c*64+d*4]<<24|t[c*64+d*4+1]<<16|t[c*64+d*4+2]<<8|t[c*64+d*4+3];s[c]=l}s[a-1][14]=(t.length-1)*8/Math.pow(2,32),s[a-1][14]=Math.floor(s[a-1][14]),s[a-1][15]=(t.length-1)*8&4294967295;for(var h=0;h<a;++h){for(var u=new Uint32Array(80),f=0;f<16;++f)u[f]=s[h][f];for(var v=16;v<80;++v)u[v]=sh(u[v-3]^u[v-8]^u[v-14]^u[v-16],1);for(var g=r[0],x=r[1],m=r[2],p=r[3],y=r[4],w=0;w<80;++w){var T=Math.floor(w/20),L=sh(g,5)+B_(T,x,m,p)+y+e[T]+u[w]>>>0;y=p,p=m,m=sh(x,30)>>>0,x=g,g=L}r[0]=r[0]+g>>>0,r[1]=r[1]+x>>>0,r[2]=r[2]+m>>>0,r[3]=r[3]+p>>>0,r[4]=r[4]+y>>>0}return[r[0]>>24&255,r[0]>>16&255,r[0]>>8&255,r[0]&255,r[1]>>24&255,r[1]>>16&255,r[1]>>8&255,r[1]&255,r[2]>>24&255,r[2]>>16&255,r[2]>>8&255,r[2]&255,r[3]>>24&255,r[3]>>16&255,r[3]>>8&255,r[3]&255,r[4]>>24&255,r[4]>>16&255,r[4]>>8&255,r[4]&255]}var G_=j_("v5",80,q_);const K_=G_;class Qu extends Error{constructor(e,r){super(r.message,{cause:r.cause}),this.type=e,this.request=r.request}}const Gg=(...t)=>$r(e=>t.includes(e.type));var Rt=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},W_=globalThis&&globalThis.__classPrivateFieldSet||function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},dn,Gr;class Kg extends Be{get action$(){return Rt(this,dn,"f").asObservable()}get value(){return Rt(this,Gr,"f").value}get closed(){return Rt(this,Gr,"f").closed||Rt(this,dn,"f").closed}constructor(e,r){super(i=>Rt(this,Gr,"f").subscribe(i)),dn.set(this,new Nn),Gr.set(this,void 0);const n="getInitialState"in e?e.getInitialState():r;W_(this,Gr,new o1(n),"f"),Rt(this,dn,"f").pipe(A0(e,n),yg()).subscribe(Rt(this,Gr,"f")),this.reset=()=>Rt(this,Gr,"f").next(n)}next(e){Rt(this,dn,"f").next(e)}addEffect(e,r){const n=typeof e=="string"?this.action$.pipe(Gg(e)):this.action$,i=r||e;return n.pipe(vo(o=>rn(new Promise((a,s)=>{try{a(i(o,this.value))}catch(c){s(c)}})).pipe(Wn(a=>(console.warn("unhandled effect",a),po)))),$r(o=>!!o),md(pd)).subscribe(Rt(this,dn,"f"))}addEpic(e){return this.addFlow(e)}addFlow(e){const r=e(this.action$,this);if(!r)throw new TypeError(`addEpic: one of the provided effects "${e.name||"<anonymous>"}" does not return a stream. Double check you're not missing a return statement!`);return r.pipe(Wn(n=>(console.trace("unhandled exception, epic closed!",n),po)),md(pd)).subscribe(Rt(this,dn,"f"))}unsubscribe(){Rt(this,dn,"f").unsubscribe(),Rt(this,Gr,"f").unsubscribe()}complete(){Rt(this,dn,"f").complete(),Rt(this,Gr,"f").complete()}asObservable(){return Rt(this,Gr,"f").asObservable()}}dn=new WeakMap,Gr=new WeakMap;function fn(t,e){function r(...n){if(e){const i=e(...n);if(!i)throw new Error("prepareAction did not return an object");return Object.assign(Object.assign({type:t,payload:i.payload},"meta"in i&&{meta:i.meta}),"error"in i&&{error:i.error})}return{type:t,payload:n[0]}}return r.toString=()=>`${t}`,r.type=t,r.match=n=>n.type===t,r}function Lr(t){for(var e=arguments.length,r=Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];throw Error("[Immer] minified error nr: "+t+(r.length?" "+r.map(function(i){return"'"+i+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Ti(t){return!!t&&!!t[hr]}function Yn(t){var e;return!!t&&(function(r){if(!r||typeof r!="object")return!1;var n=Object.getPrototypeOf(r);if(n===null)return!0;var i=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return i===Object||typeof i=="function"&&Function.toString.call(i)===rb}(t)||Array.isArray(t)||!!t[tm]||!!(!((e=t.constructor)===null||e===void 0)&&e[tm])||L0(t)||O0(t))}function Kp(t){return Ti(t)||Lr(23,t),t[hr].t}function oc(t,e,r){r===void 0&&(r=!1),Ra(t)===0?(r?Object.keys:F0)(t).forEach(function(n){r&&typeof n=="symbol"||e(n,t[n],t)}):t.forEach(function(n,i){return e(i,n,t)})}function Ra(t){var e=t[hr];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:L0(t)?2:O0(t)?3:0}function Xu(t,e){return Ra(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function Y_(t,e){return Ra(t)===2?t.get(e):t[e]}function Wg(t,e,r){var n=Ra(t);n===2?t.set(e,r):n===3?(t.delete(e),t.add(r)):t[e]=r}function Q_(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function L0(t){return eb&&t instanceof Map}function O0(t){return tb&&t instanceof Set}function Bi(t){return t.o||t.t}function D0(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=nb(t);delete e[hr];for(var r=F0(e),n=0;n<r.length;n++){var i=r[n],o=e[i];o.writable===!1&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(e[i]={configurable:!0,writable:!0,enumerable:o.enumerable,value:t[i]})}return Object.create(Object.getPrototypeOf(t),e)}function N0(t,e){return e===void 0&&(e=!1),V0(t)||Ti(t)||!Yn(t)||(Ra(t)>1&&(t.set=t.add=t.clear=t.delete=X_),Object.freeze(t),e&&oc(t,function(r,n){return N0(n,!0)},!0)),t}function X_(){Lr(2)}function V0(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function _n(t){var e=ib[t];return e||Lr(18,t),e}function Wp(){return ac}function ch(t,e){e&&(_n("Patches"),t.u=[],t.s=[],t.v=e)}function Hd(t){Ju(t),t.p.forEach(J_),t.p=null}function Ju(t){t===ac&&(ac=t.l)}function Yp(t){return ac={p:[],l:ac,h:t,m:!0,_:0}}function J_(t){var e=t[hr];e.i===0||e.i===1?e.j():e.O=!0}function lh(t,e){e._=e.p.length;var r=e.p[0],n=t!==void 0&&t!==r;return e.h.g||_n("ES5").S(e,t,n),n?(r[hr].P&&(Hd(e),Lr(4)),Yn(t)&&(t=Ld(e,t),e.l||Od(e,t)),e.u&&_n("Patches").M(r[hr].t,t,e.u,e.s)):t=Ld(e,r,[]),Hd(e),e.u&&e.v(e.u,e.s),t!==Yg?t:void 0}function Ld(t,e,r){if(V0(e))return e;var n=e[hr];if(!n)return oc(e,function(o,a){return Qp(t,n,e,o,a,r)},!0),e;if(n.A!==t)return e;if(!n.P)return Od(t,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=n.i===4||n.i===5?n.o=D0(n.k):n.o;oc(n.i===3?new Set(i):i,function(o,a){return Qp(t,n,i,o,a,r)}),Od(t,i,!1),r&&t.u&&_n("Patches").R(n,r,t.u,t.s)}return n.o}function Qp(t,e,r,n,i,o){if(Ti(i)){var a=Ld(t,i,o&&e&&e.i!==3&&!Xu(e.D,n)?o.concat(n):void 0);if(Wg(r,n,a),!Ti(a))return;t.m=!1}if(Yn(i)&&!V0(i)){if(!t.h.F&&t._<1)return;Ld(t,i),e&&e.A.l||Od(t,i)}}function Od(t,e,r){r===void 0&&(r=!1),t.h.F&&t.m&&N0(e,r)}function dh(t,e){var r=t[hr];return(r?Bi(r):t)[e]}function Xp(t,e){if(e in t)for(var r=Object.getPrototypeOf(t);r;){var n=Object.getOwnPropertyDescriptor(r,e);if(n)return n;r=Object.getPrototypeOf(r)}}function Zu(t){t.P||(t.P=!0,t.l&&Zu(t.l))}function hh(t){t.o||(t.o=D0(t.t))}function e2(t,e,r){var n=L0(e)?_n("MapSet").N(e,r):O0(e)?_n("MapSet").T(e,r):t.g?function(i,o){var a=Array.isArray(i),s={i:a?1:0,A:o?o.A:Wp(),P:!1,I:!1,D:{},l:o,t:i,k:null,o:null,j:null,C:!1},c=s,l=t2;a&&(c=[s],l=ds);var d=Proxy.revocable(c,l),h=d.revoke,u=d.proxy;return s.k=u,s.j=h,u}(e,r):_n("ES5").J(e,r);return(r?r.A:Wp()).p.push(n),n}function Z_(t){return Ti(t)||Lr(22,t),function e(r){if(!Yn(r))return r;var n,i=r[hr],o=Ra(r);if(i){if(!i.P&&(i.i<4||!_n("ES5").K(i)))return i.t;i.I=!0,n=Jp(r,o),i.I=!1}else n=Jp(r,o);return oc(n,function(a,s){i&&Y_(i.t,a)===s||Wg(n,a,e(s))}),o===3?new Set(n):n}(t)}function Jp(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return D0(t)}var Zp,ac,U0=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",eb=typeof Map<"u",tb=typeof Set<"u",em=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Yg=U0?Symbol.for("immer-nothing"):((Zp={})["immer-nothing"]=!0,Zp),tm=U0?Symbol.for("immer-draftable"):"__$immer_draftable",hr=U0?Symbol.for("immer-state"):"__$immer_state",rb=""+Object.prototype.constructor,F0=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,nb=Object.getOwnPropertyDescriptors||function(t){var e={};return F0(t).forEach(function(r){e[r]=Object.getOwnPropertyDescriptor(t,r)}),e},ib={},t2={get:function(t,e){if(e===hr)return t;var r=Bi(t);if(!Xu(r,e))return function(i,o,a){var s,c=Xp(o,a);return c?"value"in c?c.value:(s=c.get)===null||s===void 0?void 0:s.call(i.k):void 0}(t,r,e);var n=r[e];return t.I||!Yn(n)?n:n===dh(t.t,e)?(hh(t),t.o[e]=e2(t.A.h,n,t)):n},has:function(t,e){return e in Bi(t)},ownKeys:function(t){return Reflect.ownKeys(Bi(t))},set:function(t,e,r){var n=Xp(Bi(t),e);if(n!=null&&n.set)return n.set.call(t.k,r),!0;if(!t.P){var i=dh(Bi(t),e),o=i==null?void 0:i[hr];if(o&&o.t===r)return t.o[e]=r,t.D[e]=!1,!0;if(Q_(r,i)&&(r!==void 0||Xu(t.t,e)))return!0;hh(t),Zu(t)}return t.o[e]===r&&typeof r!="number"&&(r!==void 0||e in t.o)||(t.o[e]=r,t.D[e]=!0,!0)},deleteProperty:function(t,e){return dh(t.t,e)!==void 0||e in t.t?(t.D[e]=!1,hh(t),Zu(t)):delete t.D[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var r=Bi(t),n=Reflect.getOwnPropertyDescriptor(r,e);return n&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:n.enumerable,value:r[e]}},defineProperty:function(){Lr(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){Lr(12)}},ds={};oc(t2,function(t,e){ds[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),ds.deleteProperty=function(t,e){return ds.set.call(this,t,e,void 0)},ds.set=function(t,e,r){return t2.set.call(this,t[0],e,r,t[0])};var ob=function(){function t(r){var n=this;this.g=em,this.F=!0,this.produce=function(i,o,a){if(typeof i=="function"&&typeof o!="function"){var s=o;o=i;var c=n;return function(g){var x=this;g===void 0&&(g=s);for(var m=arguments.length,p=Array(m>1?m-1:0),y=1;y<m;y++)p[y-1]=arguments[y];return c.produce(g,function(w){var T;return(T=o).call.apply(T,[x,w].concat(p))})}}var l;if(typeof o!="function"&&Lr(6),a!==void 0&&typeof a!="function"&&Lr(7),Yn(i)){var d=Yp(n),h=e2(n,i,void 0),u=!0;try{l=o(h),u=!1}finally{u?Hd(d):Ju(d)}return typeof Promise<"u"&&l instanceof Promise?l.then(function(g){return ch(d,a),lh(g,d)},function(g){throw Hd(d),g}):(ch(d,a),lh(l,d))}if(!i||typeof i!="object"){if((l=o(i))===void 0&&(l=i),l===Yg&&(l=void 0),n.F&&N0(l,!0),a){var f=[],v=[];_n("Patches").M(i,l,f,v),a(f,v)}return l}Lr(21,i)},this.produceWithPatches=function(i,o){if(typeof i=="function")return function(l){for(var d=arguments.length,h=Array(d>1?d-1:0),u=1;u<d;u++)h[u-1]=arguments[u];return n.produceWithPatches(l,function(f){return i.apply(void 0,[f].concat(h))})};var a,s,c=n.produce(i,o,function(l,d){a=l,s=d});return typeof Promise<"u"&&c instanceof Promise?c.then(function(l){return[l,a,s]}):[c,a,s]},typeof(r==null?void 0:r.useProxies)=="boolean"&&this.setUseProxies(r.useProxies),typeof(r==null?void 0:r.autoFreeze)=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var e=t.prototype;return e.createDraft=function(r){Yn(r)||Lr(8),Ti(r)&&(r=Z_(r));var n=Yp(this),i=e2(this,r,void 0);return i[hr].C=!0,Ju(n),i},e.finishDraft=function(r,n){var i=r&&r[hr],o=i.A;return ch(o,n),lh(void 0,o)},e.setAutoFreeze=function(r){this.F=r},e.setUseProxies=function(r){r&&!em&&Lr(20),this.g=r},e.applyPatches=function(r,n){var i;for(i=n.length-1;i>=0;i--){var o=n[i];if(o.path.length===0&&o.op==="replace"){r=o.value;break}}i>-1&&(n=n.slice(i+1));var a=_n("Patches").$;return Ti(r)?a(r,n):this.produce(r,function(s){return a(s,n)})},t}(),Cr=new ob,Qg=Cr.produce;Cr.produceWithPatches.bind(Cr);Cr.setAutoFreeze.bind(Cr);Cr.setUseProxies.bind(Cr);Cr.applyPatches.bind(Cr);Cr.createDraft.bind(Cr);Cr.finishDraft.bind(Cr);function rm(t){return Yn(t)?Qg(t,()=>{}):t}function ab(t){return typeof t=="function"}function Xg(t,e){const[r,n,i]=sb(e);let o;if(ab(t))o=()=>rm(t());else{const s=rm(t);o=()=>s}function a(s=o(),c){let l=[r[c.type],...n.filter(({matcher:d})=>d(c)).map(({reducer:d})=>d)];return l.filter(d=>!!d).length===0&&(l=[i]),l.reduce((d,h)=>{if(h)if(Ti(d)){const f=h(d,c);return f===void 0?d:f}else{if(Yn(d))return Qg(d,u=>h(u,c));{const u=h(d,c);if(u===void 0){if(d===null)return d;throw Error("A case reducer on a non-draftable value must not return undefined")}return u}}return d},s)}return a.getInitialState=o,a}function sb(t){const e={},r=[];let n;const i={addCase(o,a){const s=typeof o=="string"?o:o.type;if(s in e)throw new Error("addCase cannot be called with two reducers for the same action type");return e[s]=a,i},addMatcher(o,a){return r.push({matcher:o,reducer:a}),i},addDefaultCase(o){return n=o,i}};return t(i),[e,r,n]}const cb=()=>({request:fn("client/request",(e,r)=>{var n,i,o,a;return r!=null||(r={}),(n=r.transaction)!==null&&n!==void 0||(r.transaction=qg()),(i=r.created)!==null&&i!==void 0||(r.created=Date.now()),(o=r.controller)!==null&&o!==void 0||(r.controller=new AbortController),(a=r.task)!==null&&a!==void 0||(r.task=new rg),{payload:e,meta:r}}),retry:fn("client/retry",e=>({payload:e})),success:fn("client/success",(e,r)=>({payload:e,meta:r})),cancel:fn("client/cancel",e=>({payload:e})),failure:fn("client/failure",(e,r)=>({payload:e,meta:r})),error:fn("client/error",(e,r)=>({payload:e,meta:r}))}),tt=cb(),Jg=t=>e=>e.pipe($r(tt.request.match),vo(r=>{const{meta:{controller:n,transaction:i}}=r;return new Be(o=>{if(n.signal.aborted)return o.next(tt.cancel({transaction:i,reason:`request [${i}] was aborted!`})),o.complete();o.add(e.pipe($r(tt.cancel.match)).subscribe(a=>{a.payload.transaction===i&&(n.signal.aborted||n.abort(),o.complete())})),o.add(Ou(n.signal,"abort").subscribe(()=>{o.next(tt.cancel({transaction:i,reason:`request [${i}] was aborted!`})),o.complete()})),o.add(rn(t(r)).subscribe({next:a=>o.next(a),error:a=>o.next(tt.error(a,{request:r})),complete:()=>o.complete()}))})})),lb=t=>(t=Object.assign({},{count:0,delay:0},t),(e,r)=>e.pipe(Jg(n=>e.pipe($r(tt.failure.match),$r(i=>i.meta.request===n),xg(r),Ji(([i,o])=>{var a,s;const{transaction:c}=n.meta,l=o[c];if(!l)return po;const d=(s=(a=l.retry)===null||a===void 0?void 0:a.length)!==null&&s!==void 0?s:0,h=Object.assign({},t,n.meta.retry);if(d>=h.count)throw h.count?Error("maximum retries executed!",{cause:i.payload}):i.payload;return(typeof h.delay=="function"?rn(h.delay(i.payload.cause)).pipe(Wn(f=>{throw Error("failed to resolve delay",{cause:f})})):D7(h.delay)).pipe(Xt(()=>tt.retry(n)))}))))),db=t=>e=>e.pipe(Jg(r=>rn(t(r.payload,r.meta.controller.signal)).pipe(Xt(n=>tt.success(n,{request:r})),Wn(n=>vd(tt.failure(Error(`failed to execute request for transaction ${r.meta.transaction}`,{cause:n}),{request:r})))))),hb=t=>t.pipe($r(tt.retry.match),Xt(e=>e.payload)),Zg=()=>$r(t=>t.status==="complete"),ub=(t={})=>Xg(t,e=>e.addCase(tt.request,(r,n)=>{const{transaction:i,task:o,ref:a,created:s}=n.meta;r[i]={transaction:i,task:o,ref:a,created:s}}).addCase(tt.success,(r,n)=>{const{request:i}=n.meta,{transaction:o,ref:a}=i.meta,s=r[o];if(s){const c={status:"complete",transaction:o,ref:a,value:n.payload,args:i.payload,created:s.created,completed:Date.now()};s.task.next(c),s.task.complete()}delete r[o]}).addCase(tt.retry,(r,n)=>{var i;const{transaction:o}=n.payload.meta,a=r[o];a&&((i=a.retry)!==null&&i!==void 0||(a.retry=[]),a.retry.push(Date.now()))}).addCase(tt.cancel,(r,n)=>{const{transaction:i,reason:o}=n.payload,a=Object.assign({},Kp(r[i]));a&&(a.task.error(new Qu("abort",{request:a,message:"request was canceled",cause:new Error(o)})),delete r[i])}).addCase(tt.failure,(r,n)=>{var i;const{payload:o,meta:a}=n,{transaction:s}=a.request.meta,c=r[s];c&&((i=c.errors)!==null&&i!==void 0||(c.errors=[]),c.errors.push(o))}).addCase(tt.error,(r,n)=>{const{payload:i,meta:o}=n,{transaction:a}=o.request.meta,s=Object.assign({},Kp(r[a]));s&&(console.log(i,i.cause),s.task.error(new Qu("error",{request:s,message:`failed to process task [${a}]`,cause:i})),delete r[a])}));var fb=globalThis&&globalThis.__awaiter||function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(h){a(h)}}function c(d){try{l(n.throw(d))}catch(h){a(h)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})},Ye=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},nm=globalThis&&globalThis.__classPrivateFieldSet||function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},et,qi;class im extends Be{get closed(){return Ye(this,et,"f").closed}get state$(){return Ye(this,et,"f")}get action$(){return Ye(this,et,"f").action$}get success$(){return this.action$.pipe($r(tt.success.match),Xt(({payload:e})=>e))}get error$(){return this.action$.pipe(Gg("client/error"),xg(Ye(this,et,"f")),Xt(([e,r])=>{const{payload:n,meta:i}=e,{transaction:o}=i.request.meta,a=r[e.meta.request.meta.transaction];return new Qu("error",{request:a,message:`failed to process task [${o}]`,cause:n})}))}constructor(e,r){super(o=>Ye(this,et,"f").subscribe(o)),et.set(this,void 0),qi.set(this,void 0);const n={};nm(this,et,new Kg(ub(n)),"f"),nm(this,qi,new Jn(()=>Ye(this,et,"f").complete()),"f"),Ye(this,qi,"f").add(Ye(this,et,"f").addFlow(db(e))),Ye(this,qi,"f").add(Ye(this,et,"f").addFlow(hb));const i=Object.assign({count:0,delay:0},r==null?void 0:r.retry);Ye(this,qi,"f").add(Ye(this,et,"f").addFlow(lb(i)))}next(e,r){const n=tt.request(e,r);return Ye(this,et,"f").next(n),n.meta}nextAsync(e,r){return fb(this,void 0,void 0,function*(){return mo(this.next(e,r).task.pipe(Zg()))})}getTaskByTransaction(e){const r=Ye(this,et,"f").value[e];return r&&r.task}getTaskByRef(e){const r=Object.values(Ye(this,et,"f").value).find(n=>n.ref===e);return r&&r.task}cancel(e,r){if(e&&Ye(this,et,"f").value[e])r!=null||(r=`[${e}]: transaction canceled`),Ye(this,et,"f").next(tt.cancel({transaction:e,reason:r}));else for(const n of Object.keys(Ye(this,et,"f").value))this.cancel(n,`[${e}]: all transactions canceled`)}on(e,r){return Ye(this,et,"f").addEffect(tt[e].type,n=>{r(n,this)})}complete(){Ye(this,qi,"f").unsubscribe()}asObservable(){return Ye(this,et,"f").asObservable()}}et=new WeakMap,qi=new WeakMap;function pb(){return{set:fn("cache/set",(t,e)=>({payload:{key:t,entry:e}})),remove:fn("cache/remove",t=>({payload:t})),invalidate:fn("cache/invalidate",t=>({payload:t})),trim:fn("cache/trim",t=>({payload:t}))}}const ko=pb(),mb=(t,e)=>{var r,n;return((r=e.updated)!==null&&r!==void 0?r:0)-((n=t.updated)!==null&&n!==void 0?n:0)};function vb(t,e={}){return Xg(e,r=>r.addCase(t.set,(n,i)=>{var o;const{key:a,entry:s}=i.payload,c=n[a];c?(c.updated=Date.now(),(o=c.updates)!==null&&o!==void 0||(c.updates=0),c.updates++):n[a]=Object.assign(Object.assign({},s),{created:Date.now()})}).addCase(t.remove,(n,i)=>{delete n[i.payload]}).addCase(t.invalidate,(n,i)=>{const o=n[i.payload];o&&delete o.updated}).addCase(t.trim,(n,i)=>{var o,a;const{payload:s}=i,c=(o=s.sort)!==null&&o!==void 0?o:mb,l=Object.keys(n),d=Object.entries(n).filter(([h,u])=>!s.validate||s.validate(u)).sort((h,u)=>c(h[1],u[1])).slice(0,(a=s.size)!==null&&a!==void 0?a:Number.MAX_SAFE_INTEGER).map(([h])=>h);if(l.length!==d.length)for(const h of l){const u=d.indexOf(h);u!==-1?d.splice(u,1):delete n[h]}}))}var ln=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},gb=globalThis&&globalThis.__classPrivateFieldSet||function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},mr;class om{get state$(){return ln(this,mr,"f").asObservable()}constructor(e){mr.set(this,void 0);const{trimming:r,initial:n}=e;gb(this,mr,new Kg(vb(ko,n)),"f"),r&&ln(this,mr,"f").addEffect("cache/set",()=>ln(this,mr,"f").next(ko.trim(r)))}setItem(...e){ln(this,mr,"f").next(ko.set(...e))}getItem(e){return ln(this,mr,"f").value[e]}removeItem(e){ln(this,mr,"f").next(ko.remove(e))}invalidate(e){ln(this,mr,"f").next(ko.invalidate(e))}trim(e){ln(this,mr,"f").next(ko.trim(e))}reset(){ln(this,mr,"f").reset()}complete(){ln(this,mr,"f").complete()}}mr=new WeakMap;var Me=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},To=globalThis&&globalThis.__classPrivateFieldSet||function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},yb=globalThis&&globalThis.__rest||function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r},Gi,Kr,oi,Ro,Ho,Rl,r2;const _b=(t=0)=>e=>{var r;return((r=e.updated)!==null&&r!==void 0?r:0)+t>Date.now()};class Ir{get client(){return Me(this,Kr,"f")}get cache(){return Me(this,oi,"f")}constructor(e){var r,n;Gi.set(this,new Jn),Kr.set(this,void 0),oi.set(this,void 0),Ro.set(this,new Nn),Ho.set(this,void 0),Rl.set(this,void 0),r2.set(this,qg()),To(this,Ho,o=>K_(e.key(o),Me(this,r2,"f")),"f"),To(this,Rl,(r=e==null?void 0:e.validate)!==null&&r!==void 0?r:_b(e==null?void 0:e.expire),"f"),e.client instanceof im?To(this,Kr,e.client,"f"):(To(this,Kr,new im(e.client.fn,e.client.options),"f"),Me(this,Gi,"f").add(()=>Me(this,Kr,"f").complete())),e.cache instanceof om?To(this,oi,e.cache,"f"):(To(this,oi,new om(e.cache||{}),"f"),Me(this,Gi,"f").add(()=>Me(this,oi,"f").complete()));const i=(n=e.queueOperator)!==null&&n!==void 0?n:H_;Me(this,Gi,"f").add(()=>Me(this,Ro,"f").complete()),Me(this,Gi,"f").add(Me(this,Ro,"f").pipe(i(({args:o,options:a})=>new Be(s=>{const{task:c,transaction:l}=Me(this,Kr,"f").next(o,a);s.add(c.pipe(Wn(()=>po)).subscribe(s)),s.add(()=>{Me(this,Kr,"f").cancel(l)})})),Zg(),wg(()=>!Me(this,Kr,"f").closed)).subscribe(o=>{const{args:a,value:s,transaction:c,ref:l}=o,d=l!=null?l:Me(this,Ho,"f").call(this,a);Me(this,oi,"f").setItem(d,{value:s,args:a,transaction:c})}))}next(e,r){Me(this,Ro,"f").next({args:e,options:r})}query(e,r){var n;const i=Me(this,Ho,"f").call(this,e);return(n=Me(this,Kr,"f").getTaskByRef(i))!==null&&n!==void 0?n:this._createTask(i,e,r)}queryAsync(e,r){const n=r||{},{awaitResolve:i}=n,o=yb(n,["awaitResolve"]);return(i?gd:mo)(this._query(e,o))}complete(){Me(this,Gi,"f").unsubscribe()}_query(e,r){var n;const i=Me(this,Ho,"f").call(this,e);return(n=Me(this,Kr,"f").getTaskByRef(i))!==null&&n!==void 0?n:this._createTask(i,e,r)}_createTask(e,r,n){var i;const o=new rg,a=Me(this,oi,"f").getItem(e);if(a){const{value:l,args:d,created:h,updated:u,updates:f,transaction:v}=a,g={status:"cache",value:l,args:d,created:h,updated:u,updates:f,transaction:v};o.next(g)}const s=((i=n==null?void 0:n.cache)===null||i===void 0?void 0:i.validate)||Me(this,Rl,"f");return a&&s(a,r)?o.complete():Me(this,Ro,"f").next({args:r,options:{ref:e,task:o}}),o.asObservable()}}Gi=new WeakMap,Kr=new WeakMap,oi=new WeakMap,Ro=new WeakMap,Ho=new WeakMap,Rl=new WeakMap,r2=new WeakMap;Ir.extractQueryValue=L_;var ri=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},am=globalThis&&globalThis.__classPrivateFieldSet||function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},hs,Tn;class bb extends Be{get currentContext(){return ri(this,Tn,"f").value}get currentContext$(){return ri(this,Tn,"f").asObservable()}get client(){return ri(this,hs,"f")}constructor(e){super(r=>ri(this,Tn,"f").subscribe(r)),hs.set(this,void 0),Tn.set(this,void 0),am(this,hs,new Ir(e),"f"),am(this,Tn,new o1(void 0),"f")}setCurrentContext(e){typeof e=="string"?this.resolveContext(e).pipe(Wn(()=>po)).subscribe(r=>ri(this,Tn,"f").next(r)):e!==ri(this,Tn,"f").value&&ri(this,Tn,"f").next(e)}resolveContext(e){return ri(this,hs,"f").query({id:e}).pipe(Xt(r=>r.value))}}hs=new WeakMap,Tn=new WeakMap;var Ht=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Qa=globalThis&&globalThis.__classPrivateFieldSet||function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},An,Hl,us,Lo,Ll,fs;class wb{get contextClient(){return Ht(this,An,"f")}get queryClient(){return Ht(this,Hl,"f")}queryContext(e){const r=this.queryClient.query({search:e,filter:{type:Ht(this,Ll,"f")}}).pipe(Xt(n=>n.value));return Ht(this,fs,"f")?r.pipe(Xt(Ht(this,fs,"f"))):r}queryContextAsync(e){return gd(this.queryContext(e))}get currentContext$(){return Ht(this,An,"f").currentContext$}get currentContext(){return Ht(this,An,"f").currentContext}set currentContext(e){Ht(this,us,"f")?Ht(this,us,"f").dispatchEvent("onCurrentContextChange",{source:this,canBubble:!0,cancelable:!0,detail:{context:e}}).then(r=>{r.canceled||Ht(this,An,"f").setCurrentContext(e)}):Ht(this,An,"f").setCurrentContext(e)}constructor(e){An.set(this,void 0),Hl.set(this,void 0),us.set(this,void 0),Lo.set(this,new Jn),Ll.set(this,void 0),fs.set(this,void 0);const{config:r,event:n,parentContext:i}=e;Qa(this,Ll,r.contextType,"f"),Qa(this,fs,r.contextFilter,"f"),Qa(this,An,new bb(r.client.get),"f"),Qa(this,Hl,new Ir(r.client.query),"f"),n&&(Qa(this,us,n,"f"),Ht(this,Lo,"f").add(Ht(this,An,"f").currentContext$.pipe(bg()).subscribe(([o,a])=>{n.dispatchEvent("onCurrentContextChanged",{source:this,canBubble:!0,detail:{previous:o,next:a}})})),Ht(this,Lo,"f").add(n.addEventListener("onCurrentContextChanged",o=>{o.source!==this&&(this.currentContext=o.detail.next)}))),i&&Ht(this,Lo,"f").add(i.contextClient.currentContext$.subscribe(o=>this.currentContext=o))}dispose(){Ht(this,Lo,"f").unsubscribe()}}An=new WeakMap,Hl=new WeakMap,us=new WeakMap,Lo=new WeakMap,Ll=new WeakMap,fs=new WeakMap;var xb=globalThis&&globalThis.__awaiter||function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(h){a(h)}}function c(d){try{l(n.throw(d))}catch(h){a(h)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const Eb="context",Cb={name:Eb,configure:()=>new R_,initialize:t=>xb(void 0,void 0,void 0,function*(){var e;const r=yield t.config.createConfig(t),n=t.hasModule("event")?yield t.requireInstance("event"):void 0,i=(e=t.ref)===null||e===void 0?void 0:e.context;return new wb({config:r,event:n,parentContext:i})}),dispose:t=>{t.instance.dispose()}},zb="modulepreload",Sb=function(t){return"/"+t},sm={},e3=function(e,r,n){if(!r||r.length===0)return e();const i=document.getElementsByTagName("link");return Promise.all(r.map(o=>{if(o=Sb(o),o in sm)return;sm[o]=!0;const a=o.endsWith(".css"),s=a?'[rel="stylesheet"]':"";if(!!n)for(let d=i.length-1;d>=0;d--){const h=i[d];if(h.href===o&&(!a||h.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${o}"]${s}`))return;const l=document.createElement("link");if(l.rel=a?"stylesheet":zb,a||(l.as="script",l.crossOrigin=""),l.href=o,document.head.appendChild(l),a)return new Promise((d,h)=>{l.addEventListener("load",d),l.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${o}`)))})})).then(()=>e())},kb=(t,e)=>JSON.stringify(t)===JSON.stringify(e);var Lt=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},sl=globalThis&&globalThis.__classPrivateFieldSet||function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Oo,ps,ms,Do,ai;class Tb extends Be{get current(){return Lt(this,Do,"f").value}get current$(){return Lt(this,Do,"f").pipe(yg(kb))}constructor(e){super(i=>this.current$.subscribe(i)),Oo.set(this,void 0),ps.set(this,void 0),ms.set(this,void 0),Do.set(this,void 0),ai.set(this,new Jn);const{event:r,config:n}=e;sl(this,Do,new o1(void 0),"f"),sl(this,Oo,new Ir(n.getApp),"f"),sl(this,ps,new Ir(n.getApps),"f"),sl(this,ms,new Ir(n.getConfig),"f"),Lt(this,ai,"f").add(Lt(this,Oo,"f").complete),Lt(this,ai,"f").add(Lt(this,ps,"f").complete),Lt(this,ai,"f").add(Lt(this,ms,"f").complete),Lt(this,ai,"f").add(this.current$.pipe(bg(),wg(()=>!!r)).subscribe(([i,o])=>{r==null||r.dispatchEvent("onCurrentAppChanged",{source:this,detail:{previous:i,next:o}})}))}getApp(e){return Ir.extractQueryValue(Lt(this,Oo,"f").query({appKey:e}).pipe(Wn(r=>{throw Error("failed to load manifest",{cause:r})})))}getAllApps(){return Ir.extractQueryValue(Lt(this,ps,"f").query())}getAppConfig(e,r){return Ir.extractQueryValue(Lt(this,ms,"f").query({appKey:e,tag:r}).pipe(Wn(n=>{throw Error("failed to load config",{cause:n})})))}setCurrentApp(e){return new Promise((r,n)=>{const i=Lt(this,Oo,"f").query({appKey:e});Lt(this,ai,"f").add(Ir.extractQueryValue(i).subscribe({next:o=>Lt(this,Do,"f").next(o),error:n,complete:r}))})}loadApp(e){const r=this.getApp(e).pipe(Ji(i=>mo(rn(e3(()=>import(i.entry),[])).pipe(Xt(o=>({manifest:i,module:o})))))),n=this.getAppConfig(e).pipe(Xt(i=>({config:i})));return N7(r,n).pipe(A0((i,o)=>Object.assign({},i,o),{}),$r(i=>["manifest","module","config"].every(o=>!!i[o])),_g(()=>"failed to load application"))}dispose(){Lt(this,ai,"f").unsubscribe()}}Oo=new WeakMap,ps=new WeakMap,ms=new WeakMap,Do=new WeakMap,ai=new WeakMap;var Ab=globalThis&&globalThis.__awaiter||function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(h){a(h)}}function c(d){try{l(n.throw(d))}catch(h){a(h)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const n2="app",Ib={name:n2,configure:()=>new Mb,initialize:t=>Ab(void 0,void 0,void 0,function*(){const e=yield t.config.createConfig(t),r=yield t.requireInstance("event").catch(()=>{});return new Tb({config:e,event:r})}),dispose:t=>{t.instance.dispose()}};var cm=globalThis&&globalThis.__awaiter||function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(h){a(h)}}function c(d){try{l(n.throw(d))}catch(h){a(h)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};class Mb{constructor(){this.defaultExpireTime=1*60*1e3}_createHttpClient(e){return cm(this,void 0,void 0,function*(){const r=yield e.requireInstance("http");if(r.hasClient(n2))return r.createClient(n2);{const n=yield e.requireInstance("serviceDiscovery");try{return yield n.createClient("app")}catch{return yield n.createClient("portal")}}})}createConfig(e){return cm(this,void 0,void 0,function*(){const r=yield this._createHttpClient(e),n={getApp:{client:{fn:({appKey:i})=>r.json$(`/api/apps/${i}`)},key:({appKey:i})=>i},getApps:{client:{fn:()=>r.json$("/api/apps")},key:()=>"apps"},getConfig:{client:{fn:({appKey:i,tag:o})=>r.json$(`/api/apps/${i}/config${o?`?tag=${o}`:""}`)},key:i=>JSON.stringify(i)}};return this.processConfig(n)})}processConfig(e){return e}}var lm=globalThis&&globalThis.__awaiter||function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(h){a(h)}}function c(d){try{l(n.throw(d))}catch(h){a(h)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};class Pb{constructor(e){this.clientKey=e.clientKey,this.endpoint=e.endpoint,this.clientCtor=e.clientCtor}createHttpClientClient(e){return lm(this,void 0,void 0,function*(){if(!this.clientKey)throw Error("no http client for service discovery is provided!");return e.createClient(this.clientKey)})}createClient(e){return lm(this,void 0,void 0,function*(){if(!this.endpoint)throw Error("no endpoint defined!");return new this.clientCtor({http:e,endpoint:this.endpoint})})}}var uh=globalThis&&globalThis.__awaiter||function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(h){a(h)}}function c(d){try{l(n.throw(d))}catch(h){a(h)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};class Rb{constructor(e,r){this._client=e,this._http=r}get environment(){return this._client.environment}resolveService(e){return uh(this,void 0,void 0,function*(){return this._client.resolveService(e)})}createClient(e,r){return uh(this,void 0,void 0,function*(){const n=yield this.resolveService(e);if(!n)throw Error(`Could not load configuration of service [${e}]`);return this._http.createClient(Object.assign(Object.assign({},r),{baseUri:n.uri,defaultScopes:n.defaultScopes}))})}configureClient(e,r){return uh(this,void 0,void 0,function*(){const{key:n,alias:i}=typeof e=="string"?{key:e,alias:e}:e,{uri:o,defaultScopes:a}=yield this.resolveService(n);r.addConfig(zg(i,{baseUri:o,defaultScopes:a}))})}}var dm=globalThis&&globalThis.__awaiter||function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(h){a(h)}}function c(d){try{l(n.throw(d))}catch(h){a(h)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})},Hb=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Lb=globalThis&&globalThis.__classPrivateFieldSet||function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Ol;class Ob{get environment(){return mo(Ir.extractQueryValue(Hb(this,Ol,"f").query(void 0,{cache:{suppressInvalid:!0}})))}constructor({http:e,endpoint:r}){Ol.set(this,void 0),this.http=e,this.endpoint=r,Lb(this,Ol,new Ir({client:{fn:()=>e.fetch$(r,{selector:this.selector.bind(this)}).pipe(Du(n=>console.log("\u{1F525}",n)))},key:()=>"services",expire:5*60*1e3}),"f")}selector(e){return dm(this,void 0,void 0,function*(){const r=yield e.json(),n=r.services.reduce((i,o)=>Object.assign(i,{[o.key]:{clientId:r.clientId,uri:o.uri,defaultScopes:[r.clientId+"/.default"]}}),{});return Object.assign(Object.assign({},r),{services:n})})}resolveService(e){return dm(this,void 0,void 0,function*(){try{const{services:r}=yield this.environment;return r[e]}catch(r){throw console.error(r),r}})}}Ol=new WeakMap;const Db="serviceDiscovery";var Nb=globalThis&&globalThis.__awaiter||function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(h){a(h)}}function c(d){try{l(n.throw(d))}catch(h){a(h)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const Vb={name:Db,configure:()=>new Pb({clientCtor:Ob,clientKey:"service_discovery",endpoint:"/_discovery/environments/current"}),initialize:({config:t,requireInstance:e})=>Nb(void 0,void 0,void 0,function*(){const r=yield e("http"),n=yield t.createHttpClientClient(r),i=yield t.createClient(n);return new Rb(i,r)})};class Ub{}class t3 extends Error{constructor(e,r){super(`unsupported version ${e}`,{cause:r}),this.version=e}}const Fb=(t,e)=>{var r;const n=(r=$n[t])!==null&&r!==void 0?r:t;switch(n){case $n.v2:throw new t3(t);case $n.v1:default:{const{id:i}=e,o=new URLSearchParams;return o.append("api-version",n),`/contexts/${i}/?${String(o)}`}}},$b=(t,e,r)=>[Fb(t,e),r],jb=(t,e,r="json")=>(n,i)=>t[r](...$b(e,n,i));var Bb=["eq","ne","gt","ge","lt","le"],cl=["and","or","not"],qb=["any","all"],Gb=["startswith","endswith","contains"],Kb=["expand","levels","select","skip","top","count","orderby","filter"],hm=/\((.*)\)/,um=/(?!indexof)\((\w+)\)/,fm;(function(t){t.sum="sum",t.min="min",t.max="max",t.average="average",t.countdistinct="countdistinct"})(fm||(fm={}));var Sn="";function Wb(t){var e=t===void 0?{}:t,r=e.select,n=e.search,i=e.skiptoken,o=e.format,a=e.top,s=e.skip,c=e.filter,l=e.transform,d=e.orderBy,h=e.key,u=e.count,f=e.expand,v=e.action,g=e.func,x="",m=[],p={};if(h!=null&&(x+="(".concat(vn(h,m),")")),(c||typeof u=="object")&&(p.$filter=sc(typeof u=="object"?u:c,m)),l&&(p.$apply=r3(l)),f&&(p.$expand=Dl(f)),d&&(p.$orderby=$0(d)),u&&(typeof u=="boolean"?p.$count=!0:x+="/$count"),typeof a=="number"&&(p.$top=a),typeof s=="number"&&(p.$skip=s),v&&(x+="/".concat(v)),g){if(typeof g=="string")x+="/".concat(g);else if(typeof g=="object"){var y=Object.keys(g)[0],w=vn(g[y],m);x+="/".concat(y),w!==""&&(x+="(".concat(w,")"))}}return m.length>0&&Object.assign(p,m.reduce(function(T,L){var V;return Object.assign(T,(V={},V["@".concat(L.name)]=vn(L.value),V))},{})),Zb(x,it({$select:r,$search:n,$skiptoken:i,$format:o},p))}function fh(t,e,r){return r===void 0&&(r=[]),"".concat(t," eq ").concat(vn(e,r))}function sc(t,e,r){return t===void 0&&(t={}),e===void 0&&(e=[]),r===void 0&&(r=""),(Array.isArray(t)?t:[t]).reduce(function(o,a){if(a){var s=n(a,e,r);s&&o.push(s)}return o},[]).join(" and ");function n(o,a,s){o===void 0&&(o={}),a===void 0&&(a=[]),s===void 0&&(s="");var c="";if(typeof o=="string")c=o;else if(o&&typeof o=="object"){var l=Object.keys(o).reduce(function(d,h){var u=o[h];if(u===void 0)return d;var f="";if(s?h===Sn?f=s:um.test(h)?f=h.replace(um,function(p,y){return y.trim()===Sn?"(".concat(s,")"):"(".concat(s,"/").concat(y.trim(),")")}):hm.test(h)?f=h.replace(hm,function(p,y){return y.trim()===Sn?"(".concat(s,")"):"(".concat(s,"/").concat(y.trim(),")")}):f="".concat(s,"/").concat(h):f=h,h===Sn&&Array.isArray(u))return d.concat(u.map(function(p){return fh(f,p)}));if(["number","string","boolean"].indexOf(typeof u)!==-1||u instanceof Date||u===null)d.push(fh(f,u,a));else if(Array.isArray(u)){var v=h,g=u.map(function(p){return sc(p,a,s)}).filter(function(p){return p}).map(function(p){return cl.indexOf(v)!==-1?"(".concat(p,")"):p});g.length&&(cl.indexOf(v)!==-1?g.length&&(v==="not"?d.push(pm(g)):d.push("(".concat(g.join(" ".concat(v," ")),")"))):d.push(g.join(" ".concat(v," "))))}else if(cl.indexOf(f)!==-1){var x=f,g=Object.keys(u).map(function(y){var w;return n((w={},w[y]=u[y],w))});g.length&&(x==="not"?d.push(pm(g)):d.push("(".concat(g.join(" ".concat(x," ")),")")))}else if(typeof u=="object")if("type"in u)d.push(fh(f,u,a));else{var m=Object.keys(u);m.forEach(function(p){if(u[p]!==void 0)if(Bb.indexOf(p)!==-1)d.push("".concat(f," ").concat(p," ").concat(vn(u[p],a)));else if(cl.indexOf(p)!==-1)Array.isArray(u[p])?d.push(u[p].map(function(L){return"("+n(L,a,f)+")"}).join(" ".concat(p," "))):d.push("("+n(u[p],a,f)+")");else if(qb.indexOf(p)!==-1){var y=i(h.toLowerCase(),u[p],p,f);y&&d.push(y)}else if(p==="has")d.push("".concat(f," ").concat(p," ").concat(vn(u[p],a)));else if(p==="in"){var w=Array.isArray(u[p])?u[p]:u[p].value.map(function(L){return{type:u[p].type,value:L}});d.push(f+" in ("+w.map(function(L){return vn(L,a)}).join(",")+")")}else if(Gb.indexOf(p)!==-1)d.push("".concat(p,"(").concat(f,",").concat(vn(u[p],a),")"));else{var T=n(u,a,f);T&&d.push(T)}})}else throw new Error("Unexpected value type: ".concat(u));return d},[]);c=l.join(" and ")}return c}function i(o,a,s,c){var l="";if(typeof a=="string"||a instanceof String)l=Yb(o,a,s,c);else if(a){var d=Array.isArray(a)?a.reduce(function(u,f){return f.hasOwnProperty(Sn)?(u.hasOwnProperty(Sn)||(u[Sn]=[]),u[Sn].push(f[Sn]),u):it(it({},u),f)},{}):a,h=n(d,e,o);l="".concat(c,"/").concat(s,"(").concat(h?"".concat(o,":").concat(h):"",")")}return l}}function Yb(t,e,r,n){var i="",o=r=="all"?"ne":"eq";return i="".concat(n,"/").concat(r,"(").concat(t,": ").concat(t," ").concat(o," '").concat(e,"')"),i}function Qb(t){return t=t.replace(/%/g,"%25"),t=t.replace(/\+/g,"%2B"),t=t.replace(/\//g,"%2F"),t=t.replace(/\?/g,"%3F"),t=t.replace(/#/g,"%23"),t=t.replace(/&/g,"%26"),t=t.replace(/'/g,"''"),t}function vn(t,e){if(typeof t=="string")return"'".concat(Qb(t),"'");if(t instanceof Date)return t.toISOString();if(typeof t=="number")return t;if(Array.isArray(t))return"[".concat(t.map(function(r){return vn(r)}).join(","),"]");if(t===null)return t;if(typeof t=="object")switch(t.type){case"raw":case"guid":return t.value;case"duration":return"duration'".concat(t.value,"'");case"binary":return"binary'".concat(t.value,"'");case"alias":return Array.isArray(e)&&e.push(t),"@".concat(t.name);case"json":return escape(JSON.stringify(t.value));case"decimal":return"".concat(t.value,"M");default:return Object.entries(t).filter(function(r){var n=r[1];return n!==void 0}).map(function(r){var n=r[0],i=r[1];return"".concat(n,"=").concat(vn(i,e))}).join(",")}return t}function Dl(t){if(typeof t=="number")return t;if(typeof t=="string")return t.indexOf("/")===-1?t:t.split("/").reverse().reduce(function(r,n,i,o){return i===0?"$expand=".concat(n):i===o.length-1?"".concat(n,"(").concat(r,")"):"$expand=".concat(n,"(").concat(r,")")},"");if(Array.isArray(t))return"".concat(t.map(function(r){return Dl(r)}).join(","));if(typeof t=="object"){var e=Object.keys(t);return e.some(function(r){return Kb.indexOf(r.toLowerCase())!==-1})?e.map(function(r){var n;switch(r){case"filter":n=sc(t[r]);break;case"orderBy":n=$0(t[r]);break;case"levels":case"count":case"skip":case"top":n="".concat(t[r]);break;default:n=Dl(t[r])}return"$".concat(r.toLowerCase(),"=").concat(n)}).join(";"):e.map(function(r){var n=Dl(t[r]);return n?"".concat(r,"(").concat(n,")"):r}).join(",")}return""}function r3(t){var e=Array.isArray(t)?t:[t],r=e.reduce(function(n,i){var o=i.aggregate,a=i.filter,s=i.groupBy,c=X5(i,["aggregate","filter","groupBy"]),l=Object.keys(c);if(l.length)throw new Error("Unsupported transform(s): ".concat(l));if(o&&n.push("aggregate(".concat(Xb(o),")")),a){var d=sc(a);d&&n.push("filter(".concat(sc(d),")"))}return s&&n.push("groupby(".concat(Jb(s),")")),n},[]);return r.join("/")||void 0}function Xb(t){var e=Array.isArray(t)?t:[t];return e.map(function(r){return typeof r=="string"?r:Object.keys(r).map(function(n){var i=r[n];if(!i.with)throw new Error("'with' property required for '".concat(n,"'"));if(!i.as)throw new Error("'as' property required for '".concat(n,"'"));return"".concat(n," with ").concat(i.with," as ").concat(i.as)})}).join(",")}function Jb(t){if(!t.properties)throw new Error("'properties' property required for groupBy");var e="(".concat(t.properties.join(","),")");return t.transform&&(e+=",".concat(r3(t.transform))),e}function $0(t,e){return e===void 0&&(e=""),Array.isArray(t)?t.map(function(r){return Array.isArray(r)&&r.length===2&&["asc","desc"].indexOf(r[1])!==-1?r.join(" "):r}).map(function(r){return"".concat(e).concat(String(r))}).join(","):typeof t=="object"?Object.entries(t).map(function(r){var n=r[0],i=r[1];return $0(i,"".concat(n,"/"))}).map(function(r){return"".concat(e).concat(r)}).join(","):"".concat(e).concat(String(t))}function Zb(t,e){var r=Object.getOwnPropertyNames(e).filter(function(n){return e[n]!==void 0&&e[n]!==""}).map(function(n){return"".concat(n,"=").concat(e[n])});return r.length?"".concat(t,"?").concat(r.join("&")):t}function pm(t){return"not(".concat(t.join(" and "),")")}const ew=t=>Object.keys(t).reduce((e,r)=>{var n;switch(r){case"type":return!((n=t[r])===null||n===void 0)&&n.length?Object.assign(Object.assign({},e),{[r]:{in:t[r]}}):e;default:return Object.assign(Object.assign({},e),{[r]:t[r]})}},{}),tw=t=>Object.keys(t).reduce((e,r)=>{switch(r){case"filter":return Object.assign(Object.assign({},e),{[r]:ew(t.filter)});default:return Object.assign(Object.assign({},e),{[r]:t[r]})}},{}),rw=t=>typeof t=="string"?t:Wb(tw(t)),nw=(t,e)=>{var r;const n=(r=$n[t])!==null&&r!==void 0?r:t;switch(n){case $n.v2:throw new t3(t);case $n.v1:default:{const{query:i,includeDeleted:o}=e,a=new URLSearchParams(rw(i));return a.append("api-version",n),o&&a.append("includeDeleted","true"),`/contexts/?${String(a)}`}}},iw=(t,e,r)=>[nw(t,e),r],ow=(t,e,r="json")=>(n,i)=>t[r](...iw(e,n,i));class aw{get Version(){return $n}constructor(e,r){this._client=e,this._method=r}get(e,...r){return jb(this._client,e,this._method)(...r)}query(e,...r){return ow(this._client,e,this._method)(...r)}}var $n;(function(t){t.v1="1.0",t.v2="2.0"})($n||($n={}));const sw=(t,e)=>{switch(t){case"v1":{const{id:r}=e,n=new URLSearchParams;return n.append("api-version","1.0"),`/bookmarks/${r}/?${String(n)}`}default:{const{id:r}=e,n=new URLSearchParams;return n.append("api-version",t),`/bookmarks/${r}/?${String(n)}`}}},cw=(t,e,r)=>{const n=sw(t,e),i=Object.assign({},{method:"Delete"},r);return[n,i]},lw=(t,e,r="json")=>(n,i)=>t[r](...cw(e,n,i)),dw=lw,hw=(t,e)=>{switch(t){case"v1":{const{id:r}=e,n=new URLSearchParams;return n.append("api-version","1.0"),`/bookmarks/${r}/?${String(n)}`}default:{const{id:r}=e,n=new URLSearchParams;return n.append("api-version",t),`/bookmarks/${r}/?${String(n)}`}}},uw=(t,e,r)=>[hw(t,e),r],fw=(t,e,r="json")=>(n,i)=>t[r](...uw(e,n,i)),pw=fw,mw=(t,e)=>{switch(t){case"v1":{const r=new URLSearchParams;return r.append("api-version","1.0"),`/bookmarks?${String(r)}`}default:{const r=new URLSearchParams;return r.append("api-version",t),`/bookmarks?${String(r)}`}}},vw=(t,e,r)=>{const n=mw(t),i=new Headers;i.append("content-type","application/json");const o=Object.assign({},{method:"post",body:JSON.stringify(e),headers:i},r);return[n,o]},gw=(t,e,r="json")=>(n,i)=>t[r](...vw(e,n,i)),yw=gw;class _w{constructor(e,r){this._client=e,this._method=r}get(e,...r){return pw(this._client,e,this._method)(...r)}post(e,...r){return yw(this._client,e,this._method)(...r)}delete(e,...r){return dw(this._client,e,this._method)(...r)}}const bw=_w;var mm=globalThis&&globalThis.__awaiter||function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(h){a(h)}}function c(d){try{l(n.throw(d))}catch(h){a(h)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};class ww{constructor({createClient:e}){this._createClientFn=e}createBookmarksClient(e){return mm(this,void 0,void 0,function*(){const r=yield this._createClientFn("bookmarks");return new bw(r,e)})}createContextClient(e){return mm(this,void 0,void 0,function*(){const r=yield this._createClientFn("context");return new aw(r,e)})}}var n3=globalThis&&globalThis.__awaiter||function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(h){a(h)}}function c(d){try{l(n.throw(d))}catch(h){a(h)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const xw="services",Ew=(t,e)=>r=>n3(void 0,void 0,void 0,function*(){if(t.hasClient(r))return t.createClient(r);if(e)return e.createClient(r);throw Error(`failed to create http client for service ${r}`)}),Cw={name:xw,configure:()=>new Ub,initialize:({ref:t,config:e,requireInstance:r,hasModule:n})=>n3(void 0,void 0,void 0,function*(){if(!e.createClient){const i=yield r("http"),o=n("serviceDiscovery")?yield r("serviceDiscovery"):t==null?void 0:t.serviceDiscovery;e.createClient=Ew(i,o)}if(!e.createClient)throw Error("missing configuration for creating API client");return new ww(e)})},zw=Cw;class Sw extends W7{constructor(){super([ty,Ug,I0,Vb,zw,Ib,Cb]),this.logger=new Q5("FrameworkConfigurator")}configureHttp(...e){this.addConfig(fy(...e))}configureHttpClient(...e){this.addConfig(zg(...e))}configureMsal(...e){this.addConfig(S_(...e))}configureServiceDiscovery(e){this.configureHttpClient("service_discovery",e.client)}}var kw=globalThis&&globalThis.__awaiter||function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(h){a(h)}}function c(d){try{l(n.throw(d))}catch(h){a(h)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const Tw=(t,e)=>kw(void 0,void 0,void 0,function*(){const r=yield t.initialize(e),n={modules:r};return window.Fusion=n,r.event.dispatchEvent("onFrameworkLoaded",{detail:n}),n});var c1={exports:{}},l1={};/**
61
+ ***************************************************************************** */var Uu=function(t,e){return Uu=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},Uu(t,e)};function ur(t,e){Uu(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var Te=function(){return Te=Object.assign||function(e){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},Te.apply(this,arguments)};function J(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(h){a(h)}}function c(d){try{l(n.throw(d))}catch(h){a(h)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})}function Z(t,e){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(l){return function(d){return c([l,d])}}function c(l){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return r.label++,{value:l[1],done:!1};case 5:r.label++,i=l[1],l=[0];continue;case 7:l=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){r=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){r.label=l[1];break}if(l[0]===6&&r.label<o[1]){r.label=o[1],o=l;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(l);break}o[2]&&r.ops.pop(),r.trys.pop();continue}l=e.call(t,r)}catch(d){l=[6,d],i=0}finally{n=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}function s1(){for(var t=0,e=0,r=arguments.length;e<r;e++)t+=arguments[e].length;for(var n=Array(t),i=0,e=0;e<r;e++)for(var o=arguments[e],a=0,s=o.length;a<s;a++,i++)n[i]=o[a];return n}/*! @azure/msal-common v8.0.0 2022-11-07 */var b={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=",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:"",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},_c=[b.OPENID_SCOPE,b.PROFILE_SCOPE,b.OFFLINE_ACCESS_SCOPE],Tp=s1(_c,[b.EMAIL_SCOPE]),nn;(function(t){t.CONTENT_TYPE="Content-Type",t.RETRY_AFTER="Retry-After",t.CCS_HEADER="X-AnchorMailbox",t.WWWAuthenticate="WWW-Authenticate",t.AuthenticationInfo="Authentication-Info",t.X_MS_REQUEST_ID="x-ms-request-id"})(nn||(nn={}));var ot;(function(t){t.ID_TOKEN="idtoken",t.CLIENT_INFO="client.info",t.ADAL_ID_TOKEN="adal.idtoken",t.ERROR="error",t.ERROR_DESC="error.description",t.ACTIVE_ACCOUNT="active-account",t.ACTIVE_ACCOUNT_FILTERS="active-account-filters"})(ot||(ot={}));var yd;(function(t){t.COMMON="common",t.ORGANIZATIONS="organizations",t.CONSUMERS="consumers"})(yd||(yd={}));var re;(function(t){t.CLIENT_ID="client_id",t.REDIRECT_URI="redirect_uri",t.RESPONSE_TYPE="response_type",t.RESPONSE_MODE="response_mode",t.GRANT_TYPE="grant_type",t.CLAIMS="claims",t.SCOPE="scope",t.ERROR="error",t.ERROR_DESCRIPTION="error_description",t.ACCESS_TOKEN="access_token",t.ID_TOKEN="id_token",t.REFRESH_TOKEN="refresh_token",t.EXPIRES_IN="expires_in",t.STATE="state",t.NONCE="nonce",t.PROMPT="prompt",t.SESSION_STATE="session_state",t.CLIENT_INFO="client_info",t.CODE="code",t.CODE_CHALLENGE="code_challenge",t.CODE_CHALLENGE_METHOD="code_challenge_method",t.CODE_VERIFIER="code_verifier",t.CLIENT_REQUEST_ID="client-request-id",t.X_CLIENT_SKU="x-client-SKU",t.X_CLIENT_VER="x-client-VER",t.X_CLIENT_OS="x-client-OS",t.X_CLIENT_CPU="x-client-CPU",t.X_CLIENT_CURR_TELEM="x-client-current-telemetry",t.X_CLIENT_LAST_TELEM="x-client-last-telemetry",t.X_MS_LIB_CAPABILITY="x-ms-lib-capability",t.X_APP_NAME="x-app-name",t.X_APP_VER="x-app-ver",t.POST_LOGOUT_URI="post_logout_redirect_uri",t.ID_TOKEN_HINT="id_token_hint",t.DEVICE_CODE="device_code",t.CLIENT_SECRET="client_secret",t.CLIENT_ASSERTION="client_assertion",t.CLIENT_ASSERTION_TYPE="client_assertion_type",t.TOKEN_TYPE="token_type",t.REQ_CNF="req_cnf",t.OBO_ASSERTION="assertion",t.REQUESTED_TOKEN_USE="requested_token_use",t.ON_BEHALF_OF="on_behalf_of",t.FOCI="foci",t.CCS_HEADER="X-AnchorMailbox",t.RETURN_SPA_CODE="return_spa_code",t.NATIVE_BROKER="nativebroker",t.LOGOUT_HINT="logout_hint"})(re||(re={}));var Xo;(function(t){t.ACCESS_TOKEN="access_token",t.XMS_CC="xms_cc"})(Xo||(Xo={}));var Nt={LOGIN:"login",SELECT_ACCOUNT:"select_account",CONSENT:"consent",NONE:"none",CREATE:"create",NO_SESSION:"no_session"},Is;(function(t){t.ACCOUNT="account",t.SID="sid",t.LOGIN_HINT="login_hint",t.ID_TOKEN="id_token",t.DOMAIN_HINT="domain_hint",t.ORGANIZATIONS="organizations",t.CONSUMERS="consumers",t.ACCOUNT_ID="accountIdentifier",t.HOMEACCOUNT_ID="homeAccountIdentifier"})(Is||(Is={}));var Ap={PLAIN:"plain",S256:"S256"},_d;(function(t){t.QUERY="query",t.FRAGMENT="fragment",t.FORM_POST="form_post"})(_d||(_d={}));var bd;(function(t){t.IMPLICIT_GRANT="implicit",t.AUTHORIZATION_CODE_GRANT="authorization_code",t.CLIENT_CREDENTIALS_GRANT="client_credentials",t.RESOURCE_OWNER_PASSWORD_GRANT="password",t.REFRESH_TOKEN_GRANT="refresh_token",t.DEVICE_CODE_GRANT="device_code",t.JWT_BEARER="urn:ietf:params:oauth:grant-type:jwt-bearer"})(bd||(bd={}));var Mn;(function(t){t.MSSTS_ACCOUNT_TYPE="MSSTS",t.ADFS_ACCOUNT_TYPE="ADFS",t.MSAV1_ACCOUNT_TYPE="MSA",t.GENERIC_ACCOUNT_TYPE="Generic"})(Mn||(Mn={}));var xr;(function(t){t.CACHE_KEY_SEPARATOR="-",t.CLIENT_INFO_SEPARATOR="."})(xr||(xr={}));var ce;(function(t){t.ID_TOKEN="IdToken",t.ACCESS_TOKEN="AccessToken",t.ACCESS_TOKEN_WITH_AUTH_SCHEME="AccessToken_With_AuthScheme",t.REFRESH_TOKEN="RefreshToken"})(ce||(ce={}));var no;(function(t){t.ACCOUNT="Account",t.CREDENTIAL="Credential",t.ID_TOKEN="IdToken",t.ACCESS_TOKEN="AccessToken",t.REFRESH_TOKEN="RefreshToken",t.APP_METADATA="AppMetadata",t.TEMPORARY="TempCache",t.TELEMETRY="Telemetry",t.UNDEFINED="Undefined",t.THROTTLING="Throttling"})(no||(no={}));var Ln;(function(t){t[t.ADFS=1001]="ADFS",t[t.MSA=1002]="MSA",t[t.MSSTS=1003]="MSSTS",t[t.GENERIC=1004]="GENERIC",t[t.ACCESS_TOKEN=2001]="ACCESS_TOKEN",t[t.REFRESH_TOKEN=2002]="REFRESH_TOKEN",t[t.ID_TOKEN=2003]="ID_TOKEN",t[t.APP_METADATA=3001]="APP_METADATA",t[t.UNDEFINED=9999]="UNDEFINED"})(Ln||(Ln={}));var Fu="appmetadata",vy="client_info",wd="1",Ms={CACHE_KEY:"authority-metadata",REFRESH_TIME_SECONDS:3600*24},Ar;(function(t){t.CONFIG="config",t.CACHE="cache",t.NETWORK="network",t.HARDCODED_VALUES="hardcoded_values"})(Ar||(Ar={}));var pt={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"},be;(function(t){t.BEARER="Bearer",t.POP="pop",t.SSH="ssh-cert"})(be||(be={}));var Ps={DEFAULT_THROTTLE_TIME_SECONDS:60,DEFAULT_MAX_THROTTLE_TIME_SECONDS:3600,THROTTLING_PREFIX:"throttling",X_MS_LIB_CAPABILITY_VALUE:"retry-after, h429"},Ip={INVALID_GRANT_ERROR:"invalid_grant",CLIENT_MISMATCH_ERROR:"client_mismatch"},xd;(function(t){t.username="username",t.password="password"})(xd||(xd={}));var Jo;(function(t){t[t.httpSuccess=200]="httpSuccess",t[t.httpBadRequest=400]="httpBadRequest"})(Jo||(Jo={}));var di;(function(t){t.FAILED_AUTO_DETECTION="1",t.INTERNAL_CACHE="2",t.ENVIRONMENT_VARIABLE="3",t.IMDS="4"})(di||(di={}));var Ki;(function(t){t.CONFIGURED_MATCHES_DETECTED="1",t.CONFIGURED_NO_AUTO_DETECTION="2",t.CONFIGURED_NOT_DETECTED="3",t.AUTO_DETECTION_REQUESTED_SUCCESSFUL="4",t.AUTO_DETECTION_REQUESTED_FAILED="5"})(Ki||(Ki={}));var Zi;(function(t){t.NO_CACHE_HIT="0",t.FORCE_REFRESH="1",t.NO_CACHED_ACCESS_TOKEN="2",t.CACHED_ACCESS_TOKEN_EXPIRED="3",t.REFRESH_CACHED_ACCESS_TOKEN="4"})(Zi||(Zi={}));var $u;(function(t){t.Jwt="JWT",t.Jwk="JWK"})($u||($u={}));/*! @azure/msal-common v8.0.0 2022-11-07 */var nl={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."}},Y=function(t){ur(e,t);function e(r,n,i){var o=this,a=n?r+": "+n:r;return o=t.call(this,a)||this,Object.setPrototypeOf(o,e.prototype),o.errorCode=r||b.EMPTY_STRING,o.errorMessage=n||b.EMPTY_STRING,o.subError=i||b.EMPTY_STRING,o.name="AuthError",o}return e.prototype.setCorrelationId=function(r){this.correlationId=r},e.createUnexpectedError=function(r){return new e(nl.unexpectedError.code,nl.unexpectedError.desc+": "+r)},e.createPostRequestFailed=function(r){return new e(nl.postRequestFailed.code,nl.postRequestFailed.desc+": "+r)},e}(Error);/*! @azure/msal-common v8.0.0 2022-11-07 */var Ed={createNewGuid:function(){var t="Crypto interface - createNewGuid() has not been implemented";throw Y.createUnexpectedError(t)},base64Decode:function(){var t="Crypto interface - base64Decode() has not been implemented";throw Y.createUnexpectedError(t)},base64Encode:function(){var t="Crypto interface - base64Encode() has not been implemented";throw Y.createUnexpectedError(t)},generatePkceCodes:function(){return J(this,void 0,void 0,function(){var t;return Z(this,function(e){throw t="Crypto interface - generatePkceCodes() has not been implemented",Y.createUnexpectedError(t)})})},getPublicKeyThumbprint:function(){return J(this,void 0,void 0,function(){var t;return Z(this,function(e){throw t="Crypto interface - getPublicKeyThumbprint() has not been implemented",Y.createUnexpectedError(t)})})},removeTokenBindingKey:function(){return J(this,void 0,void 0,function(){var t;return Z(this,function(e){throw t="Crypto interface - removeTokenBindingKey() has not been implemented",Y.createUnexpectedError(t)})})},clearKeystore:function(){return J(this,void 0,void 0,function(){var t;return Z(this,function(e){throw t="Crypto interface - clearKeystore() has not been implemented",Y.createUnexpectedError(t)})})},signJwt:function(){return J(this,void 0,void 0,function(){var t;return Z(this,function(e){throw t="Crypto interface - signJwt() has not been implemented",Y.createUnexpectedError(t)})})},hashString:function(){return J(this,void 0,void 0,function(){var t;return Z(this,function(e){throw t="Crypto interface - hashString() has not been implemented",Y.createUnexpectedError(t)})})}};/*! @azure/msal-common v8.0.0 2022-11-07 */var M={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."}},j=function(t){ur(e,t);function e(r,n){var i=t.call(this,r,n)||this;return i.name="ClientAuthError",Object.setPrototypeOf(i,e.prototype),i}return e.createClientInfoDecodingError=function(r){return new e(M.clientInfoDecodingError.code,M.clientInfoDecodingError.desc+" Failed with error: "+r)},e.createClientInfoEmptyError=function(){return new e(M.clientInfoEmptyError.code,""+M.clientInfoEmptyError.desc)},e.createTokenParsingError=function(r){return new e(M.tokenParsingError.code,M.tokenParsingError.desc+" Failed with error: "+r)},e.createTokenNullOrEmptyError=function(r){return new e(M.nullOrEmptyToken.code,M.nullOrEmptyToken.desc+" Raw Token Value: "+r)},e.createEndpointDiscoveryIncompleteError=function(r){return new e(M.endpointResolutionError.code,M.endpointResolutionError.desc+" Detail: "+r)},e.createNetworkError=function(r,n){return new e(M.networkError.code,M.networkError.desc+" | Fetch client threw: "+n+" | Attempted to reach: "+r.split("?")[0])},e.createUnableToGetOpenidConfigError=function(r){return new e(M.unableToGetOpenidConfigError.code,M.unableToGetOpenidConfigError.desc+" Attempted to retrieve endpoints from: "+r)},e.createHashNotDeserializedError=function(r){return new e(M.hashNotDeserialized.code,M.hashNotDeserialized.desc+" Given Object: "+r)},e.createInvalidStateError=function(r,n){return new e(M.invalidStateError.code,M.invalidStateError.desc+" Invalid State: "+r+", Root Err: "+n)},e.createStateMismatchError=function(){return new e(M.stateMismatchError.code,M.stateMismatchError.desc)},e.createStateNotFoundError=function(r){return new e(M.stateNotFoundError.code,M.stateNotFoundError.desc+": "+r)},e.createNonceMismatchError=function(){return new e(M.nonceMismatchError.code,M.nonceMismatchError.desc)},e.createAuthTimeNotFoundError=function(){return new e(M.authTimeNotFoundError.code,M.authTimeNotFoundError.desc)},e.createMaxAgeTranspiredError=function(){return new e(M.maxAgeTranspiredError.code,M.maxAgeTranspiredError.desc)},e.createNonceNotFoundError=function(r){return new e(M.nonceNotFoundError.code,M.nonceNotFoundError.desc+": "+r)},e.createMultipleMatchingTokensInCacheError=function(){return new e(M.multipleMatchingTokens.code,M.multipleMatchingTokens.desc+".")},e.createMultipleMatchingAccountsInCacheError=function(){return new e(M.multipleMatchingAccounts.code,M.multipleMatchingAccounts.desc)},e.createMultipleMatchingAppMetadataInCacheError=function(){return new e(M.multipleMatchingAppMetadata.code,M.multipleMatchingAppMetadata.desc)},e.createTokenRequestCannotBeMadeError=function(){return new e(M.tokenRequestCannotBeMade.code,M.tokenRequestCannotBeMade.desc)},e.createAppendEmptyScopeToSetError=function(r){return new e(M.appendEmptyScopeError.code,M.appendEmptyScopeError.desc+" Given Scope: "+r)},e.createRemoveEmptyScopeFromSetError=function(r){return new e(M.removeEmptyScopeError.code,M.removeEmptyScopeError.desc+" Given Scope: "+r)},e.createAppendScopeSetError=function(r){return new e(M.appendScopeSetError.code,M.appendScopeSetError.desc+" Detail Error: "+r)},e.createEmptyInputScopeSetError=function(){return new e(M.emptyInputScopeSetError.code,""+M.emptyInputScopeSetError.desc)},e.createDeviceCodeCancelledError=function(){return new e(M.DeviceCodePollingCancelled.code,""+M.DeviceCodePollingCancelled.desc)},e.createDeviceCodeExpiredError=function(){return new e(M.DeviceCodeExpired.code,""+M.DeviceCodeExpired.desc)},e.createDeviceCodeUnknownError=function(){return new e(M.DeviceCodeUnknownError.code,""+M.DeviceCodeUnknownError.desc)},e.createNoAccountInSilentRequestError=function(){return new e(M.NoAccountInSilentRequest.code,""+M.NoAccountInSilentRequest.desc)},e.createNullOrUndefinedCacheRecord=function(){return new e(M.invalidCacheRecord.code,M.invalidCacheRecord.desc)},e.createInvalidCacheEnvironmentError=function(){return new e(M.invalidCacheEnvironment.code,M.invalidCacheEnvironment.desc)},e.createNoAccountFoundError=function(){return new e(M.noAccountFound.code,M.noAccountFound.desc)},e.createCachePluginError=function(){return new e(M.CachePluginError.code,""+M.CachePluginError.desc)},e.createNoCryptoObjectError=function(r){return new e(M.noCryptoObj.code,""+M.noCryptoObj.desc+r)},e.createInvalidCacheTypeError=function(){return new e(M.invalidCacheType.code,""+M.invalidCacheType.desc)},e.createUnexpectedAccountTypeError=function(){return new e(M.unexpectedAccountType.code,""+M.unexpectedAccountType.desc)},e.createUnexpectedCredentialTypeError=function(){return new e(M.unexpectedCredentialType.code,""+M.unexpectedCredentialType.desc)},e.createInvalidAssertionError=function(){return new e(M.invalidAssertion.code,""+M.invalidAssertion.desc)},e.createInvalidCredentialError=function(){return new e(M.invalidClientCredential.code,""+M.invalidClientCredential.desc)},e.createRefreshRequiredError=function(){return new e(M.tokenRefreshRequired.code,M.tokenRefreshRequired.desc)},e.createUserTimeoutReachedError=function(){return new e(M.userTimeoutReached.code,M.userTimeoutReached.desc)},e.createTokenClaimsRequiredError=function(){return new e(M.tokenClaimsRequired.code,M.tokenClaimsRequired.desc)},e.createNoAuthCodeInServerResponseError=function(){return new e(M.noAuthorizationCodeFromServer.code,M.noAuthorizationCodeFromServer.desc)},e.createBindingKeyNotRemovedError=function(){return new e(M.bindingKeyNotRemovedError.code,M.bindingKeyNotRemovedError.desc)},e.createLogoutNotSupportedError=function(){return new e(M.logoutNotSupported.code,M.logoutNotSupported.desc)},e.createKeyIdMissingError=function(){return new e(M.keyIdMissing.code,M.keyIdMissing.desc)},e}(Y);/*! @azure/msal-common v8.0.0 2022-11-07 */var N=function(){function t(){}return t.decodeAuthToken=function(e){if(t.isEmpty(e))throw j.createTokenNullOrEmptyError(e);var r=/^([^\.\s]*)\.([^\.\s]+)\.([^\.\s]*)$/,n=r.exec(e);if(!n||n.length<4)throw j.createTokenParsingError("Given token is malformed: "+JSON.stringify(e));var i={header:n[1],JWSPayload:n[2],JWSSig:n[3]};return i},t.isEmpty=function(e){return typeof e>"u"||!e||e.length===0},t.isEmptyObj=function(e){if(e&&!t.isEmpty(e))try{var r=JSON.parse(e);return Object.keys(r).length===0}catch{}return!0},t.startsWith=function(e,r){return e.indexOf(r)===0},t.endsWith=function(e,r){return e.length>=r.length&&e.lastIndexOf(r)===e.length-r.length},t.queryStringToObject=function(e){var r={},n=e.split("&"),i=function(o){return decodeURIComponent(o.replace(/\+/g," "))};return n.forEach(function(o){if(o.trim()){var a=o.split(/=(.+)/g,2),s=a[0],c=a[1];s&&c&&(r[i(s)]=i(c))}}),r},t.trimArrayEntries=function(e){return e.map(function(r){return r.trim()})},t.removeEmptyStringsFromArray=function(e){return e.filter(function(r){return!t.isEmpty(r)})},t.jsonParseHelper=function(e){try{return JSON.parse(e)}catch{return null}},t.matchPattern=function(e,r){var n=new RegExp(e.replace(/\\/g,"\\\\").replace(/\*/g,"[^ ]*").replace(/\?/g,"\\?"));return n.test(r)},t}();/*! @azure/msal-common v8.0.0 2022-11-07 */var Qe;(function(t){t[t.Error=0]="Error",t[t.Warning=1]="Warning",t[t.Info=2]="Info",t[t.Verbose=3]="Verbose",t[t.Trace=4]="Trace"})(Qe||(Qe={}));var P0=function(){function t(e,r,n){this.level=Qe.Info;var i=function(){};this.localCallback=e.loggerCallback||i,this.piiLoggingEnabled=e.piiLoggingEnabled||!1,this.level=typeof e.logLevel=="number"?e.logLevel:Qe.Info,this.correlationId=e.correlationId||b.EMPTY_STRING,this.packageName=r||b.EMPTY_STRING,this.packageVersion=n||b.EMPTY_STRING}return t.prototype.clone=function(e,r,n){return new t({loggerCallback:this.localCallback,piiLoggingEnabled:this.piiLoggingEnabled,logLevel:this.level,correlationId:n||this.correlationId},e,r)},t.prototype.logMessage=function(e,r){if(!(r.logLevel>this.level||!this.piiLoggingEnabled&&r.containsPii)){var n=new Date().toUTCString(),i;N.isEmpty(r.correlationId)?N.isEmpty(this.correlationId)?i="["+n+"]":i="["+n+"] : ["+this.correlationId+"]":i="["+n+"] : ["+r.correlationId+"]";var o=i+" : "+this.packageName+"@"+this.packageVersion+" : "+Qe[r.logLevel]+" - "+e;this.executeCallback(r.logLevel,o,r.containsPii||!1)}},t.prototype.executeCallback=function(e,r,n){this.localCallback&&this.localCallback(e,r,n)},t.prototype.error=function(e,r){this.logMessage(e,{logLevel:Qe.Error,containsPii:!1,correlationId:r||b.EMPTY_STRING})},t.prototype.errorPii=function(e,r){this.logMessage(e,{logLevel:Qe.Error,containsPii:!0,correlationId:r||b.EMPTY_STRING})},t.prototype.warning=function(e,r){this.logMessage(e,{logLevel:Qe.Warning,containsPii:!1,correlationId:r||b.EMPTY_STRING})},t.prototype.warningPii=function(e,r){this.logMessage(e,{logLevel:Qe.Warning,containsPii:!0,correlationId:r||b.EMPTY_STRING})},t.prototype.info=function(e,r){this.logMessage(e,{logLevel:Qe.Info,containsPii:!1,correlationId:r||b.EMPTY_STRING})},t.prototype.infoPii=function(e,r){this.logMessage(e,{logLevel:Qe.Info,containsPii:!0,correlationId:r||b.EMPTY_STRING})},t.prototype.verbose=function(e,r){this.logMessage(e,{logLevel:Qe.Verbose,containsPii:!1,correlationId:r||b.EMPTY_STRING})},t.prototype.verbosePii=function(e,r){this.logMessage(e,{logLevel:Qe.Verbose,containsPii:!0,correlationId:r||b.EMPTY_STRING})},t.prototype.trace=function(e,r){this.logMessage(e,{logLevel:Qe.Trace,containsPii:!1,correlationId:r||b.EMPTY_STRING})},t.prototype.tracePii=function(e,r){this.logMessage(e,{logLevel:Qe.Trace,containsPii:!0,correlationId:r||b.EMPTY_STRING})},t.prototype.isPiiLoggingEnabled=function(){return this.piiLoggingEnabled||!1},t}();/*! @azure/msal-common v8.0.0 2022-11-07 */var gy="@azure/msal-common",Sg="8.0.0";/*! @azure/msal-common v8.0.0 2022-11-07 */var tc;(function(t){t[t.None=0]="None",t.AzurePublic="https://login.microsoftonline.com",t.AzurePpe="https://login.windows-ppe.net",t.AzureChina="https://login.chinacloudapi.cn",t.AzureGermany="https://login.microsoftonline.de",t.AzureUsGovernment="https://login.microsoftonline.us"})(tc||(tc={}));/*! @azure/msal-common v8.0.0 2022-11-07 */var rc=function(){function t(){}return t.prototype.generateAccountId=function(){return t.generateAccountIdForCacheKey(this.homeAccountId,this.environment)},t.prototype.generateCredentialId=function(){return t.generateCredentialIdForCacheKey(this.credentialType,this.clientId,this.realm,this.familyId)},t.prototype.generateTarget=function(){return t.generateTargetForCacheKey(this.target)},t.prototype.generateCredentialKey=function(){return t.generateCredentialCacheKey(this.homeAccountId,this.environment,this.credentialType,this.clientId,this.realm,this.target,this.familyId,this.tokenType,this.requestedClaimsHash)},t.prototype.generateType=function(){switch(this.credentialType){case ce.ID_TOKEN:return Ln.ID_TOKEN;case ce.ACCESS_TOKEN:case ce.ACCESS_TOKEN_WITH_AUTH_SCHEME:return Ln.ACCESS_TOKEN;case ce.REFRESH_TOKEN:return Ln.REFRESH_TOKEN;default:throw j.createUnexpectedCredentialTypeError()}},t.getCredentialType=function(e){return e.indexOf(ce.ACCESS_TOKEN.toLowerCase())!==-1?e.indexOf(ce.ACCESS_TOKEN_WITH_AUTH_SCHEME.toLowerCase())!==-1?ce.ACCESS_TOKEN_WITH_AUTH_SCHEME:ce.ACCESS_TOKEN:e.indexOf(ce.ID_TOKEN.toLowerCase())!==-1?ce.ID_TOKEN:e.indexOf(ce.REFRESH_TOKEN.toLowerCase())!==-1?ce.REFRESH_TOKEN:b.NOT_DEFINED},t.generateCredentialCacheKey=function(e,r,n,i,o,a,s,c,l){var d=[this.generateAccountIdForCacheKey(e,r),this.generateCredentialIdForCacheKey(n,i,o,s),this.generateTargetForCacheKey(a),this.generateClaimsHashForCacheKey(l),this.generateSchemeForCacheKey(c)];return d.join(xr.CACHE_KEY_SEPARATOR).toLowerCase()},t.generateAccountIdForCacheKey=function(e,r){var n=[e,r];return n.join(xr.CACHE_KEY_SEPARATOR).toLowerCase()},t.generateCredentialIdForCacheKey=function(e,r,n,i){var o=e===ce.REFRESH_TOKEN&&i||r,a=[e,o,n||b.EMPTY_STRING];return a.join(xr.CACHE_KEY_SEPARATOR).toLowerCase()},t.generateTargetForCacheKey=function(e){return(e||b.EMPTY_STRING).toLowerCase()},t.generateClaimsHashForCacheKey=function(e){return(e||b.EMPTY_STRING).toLowerCase()},t.generateSchemeForCacheKey=function(e){return e&&e.toLowerCase()!==be.BEARER.toLowerCase()?e.toLowerCase():b.EMPTY_STRING},t}();/*! @azure/msal-common v8.0.0 2022-11-07 */var te={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."},nonArrayScopesError:{code:"nonarray_input_scopes_error",desc:"Scopes cannot be passed as non-array."},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"}},He=function(t){ur(e,t);function e(r,n){var i=t.call(this,r,n)||this;return i.name="ClientConfigurationError",Object.setPrototypeOf(i,e.prototype),i}return e.createRedirectUriEmptyError=function(){return new e(te.redirectUriNotSet.code,te.redirectUriNotSet.desc)},e.createPostLogoutRedirectUriEmptyError=function(){return new e(te.postLogoutUriNotSet.code,te.postLogoutUriNotSet.desc)},e.createClaimsRequestParsingError=function(r){return new e(te.claimsRequestParsingError.code,te.claimsRequestParsingError.desc+" Given value: "+r)},e.createInsecureAuthorityUriError=function(r){return new e(te.authorityUriInsecure.code,te.authorityUriInsecure.desc+" Given URI: "+r)},e.createUrlParseError=function(r){return new e(te.urlParseError.code,te.urlParseError.desc+" Given Error: "+r)},e.createUrlEmptyError=function(){return new e(te.urlEmptyError.code,te.urlEmptyError.desc)},e.createEmptyScopesArrayError=function(){return new e(te.emptyScopesError.code,""+te.emptyScopesError.desc)},e.createClientIdSingleScopeError=function(r){return new e(te.clientIdSingleScopeError.code,te.clientIdSingleScopeError.desc+" Given Scopes: "+r)},e.createInvalidPromptError=function(r){return new e(te.invalidPrompt.code,te.invalidPrompt.desc+" Given value: "+r)},e.createInvalidClaimsRequestError=function(){return new e(te.invalidClaimsRequest.code,te.invalidClaimsRequest.desc)},e.createEmptyLogoutRequestError=function(){return new e(te.logoutRequestEmptyError.code,te.logoutRequestEmptyError.desc)},e.createEmptyTokenRequestError=function(){return new e(te.tokenRequestEmptyError.code,te.tokenRequestEmptyError.desc)},e.createInvalidCodeChallengeMethodError=function(){return new e(te.invalidCodeChallengeMethod.code,te.invalidCodeChallengeMethod.desc)},e.createInvalidCodeChallengeParamsError=function(){return new e(te.invalidCodeChallengeParams.code,te.invalidCodeChallengeParams.desc)},e.createInvalidCloudDiscoveryMetadataError=function(){return new e(te.invalidCloudDiscoveryMetadata.code,te.invalidCloudDiscoveryMetadata.desc)},e.createInvalidAuthorityMetadataError=function(){return new e(te.invalidAuthorityMetadata.code,te.invalidAuthorityMetadata.desc)},e.createUntrustedAuthorityError=function(){return new e(te.untrustedAuthority.code,te.untrustedAuthority.desc)},e.createInvalidAzureCloudInstanceError=function(){return new e(te.invalidAzureCloudInstance.code,te.invalidAzureCloudInstance.desc)},e.createMissingSshJwkError=function(){return new e(te.missingSshJwk.code,te.missingSshJwk.desc)},e.createMissingSshKidError=function(){return new e(te.missingSshKid.code,te.missingSshKid.desc)},e.createMissingNonceAuthenticationHeadersError=function(){return new e(te.missingNonceAuthenticationHeader.code,te.missingNonceAuthenticationHeader.desc)},e.createInvalidAuthenticationHeaderError=function(r,n){return new e(te.invalidAuthenticationHeader.code,te.invalidAuthenticationHeader.desc+". Invalid header: "+r+". Details: "+n)},e}(j);/*! @azure/msal-common v8.0.0 2022-11-07 */var Wt=function(){function t(e){var r=this,n=e?N.trimArrayEntries(s1(e)):[],i=n?N.removeEmptyStringsFromArray(n):[];this.validateInputScopes(i),this.scopes=new Set,i.forEach(function(o){return r.scopes.add(o)})}return t.fromString=function(e){var r=e||b.EMPTY_STRING,n=r.split(" ");return new t(n)},t.prototype.validateInputScopes=function(e){if(!e||e.length<1)throw He.createEmptyScopesArrayError()},t.prototype.containsScope=function(e){var r=this.printScopesLowerCase().split(" "),n=new t(r);return N.isEmpty(e)?!1:n.scopes.has(e.toLowerCase())},t.prototype.containsScopeSet=function(e){var r=this;return!e||e.scopes.size<=0?!1:this.scopes.size>=e.scopes.size&&e.asArray().every(function(n){return r.containsScope(n)})},t.prototype.containsOnlyOIDCScopes=function(){var e=this,r=0;return Tp.forEach(function(n){e.containsScope(n)&&(r+=1)}),this.scopes.size===r},t.prototype.appendScope=function(e){N.isEmpty(e)||this.scopes.add(e.trim())},t.prototype.appendScopes=function(e){var r=this;try{e.forEach(function(n){return r.appendScope(n)})}catch(n){throw j.createAppendScopeSetError(n)}},t.prototype.removeScope=function(e){if(N.isEmpty(e))throw j.createRemoveEmptyScopeFromSetError(e);this.scopes.delete(e.trim())},t.prototype.removeOIDCScopes=function(){var e=this;Tp.forEach(function(r){e.scopes.delete(r)})},t.prototype.unionScopeSets=function(e){if(!e)throw j.createEmptyInputScopeSetError();var r=new Set;return e.scopes.forEach(function(n){return r.add(n.toLowerCase())}),this.scopes.forEach(function(n){return r.add(n.toLowerCase())}),r},t.prototype.intersectingScopeSets=function(e){if(!e)throw j.createEmptyInputScopeSetError();e.containsOnlyOIDCScopes()||e.removeOIDCScopes();var r=this.unionScopeSets(e),n=e.getScopeCount(),i=this.getScopeCount(),o=r.size;return o<i+n},t.prototype.getScopeCount=function(){return this.scopes.size},t.prototype.asArray=function(){var e=[];return this.scopes.forEach(function(r){return e.push(r)}),e},t.prototype.printScopes=function(){if(this.scopes){var e=this.asArray();return e.join(" ")}return b.EMPTY_STRING},t.prototype.printScopesLowerCase=function(){return this.printScopes().toLowerCase()},t}();/*! @azure/msal-common v8.0.0 2022-11-07 */function Cd(t,e){if(N.isEmpty(t))throw j.createClientInfoEmptyError();try{var r=e.base64Decode(t);return JSON.parse(r)}catch(n){throw j.createClientInfoDecodingError(n.message)}}function Zo(t){if(N.isEmpty(t))throw j.createClientInfoDecodingError("Home account ID was empty.");var e=t.split(xr.CLIENT_INFO_SEPARATOR,2);return{uid:e[0],utid:e.length<2?b.EMPTY_STRING:e[1]}}/*! @azure/msal-common v8.0.0 2022-11-07 */var Hr;(function(t){t[t.Default=0]="Default",t[t.Adfs=1]="Adfs",t[t.Dsts=2]="Dsts"})(Hr||(Hr={}));/*! @azure/msal-common v8.0.0 2022-11-07 */var _t=function(){function t(){}return t.prototype.generateAccountId=function(){var e=[this.homeAccountId,this.environment];return e.join(xr.CACHE_KEY_SEPARATOR).toLowerCase()},t.prototype.generateAccountKey=function(){return t.generateAccountCacheKey({homeAccountId:this.homeAccountId,environment:this.environment,tenantId:this.realm,username:this.username,localAccountId:this.localAccountId})},t.prototype.generateType=function(){switch(this.authorityType){case Mn.ADFS_ACCOUNT_TYPE:return Ln.ADFS;case Mn.MSAV1_ACCOUNT_TYPE:return Ln.MSA;case Mn.MSSTS_ACCOUNT_TYPE:return Ln.MSSTS;case Mn.GENERIC_ACCOUNT_TYPE:return Ln.GENERIC;default:throw j.createUnexpectedAccountTypeError()}},t.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}},t.generateAccountCacheKey=function(e){var r=[e.homeAccountId,e.environment||b.EMPTY_STRING,e.tenantId||b.EMPTY_STRING];return r.join(xr.CACHE_KEY_SEPARATOR).toLowerCase()},t.createAccount=function(e,r,n,i,o,a,s,c){var l,d,h,u,f,v,g=new t;g.authorityType=Mn.MSSTS_ACCOUNT_TYPE,g.clientInfo=e,g.homeAccountId=r,g.nativeAccountId=c;var x=s||i&&i.getPreferredCache();if(!x)throw j.createInvalidCacheEnvironmentError();if(g.environment=x,g.realm=((l=n==null?void 0:n.claims)===null||l===void 0?void 0:l.tid)||b.EMPTY_STRING,n){g.idTokenClaims=n.claims,g.localAccountId=((d=n==null?void 0:n.claims)===null||d===void 0?void 0:d.oid)||((h=n==null?void 0:n.claims)===null||h===void 0?void 0:h.sub)||b.EMPTY_STRING;var m=(u=n==null?void 0:n.claims)===null||u===void 0?void 0:u.preferred_username,p=!((f=n==null?void 0:n.claims)===null||f===void 0)&&f.emails?n.claims.emails[0]:null;g.username=m||p||b.EMPTY_STRING,g.name=(v=n==null?void 0:n.claims)===null||v===void 0?void 0:v.name}return g.cloudGraphHostName=o,g.msGraphHost=a,g},t.createGenericAccount=function(e,r,n,i,o,a){var s,c,l,d,h=new t;h.authorityType=n&&n.authorityType===Hr.Adfs?Mn.ADFS_ACCOUNT_TYPE:Mn.GENERIC_ACCOUNT_TYPE,h.homeAccountId=e,h.realm=b.EMPTY_STRING;var u=a||n&&n.getPreferredCache();if(!u)throw j.createInvalidCacheEnvironmentError();return r&&(h.localAccountId=((s=r==null?void 0:r.claims)===null||s===void 0?void 0:s.oid)||((c=r==null?void 0:r.claims)===null||c===void 0?void 0:c.sub)||b.EMPTY_STRING,h.username=((l=r==null?void 0:r.claims)===null||l===void 0?void 0:l.upn)||b.EMPTY_STRING,h.name=((d=r==null?void 0:r.claims)===null||d===void 0?void 0:d.name)||b.EMPTY_STRING,h.idTokenClaims=r==null?void 0:r.claims),h.environment=u,h.cloudGraphHostName=i,h.msGraphHost=o,h},t.generateHomeAccountId=function(e,r,n,i,o){var a,s=!((a=o==null?void 0:o.claims)===null||a===void 0)&&a.sub?o.claims.sub:b.EMPTY_STRING;if(r===Hr.Adfs||r===Hr.Dsts)return s;if(e)try{var c=Cd(e,i);if(!N.isEmpty(c.uid)&&!N.isEmpty(c.utid))return""+c.uid+xr.CLIENT_INFO_SEPARATOR+c.utid}catch{}return n.verbose("No client info in response"),s},t.isAccountEntity=function(e){return e?e.hasOwnProperty("homeAccountId")&&e.hasOwnProperty("environment")&&e.hasOwnProperty("realm")&&e.hasOwnProperty("localAccountId")&&e.hasOwnProperty("username")&&e.hasOwnProperty("authorityType"):!1},t.accountInfoIsEqual=function(e,r,n){if(!e||!r)return!1;var i=!0;if(n){var o=e.idTokenClaims||{},a=r.idTokenClaims||{};i=o.iat===a.iat&&o.nonce===a.nonce}return e.homeAccountId===r.homeAccountId&&e.localAccountId===r.localAccountId&&e.username===r.username&&e.tenantId===r.tenantId&&e.environment===r.environment&&e.nativeAccountId===r.nativeAccountId&&i},t}();/*! @azure/msal-common v8.0.0 2022-11-07 */var wn=function(){function t(e,r){if(N.isEmpty(e))throw j.createTokenNullOrEmptyError(e);this.rawToken=e,this.claims=t.extractTokenClaims(e,r)}return t.extractTokenClaims=function(e,r){var n=N.decodeAuthToken(e);try{var i=n.JWSPayload,o=r.base64Decode(i);return JSON.parse(o)}catch(a){throw j.createTokenParsingError(a)}},t.checkMaxAge=function(e,r){var n=3e5;if(r===0||Date.now()-n>e+r)throw j.createMaxAgeTranspiredError()},t}();/*! @azure/msal-common v8.0.0 2022-11-07 */var Wr=function(){function t(e,r){this.clientId=e,this.cryptoImpl=r}return t.prototype.getAllAccounts=function(){var e=this,r=this.getAccountsFilteredBy(),n=Object.keys(r).map(function(a){return r[a]}),i=n.length;if(i<1)return[];var o=n.map(function(a){var s=t.toObject(new _t,a),c=s.getAccountInfo(),l=e.readIdTokenFromCache(e.clientId,c);return l&&!c.idTokenClaims&&(c.idToken=l.secret,c.idTokenClaims=new wn(l.secret,e.cryptoImpl).claims),c});return o},t.prototype.saveCacheRecord=function(e){return J(this,void 0,void 0,function(){return Z(this,function(r){switch(r.label){case 0:if(!e)throw j.createNullOrUndefinedCacheRecord();return e.account&&this.setAccount(e.account),e.idToken&&this.setIdTokenCredential(e.idToken),e.accessToken?[4,this.saveAccessToken(e.accessToken)]:[3,2];case 1:r.sent(),r.label=2;case 2:return e.refreshToken&&this.setRefreshTokenCredential(e.refreshToken),e.appMetadata&&this.setAppMetadata(e.appMetadata),[2]}})})},t.prototype.saveAccessToken=function(e){return J(this,void 0,void 0,function(){var r,n,i,o,a=this;return Z(this,function(s){switch(s.label){case 0:return r=this.getCredentialsFilteredBy({clientId:e.clientId,credentialType:e.credentialType,environment:e.environment,homeAccountId:e.homeAccountId,realm:e.realm,tokenType:e.tokenType,requestedClaimsHash:e.requestedClaimsHash}),n=Wt.fromString(e.target),i=Object.keys(r.accessTokens).map(function(c){return r.accessTokens[c]}),i?(o=[],i.forEach(function(c){var l=Wt.fromString(c.target);l.intersectingScopeSets(n)&&o.push(a.removeCredential(c))}),[4,Promise.all(o)]):[3,2];case 1:s.sent(),s.label=2;case 2:return this.setAccessTokenCredential(e),[2]}})})},t.prototype.getAccountsFilteredBy=function(e){return this.getAccountsFilteredByInternal(e?e.homeAccountId:b.EMPTY_STRING,e?e.environment:b.EMPTY_STRING,e?e.realm:b.EMPTY_STRING,e?e.nativeAccountId:b.EMPTY_STRING)},t.prototype.getAccountsFilteredByInternal=function(e,r,n,i){var o=this,a=this.getKeys(),s={};return a.forEach(function(c){var l=o.getAccount(c);!l||!!e&&!o.matchHomeAccountId(l,e)||!!r&&!o.matchEnvironment(l,r)||!!n&&!o.matchRealm(l,n)||!!i&&!o.matchNativeAccountId(l,i)||(s[c]=l)}),s},t.prototype.getCredentialsFilteredBy=function(e){return this.getCredentialsFilteredByInternal(e.homeAccountId,e.environment,e.credentialType,e.clientId,e.familyId,e.realm,e.target,e.userAssertionHash,e.tokenType,e.keyId,e.requestedClaimsHash)},t.prototype.getCredentialsFilteredByInternal=function(e,r,n,i,o,a,s,c,l,d,h){var u=this,f=this.getKeys(),v={idTokens:{},accessTokens:{},refreshTokens:{}};return f.forEach(function(g){var x=rc.getCredentialType(g);if(x!==b.NOT_DEFINED){var m=u.getSpecificCredential(g,x);if(!!m&&!(!!c&&!u.matchUserAssertionHash(m,c))&&!(typeof e=="string"&&!u.matchHomeAccountId(m,e))&&!(!!r&&!u.matchEnvironment(m,r))&&!(!!a&&!u.matchRealm(m,a))&&!(!!n&&!u.matchCredentialType(m,n))&&!(!!i&&!u.matchClientId(m,i))&&!(!!o&&!u.matchFamilyId(m,o))&&!(!!s&&!u.matchTarget(m,s))&&!((h||m.requestedClaimsHash)&&m.requestedClaimsHash!==h)&&!(n===ce.ACCESS_TOKEN_WITH_AUTH_SCHEME&&(!!l&&!u.matchTokenType(m,l)||l===be.SSH&&d&&!u.matchKeyId(m,d)))){var p=u.updateCredentialCacheKey(g,m);switch(x){case ce.ID_TOKEN:v.idTokens[p]=m;break;case ce.ACCESS_TOKEN:case ce.ACCESS_TOKEN_WITH_AUTH_SCHEME:v.accessTokens[p]=m;break;case ce.REFRESH_TOKEN:v.refreshTokens[p]=m;break}}}}),v},t.prototype.getAppMetadataFilteredBy=function(e){return this.getAppMetadataFilteredByInternal(e.environment,e.clientId)},t.prototype.getAppMetadataFilteredByInternal=function(e,r){var n=this,i=this.getKeys(),o={};return i.forEach(function(a){if(!!n.isAppMetadata(a)){var s=n.getAppMetadata(a);!s||!!e&&!n.matchEnvironment(s,e)||!!r&&!n.matchClientId(s,r)||(o[a]=s)}}),o},t.prototype.getAuthorityMetadataByAlias=function(e){var r=this,n=this.getAuthorityMetadataKeys(),i=null;return n.forEach(function(o){if(!(!r.isAuthorityMetadata(o)||o.indexOf(r.clientId)===-1)){var a=r.getAuthorityMetadata(o);!a||a.aliases.indexOf(e)!==-1&&(i=a)}}),i},t.prototype.removeAllAccounts=function(){return J(this,void 0,void 0,function(){var e,r,n=this;return Z(this,function(i){switch(i.label){case 0:return e=this.getKeys(),r=[],e.forEach(function(o){var a=n.getAccount(o);!a||r.push(n.removeAccount(o))}),[4,Promise.all(r)];case 1:return i.sent(),[2,!0]}})})},t.prototype.removeAccount=function(e){return J(this,void 0,void 0,function(){var r;return Z(this,function(n){switch(n.label){case 0:if(r=this.getAccount(e),!r)throw j.createNoAccountFoundError();return[4,this.removeAccountContext(r)];case 1:return[2,n.sent()&&this.removeItem(e,no.ACCOUNT)]}})})},t.prototype.removeAccountContext=function(e){return J(this,void 0,void 0,function(){var r,n,i,o=this;return Z(this,function(a){switch(a.label){case 0:return r=this.getKeys(),n=e.generateAccountId(),i=[],r.forEach(function(s){var c=rc.getCredentialType(s);if(c!==b.NOT_DEFINED){var l=o.getSpecificCredential(s,c);!!l&&n===l.generateAccountId()&&i.push(o.removeCredential(l))}}),[4,Promise.all(i)];case 1:return a.sent(),[2,!0]}})})},t.prototype.removeCredential=function(e){return J(this,void 0,void 0,function(){var r,n,i;return Z(this,function(o){switch(o.label){case 0:if(r=e.generateCredentialKey(),e.credentialType.toLowerCase()!==ce.ACCESS_TOKEN_WITH_AUTH_SCHEME.toLowerCase())return[3,4];if(e.tokenType!==be.POP)return[3,4];if(n=e,i=n.keyId,!i)return[3,4];o.label=1;case 1:return o.trys.push([1,3,,4]),[4,this.cryptoImpl.removeTokenBindingKey(i)];case 2:return o.sent(),[3,4];case 3:throw o.sent(),j.createBindingKeyNotRemovedError();case 4:return[2,this.removeItem(r,no.CREDENTIAL)]}})})},t.prototype.removeAppMetadata=function(){var e=this,r=this.getKeys();return r.forEach(function(n){e.isAppMetadata(n)&&e.removeItem(n,no.APP_METADATA)}),!0},t.prototype.readCacheRecord=function(e,r,n,i){var o=this.readAccountFromCache(e),a=this.readIdTokenFromCache(r,e),s=this.readAccessTokenFromCache(r,e,n),c=this.readRefreshTokenFromCache(r,e,!1),l=this.readAppMetadataFromCache(i,r);return o&&a&&(o.idTokenClaims=new wn(a.secret,this.cryptoImpl).claims),{account:o,idToken:a,accessToken:s,refreshToken:c,appMetadata:l}},t.prototype.readAccountFromCache=function(e){var r=_t.generateAccountCacheKey(e);return this.getAccount(r)},t.prototype.readAccountFromCacheWithNativeAccountId=function(e){var r={nativeAccountId:e},n=this.getAccountsFilteredBy(r),i=Object.keys(n).map(function(o){return n[o]});if(i.length<1)return null;if(i.length>1)throw j.createMultipleMatchingAccountsInCacheError();return n[0]},t.prototype.readIdTokenFromCache=function(e,r){var n={homeAccountId:r.homeAccountId,environment:r.environment,credentialType:ce.ID_TOKEN,clientId:e,realm:r.tenantId},i=this.getCredentialsFilteredBy(n),o=Object.keys(i.idTokens).map(function(s){return i.idTokens[s]}),a=o.length;if(a<1)return null;if(a>1)throw j.createMultipleMatchingTokensInCacheError();return o[0]},t.prototype.readAccessTokenFromCache=function(e,r,n){var i=new Wt(n.scopes||[]),o=n.authenticationScheme||be.BEARER,a=o&&o.toLowerCase()!==be.BEARER.toLowerCase()?ce.ACCESS_TOKEN_WITH_AUTH_SCHEME:ce.ACCESS_TOKEN,s={homeAccountId:r.homeAccountId,environment:r.environment,credentialType:a,clientId:e,realm:r.tenantId,target:i.printScopesLowerCase(),tokenType:o,keyId:n.sshKid,requestedClaimsHash:n.requestedClaimsHash},c=this.getCredentialsFilteredBy(s),l=Object.keys(c.accessTokens).map(function(h){return c.accessTokens[h]}),d=l.length;if(d<1)return null;if(d>1)throw j.createMultipleMatchingTokensInCacheError();return l[0]},t.prototype.readRefreshTokenFromCache=function(e,r,n){var i=n?wd:void 0,o={homeAccountId:r.homeAccountId,environment:r.environment,credentialType:ce.REFRESH_TOKEN,clientId:e,familyId:i},a=this.getCredentialsFilteredBy(o),s=Object.keys(a.refreshTokens).map(function(l){return a.refreshTokens[l]}),c=s.length;return c<1?null:s[0]},t.prototype.readAppMetadataFromCache=function(e,r){var n={environment:e,clientId:r},i=this.getAppMetadataFilteredBy(n),o=Object.keys(i).map(function(s){return i[s]}),a=o.length;if(a<1)return null;if(a>1)throw j.createMultipleMatchingAppMetadataInCacheError();return o[0]},t.prototype.isAppMetadataFOCI=function(e,r){var n=this.readAppMetadataFromCache(e,r);return!!(n&&n.familyId===wd)},t.prototype.matchHomeAccountId=function(e,r){return typeof e.homeAccountId=="string"&&r===e.homeAccountId},t.prototype.matchUserAssertionHash=function(e,r){return!!(e.userAssertionHash&&r===e.userAssertionHash)},t.prototype.matchEnvironment=function(e,r){var n=this.getAuthorityMetadataByAlias(r);return!!(n&&n.aliases.indexOf(e.environment)>-1)},t.prototype.matchCredentialType=function(e,r){return e.credentialType&&r.toLowerCase()===e.credentialType.toLowerCase()},t.prototype.matchClientId=function(e,r){return!!(e.clientId&&r===e.clientId)},t.prototype.matchFamilyId=function(e,r){return!!(e.familyId&&r===e.familyId)},t.prototype.matchRealm=function(e,r){return!!(e.realm&&r===e.realm)},t.prototype.matchNativeAccountId=function(e,r){return!!(e.nativeAccountId&&r===e.nativeAccountId)},t.prototype.matchTarget=function(e,r){var n=e.credentialType!==ce.ACCESS_TOKEN&&e.credentialType!==ce.ACCESS_TOKEN_WITH_AUTH_SCHEME;if(n||!e.target)return!1;var i=Wt.fromString(e.target),o=Wt.fromString(r);return o.containsOnlyOIDCScopes()?o.removeScope(b.OFFLINE_ACCESS_SCOPE):o.removeOIDCScopes(),i.containsScopeSet(o)},t.prototype.matchTokenType=function(e,r){return!!(e.tokenType&&e.tokenType===r)},t.prototype.matchKeyId=function(e,r){return!!(e.keyId&&e.keyId===r)},t.prototype.isAppMetadata=function(e){return e.indexOf(Fu)!==-1},t.prototype.isAuthorityMetadata=function(e){return e.indexOf(Ms.CACHE_KEY)!==-1},t.prototype.generateAuthorityMetadataCacheKey=function(e){return Ms.CACHE_KEY+"-"+this.clientId+"-"+e},t.prototype.getSpecificCredential=function(e,r){switch(r){case ce.ID_TOKEN:return this.getIdTokenCredential(e);case ce.ACCESS_TOKEN:case ce.ACCESS_TOKEN_WITH_AUTH_SCHEME:return this.getAccessTokenCredential(e);case ce.REFRESH_TOKEN:return this.getRefreshTokenCredential(e);default:return null}},t.toObject=function(e,r){for(var n in r)e[n]=r[n];return e},t}(),yy=function(t){ur(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.setAccount=function(){var r="Storage interface - setAccount() has not been implemented for the cacheStorage interface.";throw Y.createUnexpectedError(r)},e.prototype.getAccount=function(){var r="Storage interface - getAccount() has not been implemented for the cacheStorage interface.";throw Y.createUnexpectedError(r)},e.prototype.setIdTokenCredential=function(){var r="Storage interface - setIdTokenCredential() has not been implemented for the cacheStorage interface.";throw Y.createUnexpectedError(r)},e.prototype.getIdTokenCredential=function(){var r="Storage interface - getIdTokenCredential() has not been implemented for the cacheStorage interface.";throw Y.createUnexpectedError(r)},e.prototype.setAccessTokenCredential=function(){var r="Storage interface - setAccessTokenCredential() has not been implemented for the cacheStorage interface.";throw Y.createUnexpectedError(r)},e.prototype.getAccessTokenCredential=function(){var r="Storage interface - getAccessTokenCredential() has not been implemented for the cacheStorage interface.";throw Y.createUnexpectedError(r)},e.prototype.setRefreshTokenCredential=function(){var r="Storage interface - setRefreshTokenCredential() has not been implemented for the cacheStorage interface.";throw Y.createUnexpectedError(r)},e.prototype.getRefreshTokenCredential=function(){var r="Storage interface - getRefreshTokenCredential() has not been implemented for the cacheStorage interface.";throw Y.createUnexpectedError(r)},e.prototype.setAppMetadata=function(){var r="Storage interface - setAppMetadata() has not been implemented for the cacheStorage interface.";throw Y.createUnexpectedError(r)},e.prototype.getAppMetadata=function(){var r="Storage interface - getAppMetadata() has not been implemented for the cacheStorage interface.";throw Y.createUnexpectedError(r)},e.prototype.setServerTelemetry=function(){var r="Storage interface - setServerTelemetry() has not been implemented for the cacheStorage interface.";throw Y.createUnexpectedError(r)},e.prototype.getServerTelemetry=function(){var r="Storage interface - getServerTelemetry() has not been implemented for the cacheStorage interface.";throw Y.createUnexpectedError(r)},e.prototype.setAuthorityMetadata=function(){var r="Storage interface - setAuthorityMetadata() has not been implemented for the cacheStorage interface.";throw Y.createUnexpectedError(r)},e.prototype.getAuthorityMetadata=function(){var r="Storage interface - getAuthorityMetadata() has not been implemented for the cacheStorage interface.";throw Y.createUnexpectedError(r)},e.prototype.getAuthorityMetadataKeys=function(){var r="Storage interface - getAuthorityMetadataKeys() has not been implemented for the cacheStorage interface.";throw Y.createUnexpectedError(r)},e.prototype.setThrottlingCache=function(){var r="Storage interface - setThrottlingCache() has not been implemented for the cacheStorage interface.";throw Y.createUnexpectedError(r)},e.prototype.getThrottlingCache=function(){var r="Storage interface - getThrottlingCache() has not been implemented for the cacheStorage interface.";throw Y.createUnexpectedError(r)},e.prototype.removeItem=function(){var r="Storage interface - removeItem() has not been implemented for the cacheStorage interface.";throw Y.createUnexpectedError(r)},e.prototype.containsKey=function(){var r="Storage interface - containsKey() has not been implemented for the cacheStorage interface.";throw Y.createUnexpectedError(r)},e.prototype.getKeys=function(){var r="Storage interface - getKeys() has not been implemented for the cacheStorage interface.";throw Y.createUnexpectedError(r)},e.prototype.clear=function(){return J(this,void 0,void 0,function(){var r;return Z(this,function(n){throw r="Storage interface - clear() has not been implemented for the cacheStorage interface.",Y.createUnexpectedError(r)})})},e.prototype.updateCredentialCacheKey=function(){var r="Storage interface - updateCredentialCacheKey() has not been implemented for the cacheStorage interface.";throw Y.createUnexpectedError(r)},e}(Wr);/*! @azure/msal-common v8.0.0 2022-11-07 */var _y=300,kg={tokenRenewalOffsetSeconds:_y,preventCorsPreflight:!1,proxyUrl:b.EMPTY_STRING},by={loggerCallback:function(){},piiLoggingEnabled:!1,logLevel:Qe.Info,correlationId:b.EMPTY_STRING},wy={sendGetRequestAsync:function(){return J(this,void 0,void 0,function(){var t;return Z(this,function(e){throw t="Network interface - sendGetRequestAsync() has not been implemented",Y.createUnexpectedError(t)})})},sendPostRequestAsync:function(){return J(this,void 0,void 0,function(){var t;return Z(this,function(e){throw t="Network interface - sendPostRequestAsync() has not been implemented",Y.createUnexpectedError(t)})})}},xy={sku:b.SKU,version:Sg,cpu:b.EMPTY_STRING,os:b.EMPTY_STRING},Ey={clientSecret:b.EMPTY_STRING,clientAssertion:void 0},Cy={azureCloudInstance:tc.None,tenant:""+b.DEFAULT_COMMON_TENANT},zy={application:{appName:"",appVersion:""}};function Sy(t){var e=t.authOptions,r=t.systemOptions,n=t.loggerOptions,i=t.storageInterface,o=t.networkInterface,a=t.cryptoInterface,s=t.clientCredentials,c=t.libraryInfo,l=t.telemetry,d=t.serverTelemetryManager,h=t.persistencePlugin,u=t.serializableCache,f=Te(Te({},by),n);return{authOptions:ky(e),systemOptions:Te(Te({},kg),r),loggerOptions:f,storageInterface:i||new yy(e.clientId,Ed),networkInterface:o||wy,cryptoInterface:a||Ed,clientCredentials:s||Ey,libraryInfo:Te(Te({},xy),c),telemetry:Te(Te({},zy),l),serverTelemetryManager:d||null,persistencePlugin:h||null,serializableCache:u||null}}function ky(t){return Te({clientCapabilities:[],azureCloudOptions:Cy,skipAuthorityMetadataCache:!1},t)}/*! @azure/msal-common v8.0.0 2022-11-07 */var go=function(t){ur(e,t);function e(r,n,i){var o=t.call(this,r,n,i)||this;return o.name="ServerError",Object.setPrototypeOf(o,e.prototype),o}return e}(Y);/*! @azure/msal-common v8.0.0 2022-11-07 */var zd=function(){function t(){}return t.generateThrottlingStorageKey=function(e){return Ps.THROTTLING_PREFIX+"."+JSON.stringify(e)},t.preProcess=function(e,r){var n,i=t.generateThrottlingStorageKey(r),o=e.getThrottlingCache(i);if(o){if(o.throttleTime<Date.now()){e.removeItem(i,no.THROTTLING);return}throw new go(((n=o.errorCodes)===null||n===void 0?void 0:n.join(" "))||b.EMPTY_STRING,o.errorMessage,o.subError)}},t.postProcess=function(e,r,n){if(t.checkResponseStatus(n)||t.checkResponseForRetryAfter(n)){var i={throttleTime:t.calculateThrottleTime(parseInt(n.headers[nn.RETRY_AFTER])),error:n.body.error,errorCodes:n.body.error_codes,errorMessage:n.body.error_description,subError:n.body.suberror};e.setThrottlingCache(t.generateThrottlingStorageKey(r),i)}},t.checkResponseStatus=function(e){return e.status===429||e.status>=500&&e.status<600},t.checkResponseForRetryAfter=function(e){return e.headers?e.headers.hasOwnProperty(nn.RETRY_AFTER)&&(e.status<200||e.status>=300):!1},t.calculateThrottleTime=function(e){var r=e<=0?0:e,n=Date.now()/1e3;return Math.floor(Math.min(n+(r||Ps.DEFAULT_THROTTLE_TIME_SECONDS),n+Ps.DEFAULT_MAX_THROTTLE_TIME_SECONDS)*1e3)},t.removeThrottle=function(e,r,n,i){var o={clientId:r,authority:n.authority,scopes:n.scopes,homeAccountIdentifier:i,claims:n.claims,authenticationScheme:n.authenticationScheme,resourceRequestMethod:n.resourceRequestMethod,resourceRequestUri:n.resourceRequestUri,shrClaims:n.shrClaims,sshKid:n.sshKid},a=this.generateThrottlingStorageKey(o);return e.removeItem(a,no.THROTTLING)},t}();/*! @azure/msal-common v8.0.0 2022-11-07 */var Ty=function(){function t(e,r){this.networkClient=e,this.cacheManager=r}return t.prototype.sendPostRequest=function(e,r,n){return J(this,void 0,void 0,function(){var i,o;return Z(this,function(a){switch(a.label){case 0:zd.preProcess(this.cacheManager,e),a.label=1;case 1:return a.trys.push([1,3,,4]),[4,this.networkClient.sendPostRequestAsync(r,n)];case 2:return i=a.sent(),[3,4];case 3:throw o=a.sent(),o instanceof Y?o:j.createNetworkError(r,o);case 4:return zd.postProcess(this.cacheManager,e,i),[2,i]}})})},t}();/*! @azure/msal-common v8.0.0 2022-11-07 */var _r;(function(t){t.HOME_ACCOUNT_ID="home_account_id",t.UPN="UPN"})(_r||(_r={}));/*! @azure/msal-common v8.0.0 2022-11-07 */var R0=function(){function t(e,r){this.config=Sy(e),this.logger=new P0(this.config.loggerOptions,gy,Sg),this.cryptoUtils=this.config.cryptoInterface,this.cacheManager=this.config.storageInterface,this.networkClient=this.config.networkInterface,this.networkManager=new Ty(this.networkClient,this.cacheManager),this.serverTelemetryManager=this.config.serverTelemetryManager,this.authority=this.config.authOptions.authority,this.performanceClient=r}return t.prototype.createTokenRequestHeaders=function(e){var r={};if(r[nn.CONTENT_TYPE]=b.URL_FORM_CONTENT_TYPE,!this.config.systemOptions.preventCorsPreflight&&e)switch(e.type){case _r.HOME_ACCOUNT_ID:try{var n=Zo(e.credential);r[nn.CCS_HEADER]="Oid:"+n.uid+"@"+n.utid}catch(i){this.logger.verbose("Could not parse home account ID for CCS Header: "+i)}break;case _r.UPN:r[nn.CCS_HEADER]="UPN: "+e.credential;break}return r},t.prototype.executePostToTokenEndpoint=function(e,r,n,i){return J(this,void 0,void 0,function(){var o;return Z(this,function(a){switch(a.label){case 0:return[4,this.networkManager.sendPostRequest(i,e,{body:r,headers:n,proxyUrl:this.config.systemOptions.proxyUrl})];case 1:return o=a.sent(),this.config.serverTelemetryManager&&o.status<500&&o.status!==429&&this.config.serverTelemetryManager.clearTelemetryCache(),[2,o]}})})},t.prototype.updateAuthority=function(e){if(!e.discoveryComplete())throw j.createEndpointDiscoveryIncompleteError("Updated authority has not completed endpoint discovery.");this.authority=e},t}();/*! @azure/msal-common v8.0.0 2022-11-07 */var ji=function(){function t(){}return t.validateRedirectUri=function(e){if(N.isEmpty(e))throw He.createRedirectUriEmptyError()},t.validatePrompt=function(e){var r=[];for(var n in Nt)r.push(Nt[n]);if(r.indexOf(e)<0)throw He.createInvalidPromptError(e)},t.validateClaims=function(e){try{JSON.parse(e)}catch{throw He.createInvalidClaimsRequestError()}},t.validateCodeChallengeParams=function(e,r){if(N.isEmpty(e)||N.isEmpty(r))throw He.createInvalidCodeChallengeParamsError();this.validateCodeChallengeMethod(r)},t.validateCodeChallengeMethod=function(e){if([Ap.PLAIN,Ap.S256].indexOf(e)<0)throw He.createInvalidCodeChallengeMethodError()},t.sanitizeEQParams=function(e,r){return e?(r.forEach(function(n,i){e[i]&&delete e[i]}),e):{}},t}();/*! @azure/msal-common v8.0.0 2022-11-07 */var ea=function(){function t(){this.parameters=new Map}return t.prototype.addResponseTypeCode=function(){this.parameters.set(re.RESPONSE_TYPE,encodeURIComponent(b.CODE_RESPONSE_TYPE))},t.prototype.addResponseTypeForTokenAndIdToken=function(){this.parameters.set(re.RESPONSE_TYPE,encodeURIComponent(b.TOKEN_RESPONSE_TYPE+" "+b.ID_TOKEN_RESPONSE_TYPE))},t.prototype.addResponseMode=function(e){this.parameters.set(re.RESPONSE_MODE,encodeURIComponent(e||_d.QUERY))},t.prototype.addNativeBroker=function(){this.parameters.set(re.NATIVE_BROKER,encodeURIComponent("1"))},t.prototype.addScopes=function(e,r){r===void 0&&(r=!0);var n=r?s1(e||[],_c):e||[],i=new Wt(n);this.parameters.set(re.SCOPE,encodeURIComponent(i.printScopes()))},t.prototype.addClientId=function(e){this.parameters.set(re.CLIENT_ID,encodeURIComponent(e))},t.prototype.addRedirectUri=function(e){ji.validateRedirectUri(e),this.parameters.set(re.REDIRECT_URI,encodeURIComponent(e))},t.prototype.addPostLogoutRedirectUri=function(e){ji.validateRedirectUri(e),this.parameters.set(re.POST_LOGOUT_URI,encodeURIComponent(e))},t.prototype.addIdTokenHint=function(e){this.parameters.set(re.ID_TOKEN_HINT,encodeURIComponent(e))},t.prototype.addDomainHint=function(e){this.parameters.set(Is.DOMAIN_HINT,encodeURIComponent(e))},t.prototype.addLoginHint=function(e){this.parameters.set(Is.LOGIN_HINT,encodeURIComponent(e))},t.prototype.addCcsUpn=function(e){this.parameters.set(nn.CCS_HEADER,encodeURIComponent("UPN:"+e))},t.prototype.addCcsOid=function(e){this.parameters.set(nn.CCS_HEADER,encodeURIComponent("Oid:"+e.uid+"@"+e.utid))},t.prototype.addSid=function(e){this.parameters.set(Is.SID,encodeURIComponent(e))},t.prototype.addClaims=function(e,r){var n=this.addClientCapabilitiesToClaims(e,r);ji.validateClaims(n),this.parameters.set(re.CLAIMS,encodeURIComponent(n))},t.prototype.addCorrelationId=function(e){this.parameters.set(re.CLIENT_REQUEST_ID,encodeURIComponent(e))},t.prototype.addLibraryInfo=function(e){this.parameters.set(re.X_CLIENT_SKU,e.sku),this.parameters.set(re.X_CLIENT_VER,e.version),e.os&&this.parameters.set(re.X_CLIENT_OS,e.os),e.cpu&&this.parameters.set(re.X_CLIENT_CPU,e.cpu)},t.prototype.addApplicationTelemetry=function(e){e!=null&&e.appName&&this.parameters.set(re.X_APP_NAME,e.appName),e!=null&&e.appVersion&&this.parameters.set(re.X_APP_VER,e.appVersion)},t.prototype.addPrompt=function(e){ji.validatePrompt(e),this.parameters.set(""+re.PROMPT,encodeURIComponent(e))},t.prototype.addState=function(e){N.isEmpty(e)||this.parameters.set(re.STATE,encodeURIComponent(e))},t.prototype.addNonce=function(e){this.parameters.set(re.NONCE,encodeURIComponent(e))},t.prototype.addCodeChallengeParams=function(e,r){if(ji.validateCodeChallengeParams(e,r),e&&r)this.parameters.set(re.CODE_CHALLENGE,encodeURIComponent(e)),this.parameters.set(re.CODE_CHALLENGE_METHOD,encodeURIComponent(r));else throw He.createInvalidCodeChallengeParamsError()},t.prototype.addAuthorizationCode=function(e){this.parameters.set(re.CODE,encodeURIComponent(e))},t.prototype.addDeviceCode=function(e){this.parameters.set(re.DEVICE_CODE,encodeURIComponent(e))},t.prototype.addRefreshToken=function(e){this.parameters.set(re.REFRESH_TOKEN,encodeURIComponent(e))},t.prototype.addCodeVerifier=function(e){this.parameters.set(re.CODE_VERIFIER,encodeURIComponent(e))},t.prototype.addClientSecret=function(e){this.parameters.set(re.CLIENT_SECRET,encodeURIComponent(e))},t.prototype.addClientAssertion=function(e){N.isEmpty(e)||this.parameters.set(re.CLIENT_ASSERTION,encodeURIComponent(e))},t.prototype.addClientAssertionType=function(e){N.isEmpty(e)||this.parameters.set(re.CLIENT_ASSERTION_TYPE,encodeURIComponent(e))},t.prototype.addOboAssertion=function(e){this.parameters.set(re.OBO_ASSERTION,encodeURIComponent(e))},t.prototype.addRequestTokenUse=function(e){this.parameters.set(re.REQUESTED_TOKEN_USE,encodeURIComponent(e))},t.prototype.addGrantType=function(e){this.parameters.set(re.GRANT_TYPE,encodeURIComponent(e))},t.prototype.addClientInfo=function(){this.parameters.set(vy,"1")},t.prototype.addExtraQueryParameters=function(e){var r=this;ji.sanitizeEQParams(e,this.parameters),Object.keys(e).forEach(function(n){r.parameters.set(n,e[n])})},t.prototype.addClientCapabilitiesToClaims=function(e,r){var n;if(!e)n={};else try{n=JSON.parse(e)}catch{throw He.createInvalidClaimsRequestError()}return r&&r.length>0&&(n.hasOwnProperty(Xo.ACCESS_TOKEN)||(n[Xo.ACCESS_TOKEN]={}),n[Xo.ACCESS_TOKEN][Xo.XMS_CC]={values:r}),JSON.stringify(n)},t.prototype.addUsername=function(e){this.parameters.set(xd.username,encodeURIComponent(e))},t.prototype.addPassword=function(e){this.parameters.set(xd.password,encodeURIComponent(e))},t.prototype.addPopToken=function(e){N.isEmpty(e)||(this.parameters.set(re.TOKEN_TYPE,be.POP),this.parameters.set(re.REQ_CNF,encodeURIComponent(e)))},t.prototype.addSshJwk=function(e){N.isEmpty(e)||(this.parameters.set(re.TOKEN_TYPE,be.SSH),this.parameters.set(re.REQ_CNF,encodeURIComponent(e)))},t.prototype.addServerTelemetry=function(e){this.parameters.set(re.X_CLIENT_CURR_TELEM,e.generateCurrentRequestHeaderValue()),this.parameters.set(re.X_CLIENT_LAST_TELEM,e.generateLastRequestHeaderValue())},t.prototype.addThrottling=function(){this.parameters.set(re.X_MS_LIB_CAPABILITY,Ps.X_MS_LIB_CAPABILITY_VALUE)},t.prototype.addLogoutHint=function(e){this.parameters.set(re.LOGOUT_HINT,encodeURIComponent(e))},t.prototype.createQueryString=function(){var e=new Array;return this.parameters.forEach(function(r,n){e.push(n+"="+r)}),e.join("&")},t}();/*! @azure/msal-common v8.0.0 2022-11-07 */var nc=function(t){ur(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.createIdTokenEntity=function(r,n,i,o,a){var s=new e;return s.credentialType=ce.ID_TOKEN,s.homeAccountId=r,s.environment=n,s.clientId=o,s.secret=i,s.realm=a,s},e.isIdTokenEntity=function(r){return r?r.hasOwnProperty("homeAccountId")&&r.hasOwnProperty("environment")&&r.hasOwnProperty("credentialType")&&r.hasOwnProperty("realm")&&r.hasOwnProperty("clientId")&&r.hasOwnProperty("secret")&&r.credentialType===ce.ID_TOKEN:!1},e}(rc);/*! @azure/msal-common v8.0.0 2022-11-07 */var Vr=function(){function t(){}return t.nowSeconds=function(){return Math.round(new Date().getTime()/1e3)},t.isTokenExpired=function(e,r){var n=Number(e)||0,i=t.nowSeconds()+r;return i>n},t.wasClockTurnedBack=function(e){var r=Number(e);return r>t.nowSeconds()},t.delay=function(e,r){return new Promise(function(n){return setTimeout(function(){return n(r)},e)})},t}();/*! @azure/msal-common v8.0.0 2022-11-07 */var ic=function(t){ur(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.createAccessTokenEntity=function(r,n,i,o,a,s,c,l,d,h,u,f,v,g,x){var m,p,y=new e;y.homeAccountId=r,y.credentialType=ce.ACCESS_TOKEN,y.secret=i;var w=Vr.nowSeconds();if(y.cachedAt=w.toString(),y.expiresOn=c.toString(),y.extendedExpiresOn=l.toString(),h&&(y.refreshOn=h.toString()),y.environment=n,y.clientId=o,y.realm=a,y.target=s,y.userAssertionHash=f,y.tokenType=N.isEmpty(u)?be.BEARER:u,g&&(y.requestedClaims=g,y.requestedClaimsHash=x),((m=y.tokenType)===null||m===void 0?void 0:m.toLowerCase())!==be.BEARER.toLowerCase())switch(y.credentialType=ce.ACCESS_TOKEN_WITH_AUTH_SCHEME,y.tokenType){case be.POP:var T=wn.extractTokenClaims(i,d);if(!(!((p=T==null?void 0:T.cnf)===null||p===void 0)&&p.kid))throw j.createTokenClaimsRequiredError();y.keyId=T.cnf.kid;break;case be.SSH:y.keyId=v}return y},e.isAccessTokenEntity=function(r){return r?r.hasOwnProperty("homeAccountId")&&r.hasOwnProperty("environment")&&r.hasOwnProperty("credentialType")&&r.hasOwnProperty("realm")&&r.hasOwnProperty("clientId")&&r.hasOwnProperty("secret")&&r.hasOwnProperty("target")&&(r.credentialType===ce.ACCESS_TOKEN||r.credentialType===ce.ACCESS_TOKEN_WITH_AUTH_SCHEME):!1},e}(rc);/*! @azure/msal-common v8.0.0 2022-11-07 */var Sd=function(t){ur(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.createRefreshTokenEntity=function(r,n,i,o,a,s){var c=new e;return c.clientId=o,c.credentialType=ce.REFRESH_TOKEN,c.environment=n,c.homeAccountId=r,c.secret=i,c.userAssertionHash=s,a&&(c.familyId=a),c},e.isRefreshTokenEntity=function(r){return r?r.hasOwnProperty("homeAccountId")&&r.hasOwnProperty("environment")&&r.hasOwnProperty("credentialType")&&r.hasOwnProperty("clientId")&&r.hasOwnProperty("secret")&&r.credentialType===ce.REFRESH_TOKEN:!1},e}(rc);/*! @azure/msal-common v8.0.0 2022-11-07 */var Mp=["interaction_required","consent_required","login_required"],Ay=["message_only","additional_action","basic_action","user_password_expired","consent_required"],cs={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."}},Zr=function(t){ur(e,t);function e(r,n,i){var o=t.call(this,r,n,i)||this;return o.name="InteractionRequiredAuthError",Object.setPrototypeOf(o,e.prototype),o}return e.isInteractionRequiredError=function(r,n,i){var o=!!r&&Mp.indexOf(r)>-1,a=!!i&&Ay.indexOf(i)>-1,s=!!n&&Mp.some(function(c){return n.indexOf(c)>-1});return o||s||a},e.createNoTokensFoundError=function(){return new e(cs.noTokensFoundError.code,cs.noTokensFoundError.desc)},e.createNativeAccountUnavailableError=function(){return new e(cs.native_account_unavailable.code,cs.native_account_unavailable.desc)},e}(Y);/*! @azure/msal-common v8.0.0 2022-11-07 */var Il=function(){function t(e,r,n,i,o){this.account=e||null,this.idToken=r||null,this.accessToken=n||null,this.refreshToken=i||null,this.appMetadata=o||null}return t}();/*! @azure/msal-common v8.0.0 2022-11-07 */var Un=function(){function t(){}return t.setRequestState=function(e,r,n){var i=t.generateLibraryState(e,n);return N.isEmpty(r)?i:""+i+b.RESOURCE_DELIM+r},t.generateLibraryState=function(e,r){if(!e)throw j.createNoCryptoObjectError("generateLibraryState");var n={id:e.createNewGuid()};r&&(n.meta=r);var i=JSON.stringify(n);return e.base64Encode(i)},t.parseRequestState=function(e,r){if(!e)throw j.createNoCryptoObjectError("parseRequestState");if(N.isEmpty(r))throw j.createInvalidStateError(r,"Null, undefined or empty state");try{var n=r.split(b.RESOURCE_DELIM),i=n[0],o=n.length>1?n.slice(1).join(b.RESOURCE_DELIM):b.EMPTY_STRING,a=e.base64Decode(i),s=JSON.parse(a);return{userRequestState:N.isEmpty(o)?b.EMPTY_STRING:o,libraryState:s}}catch(c){throw j.createInvalidStateError(r,c)}},t}();/*! @azure/msal-common v8.0.0 2022-11-07 */var me=function(){function t(e){if(this._urlString=e,N.isEmpty(this._urlString))throw He.createUrlEmptyError();N.isEmpty(this.getHash())&&(this._urlString=t.canonicalizeUri(e))}return Object.defineProperty(t.prototype,"urlString",{get:function(){return this._urlString},enumerable:!1,configurable:!0}),t.canonicalizeUri=function(e){if(e){var r=e.toLowerCase();return N.endsWith(r,"?")?r=r.slice(0,-1):N.endsWith(r,"?/")&&(r=r.slice(0,-2)),N.endsWith(r,"/")||(r+="/"),r}return e},t.prototype.validateAsUri=function(){var e;try{e=this.getUrlComponents()}catch(r){throw He.createUrlParseError(r)}if(!e.HostNameAndPort||!e.PathSegments)throw He.createUrlParseError("Given url string: "+this.urlString);if(!e.Protocol||e.Protocol.toLowerCase()!=="https:")throw He.createInsecureAuthorityUriError(this.urlString)},t.appendQueryString=function(e,r){return N.isEmpty(r)?e:e.indexOf("?")<0?e+"?"+r:e+"&"+r},t.removeHashFromUrl=function(e){return t.canonicalizeUri(e.split("#")[0])},t.prototype.replaceTenantPath=function(e){var r=this.getUrlComponents(),n=r.PathSegments;return e&&n.length!==0&&(n[0]===yd.COMMON||n[0]===yd.ORGANIZATIONS)&&(n[0]=e),t.constructAuthorityUriFromObject(r)},t.prototype.getHash=function(){return t.parseHash(this.urlString)},t.prototype.getUrlComponents=function(){var e=RegExp("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?"),r=this.urlString.match(e);if(!r)throw He.createUrlParseError("Given url string: "+this.urlString);var n={Protocol:r[1],HostNameAndPort:r[4],AbsolutePath:r[5],QueryString:r[7]},i=n.AbsolutePath.split("/");return i=i.filter(function(o){return o&&o.length>0}),n.PathSegments=i,!N.isEmpty(n.QueryString)&&n.QueryString.endsWith("/")&&(n.QueryString=n.QueryString.substring(0,n.QueryString.length-1)),n},t.getDomainFromUrl=function(e){var r=RegExp("^([^:/?#]+://)?([^/?#]*)"),n=e.match(r);if(!n)throw He.createUrlParseError("Given url string: "+e);return n[2]},t.getAbsoluteUrl=function(e,r){if(e[0]===b.FORWARD_SLASH){var n=new t(r),i=n.getUrlComponents();return i.Protocol+"//"+i.HostNameAndPort+e}return e},t.parseHash=function(e){var r=e.indexOf("#"),n=e.indexOf("#/");return n>-1?e.substring(n+2):r>-1?e.substring(r+1):b.EMPTY_STRING},t.parseQueryString=function(e){var r=e.indexOf("?"),n=e.indexOf("/?");return n>-1?e.substring(n+2):r>-1?e.substring(r+1):b.EMPTY_STRING},t.constructAuthorityUriFromObject=function(e){return new t(e.Protocol+"//"+e.HostNameAndPort+"/"+e.PathSegments.join("/"))},t.getDeserializedHash=function(e){if(N.isEmpty(e))return{};var r=t.parseHash(e),n=N.queryStringToObject(N.isEmpty(r)?e:r);if(!n)throw j.createHashNotDeserializedError(JSON.stringify(n));return n},t.getDeserializedQueryString=function(e){if(N.isEmpty(e))return{};var r=t.parseQueryString(e),n=N.queryStringToObject(N.isEmpty(r)?e:r);if(!n)throw j.createHashNotDeserializedError(JSON.stringify(n));return n},t.hashContainsKnownProperties=function(e){if(N.isEmpty(e)||e.indexOf("=")<0)return!1;var r=t.getDeserializedHash(e);return!!(r.code||r.error_description||r.error||r.state)},t}();/*! @azure/msal-common v8.0.0 2022-11-07 */var ju;(function(t){t.SW="sw",t.UHW="uhw"})(ju||(ju={}));var xa=function(){function t(e){this.cryptoUtils=e}return t.prototype.generateCnf=function(e){return J(this,void 0,void 0,function(){var r,n,i;return Z(this,function(o){switch(o.label){case 0:return[4,this.generateKid(e)];case 1:return r=o.sent(),n=this.cryptoUtils.base64Encode(JSON.stringify(r)),i={kid:r.kid,reqCnfString:n},[4,this.cryptoUtils.hashString(n)];case 2:return[2,(i.reqCnfHash=o.sent(),i)]}})})},t.prototype.generateKid=function(e){return J(this,void 0,void 0,function(){var r;return Z(this,function(n){switch(n.label){case 0:return[4,this.cryptoUtils.getPublicKeyThumbprint(e)];case 1:return r=n.sent(),[2,{kid:r,xms_ksl:ju.SW}]}})})},t.prototype.signPopToken=function(e,r,n){return J(this,void 0,void 0,function(){return Z(this,function(i){return[2,this.signPayload(e,r,n)]})})},t.prototype.signPayload=function(e,r,n,i){return J(this,void 0,void 0,function(){var o,a,s,c,l,d;return Z(this,function(h){switch(h.label){case 0:return o=n.resourceRequestMethod,a=n.resourceRequestUri,s=n.shrClaims,c=n.shrNonce,l=a?new me(a):void 0,d=l==null?void 0:l.getUrlComponents(),[4,this.cryptoUtils.signJwt(Te({at:e,ts:Vr.nowSeconds(),m:o==null?void 0:o.toUpperCase(),u:d==null?void 0:d.HostNameAndPort,nonce:c||this.cryptoUtils.createNewGuid(),p:d==null?void 0:d.AbsolutePath,q:d!=null&&d.QueryString?[[],d.QueryString]:void 0,client_claims:s||void 0},i),r,n.correlationId)];case 1:return[2,h.sent()]}})})},t}();/*! @azure/msal-common v8.0.0 2022-11-07 */var Bu=function(){function t(){}return t.prototype.generateAppMetadataKey=function(){return t.generateAppMetadataCacheKey(this.environment,this.clientId)},t.generateAppMetadataCacheKey=function(e,r){var n=[Fu,e,r];return n.join(xr.CACHE_KEY_SEPARATOR).toLowerCase()},t.createAppMetadataEntity=function(e,r,n){var i=new t;return i.clientId=e,i.environment=r,n&&(i.familyId=n),i},t.isAppMetadataEntity=function(e,r){return r?e.indexOf(Fu)===0&&r.hasOwnProperty("clientId")&&r.hasOwnProperty("environment"):!1},t}();/*! @azure/msal-common v8.0.0 2022-11-07 */var Iy=function(){function t(e,r){this.cache=e,this.hasChanged=r}return Object.defineProperty(t.prototype,"cacheHasChanged",{get:function(){return this.hasChanged},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tokenCache",{get:function(){return this.cache},enumerable:!1,configurable:!0}),t}();/*! @azure/msal-common v8.0.0 2022-11-07 */var kd=function(){function t(e,r,n,i,o,a){this.clientId=e,this.cacheStorage=r,this.cryptoObj=n,this.logger=i,this.serializableCache=o,this.persistencePlugin=a}return t.prototype.validateServerAuthorizationCodeResponse=function(e,r,n){if(!e.state||!r)throw e.state?j.createStateNotFoundError("Cached State"):j.createStateNotFoundError("Server State");if(decodeURIComponent(e.state)!==decodeURIComponent(r))throw j.createStateMismatchError();if(e.error||e.error_description||e.suberror)throw Zr.isInteractionRequiredError(e.error,e.error_description,e.suberror)?new Zr(e.error||b.EMPTY_STRING,e.error_description,e.suberror):new go(e.error||b.EMPTY_STRING,e.error_description,e.suberror);e.client_info&&Cd(e.client_info,n)},t.prototype.validateTokenResponse=function(e){if(e.error||e.error_description||e.suberror){if(Zr.isInteractionRequiredError(e.error,e.error_description,e.suberror))throw new Zr(e.error,e.error_description,e.suberror);var r=e.error_codes+" - ["+e.timestamp+"]: "+e.error_description+" - Correlation ID: "+e.correlation_id+" - Trace ID: "+e.trace_id;throw new go(e.error,r,e.suberror)}},t.prototype.handleServerTokenResponse=function(e,r,n,i,o,a,s,c,l){return J(this,void 0,void 0,function(){var d,h,u,f,v,g,x;return Z(this,function(m){switch(m.label){case 0:if(e.id_token){if(d=new wn(e.id_token||b.EMPTY_STRING,this.cryptoObj),o&&!N.isEmpty(o.nonce)&&d.claims.nonce!==o.nonce)throw j.createNonceMismatchError();if(i.maxAge||i.maxAge===0){if(h=d.claims.auth_time,!h)throw j.createAuthTimeNotFoundError();wn.checkMaxAge(h,i.maxAge)}}this.homeAccountIdentifier=_t.generateHomeAccountId(e.client_info||b.EMPTY_STRING,r.authorityType,this.logger,this.cryptoObj,d),!!o&&!!o.state&&(u=Un.parseRequestState(this.cryptoObj,o.state)),e.key_id=e.key_id||i.sshKid||void 0,f=this.generateCacheRecord(e,r,n,i,d,a,o),m.label=1;case 1:return m.trys.push([1,,5,8]),this.persistencePlugin&&this.serializableCache?(this.logger.verbose("Persistence enabled, calling beforeCacheAccess"),v=new Iy(this.serializableCache,!0),[4,this.persistencePlugin.beforeCacheAccess(v)]):[3,3];case 2:m.sent(),m.label=3;case 3:return s&&!c&&f.account&&(g=f.account.generateAccountKey(),x=this.cacheStorage.getAccount(g),!x)?(this.logger.warning("Account used to refresh tokens not in persistence, refreshed tokens will not be stored in the cache"),[2,t.generateAuthenticationResult(this.cryptoObj,r,f,!1,i,d,u,void 0,l)]):[4,this.cacheStorage.saveCacheRecord(f)];case 4:return m.sent(),[3,8];case 5:return this.persistencePlugin&&this.serializableCache&&v?(this.logger.verbose("Persistence enabled, calling afterCacheAccess"),[4,this.persistencePlugin.afterCacheAccess(v)]):[3,7];case 6:m.sent(),m.label=7;case 7:return[7];case 8:return[2,t.generateAuthenticationResult(this.cryptoObj,r,f,!1,i,d,u,e.spa_code,l)]}})})},t.prototype.generateCacheRecord=function(e,r,n,i,o,a,s){var c=r.getPreferredCache();if(N.isEmpty(c))throw j.createInvalidCacheEnvironmentError();var l,d;!N.isEmpty(e.id_token)&&!!o&&(l=nc.createIdTokenEntity(this.homeAccountIdentifier,c,e.id_token||b.EMPTY_STRING,this.clientId,o.claims.tid||b.EMPTY_STRING),d=this.generateAccountEntity(e,o,r,s));var h=null;if(!N.isEmpty(e.access_token)){var u=e.scope?Wt.fromString(e.scope):new Wt(i.scopes||[]),f=(typeof e.expires_in=="string"?parseInt(e.expires_in,10):e.expires_in)||0,v=(typeof e.ext_expires_in=="string"?parseInt(e.ext_expires_in,10):e.ext_expires_in)||0,g=(typeof e.refresh_in=="string"?parseInt(e.refresh_in,10):e.refresh_in)||void 0,x=n+f,m=x+v,p=g&&g>0?n+g:void 0;h=ic.createAccessTokenEntity(this.homeAccountIdentifier,c,e.access_token||b.EMPTY_STRING,this.clientId,o?o.claims.tid||b.EMPTY_STRING:r.tenant,u.printScopes(),x,m,this.cryptoObj,p,e.token_type,a,e.key_id,i.claims,i.requestedClaimsHash)}var y=null;N.isEmpty(e.refresh_token)||(y=Sd.createRefreshTokenEntity(this.homeAccountIdentifier,c,e.refresh_token||b.EMPTY_STRING,this.clientId,e.foci,a));var w=null;return N.isEmpty(e.foci)||(w=Bu.createAppMetadataEntity(this.clientId,c,e.foci)),new Il(d,l,h,y,w)},t.prototype.generateAccountEntity=function(e,r,n,i){var o=n.authorityType,a=i?i.cloud_graph_host_name:b.EMPTY_STRING,s=i?i.msgraph_host:b.EMPTY_STRING;if(o===Hr.Adfs)return this.logger.verbose("Authority type is ADFS, creating ADFS account"),_t.createGenericAccount(this.homeAccountIdentifier,r,n,a,s);if(N.isEmpty(e.client_info)&&n.protocolMode==="AAD")throw j.createClientInfoEmptyError();return e.client_info?_t.createAccount(e.client_info,this.homeAccountIdentifier,r,n,a,s):_t.createGenericAccount(this.homeAccountIdentifier,r,n,a,s)},t.generateAuthenticationResult=function(e,r,n,i,o,a,s,c,l){var d,h,u;return J(this,void 0,void 0,function(){var f,v,g,x,m,p,y,w,T,L,V;return Z(this,function(D){switch(D.label){case 0:if(f=b.EMPTY_STRING,v=[],g=null,m=b.EMPTY_STRING,!n.accessToken)return[3,4];if(n.accessToken.tokenType!==be.POP)return[3,2];if(p=new xa(e),y=n.accessToken,w=y.secret,T=y.keyId,!T)throw j.createKeyIdMissingError();return[4,p.signPopToken(w,T,o)];case 1:return f=D.sent(),[3,3];case 2:f=n.accessToken.secret,D.label=3;case 3:v=Wt.fromString(n.accessToken.target).asArray(),g=new Date(Number(n.accessToken.expiresOn)*1e3),x=new Date(Number(n.accessToken.extendedExpiresOn)*1e3),D.label=4;case 4:return n.appMetadata&&(m=n.appMetadata.familyId===wd?wd:b.EMPTY_STRING),L=(a==null?void 0:a.claims.oid)||(a==null?void 0:a.claims.sub)||b.EMPTY_STRING,V=(a==null?void 0:a.claims.tid)||b.EMPTY_STRING,[2,{authority:r.canonicalAuthority,uniqueId:L,tenantId:V,scopes:v,account:n.account?n.account.getAccountInfo():null,idToken:a?a.rawToken:b.EMPTY_STRING,idTokenClaims:a?a.claims:{},accessToken:f,fromCache:i,expiresOn:g,correlationId:o.correlationId,requestId:l||b.EMPTY_STRING,extExpiresOn:x,familyId:m,tokenType:((d=n.accessToken)===null||d===void 0?void 0:d.tokenType)||b.EMPTY_STRING,state:s?s.userRequestState:b.EMPTY_STRING,cloudGraphHostName:((h=n.account)===null||h===void 0?void 0:h.cloudGraphHostName)||b.EMPTY_STRING,msGraphHost:((u=n.account)===null||u===void 0?void 0:u.msGraphHost)||b.EMPTY_STRING,code:c,fromNativeBroker:!1}]}})})},t}();/*! @azure/msal-common v8.0.0 2022-11-07 */var Tg=function(t){ur(e,t);function e(r){var n=t.call(this,r)||this;return n.includeRedirectUri=!0,n}return e.prototype.getAuthCodeUrl=function(r){return J(this,void 0,void 0,function(){var n;return Z(this,function(i){switch(i.label){case 0:return[4,this.createAuthCodeUrlQueryString(r)];case 1:return n=i.sent(),[2,me.appendQueryString(this.authority.authorizationEndpoint,n)]}})})},e.prototype.acquireToken=function(r,n){var i;return J(this,void 0,void 0,function(){var o,a,s,c;return Z(this,function(l){switch(l.label){case 0:if(this.logger.info("in acquireToken call"),!r||N.isEmpty(r.code))throw j.createTokenRequestCannotBeMadeError();return o=Vr.nowSeconds(),[4,this.executeTokenRequest(this.authority,r)];case 1:return a=l.sent(),s=(i=a.headers)===null||i===void 0?void 0:i[nn.X_MS_REQUEST_ID],c=new kd(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,this.config.serializableCache,this.config.persistencePlugin),c.validateTokenResponse(a.body),[4,c.handleServerTokenResponse(a.body,this.authority,o,r,n,void 0,void 0,void 0,s)];case 2:return[2,l.sent()]}})})},e.prototype.handleFragmentResponse=function(r,n){var i=new kd(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,null,null),o=new me(r),a=me.getDeserializedHash(o.getHash());if(i.validateServerAuthorizationCodeResponse(a,n,this.cryptoUtils),!a.code)throw j.createNoAuthCodeInServerResponseError();return Te(Te({},a),{code:a.code})},e.prototype.getLogoutUri=function(r){if(!r)throw He.createEmptyLogoutRequestError();var n=this.createLogoutUrlQueryString(r);return me.appendQueryString(this.authority.endSessionEndpoint,n)},e.prototype.executeTokenRequest=function(r,n){return J(this,void 0,void 0,function(){var i,o,a,s,c,l,d;return Z(this,function(h){switch(h.label){case 0:return i={clientId:this.config.authOptions.clientId,authority:r.canonicalAuthority,scopes:n.scopes,claims:n.claims,authenticationScheme:n.authenticationScheme,resourceRequestMethod:n.resourceRequestMethod,resourceRequestUri:n.resourceRequestUri,shrClaims:n.shrClaims,sshKid:n.sshKid},[4,this.createTokenRequestBody(n)];case 1:if(o=h.sent(),a=this.createTokenQueryParameters(n),s=void 0,n.clientInfo)try{c=Cd(n.clientInfo,this.cryptoUtils),s={credential:""+c.uid+xr.CLIENT_INFO_SEPARATOR+c.utid,type:_r.HOME_ACCOUNT_ID}}catch(u){this.logger.verbose("Could not parse client info for CCS Header: "+u)}return l=this.createTokenRequestHeaders(s||n.ccsCredential),d=N.isEmpty(a)?r.tokenEndpoint:r.tokenEndpoint+"?"+a,[2,this.executePostToTokenEndpoint(d,o,l,i)]}})})},e.prototype.createTokenQueryParameters=function(r){var n=new ea;return r.tokenQueryParameters&&n.addExtraQueryParameters(r.tokenQueryParameters),n.createQueryString()},e.prototype.createTokenRequestBody=function(r){return J(this,void 0,void 0,function(){var n,i,o,a,s,c,l,l,d;return Z(this,function(h){switch(h.label){case 0:return n=new ea,n.addClientId(this.config.authOptions.clientId),this.includeRedirectUri?n.addRedirectUri(r.redirectUri):ji.validateRedirectUri(r.redirectUri),n.addScopes(r.scopes),n.addAuthorizationCode(r.code),n.addLibraryInfo(this.config.libraryInfo),n.addApplicationTelemetry(this.config.telemetry.application),n.addThrottling(),this.serverTelemetryManager&&n.addServerTelemetry(this.serverTelemetryManager),r.codeVerifier&&n.addCodeVerifier(r.codeVerifier),this.config.clientCredentials.clientSecret&&n.addClientSecret(this.config.clientCredentials.clientSecret),this.config.clientCredentials.clientAssertion&&(i=this.config.clientCredentials.clientAssertion,n.addClientAssertion(i.assertion),n.addClientAssertionType(i.assertionType)),n.addGrantType(bd.AUTHORIZATION_CODE_GRANT),n.addClientInfo(),r.authenticationScheme!==be.POP?[3,2]:(o=new xa(this.cryptoUtils),[4,o.generateCnf(r)]);case 1:return a=h.sent(),n.addPopToken(a.reqCnfString),[3,3];case 2:if(r.authenticationScheme===be.SSH)if(r.sshJwk)n.addSshJwk(r.sshJwk);else throw He.createMissingSshJwkError();h.label=3;case 3:if(s=r.correlationId||this.config.cryptoInterface.createNewGuid(),n.addCorrelationId(s),(!N.isEmptyObj(r.claims)||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&n.addClaims(r.claims,this.config.authOptions.clientCapabilities),c=void 0,r.clientInfo)try{l=Cd(r.clientInfo,this.cryptoUtils),c={credential:""+l.uid+xr.CLIENT_INFO_SEPARATOR+l.utid,type:_r.HOME_ACCOUNT_ID}}catch(u){this.logger.verbose("Could not parse client info for CCS Header: "+u)}else c=r.ccsCredential;if(this.config.systemOptions.preventCorsPreflight&&c)switch(c.type){case _r.HOME_ACCOUNT_ID:try{l=Zo(c.credential),n.addCcsOid(l)}catch(u){this.logger.verbose("Could not parse home account ID for CCS Header: "+u)}break;case _r.UPN:n.addCcsUpn(c.credential);break}return r.tokenBodyParameters&&n.addExtraQueryParameters(r.tokenBodyParameters),r.enableSpaAuthorizationCode&&(!r.tokenBodyParameters||!r.tokenBodyParameters[re.RETURN_SPA_CODE])&&n.addExtraQueryParameters((d={},d[re.RETURN_SPA_CODE]="1",d)),[2,n.createQueryString()]}})})},e.prototype.createAuthCodeUrlQueryString=function(r){return J(this,void 0,void 0,function(){var n,i,o,a,s,c,c,c,l,d;return Z(this,function(h){switch(h.label){case 0:if(n=new ea,n.addClientId(this.config.authOptions.clientId),i=s1(r.scopes||[],r.extraScopesToConsent||[]),n.addScopes(i),n.addRedirectUri(r.redirectUri),o=r.correlationId||this.config.cryptoInterface.createNewGuid(),n.addCorrelationId(o),n.addResponseMode(r.responseMode),n.addResponseTypeCode(),n.addLibraryInfo(this.config.libraryInfo),n.addApplicationTelemetry(this.config.telemetry.application),n.addClientInfo(),r.codeChallenge&&r.codeChallengeMethod&&n.addCodeChallengeParams(r.codeChallenge,r.codeChallengeMethod),r.prompt&&n.addPrompt(r.prompt),r.domainHint&&n.addDomainHint(r.domainHint),r.prompt!==Nt.SELECT_ACCOUNT)if(r.sid&&r.prompt===Nt.NONE)this.logger.verbose("createAuthCodeUrlQueryString: Prompt is none, adding sid from request"),n.addSid(r.sid);else if(r.account){if(a=this.extractAccountSid(r.account),s=this.extractLoginHint(r.account),s){this.logger.verbose("createAuthCodeUrlQueryString: login_hint claim present on account"),n.addLoginHint(s);try{c=Zo(r.account.homeAccountId),n.addCcsOid(c)}catch{this.logger.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header")}}else if(a&&r.prompt===Nt.NONE){this.logger.verbose("createAuthCodeUrlQueryString: Prompt is none, adding sid from account"),n.addSid(a);try{c=Zo(r.account.homeAccountId),n.addCcsOid(c)}catch{this.logger.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header")}}else if(r.loginHint)this.logger.verbose("createAuthCodeUrlQueryString: Adding login_hint from request"),n.addLoginHint(r.loginHint),n.addCcsUpn(r.loginHint);else if(r.account.username){this.logger.verbose("createAuthCodeUrlQueryString: Adding login_hint from account"),n.addLoginHint(r.account.username);try{c=Zo(r.account.homeAccountId),n.addCcsOid(c)}catch{this.logger.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header")}}}else r.loginHint&&(this.logger.verbose("createAuthCodeUrlQueryString: No account, adding login_hint from request"),n.addLoginHint(r.loginHint),n.addCcsUpn(r.loginHint));else this.logger.verbose("createAuthCodeUrlQueryString: Prompt is select_account, ignoring account hints");return r.nonce&&n.addNonce(r.nonce),r.state&&n.addState(r.state),(!N.isEmpty(r.claims)||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&n.addClaims(r.claims,this.config.authOptions.clientCapabilities),r.extraQueryParameters&&n.addExtraQueryParameters(r.extraQueryParameters),r.nativeBroker?(n.addNativeBroker(),r.authenticationScheme!==be.POP?[3,2]:(l=new xa(this.cryptoUtils),[4,l.generateCnf(r)])):[3,2];case 1:d=h.sent(),n.addPopToken(d.reqCnfHash),h.label=2;case 2:return[2,n.createQueryString()]}})})},e.prototype.createLogoutUrlQueryString=function(r){var n=new ea;return r.postLogoutRedirectUri&&n.addPostLogoutRedirectUri(r.postLogoutRedirectUri),r.correlationId&&n.addCorrelationId(r.correlationId),r.idTokenHint&&n.addIdTokenHint(r.idTokenHint),r.state&&n.addState(r.state),r.logoutHint&&n.addLogoutHint(r.logoutHint),r.extraQueryParameters&&n.addExtraQueryParameters(r.extraQueryParameters),n.createQueryString()},e.prototype.extractAccountSid=function(r){var n;return((n=r.idTokenClaims)===null||n===void 0?void 0:n.sid)||null},e.prototype.extractLoginHint=function(r){var n;return((n=r.idTokenClaims)===null||n===void 0?void 0:n.login_hint)||null},e}(R0);/*! @azure/msal-common v8.0.0 2022-11-07 */var lt;(function(t){t.AcquireTokenByCode="acquireTokenByCode",t.AcquireTokenByRefreshToken="acquireTokenByRefreshToken",t.AcquireTokenSilent="acquireTokenSilent",t.AcquireTokenSilentAsync="acquireTokenSilentAsync",t.AcquireTokenPopup="acquireTokenPopup",t.CryptoOptsGetPublicKeyThumbprint="cryptoOptsGetPublicKeyThumbprint",t.CryptoOptsSignJwt="cryptoOptsSignJwt",t.SilentCacheClientAcquireToken="silentCacheClientAcquireToken",t.SilentIframeClientAcquireToken="silentIframeClientAcquireToken",t.SilentRefreshClientAcquireToken="silentRefreshClientAcquireToken",t.SsoSilent="ssoSilent",t.StandardInteractionClientGetDiscoveredAuthority="standardInteractionClientGetDiscoveredAuthority",t.FetchAccountIdWithNativeBroker="fetchAccountIdWithNativeBroker",t.NativeInteractionClientAcquireToken="nativeInteractionClientAcquireToken",t.BaseClientCreateTokenRequestHeaders="baseClientCreateTokenRequestHeaders",t.BrokerHandhshake="brokerHandshake",t.AcquireTokenByRefreshTokenInBroker="acquireTokenByRefreshTokenInBroker",t.AcquireTokenByBroker="acquireTokenByBroker",t.RefreshTokenClientExecuteTokenRequest="refreshTokenClientExecuteTokenRequest",t.RefreshTokenClientAcquireToken="refreshTokenClientAcquireToken",t.RefreshTokenClientAcquireTokenWithCachedRefreshToken="refreshTokenClientAcquireTokenWithCachedRefreshToken"})(lt||(lt={}));var ta;(function(t){t[t.NotStarted=0]="NotStarted",t[t.InProgress=1]="InProgress",t[t.Completed=2]="Completed"})(ta||(ta={}));/*! @azure/msal-common v8.0.0 2022-11-07 */var Ag=function(t){ur(e,t);function e(r,n){return t.call(this,r,n)||this}return e.prototype.acquireToken=function(r){var n,i,o;return J(this,void 0,void 0,function(){var a,s,c,l,d,h=this;return Z(this,function(u){switch(u.label){case 0:return a=(n=this.performanceClient)===null||n===void 0?void 0:n.startMeasurement(lt.RefreshTokenClientAcquireToken,r.correlationId),this.logger.verbose("RefreshTokenClientAcquireToken called",r.correlationId),s=Vr.nowSeconds(),[4,this.executeTokenRequest(r,this.authority)];case 1:return c=u.sent(),a==null||a.addStaticFields({refreshTokenSize:((i=c.body.refresh_token)===null||i===void 0?void 0:i.length)||0}),l=(o=c.headers)===null||o===void 0?void 0:o[nn.X_MS_REQUEST_ID],d=new kd(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,this.config.serializableCache,this.config.persistencePlugin),d.validateTokenResponse(c.body),[2,d.handleServerTokenResponse(c.body,this.authority,s,r,void 0,void 0,!0,r.forceCache,l).then(function(f){return a==null||a.endMeasurement({success:!0}),f}).catch(function(f){throw h.logger.verbose("Error in fetching refresh token",r.correlationId),a==null||a.endMeasurement({errorCode:f.errorCode,subErrorCode:f.subError,success:!1}),f})]}})})},e.prototype.acquireTokenByRefreshToken=function(r){return J(this,void 0,void 0,function(){var n,i,o;return Z(this,function(a){if(!r)throw He.createEmptyTokenRequestError();if(!r.account)throw j.createNoAccountInSilentRequestError();if(n=this.cacheManager.isAppMetadataFOCI(r.account.environment,this.config.authOptions.clientId),n)try{return[2,this.acquireTokenWithCachedRefreshToken(r,!0)]}catch(s){if(i=s instanceof Zr&&s.errorCode===cs.noTokensFoundError.code,o=s instanceof go&&s.errorCode===Ip.INVALID_GRANT_ERROR&&s.subError===Ip.CLIENT_MISMATCH_ERROR,i||o)return[2,this.acquireTokenWithCachedRefreshToken(r,!1)];throw s}return[2,this.acquireTokenWithCachedRefreshToken(r,!1)]})})},e.prototype.acquireTokenWithCachedRefreshToken=function(r,n){var i;return J(this,void 0,void 0,function(){var o,a,s;return Z(this,function(c){if(o=(i=this.performanceClient)===null||i===void 0?void 0:i.startMeasurement(lt.RefreshTokenClientAcquireTokenWithCachedRefreshToken,r.correlationId),this.logger.verbose("RefreshTokenClientAcquireTokenWithCachedRefreshToken called",r.correlationId),a=this.cacheManager.readRefreshTokenFromCache(this.config.authOptions.clientId,r.account,n),!a)throw o==null||o.discardMeasurement(),Zr.createNoTokensFoundError();return o==null||o.endMeasurement({success:!0}),s=Te(Te({},r),{refreshToken:a.secret,authenticationScheme:r.authenticationScheme||be.BEARER,ccsCredential:{credential:r.account.homeAccountId,type:_r.HOME_ACCOUNT_ID}}),[2,this.acquireToken(s)]})})},e.prototype.executeTokenRequest=function(r,n){var i;return J(this,void 0,void 0,function(){var o,a,s,c,l,d;return Z(this,function(h){switch(h.label){case 0:return o=(i=this.performanceClient)===null||i===void 0?void 0:i.startMeasurement(lt.RefreshTokenClientExecuteTokenRequest,r.correlationId),[4,this.createTokenRequestBody(r)];case 1:return a=h.sent(),s=this.createTokenQueryParameters(r),c=this.createTokenRequestHeaders(r.ccsCredential),l={clientId:this.config.authOptions.clientId,authority:n.canonicalAuthority,scopes:r.scopes,claims:r.claims,authenticationScheme:r.authenticationScheme,resourceRequestMethod:r.resourceRequestMethod,resourceRequestUri:r.resourceRequestUri,shrClaims:r.shrClaims,sshKid:r.sshKid},d=me.appendQueryString(n.tokenEndpoint,s),[2,this.executePostToTokenEndpoint(d,a,c,l).then(function(u){return o==null||o.endMeasurement({success:!0}),u}).catch(function(u){throw o==null||o.endMeasurement({success:!1}),u})]}})})},e.prototype.createTokenQueryParameters=function(r){var n=new ea;return r.tokenQueryParameters&&n.addExtraQueryParameters(r.tokenQueryParameters),n.createQueryString()},e.prototype.createTokenRequestBody=function(r){var n;return J(this,void 0,void 0,function(){var i,o,a,s,c,l,d;return Z(this,function(h){switch(h.label){case 0:return i=r.correlationId,o=(n=this.performanceClient)===null||n===void 0?void 0:n.startMeasurement(lt.BaseClientCreateTokenRequestHeaders,i),a=new ea,a.addClientId(this.config.authOptions.clientId),a.addScopes(r.scopes),a.addGrantType(bd.REFRESH_TOKEN_GRANT),a.addClientInfo(),a.addLibraryInfo(this.config.libraryInfo),a.addApplicationTelemetry(this.config.telemetry.application),a.addThrottling(),this.serverTelemetryManager&&a.addServerTelemetry(this.serverTelemetryManager),a.addCorrelationId(i),a.addRefreshToken(r.refreshToken),this.config.clientCredentials.clientSecret&&a.addClientSecret(this.config.clientCredentials.clientSecret),this.config.clientCredentials.clientAssertion&&(s=this.config.clientCredentials.clientAssertion,a.addClientAssertion(s.assertion),a.addClientAssertionType(s.assertionType)),r.authenticationScheme!==be.POP?[3,2]:(c=new xa(this.cryptoUtils),[4,c.generateCnf(r)]);case 1:return l=h.sent(),a.addPopToken(l.reqCnfString),[3,3];case 2:if(r.authenticationScheme===be.SSH)if(r.sshJwk)a.addSshJwk(r.sshJwk);else throw o==null||o.endMeasurement({success:!1}),He.createMissingSshJwkError();h.label=3;case 3:if((!N.isEmptyObj(r.claims)||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&a.addClaims(r.claims,this.config.authOptions.clientCapabilities),this.config.systemOptions.preventCorsPreflight&&r.ccsCredential)switch(r.ccsCredential.type){case _r.HOME_ACCOUNT_ID:try{d=Zo(r.ccsCredential.credential),a.addCcsOid(d)}catch(u){this.logger.verbose("Could not parse home account ID for CCS Header: "+u)}break;case _r.UPN:a.addCcsUpn(r.ccsCredential.credential);break}return o==null||o.endMeasurement({success:!0}),[2,a.createQueryString()]}})})},e}(R0);/*! @azure/msal-common v8.0.0 2022-11-07 */var My=function(t){ur(e,t);function e(r,n){return t.call(this,r,n)||this}return e.prototype.acquireToken=function(r){return J(this,void 0,void 0,function(){var n,i;return Z(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,this.acquireCachedToken(r)];case 1:return[2,o.sent()];case 2:if(n=o.sent(),n instanceof j&&n.errorCode===M.tokenRefreshRequired.code)return i=new Ag(this.config,this.performanceClient),[2,i.acquireTokenByRefreshToken(r)];throw n;case 3:return[2]}})})},e.prototype.acquireCachedToken=function(r){var n,i,o,a;return J(this,void 0,void 0,function(){var s,c;return Z(this,function(l){switch(l.label){case 0:if(!r)throw He.createEmptyTokenRequestError();if(r.forceRefresh)throw(n=this.serverTelemetryManager)===null||n===void 0||n.setCacheOutcome(Zi.FORCE_REFRESH),this.logger.info("SilentFlowClient:acquireCachedToken - Skipping cache because forceRefresh is true."),j.createRefreshRequiredError();if(!r.account)throw j.createNoAccountInSilentRequestError();if(s=r.authority||this.authority.getPreferredCache(),c=this.cacheManager.readCacheRecord(r.account,this.config.authOptions.clientId,r,s),c.accessToken){if(Vr.wasClockTurnedBack(c.accessToken.cachedAt)||Vr.isTokenExpired(c.accessToken.expiresOn,this.config.systemOptions.tokenRenewalOffsetSeconds))throw(o=this.serverTelemetryManager)===null||o===void 0||o.setCacheOutcome(Zi.CACHED_ACCESS_TOKEN_EXPIRED),this.logger.info("SilentFlowClient:acquireCachedToken - Cached access token is expired or will expire within "+this.config.systemOptions.tokenRenewalOffsetSeconds+" seconds."),j.createRefreshRequiredError();if(c.accessToken.refreshOn&&Vr.isTokenExpired(c.accessToken.refreshOn,0))throw(a=this.serverTelemetryManager)===null||a===void 0||a.setCacheOutcome(Zi.REFRESH_CACHED_ACCESS_TOKEN),this.logger.info("SilentFlowClient:acquireCachedToken - Cached access token's refreshOn property has been exceeded'."),j.createRefreshRequiredError()}else throw(i=this.serverTelemetryManager)===null||i===void 0||i.setCacheOutcome(Zi.NO_CACHED_ACCESS_TOKEN),this.logger.info("SilentFlowClient:acquireCachedToken - No access token found in cache for the given properties."),j.createRefreshRequiredError();return this.config.serverTelemetryManager&&this.config.serverTelemetryManager.incrementCacheHits(),[4,this.generateResultFromCacheRecord(c,r)];case 1:return[2,l.sent()]}})})},e.prototype.generateResultFromCacheRecord=function(r,n){return J(this,void 0,void 0,function(){var i,o;return Z(this,function(a){switch(a.label){case 0:if(r.idToken&&(i=new wn(r.idToken.secret,this.config.cryptoInterface)),n.maxAge||n.maxAge===0){if(o=i==null?void 0:i.claims.auth_time,!o)throw j.createAuthTimeNotFoundError();wn.checkMaxAge(o,n.maxAge)}return[4,kd.generateAuthenticationResult(this.cryptoUtils,this.authority,r,!0,n,i)];case 1:return[2,a.sent()]}})})},e}(R0);/*! @azure/msal-common v8.0.0 2022-11-07 */function Py(t){return t.hasOwnProperty("authorization_endpoint")&&t.hasOwnProperty("token_endpoint")&&t.hasOwnProperty("issuer")&&t.hasOwnProperty("jwks_uri")}/*! @azure/msal-common v8.0.0 2022-11-07 */var Ig={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"]}]}}},Pp=Ig.endpointMetadata,Rp=Ig.instanceDiscoveryMetadata;/*! @azure/msal-common v8.0.0 2022-11-07 */var Td;(function(t){t.AAD="AAD",t.OIDC="OIDC"})(Td||(Td={}));/*! @azure/msal-common v8.0.0 2022-11-07 */var qu=function(){function t(){this.expiresAt=Vr.nowSeconds()+Ms.REFRESH_TIME_SECONDS}return t.prototype.updateCloudDiscoveryMetadata=function(e,r){this.aliases=e.aliases,this.preferred_cache=e.preferred_cache,this.preferred_network=e.preferred_network,this.aliasesFromNetwork=r},t.prototype.updateEndpointMetadata=function(e,r){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=r,this.jwks_uri=e.jwks_uri},t.prototype.updateCanonicalAuthority=function(e){this.canonical_authority=e},t.prototype.resetExpiresAt=function(){this.expiresAt=Vr.nowSeconds()+Ms.REFRESH_TIME_SECONDS},t.prototype.isExpired=function(){return this.expiresAt<=Vr.nowSeconds()},t.isAuthorityMetadataEntity=function(e,r){return r?e.indexOf(Ms.CACHE_KEY)===0&&r.hasOwnProperty("aliases")&&r.hasOwnProperty("preferred_cache")&&r.hasOwnProperty("preferred_network")&&r.hasOwnProperty("canonical_authority")&&r.hasOwnProperty("authorization_endpoint")&&r.hasOwnProperty("token_endpoint")&&r.hasOwnProperty("issuer")&&r.hasOwnProperty("aliasesFromNetwork")&&r.hasOwnProperty("endpointsFromNetwork")&&r.hasOwnProperty("expiresAt")&&r.hasOwnProperty("jwks_uri"):!1},t}();/*! @azure/msal-common v8.0.0 2022-11-07 */function Ry(t){return t.hasOwnProperty("tenant_discovery_endpoint")&&t.hasOwnProperty("metadata")}/*! @azure/msal-common v8.0.0 2022-11-07 */var Hy=function(){function t(e){this.networkInterface=e}return t.prototype.detectRegion=function(e,r,n){return J(this,void 0,void 0,function(){var i,o,a,s,c;return Z(this,function(l){switch(l.label){case 0:if(i=e,i)return[3,8];o=t.IMDS_OPTIONS,n&&(o.proxyUrl=n),l.label=1;case 1:return l.trys.push([1,6,,7]),[4,this.getRegionFromIMDS(b.IMDS_VERSION,o)];case 2:return a=l.sent(),a.status===Jo.httpSuccess&&(i=a.body,r.region_source=di.IMDS),a.status!==Jo.httpBadRequest?[3,5]:[4,this.getCurrentVersion(o)];case 3:return s=l.sent(),s?[4,this.getRegionFromIMDS(s,o)]:(r.region_source=di.FAILED_AUTO_DETECTION,[2,null]);case 4:c=l.sent(),c.status===Jo.httpSuccess&&(i=c.body,r.region_source=di.IMDS),l.label=5;case 5:return[3,7];case 6:return l.sent(),r.region_source=di.FAILED_AUTO_DETECTION,[2,null];case 7:return[3,9];case 8:r.region_source=di.ENVIRONMENT_VARIABLE,l.label=9;case 9:return i||(r.region_source=di.FAILED_AUTO_DETECTION),[2,i||null]}})})},t.prototype.getRegionFromIMDS=function(e,r){return J(this,void 0,void 0,function(){return Z(this,function(n){return[2,this.networkInterface.sendGetRequestAsync(b.IMDS_ENDPOINT+"?api-version="+e+"&format=text",r,b.IMDS_TIMEOUT)]})})},t.prototype.getCurrentVersion=function(e){return J(this,void 0,void 0,function(){var r;return Z(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.networkInterface.sendGetRequestAsync(b.IMDS_ENDPOINT+"?format=json",e)];case 1:return r=n.sent(),r.status===Jo.httpBadRequest&&r.body&&r.body["newest-versions"]&&r.body["newest-versions"].length>0?[2,r.body["newest-versions"][0]]:[2,null];case 2:return n.sent(),[2,null];case 3:return[2]}})})},t.IMDS_OPTIONS={headers:{Metadata:"true"}},t}();/*! @azure/msal-common v8.0.0 2022-11-07 */var Ad=function(){function t(e,r,n,i,o){this.canonicalAuthority=e,this._canonicalAuthority.validateAsUri(),this.networkInterface=r,this.cacheManager=n,this.authorityOptions=i,this.regionDiscovery=new Hy(r),this.regionDiscoveryMetadata={region_used:void 0,region_source:void 0,region_outcome:void 0},this.proxyUrl=o||b.EMPTY_STRING}return Object.defineProperty(t.prototype,"authorityType",{get:function(){var e=this.canonicalAuthorityUrlComponents.PathSegments;if(e.length)switch(e[0].toLowerCase()){case b.ADFS:return Hr.Adfs;case b.DSTS:return Hr.Dsts}return Hr.Default},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"protocolMode",{get:function(){return this.authorityOptions.protocolMode},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"options",{get:function(){return this.authorityOptions},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"canonicalAuthority",{get:function(){return this._canonicalAuthority.urlString},set:function(e){this._canonicalAuthority=new me(e),this._canonicalAuthority.validateAsUri(),this._canonicalAuthorityUrlComponents=null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"canonicalAuthorityUrlComponents",{get:function(){return this._canonicalAuthorityUrlComponents||(this._canonicalAuthorityUrlComponents=this._canonicalAuthority.getUrlComponents()),this._canonicalAuthorityUrlComponents},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hostnameAndPort",{get:function(){return this.canonicalAuthorityUrlComponents.HostNameAndPort.toLowerCase()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tenant",{get:function(){return this.canonicalAuthorityUrlComponents.PathSegments[0]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"authorizationEndpoint",{get:function(){if(this.discoveryComplete()){var e=this.replacePath(this.metadata.authorization_endpoint);return this.replaceTenant(e)}else throw j.createEndpointDiscoveryIncompleteError("Discovery incomplete.")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tokenEndpoint",{get:function(){if(this.discoveryComplete()){var e=this.replacePath(this.metadata.token_endpoint);return this.replaceTenant(e)}else throw j.createEndpointDiscoveryIncompleteError("Discovery incomplete.")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"deviceCodeEndpoint",{get:function(){if(this.discoveryComplete()){var e=this.replacePath(this.metadata.token_endpoint.replace("/token","/devicecode"));return this.replaceTenant(e)}else throw j.createEndpointDiscoveryIncompleteError("Discovery incomplete.")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"endSessionEndpoint",{get:function(){if(this.discoveryComplete()){if(!this.metadata.end_session_endpoint)throw j.createLogoutNotSupportedError();var e=this.replacePath(this.metadata.end_session_endpoint);return this.replaceTenant(e)}else throw j.createEndpointDiscoveryIncompleteError("Discovery incomplete.")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"selfSignedJwtAudience",{get:function(){if(this.discoveryComplete()){var e=this.replacePath(this.metadata.issuer);return this.replaceTenant(e)}else throw j.createEndpointDiscoveryIncompleteError("Discovery incomplete.")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"jwksUri",{get:function(){if(this.discoveryComplete()){var e=this.replacePath(this.metadata.jwks_uri);return this.replaceTenant(e)}else throw j.createEndpointDiscoveryIncompleteError("Discovery incomplete.")},enumerable:!1,configurable:!0}),t.prototype.replaceTenant=function(e){return e.replace(/{tenant}|{tenantid}/g,this.tenant)},t.prototype.replacePath=function(e){var r=e,n=new me(this.metadata.canonical_authority),i=n.getUrlComponents().PathSegments,o=this.canonicalAuthorityUrlComponents.PathSegments;return o.forEach(function(a,s){var c=i[s];a!==c&&(r=r.replace("/"+c+"/","/"+a+"/"))}),r},Object.defineProperty(t.prototype,"defaultOpenIdConfigurationEndpoint",{get:function(){return this.authorityType===Hr.Adfs||this.authorityType===Hr.Dsts||this.protocolMode===Td.OIDC?this.canonicalAuthority+".well-known/openid-configuration":this.canonicalAuthority+"v2.0/.well-known/openid-configuration"},enumerable:!1,configurable:!0}),t.prototype.discoveryComplete=function(){return!!this.metadata},t.prototype.resolveEndpointsAsync=function(){return J(this,void 0,void 0,function(){var e,r,n,i;return Z(this,function(o){switch(o.label){case 0:return e=this.cacheManager.getAuthorityMetadataByAlias(this.hostnameAndPort),e||(e=new qu,e.updateCanonicalAuthority(this.canonicalAuthority)),[4,this.updateCloudDiscoveryMetadata(e)];case 1:return r=o.sent(),this.canonicalAuthority=this.canonicalAuthority.replace(this.hostnameAndPort,e.preferred_network),[4,this.updateEndpointMetadata(e)];case 2:return n=o.sent(),r!==Ar.CACHE&&n!==Ar.CACHE&&(e.resetExpiresAt(),e.updateCanonicalAuthority(this.canonicalAuthority)),i=this.cacheManager.generateAuthorityMetadataCacheKey(e.preferred_cache),this.cacheManager.setAuthorityMetadata(i,e),this.metadata=e,[2]}})})},t.prototype.updateEndpointMetadata=function(e){var r,n;return J(this,void 0,void 0,function(){var i,o;return Z(this,function(a){switch(a.label){case 0:return i=this.getEndpointMetadataFromConfig(),i?(e.updateEndpointMetadata(i,!1),[2,Ar.CONFIG]):this.isAuthoritySameType(e)&&e.endpointsFromNetwork&&!e.isExpired()?[2,Ar.CACHE]:(o=this.getEndpointMetadataFromHardcodedValues(),[4,this.getEndpointMetadataFromNetwork()]);case 1:return i=a.sent(),i?!((r=this.authorityOptions.azureRegionConfiguration)===null||r===void 0)&&r.azureRegion?[4,this.updateMetadataWithRegionalInformation(i)]:[3,3]:[3,4];case 2:i=a.sent(),a.label=3;case 3:return e.updateEndpointMetadata(i,!0),[2,Ar.NETWORK];case 4:return o&&!this.authorityOptions.skipAuthorityMetadataCache?!((n=this.authorityOptions.azureRegionConfiguration)===null||n===void 0)&&n.azureRegion?[4,this.updateMetadataWithRegionalInformation(o)]:[3,6]:[3,7];case 5:o=a.sent(),a.label=6;case 6:return e.updateEndpointMetadata(o,!1),[2,Ar.HARDCODED_VALUES];case 7:throw j.createUnableToGetOpenidConfigError(this.defaultOpenIdConfigurationEndpoint)}})})},t.prototype.isAuthoritySameType=function(e){var r=new me(e.canonical_authority),n=r.getUrlComponents().PathSegments;return n.length===this.canonicalAuthorityUrlComponents.PathSegments.length},t.prototype.getEndpointMetadataFromConfig=function(){if(this.authorityOptions.authorityMetadata)try{return JSON.parse(this.authorityOptions.authorityMetadata)}catch{throw He.createInvalidAuthorityMetadataError()}return null},t.prototype.getEndpointMetadataFromNetwork=function(){return J(this,void 0,void 0,function(){var e,r;return Z(this,function(n){switch(n.label){case 0:e={},this.proxyUrl&&(e.proxyUrl=this.proxyUrl),n.label=1;case 1:return n.trys.push([1,3,,4]),[4,this.networkInterface.sendGetRequestAsync(this.defaultOpenIdConfigurationEndpoint,e)];case 2:return r=n.sent(),[2,Py(r.body)?r.body:null];case 3:return n.sent(),[2,null];case 4:return[2]}})})},t.prototype.getEndpointMetadataFromHardcodedValues=function(){return this.canonicalAuthority in Pp?Pp[this.canonicalAuthority]:null},t.prototype.updateMetadataWithRegionalInformation=function(e){var r,n,i,o,a;return J(this,void 0,void 0,function(){var s,c;return Z(this,function(l){switch(l.label){case 0:return[4,this.regionDiscovery.detectRegion((r=this.authorityOptions.azureRegionConfiguration)===null||r===void 0?void 0:r.environmentRegion,this.regionDiscoveryMetadata,this.proxyUrl)];case 1:return s=l.sent(),c=((n=this.authorityOptions.azureRegionConfiguration)===null||n===void 0?void 0:n.azureRegion)===b.AZURE_REGION_AUTO_DISCOVER_FLAG?s:(i=this.authorityOptions.azureRegionConfiguration)===null||i===void 0?void 0:i.azureRegion,((o=this.authorityOptions.azureRegionConfiguration)===null||o===void 0?void 0:o.azureRegion)===b.AZURE_REGION_AUTO_DISCOVER_FLAG?this.regionDiscoveryMetadata.region_outcome=s?Ki.AUTO_DETECTION_REQUESTED_SUCCESSFUL:Ki.AUTO_DETECTION_REQUESTED_FAILED:s?this.regionDiscoveryMetadata.region_outcome=((a=this.authorityOptions.azureRegionConfiguration)===null||a===void 0?void 0:a.azureRegion)===s?Ki.CONFIGURED_MATCHES_DETECTED:Ki.CONFIGURED_NOT_DETECTED:this.regionDiscoveryMetadata.region_outcome=Ki.CONFIGURED_NO_AUTO_DETECTION,c?(this.regionDiscoveryMetadata.region_used=c,[2,t.replaceWithRegionalInformation(e,c)]):[2,e]}})})},t.prototype.updateCloudDiscoveryMetadata=function(e){return J(this,void 0,void 0,function(){var r,n;return Z(this,function(i){switch(i.label){case 0:return r=this.getCloudDiscoveryMetadataFromConfig(),r?(e.updateCloudDiscoveryMetadata(r,!1),[2,Ar.CONFIG]):this.isAuthoritySameType(e)&&e.aliasesFromNetwork&&!e.isExpired()?[2,Ar.CACHE]:(n=this.getCloudDiscoveryMetadataFromHarcodedValues(),[4,this.getCloudDiscoveryMetadataFromNetwork()]);case 1:if(r=i.sent(),r)return e.updateCloudDiscoveryMetadata(r,!0),[2,Ar.NETWORK];if(n&&!this.options.skipAuthorityMetadataCache)return e.updateCloudDiscoveryMetadata(n,!1),[2,Ar.HARDCODED_VALUES];throw He.createUntrustedAuthorityError()}})})},t.prototype.getCloudDiscoveryMetadataFromConfig=function(){if(this.authorityOptions.cloudDiscoveryMetadata)try{var e=JSON.parse(this.authorityOptions.cloudDiscoveryMetadata),r=t.getCloudDiscoveryMetadataFromNetworkResponse(e.metadata,this.hostnameAndPort);if(r)return r}catch{throw He.createInvalidCloudDiscoveryMetadataError()}return this.isInKnownAuthorities()?t.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort):null},t.prototype.getCloudDiscoveryMetadataFromNetwork=function(){return J(this,void 0,void 0,function(){var e,r,n,i,o;return Z(this,function(a){switch(a.label){case 0:e=""+b.AAD_INSTANCE_DISCOVERY_ENDPT+this.canonicalAuthority+"oauth2/v2.0/authorize",r={},this.proxyUrl&&(r.proxyUrl=this.proxyUrl),n=null,a.label=1;case 1:return a.trys.push([1,3,,4]),[4,this.networkInterface.sendGetRequestAsync(e,r)];case 2:return i=a.sent(),o=Ry(i.body)?i.body.metadata:[],o.length===0?[2,null]:(n=t.getCloudDiscoveryMetadataFromNetworkResponse(o,this.hostnameAndPort),[3,4]);case 3:return a.sent(),[2,null];case 4:return n||(n=t.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort)),[2,n]}})})},t.prototype.getCloudDiscoveryMetadataFromHarcodedValues=function(){return this.canonicalAuthority in Rp?Rp[this.canonicalAuthority]:null},t.prototype.isInKnownAuthorities=function(){var e=this,r=this.authorityOptions.knownAuthorities.filter(function(n){return me.getDomainFromUrl(n).toLowerCase()===e.hostnameAndPort});return r.length>0},t.generateAuthority=function(e,r){var n;if(r&&r.azureCloudInstance!==tc.None){var i=r.tenant?r.tenant:b.DEFAULT_COMMON_TENANT;n=r.azureCloudInstance+"/"+i+"/"}return n||e},t.createCloudDiscoveryMetadataFromHost=function(e){return{preferred_network:e,preferred_cache:e,aliases:[e]}},t.getCloudDiscoveryMetadataFromNetworkResponse=function(e,r){for(var n=0;n<e.length;n++){var i=e[n];if(i.aliases.indexOf(r)>-1)return i}return null},t.prototype.getPreferredCache=function(){if(this.discoveryComplete())return this.metadata.preferred_cache;throw j.createEndpointDiscoveryIncompleteError("Discovery incomplete.")},t.prototype.isAlias=function(e){return this.metadata.aliases.indexOf(e)>-1},t.isPublicCloudAuthority=function(e){return b.KNOWN_PUBLIC_CLOUDS.indexOf(e)>=0},t.buildRegionalAuthorityString=function(e,r,n){var i=new me(e);i.validateAsUri();var o=i.getUrlComponents(),a=r+"."+o.HostNameAndPort;this.isPublicCloudAuthority(o.HostNameAndPort)&&(a=r+"."+b.REGIONAL_AUTH_PUBLIC_CLOUD_SUFFIX);var s=me.constructAuthorityUriFromObject(Te(Te({},i.getUrlComponents()),{HostNameAndPort:a})).urlString;return n?s+"?"+n:s},t.replaceWithRegionalInformation=function(e,r){return e.authorization_endpoint=t.buildRegionalAuthorityString(e.authorization_endpoint,r),e.token_endpoint=t.buildRegionalAuthorityString(e.token_endpoint,r,b.REGIONAL_AUTH_NON_MSI_QUERY_STRING),e.end_session_endpoint&&(e.end_session_endpoint=t.buildRegionalAuthorityString(e.end_session_endpoint,r)),e},t}();/*! @azure/msal-common v8.0.0 2022-11-07 */var Id=function(){function t(){}return t.createDiscoveredInstance=function(e,r,n,i,o){return J(this,void 0,void 0,function(){var a,s;return Z(this,function(c){switch(c.label){case 0:a=t.createInstance(e,r,n,i,o),c.label=1;case 1:return c.trys.push([1,3,,4]),[4,a.resolveEndpointsAsync()];case 2:return c.sent(),[2,a];case 3:throw s=c.sent(),j.createEndpointDiscoveryIncompleteError(s);case 4:return[2]}})})},t.createInstance=function(e,r,n,i,o){if(N.isEmpty(e))throw He.createUrlEmptyError();return new Ad(e,r,n,i,o)},t}();/*! @azure/msal-common v8.0.0 2022-11-07 */var Md=function(){function t(){this.failedRequests=[],this.errors=[],this.cacheHits=0}return t.isServerTelemetryEntity=function(e,r){var n=e.indexOf(pt.CACHE_KEY)===0,i=!0;return r&&(i=r.hasOwnProperty("failedRequests")&&r.hasOwnProperty("errors")&&r.hasOwnProperty("cacheHits")),n&&i},t}();/*! @azure/msal-common v8.0.0 2022-11-07 */var Hp=function(){function t(){}return t.isThrottlingEntity=function(e,r){var n=!1;e&&(n=e.indexOf(Ps.THROTTLING_PREFIX)===0);var i=!0;return r&&(i=r.hasOwnProperty("throttleTime")),n&&i},t}();/*! @azure/msal-common v8.0.0 2022-11-07 */var Ly={sendGetRequestAsync:function(){var t="Network interface - sendGetRequestAsync() has not been implemented for the Network interface.";return Promise.reject(Y.createUnexpectedError(t))},sendPostRequestAsync:function(){var t="Network interface - sendPostRequestAsync() has not been implemented for the Network interface.";return Promise.reject(Y.createUnexpectedError(t))}};/*! @azure/msal-common v8.0.0 2022-11-07 */var il={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."}},Lp=function(t){ur(e,t);function e(r,n){var i=t.call(this,r,n)||this;return i.name="JoseHeaderError",Object.setPrototypeOf(i,e.prototype),i}return e.createMissingKidError=function(){return new e(il.missingKidError.code,il.missingKidError.desc)},e.createMissingAlgError=function(){return new e(il.missingAlgError.code,il.missingAlgError.desc)},e}(Y);/*! @azure/msal-common v8.0.0 2022-11-07 */var Oy=function(){function t(e){this.typ=e.typ,this.alg=e.alg,this.kid=e.kid}return t.getShrHeaderString=function(e){if(!e.kid)throw Lp.createMissingKidError();if(!e.alg)throw Lp.createMissingAlgError();var r=new t({typ:e.typ||$u.Jwt,kid:e.kid,alg:e.alg});return JSON.stringify(r)},t}();/*! @azure/msal-common v8.0.0 2022-11-07 */var Dy=function(){function t(e,r){this.cacheOutcome=Zi.NO_CACHE_HIT,this.cacheManager=r,this.apiId=e.apiId,this.correlationId=e.correlationId,this.wrapperSKU=e.wrapperSKU||b.EMPTY_STRING,this.wrapperVer=e.wrapperVer||b.EMPTY_STRING,this.telemetryCacheKey=pt.CACHE_KEY+xr.CACHE_KEY_SEPARATOR+e.clientId}return t.prototype.generateCurrentRequestHeaderValue=function(){var e=""+this.apiId+pt.VALUE_SEPARATOR+this.cacheOutcome,r=[this.wrapperSKU,this.wrapperVer].join(pt.VALUE_SEPARATOR),n=this.getRegionDiscoveryFields(),i=[e,n].join(pt.VALUE_SEPARATOR);return[pt.SCHEMA_VERSION,i,r].join(pt.CATEGORY_SEPARATOR)},t.prototype.generateLastRequestHeaderValue=function(){var e=this.getLastRequests(),r=t.maxErrorsToSend(e),n=e.failedRequests.slice(0,2*r).join(pt.VALUE_SEPARATOR),i=e.errors.slice(0,r).join(pt.VALUE_SEPARATOR),o=e.errors.length,a=r<o?pt.OVERFLOW_TRUE:pt.OVERFLOW_FALSE,s=[o,a].join(pt.VALUE_SEPARATOR);return[pt.SCHEMA_VERSION,e.cacheHits,n,i,s].join(pt.CATEGORY_SEPARATOR)},t.prototype.cacheFailedRequest=function(e){var r=this.getLastRequests();r.errors.length>=pt.MAX_CACHED_ERRORS&&(r.failedRequests.shift(),r.failedRequests.shift(),r.errors.shift()),r.failedRequests.push(this.apiId,this.correlationId),N.isEmpty(e.subError)?N.isEmpty(e.errorCode)?!!e&&e.toString()?r.errors.push(e.toString()):r.errors.push(pt.UNKNOWN_ERROR):r.errors.push(e.errorCode):r.errors.push(e.subError),this.cacheManager.setServerTelemetry(this.telemetryCacheKey,r)},t.prototype.incrementCacheHits=function(){var e=this.getLastRequests();return e.cacheHits+=1,this.cacheManager.setServerTelemetry(this.telemetryCacheKey,e),e.cacheHits},t.prototype.getLastRequests=function(){var e=new Md,r=this.cacheManager.getServerTelemetry(this.telemetryCacheKey);return r||e},t.prototype.clearTelemetryCache=function(){var e=this.getLastRequests(),r=t.maxErrorsToSend(e),n=e.errors.length;if(r===n)this.cacheManager.removeItem(this.telemetryCacheKey);else{var i=new Md;i.failedRequests=e.failedRequests.slice(r*2),i.errors=e.errors.slice(r),this.cacheManager.setServerTelemetry(this.telemetryCacheKey,i)}},t.maxErrorsToSend=function(e){var r,n=0,i=0,o=e.errors.length;for(r=0;r<o;r++){var a=e.failedRequests[2*r]||b.EMPTY_STRING,s=e.failedRequests[2*r+1]||b.EMPTY_STRING,c=e.errors[r]||b.EMPTY_STRING;if(i+=a.toString().length+s.toString().length+c.length+3,i<pt.MAX_LAST_HEADER_BYTES)n+=1;else break}return n},t.prototype.getRegionDiscoveryFields=function(){var e=[];return e.push(this.regionUsed||b.EMPTY_STRING),e.push(this.regionSource||b.EMPTY_STRING),e.push(this.regionOutcome||b.EMPTY_STRING),e.join(",")},t.prototype.updateRegionDiscoveryMetadata=function(e){this.regionUsed=e.region_used,this.regionSource=e.region_source,this.regionOutcome=e.region_outcome},t.prototype.setCacheOutcome=function(e){this.cacheOutcome=e},t}();/*! @azure/msal-common v8.0.0 2022-11-07 */var Mg=function(){function t(e,r,n,i,o,a){this.authority=r,this.libraryName=i,this.libraryVersion=o,this.applicationTelemetry=a,this.clientId=e,this.logger=n,this.callbacks=new Map,this.eventsByCorrelationId=new Map,this.staticFieldsByCorrelationId=new Map,this.measurementsById=new Map}return t.prototype.startMeasurement=function(e,r){var n=this,i,o,a=r||this.generateId();r||this.logger.info("PerformanceClient: No correlation id provided for "+e+", generating",a),this.logger.trace("PerformanceClient: Performance measurement started for "+e,a);var s=this.startPerformanceMeasuremeant(e,a);s.startMeasurement();var c={eventId:this.generateId(),status:ta.InProgress,authority:this.authority,libraryName:this.libraryName,libraryVersion:this.libraryVersion,clientId:this.clientId,name:e,startTimeMs:Date.now(),correlationId:a};this.cacheEventByCorrelationId(c);var l={appName:(i=this.applicationTelemetry)===null||i===void 0?void 0:i.appName,appVersion:(o=this.applicationTelemetry)===null||o===void 0?void 0:o.appVersion};return this.addStaticFields(l,a),this.cacheMeasurement(c,s),{endMeasurement:function(d){var h=n.endMeasurement(Te(Te({},c),d));return h&&n.cacheEventByCorrelationId(h),h},flushMeasurement:function(){return n.flushMeasurements(c.name,c.correlationId)},discardMeasurement:function(){return n.discardMeasurements(c.correlationId)},addStaticFields:function(d){return n.addStaticFields(d,c.correlationId)},measurement:s,event:c}},t.prototype.endMeasurement=function(e){var r=this.measurementsById.get(e.eventId);if(r){this.measurementsById.delete(e.eventId),r.endMeasurement();var n=r.flushMeasurement();if(n!==null){this.logger.trace("PerformanceClient: Performance measurement ended for "+e.name+": "+n+" ms",e.correlationId);var i=Te(Te({durationMs:Math.round(n)},e),{status:ta.Completed});return i}else this.logger.trace("PerformanceClient: Performance measurement not taken",e.correlationId)}else this.logger.trace("PerformanceClient: Measurement not found for "+e.eventId,e.correlationId);return null},t.prototype.addStaticFields=function(e,r){var n=this.staticFieldsByCorrelationId.get(r);n?(this.logger.trace("PerformanceClient: Updating static fields"),this.staticFieldsByCorrelationId.set(r,Te(Te({},n),e))):(this.logger.trace("PerformanceClient: Adding static fields"),this.staticFieldsByCorrelationId.set(r,e))},t.prototype.cacheEventByCorrelationId=function(e){var r=this.eventsByCorrelationId.get(e.correlationId);r?(this.logger.trace("PerformanceClient: Performance measurement for "+e.name+" added/updated",e.correlationId),r.set(e.eventId,e)):(this.logger.trace("PerformanceClient: Performance measurement for "+e.name+" started",e.correlationId),this.eventsByCorrelationId.set(e.correlationId,new Map().set(e.eventId,e)))},t.prototype.cacheMeasurement=function(e,r){this.measurementsById.set(e.eventId,r)},t.prototype.flushMeasurements=function(e,r){var n=this;this.logger.trace("PerformanceClient: Performance measurements flushed for "+e,r);var i=this.eventsByCorrelationId.get(r);if(i){this.discardMeasurements(r);var o=[];i.forEach(function(u){if(u.name!==e&&u.status!==ta.Completed){n.logger.trace("PerformanceClient: Incomplete submeasurement "+u.name+" found for "+e,r);var f=n.endMeasurement(u);f&&o.push(f)}o.push(u)});var a=o.sort(function(u,f){return u.startTimeMs-f.startTimeMs}),s=a.filter(function(u){return u.name===e&&u.status===ta.Completed});if(s.length>0){s.length>1&&this.logger.verbose("PerformanceClient: Multiple distinct top-level performance events found, using the first",r);var c=s[0];this.logger.verbose("PerformanceClient: Measurement found for "+e,r);var l=a.reduce(function(u,f){if(f.name!==e){n.logger.trace("PerformanceClient: Complete submeasurement found for "+f.name,r);var v=f.name+"DurationMs";u[v]?n.logger.verbose("PerformanceClient: Submeasurement for "+e+" already exists for "+f.name+", ignoring",r):u[v]=f.durationMs}return u},c),d=this.staticFieldsByCorrelationId.get(r),h=Te(Te({},l),d);this.emitEvents([h],l.correlationId)}else this.logger.verbose("PerformanceClient: No completed top-level measurements found for "+e,r)}else this.logger.verbose("PerformanceClient: No measurements found",r)},t.prototype.discardMeasurements=function(e){this.logger.trace("PerformanceClient: Performance measurements discarded",e),this.eventsByCorrelationId.delete(e)},t.prototype.addPerformanceCallback=function(e){var r=this.generateId();return this.callbacks.set(r,e),this.logger.verbose("PerformanceClient: Performance callback registered with id: "+r),r},t.prototype.removePerformanceCallback=function(e){var r=this.callbacks.delete(e);return r?this.logger.verbose("PerformanceClient: Performance callback "+e+" removed."):this.logger.verbose("PerformanceClient: Performance callback "+e+" not removed."),r},t.prototype.emitEvents=function(e,r){var n=this;this.logger.verbose("PerformanceClient: Emitting performance events",r),this.callbacks.forEach(function(i,o){n.logger.trace("PerformanceClient: Emitting event to callback "+o,r),i.apply(null,[e])})},t}();/*! @azure/msal-common v8.0.0 2022-11-07 */var Ny=function(){function t(){}return t.prototype.startMeasurement=function(){},t.prototype.endMeasurement=function(){},t.prototype.flushMeasurement=function(){return null},t}(),Vy=function(t){ur(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.generateId=function(){return"callback-id"},e.prototype.startPerformanceMeasuremeant=function(){return new Ny},e}(Mg);/*! @azure/msal-browser v2.31.0 2022-11-07 */var I={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."},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."}},O=function(t){xt(e,t);function e(r,n){var i=t.call(this,r,n)||this;return Object.setPrototypeOf(i,e.prototype),i.name="BrowserAuthError",i}return e.createPkceNotGeneratedError=function(r){return new e(I.pkceNotGenerated.code,I.pkceNotGenerated.desc+" Detail:"+r)},e.createCryptoNotAvailableError=function(r){return new e(I.cryptoDoesNotExist.code,I.cryptoDoesNotExist.desc+" Detail:"+r)},e.createHttpMethodNotImplementedError=function(r){return new e(I.httpMethodNotImplementedError.code,I.httpMethodNotImplementedError.desc+" Given Method: "+r)},e.createEmptyNavigationUriError=function(){return new e(I.emptyNavigateUriError.code,I.emptyNavigateUriError.desc)},e.createEmptyHashError=function(r){return new e(I.hashEmptyError.code,I.hashEmptyError.desc+" Given Url: "+r)},e.createHashDoesNotContainStateError=function(){return new e(I.hashDoesNotContainStateError.code,I.hashDoesNotContainStateError.desc)},e.createHashDoesNotContainKnownPropertiesError=function(){return new e(I.hashDoesNotContainKnownPropertiesError.code,I.hashDoesNotContainKnownPropertiesError.desc)},e.createUnableToParseStateError=function(){return new e(I.unableToParseStateError.code,I.unableToParseStateError.desc)},e.createStateInteractionTypeMismatchError=function(){return new e(I.stateInteractionTypeMismatchError.code,I.stateInteractionTypeMismatchError.desc)},e.createInteractionInProgressError=function(){return new e(I.interactionInProgress.code,I.interactionInProgress.desc)},e.createPopupWindowError=function(r){var n=I.popupWindowError.desc;return n=N.isEmpty(r)?n:n+" Details: "+r,new e(I.popupWindowError.code,n)},e.createEmptyWindowCreatedError=function(){return new e(I.emptyWindowError.code,I.emptyWindowError.desc)},e.createUserCancelledError=function(){return new e(I.userCancelledError.code,I.userCancelledError.desc)},e.createMonitorPopupTimeoutError=function(){return new e(I.monitorPopupTimeoutError.code,I.monitorPopupTimeoutError.desc)},e.createMonitorIframeTimeoutError=function(){return new e(I.monitorIframeTimeoutError.code,I.monitorIframeTimeoutError.desc)},e.createRedirectInIframeError=function(r){return new e(I.redirectInIframeError.code,I.redirectInIframeError.desc+" (window.parent !== window) => "+r)},e.createBlockReloadInHiddenIframeError=function(){return new e(I.blockTokenRequestsInHiddenIframeError.code,I.blockTokenRequestsInHiddenIframeError.desc)},e.createBlockAcquireTokenInPopupsError=function(){return new e(I.blockAcquireTokenInPopupsError.code,I.blockAcquireTokenInPopupsError.desc)},e.createIframeClosedPrematurelyError=function(){return new e(I.iframeClosedPrematurelyError.code,I.iframeClosedPrematurelyError.desc)},e.createSilentLogoutUnsupportedError=function(){return new e(I.silentLogoutUnsupportedError.code,I.silentLogoutUnsupportedError.desc)},e.createNoAccountError=function(){return new e(I.noAccountError.code,I.noAccountError.desc)},e.createSilentPromptValueError=function(r){return new e(I.silentPromptValueError.code,I.silentPromptValueError.desc+" Given value: "+r)},e.createUnableToParseTokenRequestCacheError=function(){return new e(I.unableToParseTokenRequestCacheError.code,I.unableToParseTokenRequestCacheError.desc)},e.createNoTokenRequestCacheError=function(){return new e(I.noTokenRequestCacheError.code,I.noTokenRequestCacheError.desc)},e.createAuthRequestNotSetError=function(){return new e(I.authRequestNotSet.code,I.authRequestNotSet.desc)},e.createNoCachedAuthorityError=function(){return new e(I.noCachedAuthorityError.code,I.noCachedAuthorityError.desc)},e.createInvalidCacheTypeError=function(){return new e(I.invalidCacheType.code,""+I.invalidCacheType.desc)},e.createNonBrowserEnvironmentError=function(){return new e(I.notInBrowserEnvironment.code,I.notInBrowserEnvironment.desc)},e.createDatabaseNotOpenError=function(){return new e(I.databaseNotOpen.code,I.databaseNotOpen.desc)},e.createNoNetworkConnectivityError=function(){return new e(I.noNetworkConnectivity.code,I.noNetworkConnectivity.desc)},e.createPostRequestFailedError=function(r,n){return new e(I.postRequestFailed.code,I.postRequestFailed.desc+" | Network client threw: "+r+" | Attempted to reach: "+n.split("?")[0])},e.createGetRequestFailedError=function(r,n){return new e(I.getRequestFailed.code,I.getRequestFailed.desc+" | Network client threw: "+r+" | Attempted to reach: "+n.split("?")[0])},e.createFailedToParseNetworkResponseError=function(r){return new e(I.failedToParseNetworkResponse.code,I.failedToParseNetworkResponse.desc+" | Attempted to reach: "+r.split("?")[0])},e.createUnableToLoadTokenError=function(r){return new e(I.unableToLoadTokenError.code,I.unableToLoadTokenError.desc+" | "+r)},e.createSigningKeyNotFoundInStorageError=function(r){return new e(I.signingKeyNotFoundInStorage.code,I.signingKeyNotFoundInStorage.desc+" | No match found for KeyId: "+r)},e.createAuthCodeRequiredError=function(){return new e(I.authCodeRequired.code,I.authCodeRequired.desc)},e.createAuthCodeOrNativeAccountIdRequiredError=function(){return new e(I.authCodeOrNativeAccountRequired.code,I.authCodeOrNativeAccountRequired.desc)},e.createDatabaseUnavailableError=function(){return new e(I.databaseUnavailable.code,I.databaseUnavailable.desc)},e.createUnableToAcquireTokenFromNativePlatformError=function(){return new e(I.unableToAcquireTokenFromNativePlatform.code,I.unableToAcquireTokenFromNativePlatform.desc)},e.createNativeHandshakeTimeoutError=function(){return new e(I.nativeHandshakeTimeout.code,I.nativeHandshakeTimeout.desc)},e.createNativeExtensionNotInstalledError=function(){return new e(I.nativeExtensionNotInstalled.code,I.nativeExtensionNotInstalled.desc)},e.createNativeConnectionNotEstablishedError=function(){return new e(I.nativeConnectionNotEstablished.code,I.nativeConnectionNotEstablished.desc)},e.createNativeBrokerCalledBeforeInitialize=function(){return new e(I.nativeBrokerCalledBeforeInitialize.code,I.nativeBrokerCalledBeforeInitialize.desc)},e.createNativePromptParameterNotSupportedError=function(){return new e(I.nativePromptNotSupported.code,I.nativePromptNotSupported.desc)},e}(Y);/*! @azure/msal-browser v2.31.0 2022-11-07 */var Jr={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"},ls={CHANNEL_ID:"53ee284d-920a-4b59-9d30-a60315b26836",PREFERRED_EXTENSION_ID:"ppnbnpeolgkicgegkbkbjmhlideopiji",MATS_TELEMETRY:"MATS"},On;(function(t){t.HandshakeRequest="Handshake",t.HandshakeResponse="HandshakeResponse",t.GetToken="GetToken",t.Response="Response"})(On||(On={}));var Ot;(function(t){t.LocalStorage="localStorage",t.SessionStorage="sessionStorage",t.MemoryStorage="memoryStorage"})(Ot||(Ot={}));var un;(function(t){t.GET="GET",t.POST="POST"})(un||(un={}));var ge;(function(t){t.AUTHORITY="authority",t.ACQUIRE_TOKEN_ACCOUNT="acquireToken.account",t.SESSION_STATE="session.state",t.REQUEST_STATE="request.state",t.NONCE_IDTOKEN="nonce.id_token",t.ORIGIN_URI="request.origin",t.RENEW_STATUS="token.renew.status",t.URL_HASH="urlHash",t.REQUEST_PARAMS="request.params",t.SCOPES="scopes",t.INTERACTION_STATUS_KEY="interaction.status",t.CCS_CREDENTIAL="ccs.credential",t.CORRELATION_ID="request.correlationId",t.NATIVE_REQUEST="request.native"})(ge||(ge={}));var ra;(function(t){t.WRAPPER_SKU="wrapper.sku",t.WRAPPER_VER="wrapper.version"})(ra||(ra={}));var Ae;(function(t){t[t.acquireTokenRedirect=861]="acquireTokenRedirect",t[t.acquireTokenPopup=862]="acquireTokenPopup",t[t.ssoSilent=863]="ssoSilent",t[t.acquireTokenSilent_authCode=864]="acquireTokenSilent_authCode",t[t.handleRedirectPromise=865]="handleRedirectPromise",t[t.acquireTokenByCode=866]="acquireTokenByCode",t[t.acquireTokenSilent_silentFlow=61]="acquireTokenSilent_silentFlow",t[t.logout=961]="logout",t[t.logoutPopup=962]="logoutPopup"})(Ae||(Ae={}));var G;(function(t){t.Redirect="redirect",t.Popup="popup",t.Silent="silent",t.None="none"})(G||(G={}));var Op;(function(t){t.Startup="startup",t.Login="login",t.Logout="logout",t.AcquireToken="acquireToken",t.SsoSilent="ssoSilent",t.HandleRedirect="handleRedirect",t.None="none"})(Op||(Op={}));var Dp={scopes:_c},Ea="jwk",Np;(function(t){t.React="@azure/msal-react",t.Angular="@azure/msal-angular"})(Np||(Np={}));var Gu="msal.db",Uy=1,Fy=Gu+".keys",or;(function(t){t[t.Default=0]="Default",t[t.AccessToken=1]="AccessToken",t[t.AccessTokenAndRefreshToken=2]="AccessTokenAndRefreshToken",t[t.RefreshToken=3]="RefreshToken",t[t.RefreshTokenAndNetwork=4]="RefreshTokenAndNetwork",t[t.Skip=5]="Skip"})(or||(or={}));/*! @azure/msal-browser v2.31.0 2022-11-07 */var nr={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."},invalidCallbackObject:{code:"invalid_callback_object",desc:"The object passed for the callback was invalid. 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."}},Pd=function(t){xt(e,t);function e(r,n){var i=t.call(this,r,n)||this;return i.name="BrowserConfigurationAuthError",Object.setPrototypeOf(i,e.prototype),i}return e.createRedirectUriEmptyError=function(){return new e(nr.redirectUriNotSet.code,nr.redirectUriNotSet.desc)},e.createPostLogoutRedirectUriEmptyError=function(){return new e(nr.postLogoutUriNotSet.code,nr.postLogoutUriNotSet.desc)},e.createStorageNotSupportedError=function(r){return new e(nr.storageNotSupportedError.code,nr.storageNotSupportedError.desc+" Given Location: "+r)},e.createRedirectCallbacksNotSetError=function(){return new e(nr.noRedirectCallbacksSet.code,nr.noRedirectCallbacksSet.desc)},e.createStubPcaInstanceCalledError=function(){return new e(nr.stubPcaInstanceCalled.code,nr.stubPcaInstanceCalled.desc)},e.createInMemoryRedirectUnavailableError=function(){return new e(nr.inMemRedirectUnavailable.code,nr.inMemRedirectUnavailable.desc)},e.createEntropyNotProvided=function(){return new e(nr.entropyNotProvided.code,nr.entropyNotProvided.desc)},e}(Y);/*! @azure/msal-browser v2.31.0 2022-11-07 */var Vp=function(){function t(e){this.validateWindowStorage(e),this.windowStorage=window[e]}return t.prototype.validateWindowStorage=function(e){if(e!==Ot.LocalStorage&&e!==Ot.SessionStorage)throw Pd.createStorageNotSupportedError(e);var r=!!window[e];if(!r)throw Pd.createStorageNotSupportedError(e)},t.prototype.getItem=function(e){return this.windowStorage.getItem(e)},t.prototype.setItem=function(e,r){this.windowStorage.setItem(e,r)},t.prototype.removeItem=function(e){this.windowStorage.removeItem(e)},t.prototype.getKeys=function(){return Object.keys(this.windowStorage)},t.prototype.containsKey=function(e){return this.windowStorage.hasOwnProperty(e)},t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var Ku=function(){function t(){this.cache=new Map}return t.prototype.getItem=function(e){return this.cache.get(e)||null},t.prototype.setItem=function(e,r){this.cache.set(e,r)},t.prototype.removeItem=function(e){this.cache.delete(e)},t.prototype.getKeys=function(){var e=[];return this.cache.forEach(function(r,n){e.push(n)}),e},t.prototype.containsKey=function(e){return this.cache.has(e)},t.prototype.clear=function(){this.cache.clear()},t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var Pg=function(){function t(){}return t.extractBrowserRequestState=function(e,r){if(N.isEmpty(r))return null;try{var n=Un.parseRequestState(e,r);return n.libraryState.meta}catch(i){throw j.createInvalidStateError(r,i)}},t.parseServerResponseFromHash=function(e){if(!e)return{};var r=new me(e);return me.getDeserializedHash(r.getHash())},t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var Wu=function(t){xt(e,t);function e(r,n,i,o){var a=t.call(this,r,i)||this;return a.COOKIE_LIFE_MULTIPLIER=24*60*60*1e3,a.cacheConfig=n,a.logger=o,a.internalStorage=new Ku,a.browserStorage=a.setupBrowserStorage(a.cacheConfig.cacheLocation),a.temporaryCacheStorage=a.setupTemporaryCacheStorage(a.cacheConfig.cacheLocation),a.migrateCacheEntries(),a}return e.prototype.setupBrowserStorage=function(r){switch(r){case Ot.LocalStorage:case Ot.SessionStorage:try{return new Vp(r)}catch(n){this.logger.verbose(n);break}}return this.cacheConfig.cacheLocation=Ot.MemoryStorage,new Ku},e.prototype.setupTemporaryCacheStorage=function(r){switch(r){case Ot.LocalStorage:case Ot.SessionStorage:try{return new Vp(Ot.SessionStorage)}catch(n){return this.logger.verbose(n),this.internalStorage}case Ot.MemoryStorage:default:return this.internalStorage}},e.prototype.migrateCacheEntries=function(){var r=this,n=b.CACHE_PREFIX+"."+ot.ID_TOKEN,i=b.CACHE_PREFIX+"."+ot.CLIENT_INFO,o=b.CACHE_PREFIX+"."+ot.ERROR,a=b.CACHE_PREFIX+"."+ot.ERROR_DESC,s=this.browserStorage.getItem(n),c=this.browserStorage.getItem(i),l=this.browserStorage.getItem(o),d=this.browserStorage.getItem(a),h=[s,c,l,d],u=[ot.ID_TOKEN,ot.CLIENT_INFO,ot.ERROR,ot.ERROR_DESC];u.forEach(function(f,v){return r.migrateCacheEntry(f,h[v])})},e.prototype.migrateCacheEntry=function(r,n){n&&this.setTemporaryCache(r,n,!0)},e.prototype.validateAndParseJson=function(r){try{var n=JSON.parse(r);return n&&typeof n=="object"?n:null}catch{return null}},e.prototype.getItem=function(r){return this.browserStorage.getItem(r)},e.prototype.setItem=function(r,n){this.browserStorage.setItem(r,n)},e.prototype.getAccount=function(r){var n=this.getItem(r);if(!n)return null;var i=this.validateAndParseJson(n);return!i||!_t.isAccountEntity(i)?null:Wr.toObject(new _t,i)},e.prototype.setAccount=function(r){this.logger.trace("BrowserCacheManager.setAccount called");var n=r.generateAccountKey();this.setItem(n,JSON.stringify(r))},e.prototype.getIdTokenCredential=function(r){var n=this.getItem(r);if(!n)return this.logger.trace("BrowserCacheManager.getIdTokenCredential: called, no cache hit"),null;var i=this.validateAndParseJson(n);return!i||!nc.isIdTokenEntity(i)?(this.logger.trace("BrowserCacheManager.getIdTokenCredential: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getIdTokenCredential: cache hit"),Wr.toObject(new nc,i))},e.prototype.setIdTokenCredential=function(r){this.logger.trace("BrowserCacheManager.setIdTokenCredential called");var n=r.generateCredentialKey();this.setItem(n,JSON.stringify(r))},e.prototype.getAccessTokenCredential=function(r){var n=this.getItem(r);if(!n)return this.logger.trace("BrowserCacheManager.getAccessTokenCredential: called, no cache hit"),null;var i=this.validateAndParseJson(n);return!i||!ic.isAccessTokenEntity(i)?(this.logger.trace("BrowserCacheManager.getAccessTokenCredential: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getAccessTokenCredential: cache hit"),Wr.toObject(new ic,i))},e.prototype.setAccessTokenCredential=function(r){this.logger.trace("BrowserCacheManager.setAccessTokenCredential called");var n=r.generateCredentialKey();this.setItem(n,JSON.stringify(r))},e.prototype.getRefreshTokenCredential=function(r){var n=this.getItem(r);if(!n)return this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: called, no cache hit"),null;var i=this.validateAndParseJson(n);return!i||!Sd.isRefreshTokenEntity(i)?(this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: cache hit"),Wr.toObject(new Sd,i))},e.prototype.setRefreshTokenCredential=function(r){this.logger.trace("BrowserCacheManager.setRefreshTokenCredential called");var n=r.generateCredentialKey();this.setItem(n,JSON.stringify(r))},e.prototype.getAppMetadata=function(r){var n=this.getItem(r);if(!n)return this.logger.trace("BrowserCacheManager.getAppMetadata: called, no cache hit"),null;var i=this.validateAndParseJson(n);return!i||!Bu.isAppMetadataEntity(r,i)?(this.logger.trace("BrowserCacheManager.getAppMetadata: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getAppMetadata: cache hit"),Wr.toObject(new Bu,i))},e.prototype.setAppMetadata=function(r){this.logger.trace("BrowserCacheManager.setAppMetadata called");var n=r.generateAppMetadataKey();this.setItem(n,JSON.stringify(r))},e.prototype.getServerTelemetry=function(r){var n=this.getItem(r);if(!n)return this.logger.trace("BrowserCacheManager.getServerTelemetry: called, no cache hit"),null;var i=this.validateAndParseJson(n);return!i||!Md.isServerTelemetryEntity(r,i)?(this.logger.trace("BrowserCacheManager.getServerTelemetry: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getServerTelemetry: cache hit"),Wr.toObject(new Md,i))},e.prototype.setServerTelemetry=function(r,n){this.logger.trace("BrowserCacheManager.setServerTelemetry called"),this.setItem(r,JSON.stringify(n))},e.prototype.getAuthorityMetadata=function(r){var n=this.internalStorage.getItem(r);if(!n)return this.logger.trace("BrowserCacheManager.getAuthorityMetadata: called, no cache hit"),null;var i=this.validateAndParseJson(n);return i&&qu.isAuthorityMetadataEntity(r,i)?(this.logger.trace("BrowserCacheManager.getAuthorityMetadata: cache hit"),Wr.toObject(new qu,i)):null},e.prototype.getAuthorityMetadataKeys=function(){var r=this,n=this.internalStorage.getKeys();return n.filter(function(i){return r.isAuthorityMetadata(i)})},e.prototype.setWrapperMetadata=function(r,n){this.internalStorage.setItem(ra.WRAPPER_SKU,r),this.internalStorage.setItem(ra.WRAPPER_VER,n)},e.prototype.getWrapperMetadata=function(){var r=this.internalStorage.getItem(ra.WRAPPER_SKU)||b.EMPTY_STRING,n=this.internalStorage.getItem(ra.WRAPPER_VER)||b.EMPTY_STRING;return[r,n]},e.prototype.setAuthorityMetadata=function(r,n){this.logger.trace("BrowserCacheManager.setAuthorityMetadata called"),this.internalStorage.setItem(r,JSON.stringify(n))},e.prototype.getActiveAccount=function(){var r=this.generateCacheKey(ot.ACTIVE_ACCOUNT_FILTERS),n=this.getItem(r);if(!n){this.logger.trace("No active account filters cache schema found, looking for legacy schema");var i=this.generateCacheKey(ot.ACTIVE_ACCOUNT),o=this.getItem(i);if(!o)return this.logger.trace("No active account found"),null;var a=this.getAccountInfoByFilter({localAccountId:o})[0]||null;return a?(this.logger.trace("Legacy active account cache schema found"),this.logger.trace("Adding active account filters cache schema"),this.setActiveAccount(a),a):null}var s=this.validateAndParseJson(n);return s?(this.logger.trace("Active account filters schema found"),this.getAccountInfoByFilter({homeAccountId:s.homeAccountId,localAccountId:s.localAccountId})[0]||null):(this.logger.trace("No active account found"),null)},e.prototype.setActiveAccount=function(r){var n=this.generateCacheKey(ot.ACTIVE_ACCOUNT_FILTERS),i=this.generateCacheKey(ot.ACTIVE_ACCOUNT);if(r){this.logger.verbose("setActiveAccount: Active account set");var o={homeAccountId:r.homeAccountId,localAccountId:r.localAccountId};this.browserStorage.setItem(n,JSON.stringify(o)),this.browserStorage.setItem(i,r.localAccountId)}else this.logger.verbose("setActiveAccount: No account passed, active account not set"),this.browserStorage.removeItem(n),this.browserStorage.removeItem(i)},e.prototype.getAccountInfoByFilter=function(r){var n=this.getAllAccounts();return n.filter(function(i){return!(r.username&&r.username.toLowerCase()!==i.username.toLowerCase()||r.homeAccountId&&r.homeAccountId!==i.homeAccountId||r.localAccountId&&r.localAccountId!==i.localAccountId||r.tenantId&&r.tenantId!==i.tenantId||r.environment&&r.environment!==i.environment)})},e.prototype.getAccountInfoByHints=function(r,n){var i=this.getAllAccounts().filter(function(o){if(n){var a=o.idTokenClaims&&o.idTokenClaims.sid;return n===a}return r?r===o.username:!1});if(i.length===1)return i[0];if(i.length>1)throw j.createMultipleMatchingAccountsInCacheError();return null},e.prototype.getThrottlingCache=function(r){var n=this.getItem(r);if(!n)return this.logger.trace("BrowserCacheManager.getThrottlingCache: called, no cache hit"),null;var i=this.validateAndParseJson(n);return!i||!Hp.isThrottlingEntity(r,i)?(this.logger.trace("BrowserCacheManager.getThrottlingCache: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getThrottlingCache: cache hit"),Wr.toObject(new Hp,i))},e.prototype.setThrottlingCache=function(r,n){this.logger.trace("BrowserCacheManager.setThrottlingCache called"),this.setItem(r,JSON.stringify(n))},e.prototype.getTemporaryCache=function(r,n){var i=n?this.generateCacheKey(r):r;if(this.cacheConfig.storeAuthStateInCookie){var o=this.getItemCookie(i);if(o)return this.logger.trace("BrowserCacheManager.getTemporaryCache: storeAuthStateInCookies set to true, retrieving from cookies"),o}var a=this.temporaryCacheStorage.getItem(i);if(!a){if(this.cacheConfig.cacheLocation===Ot.LocalStorage){var s=this.browserStorage.getItem(i);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},e.prototype.setTemporaryCache=function(r,n,i){var o=i?this.generateCacheKey(r):r;this.temporaryCacheStorage.setItem(o,n),this.cacheConfig.storeAuthStateInCookie&&(this.logger.trace("BrowserCacheManager.setTemporaryCache: storeAuthStateInCookie set to true, setting item cookie"),this.setItemCookie(o,n))},e.prototype.removeItem=function(r){return this.browserStorage.removeItem(r),this.temporaryCacheStorage.removeItem(r),this.cacheConfig.storeAuthStateInCookie&&(this.logger.trace("BrowserCacheManager.removeItem: storeAuthStateInCookie is true, clearing item cookie"),this.clearItemCookie(r)),!0},e.prototype.containsKey=function(r){return this.browserStorage.containsKey(r)||this.temporaryCacheStorage.containsKey(r)},e.prototype.getKeys=function(){return M0(this.browserStorage.getKeys(),this.temporaryCacheStorage.getKeys())},e.prototype.clear=function(){return S(this,void 0,void 0,function(){var r=this;return k(this,function(n){switch(n.label){case 0:return[4,this.removeAllAccounts()];case 1:return n.sent(),this.removeAppMetadata(),this.getKeys().forEach(function(i){(r.browserStorage.containsKey(i)||r.temporaryCacheStorage.containsKey(i))&&(i.indexOf(b.CACHE_PREFIX)!==-1||i.indexOf(r.clientId)!==-1)&&r.removeItem(i)}),this.internalStorage.clear(),[2]}})})},e.prototype.setItemCookie=function(r,n,i){var o=encodeURIComponent(r)+"="+encodeURIComponent(n)+";path=/;SameSite=Lax;";if(i){var a=this.getCookieExpirationTime(i);o+="expires="+a+";"}this.cacheConfig.secureCookies&&(o+="Secure;"),document.cookie=o},e.prototype.getItemCookie=function(r){for(var n=encodeURIComponent(r)+"=",i=document.cookie.split(";"),o=0;o<i.length;o++){for(var a=i[o];a.charAt(0)===" ";)a=a.substring(1);if(a.indexOf(n)===0)return decodeURIComponent(a.substring(n.length,a.length))}return b.EMPTY_STRING},e.prototype.clearMsalCookies=function(){var r=this,n=b.CACHE_PREFIX+"."+this.clientId,i=document.cookie.split(";");i.forEach(function(o){for(;o.charAt(0)===" ";)o=o.substring(1);if(o.indexOf(n)===0){var a=o.split("=")[0];r.clearItemCookie(a)}})},e.prototype.clearItemCookie=function(r){this.setItemCookie(r,b.EMPTY_STRING,-1)},e.prototype.getCookieExpirationTime=function(r){var n=new Date,i=new Date(n.getTime()+r*this.COOKIE_LIFE_MULTIPLIER);return i.toUTCString()},e.prototype.getCache=function(){return this.browserStorage},e.prototype.setCache=function(){},e.prototype.generateCacheKey=function(r){var n=this.validateAndParseJson(r);return n?JSON.stringify(r):N.startsWith(r,b.CACHE_PREFIX)||N.startsWith(r,ot.ADAL_ID_TOKEN)?r:b.CACHE_PREFIX+"."+this.clientId+"."+r},e.prototype.generateAuthorityKey=function(r){var n=Un.parseRequestState(this.cryptoImpl,r).libraryState.id;return this.generateCacheKey(ge.AUTHORITY+"."+n)},e.prototype.generateNonceKey=function(r){var n=Un.parseRequestState(this.cryptoImpl,r).libraryState.id;return this.generateCacheKey(ge.NONCE_IDTOKEN+"."+n)},e.prototype.generateStateKey=function(r){var n=Un.parseRequestState(this.cryptoImpl,r).libraryState.id;return this.generateCacheKey(ge.REQUEST_STATE+"."+n)},e.prototype.getCachedAuthority=function(r){var n=this.generateStateKey(r),i=this.getTemporaryCache(n);if(!i)return null;var o=this.generateAuthorityKey(i);return this.getTemporaryCache(o)},e.prototype.updateCacheEntries=function(r,n,i,o,a){this.logger.trace("BrowserCacheManager.updateCacheEntries called");var s=this.generateStateKey(r);this.setTemporaryCache(s,r,!1);var c=this.generateNonceKey(r);this.setTemporaryCache(c,n,!1);var l=this.generateAuthorityKey(r);if(this.setTemporaryCache(l,i,!1),a){var d={credential:a.homeAccountId,type:_r.HOME_ACCOUNT_ID};this.setTemporaryCache(ge.CCS_CREDENTIAL,JSON.stringify(d),!0)}else if(!N.isEmpty(o)){var d={credential:o,type:_r.UPN};this.setTemporaryCache(ge.CCS_CREDENTIAL,JSON.stringify(d),!0)}},e.prototype.resetRequestCache=function(r){var n=this;this.logger.trace("BrowserCacheManager.resetRequestCache called"),N.isEmpty(r)||this.getKeys().forEach(function(i){i.indexOf(r)!==-1&&n.removeItem(i)}),r&&(this.removeItem(this.generateStateKey(r)),this.removeItem(this.generateNonceKey(r)),this.removeItem(this.generateAuthorityKey(r))),this.removeItem(this.generateCacheKey(ge.REQUEST_PARAMS)),this.removeItem(this.generateCacheKey(ge.ORIGIN_URI)),this.removeItem(this.generateCacheKey(ge.URL_HASH)),this.removeItem(this.generateCacheKey(ge.CORRELATION_ID)),this.removeItem(this.generateCacheKey(ge.CCS_CREDENTIAL)),this.removeItem(this.generateCacheKey(ge.NATIVE_REQUEST)),this.setInteractionInProgress(!1)},e.prototype.cleanRequestByState=function(r){if(this.logger.trace("BrowserCacheManager.cleanRequestByState called"),r){var n=this.generateStateKey(r),i=this.temporaryCacheStorage.getItem(n);this.logger.infoPii("BrowserCacheManager.cleanRequestByState: Removing temporary cache items for state: "+i),this.resetRequestCache(i||b.EMPTY_STRING)}this.clearMsalCookies()},e.prototype.cleanRequestByInteractionType=function(r){var n=this;this.logger.trace("BrowserCacheManager.cleanRequestByInteractionType called"),this.getKeys().forEach(function(i){if(i.indexOf(ge.REQUEST_STATE)!==-1){var o=n.temporaryCacheStorage.getItem(i);if(!!o){var a=Pg.extractBrowserRequestState(n.cryptoImpl,o);a&&a.interactionType===r&&(n.logger.infoPii("BrowserCacheManager.cleanRequestByInteractionType: Removing temporary cache items for state: "+o),n.resetRequestCache(o))}}}),this.clearMsalCookies(),this.setInteractionInProgress(!1)},e.prototype.cacheCodeRequest=function(r,n){this.logger.trace("BrowserCacheManager.cacheCodeRequest called");var i=n.base64Encode(JSON.stringify(r));this.setTemporaryCache(ge.REQUEST_PARAMS,i,!0)},e.prototype.getCachedRequest=function(r,n){this.logger.trace("BrowserCacheManager.getCachedRequest called");var i=this.getTemporaryCache(ge.REQUEST_PARAMS,!0);if(!i)throw O.createNoTokenRequestCacheError();var o=this.validateAndParseJson(n.base64Decode(i));if(!o)throw O.createUnableToParseTokenRequestCacheError();if(this.removeItem(this.generateCacheKey(ge.REQUEST_PARAMS)),N.isEmpty(o.authority)){var a=this.generateAuthorityKey(r),s=this.getTemporaryCache(a);if(!s)throw O.createNoCachedAuthorityError();o.authority=s}return o},e.prototype.getCachedNativeRequest=function(){this.logger.trace("BrowserCacheManager.getCachedNativeRequest called");var r=this.getTemporaryCache(ge.NATIVE_REQUEST,!0);if(!r)return this.logger.trace("BrowserCacheManager.getCachedNativeRequest: No cached native request found"),null;var n=this.validateAndParseJson(r);return n||(this.logger.error("BrowserCacheManager.getCachedNativeRequest: Unable to parse native request"),null)},e.prototype.isInteractionInProgress=function(r){var n=this.getInteractionInProgress();return r?n===this.clientId:!!n},e.prototype.getInteractionInProgress=function(){var r=b.CACHE_PREFIX+"."+ge.INTERACTION_STATUS_KEY;return this.getTemporaryCache(r,!1)},e.prototype.setInteractionInProgress=function(r){var n=b.CACHE_PREFIX+"."+ge.INTERACTION_STATUS_KEY;if(r){if(this.getInteractionInProgress())throw O.createInteractionInProgressError();this.setTemporaryCache(n,this.clientId,!1)}else!r&&this.getInteractionInProgress()===this.clientId&&this.removeItem(n)},e.prototype.getLegacyLoginHint=function(){var r=this.getTemporaryCache(ot.ADAL_ID_TOKEN);r&&(this.browserStorage.removeItem(ot.ADAL_ID_TOKEN),this.logger.verbose("Cached ADAL id token retrieved."));var n=this.getTemporaryCache(ot.ID_TOKEN,!0);n&&(this.removeItem(this.generateCacheKey(ot.ID_TOKEN)),this.logger.verbose("Cached MSAL.js v1 id token retrieved"));var i=n||r;if(i){var o=new wn(i,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},e.prototype.updateCredentialCacheKey=function(r,n){var i=n.generateCredentialKey();if(r!==i){var o=this.getItem(r);if(o)return this.removeItem(r),this.setItem(i,o),this.logger.verbose("Updated an outdated "+n.credentialType+" cache key"),i;this.logger.error("Attempted to update an outdated "+n.credentialType+" cache key but no item matching the outdated key was found in storage")}return r},e}(Wr),$y=function(t,e){var r={cacheLocation:Ot.MemoryStorage,storeAuthStateInCookie:!1,secureCookies:!1};return new Wu(t,r,Ed,e)};/*! @azure/msal-browser v2.31.0 2022-11-07 */var ih="@azure/msal-browser",Rs="2.31.0";/*! @azure/msal-browser v2.31.0 2022-11-07 */var jy=function(){function t(){}return t.prototype.sendGetRequestAsync=function(e,r){return S(this,void 0,void 0,function(){var n,i,o;return k(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,fetch(e,{method:un.GET,headers:this.getFetchHeaders(r)})];case 1:return n=a.sent(),[3,3];case 2:throw i=a.sent(),window.navigator.onLine?O.createGetRequestFailedError(i,e):O.createNoNetworkConnectivityError();case 3:return a.trys.push([3,5,,6]),o={headers:this.getHeaderDict(n.headers)},[4,n.json()];case 4:return[2,(o.body=a.sent(),o.status=n.status,o)];case 5:throw a.sent(),O.createFailedToParseNetworkResponseError(e);case 6:return[2]}})})},t.prototype.sendPostRequestAsync=function(e,r){return S(this,void 0,void 0,function(){var n,i,o,a;return k(this,function(s){switch(s.label){case 0:n=r&&r.body||b.EMPTY_STRING,s.label=1;case 1:return s.trys.push([1,3,,4]),[4,fetch(e,{method:un.POST,headers:this.getFetchHeaders(r),body:n})];case 2:return i=s.sent(),[3,4];case 3:throw o=s.sent(),window.navigator.onLine?O.createPostRequestFailedError(o,e):O.createNoNetworkConnectivityError();case 4:return s.trys.push([4,6,,7]),a={headers:this.getHeaderDict(i.headers)},[4,i.json()];case 5:return[2,(a.body=s.sent(),a.status=i.status,a)];case 6:throw s.sent(),O.createFailedToParseNetworkResponseError(e);case 7:return[2]}})})},t.prototype.getFetchHeaders=function(e){var r=new Headers;if(!(e&&e.headers))return r;var n=e.headers;return Object.keys(n).forEach(function(i){r.append(i,n[i])}),r},t.prototype.getHeaderDict=function(e){var r={};return e.forEach(function(n,i){r[i]=n}),r},t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var By=function(){function t(){}return t.prototype.sendGetRequestAsync=function(e,r){return S(this,void 0,void 0,function(){return k(this,function(n){return[2,this.sendRequestAsync(e,un.GET,r)]})})},t.prototype.sendPostRequestAsync=function(e,r){return S(this,void 0,void 0,function(){return k(this,function(n){return[2,this.sendRequestAsync(e,un.POST,r)]})})},t.prototype.sendRequestAsync=function(e,r,n){var i=this;return new Promise(function(o,a){var s=new XMLHttpRequest;if(s.open(r,e,!0),i.setXhrHeaders(s,n),s.onload=function(){(s.status<200||s.status>=300)&&(r===un.POST?a(O.createPostRequestFailedError("Failed with status "+s.status,e)):a(O.createGetRequestFailedError("Failed with status "+s.status,e)));try{var c=JSON.parse(s.responseText),l={headers:i.getHeaderDict(s),body:c,status:s.status};o(l)}catch{a(O.createFailedToParseNetworkResponseError(e))}},s.onerror=function(){window.navigator.onLine?r===un.POST?a(O.createPostRequestFailedError("Failed with status "+s.status,e)):a(O.createGetRequestFailedError("Failed with status "+s.status,e)):a(O.createNoNetworkConnectivityError())},r===un.POST&&n&&n.body)s.send(n.body);else if(r===un.GET)s.send();else throw O.createHttpMethodNotImplementedError(r)})},t.prototype.setXhrHeaders=function(e,r){if(r&&r.headers){var n=r.headers;Object.keys(n).forEach(function(i){e.setRequestHeader(i,n[i])})}},t.prototype.getHeaderDict=function(e){var r=e.getAllResponseHeaders(),n=r.trim().split(/[\r\n]+/),i={};return n.forEach(function(o){var a=o.split(": "),s=a.shift(),c=a.join(": ");s&&c&&(i[s]=c)}),i},t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var We=function(){function t(){}return t.clearHash=function(e){e.location.hash=b.EMPTY_STRING,typeof e.history.replaceState=="function"&&e.history.replaceState(null,b.EMPTY_STRING,""+e.location.origin+e.location.pathname+e.location.search)},t.replaceHash=function(e){var r=e.split("#");r.shift(),window.location.hash=r.length>0?r.join("#"):b.EMPTY_STRING},t.isInIframe=function(){return window.parent!==window},t.isInPopup=function(){return typeof window<"u"&&!!window.opener&&window.opener!==window&&typeof window.name=="string"&&window.name.indexOf(Jr.POPUP_NAME_PREFIX+".")===0},t.getCurrentUri=function(){return window.location.href.split("?")[0].split("#")[0]},t.getHomepage=function(){var e=new me(window.location.href),r=e.getUrlComponents();return r.Protocol+"//"+r.HostNameAndPort+"/"},t.getBrowserNetworkClient=function(){return window.fetch&&window.Headers?new jy:new By},t.blockReloadInHiddenIframes=function(){var e=me.hashContainsKnownProperties(window.location.hash);if(e&&t.isInIframe())throw O.createBlockReloadInHiddenIframeError()},t.blockRedirectInIframe=function(e,r){var n=t.isInIframe();if(e===G.Redirect&&n&&!r)throw O.createRedirectInIframeError(n)},t.blockAcquireTokenInPopups=function(){if(t.isInPopup())throw O.createBlockAcquireTokenInPopupsError()},t.blockNonBrowserEnvironment=function(e){if(!e)throw O.createNonBrowserEnvironmentError()},t.blockNativeBrokerCalledBeforeInitialized=function(e,r){if(e&&!r)throw O.createNativeBrokerCalledBeforeInitialize()},t.detectIEOrEdge=function(){var e=window.navigator.userAgent,r=e.indexOf("MSIE "),n=e.indexOf("Trident/"),i=e.indexOf("Edge/"),o=r>0||n>0,a=i>0;return o||a},t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var Rg=function(){function t(e,r,n,i,o,a,s,c,l){this.config=e,this.browserStorage=r,this.browserCrypto=n,this.networkClient=this.config.system.networkClient,this.eventHandler=o,this.navigationClient=a,this.nativeMessageHandler=c,this.correlationId=l||this.browserCrypto.createNewGuid(),this.logger=i.clone(Jr.MSAL_SKU,Rs,this.correlationId),this.performanceClient=s}return t.prototype.clearCacheOnLogout=function(e){return S(this,void 0,void 0,function(){return k(this,function(r){switch(r.label){case 0:if(!e)return[3,5];_t.accountInfoIsEqual(e,this.browserStorage.getActiveAccount(),!1)&&(this.logger.verbose("Setting active account to null"),this.browserStorage.setActiveAccount(null)),r.label=1;case 1:return r.trys.push([1,3,,4]),[4,this.browserStorage.removeAccount(_t.generateAccountCacheKey(e))];case 2:return r.sent(),this.logger.verbose("Cleared cache items belonging to the account provided in the logout request."),[3,4];case 3:return r.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 r.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 r.sent(),[4,this.browserCrypto.clearKeystore()];case 7:return r.sent(),[3,9];case 8:return r.sent(),this.logger.error("Attempted to clear all MSAL cache items and failed. Local cache unchanged."),[3,9];case 9:return[2]}})})},t.prototype.initializeBaseRequest=function(e){return S(this,void 0,void 0,function(){var r,n,i,o;return k(this,function(a){switch(a.label){case 0:if(this.logger.verbose("Initializing BaseAuthRequest"),r=e.authority||this.config.auth.authority,n=M0(e&&e.scopes||[]),i=W(W({},e),{correlationId:this.correlationId,authority:r,scopes:n}),!i.authenticationScheme)i.authenticationScheme=be.BEARER,this.logger.verbose(`Authentication Scheme wasn't explicitly set in request, defaulting to "Bearer" request`);else{if(i.authenticationScheme===be.SSH){if(!e.sshJwk)throw He.createMissingSshJwkError();if(!e.sshKid)throw He.createMissingSshKidError()}this.logger.verbose('Authentication Scheme set to "'+i.authenticationScheme+'" as configured in Auth request')}return e.claims&&!N.isEmpty(e.claims)?(o=i,[4,this.browserCrypto.hashString(e.claims)]):[3,2];case 1:o.requestedClaimsHash=a.sent(),a.label=2;case 2:return[2,i]}})})},t.prototype.getRedirectUri=function(e){this.logger.verbose("getRedirectUri called");var r=e||this.config.auth.redirectUri||We.getCurrentUri();return me.getAbsoluteUrl(r,We.getCurrentUri())},t.prototype.initializeServerTelemetryManager=function(e,r){this.logger.verbose("initializeServerTelemetryManager called");var n={clientId:this.config.auth.clientId,correlationId:this.correlationId,apiId:e,forceRefresh:r||!1,wrapperSKU:this.browserStorage.getWrapperMetadata()[0],wrapperVer:this.browserStorage.getWrapperMetadata()[1]};return new Dy(n,this.browserStorage)},t.prototype.getDiscoveredAuthority=function(e){return S(this,void 0,void 0,function(){var r;return k(this,function(n){switch(n.label){case 0:return this.logger.verbose("getDiscoveredAuthority called"),r={protocolMode:this.config.auth.protocolMode,knownAuthorities:this.config.auth.knownAuthorities,cloudDiscoveryMetadata:this.config.auth.cloudDiscoveryMetadata,authorityMetadata:this.config.auth.authorityMetadata},e?(this.logger.verbose("Creating discovered authority with request authority"),[4,Id.createDiscoveredInstance(e,this.config.system.networkClient,this.browserStorage,r)]):[3,2];case 1:return[2,n.sent()];case 2:return this.logger.verbose("Creating discovered authority with configured authority"),[4,Id.createDiscoveredInstance(this.config.auth.authority,this.config.system.networkClient,this.browserStorage,r)];case 3:return[2,n.sent()]}})})},t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var Pa=function(t){xt(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.initializeAuthorizationCodeRequest=function(r){return S(this,void 0,void 0,function(){var n,i;return k(this,function(o){switch(o.label){case 0:return this.logger.verbose("initializeAuthorizationRequest called",r.correlationId),[4,this.browserCrypto.generatePkceCodes()];case 1:return n=o.sent(),i=W(W({},r),{redirectUri:r.redirectUri,code:b.EMPTY_STRING,codeVerifier:n.verifier}),r.codeChallenge=n.challenge,r.codeChallengeMethod=b.S256_CODE_CHALLENGE_METHOD,[2,i]}})})},e.prototype.initializeLogoutRequest=function(r){this.logger.verbose("initializeLogoutRequest called",r==null?void 0:r.correlationId);var n=W({correlationId:this.correlationId||this.browserCrypto.createNewGuid()},r);if(r)if(r.logoutHint)this.logger.verbose("logoutHint has already been set in logoutRequest");else if(r.account){var i=this.getLogoutHintFromIdTokenClaims(r.account);i&&(this.logger.verbose("Setting logoutHint to login_hint ID Token Claim value for the account provided"),n.logoutHint=i)}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!r||r.postLogoutRedirectUri!==null?r&&r.postLogoutRedirectUri?(this.logger.verbose("Setting postLogoutRedirectUri to uri set on logout request",n.correlationId),n.postLogoutRedirectUri=me.getAbsoluteUrl(r.postLogoutRedirectUri,We.getCurrentUri())):this.config.auth.postLogoutRedirectUri===null?this.logger.verbose("postLogoutRedirectUri configured as null and no uri set on request, not passing post logout redirect",n.correlationId):this.config.auth.postLogoutRedirectUri?(this.logger.verbose("Setting postLogoutRedirectUri to configured uri",n.correlationId),n.postLogoutRedirectUri=me.getAbsoluteUrl(this.config.auth.postLogoutRedirectUri,We.getCurrentUri())):(this.logger.verbose("Setting postLogoutRedirectUri to current page",n.correlationId),n.postLogoutRedirectUri=me.getAbsoluteUrl(We.getCurrentUri(),We.getCurrentUri())):this.logger.verbose("postLogoutRedirectUri passed as null, not setting post logout redirect uri",n.correlationId),n},e.prototype.getLogoutHintFromIdTokenClaims=function(r){var n=r.idTokenClaims;if(n){if(n.login_hint)return n.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},e.prototype.createAuthCodeClient=function(r,n,i){return S(this,void 0,void 0,function(){var o;return k(this,function(a){switch(a.label){case 0:return[4,this.getClientConfiguration(r,n,i)];case 1:return o=a.sent(),[2,new Tg(o)]}})})},e.prototype.getClientConfiguration=function(r,n,i){return S(this,void 0,void 0,function(){var o;return k(this,function(a){switch(a.label){case 0:return this.logger.verbose("getClientConfiguration called",this.correlationId),[4,this.getDiscoveredAuthority(n,i)];case 1:return o=a.sent(),[2,{authOptions:{clientId:this.config.auth.clientId,authority:o,clientCapabilities:this.config.auth.clientCapabilities},systemOptions:{tokenRenewalOffsetSeconds:this.config.system.tokenRenewalOffsetSeconds,preventCorsPreflight:!0},loggerOptions:{loggerCallback:this.config.system.loggerOptions.loggerCallback,piiLoggingEnabled:this.config.system.loggerOptions.piiLoggingEnabled,logLevel:this.config.system.loggerOptions.logLevel,correlationId:this.correlationId},cryptoInterface:this.browserCrypto,networkInterface:this.networkClient,storageInterface:this.browserStorage,serverTelemetryManager:r,libraryInfo:{sku:Jr.MSAL_SKU,version:Rs,cpu:b.EMPTY_STRING,os:b.EMPTY_STRING},telemetry:this.config.telemetry}]}})})},e.prototype.validateAndExtractStateFromHash=function(r,n,i){if(this.logger.verbose("validateAndExtractStateFromHash called",i),!r.state)throw O.createHashDoesNotContainStateError();var o=Pg.extractBrowserRequestState(this.browserCrypto,r.state);if(!o)throw O.createUnableToParseStateError();if(o.interactionType!==n)throw O.createStateInteractionTypeMismatchError();return this.logger.verbose("Returning state from hash",i),r.state},e.prototype.getDiscoveredAuthority=function(r,n){return S(this,void 0,void 0,function(){var i,o,a,s;return k(this,function(c){switch(c.label){case 0:return this.logger.verbose("getDiscoveredAuthority called",this.correlationId),i=this.performanceClient.startMeasurement(lt.StandardInteractionClientGetDiscoveredAuthority,this.correlationId),o={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},a=r||this.config.auth.authority,s=Ad.generateAuthority(a,n||this.config.auth.azureCloudOptions),this.logger.verbose("Creating discovered authority with configured authority",this.correlationId),[4,Id.createDiscoveredInstance(s,this.config.system.networkClient,this.browserStorage,o).then(function(l){return i.endMeasurement({success:!0}),l}).catch(function(l){throw i.endMeasurement({errorCode:l.errorCode,subErrorCode:l.subError,success:!1}),l})];case 1:return[2,c.sent()]}})})},e.prototype.initializeAuthorizationRequest=function(r,n){return S(this,void 0,void 0,function(){var i,o,a,s,c,l,d;return k(this,function(h){switch(h.label){case 0:return this.logger.verbose("initializeAuthorizationRequest called",this.correlationId),i=this.getRedirectUri(r.redirectUri),o={interactionType:n},a=Un.setRequestState(this.browserCrypto,r&&r.state||b.EMPTY_STRING,o),c=[{}],[4,this.initializeBaseRequest(r)];case 1:return s=W.apply(void 0,[W.apply(void 0,c.concat([h.sent()])),{redirectUri:i,state:a,nonce:r.nonce||this.browserCrypto.createNewGuid(),responseMode:_d.FRAGMENT}]),l=r.account||this.browserStorage.getActiveAccount(),l&&(this.logger.verbose("Setting validated request account",this.correlationId),this.logger.verbosePii("Setting validated request account: "+l.homeAccountId,this.correlationId),s.account=l),N.isEmpty(s.loginHint)&&!l&&(d=this.browserStorage.getLegacyLoginHint(),d&&(s.loginHint=d)),[2,s]}})})},e}(Rg);/*! @azure/msal-browser v2.31.0 2022-11-07 */var H0=function(){function t(e,r,n,i){this.authModule=e,this.browserStorage=r,this.authCodeRequest=n,this.logger=i}return t.prototype.handleCodeResponseFromHash=function(e,r,n,i){return S(this,void 0,void 0,function(){var o,a,s;return k(this,function(c){if(this.logger.verbose("InteractionHandler.handleCodeResponse called"),N.isEmpty(e))throw O.createEmptyHashError(e);if(o=this.browserStorage.generateStateKey(r),a=this.browserStorage.getTemporaryCache(o),!a)throw j.createStateNotFoundError("Cached State");try{s=this.authModule.handleFragmentResponse(e,a)}catch(l){throw l instanceof go&&l.subError===I.userCancelledError.code?O.createUserCancelledError():l}return[2,this.handleCodeResponseFromServer(s,r,n,i)]})})},t.prototype.handleCodeResponseFromServer=function(e,r,n,i,o){return o===void 0&&(o=!0),S(this,void 0,void 0,function(){var a,s,c,l,d,h;return k(this,function(u){switch(u.label){case 0:if(this.logger.trace("InteractionHandler.handleCodeResponseFromServer called"),a=this.browserStorage.generateStateKey(r),s=this.browserStorage.getTemporaryCache(a),!s)throw j.createStateNotFoundError("Cached State");return c=this.browserStorage.generateNonceKey(s),l=this.browserStorage.getTemporaryCache(c),this.authCodeRequest.code=e.code,e.cloud_instance_host_name?[4,this.updateTokenEndpointAuthority(e.cloud_instance_host_name,n,i)]:[3,2];case 1:u.sent(),u.label=2;case 2:return o&&(e.nonce=l||void 0),e.state=s,e.client_info?this.authCodeRequest.clientInfo=e.client_info:(d=this.checkCcsCredentials(),d&&(this.authCodeRequest.ccsCredential=d)),[4,this.authModule.acquireToken(this.authCodeRequest,e)];case 3:return h=u.sent(),this.browserStorage.cleanRequestByState(r),[2,h]}})})},t.prototype.updateTokenEndpointAuthority=function(e,r,n){return S(this,void 0,void 0,function(){var i,o;return k(this,function(a){switch(a.label){case 0:return i="https://"+e+"/"+r.tenant+"/",[4,Id.createDiscoveredInstance(i,n,this.browserStorage,r.options)];case 1:return o=a.sent(),this.authModule.updateAuthority(o),[2]}})})},t.prototype.checkCcsCredentials=function(){var e=this.browserStorage.getTemporaryCache(ge.CCS_CREDENTIAL,!0);if(e)try{return JSON.parse(e)}catch{this.authModule.logger.error("Cache credential could not be parsed"),this.authModule.logger.errorPii("Cache credential could not be parsed: "+e)}return null},t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var Up=function(t){xt(e,t);function e(r,n,i,o,a){var s=t.call(this,r,n,i,o)||this;return s.browserCrypto=a,s}return e.prototype.initiateAuthRequest=function(r,n){return S(this,void 0,void 0,function(){var i,o;return k(this,function(a){switch(a.label){case 0:return this.logger.verbose("RedirectHandler.initiateAuthRequest called"),N.isEmpty(r)?[3,7]:(n.redirectStartPage&&(this.logger.verbose("RedirectHandler.initiateAuthRequest: redirectStartPage set, caching start page"),this.browserStorage.setTemporaryCache(ge.ORIGIN_URI,n.redirectStartPage,!0)),this.browserStorage.setTemporaryCache(ge.CORRELATION_ID,this.authCodeRequest.correlationId,!0),this.browserStorage.cacheCodeRequest(this.authCodeRequest,this.browserCrypto),this.logger.infoPii("RedirectHandler.initiateAuthRequest: Navigate to: "+r),i={apiId:Ae.acquireTokenRedirect,timeout:n.redirectTimeout,noHistory:!1},typeof n.onRedirectNavigate!="function"?[3,4]:(this.logger.verbose("RedirectHandler.initiateAuthRequest: Invoking onRedirectNavigate callback"),o=n.onRedirectNavigate(r),o===!1?[3,2]:(this.logger.verbose("RedirectHandler.initiateAuthRequest: onRedirectNavigate did not return false, navigating"),[4,n.navigationClient.navigateExternal(r,i)])));case 1:return a.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,n.navigationClient.navigateExternal(r,i)];case 5:return a.sent(),[2];case 6:return[3,8];case 7:throw this.logger.info("RedirectHandler.initiateAuthRequest: Navigate url is empty"),O.createEmptyNavigationUriError();case 8:return[2]}})})},e.prototype.handleCodeResponseFromHash=function(r,n,i,o){return S(this,void 0,void 0,function(){var a,s,c,l,d,h,u;return k(this,function(f){switch(f.label){case 0:if(this.logger.verbose("RedirectHandler.handleCodeResponse called"),N.isEmpty(r))throw O.createEmptyHashError(r);if(this.browserStorage.setInteractionInProgress(!1),a=this.browserStorage.generateStateKey(n),s=this.browserStorage.getTemporaryCache(a),!s)throw j.createStateNotFoundError("Cached State");try{c=this.authModule.handleFragmentResponse(r,s)}catch(v){throw v instanceof go&&v.subError===I.userCancelledError.code?O.createUserCancelledError():v}return l=this.browserStorage.generateNonceKey(s),d=this.browserStorage.getTemporaryCache(l),this.authCodeRequest.code=c.code,c.cloud_instance_host_name?[4,this.updateTokenEndpointAuthority(c.cloud_instance_host_name,i,o)]:[3,2];case 1:f.sent(),f.label=2;case 2:return c.nonce=d||void 0,c.state=s,c.client_info?this.authCodeRequest.clientInfo=c.client_info:(h=this.checkCcsCredentials(),h&&(this.authCodeRequest.ccsCredential=h)),[4,this.authModule.acquireToken(this.authCodeRequest,c)];case 3:return u=f.sent(),this.browserStorage.cleanRequestByState(n),[2,u]}})})},e}(H0);/*! @azure/msal-browser v2.31.0 2022-11-07 */var X;(function(t){t.INITIALIZE_START="msal:initializeStart",t.INITIALIZE_END="msal:initializeEnd",t.ACCOUNT_ADDED="msal:accountAdded",t.ACCOUNT_REMOVED="msal:accountRemoved",t.LOGIN_START="msal:loginStart",t.LOGIN_SUCCESS="msal:loginSuccess",t.LOGIN_FAILURE="msal:loginFailure",t.ACQUIRE_TOKEN_START="msal:acquireTokenStart",t.ACQUIRE_TOKEN_SUCCESS="msal:acquireTokenSuccess",t.ACQUIRE_TOKEN_FAILURE="msal:acquireTokenFailure",t.ACQUIRE_TOKEN_NETWORK_START="msal:acquireTokenFromNetworkStart",t.SSO_SILENT_START="msal:ssoSilentStart",t.SSO_SILENT_SUCCESS="msal:ssoSilentSuccess",t.SSO_SILENT_FAILURE="msal:ssoSilentFailure",t.ACQUIRE_TOKEN_BY_CODE_START="msal:acquireTokenByCodeStart",t.ACQUIRE_TOKEN_BY_CODE_SUCCESS="msal:acquireTokenByCodeSuccess",t.ACQUIRE_TOKEN_BY_CODE_FAILURE="msal:acquireTokenByCodeFailure",t.HANDLE_REDIRECT_START="msal:handleRedirectStart",t.HANDLE_REDIRECT_END="msal:handleRedirectEnd",t.POPUP_OPENED="msal:popupOpened",t.LOGOUT_START="msal:logoutStart",t.LOGOUT_SUCCESS="msal:logoutSuccess",t.LOGOUT_FAILURE="msal:logoutFailure",t.LOGOUT_END="msal:logoutEnd"})(X||(X={}));/*! @azure/msal-browser v2.31.0 2022-11-07 */var hi;(function(t){t.USER_INTERACTION_REQUIRED="USER_INTERACTION_REQUIRED",t.USER_CANCEL="USER_CANCEL",t.NO_NETWORK="NO_NETWORK",t.TRANSIENT_ERROR="TRANSIENT_ERROR",t.PERSISTENT_ERROR="PERSISTENT_ERROR",t.DISABLED="DISABLED",t.ACCOUNT_UNAVAILABLE="ACCOUNT_UNAVAILABLE"})(hi||(hi={}));var Ya={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"}},mn=function(t){xt(e,t);function e(r,n,i){var o=t.call(this,r,n)||this;return Object.setPrototypeOf(o,e.prototype),o.name="NativeAuthError",o.ext=i,o}return e.prototype.isFatal=function(){if(this.ext&&this.ext.status&&(this.ext.status===hi.PERSISTENT_ERROR||this.ext.status===hi.DISABLED))return!0;switch(this.errorCode){case Ya.extensionError.code:return!0;default:return!1}},e.createError=function(r,n,i){if(i&&i.status)switch(i.status){case hi.ACCOUNT_UNAVAILABLE:return Zr.createNativeAccountUnavailableError();case hi.USER_INTERACTION_REQUIRED:return new Zr(r,n);case hi.USER_CANCEL:return O.createUserCancelledError();case hi.NO_NETWORK:return O.createNoNetworkConnectivityError()}return new e(r,n,i)},e.createUserSwitchError=function(){return new e(Ya.userSwitch.code,Ya.userSwitch.desc)},e.createTokensNotFoundInCacheError=function(){return new e(Ya.tokensNotFoundInCache.code,Ya.tokensNotFoundInCache.desc)},e}(Y);/*! @azure/msal-browser v2.31.0 2022-11-07 */var Hg=function(t){xt(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.acquireToken=function(r){return S(this,void 0,void 0,function(){var n,i,o,a,s;return k(this,function(c){switch(c.label){case 0:return n=this.performanceClient.startMeasurement(lt.SilentCacheClientAcquireToken,r.correlationId),i=this.initializeServerTelemetryManager(Ae.acquireTokenSilent_silentFlow),[4,this.createSilentFlowClient(i,r.authority,r.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(r)];case 3:return a=c.sent(),n.endMeasurement({success:!0,fromCache:!0}),[2,a];case 4:throw s=c.sent(),s instanceof O&&s.errorCode===I.signingKeyNotFoundInStorage.code&&this.logger.verbose("Signing keypair for bound access token not found. Refreshing bound access token and generating a new crypto keypair."),n.endMeasurement({errorCode:s instanceof Y&&s.errorCode||void 0,subErrorCode:s instanceof Y&&s.subError||void 0,success:!1}),s;case 5:return[2]}})})},e.prototype.logout=function(){return Promise.reject(O.createSilentLogoutUnsupportedError())},e.prototype.createSilentFlowClient=function(r,n,i){return S(this,void 0,void 0,function(){var o;return k(this,function(a){switch(a.label){case 0:return[4,this.getClientConfiguration(r,n,i)];case 1:return o=a.sent(),[2,new My(o,this.performanceClient)]}})})},e.prototype.initializeSilentRequest=function(r,n){return S(this,void 0,void 0,function(){var i;return k(this,function(o){switch(o.label){case 0:return i=[W({},r)],[4,this.initializeBaseRequest(r)];case 1:return[2,W.apply(void 0,[W.apply(void 0,i.concat([o.sent()])),{account:n,forceRefresh:r.forceRefresh||!1}])]}})})},e}(Pa);/*! @azure/msal-browser v2.31.0 2022-11-07 */var ua=function(t){xt(e,t);function e(r,n,i,o,a,s,c,l,d,h,u,f){var v=t.call(this,r,n,i,o,a,s,l,d,f)||this;return v.apiId=c,v.accountId=h,v.nativeMessageHandler=d,v.nativeStorageManager=u,v.silentCacheClient=new Hg(r,v.nativeStorageManager,i,o,a,s,l,d,f),v}return e.prototype.acquireToken=function(r){return S(this,void 0,void 0,function(){var n,i,o,a,s,c,l;return k(this,function(d){switch(d.label){case 0:return this.logger.trace("NativeInteractionClient - acquireToken called."),n=this.performanceClient.startMeasurement(lt.NativeInteractionClientAcquireToken,r.correlationId),i=Vr.nowSeconds(),[4,this.initializeNativeRequest(r)];case 1:o=d.sent(),d.label=2;case 2:return d.trys.push([2,4,,5]),[4,this.acquireTokensFromCache(this.accountId,o)];case 3:return a=d.sent(),n.endMeasurement({success:!0,isNativeBroker:!1,fromCache:!0}),[2,a];case 4:return d.sent(),this.logger.info("MSAL internal Cache does not contain tokens, proceed to make a native call"),[3,5];case 5:return s={method:On.GetToken,request:o},[4,this.nativeMessageHandler.sendMessage(s)];case 6:return c=d.sent(),l=this.validateNativeResponse(c),[2,this.handleNativeResponse(l,o,i).then(function(h){return n.endMeasurement({success:!0,isNativeBroker:!0,requestId:h.requestId}),h}).catch(function(h){throw n.endMeasurement({success:!1,errorCode:h.errorCode,subErrorCode:h.subError,isNativeBroker:!0}),h})]}})})},e.prototype.createSilentCacheRequest=function(r,n){return{authority:r.authority,correlationId:this.correlationId,scopes:Wt.fromString(r.scope).asArray(),account:n,forceRefresh:!1}},e.prototype.acquireTokensFromCache=function(r,n){return S(this,void 0,void 0,function(){var i,o,a,s,c;return k(this,function(l){switch(l.label){case 0:if(i=this.browserStorage.readAccountFromCacheWithNativeAccountId(r),!i)throw j.createNoAccountFoundError();o=i.getAccountInfo(),l.label=1;case 1:return l.trys.push([1,3,,4]),a=this.createSilentCacheRequest(n,o),[4,this.silentCacheClient.acquireToken(a)];case 2:return s=l.sent(),[2,s];case 3:throw c=l.sent(),c;case 4:return[2]}})})},e.prototype.acquireTokenRedirect=function(r){return S(this,void 0,void 0,function(){var n,i,o,a,s,c;return k(this,function(l){switch(l.label){case 0:return this.logger.trace("NativeInteractionClient - acquireTokenRedirect called."),[4,this.initializeNativeRequest(r)];case 1:n=l.sent(),i={method:On.GetToken,request:n},l.label=2;case 2:return l.trys.push([2,4,,5]),[4,this.nativeMessageHandler.sendMessage(i)];case 3:return o=l.sent(),this.validateNativeResponse(o),[3,5];case 4:if(a=l.sent(),a instanceof mn&&a.isFatal())throw a;return[3,5];case 5:return this.browserStorage.setTemporaryCache(ge.NATIVE_REQUEST,JSON.stringify(n),!0),s={apiId:Ae.acquireTokenRedirect,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},c=this.config.auth.navigateToLoginRequestUrl?window.location.href:this.getRedirectUri(r.redirectUri),[4,this.navigationClient.navigateExternal(c,s)];case 6:return l.sent(),[2]}})})},e.prototype.handleRedirectPromise=function(){return S(this,void 0,void 0,function(){var r,n,i,o,a,s,c,l;return k(this,function(d){switch(d.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(r=this.browserStorage.getCachedNativeRequest(),!r)return this.logger.verbose("NativeInteractionClient - handleRedirectPromise called but there is no cached request, returning null."),[2,null];n=r.prompt,i=kp(r,["prompt"]),n&&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(ge.NATIVE_REQUEST)),o={method:On.GetToken,request:i},a=Vr.nowSeconds(),d.label=1;case 1:return d.trys.push([1,3,,4]),this.logger.verbose("NativeInteractionClient - handleRedirectPromise sending message to native broker."),[4,this.nativeMessageHandler.sendMessage(o)];case 2:return s=d.sent(),this.validateNativeResponse(s),c=this.handleNativeResponse(s,i,a),this.browserStorage.setInteractionInProgress(!1),[2,c];case 3:throw l=d.sent(),this.browserStorage.setInteractionInProgress(!1),l;case 4:return[2]}})})},e.prototype.logout=function(){return this.logger.trace("NativeInteractionClient - logout called."),Promise.reject("Logout not implemented yet")},e.prototype.handleNativeResponse=function(r,n,i){return S(this,void 0,void 0,function(){var o,a,s,c,l,d,h,u,f,v,g,x,m,p,y,w,T,L,V,D,ye=this;return k(this,function(Q){switch(Q.label){case 0:if(this.logger.trace("NativeInteractionClient - handleNativeResponse called."),o=this.getMATSFromResponse(r),this.performanceClient.addStaticFields({extensionId:this.nativeMessageHandler.getExtensionId(),extensionVersion:this.nativeMessageHandler.getExtensionVersion(),matsBrokerVersion:o?o.broker_version:void 0,matsAccountJoinOnStart:o?o.account_join_on_start:void 0,matsAccountJoinOnEnd:o?o.account_join_on_end:void 0,matsDeviceJoin:o?o.device_join:void 0,matsPromptBehavior:o?o.prompt_behavior:void 0,matsApiErrorCode:o?o.api_error_code:void 0,matsUiVisible:o?o.ui_visible:void 0,matsSilentCode:o?o.silent_code:void 0,matsSilentBiSubCode:o?o.silent_bi_sub_code:void 0,matsSilentMessage:o?o.silent_message:void 0,matsSilentStatus:o?o.silent_status:void 0,matsHttpStatus:o?o.http_status:void 0,matsHttpEventCount:o?o.http_event_count:void 0},this.correlationId),r.account.id!==n.accountId)throw mn.createUserSwitchError();return a=new wn(r.id_token||b.EMPTY_STRING,this.browserCrypto),[4,this.getDiscoveredAuthority(n.authority)];case 1:switch(s=Q.sent(),c=s.getPreferredCache(),l=_t.generateHomeAccountId(r.client_info||b.EMPTY_STRING,Hr.Default,this.logger,this.browserCrypto,a),d=_t.createAccount(r.client_info,l,a,void 0,void 0,void 0,c,r.account.id),this.browserStorage.setAccount(d),h=r.scope?Wt.fromString(r.scope):Wt.fromString(n.scope),u=r.account.properties||{},f=u.UID||a.claims.oid||a.claims.sub||b.EMPTY_STRING,v=u.TenantId||a.claims.tid||b.EMPTY_STRING,x=be.BEARER,m=n.tokenType,m){case be.POP:return[3,2]}return[3,4];case 2:if(x=be.POP,r.shr)return this.logger.trace("handleNativeServerResponse: SHR is enabled in native layer"),g=r.shr,[3,5];if(p=new xa(this.browserCrypto),y={resourceRequestMethod:n.resourceRequestMethod,resourceRequestUri:n.resourceRequestUri,shrClaims:n.shrClaims,shrNonce:n.shrNonce},!n.keyId)throw j.createKeyIdMissingError();return[4,p.signPopToken(r.access_token,n.keyId,y)];case 3:return g=Q.sent(),[3,5];case 4:g=r.access_token,Q.label=5;case 5:return w={authority:s.canonicalAuthority,uniqueId:f,tenantId:v,scopes:h.asArray(),account:d.getAccountInfo(),idToken:r.id_token,idTokenClaims:a.claims,accessToken:g,fromCache:o?this.isResponseFromCache(o):!1,expiresOn:new Date(Number(i+r.expires_in)*1e3),tokenType:x,correlationId:this.correlationId,state:r.state,fromNativeBroker:!0},T=nc.createIdTokenEntity(l,n.authority,r.id_token||b.EMPTY_STRING,n.clientId,a.claims.tid||b.EMPTY_STRING),this.nativeStorageManager.setIdTokenCredential(T),L=x===be.POP?b.SHR_NONCE_VALIDITY:(typeof r.expires_in=="string"?parseInt(r.expires_in,10):r.expires_in)||0,V=i+L,D=ic.createAccessTokenEntity(l,n.authority,g,n.clientId,v,h.printScopes(),V,0,this.browserCrypto),this.nativeStorageManager.setAccessTokenCredential(D),this.browserStorage.removeAccountContext(d).catch(function(qt){ye.logger.error("Error occurred while removing account context from browser storage. "+qt)}),[2,w]}})})},e.prototype.validateNativeResponse=function(r){if(r.hasOwnProperty("access_token")&&r.hasOwnProperty("id_token")&&r.hasOwnProperty("client_info")&&r.hasOwnProperty("account")&&r.hasOwnProperty("scope")&&r.hasOwnProperty("expires_in"))return r;throw mn.createUnexpectedError("Response missing expected properties.")},e.prototype.getMATSFromResponse=function(r){if(r.properties.MATS)try{return JSON.parse(r.properties.MATS)}catch{this.logger.error("NativeInteractionClient - Error parsing MATS telemetry, returning null instead")}return null},e.prototype.isResponseFromCache=function(r){return typeof r.is_cached>"u"?(this.logger.verbose("NativeInteractionClient - MATS telemetry does not contain field indicating if response was served from cache. Returning false."),!1):!!r.is_cached},e.prototype.initializeNativeRequest=function(r){return S(this,void 0,void 0,function(){var n,i,o,a,s,c,l,d,h,u,f=this;return k(this,function(v){switch(v.label){case 0:return this.logger.trace("NativeInteractionClient - initializeNativeRequest called"),n=r.authority||this.config.auth.authority,i=new me(n),i.validateAsUri(),o=r.scopes,a=kp(r,["scopes"]),s=new Wt(o||[]),s.appendScopes(_c),c=function(){switch(f.apiId){case Ae.ssoSilent:case Ae.acquireTokenSilent_silentFlow:return f.logger.trace("initializeNativeRequest: silent request sets prompt to none"),Nt.NONE}if(!r.prompt){f.logger.trace("initializeNativeRequest: prompt was not provided");return}switch(r.prompt){case Nt.NONE:case Nt.CONSENT:case Nt.LOGIN:return f.logger.trace("initializeNativeRequest: prompt is compatible with native flow"),r.prompt;default:throw f.logger.trace("initializeNativeRequest: prompt = "+r.prompt+" is not compatible with native flow"),O.createNativePromptParameterNotSupportedError()}},l=W(W({},a),{accountId:this.accountId,clientId:this.config.auth.clientId,authority:i.urlString,scope:s.printScopes(),redirectUri:this.getRedirectUri(r.redirectUri),prompt:c(),correlationId:this.correlationId,tokenType:r.authenticationScheme,windowTitleSubstring:document.title,extraParameters:W(W(W({},r.extraQueryParameters),r.tokenQueryParameters),{telemetry:ls.MATS_TELEMETRY}),extendedExpiryToken:!1}),r.authenticationScheme!==be.POP?[3,2]:(d={resourceRequestUri:r.resourceRequestUri,resourceRequestMethod:r.resourceRequestMethod,shrClaims:r.shrClaims,shrNonce:r.shrNonce},h=new xa(this.browserCrypto),[4,h.generateCnf(d)]);case 1:u=v.sent(),l.reqCnf=u.reqCnfHash,l.keyId=u.kid,v.label=2;case 2:return[2,l]}})})},e}(Rg);/*! @azure/msal-browser v2.31.0 2022-11-07 */var io=function(){function t(e,r,n){this.logger=e,this.handshakeTimeoutMs=r,this.extensionId=n,this.resolvers=new Map,this.handshakeResolvers=new Map,this.responseId=0,this.messageChannel=new MessageChannel,this.windowListener=this.onWindowMessage.bind(this)}return t.prototype.sendMessage=function(e){return S(this,void 0,void 0,function(){var r,n=this;return k(this,function(i){return this.logger.trace("NativeMessageHandler - sendMessage called."),r={channel:ls.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(r)),this.messageChannel.port1.postMessage(r),[2,new Promise(function(o,a){n.resolvers.set(r.responseId,{resolve:o,reject:a})})]})})},t.createProvider=function(e,r){return S(this,void 0,void 0,function(){var n,i;return k(this,function(o){switch(o.label){case 0:e.trace("NativeMessageHandler - createProvider called."),o.label=1;case 1:return o.trys.push([1,3,,5]),n=new t(e,r,ls.PREFERRED_EXTENSION_ID),[4,n.sendHandshakeRequest()];case 2:return o.sent(),[2,n];case 3:return o.sent(),i=new t(e,r),[4,i.sendHandshakeRequest()];case 4:return o.sent(),[2,i];case 5:return[2]}})})},t.prototype.sendHandshakeRequest=function(){return S(this,void 0,void 0,function(){var e,r=this;return k(this,function(n){return this.logger.trace("NativeMessageHandler - sendHandshakeRequest called."),window.addEventListener("message",this.windowListener,!1),e={channel:ls.CHANNEL_ID,extensionId:this.extensionId,responseId:this.responseId++,body:{method:On.HandshakeRequest}},this.messageChannel.port1.onmessage=function(i){r.onChannelMessage(i)},window.postMessage(e,window.origin,[this.messageChannel.port2]),[2,new Promise(function(i,o){r.handshakeResolvers.set(e.responseId,{resolve:i,reject:o}),r.timeoutId=window.setTimeout(function(){window.removeEventListener("message",r.windowListener,!1),r.messageChannel.port1.close(),r.messageChannel.port2.close(),o(O.createNativeHandshakeTimeoutError()),r.handshakeResolvers.delete(e.responseId)},r.handshakeTimeoutMs)})]})})},t.prototype.onWindowMessage=function(e){if(this.logger.trace("NativeMessageHandler - onWindowMessage called"),e.source===window){var r=e.data;if(!(!r.channel||r.channel!==ls.CHANNEL_ID)&&!(r.extensionId&&r.extensionId!==this.extensionId)&&r.body.method===On.HandshakeRequest){this.logger.verbose(r.extensionId?"Extension with id: "+r.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(r.responseId);n&&n.reject(O.createNativeExtensionNotInstalledError())}}},t.prototype.onChannelMessage=function(e){this.logger.trace("NativeMessageHandler - onChannelMessage called.");var r=e.data,n=this.resolvers.get(r.responseId),i=this.handshakeResolvers.get(r.responseId);try{var o=r.body.method;if(o===On.Response){if(!n)return;var a=r.body.response;if(this.logger.trace("NativeMessageHandler - Received response from browser extension"),this.logger.tracePii("NativeMessageHandler - Received response from browser extension: "+JSON.stringify(a)),a.status!=="Success")n.reject(mn.createError(a.code,a.description,a.ext));else if(a.result)a.result.code&&a.result.description?n.reject(mn.createError(a.result.code,a.result.description,a.result.ext)):n.resolve(a.result);else throw Y.createUnexpectedError("Event does not contain result.");this.resolvers.delete(r.responseId)}else if(o===On.HandshakeResponse){if(!i)return;clearTimeout(this.timeoutId),window.removeEventListener("message",this.windowListener,!1),this.extensionId=r.extensionId,this.extensionVersion=r.body.version,this.logger.verbose("NativeMessageHandler - Received HandshakeResponse from extension: "+this.extensionId),i.resolve(),this.handshakeResolvers.delete(r.responseId)}}catch(s){this.logger.error("Error parsing response from WAM Extension"),this.logger.errorPii("Error parsing response from WAM Extension: "+s.toString()),this.logger.errorPii("Unable to parse "+e),n?n.reject(s):i&&i.reject(s)}},t.prototype.getExtensionId=function(){return this.extensionId},t.prototype.getExtensionVersion=function(){return this.extensionVersion},t.isNativeAvailable=function(e,r,n,i){if(r.trace("isNativeAvailable called"),!e.system.allowNativeBroker)return r.trace("isNativeAvailable: allowNativeBroker is not enabled, returning false"),!1;if(!n)return r.trace("isNativeAvailable: WAM extension provider is not initialized, returning false"),!1;if(i)switch(i){case be.BEARER:case be.POP:return r.trace("isNativeAvailable: authenticationScheme is supported, returning true"),!0;default:return r.trace("isNativeAvailable: authenticationScheme is not supported, returning false"),!1}return!0},t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var qy=function(t){xt(e,t);function e(r,n,i,o,a,s,c,l,d,h){var u=t.call(this,r,n,i,o,a,s,c,d,h)||this;return u.nativeStorage=l,u}return e.prototype.acquireToken=function(r){return S(this,void 0,void 0,function(){var n,i,o,a,s,c,l,d,h,u=this;return k(this,function(f){switch(f.label){case 0:return[4,this.initializeAuthorizationRequest(r,G.Redirect)];case 1:n=f.sent(),this.browserStorage.updateCacheEntries(n.state,n.nonce,n.authority,n.loginHint||b.EMPTY_STRING,n.account||null),i=this.initializeServerTelemetryManager(Ae.acquireTokenRedirect),o=function(v){v.persisted&&(u.logger.verbose("Page was restored from back/forward cache. Clearing temporary cache."),u.browserStorage.cleanRequestByState(n.state))},f.label=2;case 2:return f.trys.push([2,7,,8]),[4,this.initializeAuthorizationCodeRequest(n)];case 3:return a=f.sent(),[4,this.createAuthCodeClient(i,n.authority,n.azureCloudOptions)];case 4:return s=f.sent(),this.logger.verbose("Auth code client created"),c=new Up(s,this.browserStorage,a,this.logger,this.browserCrypto),[4,s.getAuthCodeUrl(W(W({},n),{nativeBroker:io.isNativeAvailable(this.config,this.logger,this.nativeMessageHandler,r.authenticationScheme)}))];case 5:return l=f.sent(),d=this.getRedirectStartPage(r.redirectStartPage),this.logger.verbosePii("Redirect start page: "+d),window.addEventListener("pageshow",o),[4,c.initiateAuthRequest(l,{navigationClient:this.navigationClient,redirectTimeout:this.config.system.redirectNavigationTimeout,redirectStartPage:d,onRedirectNavigate:r.onRedirectNavigate})];case 6:return[2,f.sent()];case 7:throw h=f.sent(),h instanceof Y&&h.setCorrelationId(this.correlationId),window.removeEventListener("pageshow",o),i.cacheFailedRequest(h),this.browserStorage.cleanRequestByState(n.state),h;case 8:return[2]}})})},e.prototype.handleRedirectPromise=function(r){return S(this,void 0,void 0,function(){var n,i,o,a,s,c,l,d,h,u,f,v;return k(this,function(g){switch(g.label){case 0:n=this.initializeServerTelemetryManager(Ae.handleRedirectPromise),g.label=1;case 1:if(g.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(i=this.getRedirectResponseHash(r||window.location.hash),!i)return this.logger.info("handleRedirectPromise did not detect a response hash as a result of a redirect. Cleaning temporary cache."),this.browserStorage.cleanRequestByInteractionType(G.Redirect),[2,null];o=void 0;try{a=me.getDeserializedHash(i),o=this.validateAndExtractStateFromHash(a,G.Redirect),this.logger.verbose("State extracted from hash")}catch(x){return this.logger.info("handleRedirectPromise was unable to extract state due to: "+x),this.browserStorage.cleanRequestByInteractionType(G.Redirect),[2,null]}return s=this.browserStorage.getTemporaryCache(ge.ORIGIN_URI,!0)||b.EMPTY_STRING,c=me.removeHashFromUrl(s),l=me.removeHashFromUrl(window.location.href),c===l&&this.config.auth.navigateToLoginRequestUrl?(this.logger.verbose("Current page is loginRequestUrl, handling hash"),[4,this.handleHash(i,o,n)]):[3,3];case 2:return d=g.sent(),s.indexOf("#")>-1&&We.replaceHash(s),[2,d];case 3:return this.config.auth.navigateToLoginRequestUrl?[3,4]:(this.logger.verbose("NavigateToLoginRequestUrl set to false, handling hash"),[2,this.handleHash(i,o,n)]);case 4:return!We.isInIframe()||this.config.system.allowRedirectInIframe?(this.browserStorage.setTemporaryCache(ge.URL_HASH,i,!0),h={apiId:Ae.handleRedirectPromise,timeout:this.config.system.redirectNavigationTimeout,noHistory:!0},u=!0,!s||s==="null"?(f=We.getHomepage(),this.browserStorage.setTemporaryCache(ge.ORIGIN_URI,f,!0),this.logger.warning("Unable to get valid login request url from cache, redirecting to home page"),[4,this.navigationClient.navigateInternal(f,h)]):[3,6]):[3,9];case 5:return u=g.sent(),[3,8];case 6:return this.logger.verbose("Navigating to loginRequestUrl: "+s),[4,this.navigationClient.navigateInternal(s,h)];case 7:u=g.sent(),g.label=8;case 8:if(!u)return[2,this.handleHash(i,o,n)];g.label=9;case 9:return[2,null];case 10:throw v=g.sent(),v instanceof Y&&v.setCorrelationId(this.correlationId),n.cacheFailedRequest(v),this.browserStorage.cleanRequestByInteractionType(G.Redirect),v;case 11:return[2]}})})},e.prototype.getRedirectResponseHash=function(r){this.logger.verbose("getRedirectResponseHash called");var n=me.hashContainsKnownProperties(r);if(n)return We.clearHash(window),this.logger.verbose("Hash contains known properties, returning response hash"),r;var i=this.browserStorage.getTemporaryCache(ge.URL_HASH,!0);return this.browserStorage.removeItem(this.browserStorage.generateCacheKey(ge.URL_HASH)),this.logger.verbose("Hash does not contain known properties, returning cached hash"),i},e.prototype.handleHash=function(r,n,i){return S(this,void 0,void 0,function(){var o,a,s,c,l,d,h,u=this;return k(this,function(f){switch(f.label){case 0:if(o=this.browserStorage.getCachedRequest(n,this.browserCrypto),this.logger.verbose("handleHash called, retrieved cached request"),a=me.getDeserializedHash(r),a.accountId){if(this.logger.verbose("Account id found in hash, calling WAM for token"),!this.nativeMessageHandler)throw O.createNativeConnectionNotEstablishedError();return s=new ua(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,Ae.acquireTokenPopup,this.performanceClient,this.nativeMessageHandler,a.accountId,this.browserStorage,o.correlationId),c=Un.parseRequestState(this.browserCrypto,n).userRequestState,[2,s.acquireToken(W(W({},o),{state:c,prompt:void 0})).finally(function(){u.browserStorage.cleanRequestByState(n)})]}if(l=this.browserStorage.getCachedAuthority(n),!l)throw O.createNoCachedAuthorityError();return[4,this.createAuthCodeClient(i,l)];case 1:return d=f.sent(),this.logger.verbose("Auth code client created"),zd.removeThrottle(this.browserStorage,this.config.auth.clientId,o),h=new Up(d,this.browserStorage,o,this.logger,this.browserCrypto),[4,h.handleCodeResponseFromHash(r,n,d.authority,this.networkClient)];case 2:return[2,f.sent()]}})})},e.prototype.logout=function(r){return S(this,void 0,void 0,function(){var n,i,o,a,s,c,l;return k(this,function(d){switch(d.label){case 0:this.logger.verbose("logoutRedirect called"),n=this.initializeLogoutRequest(r),i=this.initializeServerTelemetryManager(Ae.logout),d.label=1;case 1:return d.trys.push([1,10,,11]),this.eventHandler.emitEvent(X.LOGOUT_START,G.Redirect,r),[4,this.clearCacheOnLogout(n.account)];case 2:return d.sent(),o={apiId:Ae.logout,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},[4,this.createAuthCodeClient(i,r&&r.authority)];case 3:return a=d.sent(),this.logger.verbose("Auth code client created"),s=a.getLogoutUri(n),this.eventHandler.emitEvent(X.LOGOUT_SUCCESS,G.Redirect,n),r&&typeof r.onRedirectNavigate=="function"?(c=r.onRedirectNavigate(s),c===!1?[3,5]:(this.logger.verbose("Logout onRedirectNavigate did not return false, navigating"),this.browserStorage.getInteractionInProgress()||this.browserStorage.setInteractionInProgress(!0),[4,this.navigationClient.navigateExternal(s,o)])):[3,7];case 4:return d.sent(),[2];case 5:this.browserStorage.setInteractionInProgress(!1),this.logger.verbose("Logout onRedirectNavigate returned false, stopping navigation"),d.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 d.sent(),[2];case 9:return[3,11];case 10:throw l=d.sent(),l instanceof Y&&l.setCorrelationId(this.correlationId),i.cacheFailedRequest(l),this.eventHandler.emitEvent(X.LOGOUT_FAILURE,G.Redirect,null,l),this.eventHandler.emitEvent(X.LOGOUT_END,G.Redirect),l;case 11:return this.eventHandler.emitEvent(X.LOGOUT_END,G.Redirect),[2]}})})},e.prototype.getRedirectStartPage=function(r){var n=r||window.location.href;return me.getAbsoluteUrl(n,We.getCurrentUri())},e}(Pa);/*! @azure/msal-browser v2.31.0 2022-11-07 */var Gy=function(t){xt(e,t);function e(r,n,i,o,a,s,c,l,d,h){var u=t.call(this,r,n,i,o,a,s,c,d,h)||this;return u.unloadWindow=u.unloadWindow.bind(u),u.nativeStorage=l,u}return e.prototype.acquireToken=function(r){try{var n=this.generatePopupName(r.scopes||_c,r.authority||this.config.auth.authority),i=r.popupWindowAttributes||{};if(this.config.system.asyncPopups)return this.logger.verbose("asyncPopups set to true, acquiring token"),this.acquireTokenPopupAsync(r,n,i);this.logger.verbose("asyncPopup set to false, opening popup before acquiring token");var o=this.openSizedPopup("about:blank",n,i);return this.acquireTokenPopupAsync(r,n,i,o)}catch(a){return Promise.reject(a)}},e.prototype.logout=function(r){try{this.logger.verbose("logoutPopup called");var n=this.initializeLogoutRequest(r),i=this.generateLogoutPopupName(n),o=r&&r.authority,a=r&&r.mainWindowRedirectUri,s=(r==null?void 0:r.popupWindowAttributes)||{};if(this.config.system.asyncPopups)return this.logger.verbose("asyncPopups set to true"),this.logoutPopupAsync(n,i,s,o,void 0,a);this.logger.verbose("asyncPopup set to false, opening popup");var c=this.openSizedPopup("about:blank",i,s);return this.logoutPopupAsync(n,i,s,o,c,a)}catch(l){return Promise.reject(l)}},e.prototype.acquireTokenPopupAsync=function(r,n,i,o){return S(this,void 0,void 0,function(){var a,s,c,l,d,h,u,f,v,g,x,m,p,y,w,T,L,V=this;return k(this,function(D){switch(D.label){case 0:return this.logger.verbose("acquireTokenPopupAsync called"),a=this.initializeServerTelemetryManager(Ae.acquireTokenPopup),[4,this.initializeAuthorizationRequest(r,G.Popup)];case 1:s=D.sent(),this.browserStorage.updateCacheEntries(s.state,s.nonce,s.authority,s.loginHint||b.EMPTY_STRING,s.account||null),D.label=2;case 2:return D.trys.push([2,8,,9]),[4,this.initializeAuthorizationCodeRequest(s)];case 3:return c=D.sent(),[4,this.createAuthCodeClient(a,s.authority,s.azureCloudOptions)];case 4:return l=D.sent(),this.logger.verbose("Auth code client created"),d=io.isNativeAvailable(this.config,this.logger,this.nativeMessageHandler,r.authenticationScheme),h=void 0,d&&(h=this.performanceClient.startMeasurement(lt.FetchAccountIdWithNativeBroker,r.correlationId)),[4,l.getAuthCodeUrl(W(W({},s),{nativeBroker:d}))];case 5:return u=D.sent(),f=new H0(l,this.browserStorage,c,this.logger),v={popup:o,popupName:n,popupWindowAttributes:i},g=this.initiateAuthRequest(u,v),this.eventHandler.emitEvent(X.POPUP_OPENED,G.Popup,{popupWindow:g},null),[4,this.monitorPopupForHash(g)];case 6:if(x=D.sent(),m=me.getDeserializedHash(x),p=this.validateAndExtractStateFromHash(m,G.Popup,s.correlationId),zd.removeThrottle(this.browserStorage,this.config.auth.clientId,c),m.accountId){if(this.logger.verbose("Account id found in hash, calling WAM for token"),h&&h.endMeasurement({success:!0,isNativeBroker:!0}),!this.nativeMessageHandler)throw O.createNativeConnectionNotEstablishedError();return y=new ua(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,Ae.acquireTokenPopup,this.performanceClient,this.nativeMessageHandler,m.accountId,this.nativeStorage,s.correlationId),w=Un.parseRequestState(this.browserCrypto,p).userRequestState,[2,y.acquireToken(W(W({},s),{state:w,prompt:void 0})).finally(function(){V.browserStorage.cleanRequestByState(p)})]}return[4,f.handleCodeResponseFromHash(x,p,l.authority,this.networkClient)];case 7:return T=D.sent(),[2,T];case 8:throw L=D.sent(),o&&o.close(),L instanceof Y&&L.setCorrelationId(this.correlationId),a.cacheFailedRequest(L),this.browserStorage.cleanRequestByState(s.state),L;case 9:return[2]}})})},e.prototype.logoutPopupAsync=function(r,n,i,o,a,s){return S(this,void 0,void 0,function(){var c,l,d,h,u,f,v;return k(this,function(g){switch(g.label){case 0:this.logger.verbose("logoutPopupAsync called"),this.eventHandler.emitEvent(X.LOGOUT_START,G.Popup,r),c=this.initializeServerTelemetryManager(Ae.logoutPopup),g.label=1;case 1:return g.trys.push([1,5,,6]),[4,this.clearCacheOnLogout(r.account)];case 2:return g.sent(),[4,this.createAuthCodeClient(c,o)];case 3:return l=g.sent(),this.logger.verbose("Auth code client created"),d=l.getLogoutUri(r),this.eventHandler.emitEvent(X.LOGOUT_SUCCESS,G.Popup,r),h=this.openPopup(d,{popupName:n,popupWindowAttributes:i,popup:a}),this.eventHandler.emitEvent(X.POPUP_OPENED,G.Popup,{popupWindow:h},null),[4,this.waitForLogoutPopup(h)];case 4:return g.sent(),s?(u={apiId:Ae.logoutPopup,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},f=me.getAbsoluteUrl(s,We.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,u)):this.logger.verbose("No main window navigation requested"),[3,6];case 5:throw v=g.sent(),a&&a.close(),v instanceof Y&&v.setCorrelationId(this.correlationId),this.browserStorage.setInteractionInProgress(!1),this.eventHandler.emitEvent(X.LOGOUT_FAILURE,G.Popup,null,v),this.eventHandler.emitEvent(X.LOGOUT_END,G.Popup),c.cacheFailedRequest(v),v;case 6:return this.eventHandler.emitEvent(X.LOGOUT_END,G.Popup),[2]}})})},e.prototype.initiateAuthRequest=function(r,n){if(N.isEmpty(r))throw this.logger.error("Navigate url is empty"),O.createEmptyNavigationUriError();return this.logger.infoPii("Navigate to: "+r),this.openPopup(r,n)},e.prototype.monitorPopupForHash=function(r){var n=this;return new Promise(function(i,o){var a=n.config.system.windowHashTimeout/n.config.system.pollIntervalMilliseconds,s=0;n.logger.verbose("PopupHandler.monitorPopupForHash - polling started");var c=setInterval(function(){if(r.closed){n.logger.error("PopupHandler.monitorPopupForHash - window closed"),n.cleanPopup(),clearInterval(c),o(O.createUserCancelledError());return}var l=b.EMPTY_STRING,d=b.EMPTY_STRING;try{l=r.location.href,d=r.location.hash}catch{}N.isEmpty(l)||l==="about:blank"||(n.logger.verbose("PopupHandler.monitorPopupForHash - popup window is on same origin as caller"),s++,d?(n.logger.verbose("PopupHandler.monitorPopupForHash - found hash in url"),clearInterval(c),n.cleanPopup(r),me.hashContainsKnownProperties(d)?(n.logger.verbose("PopupHandler.monitorPopupForHash - hash contains known properties, returning."),i(d)):(n.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."),n.logger.errorPii("PopupHandler.monitorPopupForHash - hash found: "+d),o(O.createHashDoesNotContainKnownPropertiesError()))):s>a&&(n.logger.error("PopupHandler.monitorPopupForHash - unable to find hash in url, timing out"),clearInterval(c),o(O.createMonitorPopupTimeoutError())))},n.config.system.pollIntervalMilliseconds)})},e.prototype.waitForLogoutPopup=function(r){var n=this;return new Promise(function(i){n.logger.verbose("PopupHandler.waitForLogoutPopup - polling started");var o=setInterval(function(){r.closed&&(n.logger.error("PopupHandler.waitForLogoutPopup - window closed"),n.cleanPopup(),clearInterval(o),i());var a=b.EMPTY_STRING;try{a=r.location.href}catch{}N.isEmpty(a)||a==="about:blank"||(n.logger.verbose("PopupHandler.waitForLogoutPopup - popup window is on same origin as caller, closing."),clearInterval(o),n.cleanPopup(r),i())},n.config.system.pollIntervalMilliseconds)})},e.prototype.openPopup=function(r,n){try{var i=void 0;if(n.popup?(i=n.popup,this.logger.verbosePii("Navigating popup window to: "+r),i.location.assign(r)):typeof n.popup>"u"&&(this.logger.verbosePii("Opening popup window to: "+r),i=this.openSizedPopup(r,n.popupName,n.popupWindowAttributes)),!i)throw O.createEmptyWindowCreatedError();return i.focus&&i.focus(),this.currentWindow=i,window.addEventListener("beforeunload",this.unloadWindow),i}catch(o){throw this.logger.error("error opening popup "+o.message),this.browserStorage.setInteractionInProgress(!1),O.createPopupWindowError(o.toString())}},e.prototype.openSizedPopup=function(r,n,i){var o,a,s,c,l=window.screenLeft?window.screenLeft:window.screenX,d=window.screenTop?window.screenTop:window.screenY,h=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,u=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,f=(o=i.popupSize)===null||o===void 0?void 0:o.width,v=(a=i.popupSize)===null||a===void 0?void 0:a.height,g=(s=i.popupPosition)===null||s===void 0?void 0:s.top,x=(c=i.popupPosition)===null||c===void 0?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=Jr.POPUP_WIDTH),(!v||v<0||v>u)&&(this.logger.verbose("Default popup window height used. Window height not configured or invalid."),v=Jr.POPUP_HEIGHT),(!g||g<0||g>u)&&(this.logger.verbose("Default popup window top position used. Window top not configured or invalid."),g=Math.max(0,u/2-Jr.POPUP_HEIGHT/2+d)),(!x||x<0||x>h)&&(this.logger.verbose("Default popup window left position used. Window left not configured or invalid."),x=Math.max(0,h/2-Jr.POPUP_WIDTH/2+l)),window.open(r,n,"width="+f+", height="+v+", top="+g+", left="+x+", scrollbars=yes")},e.prototype.unloadWindow=function(r){this.browserStorage.cleanRequestByInteractionType(G.Popup),this.currentWindow&&this.currentWindow.close(),r.preventDefault()},e.prototype.cleanPopup=function(r){r&&r.close(),window.removeEventListener("beforeunload",this.unloadWindow),this.browserStorage.setInteractionInProgress(!1)},e.prototype.generatePopupName=function(r,n){return Jr.POPUP_NAME_PREFIX+"."+this.config.auth.clientId+"."+r.join("-")+"."+n+"."+this.correlationId},e.prototype.generateLogoutPopupName=function(r){var n=r.account&&r.account.homeAccountId;return Jr.POPUP_NAME_PREFIX+"."+this.config.auth.clientId+"."+n+"."+this.correlationId},e}(Pa);/*! @azure/msal-browser v2.31.0 2022-11-07 */var Ky=function(){function t(){}return t.prototype.navigateInternal=function(e,r){return t.defaultNavigateWindow(e,r)},t.prototype.navigateExternal=function(e,r){return t.defaultNavigateWindow(e,r)},t.defaultNavigateWindow=function(e,r){return r.noHistory?window.location.replace(e):window.location.assign(e),new Promise(function(n){setTimeout(function(){n(!0)},r.timeout)})},t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var Wy=6e4,Yu=6e3,Yy=3e4,Qy=2e3;function Xy(t,e){var r=t.auth,n=t.cache,i=t.system,o=t.telemetry,a={clientId:b.EMPTY_STRING,authority:""+b.DEFAULT_AUTHORITY,knownAuthorities:[],cloudDiscoveryMetadata:b.EMPTY_STRING,authorityMetadata:b.EMPTY_STRING,redirectUri:b.EMPTY_STRING,postLogoutRedirectUri:b.EMPTY_STRING,navigateToLoginRequestUrl:!0,clientCapabilities:[],protocolMode:Td.AAD,azureCloudOptions:{azureCloudInstance:tc.None,tenant:b.EMPTY_STRING},skipAuthorityMetadataCache:!1},s={cacheLocation:Ot.SessionStorage,storeAuthStateInCookie:!1,secureCookies:!1},c={loggerCallback:function(){},logLevel:Qe.Info,piiLoggingEnabled:!1},l=W(W({},kg),{loggerOptions:c,networkClient:e?We.getBrowserNetworkClient():Ly,navigationClient:new Ky,loadFrameTimeout:0,windowHashTimeout:(i==null?void 0:i.loadFrameTimeout)||Wy,iframeHashTimeout:(i==null?void 0:i.loadFrameTimeout)||Yu,navigateFrameWait:e&&We.detectIEOrEdge()?500:0,redirectNavigationTimeout:Yy,asyncPopups:!1,allowRedirectInIframe:!1,allowNativeBroker:!1,nativeBrokerHandshakeTimeout:(i==null?void 0:i.nativeBrokerHandshakeTimeout)||Qy,pollIntervalMilliseconds:Jr.DEFAULT_POLL_INTERVAL_MS,cryptoOptions:{useMsrCrypto:!1,entropy:void 0}}),d={application:{appName:b.EMPTY_STRING,appVersion:b.EMPTY_STRING}},h={auth:W(W({},a),r),cache:W(W({},s),n),system:W(W({},l),i),telemetry:W(W({},d),o)};return h}/*! @azure/msal-browser v2.31.0 2022-11-07 */var Lg=function(t){xt(e,t);function e(r,n,i,o,a){var s=t.call(this,r,n,i,o)||this;return s.navigateFrameWait=a.navigateFrameWait,s.pollIntervalMilliseconds=a.pollIntervalMilliseconds,s}return e.prototype.initiateAuthRequest=function(r){return S(this,void 0,void 0,function(){var n;return k(this,function(i){switch(i.label){case 0:if(N.isEmpty(r))throw this.logger.info("Navigate url is empty"),O.createEmptyNavigationUriError();return this.navigateFrameWait?[4,this.loadFrame(r)]:[3,2];case 1:return n=i.sent(),[3,3];case 2:n=this.loadFrameSync(r),i.label=3;case 3:return[2,n]}})})},e.prototype.monitorIframeForHash=function(r,n){var i=this;return new Promise(function(o,a){n<Yu&&i.logger.warning("system.loadFrameTimeout or system.iframeHashTimeout set to lower ("+n+"ms) than the default ("+Yu+"ms). This may result in timeouts.");var s=window.performance.now(),c=s+n,l=setInterval(function(){if(window.performance.now()>c){i.removeHiddenIframe(r),clearInterval(l),a(O.createMonitorIframeTimeoutError());return}var d=b.EMPTY_STRING,h=r.contentWindow;try{d=h?h.location.href:b.EMPTY_STRING}catch{}if(!N.isEmpty(d)){var u=h?h.location.hash:b.EMPTY_STRING;if(me.hashContainsKnownProperties(u)){i.removeHiddenIframe(r),clearInterval(l),o(u);return}}},i.pollIntervalMilliseconds)})},e.prototype.loadFrame=function(r){var n=this;return new Promise(function(i,o){var a=n.createHiddenIframe();setTimeout(function(){if(!a){o("Unable to load iframe");return}a.src=r,i(a)},n.navigateFrameWait)})},e.prototype.loadFrameSync=function(r){var n=this.createHiddenIframe();return n.src=r,n},e.prototype.createHiddenIframe=function(){var r=document.createElement("iframe");return r.style.visibility="hidden",r.style.position="absolute",r.style.width=r.style.height="0",r.style.border="0",r.setAttribute("sandbox","allow-scripts allow-same-origin allow-forms"),document.getElementsByTagName("body")[0].appendChild(r),r},e.prototype.removeHiddenIframe=function(r){document.body===r.parentNode&&document.body.removeChild(r)},e}(H0);/*! @azure/msal-browser v2.31.0 2022-11-07 */var Jy=function(t){xt(e,t);function e(r,n,i,o,a,s,c,l,d,h,u){var f=t.call(this,r,n,i,o,a,s,l,h,u)||this;return f.apiId=c,f.nativeStorage=d,f}return e.prototype.acquireToken=function(r){return S(this,void 0,void 0,function(){var n,i,o,a,s;return k(this,function(c){switch(c.label){case 0:if(this.logger.verbose("acquireTokenByIframe called"),n=this.performanceClient.startMeasurement(lt.SilentIframeClientAcquireToken,r.correlationId),N.isEmpty(r.loginHint)&&N.isEmpty(r.sid)&&(!r.account||N.isEmpty(r.account.username))&&this.logger.warning("No user hint provided. The authorization server may need more information to complete this request."),r.prompt&&r.prompt!==Nt.NONE&&r.prompt!==Nt.NO_SESSION)throw n.endMeasurement({success:!1}),O.createSilentPromptValueError(r.prompt);return[4,this.initializeAuthorizationRequest(W(W({},r),{prompt:r.prompt||Nt.NONE}),G.Silent)];case 1:i=c.sent(),this.browserStorage.updateCacheEntries(i.state,i.nonce,i.authority,i.loginHint||b.EMPTY_STRING,i.account||null),o=this.initializeServerTelemetryManager(this.apiId),c.label=2;case 2:return c.trys.push([2,5,,6]),[4,this.createAuthCodeClient(o,i.authority,i.azureCloudOptions)];case 3:return a=c.sent(),this.logger.verbose("Auth code client created"),[4,this.silentTokenHelper(a,i).then(function(l){return n.endMeasurement({success:!0,fromCache:!1,requestId:l.requestId}),l})];case 4:return[2,c.sent()];case 5:throw s=c.sent(),s instanceof Y&&s.setCorrelationId(this.correlationId),o.cacheFailedRequest(s),this.browserStorage.cleanRequestByState(i.state),n.endMeasurement({errorCode:s instanceof Y&&s.errorCode||void 0,subErrorCode:s instanceof Y&&s.subError||void 0,success:!1}),s;case 6:return[2]}})})},e.prototype.logout=function(){return Promise.reject(O.createSilentLogoutUnsupportedError())},e.prototype.silentTokenHelper=function(r,n){return S(this,void 0,void 0,function(){var i,o,a,s,c,l,d,h,u,f=this;return k(this,function(v){switch(v.label){case 0:return[4,this.initializeAuthorizationCodeRequest(n)];case 1:return i=v.sent(),[4,r.getAuthCodeUrl(W(W({},n),{nativeBroker:io.isNativeAvailable(this.config,this.logger,this.nativeMessageHandler,n.authenticationScheme)}))];case 2:return o=v.sent(),a=new Lg(r,this.browserStorage,i,this.logger,this.config.system),[4,a.initiateAuthRequest(o)];case 3:return s=v.sent(),[4,a.monitorIframeForHash(s,this.config.system.iframeHashTimeout)];case 4:if(c=v.sent(),l=me.getDeserializedHash(c),d=this.validateAndExtractStateFromHash(l,G.Silent,i.correlationId),l.accountId){if(this.logger.verbose("Account id found in hash, calling WAM for token"),!this.nativeMessageHandler)throw O.createNativeConnectionNotEstablishedError();return h=new ua(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.apiId,this.performanceClient,this.nativeMessageHandler,l.accountId,this.browserStorage,this.correlationId),u=Un.parseRequestState(this.browserCrypto,d).userRequestState,[2,h.acquireToken(W(W({},n),{state:u,prompt:n.prompt||Nt.NONE})).finally(function(){f.browserStorage.cleanRequestByState(d)})]}return[2,a.handleCodeResponseFromHash(c,d,r.authority,this.networkClient)]}})})},e}(Pa);/*! @azure/msal-browser v2.31.0 2022-11-07 */var Zy=function(t){xt(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.acquireToken=function(r){return S(this,void 0,void 0,function(){var n,i,o,a,s,c=this;return k(this,function(l){switch(l.label){case 0:return i=[W({},r)],[4,this.initializeBaseRequest(r)];case 1:return n=W.apply(void 0,i.concat([l.sent()])),o=this.performanceClient.startMeasurement(lt.SilentRefreshClientAcquireToken,n.correlationId),a=this.initializeServerTelemetryManager(Ae.acquireTokenSilent_silentFlow),[4,this.createRefreshTokenClient(a,n.authority,n.azureCloudOptions)];case 2:return s=l.sent(),this.logger.verbose("Refresh token client created"),[2,s.acquireTokenByRefreshToken(n).then(function(d){return o.endMeasurement({success:!0,fromCache:d.fromCache,requestId:d.requestId}),d}).catch(function(d){throw d instanceof Y&&d.setCorrelationId(c.correlationId),a.cacheFailedRequest(d),o.endMeasurement({errorCode:d.errorCode,subErrorCode:d.subError,success:!1}),d})]}})})},e.prototype.logout=function(){return Promise.reject(O.createSilentLogoutUnsupportedError())},e.prototype.createRefreshTokenClient=function(r,n,i){return S(this,void 0,void 0,function(){var o;return k(this,function(a){switch(a.label){case 0:return[4,this.getClientConfiguration(r,n,i)];case 1:return o=a.sent(),[2,new Ag(o,this.performanceClient)]}})})},e}(Pa);/*! @azure/msal-browser v2.31.0 2022-11-07 */var e_=function(){function t(e,r){this.eventCallbacks=new Map,this.logger=e,this.browserCrypto=r,this.listeningToStorageEvents=!1,this.handleAccountCacheChange=this.handleAccountCacheChange.bind(this)}return t.prototype.addEventCallback=function(e){if(typeof window<"u"){var r=this.browserCrypto.createNewGuid();return this.eventCallbacks.set(r,e),this.logger.verbose("Event callback registered with id: "+r),r}return null},t.prototype.removeEventCallback=function(e){this.eventCallbacks.delete(e),this.logger.verbose("Event callback "+e+" removed.")},t.prototype.enableAccountStorageEvents=function(){typeof window>"u"||(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)))},t.prototype.disableAccountStorageEvents=function(){typeof window>"u"||(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."))},t.prototype.emitEvent=function(e,r,n,i){var o=this;if(typeof window<"u"){var a={eventType:e,interactionType:r||null,payload:n||null,error:i||null,timestamp:Date.now()};this.logger.info("Emitting event: "+e),this.eventCallbacks.forEach(function(s,c){o.logger.verbose("Emitting event to callback "+c+": "+e),s.apply(null,[a])})}},t.prototype.handleAccountCacheChange=function(e){try{var r=e.newValue||e.oldValue;if(!r)return;var n=JSON.parse(r);if(typeof n!="object"||!_t.isAccountEntity(n))return;var i=Wr.toObject(new _t,n),o=i.getAccountInfo();!e.oldValue&&e.newValue?(this.logger.info("Account was added to cache in a different window"),this.emitEvent(X.ACCOUNT_ADDED,void 0,o)):!e.newValue&&e.oldValue&&(this.logger.info("Account was removed from cache in a different window"),this.emitEvent(X.ACCOUNT_REMOVED,void 0,o))}catch{return}},t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var Pt=function(){function t(){}return t.decimalToHex=function(e){for(var r=e.toString(16);r.length<2;)r="0"+r;return r},t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var Og=function(){function t(e){this.cryptoObj=e}return t.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,Pt.decimalToHex(e[0])+Pt.decimalToHex(e[1])+Pt.decimalToHex(e[2])+Pt.decimalToHex(e[3])+"-"+Pt.decimalToHex(e[4])+Pt.decimalToHex(e[5])+"-"+Pt.decimalToHex(e[6])+Pt.decimalToHex(e[7])+"-"+Pt.decimalToHex(e[8])+Pt.decimalToHex(e[9])+"-"+Pt.decimalToHex(e[10])+Pt.decimalToHex(e[11])+Pt.decimalToHex(e[12])+Pt.decimalToHex(e[13])+Pt.decimalToHex(e[14])+Pt.decimalToHex(e[15])}catch{for(var r="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx",n="0123456789abcdef",i=0,o=b.EMPTY_STRING,a=0;a<36;a++)r[a]!=="-"&&r[a]!=="4"&&(i=Math.random()*16|0),r[a]==="x"?o+=n[i]:r[a]==="y"?(i&=3,i|=8,o+=n[i]):o+=r[a];return o}},t.prototype.isGuid=function(e){var r=/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;return r.test(e)},t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var Fn=function(){function t(){}return t.stringToUtf8Arr=function(e){for(var r,n=0,i=e.length,o=0;o<i;o++)r=e.charCodeAt(o),n+=r<128?1:r<2048?2:r<65536?3:r<2097152?4:r<67108864?5:6;for(var a=new Uint8Array(n),s=0,c=0;s<n;c++)r=e.charCodeAt(c),r<128?a[s++]=r:r<2048?(a[s++]=192+(r>>>6),a[s++]=128+(r&63)):r<65536?(a[s++]=224+(r>>>12),a[s++]=128+(r>>>6&63),a[s++]=128+(r&63)):r<2097152?(a[s++]=240+(r>>>18),a[s++]=128+(r>>>12&63),a[s++]=128+(r>>>6&63),a[s++]=128+(r&63)):r<67108864?(a[s++]=248+(r>>>24),a[s++]=128+(r>>>18&63),a[s++]=128+(r>>>12&63),a[s++]=128+(r>>>6&63),a[s++]=128+(r&63)):(a[s++]=252+(r>>>30),a[s++]=128+(r>>>24&63),a[s++]=128+(r>>>18&63),a[s++]=128+(r>>>12&63),a[s++]=128+(r>>>6&63),a[s++]=128+(r&63));return a},t.stringToArrayBuffer=function(e){for(var r=new ArrayBuffer(e.length),n=new Uint8Array(r),i=0;i<e.length;i++)n[i]=e.charCodeAt(i);return r},t.utf8ArrToString=function(e){for(var r=b.EMPTY_STRING,n=void 0,i=e.length,o=0;o<i;o++)n=e[o],r+=String.fromCharCode(n>251&&n<254&&o+5<i?(n-252)*1073741824+(e[++o]-128<<24)+(e[++o]-128<<18)+(e[++o]-128<<12)+(e[++o]-128<<6)+e[++o]-128:n>247&&n<252&&o+4<i?(n-248<<24)+(e[++o]-128<<18)+(e[++o]-128<<12)+(e[++o]-128<<6)+e[++o]-128:n>239&&n<248&&o+3<i?(n-240<<18)+(e[++o]-128<<12)+(e[++o]-128<<6)+e[++o]-128:n>223&&n<240&&o+2<i?(n-224<<12)+(e[++o]-128<<6)+e[++o]-128:n>191&&n<224&&o+1<i?(n-192<<6)+e[++o]-128:n);return r},t.getSortedObjectString=function(e){return JSON.stringify(e,Object.keys(e).sort())},t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var Dg=function(){function t(){}return t.prototype.urlEncode=function(e){return encodeURIComponent(this.encode(e).replace(/=/g,b.EMPTY_STRING).replace(/\+/g,"-").replace(/\//g,"_"))},t.prototype.urlEncodeArr=function(e){return this.base64EncArr(e).replace(/=/g,b.EMPTY_STRING).replace(/\+/g,"-").replace(/\//g,"_")},t.prototype.encode=function(e){var r=Fn.stringToUtf8Arr(e);return this.base64EncArr(r)},t.prototype.base64EncArr=function(e){for(var r=(3-e.length%3)%3,n=b.EMPTY_STRING,i=void 0,o=e.length,a=0,s=0;s<o;s++)i=s%3,a|=e[s]<<(16>>>i&24),(i===2||e.length-s===1)&&(n+=String.fromCharCode(this.uint6ToB64(a>>>18&63),this.uint6ToB64(a>>>12&63),this.uint6ToB64(a>>>6&63),this.uint6ToB64(a&63)),a=0);return r===0?n:n.substring(0,n.length-r)+(r===1?"=":"==")},t.prototype.uint6ToB64=function(e){return e<26?e+65:e<52?e+71:e<62?e-4:e===62?43:e===63?47:65},t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var t_=function(){function t(){}return t.prototype.decode=function(e){var r=e.replace(/-/g,"+").replace(/_/g,"/");switch(r.length%4){case 0:break;case 2:r+="==";break;case 3:r+="=";break;default:throw new Error("Invalid base64 string")}var n=this.base64DecToArr(r);return Fn.utf8ArrToString(n)},t.prototype.base64DecToArr=function(e,r){for(var n=e.replace(/[^A-Za-z0-9\+\/]/g,b.EMPTY_STRING),i=n.length,o=r?Math.ceil((i*3+1>>>2)/r)*r:i*3+1>>>2,a=new Uint8Array(o),s=void 0,c=void 0,l=0,d=0,h=0;h<i;h++)if(c=h&3,l|=this.b64ToUint6(n.charCodeAt(h))<<18-6*c,c===3||i-h===1){for(s=0;s<3&&d<o;s++,d++)a[d]=l>>>(16>>>s&24)&255;l=0}return a},t.prototype.b64ToUint6=function(e){return e>64&&e<91?e-65:e>96&&e<123?e-71:e>47&&e<58?e+4:e===43?62:e===47?63:0},t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var r_=32,n_=function(){function t(e){this.base64Encode=new Dg,this.cryptoObj=e}return t.prototype.generateCodes=function(){return S(this,void 0,void 0,function(){var e,r;return k(this,function(n){switch(n.label){case 0:return e=this.generateCodeVerifier(),[4,this.generateCodeChallengeFromVerifier(e)];case 1:return r=n.sent(),[2,{verifier:e,challenge:r}]}})})},t.prototype.generateCodeVerifier=function(){try{var e=new Uint8Array(r_);this.cryptoObj.getRandomValues(e);var r=this.base64Encode.urlEncodeArr(e);return r}catch(n){throw O.createPkceNotGeneratedError(n)}},t.prototype.generateCodeChallengeFromVerifier=function(e){return S(this,void 0,void 0,function(){var r,n;return k(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,this.cryptoObj.sha256Digest(e)];case 1:return r=i.sent(),[2,this.base64Encode.urlEncodeArr(new Uint8Array(r))];case 2:throw n=i.sent(),O.createPkceNotGeneratedError(n);case 3:return[2]}})})},t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var i_=function(){function t(){}return t.prototype.getRandomValues=function(e){return window.crypto.getRandomValues(e)},t.prototype.generateKey=function(e,r,n){return S(this,void 0,void 0,function(){return k(this,function(i){return[2,window.crypto.subtle.generateKey(e,r,n)]})})},t.prototype.exportKey=function(e){return S(this,void 0,void 0,function(){return k(this,function(r){return[2,window.crypto.subtle.exportKey(Ea,e)]})})},t.prototype.importKey=function(e,r,n,i){return S(this,void 0,void 0,function(){return k(this,function(o){return[2,window.crypto.subtle.importKey(Ea,e,r,n,i)]})})},t.prototype.sign=function(e,r,n){return S(this,void 0,void 0,function(){return k(this,function(i){return[2,window.crypto.subtle.sign(e,r,n)]})})},t.prototype.digest=function(e,r){return S(this,void 0,void 0,function(){return k(this,function(n){return[2,window.crypto.subtle.digest(e,r)]})})},t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var o_=function(){function t(){}return t.prototype.initPrng=function(e){return window.msrCrypto.initPrng(M0(e))},t.prototype.getRandomValues=function(e){return window.msrCrypto.getRandomValues(e)},t.prototype.generateKey=function(e,r,n){return S(this,void 0,void 0,function(){return k(this,function(i){return[2,window.msrCrypto.subtle.generateKey(e,r,n)]})})},t.prototype.exportKey=function(e){return S(this,void 0,void 0,function(){return k(this,function(r){return[2,window.msrCrypto.subtle.exportKey(Ea,e)]})})},t.prototype.importKey=function(e,r,n,i){return S(this,void 0,void 0,function(){return k(this,function(o){return[2,window.msrCrypto.subtle.importKey(Ea,e,r,n,i)]})})},t.prototype.sign=function(e,r,n){return S(this,void 0,void 0,function(){return k(this,function(i){return[2,window.msrCrypto.subtle.sign(e,r,n)]})})},t.prototype.digest=function(e,r){return S(this,void 0,void 0,function(){return k(this,function(n){return[2,window.msrCrypto.subtle.digest(e,r)]})})},t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var a_=function(){function t(){}return t.prototype.getRandomValues=function(e){return window.msCrypto.getRandomValues(e)},t.prototype.generateKey=function(e,r,n){return S(this,void 0,void 0,function(){return k(this,function(i){return[2,new Promise(function(o,a){var s=window.msCrypto.subtle.generateKey(e,r,n);s.addEventListener("complete",function(c){o(c.target.result)}),s.addEventListener("error",function(c){a(c)})})]})})},t.prototype.exportKey=function(e){return S(this,void 0,void 0,function(){return k(this,function(r){return[2,new Promise(function(n,i){var o=window.msCrypto.subtle.exportKey(Ea,e);o.addEventListener("complete",function(a){var s=a.target.result,c=Fn.utf8ArrToString(new Uint8Array(s)).replace(/\r/g,b.EMPTY_STRING).replace(/\n/g,b.EMPTY_STRING).replace(/\t/g,b.EMPTY_STRING).split(" ").join(b.EMPTY_STRING).replace("\0",b.EMPTY_STRING);try{n(JSON.parse(c))}catch(l){i(l)}}),o.addEventListener("error",function(a){i(a)})})]})})},t.prototype.importKey=function(e,r,n,i){return S(this,void 0,void 0,function(){var o,a;return k(this,function(s){return o=Fn.getSortedObjectString(e),a=Fn.stringToArrayBuffer(o),[2,new Promise(function(c,l){var d=window.msCrypto.subtle.importKey(Ea,a,r,n,i);d.addEventListener("complete",function(h){c(h.target.result)}),d.addEventListener("error",function(h){l(h)})})]})})},t.prototype.sign=function(e,r,n){return S(this,void 0,void 0,function(){return k(this,function(i){return[2,new Promise(function(o,a){var s=window.msCrypto.subtle.sign(e,r,n);s.addEventListener("complete",function(c){o(c.target.result)}),s.addEventListener("error",function(c){a(c)})})]})})},t.prototype.digest=function(e,r){return S(this,void 0,void 0,function(){return k(this,function(n){return[2,new Promise(function(i,o){var a=window.msCrypto.subtle.digest(e,r.buffer);a.addEventListener("complete",function(s){i(s.target.result)}),a.addEventListener("error",function(s){o(s)})})]})})},t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var s_="RSASSA-PKCS1-v1_5",Fp="SHA-256",c_=2048,l_=new Uint8Array([1,0,1]),Ng=function(){function t(e,r){var n,i;if(this.logger=e,this.cryptoOptions=r,this.hasBrowserCrypto())this.logger.verbose("BrowserCrypto: modern crypto interface available"),this.subtleCrypto=new i_;else if(this.hasIECrypto())this.logger.verbose("BrowserCrypto: MS crypto interface available"),this.subtleCrypto=new a_;else if(this.hasMsrCrypto()&&((n=this.cryptoOptions)===null||n===void 0?void 0:n.useMsrCrypto))this.logger.verbose("BrowserCrypto: MSR crypto interface available"),this.subtleCrypto=new o_;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."),O.createCryptoNotAvailableError("Browser crypto, msCrypto, or msrCrypto interfaces not available.");if(this.subtleCrypto.initPrng){if(this.logger.verbose("BrowserCrypto: Interface requires entropy"),!(!((i=this.cryptoOptions)===null||i===void 0)&&i.entropy))throw this.logger.error("BrowserCrypto: Interface requires entropy but none provided."),Pd.createEntropyNotProvided();this.logger.verbose("BrowserCrypto: Entropy provided"),this.subtleCrypto.initPrng(this.cryptoOptions.entropy)}this.keygenAlgorithmOptions={name:s_,hash:Fp,modulusLength:c_,publicExponent:l_}}return t.prototype.hasIECrypto=function(){return"msCrypto"in window},t.prototype.hasBrowserCrypto=function(){return"crypto"in window},t.prototype.hasMsrCrypto=function(){return"msrCrypto"in window},t.prototype.sha256Digest=function(e){return S(this,void 0,void 0,function(){var r;return k(this,function(n){return r=Fn.stringToUtf8Arr(e),[2,this.subtleCrypto.digest({name:Fp},r)]})})},t.prototype.getRandomValues=function(e){return this.subtleCrypto.getRandomValues(e)},t.prototype.generateKeyPair=function(e,r){return S(this,void 0,void 0,function(){return k(this,function(n){return[2,this.subtleCrypto.generateKey(this.keygenAlgorithmOptions,e,r)]})})},t.prototype.exportJwk=function(e){return S(this,void 0,void 0,function(){return k(this,function(r){return[2,this.subtleCrypto.exportKey(e)]})})},t.prototype.importJwk=function(e,r,n){return S(this,void 0,void 0,function(){return k(this,function(i){return[2,this.subtleCrypto.importKey(e,this.keygenAlgorithmOptions,r,n)]})})},t.prototype.sign=function(e,r){return S(this,void 0,void 0,function(){return k(this,function(n){return[2,this.subtleCrypto.sign(this.keygenAlgorithmOptions,e,r)]})})},t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var d_=function(){function t(){this.dbName=Gu,this.version=Uy,this.tableName=Fy,this.dbOpen=!1}return t.prototype.open=function(){return S(this,void 0,void 0,function(){var e=this;return k(this,function(r){return[2,new Promise(function(n,i){var o=window.indexedDB.open(e.dbName,e.version);o.addEventListener("upgradeneeded",function(a){var s=a;s.target.result.createObjectStore(e.tableName)}),o.addEventListener("success",function(a){var s=a;e.db=s.target.result,e.dbOpen=!0,n()}),o.addEventListener("error",function(){return i(O.createDatabaseUnavailableError())})})]})})},t.prototype.closeConnection=function(){var e=this.db;e&&this.dbOpen&&(e.close(),this.dbOpen=!1)},t.prototype.validateDbIsOpen=function(){return S(this,void 0,void 0,function(){return k(this,function(e){switch(e.label){case 0:return this.dbOpen?[3,2]:[4,this.open()];case 1:return[2,e.sent()];case 2:return[2]}})})},t.prototype.getItem=function(e){return S(this,void 0,void 0,function(){var r=this;return k(this,function(n){switch(n.label){case 0:return[4,this.validateDbIsOpen()];case 1:return n.sent(),[2,new Promise(function(i,o){if(!r.db)return o(O.createDatabaseNotOpenError());var a=r.db.transaction([r.tableName],"readonly"),s=a.objectStore(r.tableName),c=s.get(e);c.addEventListener("success",function(l){var d=l;r.closeConnection(),i(d.target.result)}),c.addEventListener("error",function(l){r.closeConnection(),o(l)})})]}})})},t.prototype.setItem=function(e,r){return S(this,void 0,void 0,function(){var n=this;return k(this,function(i){switch(i.label){case 0:return[4,this.validateDbIsOpen()];case 1:return i.sent(),[2,new Promise(function(o,a){if(!n.db)return a(O.createDatabaseNotOpenError());var s=n.db.transaction([n.tableName],"readwrite"),c=s.objectStore(n.tableName),l=c.put(r,e);l.addEventListener("success",function(){n.closeConnection(),o()}),l.addEventListener("error",function(d){n.closeConnection(),a(d)})})]}})})},t.prototype.removeItem=function(e){return S(this,void 0,void 0,function(){var r=this;return k(this,function(n){switch(n.label){case 0:return[4,this.validateDbIsOpen()];case 1:return n.sent(),[2,new Promise(function(i,o){if(!r.db)return o(O.createDatabaseNotOpenError());var a=r.db.transaction([r.tableName],"readwrite"),s=a.objectStore(r.tableName),c=s.delete(e);c.addEventListener("success",function(){r.closeConnection(),i()}),c.addEventListener("error",function(l){r.closeConnection(),o(l)})})]}})})},t.prototype.getKeys=function(){return S(this,void 0,void 0,function(){var e=this;return k(this,function(r){switch(r.label){case 0:return[4,this.validateDbIsOpen()];case 1:return r.sent(),[2,new Promise(function(n,i){if(!e.db)return i(O.createDatabaseNotOpenError());var o=e.db.transaction([e.tableName],"readonly"),a=o.objectStore(e.tableName),s=a.getAllKeys();s.addEventListener("success",function(c){var l=c;e.closeConnection(),n(l.target.result)}),s.addEventListener("error",function(c){e.closeConnection(),i(c)})})]}})})},t.prototype.containsKey=function(e){return S(this,void 0,void 0,function(){var r=this;return k(this,function(n){switch(n.label){case 0:return[4,this.validateDbIsOpen()];case 1:return n.sent(),[2,new Promise(function(i,o){if(!r.db)return o(O.createDatabaseNotOpenError());var a=r.db.transaction([r.tableName],"readonly"),s=a.objectStore(r.tableName),c=s.count(e);c.addEventListener("success",function(l){var d=l;r.closeConnection(),i(d.target.result===1)}),c.addEventListener("error",function(l){r.closeConnection(),o(l)})})]}})})},t.prototype.deleteDatabase=function(){return S(this,void 0,void 0,function(){return k(this,function(e){return this.db&&this.dbOpen&&this.closeConnection(),[2,new Promise(function(r,n){var i=window.indexedDB.deleteDatabase(Gu);i.addEventListener("success",function(){return r(!0)}),i.addEventListener("blocked",function(){return r(!0)}),i.addEventListener("error",function(){return n(!1)})})]})})},t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var $p=function(){function t(e,r){this.inMemoryCache=new Ku,this.indexedDBCache=new d_,this.logger=e,this.storeName=r}return t.prototype.handleDatabaseAccessError=function(e){if(e instanceof O&&e.errorCode===I.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},t.prototype.getItem=function(e){return S(this,void 0,void 0,function(){var r,n;return k(this,function(i){switch(i.label){case 0:if(r=this.inMemoryCache.getItem(e),r)return[3,4];i.label=1;case 1:return i.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,i.sent()];case 3:return n=i.sent(),this.handleDatabaseAccessError(n),[3,4];case 4:return[2,r]}})})},t.prototype.setItem=function(e,r){return S(this,void 0,void 0,function(){var n;return k(this,function(i){switch(i.label){case 0:this.inMemoryCache.setItem(e,r),i.label=1;case 1:return i.trys.push([1,3,,4]),[4,this.indexedDBCache.setItem(e,r)];case 2:return i.sent(),[3,4];case 3:return n=i.sent(),this.handleDatabaseAccessError(n),[3,4];case 4:return[2]}})})},t.prototype.removeItem=function(e){return S(this,void 0,void 0,function(){var r;return k(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 r=n.sent(),this.handleDatabaseAccessError(r),[3,4];case 4:return[2]}})})},t.prototype.getKeys=function(){return S(this,void 0,void 0,function(){var e,r;return k(this,function(n){switch(n.label){case 0:if(e=this.inMemoryCache.getKeys(),e.length!==0)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 r=n.sent(),this.handleDatabaseAccessError(r),[3,4];case 4:return[2,e]}})})},t.prototype.containsKey=function(e){return S(this,void 0,void 0,function(){var r,n;return k(this,function(i){switch(i.label){case 0:if(r=this.inMemoryCache.containsKey(e),r)return[3,4];i.label=1;case 1:return i.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,i.sent()];case 3:return n=i.sent(),this.handleDatabaseAccessError(n),[3,4];case 4:return[2,r]}})})},t.prototype.clearInMemory=function(){this.logger.verbose("Deleting in-memory keystore "+this.storeName),this.inMemoryCache.clear(),this.logger.verbose("In-memory keystore "+this.storeName+" deleted")},t.prototype.clearPersistent=function(){return S(this,void 0,void 0,function(){var e,r;return k(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(),e&&this.logger.verbose("Persistent keystore deleted"),[2,e];case 2:return r=n.sent(),this.handleDatabaseAccessError(r),[2,!1];case 3:return[2]}})})},t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var Rd;(function(t){t.asymmetricKeys="asymmetricKeys",t.symmetricKeys="symmetricKeys"})(Rd||(Rd={}));var h_=function(){function t(e){this.logger=e,this.asymmetricKeys=new $p(this.logger,Rd.asymmetricKeys),this.symmetricKeys=new $p(this.logger,Rd.symmetricKeys)}return t.prototype.clear=function(){return S(this,void 0,void 0,function(){var e;return k(this,function(r){switch(r.label){case 0:this.asymmetricKeys.clearInMemory(),this.symmetricKeys.clearInMemory(),r.label=1;case 1:return r.trys.push([1,3,,4]),[4,this.asymmetricKeys.clearPersistent()];case 2:return r.sent(),[2,!0];case 3:return e=r.sent(),e 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]}})})},t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var u_=function(){function t(e,r,n){this.logger=e,this.browserCrypto=new Ng(this.logger,n),this.b64Encode=new Dg,this.b64Decode=new t_,this.guidGenerator=new Og(this.browserCrypto),this.pkceGenerator=new n_(this.browserCrypto),this.cache=new h_(this.logger),this.performanceClient=r}return t.prototype.createNewGuid=function(){return this.guidGenerator.generateGuid()},t.prototype.base64Encode=function(e){return this.b64Encode.encode(e)},t.prototype.base64Decode=function(e){return this.b64Decode.decode(e)},t.prototype.generatePkceCodes=function(){return S(this,void 0,void 0,function(){return k(this,function(e){return[2,this.pkceGenerator.generateCodes()]})})},t.prototype.getPublicKeyThumbprint=function(e){var r;return S(this,void 0,void 0,function(){var n,i,o,a,s,c,l,d;return k(this,function(h){switch(h.label){case 0:return n=(r=this.performanceClient)===null||r===void 0?void 0:r.startMeasurement(lt.CryptoOptsGetPublicKeyThumbprint,e.correlationId),[4,this.browserCrypto.generateKeyPair(t.EXTRACTABLE,t.POP_KEY_USAGES)];case 1:return i=h.sent(),[4,this.browserCrypto.exportJwk(i.publicKey)];case 2:return o=h.sent(),a={e:o.e,kty:o.kty,n:o.n},s=Fn.getSortedObjectString(a),[4,this.hashString(s)];case 3:return c=h.sent(),[4,this.browserCrypto.exportJwk(i.privateKey)];case 4:return l=h.sent(),[4,this.browserCrypto.importJwk(l,!1,["sign"])];case 5:return d=h.sent(),[4,this.cache.asymmetricKeys.setItem(c,{privateKey:d,publicKey:i.publicKey,requestMethod:e.resourceRequestMethod,requestUri:e.resourceRequestUri})];case 6:return h.sent(),n&&n.endMeasurement({success:!0}),[2,c]}})})},t.prototype.removeTokenBindingKey=function(e){return S(this,void 0,void 0,function(){var r;return k(this,function(n){switch(n.label){case 0:return[4,this.cache.asymmetricKeys.removeItem(e)];case 1:return n.sent(),[4,this.cache.asymmetricKeys.containsKey(e)];case 2:return r=n.sent(),[2,!r]}})})},t.prototype.clearKeystore=function(){return S(this,void 0,void 0,function(){return k(this,function(e){switch(e.label){case 0:return[4,this.cache.clear()];case 1:return[2,e.sent()]}})})},t.prototype.signJwt=function(e,r,n){var i;return S(this,void 0,void 0,function(){var o,a,s,c,l,d,h,u,f,v,g,x,m;return k(this,function(p){switch(p.label){case 0:return o=(i=this.performanceClient)===null||i===void 0?void 0:i.startMeasurement(lt.CryptoOptsSignJwt,n),[4,this.cache.asymmetricKeys.getItem(r)];case 1:if(a=p.sent(),!a)throw O.createSigningKeyNotFoundInStorageError(r);return[4,this.browserCrypto.exportJwk(a.publicKey)];case 2:return s=p.sent(),c=Fn.getSortedObjectString(s),l=this.b64Encode.urlEncode(JSON.stringify({kid:r})),d=Oy.getShrHeaderString({kid:l,alg:s.alg}),h=this.b64Encode.urlEncode(d),e.cnf={jwk:JSON.parse(c)},u=this.b64Encode.urlEncode(JSON.stringify(e)),f=h+"."+u,v=Fn.stringToArrayBuffer(f),[4,this.browserCrypto.sign(a.privateKey,v)];case 3:return g=p.sent(),x=this.b64Encode.urlEncodeArr(new Uint8Array(g)),m=f+"."+x,o&&o.endMeasurement({success:!0}),[2,m]}})})},t.prototype.hashString=function(e){return S(this,void 0,void 0,function(){var r,n;return k(this,function(i){switch(i.label){case 0:return[4,this.browserCrypto.sha256Digest(e)];case 1:return r=i.sent(),n=new Uint8Array(r),[2,this.b64Encode.urlEncodeArr(n)]}})})},t.POP_KEY_USAGES=["sign","verify"],t.EXTRACTABLE=!0,t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var f_=function(){function t(e,r,n,i){this.isBrowserEnvironment=typeof window<"u",this.config=e,this.storage=r,this.logger=n,this.cryptoObj=i}return t.prototype.loadExternalTokens=function(e,r,n){if(this.logger.info("TokenCache - loadExternalTokens called"),!r.id_token)throw O.createUnableToLoadTokenError("Please ensure server response includes id token.");var i=new wn(r.id_token,this.cryptoObj),o,a;if(e.account){var s=this.loadAccount(i,e.account.environment,void 0,void 0,e.account.homeAccountId);o=new Il(s,this.loadIdToken(i,s.homeAccountId,e.account.environment,e.account.tenantId),this.loadAccessToken(e,r,s.homeAccountId,e.account.environment,e.account.tenantId,n),this.loadRefreshToken(e,r,s.homeAccountId,e.account.environment))}else if(e.authority){var c=Ad.generateAuthority(e.authority,e.azureCloudOptions),l={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 Ad(c,this.config.system.networkClient,this.storage,l),n.clientInfo){this.logger.trace("TokenCache - homeAccountId from options");var s=this.loadAccount(i,a.hostnameAndPort,n.clientInfo,a.authorityType);o=new Il(s,this.loadIdToken(i,s.homeAccountId,a.hostnameAndPort,a.tenant),this.loadAccessToken(e,r,s.homeAccountId,a.hostnameAndPort,a.tenant,n),this.loadRefreshToken(e,r,s.homeAccountId,a.hostnameAndPort))}else if(r.client_info){this.logger.trace("TokenCache - homeAccountId from response");var s=this.loadAccount(i,a.hostnameAndPort,r.client_info,a.authorityType);o=new Il(s,this.loadIdToken(i,s.homeAccountId,a.hostnameAndPort,a.tenant),this.loadAccessToken(e,r,s.homeAccountId,a.hostnameAndPort,a.tenant,n),this.loadRefreshToken(e,r,s.homeAccountId,a.hostnameAndPort))}else throw O.createUnableToLoadTokenError("Please provide clientInfo in the response or options.")}else throw O.createUnableToLoadTokenError("Please provide a request with an account or a request with authority.");return this.generateAuthenticationResult(e,i,o,a)},t.prototype.loadAccount=function(e,r,n,i,o){var a;if(o?a=o:i!==void 0&&n&&(a=_t.generateHomeAccountId(n,i,this.logger,this.cryptoObj,e)),!a)throw O.createUnableToLoadTokenError("Unexpected missing homeAccountId");var s=n?_t.createAccount(n,a,e,void 0,void 0,void 0,r):_t.createGenericAccount(a,e,void 0,void 0,void 0,r);if(this.isBrowserEnvironment)return this.logger.verbose("TokenCache - loading account"),this.storage.setAccount(s),s;throw O.createUnableToLoadTokenError("loadExternalTokens is designed to work in browser environments only.")},t.prototype.loadIdToken=function(e,r,n,i){var o=nc.createIdTokenEntity(r,n,e.rawToken,this.config.auth.clientId,i);if(this.isBrowserEnvironment)return this.logger.verbose("TokenCache - loading id token"),this.storage.setIdTokenCredential(o),o;throw O.createUnableToLoadTokenError("loadExternalTokens is designed to work in browser environments only.")},t.prototype.loadAccessToken=function(e,r,n,i,o,a){if(!r.access_token)return this.logger.verbose("TokenCache - No access token provided for caching"),null;if(!r.expires_in)throw O.createUnableToLoadTokenError("Please ensure server response includes expires_in value.");if(!a.extendedExpiresOn)throw O.createUnableToLoadTokenError("Please provide an extendedExpiresOn value in the options.");var s=new Wt(e.scopes).printScopes(),c=a.expiresOn||r.expires_in+new Date().getTime()/1e3,l=a.extendedExpiresOn,d=ic.createAccessTokenEntity(n,i,r.access_token,this.config.auth.clientId,o,s,c,l,this.cryptoObj);if(this.isBrowserEnvironment)return this.logger.verbose("TokenCache - loading access token"),this.storage.setAccessTokenCredential(d),d;throw O.createUnableToLoadTokenError("loadExternalTokens is designed to work in browser environments only.")},t.prototype.loadRefreshToken=function(e,r,n,i){if(!r.refresh_token)return this.logger.verbose("TokenCache - No refresh token provided for caching"),null;var o=Sd.createRefreshTokenEntity(n,i,r.refresh_token,this.config.auth.clientId);if(this.isBrowserEnvironment)return this.logger.verbose("TokenCache - loading refresh token"),this.storage.setRefreshTokenCredential(o),o;throw O.createUnableToLoadTokenError("loadExternalTokens is designed to work in browser environments only.")},t.prototype.generateAuthenticationResult=function(e,r,n,i){var o,a,s,c=b.EMPTY_STRING,l=[],d=null,h;n!=null&&n.accessToken&&(c=n.accessToken.secret,l=Wt.fromString(n.accessToken.target).asArray(),d=new Date(Number(n.accessToken.expiresOn)*1e3),h=new Date(Number(n.accessToken.extendedExpiresOn)*1e3));var u=(r==null?void 0:r.claims.oid)||(r==null?void 0:r.claims.sub)||b.EMPTY_STRING,f=(r==null?void 0:r.claims.tid)||b.EMPTY_STRING;return{authority:i?i.canonicalAuthority:b.EMPTY_STRING,uniqueId:u,tenantId:f,scopes:l,account:n!=null&&n.account?n.account.getAccountInfo():null,idToken:r?r.rawToken:b.EMPTY_STRING,idTokenClaims:r?r.claims:{},accessToken:c,fromCache:!0,expiresOn:d,correlationId:e.correlationId||b.EMPTY_STRING,requestId:b.EMPTY_STRING,extExpiresOn:h,familyId:b.EMPTY_STRING,tokenType:((o=n==null?void 0:n.accessToken)===null||o===void 0?void 0:o.tokenType)||b.EMPTY_STRING,state:b.EMPTY_STRING,cloudGraphHostName:((a=n==null?void 0:n.account)===null||a===void 0?void 0:a.cloudGraphHostName)||b.EMPTY_STRING,msGraphHost:((s=n==null?void 0:n.account)===null||s===void 0?void 0:s.msGraphHost)||b.EMPTY_STRING,code:void 0,fromNativeBroker:!1}},t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var p_=function(t){xt(e,t);function e(r){var n=t.call(this,r)||this;return n.includeRedirectUri=!1,n}return e}(Tg);/*! @azure/msal-browser v2.31.0 2022-11-07 */var m_=function(t){xt(e,t);function e(r,n,i,o,a,s,c,l,d,h){var u=t.call(this,r,n,i,o,a,s,l,d,h)||this;return u.apiId=c,u}return e.prototype.acquireToken=function(r){return S(this,void 0,void 0,function(){var n,i,o,a,s,c,l;return k(this,function(d){switch(d.label){case 0:if(this.logger.trace("SilentAuthCodeClient.acquireToken called"),!r.code)throw O.createAuthCodeRequiredError();return[4,this.initializeAuthorizationRequest(r,G.Silent)];case 1:n=d.sent(),this.browserStorage.updateCacheEntries(n.state,n.nonce,n.authority,n.loginHint||b.EMPTY_STRING,n.account||null),i=this.initializeServerTelemetryManager(this.apiId),d.label=2;case 2:return d.trys.push([2,4,,5]),o=W(W({},n),{code:r.code}),[4,this.getClientConfiguration(i,n.authority)];case 3:return a=d.sent(),s=new p_(a),this.logger.verbose("Auth code client created"),c=new Lg(s,this.browserStorage,o,this.logger,this.config.system),[2,c.handleCodeResponseFromServer({code:r.code,msgraph_host:r.msGraphHost,cloud_graph_host_name:r.cloudGraphHostName,cloud_instance_host_name:r.cloudInstanceHostName},n.state,s.authority,this.networkClient,!1)];case 4:throw l=d.sent(),l instanceof Y&&l.setCorrelationId(this.correlationId),i.cacheFailedRequest(l),this.browserStorage.cleanRequestByState(n.state),l;case 5:return[2]}})})},e.prototype.logout=function(){return Promise.reject(O.createSilentLogoutUnsupportedError())},e}(Pa);/*! @azure/msal-browser v2.31.0 2022-11-07 */var v_=function(){function t(e,r){this.correlationId=r,this.measureName="msal.measure."+e+"."+this.correlationId,this.startMark="msal.start."+e+"."+this.correlationId,this.endMark="msal.end."+e+"."+this.correlationId}return t.supportsBrowserPerformance=function(){return typeof window<"u"&&typeof window.performance<"u"&&typeof window.performance.mark=="function"&&typeof window.performance.measure=="function"&&typeof window.performance.clearMarks=="function"&&typeof window.performance.clearMeasures=="function"&&typeof window.performance.getEntriesByName=="function"},t.prototype.startMeasurement=function(){if(t.supportsBrowserPerformance())try{window.performance.mark(this.startMark)}catch{}},t.prototype.endMeasurement=function(){if(t.supportsBrowserPerformance())try{window.performance.mark(this.endMark),window.performance.measure(this.measureName,this.startMark,this.endMark)}catch{}},t.prototype.flushMeasurement=function(){if(t.supportsBrowserPerformance())try{var e=window.performance.getEntriesByName(this.measureName,"measure");if(e.length>0){var r=e[0].duration;return window.performance.clearMeasures(this.measureName),window.performance.clearMarks(this.startMark),window.performance.clearMarks(this.endMark),r}}catch{}return null},t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var g_=function(t){xt(e,t);function e(r,n,i,o,a,s,c){var l=t.call(this,r,n,i,o,a,s)||this;return l.browserCrypto=new Ng(l.logger,c),l.guidGenerator=new Og(l.browserCrypto),l}return e.prototype.startPerformanceMeasuremeant=function(r,n){return new v_(r,n)},e.prototype.generateId=function(){return this.guidGenerator.generateGuid()},e.prototype.getPageVisibility=function(){var r;return((r=document.visibilityState)===null||r===void 0?void 0:r.toString())||null},e.prototype.startMeasurement=function(r,n){var i=this,o=this.getPageVisibility(),a=t.prototype.startMeasurement.call(this,r,n);return W(W({},a),{endMeasurement:function(s){return a.endMeasurement(W({startPageVisibility:o,endPageVisibility:i.getPageVisibility()},s))}})},e}(Mg);/*! @azure/msal-browser v2.31.0 2022-11-07 */var y_=function(){function t(e){this.isBrowserEnvironment=typeof window<"u",this.config=Xy(e,this.isBrowserEnvironment),this.initialized=!1,this.logger=new P0(this.config.system.loggerOptions,ih,Rs),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 g_(this.config.auth.clientId,this.config.auth.authority,this.logger,ih,Rs,this.config.telemetry.application,this.config.system.cryptoOptions):new Vy(this.config.auth.clientId,this.config.auth.authority,this.logger,ih,Rs,this.config.telemetry.application),this.browserCrypto=this.isBrowserEnvironment?new u_(this.logger,this.performanceClient,this.config.system.cryptoOptions):Ed,this.eventHandler=new e_(this.logger,this.browserCrypto),this.browserStorage=this.isBrowserEnvironment?new Wu(this.config.auth.clientId,this.config.cache,this.browserCrypto,this.logger):$y(this.config.auth.clientId,this.logger);var r={cacheLocation:Ot.MemoryStorage,storeAuthStateInCookie:!1,secureCookies:!1};this.nativeInternalStorage=new Wu(this.config.auth.clientId,r,this.browserCrypto,this.logger),this.tokenCache=new f_(this.config,this.browserStorage,this.logger,this.browserCrypto)}return t.prototype.initialize=function(){return S(this,void 0,void 0,function(){var e,r;return k(this,function(n){switch(n.label){case 0:if(this.logger.trace("initialize called"),this.initialized)return this.logger.info("initialize has already been called, exiting early."),[2];if(this.eventHandler.emitEvent(X.INITIALIZE_START),!this.config.system.allowNativeBroker)return[3,4];n.label=1;case 1:return n.trys.push([1,3,,4]),e=this,[4,io.createProvider(this.logger,this.config.system.nativeBrokerHandshakeTimeout)];case 2:return e.nativeExtensionProvider=n.sent(),[3,4];case 3:return r=n.sent(),this.logger.verbose(r),[3,4];case 4:return this.initialized=!0,this.eventHandler.emitEvent(X.INITIALIZE_END),[2]}})})},t.prototype.handleRedirectPromise=function(e){return S(this,void 0,void 0,function(){var r,n,i,o,a,s,c,l,d=this;return k(this,function(h){return this.logger.verbose("handleRedirectPromise called"),We.blockNativeBrokerCalledBeforeInitialized(this.config.system.allowNativeBroker,this.initialized),r=this.getAllAccounts(),this.isBrowserEnvironment?(n=e||b.EMPTY_STRING,i=this.redirectResponse.get(n),typeof i>"u"?(this.eventHandler.emitEvent(X.HANDLE_REDIRECT_START,G.Redirect),this.logger.verbose("handleRedirectPromise has been called for the first time, storing the promise"),o=this.browserStorage.getCachedNativeRequest(),a=void 0,o&&io.isNativeAvailable(this.config,this.logger,this.nativeExtensionProvider)&&this.nativeExtensionProvider&&!e?(this.logger.trace("handleRedirectPromise - acquiring token from native platform"),s=new ua(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,Ae.handleRedirectPromise,this.performanceClient,this.nativeExtensionProvider,o.accountId,this.nativeInternalStorage,o.correlationId),a=s.handleRedirectPromise()):(this.logger.trace("handleRedirectPromise - acquiring token from web flow"),c=this.browserStorage.getTemporaryCache(ge.CORRELATION_ID,!0)||b.EMPTY_STRING,l=this.createRedirectClient(c),a=l.handleRedirectPromise(e)),i=a.then(function(u){if(u){var f=r.length<d.getAllAccounts().length;f?(d.eventHandler.emitEvent(X.LOGIN_SUCCESS,G.Redirect,u),d.logger.verbose("handleRedirectResponse returned result, login success")):(d.eventHandler.emitEvent(X.ACQUIRE_TOKEN_SUCCESS,G.Redirect,u),d.logger.verbose("handleRedirectResponse returned result, acquire token success"))}return d.eventHandler.emitEvent(X.HANDLE_REDIRECT_END,G.Redirect),u}).catch(function(u){throw r.length>0?d.eventHandler.emitEvent(X.ACQUIRE_TOKEN_FAILURE,G.Redirect,null,u):d.eventHandler.emitEvent(X.LOGIN_FAILURE,G.Redirect,null,u),d.eventHandler.emitEvent(X.HANDLE_REDIRECT_END,G.Redirect),u}),this.redirectResponse.set(n,i)):this.logger.verbose("handleRedirectPromise has been called previously, returning the result from the first call"),[2,i]):(this.logger.verbose("handleRedirectPromise returns null, not browser environment"),[2,null])})})},t.prototype.acquireTokenRedirect=function(e){return S(this,void 0,void 0,function(){var r,n,i,o,a,s=this;return k(this,function(c){return r=this.getRequestCorrelationId(e),this.logger.verbose("acquireTokenRedirect called",r),this.preflightBrowserEnvironmentCheck(G.Redirect),n=this.getAllAccounts().length>0,n?this.eventHandler.emitEvent(X.ACQUIRE_TOKEN_START,G.Redirect,e):this.eventHandler.emitEvent(X.LOGIN_START,G.Redirect,e),this.nativeExtensionProvider&&this.canUseNative(e)?(o=new ua(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,Ae.acquireTokenRedirect,this.performanceClient,this.nativeExtensionProvider,this.getNativeAccountId(e),this.nativeInternalStorage,e.correlationId),i=o.acquireTokenRedirect(e).catch(function(l){if(l instanceof mn&&l.isFatal()){s.nativeExtensionProvider=void 0;var d=s.createRedirectClient(e.correlationId);return d.acquireToken(e)}else if(l instanceof Zr){s.logger.verbose("acquireTokenRedirect - Resolving interaction required error thrown by native broker by falling back to web flow");var d=s.createRedirectClient(e.correlationId);return d.acquireToken(e)}throw s.browserStorage.setInteractionInProgress(!1),l})):(a=this.createRedirectClient(e.correlationId),i=a.acquireToken(e)),[2,i.catch(function(l){throw n?s.eventHandler.emitEvent(X.ACQUIRE_TOKEN_FAILURE,G.Redirect,null,l):s.eventHandler.emitEvent(X.LOGIN_FAILURE,G.Redirect,null,l),l})]})})},t.prototype.acquireTokenPopup=function(e){var r=this,n=this.getRequestCorrelationId(e),i=this.performanceClient.startMeasurement(lt.AcquireTokenPopup,n);try{this.logger.verbose("acquireTokenPopup called",n),this.preflightBrowserEnvironmentCheck(G.Popup)}catch(c){return Promise.reject(c)}var o=this.getAllAccounts();o.length>0?this.eventHandler.emitEvent(X.ACQUIRE_TOKEN_START,G.Popup,e):this.eventHandler.emitEvent(X.LOGIN_START,G.Popup,e);var a;if(this.canUseNative(e))a=this.acquireTokenNative(e,Ae.acquireTokenPopup).then(function(c){return r.browserStorage.setInteractionInProgress(!1),i.endMeasurement({success:!0,isNativeBroker:!0,requestId:c.requestId}),i.flushMeasurement(),c}).catch(function(c){if(c instanceof mn&&c.isFatal()){r.nativeExtensionProvider=void 0;var l=r.createPopupClient(e.correlationId);return l.acquireToken(e)}else if(c instanceof Zr){r.logger.verbose("acquireTokenPopup - Resolving interaction required error thrown by native broker by falling back to web flow");var l=r.createPopupClient(e.correlationId);return l.acquireToken(e)}throw r.browserStorage.setInteractionInProgress(!1),c});else{var s=this.createPopupClient(e.correlationId);a=s.acquireToken(e)}return a.then(function(c){var l=o.length<r.getAllAccounts().length;return l?r.eventHandler.emitEvent(X.LOGIN_SUCCESS,G.Popup,c):r.eventHandler.emitEvent(X.ACQUIRE_TOKEN_SUCCESS,G.Popup,c),i.addStaticFields({accessTokenSize:c.accessToken.length,idTokenSize:c.idToken.length}),i.endMeasurement({success:!0,requestId:c.requestId}),i.flushMeasurement(),c}).catch(function(c){return o.length>0?r.eventHandler.emitEvent(X.ACQUIRE_TOKEN_FAILURE,G.Popup,null,c):r.eventHandler.emitEvent(X.LOGIN_FAILURE,G.Popup,null,c),i.endMeasurement({errorCode:c.errorCode,subErrorCode:c.subError,success:!1}),i.flushMeasurement(),Promise.reject(c)})},t.prototype.ssoSilent=function(e){return S(this,void 0,void 0,function(){var r,n,i,o,a,s=this;return k(this,function(c){return r=this.getRequestCorrelationId(e),n=W(W({},e),{prompt:e.prompt,correlationId:r}),this.preflightBrowserEnvironmentCheck(G.Silent),i=this.performanceClient.startMeasurement(lt.SsoSilent,r),this.logger.verbose("ssoSilent called",r),this.eventHandler.emitEvent(X.SSO_SILENT_START,G.Silent,n),this.canUseNative(n)?o=this.acquireTokenNative(n,Ae.ssoSilent).catch(function(l){if(l instanceof mn&&l.isFatal()){s.nativeExtensionProvider=void 0;var d=s.createSilentIframeClient(n.correlationId);return d.acquireToken(n)}throw l}):(a=this.createSilentIframeClient(n.correlationId),o=a.acquireToken(n)),[2,o.then(function(l){return s.eventHandler.emitEvent(X.SSO_SILENT_SUCCESS,G.Silent,l),i.addStaticFields({accessTokenSize:l.accessToken.length,idTokenSize:l.idToken.length}),i.endMeasurement({success:!0,isNativeBroker:l.fromNativeBroker,requestId:l.requestId}),i.flushMeasurement(),l}).catch(function(l){throw s.eventHandler.emitEvent(X.SSO_SILENT_FAILURE,G.Silent,null,l),i.endMeasurement({errorCode:l.errorCode,subErrorCode:l.subError,success:!1}),i.flushMeasurement(),l})]})})},t.prototype.acquireTokenByCode=function(e){return S(this,void 0,void 0,function(){var r,n,i,o,a=this;return k(this,function(s){r=this.getRequestCorrelationId(e),this.preflightBrowserEnvironmentCheck(G.Silent),this.logger.trace("acquireTokenByCode called",r),this.eventHandler.emitEvent(X.ACQUIRE_TOKEN_BY_CODE_START,G.Silent,e),n=this.performanceClient.startMeasurement(lt.AcquireTokenByCode,e.correlationId);try{if(e.code)return i=e.code,o=this.hybridAuthCodeResponses.get(i),o?(this.logger.verbose("Existing acquireTokenByCode request found",e.correlationId),n.endMeasurement({success:!0}),n.discardMeasurement()):(this.logger.verbose("Initiating new acquireTokenByCode request",r),o=this.acquireTokenByCodeAsync(W(W({},e),{correlationId:r})).then(function(c){return a.eventHandler.emitEvent(X.ACQUIRE_TOKEN_BY_CODE_SUCCESS,G.Silent,c),a.hybridAuthCodeResponses.delete(i),n.addStaticFields({accessTokenSize:c.accessToken.length,idTokenSize:c.idToken.length}),n.endMeasurement({success:!0,isNativeBroker:c.fromNativeBroker,requestId:c.requestId}),n.flushMeasurement(),c}).catch(function(c){throw a.hybridAuthCodeResponses.delete(i),a.eventHandler.emitEvent(X.ACQUIRE_TOKEN_BY_CODE_FAILURE,G.Silent,null,c),n.endMeasurement({errorCode:c.errorCode,subErrorCode:c.subError,success:!1}),n.flushMeasurement(),c}),this.hybridAuthCodeResponses.set(i,o)),[2,o];if(e.nativeAccountId){if(this.canUseNative(e,e.nativeAccountId))return[2,this.acquireTokenNative(e,Ae.acquireTokenByCode,e.nativeAccountId).catch(function(c){throw c instanceof mn&&c.isFatal()&&(a.nativeExtensionProvider=void 0),c})];throw O.createUnableToAcquireTokenFromNativePlatformError()}else throw O.createAuthCodeOrNativeAccountIdRequiredError()}catch(c){throw this.eventHandler.emitEvent(X.ACQUIRE_TOKEN_BY_CODE_FAILURE,G.Silent,null,c),n.endMeasurement({errorCode:c instanceof Y&&c.errorCode||void 0,subErrorCode:c instanceof Y&&c.subError||void 0,success:!1}),c}return[2]})})},t.prototype.acquireTokenByCodeAsync=function(e){return S(this,void 0,void 0,function(){var r,n;return k(this,function(i){switch(i.label){case 0:return this.logger.trace("acquireTokenByCodeAsync called",e.correlationId),r=this.createSilentAuthCodeClient(e.correlationId),[4,r.acquireToken(e)];case 1:return n=i.sent(),[2,n]}})})},t.prototype.acquireTokenFromCache=function(e,r,n){return S(this,void 0,void 0,function(){return k(this,function(i){switch(n.cacheLookupPolicy){case or.Default:case or.AccessToken:case or.AccessTokenAndRefreshToken:return[2,e.acquireToken(r)];default:throw j.createRefreshRequiredError()}return[2]})})},t.prototype.acquireTokenByRefreshToken=function(e,r){return S(this,void 0,void 0,function(){var n;return k(this,function(i){switch(r.cacheLookupPolicy){case or.Default:case or.AccessTokenAndRefreshToken:case or.RefreshToken:case or.RefreshTokenAndNetwork:return n=this.createSilentRefreshClient(e.correlationId),[2,n.acquireToken(e)];default:throw j.createRefreshRequiredError()}return[2]})})},t.prototype.acquireTokenBySilentIframe=function(e){return S(this,void 0,void 0,function(){var r;return k(this,function(n){return r=this.createSilentIframeClient(e.correlationId),[2,r.acquireToken(e)]})})},t.prototype.logout=function(e){return S(this,void 0,void 0,function(){var r;return k(this,function(n){return r=this.getRequestCorrelationId(e),this.logger.warning("logout API is deprecated and will be removed in msal-browser v3.0.0. Use logoutRedirect instead.",r),[2,this.logoutRedirect(W({correlationId:r},e))]})})},t.prototype.logoutRedirect=function(e){return S(this,void 0,void 0,function(){var r,n;return k(this,function(i){return r=this.getRequestCorrelationId(e),this.preflightBrowserEnvironmentCheck(G.Redirect),n=this.createRedirectClient(r),[2,n.logout(e)]})})},t.prototype.logoutPopup=function(e){try{var r=this.getRequestCorrelationId(e);this.preflightBrowserEnvironmentCheck(G.Popup);var n=this.createPopupClient(r);return n.logout(e)}catch(i){return Promise.reject(i)}},t.prototype.getAllAccounts=function(){return this.logger.verbose("getAllAccounts called"),this.isBrowserEnvironment?this.browserStorage.getAllAccounts():[]},t.prototype.getAccountByUsername=function(e){var r=this.getAllAccounts();return!N.isEmpty(e)&&r&&r.length?(this.logger.verbose("Account matching username found, returning"),this.logger.verbosePii("Returning signed-in accounts matching username: "+e),r.filter(function(n){return n.username.toLowerCase()===e.toLowerCase()})[0]||null):(this.logger.verbose("getAccountByUsername: No matching account found, returning null"),null)},t.prototype.getAccountByHomeId=function(e){var r=this.getAllAccounts();return!N.isEmpty(e)&&r&&r.length?(this.logger.verbose("Account matching homeAccountId found, returning"),this.logger.verbosePii("Returning signed-in accounts matching homeAccountId: "+e),r.filter(function(n){return n.homeAccountId===e})[0]||null):(this.logger.verbose("getAccountByHomeId: No matching account found, returning null"),null)},t.prototype.getAccountByLocalId=function(e){var r=this.getAllAccounts();return!N.isEmpty(e)&&r&&r.length?(this.logger.verbose("Account matching localAccountId found, returning"),this.logger.verbosePii("Returning signed-in accounts matching localAccountId: "+e),r.filter(function(n){return n.localAccountId===e})[0]||null):(this.logger.verbose("getAccountByLocalId: No matching account found, returning null"),null)},t.prototype.setActiveAccount=function(e){this.browserStorage.setActiveAccount(e)},t.prototype.getActiveAccount=function(){return this.browserStorage.getActiveAccount()},t.prototype.preflightBrowserEnvironmentCheck=function(e,r){if(r===void 0&&(r=!0),this.logger.verbose("preflightBrowserEnvironmentCheck started"),We.blockNonBrowserEnvironment(this.isBrowserEnvironment),We.blockRedirectInIframe(e,this.config.system.allowRedirectInIframe),We.blockReloadInHiddenIframes(),We.blockAcquireTokenInPopups(),We.blockNativeBrokerCalledBeforeInitialized(this.config.system.allowNativeBroker,this.initialized),e===G.Redirect&&this.config.cache.cacheLocation===Ot.MemoryStorage&&!this.config.cache.storeAuthStateInCookie)throw Pd.createInMemoryRedirectUnavailableError();(e===G.Redirect||e===G.Popup)&&this.preflightInteractiveRequest(r)},t.prototype.preflightInteractiveRequest=function(e){this.logger.verbose("preflightInteractiveRequest called, validating app environment"),We.blockReloadInHiddenIframes(),e&&this.browserStorage.setInteractionInProgress(!0)},t.prototype.acquireTokenNative=function(e,r,n){return S(this,void 0,void 0,function(){var i;return k(this,function(o){if(this.logger.trace("acquireTokenNative called"),!this.nativeExtensionProvider)throw O.createNativeConnectionNotEstablishedError();return i=new ua(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,r,this.performanceClient,this.nativeExtensionProvider,n||this.getNativeAccountId(e),this.nativeInternalStorage,e.correlationId),[2,i.acquireToken(e)]})})},t.prototype.canUseNative=function(e,r){if(this.logger.trace("canUseNative called"),!io.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 Nt.NONE:case Nt.CONSENT:case Nt.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!r&&!this.getNativeAccountId(e)?(this.logger.trace("canUseNative: nativeAccountId is not available, returning false"),!1):!0},t.prototype.getNativeAccountId=function(e){var r=e.account||this.browserStorage.getAccountInfoByHints(e.loginHint,e.sid)||this.getActiveAccount();return r&&r.nativeAccountId||""},t.prototype.createPopupClient=function(e){return new Gy(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeInternalStorage,this.nativeExtensionProvider,e)},t.prototype.createRedirectClient=function(e){return new qy(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeInternalStorage,this.nativeExtensionProvider,e)},t.prototype.createSilentIframeClient=function(e){return new Jy(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,Ae.ssoSilent,this.performanceClient,this.nativeInternalStorage,this.nativeExtensionProvider,e)},t.prototype.createSilentCacheClient=function(e){return new Hg(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeExtensionProvider,e)},t.prototype.createSilentRefreshClient=function(e){return new Zy(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeExtensionProvider,e)},t.prototype.createSilentAuthCodeClient=function(e){return new m_(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,Ae.acquireTokenByCode,this.performanceClient,this.nativeExtensionProvider,e)},t.prototype.addEventCallback=function(e){return this.eventHandler.addEventCallback(e)},t.prototype.removeEventCallback=function(e){this.eventHandler.removeEventCallback(e)},t.prototype.addPerformanceCallback=function(e){return this.performanceClient.addPerformanceCallback(e)},t.prototype.removePerformanceCallback=function(e){return this.performanceClient.removePerformanceCallback(e)},t.prototype.enableAccountStorageEvents=function(){this.eventHandler.enableAccountStorageEvents()},t.prototype.disableAccountStorageEvents=function(){this.eventHandler.disableAccountStorageEvents()},t.prototype.getTokenCache=function(){return this.tokenCache},t.prototype.getLogger=function(){return this.logger},t.prototype.setLogger=function(e){this.logger=e},t.prototype.initializeWrapperLibrary=function(e,r){this.browserStorage.setWrapperMetadata(e,r)},t.prototype.setNavigationClient=function(e){this.navigationClient=e},t.prototype.getConfiguration=function(){return this.config},t.prototype.getRequestCorrelationId=function(e){return e!=null&&e.correlationId?e.correlationId:this.isBrowserEnvironment?this.browserCrypto.createNewGuid():b.EMPTY_STRING},t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var __=function(t){xt(e,t);function e(r){var n=t.call(this,r)||this;return n.activeSilentTokenRequests=new Map,n}return e.prototype.loginRedirect=function(r){return S(this,void 0,void 0,function(){var n;return k(this,function(i){return n=this.getRequestCorrelationId(r),this.logger.verbose("loginRedirect called",n),[2,this.acquireTokenRedirect(W({correlationId:n},r||Dp))]})})},e.prototype.loginPopup=function(r){var n=this.getRequestCorrelationId(r);return this.logger.verbose("loginPopup called",n),this.acquireTokenPopup(W({correlationId:n},r||Dp))},e.prototype.acquireTokenSilent=function(r){return S(this,void 0,void 0,function(){var n,i,o,a,s,c,l,d=this;return k(this,function(h){if(n=this.getRequestCorrelationId(r),i=this.performanceClient.startMeasurement(lt.AcquireTokenSilent,n),i.addStaticFields({cacheLookupPolicy:r.cacheLookupPolicy}),this.preflightBrowserEnvironmentCheck(G.Silent),this.logger.verbose("acquireTokenSilent called",n),o=r.account||this.getActiveAccount(),!o)throw O.createNoAccountError();return a={clientId:this.config.auth.clientId,authority:r.authority||b.EMPTY_STRING,scopes:r.scopes,homeAccountIdentifier:o.homeAccountId,claims:r.claims,authenticationScheme:r.authenticationScheme,resourceRequestMethod:r.resourceRequestMethod,resourceRequestUri:r.resourceRequestUri,shrClaims:r.shrClaims,sshKid:r.sshKid},s=JSON.stringify(a),c=this.activeSilentTokenRequests.get(s),typeof c>"u"?(this.logger.verbose("acquireTokenSilent called for the first time, storing active request",n),l=this.acquireTokenSilentAsync(W(W({},r),{correlationId:n}),o).then(function(u){return d.activeSilentTokenRequests.delete(s),i.addStaticFields({accessTokenSize:u.accessToken.length,idTokenSize:u.idToken.length}),i.endMeasurement({success:!0,fromCache:u.fromCache,isNativeBroker:u.fromNativeBroker,requestId:u.requestId}),i.flushMeasurement(),u}).catch(function(u){throw d.activeSilentTokenRequests.delete(s),i.endMeasurement({errorCode:u.errorCode,subErrorCode:u.subError,success:!1}),i.flushMeasurement(),u}),this.activeSilentTokenRequests.set(s,l),[2,l]):(this.logger.verbose("acquireTokenSilent has been called previously, returning the result from the first call",n),i.endMeasurement({success:!0}),i.discardMeasurement(),[2,c])})})},e.prototype.acquireTokenSilentAsync=function(r,n){return S(this,void 0,void 0,function(){var i,o,a,s,c,l,d=this;return k(this,function(h){switch(h.label){case 0:return this.eventHandler.emitEvent(X.ACQUIRE_TOKEN_START,G.Silent,r),i=this.performanceClient.startMeasurement(lt.AcquireTokenSilentAsync,r.correlationId),io.isNativeAvailable(this.config,this.logger,this.nativeExtensionProvider,r.authenticationScheme)&&n.nativeAccountId?(this.logger.verbose("acquireTokenSilent - attempting to acquire token from native platform"),a=W(W({},r),{account:n}),o=this.acquireTokenNative(a,Ae.acquireTokenSilent_silentFlow).catch(function(u){return S(d,void 0,void 0,function(){var f;return k(this,function(v){if(u instanceof mn&&u.isFatal())return this.logger.verbose("acquireTokenSilent - native platform unavailable, falling back to web flow"),this.nativeExtensionProvider=void 0,f=this.createSilentIframeClient(r.correlationId),[2,f.acquireToken(r)];throw u})})}),[3,3]):[3,1];case 1:return this.logger.verbose("acquireTokenSilent - attempting to acquire token from web flow"),s=this.createSilentCacheClient(r.correlationId),[4,s.initializeSilentRequest(r,n)];case 2:c=h.sent(),l=W(W({},r),{cacheLookupPolicy:r.cacheLookupPolicy||or.Default}),o=this.acquireTokenFromCache(s,c,l).catch(function(u){if(l.cacheLookupPolicy===or.AccessToken)throw u;return We.blockReloadInHiddenIframes(),d.eventHandler.emitEvent(X.ACQUIRE_TOKEN_NETWORK_START,G.Silent,c),d.acquireTokenByRefreshToken(c,l).catch(function(f){var v=f instanceof go,g=f instanceof Zr,x=f.errorCode===Jr.INVALID_GRANT_ERROR;if((!v||!x||g||l.cacheLookupPolicy===or.AccessTokenAndRefreshToken||l.cacheLookupPolicy===or.RefreshToken)&&l.cacheLookupPolicy!==or.Skip)throw f;return d.logger.verbose("Refresh token expired/invalid or CacheLookupPolicy is set to Skip, attempting acquire token by iframe.",r.correlationId),d.acquireTokenBySilentIframe(c)})}),h.label=3;case 3:return[2,o.then(function(u){return d.eventHandler.emitEvent(X.ACQUIRE_TOKEN_SUCCESS,G.Silent,u),i.endMeasurement({success:!0,fromCache:u.fromCache,isNativeBroker:u.fromNativeBroker,requestId:u.requestId}),u}).catch(function(u){throw d.eventHandler.emitEvent(X.ACQUIRE_TOKEN_FAILURE,G.Silent,null,u),i.endMeasurement({errorCode:u.errorCode,subErrorCode:u.subError,success:!1}),u})]}})})},e}(y_);const jp="redirect";var Bp=globalThis&&globalThis.__awaiter||function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(h){a(h)}}function c(d){try{l(n.throw(d))}catch(h){a(h)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};class b_ extends __{get account(){return this.getAllAccounts().find(n=>{var i;return((i=n.idTokenClaims)===null||i===void 0?void 0:i.aud)===this.clientId})}get hasValidClaims(){var e;const r=(e=this.account)===null||e===void 0?void 0:e.idTokenClaims;if(r){const n=Math.ceil(Date.now()/1e3);return r.exp>n}return!1}get clientId(){var e;return(e=this.config.auth)===null||e===void 0?void 0:e.clientId}get requestOrigin(){return this.browserStorage.getTemporaryCache("request.origin",!0)}constructor(e,r){super(r),this.tenantId=e}login(e,r=jp,n=!0){var i;return Bp(this,void 0,void 0,function*(){const o=(e==null?void 0:e.loginHint)||((i=this.account)===null||i===void 0?void 0:i.username),a=(e==null?void 0:e.scopes)||[],s=Object.assign(Object.assign({},e),{loginHint:o,scopes:a});if(o&&n){this.logger.verbose("Attempting to login in silently");try{return yield this.ssoSilent(s)}catch{this.logger.verbose("Silent login attempt failed")}}switch(this.logger.verbose(`Attempting to login in by [${r}]`),r){case"popup":return this.loginPopup(s);case"redirect":return this.loginRedirect(s)}})}acquireToken(e={scopes:[]},r=jp,n=!0){return Bp(this,void 0,void 0,function*(){const i=yield this.account;if(n&&i){this.logger.verbose("Attempting to acquire token in silently");try{return yield this.acquireTokenSilent(Object.assign({account:i},e))}catch{this.logger.info("Expected to navigate away from the current page but timeout occurred.")}}switch(this.logger.verbose(`Attempting to acquire token by [${r}]`),r){case"popup":return this.acquireTokenPopup(e);case"redirect":return this.acquireTokenRedirect(e)}})}}const w_=(t,e=window.location.origin)=>{t=t.match(/^http[s]?/)?t:e+t;const{origin:r,pathname:n}=new URL(t);return r+n.replace(/([^:]\/)\/+/g,"$1")},x_=(t,e,r,n,i)=>{const o=Object.assign({clientId:e,redirectUri:w_(r||""),navigateToLoginRequestUrl:!1,authority:`https://login.microsoftonline.com/${t}`},n==null?void 0:n.auth),a=Object.assign({cacheLocation:"localStorage"},n==null?void 0:n.cache),s=n==null?void 0:n.system;return new(i||b_)(t,{auth:o,cache:a,system:s})};class Vg extends P0{constructor(e){super({logLevel:e,loggerCallback:(...r)=>this.loggerCallback(...r)}),this.getLogType=r=>{switch(r){case Qe.Error:return"error";case Qe.Warning:return"warn";case Qe.Info:return"info";case Qe.Verbose:default:return"debug"}}}loggerCallback(e,r,n){console[this.getLogType(e)]("%c FUSION::MSAL %c %s","border: 1px solid;","border: none;",r)}}var oh=globalThis&&globalThis.__awaiter||function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(h){a(h)}}function c(d){try{l(n.throw(d))}catch(h){a(h)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const E_="default";class C_{get defaultClient(){return this.getClient(E_)}get defaultAccount(){return this.defaultClient.account}get defaultConfig(){return this._config.defaultConfig}constructor(e){this._config=e,this._clients={}}getClient(e){return this._clients[e]||(this._clients[e]=this.createClient(e)),this._clients[e]}createClient(e){const r=e?this._config.getClientConfig(e):this._config.defaultConfig;if(!r)throw Error("Could not find any config");const n=x_(r.tenantId,r.clientId,r.redirectUri,r.config);return n.setLogger(new Vg(0)),n}handleRedirect(){return oh(this,void 0,void 0,function*(){const{redirectUri:e}=this.defaultConfig||{};if(window.location.pathname===e){const r=this.defaultClient,n=r.getLogger(),{requestOrigin:i}=r;yield r.handleRedirectPromise(),i===e?(n.warning(`detected callback loop from url ${e}, redirecting to root`),window.location.replace("/")):window.location.replace(i||"/")}return null})}acquireToken(e){return this.defaultClient.acquireToken(e)}acquireAccessToken(e){return oh(this,void 0,void 0,function*(){const r=yield this.acquireToken(e);return r?r.accessToken:void 0})}login(){return oh(this,void 0,void 0,function*(){yield this.defaultClient.login()})}}var z_=globalThis&&globalThis.__awaiter||function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(h){a(h)}}function c(d){try{l(n.throw(d))}catch(h){a(h)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const Ug={name:"auth",configure:t=>{var e;const r=new py;return!((e=t==null?void 0:t.auth)===null||e===void 0)&&e.defaultConfig&&r.configureDefault(t.auth.defaultConfig),r},initialize:({config:t})=>z_(void 0,void 0,void 0,function*(){const e=new C_(t);return t.requiresAuth&&(yield e.handleRedirect(),e.defaultAccount||(yield e.login())),e})},S_=(t,e)=>({module:Ug,configure:r=>{r.configureDefault(t),(e==null?void 0:e.requiresAuth)!==void 0&&(r.requiresAuth=e==null?void 0:e.requiresAuth);const{clients:n}=e!=null?e:{};n&&Object.entries(n).forEach(([i,o])=>r.configureClient(i,o))}});var Fg=globalThis&&globalThis.__awaiter||function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(h){a(h)}}function c(d){try{l(n.throw(d))}catch(h){a(h)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const k_=t=>{var e;return{id:t.id,isChildType:t.isChildType,parentTypeIds:(e=t.parentTypeIds)!==null&&e!==void 0?e:[]}},$g=t=>{var e,r,n,i;return{id:t.id,externalId:(e=t.externalId)!==null&&e!==void 0?e:void 0,isActive:t.isActive,isDeleted:t.isDeleted,created:new Date(t.created),source:(r=t.source)!==null&&r!==void 0?r:void 0,title:(n=t.title)!==null&&n!==void 0?n:void 0,type:k_(t.type),value:(i=t.value)!==null&&i!==void 0?i:{}}},T_=t=>Fg(void 0,void 0,void 0,function*(){const e=yield t.json();return $g(e)}),A_=t=>Fg(void 0,void 0,void 0,function*(){return(yield t.json()).map($g)});var I_=globalThis&&globalThis.__classPrivateFieldSet||function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},M_=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Ml;class P_{constructor(e,r={}){this.config=r,Ml.set(this,void 0),I_(this,Ml,e,"f")}requireInstance(e){return M_(this,Ml,"f").requireInstance(e)}setContextType(e){this.config.contextType=e}setContextFilter(e){this.config.contextFilter=e}setContextClient(e,r=1*60*1e3){this.config.client={get:typeof e.get=="function"?{key:({id:n})=>n,client:{fn:e.get},expire:r}:e.get,query:typeof e.query=="function"?{key:n=>JSON.stringify(n),client:{fn:e.query},expire:r}:e.query}}}Ml=new WeakMap;var ol=globalThis&&globalThis.__awaiter||function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(h){a(h)}}function c(d){try{l(n.throw(d))}catch(h){a(h)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})},qp=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Pl;class R_{constructor(){this.defaultExpireTime=1*60*1e3,Pl.set(this,[])}addConfigBuilder(e){qp(this,Pl,"f").push(e)}_getServiceProvider(e){var r;return ol(this,void 0,void 0,function*(){if(e.hasModule("services"))return e.requireInstance("services");{const n=(r=e.ref)===null||r===void 0?void 0:r.services;if(n)return n;throw Error("no service services provider configures [ServicesModule]")}})}createConfig(e){var r;return ol(this,void 0,void 0,function*(){const n=yield qp(this,Pl,"f").reduce((i,o)=>ol(this,void 0,void 0,function*(){const a=new P_(e,yield i);return yield Promise.resolve(o(a)),Object.assign(i,a.config)}),Promise.resolve({}));return(r=n.client)!==null&&r!==void 0||(n.client=yield(()=>ol(this,void 0,void 0,function*(){const o=yield(yield this._getServiceProvider(e)).createContextClient("json$");return{get:{client:{fn:a=>o.get("v1",a,{selector:T_})},key:({id:a})=>a,expire:this.defaultExpireTime},query:{client:{fn:a=>o.query("v1",{query:a},{selector:A_})},key:a=>JSON.stringify(a),expire:this.defaultExpireTime}}}))()),n})}}Pl=new WeakMap;var Gp;(function(t){t.IDLE="idle",t.ACTIVE="active",t.FAILED="failed",t.CANCELED="canceled"})(Gp||(Gp={}));const H_=t=>e=>e.pipe(Ji(t)),L_=t=>t.pipe(Xt(e=>e.value));var al,O_=new Uint8Array(16);function D_(){if(!al&&(al=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!al))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return al(O_)}const N_=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function jg(t){return typeof t=="string"&&N_.test(t)}var mt=[];for(var ah=0;ah<256;++ah)mt.push((ah+256).toString(16).substr(1));function Bg(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=(mt[t[e+0]]+mt[t[e+1]]+mt[t[e+2]]+mt[t[e+3]]+"-"+mt[t[e+4]]+mt[t[e+5]]+"-"+mt[t[e+6]]+mt[t[e+7]]+"-"+mt[t[e+8]]+mt[t[e+9]]+"-"+mt[t[e+10]]+mt[t[e+11]]+mt[t[e+12]]+mt[t[e+13]]+mt[t[e+14]]+mt[t[e+15]]).toLowerCase();if(!jg(r))throw TypeError("Stringified UUID is invalid");return r}function V_(t){if(!jg(t))throw TypeError("Invalid UUID");var e,r=new Uint8Array(16);return r[0]=(e=parseInt(t.slice(0,8),16))>>>24,r[1]=e>>>16&255,r[2]=e>>>8&255,r[3]=e&255,r[4]=(e=parseInt(t.slice(9,13),16))>>>8,r[5]=e&255,r[6]=(e=parseInt(t.slice(14,18),16))>>>8,r[7]=e&255,r[8]=(e=parseInt(t.slice(19,23),16))>>>8,r[9]=e&255,r[10]=(e=parseInt(t.slice(24,36),16))/1099511627776&255,r[11]=e/4294967296&255,r[12]=e>>>24&255,r[13]=e>>>16&255,r[14]=e>>>8&255,r[15]=e&255,r}function U_(t){t=unescape(encodeURIComponent(t));for(var e=[],r=0;r<t.length;++r)e.push(t.charCodeAt(r));return e}var F_="6ba7b810-9dad-11d1-80b4-00c04fd430c8",$_="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function j_(t,e,r){function n(i,o,a,s){if(typeof i=="string"&&(i=U_(i)),typeof o=="string"&&(o=V_(o)),o.length!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var c=new Uint8Array(16+i.length);if(c.set(o),c.set(i,o.length),c=r(c),c[6]=c[6]&15|e,c[8]=c[8]&63|128,a){s=s||0;for(var l=0;l<16;++l)a[s+l]=c[l];return a}return Bg(c)}try{n.name=t}catch{}return n.DNS=F_,n.URL=$_,n}function qg(t,e,r){t=t||{};var n=t.random||(t.rng||D_)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,e){r=r||0;for(var i=0;i<16;++i)e[r+i]=n[i];return e}return Bg(n)}function B_(t,e,r,n){switch(t){case 0:return e&r^~e&n;case 1:return e^r^n;case 2:return e&r^e&n^r&n;case 3:return e^r^n}}function sh(t,e){return t<<e|t>>>32-e}function q_(t){var e=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof t=="string"){var n=unescape(encodeURIComponent(t));t=[];for(var i=0;i<n.length;++i)t.push(n.charCodeAt(i))}else Array.isArray(t)||(t=Array.prototype.slice.call(t));t.push(128);for(var o=t.length/4+2,a=Math.ceil(o/16),s=new Array(a),c=0;c<a;++c){for(var l=new Uint32Array(16),d=0;d<16;++d)l[d]=t[c*64+d*4]<<24|t[c*64+d*4+1]<<16|t[c*64+d*4+2]<<8|t[c*64+d*4+3];s[c]=l}s[a-1][14]=(t.length-1)*8/Math.pow(2,32),s[a-1][14]=Math.floor(s[a-1][14]),s[a-1][15]=(t.length-1)*8&4294967295;for(var h=0;h<a;++h){for(var u=new Uint32Array(80),f=0;f<16;++f)u[f]=s[h][f];for(var v=16;v<80;++v)u[v]=sh(u[v-3]^u[v-8]^u[v-14]^u[v-16],1);for(var g=r[0],x=r[1],m=r[2],p=r[3],y=r[4],w=0;w<80;++w){var T=Math.floor(w/20),L=sh(g,5)+B_(T,x,m,p)+y+e[T]+u[w]>>>0;y=p,p=m,m=sh(x,30)>>>0,x=g,g=L}r[0]=r[0]+g>>>0,r[1]=r[1]+x>>>0,r[2]=r[2]+m>>>0,r[3]=r[3]+p>>>0,r[4]=r[4]+y>>>0}return[r[0]>>24&255,r[0]>>16&255,r[0]>>8&255,r[0]&255,r[1]>>24&255,r[1]>>16&255,r[1]>>8&255,r[1]&255,r[2]>>24&255,r[2]>>16&255,r[2]>>8&255,r[2]&255,r[3]>>24&255,r[3]>>16&255,r[3]>>8&255,r[3]&255,r[4]>>24&255,r[4]>>16&255,r[4]>>8&255,r[4]&255]}var G_=j_("v5",80,q_);const K_=G_;class Qu extends Error{constructor(e,r){super(r.message,{cause:r.cause}),this.type=e,this.request=r.request}}const Gg=(...t)=>$r(e=>t.includes(e.type));var Rt=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},W_=globalThis&&globalThis.__classPrivateFieldSet||function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},dn,Gr;class Kg extends Be{get action$(){return Rt(this,dn,"f").asObservable()}get value(){return Rt(this,Gr,"f").value}get closed(){return Rt(this,Gr,"f").closed||Rt(this,dn,"f").closed}constructor(e,r){super(i=>Rt(this,Gr,"f").subscribe(i)),dn.set(this,new Nn),Gr.set(this,void 0);const n="getInitialState"in e?e.getInitialState():r;W_(this,Gr,new o1(n),"f"),Rt(this,dn,"f").pipe(A0(e,n),yg()).subscribe(Rt(this,Gr,"f")),this.reset=()=>Rt(this,Gr,"f").next(n)}next(e){Rt(this,dn,"f").next(e)}addEffect(e,r){const n=typeof e=="string"?this.action$.pipe(Gg(e)):this.action$,i=r||e;return n.pipe(vo(o=>rn(new Promise((a,s)=>{try{a(i(o,this.value))}catch(c){s(c)}})).pipe(Wn(a=>(console.warn("unhandled effect",a),po)))),$r(o=>!!o),md(pd)).subscribe(Rt(this,dn,"f"))}addEpic(e){return this.addFlow(e)}addFlow(e){const r=e(this.action$,this);if(!r)throw new TypeError(`addEpic: one of the provided effects "${e.name||"<anonymous>"}" does not return a stream. Double check you're not missing a return statement!`);return r.pipe(Wn(n=>(console.trace("unhandled exception, epic closed!",n),po)),md(pd)).subscribe(Rt(this,dn,"f"))}unsubscribe(){Rt(this,dn,"f").unsubscribe(),Rt(this,Gr,"f").unsubscribe()}complete(){Rt(this,dn,"f").complete(),Rt(this,Gr,"f").complete()}asObservable(){return Rt(this,Gr,"f").asObservable()}}dn=new WeakMap,Gr=new WeakMap;function fn(t,e){function r(...n){if(e){const i=e(...n);if(!i)throw new Error("prepareAction did not return an object");return Object.assign(Object.assign({type:t,payload:i.payload},"meta"in i&&{meta:i.meta}),"error"in i&&{error:i.error})}return{type:t,payload:n[0]}}return r.toString=()=>`${t}`,r.type=t,r.match=n=>n.type===t,r}function Lr(t){for(var e=arguments.length,r=Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];throw Error("[Immer] minified error nr: "+t+(r.length?" "+r.map(function(i){return"'"+i+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Ti(t){return!!t&&!!t[hr]}function Yn(t){var e;return!!t&&(function(r){if(!r||typeof r!="object")return!1;var n=Object.getPrototypeOf(r);if(n===null)return!0;var i=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return i===Object||typeof i=="function"&&Function.toString.call(i)===rb}(t)||Array.isArray(t)||!!t[tm]||!!(!((e=t.constructor)===null||e===void 0)&&e[tm])||L0(t)||O0(t))}function Kp(t){return Ti(t)||Lr(23,t),t[hr].t}function oc(t,e,r){r===void 0&&(r=!1),Ra(t)===0?(r?Object.keys:F0)(t).forEach(function(n){r&&typeof n=="symbol"||e(n,t[n],t)}):t.forEach(function(n,i){return e(i,n,t)})}function Ra(t){var e=t[hr];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:L0(t)?2:O0(t)?3:0}function Xu(t,e){return Ra(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function Y_(t,e){return Ra(t)===2?t.get(e):t[e]}function Wg(t,e,r){var n=Ra(t);n===2?t.set(e,r):n===3?(t.delete(e),t.add(r)):t[e]=r}function Q_(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function L0(t){return eb&&t instanceof Map}function O0(t){return tb&&t instanceof Set}function Bi(t){return t.o||t.t}function D0(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=nb(t);delete e[hr];for(var r=F0(e),n=0;n<r.length;n++){var i=r[n],o=e[i];o.writable===!1&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(e[i]={configurable:!0,writable:!0,enumerable:o.enumerable,value:t[i]})}return Object.create(Object.getPrototypeOf(t),e)}function N0(t,e){return e===void 0&&(e=!1),V0(t)||Ti(t)||!Yn(t)||(Ra(t)>1&&(t.set=t.add=t.clear=t.delete=X_),Object.freeze(t),e&&oc(t,function(r,n){return N0(n,!0)},!0)),t}function X_(){Lr(2)}function V0(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function _n(t){var e=ib[t];return e||Lr(18,t),e}function Wp(){return ac}function ch(t,e){e&&(_n("Patches"),t.u=[],t.s=[],t.v=e)}function Hd(t){Ju(t),t.p.forEach(J_),t.p=null}function Ju(t){t===ac&&(ac=t.l)}function Yp(t){return ac={p:[],l:ac,h:t,m:!0,_:0}}function J_(t){var e=t[hr];e.i===0||e.i===1?e.j():e.O=!0}function lh(t,e){e._=e.p.length;var r=e.p[0],n=t!==void 0&&t!==r;return e.h.g||_n("ES5").S(e,t,n),n?(r[hr].P&&(Hd(e),Lr(4)),Yn(t)&&(t=Ld(e,t),e.l||Od(e,t)),e.u&&_n("Patches").M(r[hr].t,t,e.u,e.s)):t=Ld(e,r,[]),Hd(e),e.u&&e.v(e.u,e.s),t!==Yg?t:void 0}function Ld(t,e,r){if(V0(e))return e;var n=e[hr];if(!n)return oc(e,function(o,a){return Qp(t,n,e,o,a,r)},!0),e;if(n.A!==t)return e;if(!n.P)return Od(t,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=n.i===4||n.i===5?n.o=D0(n.k):n.o;oc(n.i===3?new Set(i):i,function(o,a){return Qp(t,n,i,o,a,r)}),Od(t,i,!1),r&&t.u&&_n("Patches").R(n,r,t.u,t.s)}return n.o}function Qp(t,e,r,n,i,o){if(Ti(i)){var a=Ld(t,i,o&&e&&e.i!==3&&!Xu(e.D,n)?o.concat(n):void 0);if(Wg(r,n,a),!Ti(a))return;t.m=!1}if(Yn(i)&&!V0(i)){if(!t.h.F&&t._<1)return;Ld(t,i),e&&e.A.l||Od(t,i)}}function Od(t,e,r){r===void 0&&(r=!1),t.h.F&&t.m&&N0(e,r)}function dh(t,e){var r=t[hr];return(r?Bi(r):t)[e]}function Xp(t,e){if(e in t)for(var r=Object.getPrototypeOf(t);r;){var n=Object.getOwnPropertyDescriptor(r,e);if(n)return n;r=Object.getPrototypeOf(r)}}function Zu(t){t.P||(t.P=!0,t.l&&Zu(t.l))}function hh(t){t.o||(t.o=D0(t.t))}function e2(t,e,r){var n=L0(e)?_n("MapSet").N(e,r):O0(e)?_n("MapSet").T(e,r):t.g?function(i,o){var a=Array.isArray(i),s={i:a?1:0,A:o?o.A:Wp(),P:!1,I:!1,D:{},l:o,t:i,k:null,o:null,j:null,C:!1},c=s,l=t2;a&&(c=[s],l=ds);var d=Proxy.revocable(c,l),h=d.revoke,u=d.proxy;return s.k=u,s.j=h,u}(e,r):_n("ES5").J(e,r);return(r?r.A:Wp()).p.push(n),n}function Z_(t){return Ti(t)||Lr(22,t),function e(r){if(!Yn(r))return r;var n,i=r[hr],o=Ra(r);if(i){if(!i.P&&(i.i<4||!_n("ES5").K(i)))return i.t;i.I=!0,n=Jp(r,o),i.I=!1}else n=Jp(r,o);return oc(n,function(a,s){i&&Y_(i.t,a)===s||Wg(n,a,e(s))}),o===3?new Set(n):n}(t)}function Jp(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return D0(t)}var Zp,ac,U0=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",eb=typeof Map<"u",tb=typeof Set<"u",em=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Yg=U0?Symbol.for("immer-nothing"):((Zp={})["immer-nothing"]=!0,Zp),tm=U0?Symbol.for("immer-draftable"):"__$immer_draftable",hr=U0?Symbol.for("immer-state"):"__$immer_state",rb=""+Object.prototype.constructor,F0=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,nb=Object.getOwnPropertyDescriptors||function(t){var e={};return F0(t).forEach(function(r){e[r]=Object.getOwnPropertyDescriptor(t,r)}),e},ib={},t2={get:function(t,e){if(e===hr)return t;var r=Bi(t);if(!Xu(r,e))return function(i,o,a){var s,c=Xp(o,a);return c?"value"in c?c.value:(s=c.get)===null||s===void 0?void 0:s.call(i.k):void 0}(t,r,e);var n=r[e];return t.I||!Yn(n)?n:n===dh(t.t,e)?(hh(t),t.o[e]=e2(t.A.h,n,t)):n},has:function(t,e){return e in Bi(t)},ownKeys:function(t){return Reflect.ownKeys(Bi(t))},set:function(t,e,r){var n=Xp(Bi(t),e);if(n!=null&&n.set)return n.set.call(t.k,r),!0;if(!t.P){var i=dh(Bi(t),e),o=i==null?void 0:i[hr];if(o&&o.t===r)return t.o[e]=r,t.D[e]=!1,!0;if(Q_(r,i)&&(r!==void 0||Xu(t.t,e)))return!0;hh(t),Zu(t)}return t.o[e]===r&&typeof r!="number"&&(r!==void 0||e in t.o)||(t.o[e]=r,t.D[e]=!0,!0)},deleteProperty:function(t,e){return dh(t.t,e)!==void 0||e in t.t?(t.D[e]=!1,hh(t),Zu(t)):delete t.D[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var r=Bi(t),n=Reflect.getOwnPropertyDescriptor(r,e);return n&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:n.enumerable,value:r[e]}},defineProperty:function(){Lr(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){Lr(12)}},ds={};oc(t2,function(t,e){ds[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),ds.deleteProperty=function(t,e){return ds.set.call(this,t,e,void 0)},ds.set=function(t,e,r){return t2.set.call(this,t[0],e,r,t[0])};var ob=function(){function t(r){var n=this;this.g=em,this.F=!0,this.produce=function(i,o,a){if(typeof i=="function"&&typeof o!="function"){var s=o;o=i;var c=n;return function(g){var x=this;g===void 0&&(g=s);for(var m=arguments.length,p=Array(m>1?m-1:0),y=1;y<m;y++)p[y-1]=arguments[y];return c.produce(g,function(w){var T;return(T=o).call.apply(T,[x,w].concat(p))})}}var l;if(typeof o!="function"&&Lr(6),a!==void 0&&typeof a!="function"&&Lr(7),Yn(i)){var d=Yp(n),h=e2(n,i,void 0),u=!0;try{l=o(h),u=!1}finally{u?Hd(d):Ju(d)}return typeof Promise<"u"&&l instanceof Promise?l.then(function(g){return ch(d,a),lh(g,d)},function(g){throw Hd(d),g}):(ch(d,a),lh(l,d))}if(!i||typeof i!="object"){if((l=o(i))===void 0&&(l=i),l===Yg&&(l=void 0),n.F&&N0(l,!0),a){var f=[],v=[];_n("Patches").M(i,l,f,v),a(f,v)}return l}Lr(21,i)},this.produceWithPatches=function(i,o){if(typeof i=="function")return function(l){for(var d=arguments.length,h=Array(d>1?d-1:0),u=1;u<d;u++)h[u-1]=arguments[u];return n.produceWithPatches(l,function(f){return i.apply(void 0,[f].concat(h))})};var a,s,c=n.produce(i,o,function(l,d){a=l,s=d});return typeof Promise<"u"&&c instanceof Promise?c.then(function(l){return[l,a,s]}):[c,a,s]},typeof(r==null?void 0:r.useProxies)=="boolean"&&this.setUseProxies(r.useProxies),typeof(r==null?void 0:r.autoFreeze)=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var e=t.prototype;return e.createDraft=function(r){Yn(r)||Lr(8),Ti(r)&&(r=Z_(r));var n=Yp(this),i=e2(this,r,void 0);return i[hr].C=!0,Ju(n),i},e.finishDraft=function(r,n){var i=r&&r[hr],o=i.A;return ch(o,n),lh(void 0,o)},e.setAutoFreeze=function(r){this.F=r},e.setUseProxies=function(r){r&&!em&&Lr(20),this.g=r},e.applyPatches=function(r,n){var i;for(i=n.length-1;i>=0;i--){var o=n[i];if(o.path.length===0&&o.op==="replace"){r=o.value;break}}i>-1&&(n=n.slice(i+1));var a=_n("Patches").$;return Ti(r)?a(r,n):this.produce(r,function(s){return a(s,n)})},t}(),Cr=new ob,Qg=Cr.produce;Cr.produceWithPatches.bind(Cr);Cr.setAutoFreeze.bind(Cr);Cr.setUseProxies.bind(Cr);Cr.applyPatches.bind(Cr);Cr.createDraft.bind(Cr);Cr.finishDraft.bind(Cr);function rm(t){return Yn(t)?Qg(t,()=>{}):t}function ab(t){return typeof t=="function"}function Xg(t,e){const[r,n,i]=sb(e);let o;if(ab(t))o=()=>rm(t());else{const s=rm(t);o=()=>s}function a(s=o(),c){let l=[r[c.type],...n.filter(({matcher:d})=>d(c)).map(({reducer:d})=>d)];return l.filter(d=>!!d).length===0&&(l=[i]),l.reduce((d,h)=>{if(h)if(Ti(d)){const f=h(d,c);return f===void 0?d:f}else{if(Yn(d))return Qg(d,u=>h(u,c));{const u=h(d,c);if(u===void 0){if(d===null)return d;throw Error("A case reducer on a non-draftable value must not return undefined")}return u}}return d},s)}return a.getInitialState=o,a}function sb(t){const e={},r=[];let n;const i={addCase(o,a){const s=typeof o=="string"?o:o.type;if(s in e)throw new Error("addCase cannot be called with two reducers for the same action type");return e[s]=a,i},addMatcher(o,a){return r.push({matcher:o,reducer:a}),i},addDefaultCase(o){return n=o,i}};return t(i),[e,r,n]}const cb=()=>({request:fn("client/request",(e,r)=>{var n,i,o,a;return r!=null||(r={}),(n=r.transaction)!==null&&n!==void 0||(r.transaction=qg()),(i=r.created)!==null&&i!==void 0||(r.created=Date.now()),(o=r.controller)!==null&&o!==void 0||(r.controller=new AbortController),(a=r.task)!==null&&a!==void 0||(r.task=new rg),{payload:e,meta:r}}),retry:fn("client/retry",e=>({payload:e})),success:fn("client/success",(e,r)=>({payload:e,meta:r})),cancel:fn("client/cancel",e=>({payload:e})),failure:fn("client/failure",(e,r)=>({payload:e,meta:r})),error:fn("client/error",(e,r)=>({payload:e,meta:r}))}),tt=cb(),Jg=t=>e=>e.pipe($r(tt.request.match),vo(r=>{const{meta:{controller:n,transaction:i}}=r;return new Be(o=>{if(n.signal.aborted)return o.next(tt.cancel({transaction:i,reason:`request [${i}] was aborted!`})),o.complete();o.add(e.pipe($r(tt.cancel.match)).subscribe(a=>{a.payload.transaction===i&&(n.signal.aborted||n.abort(),o.complete())})),o.add(Ou(n.signal,"abort").subscribe(()=>{o.next(tt.cancel({transaction:i,reason:`request [${i}] was aborted!`})),o.complete()})),o.add(rn(t(r)).subscribe({next:a=>o.next(a),error:a=>o.next(tt.error(a,{request:r})),complete:()=>o.complete()}))})})),lb=t=>(t=Object.assign({},{count:0,delay:0},t),(e,r)=>e.pipe(Jg(n=>e.pipe($r(tt.failure.match),$r(i=>i.meta.request===n),xg(r),Ji(([i,o])=>{var a,s;const{transaction:c}=n.meta,l=o[c];if(!l)return po;const d=(s=(a=l.retry)===null||a===void 0?void 0:a.length)!==null&&s!==void 0?s:0,h=Object.assign({},t,n.meta.retry);if(d>=h.count)throw h.count?Error("maximum retries executed!",{cause:i.payload}):i.payload;return(typeof h.delay=="function"?rn(h.delay(i.payload.cause)).pipe(Wn(f=>{throw Error("failed to resolve delay",{cause:f})})):D7(h.delay)).pipe(Xt(()=>tt.retry(n)))}))))),db=t=>e=>e.pipe(Jg(r=>rn(t(r.payload,r.meta.controller.signal)).pipe(Xt(n=>tt.success(n,{request:r})),Wn(n=>vd(tt.failure(Error(`failed to execute request for transaction ${r.meta.transaction}`,{cause:n}),{request:r})))))),hb=t=>t.pipe($r(tt.retry.match),Xt(e=>e.payload)),Zg=()=>$r(t=>t.status==="complete"),ub=(t={})=>Xg(t,e=>e.addCase(tt.request,(r,n)=>{const{transaction:i,task:o,ref:a,created:s}=n.meta;r[i]={transaction:i,task:o,ref:a,created:s}}).addCase(tt.success,(r,n)=>{const{request:i}=n.meta,{transaction:o,ref:a}=i.meta,s=r[o];if(s){const c={status:"complete",transaction:o,ref:a,value:n.payload,args:i.payload,created:s.created,completed:Date.now()};s.task.next(c),s.task.complete()}delete r[o]}).addCase(tt.retry,(r,n)=>{var i;const{transaction:o}=n.payload.meta,a=r[o];a&&((i=a.retry)!==null&&i!==void 0||(a.retry=[]),a.retry.push(Date.now()))}).addCase(tt.cancel,(r,n)=>{const{transaction:i,reason:o}=n.payload;if(r[i]){const a=Object.assign({},Kp(r[i]));a.task.error(new Qu("abort",{request:a,message:"request was canceled",cause:new Error(o)})),delete r[i]}}).addCase(tt.failure,(r,n)=>{var i;const{payload:o,meta:a}=n,{transaction:s}=a.request.meta,c=r[s];c&&((i=c.errors)!==null&&i!==void 0||(c.errors=[]),c.errors.push(o))}).addCase(tt.error,(r,n)=>{const{payload:i,meta:o}=n,{transaction:a}=o.request.meta;if(r[a]){const s=Object.assign({},Kp(r[a]));s.task.error(new Qu("error",{request:s,message:`failed to process task [${a}]`,cause:i})),delete r[a]}}));var fb=globalThis&&globalThis.__awaiter||function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(h){a(h)}}function c(d){try{l(n.throw(d))}catch(h){a(h)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})},Ye=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},nm=globalThis&&globalThis.__classPrivateFieldSet||function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},et,qi;class im extends Be{get closed(){return Ye(this,et,"f").closed}get state$(){return Ye(this,et,"f")}get action$(){return Ye(this,et,"f").action$}get success$(){return this.action$.pipe($r(tt.success.match),Xt(({payload:e})=>e))}get error$(){return this.action$.pipe(Gg("client/error"),xg(Ye(this,et,"f")),Xt(([e,r])=>{const{payload:n,meta:i}=e,{transaction:o}=i.request.meta,a=r[e.meta.request.meta.transaction];return new Qu("error",{request:a,message:`failed to process task [${o}]`,cause:n})}))}constructor(e,r){super(o=>Ye(this,et,"f").subscribe(o)),et.set(this,void 0),qi.set(this,void 0);const n={};nm(this,et,new Kg(ub(n)),"f"),nm(this,qi,new Jn(()=>Ye(this,et,"f").complete()),"f"),Ye(this,qi,"f").add(Ye(this,et,"f").addFlow(db(e))),Ye(this,qi,"f").add(Ye(this,et,"f").addFlow(hb));const i=Object.assign({count:0,delay:0},r==null?void 0:r.retry);Ye(this,qi,"f").add(Ye(this,et,"f").addFlow(lb(i)))}next(e,r){const n=tt.request(e,r);return Ye(this,et,"f").next(n),n.meta}nextAsync(e,r){return fb(this,void 0,void 0,function*(){return mo(this.next(e,r).task.pipe(Zg()))})}getTaskByTransaction(e){const r=Ye(this,et,"f").value[e];return r&&r.task}getTaskByRef(e){const r=Object.values(Ye(this,et,"f").value).find(n=>n.ref===e);return r&&r.task}cancel(e,r){if(e&&Ye(this,et,"f").value[e])r!=null||(r=`[${e}]: transaction canceled`),Ye(this,et,"f").next(tt.cancel({transaction:e,reason:r}));else for(const n of Object.keys(Ye(this,et,"f").value))this.cancel(n,`[${e}]: all transactions canceled`)}on(e,r){return Ye(this,et,"f").addEffect(tt[e].type,n=>{r(n,this)})}complete(){Ye(this,qi,"f").unsubscribe()}asObservable(){return Ye(this,et,"f").asObservable()}}et=new WeakMap,qi=new WeakMap;function pb(){return{set:fn("cache/set",(t,e)=>({payload:{key:t,entry:e}})),remove:fn("cache/remove",t=>({payload:t})),invalidate:fn("cache/invalidate",t=>({payload:t})),trim:fn("cache/trim",t=>({payload:t}))}}const ko=pb(),mb=(t,e)=>{var r,n;return((r=e.updated)!==null&&r!==void 0?r:0)-((n=t.updated)!==null&&n!==void 0?n:0)};function vb(t,e={}){return Xg(e,r=>r.addCase(t.set,(n,i)=>{var o;const{key:a,entry:s}=i.payload,c=n[a];c?(c.updated=Date.now(),(o=c.updates)!==null&&o!==void 0||(c.updates=0),c.updates++):n[a]=Object.assign(Object.assign({},s),{created:Date.now()})}).addCase(t.remove,(n,i)=>{delete n[i.payload]}).addCase(t.invalidate,(n,i)=>{const o=n[i.payload];o&&delete o.updated}).addCase(t.trim,(n,i)=>{var o,a;const{payload:s}=i,c=(o=s.sort)!==null&&o!==void 0?o:mb,l=Object.keys(n),d=Object.entries(n).filter(([h,u])=>!s.validate||s.validate(u)).sort((h,u)=>c(h[1],u[1])).slice(0,(a=s.size)!==null&&a!==void 0?a:Number.MAX_SAFE_INTEGER).map(([h])=>h);if(l.length!==d.length)for(const h of l){const u=d.indexOf(h);u!==-1?d.splice(u,1):delete n[h]}}))}var ln=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},gb=globalThis&&globalThis.__classPrivateFieldSet||function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},mr;class om{get state$(){return ln(this,mr,"f").asObservable()}constructor(e){mr.set(this,void 0);const{trimming:r,initial:n}=e;gb(this,mr,new Kg(vb(ko,n)),"f"),r&&ln(this,mr,"f").addEffect("cache/set",()=>ln(this,mr,"f").next(ko.trim(r)))}setItem(...e){ln(this,mr,"f").next(ko.set(...e))}getItem(e){return ln(this,mr,"f").value[e]}removeItem(e){ln(this,mr,"f").next(ko.remove(e))}invalidate(e){ln(this,mr,"f").next(ko.invalidate(e))}trim(e){ln(this,mr,"f").next(ko.trim(e))}reset(){ln(this,mr,"f").reset()}complete(){ln(this,mr,"f").complete()}}mr=new WeakMap;var Me=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},To=globalThis&&globalThis.__classPrivateFieldSet||function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},yb=globalThis&&globalThis.__rest||function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r},Gi,Kr,oi,Ro,Ho,Rl,r2;const _b=(t=0)=>e=>{var r;return((r=e.updated)!==null&&r!==void 0?r:0)+t>Date.now()};class Ir{get client(){return Me(this,Kr,"f")}get cache(){return Me(this,oi,"f")}constructor(e){var r,n;Gi.set(this,new Jn),Kr.set(this,void 0),oi.set(this,void 0),Ro.set(this,new Nn),Ho.set(this,void 0),Rl.set(this,void 0),r2.set(this,qg()),To(this,Ho,o=>K_(e.key(o),Me(this,r2,"f")),"f"),To(this,Rl,(r=e==null?void 0:e.validate)!==null&&r!==void 0?r:_b(e==null?void 0:e.expire),"f"),e.client instanceof im?To(this,Kr,e.client,"f"):(To(this,Kr,new im(e.client.fn,e.client.options),"f"),Me(this,Gi,"f").add(()=>Me(this,Kr,"f").complete())),e.cache instanceof om?To(this,oi,e.cache,"f"):(To(this,oi,new om(e.cache||{}),"f"),Me(this,Gi,"f").add(()=>Me(this,oi,"f").complete()));const i=(n=e.queueOperator)!==null&&n!==void 0?n:H_;Me(this,Gi,"f").add(()=>Me(this,Ro,"f").complete()),Me(this,Gi,"f").add(Me(this,Ro,"f").pipe(i(({args:o,options:a})=>new Be(s=>{const{task:c,transaction:l}=Me(this,Kr,"f").next(o,a);s.add(c.pipe(Wn(()=>po)).subscribe(s)),s.add(()=>{setTimeout(()=>Me(this,Kr,"f").cancel(l))})})),Zg(),wg(()=>!Me(this,Kr,"f").closed)).subscribe(o=>{const{args:a,value:s,transaction:c,ref:l}=o,d=l!=null?l:Me(this,Ho,"f").call(this,a);Me(this,oi,"f").setItem(d,{value:s,args:a,transaction:c})}))}next(e,r){Me(this,Ro,"f").next({args:e,options:r})}query(e,r){var n;const i=Me(this,Ho,"f").call(this,e);return console.log(i),(n=Me(this,Kr,"f").getTaskByRef(i))!==null&&n!==void 0?n:this._createTask(i,e,r)}queryAsync(e,r){const n=r||{},{awaitResolve:i}=n,o=yb(n,["awaitResolve"]);return(i?gd:mo)(this._query(e,o))}complete(){Me(this,Gi,"f").unsubscribe()}_query(e,r){var n;const i=Me(this,Ho,"f").call(this,e);return(n=Me(this,Kr,"f").getTaskByRef(i))!==null&&n!==void 0?n:this._createTask(i,e,r)}_createTask(e,r,n){var i;const o=new rg,a=Me(this,oi,"f").getItem(e);if(a){const{value:l,args:d,created:h,updated:u,updates:f,transaction:v}=a,g={status:"cache",value:l,args:d,created:h,updated:u,updates:f,transaction:v};o.next(g)}const s=((i=n==null?void 0:n.cache)===null||i===void 0?void 0:i.validate)||Me(this,Rl,"f");return a&&s(a,r)?o.complete():Me(this,Ro,"f").next({args:r,options:{ref:e,task:o}}),o.asObservable()}}Gi=new WeakMap,Kr=new WeakMap,oi=new WeakMap,Ro=new WeakMap,Ho=new WeakMap,Rl=new WeakMap,r2=new WeakMap;Ir.extractQueryValue=L_;var ri=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},am=globalThis&&globalThis.__classPrivateFieldSet||function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},hs,Tn;class bb extends Be{get currentContext(){return ri(this,Tn,"f").value}get currentContext$(){return ri(this,Tn,"f").asObservable()}get client(){return ri(this,hs,"f")}constructor(e){super(r=>ri(this,Tn,"f").subscribe(r)),hs.set(this,void 0),Tn.set(this,void 0),am(this,hs,new Ir(e),"f"),am(this,Tn,new o1(void 0),"f")}setCurrentContext(e){typeof e=="string"?this.resolveContext(e).pipe(Wn(()=>po)).subscribe(r=>ri(this,Tn,"f").next(r)):e!==ri(this,Tn,"f").value&&ri(this,Tn,"f").next(e)}resolveContext(e){return ri(this,hs,"f").query({id:e}).pipe(Xt(r=>r.value))}}hs=new WeakMap,Tn=new WeakMap;var Ht=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Qa=globalThis&&globalThis.__classPrivateFieldSet||function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},An,Hl,us,Lo,Ll,fs;class wb{get contextClient(){return Ht(this,An,"f")}get queryClient(){return Ht(this,Hl,"f")}queryContext(e){const r=this.queryClient.query({search:e,filter:{type:Ht(this,Ll,"f")}}).pipe(Xt(n=>n.value));return Ht(this,fs,"f")?r.pipe(Xt(Ht(this,fs,"f"))):r}queryContextAsync(e){return gd(this.queryContext(e))}get currentContext$(){return Ht(this,An,"f").currentContext$}get currentContext(){return Ht(this,An,"f").currentContext}set currentContext(e){Ht(this,us,"f")?Ht(this,us,"f").dispatchEvent("onCurrentContextChange",{source:this,canBubble:!0,cancelable:!0,detail:{context:e}}).then(r=>{r.canceled||Ht(this,An,"f").setCurrentContext(e)}):Ht(this,An,"f").setCurrentContext(e)}constructor(e){An.set(this,void 0),Hl.set(this,void 0),us.set(this,void 0),Lo.set(this,new Jn),Ll.set(this,void 0),fs.set(this,void 0);const{config:r,event:n,parentContext:i}=e;Qa(this,Ll,r.contextType,"f"),Qa(this,fs,r.contextFilter,"f"),Qa(this,An,new bb(r.client.get),"f"),Qa(this,Hl,new Ir(r.client.query),"f"),n&&(Qa(this,us,n,"f"),Ht(this,Lo,"f").add(Ht(this,An,"f").currentContext$.pipe(bg()).subscribe(([o,a])=>{n.dispatchEvent("onCurrentContextChanged",{source:this,canBubble:!0,detail:{previous:o,next:a}})})),Ht(this,Lo,"f").add(n.addEventListener("onCurrentContextChanged",o=>{o.source!==this&&(this.currentContext=o.detail.next)}))),i&&Ht(this,Lo,"f").add(i.contextClient.currentContext$.subscribe(o=>this.currentContext=o))}dispose(){Ht(this,Lo,"f").unsubscribe()}}An=new WeakMap,Hl=new WeakMap,us=new WeakMap,Lo=new WeakMap,Ll=new WeakMap,fs=new WeakMap;var xb=globalThis&&globalThis.__awaiter||function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(h){a(h)}}function c(d){try{l(n.throw(d))}catch(h){a(h)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const Eb="context",Cb={name:Eb,configure:()=>new R_,initialize:t=>xb(void 0,void 0,void 0,function*(){var e;const r=yield t.config.createConfig(t),n=t.hasModule("event")?yield t.requireInstance("event"):void 0,i=(e=t.ref)===null||e===void 0?void 0:e.context;return new wb({config:r,event:n,parentContext:i})}),dispose:t=>{t.instance.dispose()}},zb="modulepreload",Sb=function(t){return"/"+t},sm={},e3=function(e,r,n){if(!r||r.length===0)return e();const i=document.getElementsByTagName("link");return Promise.all(r.map(o=>{if(o=Sb(o),o in sm)return;sm[o]=!0;const a=o.endsWith(".css"),s=a?'[rel="stylesheet"]':"";if(!!n)for(let d=i.length-1;d>=0;d--){const h=i[d];if(h.href===o&&(!a||h.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${o}"]${s}`))return;const l=document.createElement("link");if(l.rel=a?"stylesheet":zb,a||(l.as="script",l.crossOrigin=""),l.href=o,document.head.appendChild(l),a)return new Promise((d,h)=>{l.addEventListener("load",d),l.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${o}`)))})})).then(()=>e())},kb=(t,e)=>JSON.stringify(t)===JSON.stringify(e);var Lt=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},sl=globalThis&&globalThis.__classPrivateFieldSet||function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Oo,ps,ms,Do,ai;class Tb extends Be{get current(){return Lt(this,Do,"f").value}get current$(){return Lt(this,Do,"f").pipe(yg(kb))}constructor(e){super(i=>this.current$.subscribe(i)),Oo.set(this,void 0),ps.set(this,void 0),ms.set(this,void 0),Do.set(this,void 0),ai.set(this,new Jn);const{event:r,config:n}=e;sl(this,Do,new o1(void 0),"f"),sl(this,Oo,new Ir(n.getApp),"f"),sl(this,ps,new Ir(n.getApps),"f"),sl(this,ms,new Ir(n.getConfig),"f"),Lt(this,ai,"f").add(Lt(this,Oo,"f").complete),Lt(this,ai,"f").add(Lt(this,ps,"f").complete),Lt(this,ai,"f").add(Lt(this,ms,"f").complete),Lt(this,ai,"f").add(this.current$.pipe(bg(),wg(()=>!!r)).subscribe(([i,o])=>{r==null||r.dispatchEvent("onCurrentAppChanged",{source:this,detail:{previous:i,next:o}})}))}getApp(e){return Ir.extractQueryValue(Lt(this,Oo,"f").query({appKey:e}).pipe(Wn(r=>{throw Error("failed to load manifest",{cause:r})})))}getAllApps(){return Ir.extractQueryValue(Lt(this,ps,"f").query())}getAppConfig(e,r){return Ir.extractQueryValue(Lt(this,ms,"f").query({appKey:e,tag:r}).pipe(Wn(n=>{throw Error("failed to load config",{cause:n})})))}setCurrentApp(e){return new Promise((r,n)=>{const i=Lt(this,Oo,"f").query({appKey:e});Lt(this,ai,"f").add(Ir.extractQueryValue(i).subscribe({next:o=>Lt(this,Do,"f").next(o),error:n,complete:r}))})}loadApp(e){const r=this.getApp(e).pipe(Ji(i=>mo(rn(e3(()=>import(i.entry),[])).pipe(Xt(o=>({manifest:i,module:o})))))),n=this.getAppConfig(e).pipe(Xt(i=>({config:i})));return N7(r,n).pipe(A0((i,o)=>Object.assign({},i,o),{}),$r(i=>["manifest","module","config"].every(o=>!!i[o])),_g(()=>"failed to load application"))}dispose(){Lt(this,ai,"f").unsubscribe()}}Oo=new WeakMap,ps=new WeakMap,ms=new WeakMap,Do=new WeakMap,ai=new WeakMap;var Ab=globalThis&&globalThis.__awaiter||function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(h){a(h)}}function c(d){try{l(n.throw(d))}catch(h){a(h)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const n2="app",Ib={name:n2,configure:()=>new Mb,initialize:t=>Ab(void 0,void 0,void 0,function*(){const e=yield t.config.createConfig(t),r=yield t.requireInstance("event").catch(()=>{});return new Tb({config:e,event:r})}),dispose:t=>{t.instance.dispose()}};var cm=globalThis&&globalThis.__awaiter||function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(h){a(h)}}function c(d){try{l(n.throw(d))}catch(h){a(h)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};class Mb{constructor(){this.defaultExpireTime=1*60*1e3}_createHttpClient(e){return cm(this,void 0,void 0,function*(){const r=yield e.requireInstance("http");if(r.hasClient(n2))return r.createClient(n2);{const n=yield e.requireInstance("serviceDiscovery");try{return yield n.createClient("app")}catch{return yield n.createClient("portal")}}})}createConfig(e){return cm(this,void 0,void 0,function*(){const r=yield this._createHttpClient(e),n={getApp:{client:{fn:({appKey:i})=>r.json$(`/api/apps/${i}`)},key:({appKey:i})=>i},getApps:{client:{fn:()=>r.json$("/api/apps")},key:()=>"apps"},getConfig:{client:{fn:({appKey:i,tag:o})=>r.json$(`/api/apps/${i}/config${o?`?tag=${o}`:""}`)},key:i=>JSON.stringify(i)}};return this.processConfig(n)})}processConfig(e){return e}}var lm=globalThis&&globalThis.__awaiter||function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(h){a(h)}}function c(d){try{l(n.throw(d))}catch(h){a(h)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};class Pb{constructor(e){this.clientKey=e.clientKey,this.endpoint=e.endpoint,this.clientCtor=e.clientCtor}createHttpClientClient(e){return lm(this,void 0,void 0,function*(){if(!this.clientKey)throw Error("no http client for service discovery is provided!");return e.createClient(this.clientKey)})}createClient(e){return lm(this,void 0,void 0,function*(){if(!this.endpoint)throw Error("no endpoint defined!");return new this.clientCtor({http:e,endpoint:this.endpoint})})}}var uh=globalThis&&globalThis.__awaiter||function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(h){a(h)}}function c(d){try{l(n.throw(d))}catch(h){a(h)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};class Rb{constructor(e,r){this._client=e,this._http=r}get environment(){return this._client.environment}resolveService(e){return uh(this,void 0,void 0,function*(){return this._client.resolveService(e)})}createClient(e,r){return uh(this,void 0,void 0,function*(){const n=yield this.resolveService(e);if(!n)throw Error(`Could not load configuration of service [${e}]`);return this._http.createClient(Object.assign(Object.assign({},r),{baseUri:n.uri,defaultScopes:n.defaultScopes}))})}configureClient(e,r){return uh(this,void 0,void 0,function*(){const{key:n,alias:i}=typeof e=="string"?{key:e,alias:e}:e,{uri:o,defaultScopes:a}=yield this.resolveService(n);r.addConfig(zg(i,{baseUri:o,defaultScopes:a}))})}}var dm=globalThis&&globalThis.__awaiter||function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(h){a(h)}}function c(d){try{l(n.throw(d))}catch(h){a(h)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})},Hb=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Lb=globalThis&&globalThis.__classPrivateFieldSet||function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Ol;class Ob{get environment(){return mo(Ir.extractQueryValue(Hb(this,Ol,"f").query(void 0,{cache:{suppressInvalid:!0}})))}constructor({http:e,endpoint:r}){Ol.set(this,void 0),this.http=e,this.endpoint=r,Lb(this,Ol,new Ir({client:{fn:()=>e.fetch$(r,{selector:this.selector.bind(this)}).pipe(Du(n=>console.log("\u{1F525}",n)))},key:()=>"services",expire:5*60*1e3}),"f")}selector(e){return dm(this,void 0,void 0,function*(){const r=yield e.json(),n=r.services.reduce((i,o)=>Object.assign(i,{[o.key]:{clientId:r.clientId,uri:o.uri,defaultScopes:[r.clientId+"/.default"]}}),{});return Object.assign(Object.assign({},r),{services:n})})}resolveService(e){return dm(this,void 0,void 0,function*(){try{const{services:r}=yield this.environment;return r[e]}catch(r){throw console.error(r),r}})}}Ol=new WeakMap;const Db="serviceDiscovery";var Nb=globalThis&&globalThis.__awaiter||function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(h){a(h)}}function c(d){try{l(n.throw(d))}catch(h){a(h)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const Vb={name:Db,configure:()=>new Pb({clientCtor:Ob,clientKey:"service_discovery",endpoint:"/_discovery/environments/current"}),initialize:({config:t,requireInstance:e})=>Nb(void 0,void 0,void 0,function*(){const r=yield e("http"),n=yield t.createHttpClientClient(r),i=yield t.createClient(n);return new Rb(i,r)})};class Ub{}class t3 extends Error{constructor(e,r){super(`unsupported version ${e}`,{cause:r}),this.version=e}}const Fb=(t,e)=>{var r;const n=(r=$n[t])!==null&&r!==void 0?r:t;switch(n){case $n.v2:throw new t3(t);case $n.v1:default:{const{id:i}=e,o=new URLSearchParams;return o.append("api-version",n),`/contexts/${i}/?${String(o)}`}}},$b=(t,e,r)=>[Fb(t,e),r],jb=(t,e,r="json")=>(n,i)=>t[r](...$b(e,n,i));var Bb=["eq","ne","gt","ge","lt","le"],cl=["and","or","not"],qb=["any","all"],Gb=["startswith","endswith","contains"],Kb=["expand","levels","select","skip","top","count","orderby","filter"],hm=/\((.*)\)/,um=/(?!indexof)\((\w+)\)/,fm;(function(t){t.sum="sum",t.min="min",t.max="max",t.average="average",t.countdistinct="countdistinct"})(fm||(fm={}));var Sn="";function Wb(t){var e=t===void 0?{}:t,r=e.select,n=e.search,i=e.skiptoken,o=e.format,a=e.top,s=e.skip,c=e.filter,l=e.transform,d=e.orderBy,h=e.key,u=e.count,f=e.expand,v=e.action,g=e.func,x="",m=[],p={};if(h!=null&&(x+="(".concat(vn(h,m),")")),(c||typeof u=="object")&&(p.$filter=sc(typeof u=="object"?u:c,m)),l&&(p.$apply=r3(l)),f&&(p.$expand=Dl(f)),d&&(p.$orderby=$0(d)),u&&(typeof u=="boolean"?p.$count=!0:x+="/$count"),typeof a=="number"&&(p.$top=a),typeof s=="number"&&(p.$skip=s),v&&(x+="/".concat(v)),g){if(typeof g=="string")x+="/".concat(g);else if(typeof g=="object"){var y=Object.keys(g)[0],w=vn(g[y],m);x+="/".concat(y),w!==""&&(x+="(".concat(w,")"))}}return m.length>0&&Object.assign(p,m.reduce(function(T,L){var V;return Object.assign(T,(V={},V["@".concat(L.name)]=vn(L.value),V))},{})),Zb(x,it({$select:r,$search:n,$skiptoken:i,$format:o},p))}function fh(t,e,r){return r===void 0&&(r=[]),"".concat(t," eq ").concat(vn(e,r))}function sc(t,e,r){return t===void 0&&(t={}),e===void 0&&(e=[]),r===void 0&&(r=""),(Array.isArray(t)?t:[t]).reduce(function(o,a){if(a){var s=n(a,e,r);s&&o.push(s)}return o},[]).join(" and ");function n(o,a,s){o===void 0&&(o={}),a===void 0&&(a=[]),s===void 0&&(s="");var c="";if(typeof o=="string")c=o;else if(o&&typeof o=="object"){var l=Object.keys(o).reduce(function(d,h){var u=o[h];if(u===void 0)return d;var f="";if(s?h===Sn?f=s:um.test(h)?f=h.replace(um,function(p,y){return y.trim()===Sn?"(".concat(s,")"):"(".concat(s,"/").concat(y.trim(),")")}):hm.test(h)?f=h.replace(hm,function(p,y){return y.trim()===Sn?"(".concat(s,")"):"(".concat(s,"/").concat(y.trim(),")")}):f="".concat(s,"/").concat(h):f=h,h===Sn&&Array.isArray(u))return d.concat(u.map(function(p){return fh(f,p)}));if(["number","string","boolean"].indexOf(typeof u)!==-1||u instanceof Date||u===null)d.push(fh(f,u,a));else if(Array.isArray(u)){var v=h,g=u.map(function(p){return sc(p,a,s)}).filter(function(p){return p}).map(function(p){return cl.indexOf(v)!==-1?"(".concat(p,")"):p});g.length&&(cl.indexOf(v)!==-1?g.length&&(v==="not"?d.push(pm(g)):d.push("(".concat(g.join(" ".concat(v," ")),")"))):d.push(g.join(" ".concat(v," "))))}else if(cl.indexOf(f)!==-1){var x=f,g=Object.keys(u).map(function(y){var w;return n((w={},w[y]=u[y],w))});g.length&&(x==="not"?d.push(pm(g)):d.push("(".concat(g.join(" ".concat(x," ")),")")))}else if(typeof u=="object")if("type"in u)d.push(fh(f,u,a));else{var m=Object.keys(u);m.forEach(function(p){if(u[p]!==void 0)if(Bb.indexOf(p)!==-1)d.push("".concat(f," ").concat(p," ").concat(vn(u[p],a)));else if(cl.indexOf(p)!==-1)Array.isArray(u[p])?d.push(u[p].map(function(L){return"("+n(L,a,f)+")"}).join(" ".concat(p," "))):d.push("("+n(u[p],a,f)+")");else if(qb.indexOf(p)!==-1){var y=i(h.toLowerCase(),u[p],p,f);y&&d.push(y)}else if(p==="has")d.push("".concat(f," ").concat(p," ").concat(vn(u[p],a)));else if(p==="in"){var w=Array.isArray(u[p])?u[p]:u[p].value.map(function(L){return{type:u[p].type,value:L}});d.push(f+" in ("+w.map(function(L){return vn(L,a)}).join(",")+")")}else if(Gb.indexOf(p)!==-1)d.push("".concat(p,"(").concat(f,",").concat(vn(u[p],a),")"));else{var T=n(u,a,f);T&&d.push(T)}})}else throw new Error("Unexpected value type: ".concat(u));return d},[]);c=l.join(" and ")}return c}function i(o,a,s,c){var l="";if(typeof a=="string"||a instanceof String)l=Yb(o,a,s,c);else if(a){var d=Array.isArray(a)?a.reduce(function(u,f){return f.hasOwnProperty(Sn)?(u.hasOwnProperty(Sn)||(u[Sn]=[]),u[Sn].push(f[Sn]),u):it(it({},u),f)},{}):a,h=n(d,e,o);l="".concat(c,"/").concat(s,"(").concat(h?"".concat(o,":").concat(h):"",")")}return l}}function Yb(t,e,r,n){var i="",o=r=="all"?"ne":"eq";return i="".concat(n,"/").concat(r,"(").concat(t,": ").concat(t," ").concat(o," '").concat(e,"')"),i}function Qb(t){return t=t.replace(/%/g,"%25"),t=t.replace(/\+/g,"%2B"),t=t.replace(/\//g,"%2F"),t=t.replace(/\?/g,"%3F"),t=t.replace(/#/g,"%23"),t=t.replace(/&/g,"%26"),t=t.replace(/'/g,"''"),t}function vn(t,e){if(typeof t=="string")return"'".concat(Qb(t),"'");if(t instanceof Date)return t.toISOString();if(typeof t=="number")return t;if(Array.isArray(t))return"[".concat(t.map(function(r){return vn(r)}).join(","),"]");if(t===null)return t;if(typeof t=="object")switch(t.type){case"raw":case"guid":return t.value;case"duration":return"duration'".concat(t.value,"'");case"binary":return"binary'".concat(t.value,"'");case"alias":return Array.isArray(e)&&e.push(t),"@".concat(t.name);case"json":return escape(JSON.stringify(t.value));case"decimal":return"".concat(t.value,"M");default:return Object.entries(t).filter(function(r){var n=r[1];return n!==void 0}).map(function(r){var n=r[0],i=r[1];return"".concat(n,"=").concat(vn(i,e))}).join(",")}return t}function Dl(t){if(typeof t=="number")return t;if(typeof t=="string")return t.indexOf("/")===-1?t:t.split("/").reverse().reduce(function(r,n,i,o){return i===0?"$expand=".concat(n):i===o.length-1?"".concat(n,"(").concat(r,")"):"$expand=".concat(n,"(").concat(r,")")},"");if(Array.isArray(t))return"".concat(t.map(function(r){return Dl(r)}).join(","));if(typeof t=="object"){var e=Object.keys(t);return e.some(function(r){return Kb.indexOf(r.toLowerCase())!==-1})?e.map(function(r){var n;switch(r){case"filter":n=sc(t[r]);break;case"orderBy":n=$0(t[r]);break;case"levels":case"count":case"skip":case"top":n="".concat(t[r]);break;default:n=Dl(t[r])}return"$".concat(r.toLowerCase(),"=").concat(n)}).join(";"):e.map(function(r){var n=Dl(t[r]);return n?"".concat(r,"(").concat(n,")"):r}).join(",")}return""}function r3(t){var e=Array.isArray(t)?t:[t],r=e.reduce(function(n,i){var o=i.aggregate,a=i.filter,s=i.groupBy,c=X5(i,["aggregate","filter","groupBy"]),l=Object.keys(c);if(l.length)throw new Error("Unsupported transform(s): ".concat(l));if(o&&n.push("aggregate(".concat(Xb(o),")")),a){var d=sc(a);d&&n.push("filter(".concat(sc(d),")"))}return s&&n.push("groupby(".concat(Jb(s),")")),n},[]);return r.join("/")||void 0}function Xb(t){var e=Array.isArray(t)?t:[t];return e.map(function(r){return typeof r=="string"?r:Object.keys(r).map(function(n){var i=r[n];if(!i.with)throw new Error("'with' property required for '".concat(n,"'"));if(!i.as)throw new Error("'as' property required for '".concat(n,"'"));return"".concat(n," with ").concat(i.with," as ").concat(i.as)})}).join(",")}function Jb(t){if(!t.properties)throw new Error("'properties' property required for groupBy");var e="(".concat(t.properties.join(","),")");return t.transform&&(e+=",".concat(r3(t.transform))),e}function $0(t,e){return e===void 0&&(e=""),Array.isArray(t)?t.map(function(r){return Array.isArray(r)&&r.length===2&&["asc","desc"].indexOf(r[1])!==-1?r.join(" "):r}).map(function(r){return"".concat(e).concat(String(r))}).join(","):typeof t=="object"?Object.entries(t).map(function(r){var n=r[0],i=r[1];return $0(i,"".concat(n,"/"))}).map(function(r){return"".concat(e).concat(r)}).join(","):"".concat(e).concat(String(t))}function Zb(t,e){var r=Object.getOwnPropertyNames(e).filter(function(n){return e[n]!==void 0&&e[n]!==""}).map(function(n){return"".concat(n,"=").concat(e[n])});return r.length?"".concat(t,"?").concat(r.join("&")):t}function pm(t){return"not(".concat(t.join(" and "),")")}const ew=t=>Object.keys(t).reduce((e,r)=>{var n;switch(r){case"type":return!((n=t[r])===null||n===void 0)&&n.length?Object.assign(Object.assign({},e),{[r]:{in:t[r]}}):e;default:return Object.assign(Object.assign({},e),{[r]:t[r]})}},{}),tw=t=>Object.keys(t).reduce((e,r)=>{switch(r){case"filter":return Object.assign(Object.assign({},e),{[r]:ew(t.filter)});default:return Object.assign(Object.assign({},e),{[r]:t[r]})}},{}),rw=t=>typeof t=="string"?t:Wb(tw(t)),nw=(t,e)=>{var r;const n=(r=$n[t])!==null&&r!==void 0?r:t;switch(n){case $n.v2:throw new t3(t);case $n.v1:default:{const{query:i,includeDeleted:o}=e,a=new URLSearchParams(rw(i));return a.append("api-version",n),o&&a.append("includeDeleted","true"),`/contexts/?${String(a)}`}}},iw=(t,e,r)=>[nw(t,e),r],ow=(t,e,r="json")=>(n,i)=>t[r](...iw(e,n,i));class aw{get Version(){return $n}constructor(e,r){this._client=e,this._method=r}get(e,...r){return jb(this._client,e,this._method)(...r)}query(e,...r){return ow(this._client,e,this._method)(...r)}}var $n;(function(t){t.v1="1.0",t.v2="2.0"})($n||($n={}));const sw=(t,e)=>{switch(t){case"v1":{const{id:r}=e,n=new URLSearchParams;return n.append("api-version","1.0"),`/bookmarks/${r}/?${String(n)}`}default:{const{id:r}=e,n=new URLSearchParams;return n.append("api-version",t),`/bookmarks/${r}/?${String(n)}`}}},cw=(t,e,r)=>{const n=sw(t,e),i=Object.assign({},{method:"Delete"},r);return[n,i]},lw=(t,e,r="json")=>(n,i)=>t[r](...cw(e,n,i)),dw=lw,hw=(t,e)=>{switch(t){case"v1":{const{id:r}=e,n=new URLSearchParams;return n.append("api-version","1.0"),`/bookmarks/${r}/?${String(n)}`}default:{const{id:r}=e,n=new URLSearchParams;return n.append("api-version",t),`/bookmarks/${r}/?${String(n)}`}}},uw=(t,e,r)=>[hw(t,e),r],fw=(t,e,r="json")=>(n,i)=>t[r](...uw(e,n,i)),pw=fw,mw=(t,e)=>{switch(t){case"v1":{const r=new URLSearchParams;return r.append("api-version","1.0"),`/bookmarks?${String(r)}`}default:{const r=new URLSearchParams;return r.append("api-version",t),`/bookmarks?${String(r)}`}}},vw=(t,e,r)=>{const n=mw(t),i=new Headers;i.append("content-type","application/json");const o=Object.assign({},{method:"post",body:JSON.stringify(e),headers:i},r);return[n,o]},gw=(t,e,r="json")=>(n,i)=>t[r](...vw(e,n,i)),yw=gw;class _w{constructor(e,r){this._client=e,this._method=r}get(e,...r){return pw(this._client,e,this._method)(...r)}post(e,...r){return yw(this._client,e,this._method)(...r)}delete(e,...r){return dw(this._client,e,this._method)(...r)}}const bw=_w;var mm=globalThis&&globalThis.__awaiter||function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(h){a(h)}}function c(d){try{l(n.throw(d))}catch(h){a(h)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};class ww{constructor({createClient:e}){this._createClientFn=e}createBookmarksClient(e){return mm(this,void 0,void 0,function*(){const r=yield this._createClientFn("bookmarks");return new bw(r,e)})}createContextClient(e){return mm(this,void 0,void 0,function*(){const r=yield this._createClientFn("context");return new aw(r,e)})}}var n3=globalThis&&globalThis.__awaiter||function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(h){a(h)}}function c(d){try{l(n.throw(d))}catch(h){a(h)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const xw="services",Ew=(t,e)=>r=>n3(void 0,void 0,void 0,function*(){if(t.hasClient(r))return t.createClient(r);if(e)return e.createClient(r);throw Error(`failed to create http client for service ${r}`)}),Cw={name:xw,configure:()=>new Ub,initialize:({ref:t,config:e,requireInstance:r,hasModule:n})=>n3(void 0,void 0,void 0,function*(){if(!e.createClient){const i=yield r("http"),o=n("serviceDiscovery")?yield r("serviceDiscovery"):t==null?void 0:t.serviceDiscovery;e.createClient=Ew(i,o)}if(!e.createClient)throw Error("missing configuration for creating API client");return new ww(e)})},zw=Cw;class Sw extends W7{constructor(){super([ty,Ug,I0,Vb,zw,Ib,Cb]),this.logger=new Q5("FrameworkConfigurator")}configureHttp(...e){this.addConfig(fy(...e))}configureHttpClient(...e){this.addConfig(zg(...e))}configureMsal(...e){this.addConfig(S_(...e))}configureServiceDiscovery(e){this.configureHttpClient("service_discovery",e.client)}}var kw=globalThis&&globalThis.__awaiter||function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(h){a(h)}}function c(d){try{l(n.throw(d))}catch(h){a(h)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const Tw=(t,e)=>kw(void 0,void 0,void 0,function*(){const r=yield t.initialize(e),n={modules:r};return window.Fusion=n,r.event.dispatchEvent("onFrameworkLoaded",{detail:n}),n});var c1={exports:{}},l1={};/**
62
62
  * @license React
63
63
  * react-jsx-runtime.production.min.js
64
64
  *