@equinor/fusion-framework-cli 9.0.1 → 9.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Change Log
2
2
 
3
+ ## 9.0.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies []:
8
+ - @equinor/fusion-framework-app@7.1.4
9
+
3
10
  ## 9.0.1
4
11
 
5
12
  ### Patch Changes
@@ -67,7 +67,7 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
67
67
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
68
68
  PERFORMANCE OF THIS SOFTWARE.
69
69
  ***************************************************************************** */var Cv=function(t,e){return Cv=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])},Cv(t,e)};function Yn(t,e){Cv(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var lr=function(){return lr=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},lr.apply(this,arguments)};function ge(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(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})}function ye(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 G2(){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 v6.4.0 2022-06-06 */var D={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",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",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"},e5=[D.OPENID_SCOPE,D.PROFILE_SCOPE,D.OFFLINE_ACCESS_SCOPE],d6=G2(e5,[D.EMAIL_SCOPE]),Eo;(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"})(Eo||(Eo={}));var gr;(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"})(gr||(gr={}));var $f;(function(t){t.COMMON="common",t.ORGANIZATIONS="organizations",t.CONSUMERS="consumers"})($f||($f={}));var we;(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"})(we||(we={}));var Dc;(function(t){t.ACCESS_TOKEN="access_token",t.XMS_CC="xms_cc"})(Dc||(Dc={}));var ys={LOGIN:"login",SELECT_ACCOUNT:"select_account",CONSENT:"consent",NONE:"none",CREATE:"create"},Yd;(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"})(Yd||(Yd={}));var u6={PLAIN:"plain",S256:"S256"},Df;(function(t){t.QUERY="query",t.FRAGMENT="fragment",t.FORM_POST="form_post"})(Df||(Df={}));var Nf;(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"})(Nf||(Nf={}));var co;(function(t){t.MSSTS_ACCOUNT_TYPE="MSSTS",t.ADFS_ACCOUNT_TYPE="ADFS",t.MSAV1_ACCOUNT_TYPE="MSA",t.GENERIC_ACCOUNT_TYPE="Generic"})(co||(co={}));var wn;(function(t){t.CACHE_KEY_SEPARATOR="-",t.CLIENT_INFO_SEPARATOR="."})(wn||(wn={}));var Ze;(function(t){t.ID_TOKEN="IdToken",t.ACCESS_TOKEN="AccessToken",t.ACCESS_TOKEN_WITH_AUTH_SCHEME="AccessToken_With_AuthScheme",t.REFRESH_TOKEN="RefreshToken"})(Ze||(Ze={}));var _s;(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"})(_s||(_s={}));var bo;(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"})(bo||(bo={}));var Sv="appmetadata",jZ="client_info",Vf="1",Xd={CACHE_KEY:"authority-metadata",REFRESH_TIME_SECONDS:3600*24},Hi;(function(t){t.CONFIG="config",t.CACHE="cache",t.NETWORK="network"})(Hi||(Hi={}));var mr={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"},Zt;(function(t){t.BEARER="Bearer",t.POP="pop",t.SSH="ssh-cert"})(Zt||(Zt={}));var Qd={DEFAULT_THROTTLE_TIME_SECONDS:60,DEFAULT_MAX_THROTTLE_TIME_SECONDS:3600,THROTTLING_PREFIX:"throttling",X_MS_LIB_CAPABILITY_VALUE:"retry-after, h429"},h6={INVALID_GRANT_ERROR:"invalid_grant",CLIENT_MISMATCH_ERROR:"client_mismatch"},Ff;(function(t){t.username="username",t.password="password"})(Ff||(Ff={}));var Nc;(function(t){t[t.httpSuccess=200]="httpSuccess",t[t.httpBadRequest=400]="httpBadRequest"})(Nc||(Nc={}));var Jo;(function(t){t.FAILED_AUTO_DETECTION="1",t.INTERNAL_CACHE="2",t.ENVIRONMENT_VARIABLE="3",t.IMDS="4"})(Jo||(Jo={}));var ns;(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"})(ns||(ns={}));var ls;(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"})(ls||(ls={}));var f6;(function(t){t.Jwt="JWT",t.Jwk="JWK"})(f6||(f6={}));/*! @azure/msal-common v6.4.0 2022-06-06 */var p6={unexpectedError:{code:"unexpected_error",desc:"Unexpected error in authentication."}},me=function(t){Yn(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||D.EMPTY_STRING,o.errorMessage=n||D.EMPTY_STRING,o.subError=i||D.EMPTY_STRING,o.name="AuthError",o}return e.prototype.setCorrelationId=function(r){this.correlationId=r},e.createUnexpectedError=function(r){return new e(p6.unexpectedError.code,p6.unexpectedError.desc+": "+r)},e}(Error);/*! @azure/msal-common v6.4.0 2022-06-06 */var zf={createNewGuid:function(){var t="Crypto interface - createNewGuid() has not been implemented";throw me.createUnexpectedError(t)},base64Decode:function(){var t="Crypto interface - base64Decode() has not been implemented";throw me.createUnexpectedError(t)},base64Encode:function(){var t="Crypto interface - base64Encode() has not been implemented";throw me.createUnexpectedError(t)},generatePkceCodes:function(){return ge(this,void 0,void 0,function(){var t;return ye(this,function(e){throw t="Crypto interface - generatePkceCodes() has not been implemented",me.createUnexpectedError(t)})})},getPublicKeyThumbprint:function(){return ge(this,void 0,void 0,function(){var t;return ye(this,function(e){throw t="Crypto interface - getPublicKeyThumbprint() has not been implemented",me.createUnexpectedError(t)})})},removeTokenBindingKey:function(){return ge(this,void 0,void 0,function(){var t;return ye(this,function(e){throw t="Crypto interface - removeTokenBindingKey() has not been implemented",me.createUnexpectedError(t)})})},clearKeystore:function(){return ge(this,void 0,void 0,function(){var t;return ye(this,function(e){throw t="Crypto interface - clearKeystore() has not been implemented",me.createUnexpectedError(t)})})},signJwt:function(){return ge(this,void 0,void 0,function(){var t;return ye(this,function(e){throw t="Crypto interface - signJwt() has not been implemented",me.createUnexpectedError(t)})})},hashString:function(){return ge(this,void 0,void 0,function(){var t;return ye(this,function(e){throw t="Crypto interface - hashString() has not been implemented",me.createUnexpectedError(t)})})}};/*! @azure/msal-common v6.4.0 2022-06-06 */var G={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"},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."}},de=function(t){Yn(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(G.clientInfoDecodingError.code,G.clientInfoDecodingError.desc+" Failed with error: "+r)},e.createClientInfoEmptyError=function(){return new e(G.clientInfoEmptyError.code,""+G.clientInfoEmptyError.desc)},e.createTokenParsingError=function(r){return new e(G.tokenParsingError.code,G.tokenParsingError.desc+" Failed with error: "+r)},e.createTokenNullOrEmptyError=function(r){return new e(G.nullOrEmptyToken.code,G.nullOrEmptyToken.desc+" Raw Token Value: "+r)},e.createEndpointDiscoveryIncompleteError=function(r){return new e(G.endpointResolutionError.code,G.endpointResolutionError.desc+" Detail: "+r)},e.createNetworkError=function(r,n){return new e(G.networkError.code,G.networkError.desc+" | Fetch client threw: "+n+" | Attempted to reach: "+r.split("?")[0])},e.createUnableToGetOpenidConfigError=function(r){return new e(G.unableToGetOpenidConfigError.code,G.unableToGetOpenidConfigError.desc+" Attempted to retrieve endpoints from: "+r)},e.createHashNotDeserializedError=function(r){return new e(G.hashNotDeserialized.code,G.hashNotDeserialized.desc+" Given Object: "+r)},e.createInvalidStateError=function(r,n){return new e(G.invalidStateError.code,G.invalidStateError.desc+" Invalid State: "+r+", Root Err: "+n)},e.createStateMismatchError=function(){return new e(G.stateMismatchError.code,G.stateMismatchError.desc)},e.createStateNotFoundError=function(r){return new e(G.stateNotFoundError.code,G.stateNotFoundError.desc+": "+r)},e.createNonceMismatchError=function(){return new e(G.nonceMismatchError.code,G.nonceMismatchError.desc)},e.createNonceNotFoundError=function(r){return new e(G.nonceNotFoundError.code,G.nonceNotFoundError.desc+": "+r)},e.createMultipleMatchingTokensInCacheError=function(){return new e(G.multipleMatchingTokens.code,G.multipleMatchingTokens.desc+".")},e.createMultipleMatchingAccountsInCacheError=function(){return new e(G.multipleMatchingAccounts.code,G.multipleMatchingAccounts.desc)},e.createMultipleMatchingAppMetadataInCacheError=function(){return new e(G.multipleMatchingAppMetadata.code,G.multipleMatchingAppMetadata.desc)},e.createTokenRequestCannotBeMadeError=function(){return new e(G.tokenRequestCannotBeMade.code,G.tokenRequestCannotBeMade.desc)},e.createAppendEmptyScopeToSetError=function(r){return new e(G.appendEmptyScopeError.code,G.appendEmptyScopeError.desc+" Given Scope: "+r)},e.createRemoveEmptyScopeFromSetError=function(r){return new e(G.removeEmptyScopeError.code,G.removeEmptyScopeError.desc+" Given Scope: "+r)},e.createAppendScopeSetError=function(r){return new e(G.appendScopeSetError.code,G.appendScopeSetError.desc+" Detail Error: "+r)},e.createEmptyInputScopeSetError=function(){return new e(G.emptyInputScopeSetError.code,""+G.emptyInputScopeSetError.desc)},e.createDeviceCodeCancelledError=function(){return new e(G.DeviceCodePollingCancelled.code,""+G.DeviceCodePollingCancelled.desc)},e.createDeviceCodeExpiredError=function(){return new e(G.DeviceCodeExpired.code,""+G.DeviceCodeExpired.desc)},e.createDeviceCodeUnknownError=function(){return new e(G.DeviceCodeUnknownError.code,""+G.DeviceCodeUnknownError.desc)},e.createNoAccountInSilentRequestError=function(){return new e(G.NoAccountInSilentRequest.code,""+G.NoAccountInSilentRequest.desc)},e.createNullOrUndefinedCacheRecord=function(){return new e(G.invalidCacheRecord.code,G.invalidCacheRecord.desc)},e.createInvalidCacheEnvironmentError=function(){return new e(G.invalidCacheEnvironment.code,G.invalidCacheEnvironment.desc)},e.createNoAccountFoundError=function(){return new e(G.noAccountFound.code,G.noAccountFound.desc)},e.createCachePluginError=function(){return new e(G.CachePluginError.code,""+G.CachePluginError.desc)},e.createNoCryptoObjectError=function(r){return new e(G.noCryptoObj.code,""+G.noCryptoObj.desc+r)},e.createInvalidCacheTypeError=function(){return new e(G.invalidCacheType.code,""+G.invalidCacheType.desc)},e.createUnexpectedAccountTypeError=function(){return new e(G.unexpectedAccountType.code,""+G.unexpectedAccountType.desc)},e.createUnexpectedCredentialTypeError=function(){return new e(G.unexpectedCredentialType.code,""+G.unexpectedCredentialType.desc)},e.createInvalidAssertionError=function(){return new e(G.invalidAssertion.code,""+G.invalidAssertion.desc)},e.createInvalidCredentialError=function(){return new e(G.invalidClientCredential.code,""+G.invalidClientCredential.desc)},e.createRefreshRequiredError=function(){return new e(G.tokenRefreshRequired.code,G.tokenRefreshRequired.desc)},e.createUserTimeoutReachedError=function(){return new e(G.userTimeoutReached.code,G.userTimeoutReached.desc)},e.createTokenClaimsRequiredError=function(){return new e(G.tokenClaimsRequired.code,G.tokenClaimsRequired.desc)},e.createNoAuthCodeInServerResponseError=function(){return new e(G.noAuthorizationCodeFromServer.code,G.noAuthorizationCodeFromServer.desc)},e.createBindingKeyNotRemovedError=function(){return new e(G.bindingKeyNotRemovedError.code,G.bindingKeyNotRemovedError.desc)},e.createLogoutNotSupportedError=function(){return new e(G.logoutNotSupported.code,G.logoutNotSupported.desc)},e.createKeyIdMissingError=function(){return new e(G.keyIdMissing.code,G.keyIdMissing.desc)},e}(me);/*! @azure/msal-common v6.4.0 2022-06-06 */var ie=function(){function t(){}return t.decodeAuthToken=function(e){if(t.isEmpty(e))throw de.createTokenNullOrEmptyError(e);var r=/^([^\.\s]*)\.([^\.\s]+)\.([^\.\s]*)$/,n=r.exec(e);if(!n||n.length<4)throw de.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 v6.4.0 2022-06-06 */var $t;(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"})($t||($t={}));var t5=function(){function t(e,r,n){this.level=$t.Info;var i=function(){};this.localCallback=e.loggerCallback||i,this.piiLoggingEnabled=e.piiLoggingEnabled||!1,this.level=typeof e.logLevel=="number"?e.logLevel:$t.Info,this.correlationId=e.correlationId||D.EMPTY_STRING,this.packageName=r||D.EMPTY_STRING,this.packageVersion=n||D.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;ie.isEmpty(r.correlationId)?ie.isEmpty(this.correlationId)?i="["+n+"]":i="["+n+"] : ["+this.correlationId+"]":i="["+n+"] : ["+r.correlationId+"]";var o=i+" : "+this.packageName+"@"+this.packageVersion+" : "+$t[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:$t.Error,containsPii:!1,correlationId:r||D.EMPTY_STRING})},t.prototype.errorPii=function(e,r){this.logMessage(e,{logLevel:$t.Error,containsPii:!0,correlationId:r||D.EMPTY_STRING})},t.prototype.warning=function(e,r){this.logMessage(e,{logLevel:$t.Warning,containsPii:!1,correlationId:r||D.EMPTY_STRING})},t.prototype.warningPii=function(e,r){this.logMessage(e,{logLevel:$t.Warning,containsPii:!0,correlationId:r||D.EMPTY_STRING})},t.prototype.info=function(e,r){this.logMessage(e,{logLevel:$t.Info,containsPii:!1,correlationId:r||D.EMPTY_STRING})},t.prototype.infoPii=function(e,r){this.logMessage(e,{logLevel:$t.Info,containsPii:!0,correlationId:r||D.EMPTY_STRING})},t.prototype.verbose=function(e,r){this.logMessage(e,{logLevel:$t.Verbose,containsPii:!1,correlationId:r||D.EMPTY_STRING})},t.prototype.verbosePii=function(e,r){this.logMessage(e,{logLevel:$t.Verbose,containsPii:!0,correlationId:r||D.EMPTY_STRING})},t.prototype.trace=function(e,r){this.logMessage(e,{logLevel:$t.Trace,containsPii:!1,correlationId:r||D.EMPTY_STRING})},t.prototype.tracePii=function(e,r){this.logMessage(e,{logLevel:$t.Trace,containsPii:!0,correlationId:r||D.EMPTY_STRING})},t.prototype.isPiiLoggingEnabled=function(){return this.piiLoggingEnabled||!1},t}();/*! @azure/msal-common v6.4.0 2022-06-06 */var UZ="@azure/msal-common",Tx="6.4.0";/*! @azure/msal-common v6.4.0 2022-06-06 */var jf;(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"})(jf||(jf={}));/*! @azure/msal-common v6.4.0 2022-06-06 */var Cu=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 Ze.ID_TOKEN:return bo.ID_TOKEN;case Ze.ACCESS_TOKEN:case Ze.ACCESS_TOKEN_WITH_AUTH_SCHEME:return bo.ACCESS_TOKEN;case Ze.REFRESH_TOKEN:return bo.REFRESH_TOKEN;default:throw de.createUnexpectedCredentialTypeError()}},t.getCredentialType=function(e){return e.indexOf(Ze.ACCESS_TOKEN.toLowerCase())!==-1?e.indexOf(Ze.ACCESS_TOKEN_WITH_AUTH_SCHEME.toLowerCase())!==-1?Ze.ACCESS_TOKEN_WITH_AUTH_SCHEME:Ze.ACCESS_TOKEN:e.indexOf(Ze.ID_TOKEN.toLowerCase())!==-1?Ze.ID_TOKEN:e.indexOf(Ze.REFRESH_TOKEN.toLowerCase())!==-1?Ze.REFRESH_TOKEN:D.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(wn.CACHE_KEY_SEPARATOR).toLowerCase()},t.generateAccountIdForCacheKey=function(e,r){var n=[e,r];return n.join(wn.CACHE_KEY_SEPARATOR).toLowerCase()},t.generateCredentialIdForCacheKey=function(e,r,n,i){var o=e===Ze.REFRESH_TOKEN&&i||r,a=[e,o,n||D.EMPTY_STRING];return a.join(wn.CACHE_KEY_SEPARATOR).toLowerCase()},t.generateTargetForCacheKey=function(e){return(e||D.EMPTY_STRING).toLowerCase()},t.generateClaimsHashForCacheKey=function(e){return(e||D.EMPTY_STRING).toLowerCase()},t.generateSchemeForCacheKey=function(e){return e&&e.toLowerCase()!==Zt.BEARER.toLowerCase()?e.toLowerCase():D.EMPTY_STRING},t}();/*! @azure/msal-common v6.4.0 2022-06-06 */var be={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' and 'none'. 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"}},pt=function(t){Yn(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(be.redirectUriNotSet.code,be.redirectUriNotSet.desc)},e.createPostLogoutRedirectUriEmptyError=function(){return new e(be.postLogoutUriNotSet.code,be.postLogoutUriNotSet.desc)},e.createClaimsRequestParsingError=function(r){return new e(be.claimsRequestParsingError.code,be.claimsRequestParsingError.desc+" Given value: "+r)},e.createInsecureAuthorityUriError=function(r){return new e(be.authorityUriInsecure.code,be.authorityUriInsecure.desc+" Given URI: "+r)},e.createUrlParseError=function(r){return new e(be.urlParseError.code,be.urlParseError.desc+" Given Error: "+r)},e.createUrlEmptyError=function(){return new e(be.urlEmptyError.code,be.urlEmptyError.desc)},e.createEmptyScopesArrayError=function(){return new e(be.emptyScopesError.code,""+be.emptyScopesError.desc)},e.createClientIdSingleScopeError=function(r){return new e(be.clientIdSingleScopeError.code,be.clientIdSingleScopeError.desc+" Given Scopes: "+r)},e.createInvalidPromptError=function(r){return new e(be.invalidPrompt.code,be.invalidPrompt.desc+" Given value: "+r)},e.createInvalidClaimsRequestError=function(){return new e(be.invalidClaimsRequest.code,be.invalidClaimsRequest.desc)},e.createEmptyLogoutRequestError=function(){return new e(be.logoutRequestEmptyError.code,be.logoutRequestEmptyError.desc)},e.createEmptyTokenRequestError=function(){return new e(be.tokenRequestEmptyError.code,be.tokenRequestEmptyError.desc)},e.createInvalidCodeChallengeMethodError=function(){return new e(be.invalidCodeChallengeMethod.code,be.invalidCodeChallengeMethod.desc)},e.createInvalidCodeChallengeParamsError=function(){return new e(be.invalidCodeChallengeParams.code,be.invalidCodeChallengeParams.desc)},e.createInvalidCloudDiscoveryMetadataError=function(){return new e(be.invalidCloudDiscoveryMetadata.code,be.invalidCloudDiscoveryMetadata.desc)},e.createInvalidAuthorityMetadataError=function(){return new e(be.invalidAuthorityMetadata.code,be.invalidAuthorityMetadata.desc)},e.createUntrustedAuthorityError=function(){return new e(be.untrustedAuthority.code,be.untrustedAuthority.desc)},e.createInvalidAzureCloudInstanceError=function(){return new e(be.invalidAzureCloudInstance.code,be.invalidAzureCloudInstance.desc)},e.createMissingSshJwkError=function(){return new e(be.missingSshJwk.code,be.missingSshJwk.desc)},e.createMissingSshKidError=function(){return new e(be.missingSshKid.code,be.missingSshKid.desc)},e.createMissingNonceAuthenticationHeadersError=function(){return new e(be.missingNonceAuthenticationHeader.code,be.missingNonceAuthenticationHeader.desc)},e.createInvalidAuthenticationHeaderError=function(r,n){return new e(be.invalidAuthenticationHeader.code,be.invalidAuthenticationHeader.desc+". Invalid header: "+r+". Details: "+n)},e}(de);/*! @azure/msal-common v6.4.0 2022-06-06 */var Fi=function(){function t(e){var r=this,n=e?ie.trimArrayEntries(G2(e)):[],i=n?ie.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||D.EMPTY_STRING,n=r.split(" ");return new t(n)},t.prototype.validateInputScopes=function(e){if(!e||e.length<1)throw pt.createEmptyScopesArrayError()},t.prototype.containsScope=function(e){var r=this.printScopesLowerCase().split(" "),n=new t(r);return ie.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 d6.forEach(function(n){e.containsScope(n)&&(r+=1)}),this.scopes.size===r},t.prototype.appendScope=function(e){ie.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 de.createAppendScopeSetError(n)}},t.prototype.removeScope=function(e){if(ie.isEmpty(e))throw de.createRemoveEmptyScopeFromSetError(e);this.scopes.delete(e.trim())},t.prototype.removeOIDCScopes=function(){var e=this;d6.forEach(function(r){e.scopes.delete(r)})},t.prototype.unionScopeSets=function(e){if(!e)throw de.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 de.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 D.EMPTY_STRING},t.prototype.printScopesLowerCase=function(){return this.printScopes().toLowerCase()},t}();/*! @azure/msal-common v6.4.0 2022-06-06 */function Uf(t,e){if(ie.isEmpty(t))throw de.createClientInfoEmptyError();try{var r=e.base64Decode(t);return JSON.parse(r)}catch(n){throw de.createClientInfoDecodingError(n)}}function Jd(t){if(ie.isEmpty(t))throw de.createClientInfoDecodingError("Home account ID was empty.");var e=t.split(wn.CLIENT_INFO_SEPARATOR,2);return{uid:e[0],utid:e.length<2?D.EMPTY_STRING:e[1]}}/*! @azure/msal-common v6.4.0 2022-06-06 */var ha;(function(t){t[t.Default=0]="Default",t[t.Adfs=1]="Adfs"})(ha||(ha={}));/*! @azure/msal-common v6.4.0 2022-06-06 */var sn=function(){function t(){}return t.prototype.generateAccountId=function(){var e=[this.homeAccountId,this.environment];return e.join(wn.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 co.ADFS_ACCOUNT_TYPE:return bo.ADFS;case co.MSAV1_ACCOUNT_TYPE:return bo.MSA;case co.MSSTS_ACCOUNT_TYPE:return bo.MSSTS;case co.GENERIC_ACCOUNT_TYPE:return bo.GENERIC;default:throw de.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||D.EMPTY_STRING,e.tenantId||D.EMPTY_STRING];return r.join(wn.CACHE_KEY_SEPARATOR).toLowerCase()},t.createAccount=function(e,r,n,i,o,a,s,c,l){var d,u,h,f,p,m,w=new t;w.authorityType=co.MSSTS_ACCOUNT_TYPE,w.clientInfo=e,w.homeAccountId=r,w.nativeAccountId=l;var v=c||i&&i.getPreferredCache();if(!v)throw de.createInvalidCacheEnvironmentError();return w.environment=v,w.realm=((d=n==null?void 0:n.claims)===null||d===void 0?void 0:d.tid)||D.EMPTY_STRING,w.oboAssertion=o,n&&(w.idTokenClaims=n.claims,w.localAccountId=((u=n==null?void 0:n.claims)===null||u===void 0?void 0:u.oid)||((h=n==null?void 0:n.claims)===null||h===void 0?void 0:h.sub)||D.EMPTY_STRING,w.username=((f=n==null?void 0:n.claims)===null||f===void 0?void 0:f.preferred_username)||(!((p=n==null?void 0:n.claims)===null||p===void 0)&&p.emails?n.claims.emails[0]:D.EMPTY_STRING),w.name=(m=n==null?void 0:n.claims)===null||m===void 0?void 0:m.name),w.cloudGraphHostName=a,w.msGraphHost=s,w},t.createGenericAccount=function(e,r,n,i,o,a,s){var c,l,d,u,h=new t;h.authorityType=n&&n.authorityType===ha.Adfs?co.ADFS_ACCOUNT_TYPE:co.GENERIC_ACCOUNT_TYPE,h.homeAccountId=e,h.realm=D.EMPTY_STRING,h.oboAssertion=i;var f=s||n&&n.getPreferredCache();if(!f)throw de.createInvalidCacheEnvironmentError();return r&&(h.localAccountId=((c=r==null?void 0:r.claims)===null||c===void 0?void 0:c.oid)||((l=r==null?void 0:r.claims)===null||l===void 0?void 0:l.sub)||D.EMPTY_STRING,h.username=((d=r==null?void 0:r.claims)===null||d===void 0?void 0:d.upn)||D.EMPTY_STRING,h.name=((u=r==null?void 0:r.claims)===null||u===void 0?void 0:u.name)||D.EMPTY_STRING,h.idTokenClaims=r==null?void 0:r.claims),h.environment=f,h.cloudGraphHostName=o,h.msGraphHost=a,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:D.EMPTY_STRING;if(r===ha.Adfs)return s;if(e)try{var c=Uf(e,i);if(!ie.isEmpty(c.uid)&&!ie.isEmpty(c.utid))return""+c.uid+wn.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 v6.4.0 2022-06-06 */var Zs=function(){function t(e,r){if(ie.isEmpty(e))throw de.createTokenNullOrEmptyError(e);this.rawToken=e,this.claims=t.extractTokenClaims(e,r)}return t.extractTokenClaims=function(e,r){var n=ie.decodeAuthToken(e);try{var i=n.JWSPayload,o=r.base64Decode(i);return JSON.parse(o)}catch(a){throw de.createTokenParsingError(a)}},t}();/*! @azure/msal-common v6.4.0 2022-06-06 */var ai=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 sn,a),c=s.getAccountInfo(),l=e.readIdTokenFromCache(e.clientId,c);return l&&!c.idTokenClaims&&(c.idTokenClaims=new Zs(l.secret,e.cryptoImpl).claims),c});return o},t.prototype.saveCacheRecord=function(e){return ge(this,void 0,void 0,function(){return ye(this,function(r){switch(r.label){case 0:if(!e)throw de.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 ge(this,void 0,void 0,function(){var r,n,i,o,a=this;return ye(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=Fi.fromString(e.target),i=Object.keys(r.accessTokens).map(function(c){return r.accessTokens[c]}),i?(o=[],i.forEach(function(c){var l=Fi.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:D.EMPTY_STRING,e?e.environment:D.EMPTY_STRING,e?e.realm:D.EMPTY_STRING)},t.prototype.getAccountsFilteredByInternal=function(e,r,n){var i=this,o=this.getKeys(),a={};return o.forEach(function(s){var c=i.getAccount(s);c&&(e&&!i.matchHomeAccountId(c,e)||r&&!i.matchEnvironment(c,r)||n&&!i.matchRealm(c,n)||(a[s]=c))}),a},t.prototype.getCredentialsFilteredBy=function(e){return this.getCredentialsFilteredByInternal(e.homeAccountId,e.environment,e.credentialType,e.clientId,e.familyId,e.realm,e.target,e.oboAssertion,e.tokenType,e.keyId,e.requestedClaimsHash)},t.prototype.getCredentialsFilteredByInternal=function(e,r,n,i,o,a,s,c,l,d,u){var h=this,f=this.getKeys(),p={idTokens:{},accessTokens:{},refreshTokens:{}};return f.forEach(function(m){var w=Cu.getCredentialType(m);if(w!==D.NOT_DEFINED){var v=h.getSpecificCredential(m,w);if(v&&!(c&&!h.matchOboAssertion(v,c))&&!(e&&!h.matchHomeAccountId(v,e))&&!(r&&!h.matchEnvironment(v,r))&&!(a&&!h.matchRealm(v,a))&&!(n&&!h.matchCredentialType(v,n))&&!(i&&!h.matchClientId(v,i))&&!(o&&!h.matchFamilyId(v,o))&&!(s&&!h.matchTarget(v,s))&&!((u||v.requestedClaimsHash)&&v.requestedClaimsHash!==u)&&!(n===Ze.ACCESS_TOKEN_WITH_AUTH_SCHEME&&(l&&!h.matchTokenType(v,l)||l===Zt.SSH&&d&&!h.matchKeyId(v,d)))){var g=h.updateCredentialCacheKey(m,v);switch(w){case Ze.ID_TOKEN:p.idTokens[g]=v;break;case Ze.ACCESS_TOKEN:case Ze.ACCESS_TOKEN_WITH_AUTH_SCHEME:p.accessTokens[g]=v;break;case Ze.REFRESH_TOKEN:p.refreshTokens[g]=v;break}}}}),p},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 ge(this,void 0,void 0,function(){var e,r,n=this;return ye(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 ge(this,void 0,void 0,function(){var r;return ye(this,function(n){switch(n.label){case 0:if(r=this.getAccount(e),!r)throw de.createNoAccountFoundError();return[4,this.removeAccountContext(r)];case 1:return[2,n.sent()&&this.removeItem(e,_s.ACCOUNT)]}})})},t.prototype.removeAccountContext=function(e){return ge(this,void 0,void 0,function(){var r,n,i,o=this;return ye(this,function(a){switch(a.label){case 0:return r=this.getKeys(),n=e.generateAccountId(),i=[],r.forEach(function(s){var c=Cu.getCredentialType(s);if(c!==D.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 ge(this,void 0,void 0,function(){var r,n,i;return ye(this,function(o){switch(o.label){case 0:if(r=e.generateCredentialKey(),e.credentialType.toLowerCase()!==Ze.ACCESS_TOKEN_WITH_AUTH_SCHEME.toLowerCase())return[3,4];if(e.tokenType!==Zt.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(),de.createBindingKeyNotRemovedError();case 4:return[2,this.removeItem(r,_s.CREDENTIAL)]}})})},t.prototype.removeAppMetadata=function(){var e=this,r=this.getKeys();return r.forEach(function(n){e.isAppMetadata(n)&&e.removeItem(n,_s.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 Zs(a.secret,this.cryptoImpl).claims),{account:o,idToken:a,accessToken:s,refreshToken:c,appMetadata:l}},t.prototype.readAccountFromCache=function(e){var r=sn.generateAccountCacheKey(e);return this.getAccount(r)},t.prototype.readIdTokenFromCache=function(e,r){var n={homeAccountId:r.homeAccountId,environment:r.environment,credentialType:Ze.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 de.createMultipleMatchingTokensInCacheError();return o[0]},t.prototype.readAccessTokenFromCache=function(e,r,n){var i=new Fi(n.scopes||[]),o=n.authenticationScheme||Zt.BEARER,a=o&&o.toLowerCase()!==Zt.BEARER.toLowerCase()?Ze.ACCESS_TOKEN_WITH_AUTH_SCHEME:Ze.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(u){return c.accessTokens[u]}),d=l.length;if(d<1)return null;if(d>1)throw de.createMultipleMatchingTokensInCacheError();return l[0]},t.prototype.readRefreshTokenFromCache=function(e,r,n){var i=n?Vf:void 0,o={homeAccountId:r.homeAccountId,environment:r.environment,credentialType:Ze.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 de.createMultipleMatchingAppMetadataInCacheError();return o[0]},t.prototype.isAppMetadataFOCI=function(e,r){var n=this.readAppMetadataFromCache(e,r);return!!(n&&n.familyId===Vf)},t.prototype.matchHomeAccountId=function(e,r){return!!(e.homeAccountId&&r===e.homeAccountId)},t.prototype.matchOboAssertion=function(e,r){return!!(e.oboAssertion&&r===e.oboAssertion)},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.matchTarget=function(e,r){var n=e.credentialType!==Ze.ACCESS_TOKEN&&e.credentialType!==Ze.ACCESS_TOKEN_WITH_AUTH_SCHEME;if(n||!e.target)return!1;var i=Fi.fromString(e.target),o=Fi.fromString(r);return o.containsOnlyOIDCScopes()?o.removeScope(D.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(Sv)!==-1},t.prototype.isAuthorityMetadata=function(e){return e.indexOf(Xd.CACHE_KEY)!==-1},t.prototype.generateAuthorityMetadataCacheKey=function(e){return Xd.CACHE_KEY+"-"+this.clientId+"-"+e},t.prototype.getSpecificCredential=function(e,r){switch(r){case Ze.ID_TOKEN:return this.getIdTokenCredential(e);case Ze.ACCESS_TOKEN:case Ze.ACCESS_TOKEN_WITH_AUTH_SCHEME:return this.getAccessTokenCredential(e);case Ze.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}(),BZ=function(t){Yn(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 me.createUnexpectedError(r)},e.prototype.getAccount=function(){var r="Storage interface - getAccount() has not been implemented for the cacheStorage interface.";throw me.createUnexpectedError(r)},e.prototype.setIdTokenCredential=function(){var r="Storage interface - setIdTokenCredential() has not been implemented for the cacheStorage interface.";throw me.createUnexpectedError(r)},e.prototype.getIdTokenCredential=function(){var r="Storage interface - getIdTokenCredential() has not been implemented for the cacheStorage interface.";throw me.createUnexpectedError(r)},e.prototype.setAccessTokenCredential=function(){var r="Storage interface - setAccessTokenCredential() has not been implemented for the cacheStorage interface.";throw me.createUnexpectedError(r)},e.prototype.getAccessTokenCredential=function(){var r="Storage interface - getAccessTokenCredential() has not been implemented for the cacheStorage interface.";throw me.createUnexpectedError(r)},e.prototype.setRefreshTokenCredential=function(){var r="Storage interface - setRefreshTokenCredential() has not been implemented for the cacheStorage interface.";throw me.createUnexpectedError(r)},e.prototype.getRefreshTokenCredential=function(){var r="Storage interface - getRefreshTokenCredential() has not been implemented for the cacheStorage interface.";throw me.createUnexpectedError(r)},e.prototype.setAppMetadata=function(){var r="Storage interface - setAppMetadata() has not been implemented for the cacheStorage interface.";throw me.createUnexpectedError(r)},e.prototype.getAppMetadata=function(){var r="Storage interface - getAppMetadata() has not been implemented for the cacheStorage interface.";throw me.createUnexpectedError(r)},e.prototype.setServerTelemetry=function(){var r="Storage interface - setServerTelemetry() has not been implemented for the cacheStorage interface.";throw me.createUnexpectedError(r)},e.prototype.getServerTelemetry=function(){var r="Storage interface - getServerTelemetry() has not been implemented for the cacheStorage interface.";throw me.createUnexpectedError(r)},e.prototype.setAuthorityMetadata=function(){var r="Storage interface - setAuthorityMetadata() has not been implemented for the cacheStorage interface.";throw me.createUnexpectedError(r)},e.prototype.getAuthorityMetadata=function(){var r="Storage interface - getAuthorityMetadata() has not been implemented for the cacheStorage interface.";throw me.createUnexpectedError(r)},e.prototype.getAuthorityMetadataKeys=function(){var r="Storage interface - getAuthorityMetadataKeys() has not been implemented for the cacheStorage interface.";throw me.createUnexpectedError(r)},e.prototype.setThrottlingCache=function(){var r="Storage interface - setThrottlingCache() has not been implemented for the cacheStorage interface.";throw me.createUnexpectedError(r)},e.prototype.getThrottlingCache=function(){var r="Storage interface - getThrottlingCache() has not been implemented for the cacheStorage interface.";throw me.createUnexpectedError(r)},e.prototype.removeItem=function(){var r="Storage interface - removeItem() has not been implemented for the cacheStorage interface.";throw me.createUnexpectedError(r)},e.prototype.containsKey=function(){var r="Storage interface - containsKey() has not been implemented for the cacheStorage interface.";throw me.createUnexpectedError(r)},e.prototype.getKeys=function(){var r="Storage interface - getKeys() has not been implemented for the cacheStorage interface.";throw me.createUnexpectedError(r)},e.prototype.clear=function(){return ge(this,void 0,void 0,function(){var r;return ye(this,function(n){throw r="Storage interface - clear() has not been implemented for the cacheStorage interface.",me.createUnexpectedError(r)})})},e.prototype.updateCredentialCacheKey=function(){var r="Storage interface - updateCredentialCacheKey() has not been implemented for the cacheStorage interface.";throw me.createUnexpectedError(r)},e}(ai);/*! @azure/msal-common v6.4.0 2022-06-06 */var WZ=300,Ix={tokenRenewalOffsetSeconds:WZ,preventCorsPreflight:!1,proxyUrl:D.EMPTY_STRING},qZ={loggerCallback:function(){},piiLoggingEnabled:!1,logLevel:$t.Info,correlationId:D.EMPTY_STRING},GZ={sendGetRequestAsync:function(){return ge(this,void 0,void 0,function(){var t;return ye(this,function(e){throw t="Network interface - sendGetRequestAsync() has not been implemented",me.createUnexpectedError(t)})})},sendPostRequestAsync:function(){return ge(this,void 0,void 0,function(){var t;return ye(this,function(e){throw t="Network interface - sendPostRequestAsync() has not been implemented",me.createUnexpectedError(t)})})}},KZ={sku:D.SKU,version:Tx,cpu:D.EMPTY_STRING,os:D.EMPTY_STRING},YZ={clientSecret:D.EMPTY_STRING,clientAssertion:void 0},XZ={azureCloudInstance:jf.None,tenant:""+D.DEFAULT_COMMON_TENANT},QZ={application:{appName:"",appVersion:""}};function JZ(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,u=t.persistencePlugin,h=t.serializableCache,f=lr(lr({},qZ),n);return{authOptions:eH(e),systemOptions:lr(lr({},Ix),r),loggerOptions:f,storageInterface:i||new BZ(e.clientId,zf),networkInterface:o||GZ,cryptoInterface:a||zf,clientCredentials:s||YZ,libraryInfo:lr(lr({},KZ),c),telemetry:lr(lr({},QZ),l),serverTelemetryManager:d||null,persistencePlugin:u||null,serializableCache:h||null}}function eH(t){return lr({clientCapabilities:[],azureCloudOptions:XZ},t)}/*! @azure/msal-common v6.4.0 2022-06-06 */var Su=function(t){Yn(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}(me);/*! @azure/msal-common v6.4.0 2022-06-06 */var Bf=function(){function t(){}return t.generateThrottlingStorageKey=function(e){return Qd.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,_s.THROTTLING);return}throw new Su(((n=o.errorCodes)===null||n===void 0?void 0:n.join(" "))||D.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[Eo.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(Eo.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||Qd.DEFAULT_THROTTLE_TIME_SECONDS),n+Qd.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,_s.THROTTLING)},t}();/*! @azure/msal-common v6.4.0 2022-06-06 */var tH=function(){function t(e,r){this.networkClient=e,this.cacheManager=r}return t.prototype.sendPostRequest=function(e,r,n){return ge(this,void 0,void 0,function(){var i,o;return ye(this,function(a){switch(a.label){case 0:Bf.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 me?o:de.createNetworkError(r,o);case 4:return Bf.postProcess(this.cacheManager,e,i),[2,i]}})})},t}();/*! @azure/msal-common v6.4.0 2022-06-06 */var _n;(function(t){t.HOME_ACCOUNT_ID="home_account_id",t.UPN="UPN"})(_n||(_n={}));/*! @azure/msal-common v6.4.0 2022-06-06 */var r5=function(){function t(e){this.config=JZ(e),this.logger=new t5(this.config.loggerOptions,UZ,Tx),this.cryptoUtils=this.config.cryptoInterface,this.cacheManager=this.config.storageInterface,this.networkClient=this.config.networkInterface,this.networkManager=new tH(this.networkClient,this.cacheManager),this.serverTelemetryManager=this.config.serverTelemetryManager,this.authority=this.config.authOptions.authority}return t.prototype.createTokenRequestHeaders=function(e){var r={};if(r[Eo.CONTENT_TYPE]=D.URL_FORM_CONTENT_TYPE,!this.config.systemOptions.preventCorsPreflight&&e)switch(e.type){case _n.HOME_ACCOUNT_ID:try{var n=Jd(e.credential);r[Eo.CCS_HEADER]="Oid:"+n.uid+"@"+n.utid}catch(i){this.logger.verbose("Could not parse home account ID for CCS Header: "+i)}break;case _n.UPN:r[Eo.CCS_HEADER]="UPN: "+e.credential;break}return r},t.prototype.executePostToTokenEndpoint=function(e,r,n,i){return ge(this,void 0,void 0,function(){var o;return ye(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 de.createEndpointDiscoveryIncompleteError("Updated authority has not completed endpoint discovery.");this.authority=e},t}();/*! @azure/msal-common v6.4.0 2022-06-06 */var Wa=function(){function t(){}return t.validateRedirectUri=function(e){if(ie.isEmpty(e))throw pt.createRedirectUriEmptyError()},t.validatePrompt=function(e){var r=[];for(var n in ys)r.push(ys[n]);if(r.indexOf(e)<0)throw pt.createInvalidPromptError(e)},t.validateClaims=function(e){try{JSON.parse(e)}catch{throw pt.createInvalidClaimsRequestError()}},t.validateCodeChallengeParams=function(e,r){if(ie.isEmpty(e)||ie.isEmpty(r))throw pt.createInvalidCodeChallengeParamsError();this.validateCodeChallengeMethod(r)},t.validateCodeChallengeMethod=function(e){if([u6.PLAIN,u6.S256].indexOf(e)<0)throw pt.createInvalidCodeChallengeMethodError()},t.sanitizeEQParams=function(e,r){return e?(r.forEach(function(n,i){e[i]&&delete e[i]}),e):{}},t}();/*! @azure/msal-common v6.4.0 2022-06-06 */var Vc=function(){function t(){this.parameters=new Map}return t.prototype.addResponseTypeCode=function(){this.parameters.set(we.RESPONSE_TYPE,encodeURIComponent(D.CODE_RESPONSE_TYPE))},t.prototype.addResponseTypeForTokenAndIdToken=function(){this.parameters.set(we.RESPONSE_TYPE,encodeURIComponent(D.TOKEN_RESPONSE_TYPE+" "+D.ID_TOKEN_RESPONSE_TYPE))},t.prototype.addResponseMode=function(e){this.parameters.set(we.RESPONSE_MODE,encodeURIComponent(e||Df.QUERY))},t.prototype.addNativeBroker=function(){this.parameters.set(we.NATIVE_BROKER,encodeURIComponent("1"))},t.prototype.addScopes=function(e,r){r===void 0&&(r=!0);var n=r?G2(e||[],e5):e||[],i=new Fi(n);this.parameters.set(we.SCOPE,encodeURIComponent(i.printScopes()))},t.prototype.addClientId=function(e){this.parameters.set(we.CLIENT_ID,encodeURIComponent(e))},t.prototype.addRedirectUri=function(e){Wa.validateRedirectUri(e),this.parameters.set(we.REDIRECT_URI,encodeURIComponent(e))},t.prototype.addPostLogoutRedirectUri=function(e){Wa.validateRedirectUri(e),this.parameters.set(we.POST_LOGOUT_URI,encodeURIComponent(e))},t.prototype.addIdTokenHint=function(e){this.parameters.set(we.ID_TOKEN_HINT,encodeURIComponent(e))},t.prototype.addDomainHint=function(e){this.parameters.set(Yd.DOMAIN_HINT,encodeURIComponent(e))},t.prototype.addLoginHint=function(e){this.parameters.set(Yd.LOGIN_HINT,encodeURIComponent(e))},t.prototype.addCcsUpn=function(e){this.parameters.set(Eo.CCS_HEADER,encodeURIComponent("UPN:"+e))},t.prototype.addCcsOid=function(e){this.parameters.set(Eo.CCS_HEADER,encodeURIComponent("Oid:"+e.uid+"@"+e.utid))},t.prototype.addSid=function(e){this.parameters.set(Yd.SID,encodeURIComponent(e))},t.prototype.addClaims=function(e,r){var n=this.addClientCapabilitiesToClaims(e,r);Wa.validateClaims(n),this.parameters.set(we.CLAIMS,encodeURIComponent(n))},t.prototype.addCorrelationId=function(e){this.parameters.set(we.CLIENT_REQUEST_ID,encodeURIComponent(e))},t.prototype.addLibraryInfo=function(e){this.parameters.set(we.X_CLIENT_SKU,e.sku),this.parameters.set(we.X_CLIENT_VER,e.version),e.os&&this.parameters.set(we.X_CLIENT_OS,e.os),e.cpu&&this.parameters.set(we.X_CLIENT_CPU,e.cpu)},t.prototype.addApplicationTelemetry=function(e){e!=null&&e.appName&&this.parameters.set(we.X_APP_NAME,e.appName),e!=null&&e.appVersion&&this.parameters.set(we.X_APP_VER,e.appVersion)},t.prototype.addPrompt=function(e){Wa.validatePrompt(e),this.parameters.set(""+we.PROMPT,encodeURIComponent(e))},t.prototype.addState=function(e){ie.isEmpty(e)||this.parameters.set(we.STATE,encodeURIComponent(e))},t.prototype.addNonce=function(e){this.parameters.set(we.NONCE,encodeURIComponent(e))},t.prototype.addCodeChallengeParams=function(e,r){if(Wa.validateCodeChallengeParams(e,r),e&&r)this.parameters.set(we.CODE_CHALLENGE,encodeURIComponent(e)),this.parameters.set(we.CODE_CHALLENGE_METHOD,encodeURIComponent(r));else throw pt.createInvalidCodeChallengeParamsError()},t.prototype.addAuthorizationCode=function(e){this.parameters.set(we.CODE,encodeURIComponent(e))},t.prototype.addDeviceCode=function(e){this.parameters.set(we.DEVICE_CODE,encodeURIComponent(e))},t.prototype.addRefreshToken=function(e){this.parameters.set(we.REFRESH_TOKEN,encodeURIComponent(e))},t.prototype.addCodeVerifier=function(e){this.parameters.set(we.CODE_VERIFIER,encodeURIComponent(e))},t.prototype.addClientSecret=function(e){this.parameters.set(we.CLIENT_SECRET,encodeURIComponent(e))},t.prototype.addClientAssertion=function(e){this.parameters.set(we.CLIENT_ASSERTION,encodeURIComponent(e))},t.prototype.addClientAssertionType=function(e){this.parameters.set(we.CLIENT_ASSERTION_TYPE,encodeURIComponent(e))},t.prototype.addOboAssertion=function(e){this.parameters.set(we.OBO_ASSERTION,encodeURIComponent(e))},t.prototype.addRequestTokenUse=function(e){this.parameters.set(we.REQUESTED_TOKEN_USE,encodeURIComponent(e))},t.prototype.addGrantType=function(e){this.parameters.set(we.GRANT_TYPE,encodeURIComponent(e))},t.prototype.addClientInfo=function(){this.parameters.set(jZ,"1")},t.prototype.addExtraQueryParameters=function(e){var r=this;Wa.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 pt.createInvalidClaimsRequestError()}return r&&r.length>0&&(n.hasOwnProperty(Dc.ACCESS_TOKEN)||(n[Dc.ACCESS_TOKEN]={}),n[Dc.ACCESS_TOKEN][Dc.XMS_CC]={values:r}),JSON.stringify(n)},t.prototype.addUsername=function(e){this.parameters.set(Ff.username,encodeURIComponent(e))},t.prototype.addPassword=function(e){this.parameters.set(Ff.password,encodeURIComponent(e))},t.prototype.addPopToken=function(e){ie.isEmpty(e)||(this.parameters.set(we.TOKEN_TYPE,Zt.POP),this.parameters.set(we.REQ_CNF,encodeURIComponent(e)))},t.prototype.addSshJwk=function(e){ie.isEmpty(e)||(this.parameters.set(we.TOKEN_TYPE,Zt.SSH),this.parameters.set(we.REQ_CNF,encodeURIComponent(e)))},t.prototype.addServerTelemetry=function(e){this.parameters.set(we.X_CLIENT_CURR_TELEM,e.generateCurrentRequestHeaderValue()),this.parameters.set(we.X_CLIENT_LAST_TELEM,e.generateLastRequestHeaderValue())},t.prototype.addThrottling=function(){this.parameters.set(we.X_MS_LIB_CAPABILITY,Qd.X_MS_LIB_CAPABILITY_VALUE)},t.prototype.addLogoutHint=function(e){this.parameters.set(we.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 v6.4.0 2022-06-06 */var Wf=function(t){Yn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.createIdTokenEntity=function(r,n,i,o,a,s){var c=new e;return c.credentialType=Ze.ID_TOKEN,c.homeAccountId=r,c.environment=n,c.clientId=o,c.secret=i,c.realm=a,c.oboAssertion=s,c},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===Ze.ID_TOKEN:!1},e}(Cu);/*! @azure/msal-common v6.4.0 2022-06-06 */var Gi=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 v6.4.0 2022-06-06 */var qf=function(t){Yn(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,u,h,f,p,m,w){var v,g,_=new e;_.homeAccountId=r,_.credentialType=Ze.ACCESS_TOKEN,_.secret=i;var y=Gi.nowSeconds();if(_.cachedAt=y.toString(),_.expiresOn=c.toString(),_.extendedExpiresOn=l.toString(),u&&(_.refreshOn=u.toString()),_.environment=n,_.clientId=o,_.realm=a,_.target=s,_.oboAssertion=f,_.tokenType=ie.isEmpty(h)?Zt.BEARER:h,m&&(_.requestedClaims=m,_.requestedClaimsHash=w),((v=_.tokenType)===null||v===void 0?void 0:v.toLowerCase())!==Zt.BEARER.toLowerCase())switch(_.credentialType=Ze.ACCESS_TOKEN_WITH_AUTH_SCHEME,_.tokenType){case Zt.POP:var C=Zs.extractTokenClaims(i,d);if(!(!((g=C==null?void 0:C.cnf)===null||g===void 0)&&g.kid))throw de.createTokenClaimsRequiredError();_.keyId=C.cnf.kid;break;case Zt.SSH:_.keyId=p}return _},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===Ze.ACCESS_TOKEN||r.credentialType===Ze.ACCESS_TOKEN_WITH_AUTH_SCHEME):!1},e}(Cu);/*! @azure/msal-common v6.4.0 2022-06-06 */var kv=function(t){Yn(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=Ze.REFRESH_TOKEN,c.environment=n,c.homeAccountId=r,c.secret=i,c.oboAssertion=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===Ze.REFRESH_TOKEN:!1},e}(Cu);/*! @azure/msal-common v6.4.0 2022-06-06 */var m6=["interaction_required","consent_required","login_required"],rH=["message_only","additional_action","basic_action","user_password_expired","consent_required"],Av={noTokensFoundError:{code:"no_tokens_found",desc:"No refresh token found in the cache. Please sign-in."}},ds=function(t){Yn(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&&m6.indexOf(r)>-1,a=!!i&&rH.indexOf(i)>-1,s=!!n&&m6.some(function(c){return n.indexOf(c)>-1});return o||s||a},e.createNoTokensFoundError=function(){return new e(Av.noTokensFoundError.code,Av.noTokensFoundError.desc)},e}(me);/*! @azure/msal-common v6.4.0 2022-06-06 */var nH=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 v6.4.0 2022-06-06 */var el=function(){function t(){}return t.setRequestState=function(e,r,n){var i=t.generateLibraryState(e,n);return ie.isEmpty(r)?i:""+i+D.RESOURCE_DELIM+r},t.generateLibraryState=function(e,r){if(!e)throw de.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 de.createNoCryptoObjectError("parseRequestState");if(ie.isEmpty(r))throw de.createInvalidStateError(r,"Null, undefined or empty state");try{var n=r.split(D.RESOURCE_DELIM),i=n[0],o=n.length>1?n.slice(1).join(D.RESOURCE_DELIM):D.EMPTY_STRING,a=e.base64Decode(i),s=JSON.parse(a);return{userRequestState:ie.isEmpty(o)?D.EMPTY_STRING:o,libraryState:s}}catch(c){throw de.createInvalidStateError(r,c)}},t}();/*! @azure/msal-common v6.4.0 2022-06-06 */var et=function(){function t(e){if(this._urlString=e,ie.isEmpty(this._urlString))throw pt.createUrlEmptyError();ie.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 ie.endsWith(r,"?")?r=r.slice(0,-1):ie.endsWith(r,"?/")&&(r=r.slice(0,-2)),ie.endsWith(r,"/")||(r+="/"),r}return e},t.prototype.validateAsUri=function(){var e;try{e=this.getUrlComponents()}catch(r){throw pt.createUrlParseError(r)}if(!e.HostNameAndPort||!e.PathSegments)throw pt.createUrlParseError("Given url string: "+this.urlString);if(!e.Protocol||e.Protocol.toLowerCase()!=="https:")throw pt.createInsecureAuthorityUriError(this.urlString)},t.appendQueryString=function(e,r){return ie.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]===$f.COMMON||n[0]===$f.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 pt.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,!ie.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 pt.createUrlParseError("Given url string: "+e);return n[2]},t.getAbsoluteUrl=function(e,r){if(e[0]===D.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):D.EMPTY_STRING},t.constructAuthorityUriFromObject=function(e){return new t(e.Protocol+"//"+e.HostNameAndPort+"/"+e.PathSegments.join("/"))},t.getDeserializedHash=function(e){if(ie.isEmpty(e))return{};var r=t.parseHash(e),n=ie.queryStringToObject(ie.isEmpty(r)?e:r);if(!n)throw de.createHashNotDeserializedError(JSON.stringify(n));return n},t.hashContainsKnownProperties=function(e){if(ie.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 v6.4.0 2022-06-06 */var Rv;(function(t){t.SW="sw",t.UHW="uhw"})(Rv||(Rv={}));var Gf=function(){function t(e){this.cryptoUtils=e}return t.prototype.generateCnf=function(e){return ge(this,void 0,void 0,function(){var r,n,i;return ye(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 ge(this,void 0,void 0,function(){var r;return ye(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:Rv.SW}]}})})},t.prototype.signPopToken=function(e,r,n){return ge(this,void 0,void 0,function(){return ye(this,function(i){return[2,this.signPayload(e,r,n)]})})},t.prototype.signPayload=function(e,r,n,i){return ge(this,void 0,void 0,function(){var o,a,s,c,l,d;return ye(this,function(u){switch(u.label){case 0:return o=n.resourceRequestMethod,a=n.resourceRequestUri,s=n.shrClaims,c=n.shrNonce,l=a?new et(a):void 0,d=l==null?void 0:l.getUrlComponents(),[4,this.cryptoUtils.signJwt(lr({at:e,ts:Gi.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,u.sent()]}})})},t}();/*! @azure/msal-common v6.4.0 2022-06-06 */var Tv=function(){function t(){}return t.prototype.generateAppMetadataKey=function(){return t.generateAppMetadataCacheKey(this.environment,this.clientId)},t.generateAppMetadataCacheKey=function(e,r){var n=[Sv,e,r];return n.join(wn.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(Sv)===0&&r.hasOwnProperty("clientId")&&r.hasOwnProperty("environment"):!1},t}();/*! @azure/msal-common v6.4.0 2022-06-06 */var iH=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 v6.4.0 2022-06-06 */var Kf=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?de.createStateNotFoundError("Cached State"):de.createStateNotFoundError("Server State");if(decodeURIComponent(e.state)!==decodeURIComponent(r))throw de.createStateMismatchError();if(e.error||e.error_description||e.suberror)throw ds.isInteractionRequiredError(e.error,e.error_description,e.suberror)?new ds(e.error||D.EMPTY_STRING,e.error_description,e.suberror):new Su(e.error||D.EMPTY_STRING,e.error_description,e.suberror);e.client_info&&Uf(e.client_info,n)},t.prototype.validateTokenResponse=function(e){if(e.error||e.error_description||e.suberror){if(ds.isInteractionRequiredError(e.error,e.error_description,e.suberror))throw new ds(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 Su(e.error,r,e.suberror)}},t.prototype.handleServerTokenResponse=function(e,r,n,i,o,a,s){return ge(this,void 0,void 0,function(){var c,l,d,u,h,f;return ye(this,function(p){switch(p.label){case 0:if(e.id_token&&(c=new Zs(e.id_token||D.EMPTY_STRING,this.cryptoObj),o&&!ie.isEmpty(o.nonce)&&c.claims.nonce!==o.nonce))throw de.createNonceMismatchError();this.homeAccountIdentifier=sn.generateHomeAccountId(e.client_info||D.EMPTY_STRING,r.authorityType,this.logger,this.cryptoObj,c),o&&o.state&&(l=el.parseRequestState(this.cryptoObj,o.state)),e.key_id=e.key_id||i.sshKid||void 0,d=this.generateCacheRecord(e,r,n,i,c,a,o),p.label=1;case 1:return p.trys.push([1,,5,8]),this.persistencePlugin&&this.serializableCache?(this.logger.verbose("Persistence enabled, calling beforeCacheAccess"),u=new iH(this.serializableCache,!0),[4,this.persistencePlugin.beforeCacheAccess(u)]):[3,3];case 2:p.sent(),p.label=3;case 3:return s&&d.account&&(h=d.account.generateAccountKey(),f=this.cacheStorage.getAccount(h),!f)?(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,d,!1,i,c,l)]):[4,this.cacheStorage.saveCacheRecord(d)];case 4:return p.sent(),[3,8];case 5:return this.persistencePlugin&&this.serializableCache&&u?(this.logger.verbose("Persistence enabled, calling afterCacheAccess"),[4,this.persistencePlugin.afterCacheAccess(u)]):[3,7];case 6:p.sent(),p.label=7;case 7:return[7];case 8:return[2,t.generateAuthenticationResult(this.cryptoObj,r,d,!1,i,c,l,e.spa_code)]}})})},t.prototype.generateCacheRecord=function(e,r,n,i,o,a,s){var c=r.getPreferredCache();if(ie.isEmpty(c))throw de.createInvalidCacheEnvironmentError();var l,d;!ie.isEmpty(e.id_token)&&o&&(l=Wf.createIdTokenEntity(this.homeAccountIdentifier,c,e.id_token||D.EMPTY_STRING,this.clientId,o.claims.tid||D.EMPTY_STRING,a),d=this.generateAccountEntity(e,o,r,a,s));var u=null;if(!ie.isEmpty(e.access_token)){var h=e.scope?Fi.fromString(e.scope):new Fi(i.scopes||[]),f=(typeof e.expires_in=="string"?parseInt(e.expires_in,10):e.expires_in)||0,p=(typeof e.ext_expires_in=="string"?parseInt(e.ext_expires_in,10):e.ext_expires_in)||0,m=(typeof e.refresh_in=="string"?parseInt(e.refresh_in,10):e.refresh_in)||void 0,w=n+f,v=w+p,g=m&&m>0?n+m:void 0;u=qf.createAccessTokenEntity(this.homeAccountIdentifier,c,e.access_token||D.EMPTY_STRING,this.clientId,o?o.claims.tid||D.EMPTY_STRING:r.tenant,h.printScopes(),w,v,this.cryptoObj,g,e.token_type,a,e.key_id,i.claims,i.requestedClaimsHash)}var _=null;ie.isEmpty(e.refresh_token)||(_=kv.createRefreshTokenEntity(this.homeAccountIdentifier,c,e.refresh_token||D.EMPTY_STRING,this.clientId,e.foci,a));var y=null;return ie.isEmpty(e.foci)||(y=Tv.createAppMetadataEntity(this.clientId,c,e.foci)),new nH(d,l,u,_,y)},t.prototype.generateAccountEntity=function(e,r,n,i,o){var a=n.authorityType,s=o?o.cloud_graph_host_name:D.EMPTY_STRING,c=o?o.msgraph_host:D.EMPTY_STRING;if(a===ha.Adfs)return this.logger.verbose("Authority type is ADFS, creating ADFS account"),sn.createGenericAccount(this.homeAccountIdentifier,r,n,i,s,c);if(ie.isEmpty(e.client_info)&&n.protocolMode==="AAD")throw de.createClientInfoEmptyError();return e.client_info?sn.createAccount(e.client_info,this.homeAccountIdentifier,r,n,i,s,c):sn.createGenericAccount(this.homeAccountIdentifier,r,n,i,s,c)},t.generateAuthenticationResult=function(e,r,n,i,o,a,s,c){var l,d,u;return ge(this,void 0,void 0,function(){var h,f,p,m,w,v,g,_,y,C,S;return ye(this,function(A){switch(A.label){case 0:if(h=D.EMPTY_STRING,f=[],p=null,w=D.EMPTY_STRING,!n.accessToken)return[3,4];if(n.accessToken.tokenType!==Zt.POP)return[3,2];if(v=new Gf(e),g=n.accessToken,_=g.secret,y=g.keyId,!y)throw de.createKeyIdMissingError();return[4,v.signPopToken(_,y,o)];case 1:return h=A.sent(),[3,3];case 2:h=n.accessToken.secret,A.label=3;case 3:f=Fi.fromString(n.accessToken.target).asArray(),p=new Date(Number(n.accessToken.expiresOn)*1e3),m=new Date(Number(n.accessToken.extendedExpiresOn)*1e3),A.label=4;case 4:return n.appMetadata&&(w=n.appMetadata.familyId===Vf?Vf:D.EMPTY_STRING),C=(a==null?void 0:a.claims.oid)||(a==null?void 0:a.claims.sub)||D.EMPTY_STRING,S=(a==null?void 0:a.claims.tid)||D.EMPTY_STRING,[2,{authority:r.canonicalAuthority,uniqueId:C,tenantId:S,scopes:f,account:n.account?n.account.getAccountInfo():null,idToken:a?a.rawToken:D.EMPTY_STRING,idTokenClaims:a?a.claims:{},accessToken:h,fromCache:i,expiresOn:p,correlationId:o.correlationId,extExpiresOn:m,familyId:w,tokenType:((l=n.accessToken)===null||l===void 0?void 0:l.tokenType)||D.EMPTY_STRING,state:s?s.userRequestState:D.EMPTY_STRING,cloudGraphHostName:((d=n.account)===null||d===void 0?void 0:d.cloudGraphHostName)||D.EMPTY_STRING,msGraphHost:((u=n.account)===null||u===void 0?void 0:u.msGraphHost)||D.EMPTY_STRING,code:c,fromNativeBroker:!1}]}})})},t}();/*! @azure/msal-common v6.4.0 2022-06-06 */var Px=function(t){Yn(e,t);function e(r){var n=t.call(this,r)||this;return n.includeRedirectUri=!0,n}return e.prototype.getAuthCodeUrl=function(r){return ge(this,void 0,void 0,function(){var n;return ye(this,function(i){switch(i.label){case 0:return[4,this.createAuthCodeUrlQueryString(r)];case 1:return n=i.sent(),[2,et.appendQueryString(this.authority.authorizationEndpoint,n)]}})})},e.prototype.acquireToken=function(r,n){return ge(this,void 0,void 0,function(){var i,o,a;return ye(this,function(s){switch(s.label){case 0:if(this.logger.info("in acquireToken call"),!r||ie.isEmpty(r.code))throw de.createTokenRequestCannotBeMadeError();return i=Gi.nowSeconds(),[4,this.executeTokenRequest(this.authority,r)];case 1:return o=s.sent(),a=new Kf(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,this.config.serializableCache,this.config.persistencePlugin),a.validateTokenResponse(o.body),[4,a.handleServerTokenResponse(o.body,this.authority,i,r,n)];case 2:return[2,s.sent()]}})})},e.prototype.handleFragmentResponse=function(r,n){var i=new Kf(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,null,null),o=new et(r),a=et.getDeserializedHash(o.getHash());if(i.validateServerAuthorizationCodeResponse(a,n,this.cryptoUtils),!a.code)throw de.createNoAuthCodeInServerResponseError();return lr(lr({},a),{code:a.code})},e.prototype.getLogoutUri=function(r){if(!r)throw pt.createEmptyLogoutRequestError();var n=this.createLogoutUrlQueryString(r);return et.appendQueryString(this.authority.endSessionEndpoint,n)},e.prototype.executeTokenRequest=function(r,n){return ge(this,void 0,void 0,function(){var i,o,a,s,c,l,d;return ye(this,function(u){switch(u.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=u.sent(),a=this.createTokenQueryParameters(n),s=void 0,n.clientInfo)try{c=Uf(n.clientInfo,this.cryptoUtils),s={credential:""+c.uid+wn.CLIENT_INFO_SEPARATOR+c.utid,type:_n.HOME_ACCOUNT_ID}}catch(h){this.logger.verbose("Could not parse client info for CCS Header: "+h)}return l=this.createTokenRequestHeaders(s||n.ccsCredential),d=ie.isEmpty(a)?r.tokenEndpoint:r.tokenEndpoint+"?"+a,[2,this.executePostToTokenEndpoint(d,o,l,i)]}})})},e.prototype.createTokenQueryParameters=function(r){var n=new Vc;return r.tokenQueryParameters&&n.addExtraQueryParameters(r.tokenQueryParameters),n.createQueryString()},e.prototype.createTokenRequestBody=function(r){return ge(this,void 0,void 0,function(){var n,i,o,a,s,c,l,l,d;return ye(this,function(u){switch(u.label){case 0:return n=new Vc,n.addClientId(this.config.authOptions.clientId),this.includeRedirectUri?n.addRedirectUri(r.redirectUri):Wa.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),i=r.clientAssertion||this.config.clientCredentials.clientAssertion,i&&(n.addClientAssertion(i.assertion),n.addClientAssertionType(i.assertionType)),n.addGrantType(Nf.AUTHORIZATION_CODE_GRANT),n.addClientInfo(),r.authenticationScheme!==Zt.POP?[3,2]:(o=new Gf(this.cryptoUtils),[4,o.generateCnf(r)]);case 1:return a=u.sent(),n.addPopToken(a.reqCnfString),[3,3];case 2:if(r.authenticationScheme===Zt.SSH)if(r.sshJwk)n.addSshJwk(r.sshJwk);else throw pt.createMissingSshJwkError();u.label=3;case 3:if(s=r.correlationId||this.config.cryptoInterface.createNewGuid(),n.addCorrelationId(s),(!ie.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=Uf(r.clientInfo,this.cryptoUtils),c={credential:""+l.uid+wn.CLIENT_INFO_SEPARATOR+l.utid,type:_n.HOME_ACCOUNT_ID}}catch(h){this.logger.verbose("Could not parse client info for CCS Header: "+h)}else c=r.ccsCredential;if(this.config.systemOptions.preventCorsPreflight&&c)switch(c.type){case _n.HOME_ACCOUNT_ID:try{l=Jd(c.credential),n.addCcsOid(l)}catch(h){this.logger.verbose("Could not parse home account ID for CCS Header: "+h)}break;case _n.UPN:n.addCcsUpn(c.credential);break}return r.tokenBodyParameters&&n.addExtraQueryParameters(r.tokenBodyParameters),r.enableSpaAuthorizationCode&&(!r.tokenBodyParameters||!r.tokenBodyParameters[we.RETURN_SPA_CODE])&&n.addExtraQueryParameters((d={},d[we.RETURN_SPA_CODE]="1",d)),[2,n.createQueryString()]}})})},e.prototype.createAuthCodeUrlQueryString=function(r){return ge(this,void 0,void 0,function(){var n,i,o,a,s,s,c,l;return ye(this,function(d){switch(d.label){case 0:if(n=new Vc,n.addClientId(this.config.authOptions.clientId),i=G2(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!==ys.SELECT_ACCOUNT)if(r.sid&&r.prompt===ys.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),a&&r.prompt===ys.NONE){this.logger.verbose("createAuthCodeUrlQueryString: Prompt is none, adding sid from account"),n.addSid(a);try{s=Jd(r.account.homeAccountId),n.addCcsOid(s)}catch(u){this.logger.verbose("Could not parse home account ID for CCS Header: "+u)}}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{s=Jd(r.account.homeAccountId),n.addCcsOid(s)}catch(u){this.logger.verbose("Could not parse home account ID for CCS Header: "+u)}}}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),(!ie.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!==Zt.POP?[3,2]:(c=new Gf(this.cryptoUtils),[4,c.generateCnf(r)])):[3,2];case 1:l=d.sent(),n.addPopToken(l.reqCnfHash),d.label=2;case 2:return[2,n.createQueryString()]}})})},e.prototype.createLogoutUrlQueryString=function(r){var n=new Vc;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){if(r.idTokenClaims){var n=r.idTokenClaims;return n.sid||null}return null},e}(r5);/*! @azure/msal-common v6.4.0 2022-06-06 */var Mx=function(t){Yn(e,t);function e(r){return t.call(this,r)||this}return e.prototype.acquireToken=function(r){return ge(this,void 0,void 0,function(){var n,i,o;return ye(this,function(a){switch(a.label){case 0:return n=Gi.nowSeconds(),[4,this.executeTokenRequest(r,this.authority)];case 1:return i=a.sent(),o=new Kf(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,this.config.serializableCache,this.config.persistencePlugin),o.validateTokenResponse(i.body),[2,o.handleServerTokenResponse(i.body,this.authority,n,r,void 0,void 0,!0)]}})})},e.prototype.acquireTokenByRefreshToken=function(r){return ge(this,void 0,void 0,function(){var n,i,o;return ye(this,function(a){if(!r)throw pt.createEmptyTokenRequestError();if(!r.account)throw de.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 ds&&s.errorCode===Av.noTokensFoundError.code,o=s instanceof Su&&s.errorCode===h6.INVALID_GRANT_ERROR&&s.subError===h6.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){return ge(this,void 0,void 0,function(){var i,o;return ye(this,function(a){if(i=this.cacheManager.readRefreshTokenFromCache(this.config.authOptions.clientId,r.account,n),!i)throw ds.createNoTokensFoundError();return o=lr(lr({},r),{refreshToken:i.secret,authenticationScheme:r.authenticationScheme||Zt.BEARER,ccsCredential:{credential:r.account.homeAccountId,type:_n.HOME_ACCOUNT_ID}}),[2,this.acquireToken(o)]})})},e.prototype.executeTokenRequest=function(r,n){return ge(this,void 0,void 0,function(){var i,o,a,s,c;return ye(this,function(l){switch(l.label){case 0:return[4,this.createTokenRequestBody(r)];case 1:return i=l.sent(),o=this.createTokenQueryParameters(r),a=this.createTokenRequestHeaders(r.ccsCredential),s={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},c=et.appendQueryString(n.tokenEndpoint,o),[2,this.executePostToTokenEndpoint(c,i,a,s)]}})})},e.prototype.createTokenQueryParameters=function(r){var n=new Vc;return r.tokenQueryParameters&&n.addExtraQueryParameters(r.tokenQueryParameters),n.createQueryString()},e.prototype.createTokenRequestBody=function(r){return ge(this,void 0,void 0,function(){var n,i,o,a,s,c;return ye(this,function(l){switch(l.label){case 0:return n=new Vc,n.addClientId(this.config.authOptions.clientId),n.addScopes(r.scopes),n.addGrantType(Nf.REFRESH_TOKEN_GRANT),n.addClientInfo(),n.addLibraryInfo(this.config.libraryInfo),n.addApplicationTelemetry(this.config.telemetry.application),n.addThrottling(),this.serverTelemetryManager&&n.addServerTelemetry(this.serverTelemetryManager),i=r.correlationId||this.config.cryptoInterface.createNewGuid(),n.addCorrelationId(i),n.addRefreshToken(r.refreshToken),this.config.clientCredentials.clientSecret&&n.addClientSecret(this.config.clientCredentials.clientSecret),o=r.clientAssertion||this.config.clientCredentials.clientAssertion,o&&(n.addClientAssertion(o.assertion),n.addClientAssertionType(o.assertionType)),r.authenticationScheme!==Zt.POP?[3,2]:(a=new Gf(this.cryptoUtils),[4,a.generateCnf(r)]);case 1:return s=l.sent(),n.addPopToken(s.reqCnfString),[3,3];case 2:if(r.authenticationScheme===Zt.SSH)if(r.sshJwk)n.addSshJwk(r.sshJwk);else throw pt.createMissingSshJwkError();l.label=3;case 3:if((!ie.isEmptyObj(r.claims)||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&n.addClaims(r.claims,this.config.authOptions.clientCapabilities),this.config.systemOptions.preventCorsPreflight&&r.ccsCredential)switch(r.ccsCredential.type){case _n.HOME_ACCOUNT_ID:try{c=Jd(r.ccsCredential.credential),n.addCcsOid(c)}catch(d){this.logger.verbose("Could not parse home account ID for CCS Header: "+d)}break;case _n.UPN:n.addCcsUpn(r.ccsCredential.credential);break}return[2,n.createQueryString()]}})})},e}(r5);/*! @azure/msal-common v6.4.0 2022-06-06 */var oH=function(t){Yn(e,t);function e(r){return t.call(this,r)||this}return e.prototype.acquireToken=function(r){return ge(this,void 0,void 0,function(){var n,i;return ye(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 de&&n.errorCode===G.tokenRefreshRequired.code)return i=new Mx(this.config),[2,i.acquireTokenByRefreshToken(r)];throw n;case 3:return[2]}})})},e.prototype.acquireCachedToken=function(r){var n,i,o,a;return ge(this,void 0,void 0,function(){var s,c;return ye(this,function(l){switch(l.label){case 0:if(!r)throw pt.createEmptyTokenRequestError();if(r.forceRefresh)throw(n=this.serverTelemetryManager)===null||n===void 0||n.setCacheOutcome(ls.FORCE_REFRESH),this.logger.info("SilentFlowClient:acquireCachedToken - Skipping cache because forceRefresh is true."),de.createRefreshRequiredError();if(!r.account)throw de.createNoAccountInSilentRequestError();if(s=r.authority||this.authority.getPreferredCache(),c=this.cacheManager.readCacheRecord(r.account,this.config.authOptions.clientId,r,s),c.accessToken){if(Gi.wasClockTurnedBack(c.accessToken.cachedAt)||Gi.isTokenExpired(c.accessToken.expiresOn,this.config.systemOptions.tokenRenewalOffsetSeconds))throw(o=this.serverTelemetryManager)===null||o===void 0||o.setCacheOutcome(ls.CACHED_ACCESS_TOKEN_EXPIRED),this.logger.info("SilentFlowClient:acquireCachedToken - Cached access token is expired or will expire within "+this.config.systemOptions.tokenRenewalOffsetSeconds+" seconds."),de.createRefreshRequiredError();if(c.accessToken.refreshOn&&Gi.isTokenExpired(c.accessToken.refreshOn,0))throw(a=this.serverTelemetryManager)===null||a===void 0||a.setCacheOutcome(ls.REFRESH_CACHED_ACCESS_TOKEN),this.logger.info("SilentFlowClient:acquireCachedToken - Cached access token's refreshOn property has been exceeded'."),de.createRefreshRequiredError()}else throw(i=this.serverTelemetryManager)===null||i===void 0||i.setCacheOutcome(ls.NO_CACHED_ACCESS_TOKEN),this.logger.info("SilentFlowClient:acquireCachedToken - No access token found in cache for the given properties."),de.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 ge(this,void 0,void 0,function(){var i;return ye(this,function(o){switch(o.label){case 0:return r.idToken&&(i=new Zs(r.idToken.secret,this.config.cryptoInterface)),[4,Kf.generateAuthenticationResult(this.cryptoUtils,this.authority,r,!0,n,i)];case 1:return[2,o.sent()]}})})},e}(r5);/*! @azure/msal-common v6.4.0 2022-06-06 */function aH(t){return t.hasOwnProperty("authorization_endpoint")&&t.hasOwnProperty("token_endpoint")&&t.hasOwnProperty("issuer")}/*! @azure/msal-common v6.4.0 2022-06-06 */var Yf;(function(t){t.AAD="AAD",t.OIDC="OIDC"})(Yf||(Yf={}));/*! @azure/msal-common v6.4.0 2022-06-06 */var Iv=function(){function t(){this.expiresAt=Gi.nowSeconds()+Xd.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},t.prototype.updateCanonicalAuthority=function(e){this.canonical_authority=e},t.prototype.resetExpiresAt=function(){this.expiresAt=Gi.nowSeconds()+Xd.REFRESH_TIME_SECONDS},t.prototype.isExpired=function(){return this.expiresAt<=Gi.nowSeconds()},t.isAuthorityMetadataEntity=function(e,r){return r?e.indexOf(Xd.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"):!1},t}();/*! @azure/msal-common v6.4.0 2022-06-06 */function sH(t){return t.hasOwnProperty("tenant_discovery_endpoint")&&t.hasOwnProperty("metadata")}/*! @azure/msal-common v6.4.0 2022-06-06 */var cH=function(){function t(e){this.networkInterface=e}return t.prototype.detectRegion=function(e,r,n){return ge(this,void 0,void 0,function(){var i,o,a,s,c;return ye(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(D.IMDS_VERSION,o)];case 2:return a=l.sent(),a.status===Nc.httpSuccess&&(i=a.body,r.region_source=Jo.IMDS),a.status!==Nc.httpBadRequest?[3,5]:[4,this.getCurrentVersion(o)];case 3:return s=l.sent(),s?[4,this.getRegionFromIMDS(s,o)]:(r.region_source=Jo.FAILED_AUTO_DETECTION,[2,null]);case 4:c=l.sent(),c.status===Nc.httpSuccess&&(i=c.body,r.region_source=Jo.IMDS),l.label=5;case 5:return[3,7];case 6:return l.sent(),r.region_source=Jo.FAILED_AUTO_DETECTION,[2,null];case 7:return[3,9];case 8:r.region_source=Jo.ENVIRONMENT_VARIABLE,l.label=9;case 9:return i||(r.region_source=Jo.FAILED_AUTO_DETECTION),[2,i||null]}})})},t.prototype.getRegionFromIMDS=function(e,r){return ge(this,void 0,void 0,function(){return ye(this,function(n){return[2,this.networkInterface.sendGetRequestAsync(D.IMDS_ENDPOINT+"?api-version="+e+"&format=text",r,D.IMDS_TIMEOUT)]})})},t.prototype.getCurrentVersion=function(e){return ge(this,void 0,void 0,function(){var r;return ye(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.networkInterface.sendGetRequestAsync(D.IMDS_ENDPOINT+"?format=json",e)];case 1:return r=n.sent(),r.status===Nc.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 v6.4.0 2022-06-06 */var Zx=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 cH(r),this.regionDiscoveryMetadata={region_used:void 0,region_source:void 0,region_outcome:void 0},this.proxyUrl=o||D.EMPTY_STRING}return Object.defineProperty(t.prototype,"authorityType",{get:function(){var e=this.canonicalAuthorityUrlComponents.PathSegments;return e.length&&e[0].toLowerCase()===D.ADFS?ha.Adfs:ha.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 et(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 de.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 de.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 de.createEndpointDiscoveryIncompleteError("Discovery incomplete.")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"endSessionEndpoint",{get:function(){if(this.discoveryComplete()){if(!this.metadata.end_session_endpoint)throw de.createLogoutNotSupportedError();var e=this.replacePath(this.metadata.end_session_endpoint);return this.replaceTenant(e)}else throw de.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 de.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 et(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===ha.Adfs||this.protocolMode===Yf.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 ge(this,void 0,void 0,function(){var e,r,n,i;return ye(this,function(o){switch(o.label){case 0:return e=this.cacheManager.getAuthorityMetadataByAlias(this.hostnameAndPort),e||(e=new Iv,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!==Hi.CACHE&&n!==Hi.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;return ge(this,void 0,void 0,function(){var n,i,o;return ye(this,function(a){switch(a.label){case 0:return n=this.getEndpointMetadataFromConfig(),n?(e.updateEndpointMetadata(n,!1),[2,Hi.CONFIG]):this.isAuthoritySameType(e)&&e.endpointsFromNetwork&&!e.isExpired()?[2,Hi.CACHE]:[4,this.getEndpointMetadataFromNetwork()];case 1:return n=a.sent(),n?!((r=this.authorityOptions.azureRegionConfiguration)===null||r===void 0)&&r.azureRegion?[4,this.regionDiscovery.detectRegion(this.authorityOptions.azureRegionConfiguration.environmentRegion,this.regionDiscoveryMetadata,this.proxyUrl)]:[3,3]:[3,4];case 2:i=a.sent(),o=this.authorityOptions.azureRegionConfiguration.azureRegion===D.AZURE_REGION_AUTO_DISCOVER_FLAG?i:this.authorityOptions.azureRegionConfiguration.azureRegion,this.authorityOptions.azureRegionConfiguration.azureRegion===D.AZURE_REGION_AUTO_DISCOVER_FLAG?this.regionDiscoveryMetadata.region_outcome=i?ns.AUTO_DETECTION_REQUESTED_SUCCESSFUL:ns.AUTO_DETECTION_REQUESTED_FAILED:i?this.regionDiscoveryMetadata.region_outcome=this.authorityOptions.azureRegionConfiguration.azureRegion===i?ns.CONFIGURED_MATCHES_DETECTED:ns.CONFIGURED_NOT_DETECTED:this.regionDiscoveryMetadata.region_outcome=ns.CONFIGURED_NO_AUTO_DETECTION,o&&(this.regionDiscoveryMetadata.region_used=o,n=t.replaceWithRegionalInformation(n,o)),a.label=3;case 3:return e.updateEndpointMetadata(n,!0),[2,Hi.NETWORK];case 4:throw de.createUnableToGetOpenidConfigError(this.defaultOpenIdConfigurationEndpoint)}})})},t.prototype.isAuthoritySameType=function(e){var r=new et(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 pt.createInvalidAuthorityMetadataError()}return null},t.prototype.getEndpointMetadataFromNetwork=function(){return ge(this,void 0,void 0,function(){var e,r;return ye(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,aH(r.body)?r.body:null];case 3:return n.sent(),[2,null];case 4:return[2]}})})},t.prototype.updateCloudDiscoveryMetadata=function(e){return ge(this,void 0,void 0,function(){var r;return ye(this,function(n){switch(n.label){case 0:return r=this.getCloudDiscoveryMetadataFromConfig(),r?(e.updateCloudDiscoveryMetadata(r,!1),[2,Hi.CONFIG]):this.isAuthoritySameType(e)&&e.aliasesFromNetwork&&!e.isExpired()?[2,Hi.CACHE]:[4,this.getCloudDiscoveryMetadataFromNetwork()];case 1:if(r=n.sent(),r)return e.updateCloudDiscoveryMetadata(r,!0),[2,Hi.NETWORK];throw pt.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 pt.createInvalidCloudDiscoveryMetadataError()}return this.isInKnownAuthorities()?t.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort):null},t.prototype.getCloudDiscoveryMetadataFromNetwork=function(){return ge(this,void 0,void 0,function(){var e,r,n,i,o;return ye(this,function(a){switch(a.label){case 0:e=""+D.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=sH(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.isInKnownAuthorities=function(){var e=this,r=this.authorityOptions.knownAuthorities.filter(function(n){return et.getDomainFromUrl(n).toLowerCase()===e.hostnameAndPort});return r.length>0},t.generateAuthority=function(e,r){var n;if(r&&r.azureCloudInstance!==jf.None){var i=r.tenant?r.tenant:D.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 de.createEndpointDiscoveryIncompleteError("Discovery incomplete.")},t.prototype.isAlias=function(e){return this.metadata.aliases.indexOf(e)>-1},t.isPublicCloudAuthority=function(e){return D.KNOWN_PUBLIC_CLOUDS.indexOf(e)>=0},t.buildRegionalAuthorityString=function(e,r,n){var i=new et(e);i.validateAsUri();var o=i.getUrlComponents(),a=r+"."+o.HostNameAndPort;this.isPublicCloudAuthority(o.HostNameAndPort)&&(a=r+"."+D.REGIONAL_AUTH_PUBLIC_CLOUD_SUFFIX);var s=et.constructAuthorityUriFromObject(lr(lr({},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,"allowestsrnonmsi=true"),e.end_session_endpoint&&(e.end_session_endpoint=t.buildRegionalAuthorityString(e.end_session_endpoint,r)),e},t}();/*! @azure/msal-common v6.4.0 2022-06-06 */var Pv=function(){function t(){}return t.createDiscoveredInstance=function(e,r,n,i,o){return ge(this,void 0,void 0,function(){var a,s;return ye(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(),de.createEndpointDiscoveryIncompleteError(s);case 4:return[2]}})})},t.createInstance=function(e,r,n,i,o){if(ie.isEmpty(e))throw pt.createUrlEmptyError();return new Zx(e,r,n,i,o)},t}();/*! @azure/msal-common v6.4.0 2022-06-06 */var Xf=function(){function t(){this.failedRequests=[],this.errors=[],this.cacheHits=0}return t.isServerTelemetryEntity=function(e,r){var n=e.indexOf(mr.CACHE_KEY)===0,i=!0;return r&&(i=r.hasOwnProperty("failedRequests")&&r.hasOwnProperty("errors")&&r.hasOwnProperty("cacheHits")),n&&i},t}();/*! @azure/msal-common v6.4.0 2022-06-06 */var v6=function(){function t(){}return t.isThrottlingEntity=function(e,r){var n=!1;e&&(n=e.indexOf(Qd.THROTTLING_PREFIX)===0);var i=!0;return r&&(i=r.hasOwnProperty("throttleTime")),n&&i},t}();/*! @azure/msal-common v6.4.0 2022-06-06 */var lH={sendGetRequestAsync:function(){var t="Network interface - sendGetRequestAsync() has not been implemented for the Network interface.";return Promise.reject(me.createUnexpectedError(t))},sendPostRequestAsync:function(){var t="Network interface - sendPostRequestAsync() has not been implemented for the Network interface.";return Promise.reject(me.createUnexpectedError(t))}};/*! @azure/msal-common v6.4.0 2022-06-06 */var dH=function(){function t(e,r){this.cacheOutcome=ls.NO_CACHE_HIT,this.cacheManager=r,this.apiId=e.apiId,this.correlationId=e.correlationId,this.wrapperSKU=e.wrapperSKU||D.EMPTY_STRING,this.wrapperVer=e.wrapperVer||D.EMPTY_STRING,this.telemetryCacheKey=mr.CACHE_KEY+wn.CACHE_KEY_SEPARATOR+e.clientId}return t.prototype.generateCurrentRequestHeaderValue=function(){var e=""+this.apiId+mr.VALUE_SEPARATOR+this.cacheOutcome,r=[this.wrapperSKU,this.wrapperVer].join(mr.VALUE_SEPARATOR),n=this.getRegionDiscoveryFields(),i=[e,n].join(mr.VALUE_SEPARATOR);return[mr.SCHEMA_VERSION,i,r].join(mr.CATEGORY_SEPARATOR)},t.prototype.generateLastRequestHeaderValue=function(){var e=this.getLastRequests(),r=t.maxErrorsToSend(e),n=e.failedRequests.slice(0,2*r).join(mr.VALUE_SEPARATOR),i=e.errors.slice(0,r).join(mr.VALUE_SEPARATOR),o=e.errors.length,a=r<o?mr.OVERFLOW_TRUE:mr.OVERFLOW_FALSE,s=[o,a].join(mr.VALUE_SEPARATOR);return[mr.SCHEMA_VERSION,e.cacheHits,n,i,s].join(mr.CATEGORY_SEPARATOR)},t.prototype.cacheFailedRequest=function(e){var r=this.getLastRequests();r.errors.length>=mr.MAX_CACHED_ERRORS&&(r.failedRequests.shift(),r.failedRequests.shift(),r.errors.shift()),r.failedRequests.push(this.apiId,this.correlationId),ie.isEmpty(e.subError)?ie.isEmpty(e.errorCode)?e&&e.toString()?r.errors.push(e.toString()):r.errors.push(mr.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 Xf,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 Xf;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]||D.EMPTY_STRING,s=e.failedRequests[2*r+1]||D.EMPTY_STRING,c=e.errors[r]||D.EMPTY_STRING;if(i+=a.toString().length+s.toString().length+c.length+3,i<mr.MAX_LAST_HEADER_BYTES)n+=1;else break}return n},t.prototype.getRegionDiscoveryFields=function(){var e=[];return e.push(this.regionUsed||D.EMPTY_STRING),e.push(this.regionSource||D.EMPTY_STRING),e.push(this.regionOutcome||D.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-browser v2.21.0 2022-01-04 */var On={INTERACTION_IN_PROGRESS_VALUE:"interaction_in_progress",INVALID_GRANT_ERROR:"invalid_grant",POPUP_WIDTH:483,POPUP_HEIGHT:600,POPUP_NAME_PREFIX:"msal",POLL_INTERVAL_MS:50,MSAL_SKU:"msal.js.browser"},Fr;(function(t){t.LocalStorage="localStorage",t.SessionStorage="sessionStorage",t.MemoryStorage="memoryStorage"})(Fr||(Fr={}));var $i;(function(t){t.GET="GET",t.POST="POST"})($i||($i={}));var rt;(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"})(rt||(rt={}));var Fc;(function(t){t.WRAPPER_SKU="wrapper.sku",t.WRAPPER_VER="wrapper.version"})(Fc||(Fc={}));var Or;(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"})(Or||(Or={}));var le;(function(t){t.Redirect="redirect",t.Popup="popup",t.Silent="silent"})(le||(le={}));var g6;(function(t){t.Startup="startup",t.Login="login",t.Logout="logout",t.AcquireToken="acquireToken",t.SsoSilent="ssoSilent",t.HandleRedirect="handleRedirect",t.None="none"})(g6||(g6={}));var y6={scopes:e5},Ed="jwk",_6;(function(t){t.React="@azure/msal-react",t.Angular="@azure/msal-angular"})(_6||(_6={}));var Mv="msal.db",uH=1,hH=Mv+".keys";/*! @azure/msal-browser v2.21.0 2022-01-04 */var Ir=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.21.0 2022-01-04 */var fH=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,Ir.decimalToHex(e[0])+Ir.decimalToHex(e[1])+Ir.decimalToHex(e[2])+Ir.decimalToHex(e[3])+"-"+Ir.decimalToHex(e[4])+Ir.decimalToHex(e[5])+"-"+Ir.decimalToHex(e[6])+Ir.decimalToHex(e[7])+"-"+Ir.decimalToHex(e[8])+Ir.decimalToHex(e[9])+"-"+Ir.decimalToHex(e[10])+Ir.decimalToHex(e[11])+Ir.decimalToHex(e[12])+Ir.decimalToHex(e[13])+Ir.decimalToHex(e[14])+Ir.decimalToHex(e[15])}catch{for(var r="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx",n="0123456789abcdef",i=0,o="",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.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.21.0 2022-01-04 */var tl=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="",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}();/*! @azure/msal-browser v2.21.0 2022-01-04 */var Hx=function(){function t(){}return t.prototype.urlEncode=function(e){return encodeURIComponent(this.encode(e).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_"))},t.prototype.urlEncodeArr=function(e){return this.base64EncArr(e).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")},t.prototype.encode=function(e){var r=tl.stringToUtf8Arr(e);return this.base64EncArr(r)},t.prototype.base64EncArr=function(e){for(var r=(3-e.length%3)%3,n="",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.21.0 2022-01-04 */var pH=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 tl.utf8ArrToString(n)},t.prototype.base64DecToArr=function(e,r){for(var n=e.replace(/[^A-Za-z0-9\+\/]/g,""),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,u=0;u<i;u++)if(c=u&3,l|=this.b64ToUint6(n.charCodeAt(u))<<18-6*c,c===3||i-u===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.21.0 2022-01-04 */var te={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."},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."},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:"Code flow is not supported inside an iframe. 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'."},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."},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."}},ae=function(t){Kr(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(te.pkceNotGenerated.code,te.pkceNotGenerated.desc+" Detail:"+r)},e.createCryptoNotAvailableError=function(r){return new e(te.cryptoDoesNotExist.code,te.cryptoDoesNotExist.desc+" Detail:"+r)},e.createHttpMethodNotImplementedError=function(r){return new e(te.httpMethodNotImplementedError.code,te.httpMethodNotImplementedError.desc+" Given Method: "+r)},e.createEmptyNavigationUriError=function(){return new e(te.emptyNavigateUriError.code,te.emptyNavigateUriError.desc)},e.createEmptyHashError=function(r){return new e(te.hashEmptyError.code,te.hashEmptyError.desc+" Given Url: "+r)},e.createHashDoesNotContainStateError=function(){return new e(te.hashDoesNotContainStateError.code,te.hashDoesNotContainStateError.desc)},e.createHashDoesNotContainKnownPropertiesError=function(){return new e(te.hashDoesNotContainKnownPropertiesError.code,te.hashDoesNotContainKnownPropertiesError.desc)},e.createUnableToParseStateError=function(){return new e(te.unableToParseStateError.code,te.unableToParseStateError.desc)},e.createStateInteractionTypeMismatchError=function(){return new e(te.stateInteractionTypeMismatchError.code,te.stateInteractionTypeMismatchError.desc)},e.createInteractionInProgressError=function(){return new e(te.interactionInProgress.code,te.interactionInProgress.desc)},e.createPopupWindowError=function(r){var n=te.popupWindowError.desc;return n=ie.isEmpty(r)?n:n+" Details: "+r,new e(te.popupWindowError.code,n)},e.createEmptyWindowCreatedError=function(){return new e(te.emptyWindowError.code,te.emptyWindowError.desc)},e.createUserCancelledError=function(){return new e(te.userCancelledError.code,te.userCancelledError.desc)},e.createMonitorPopupTimeoutError=function(){return new e(te.monitorPopupTimeoutError.code,te.monitorPopupTimeoutError.desc)},e.createMonitorIframeTimeoutError=function(){return new e(te.monitorIframeTimeoutError.code,te.monitorIframeTimeoutError.desc)},e.createRedirectInIframeError=function(r){return new e(te.redirectInIframeError.code,te.redirectInIframeError.desc+" (window.parent !== window) => "+r)},e.createBlockReloadInHiddenIframeError=function(){return new e(te.blockTokenRequestsInHiddenIframeError.code,te.blockTokenRequestsInHiddenIframeError.desc)},e.createBlockAcquireTokenInPopupsError=function(){return new e(te.blockAcquireTokenInPopupsError.code,te.blockAcquireTokenInPopupsError.desc)},e.createIframeClosedPrematurelyError=function(){return new e(te.iframeClosedPrematurelyError.code,te.iframeClosedPrematurelyError.desc)},e.createSilentLogoutUnsupportedError=function(){return new e(te.silentLogoutUnsupportedError.code,te.silentLogoutUnsupportedError.desc)},e.createNoAccountError=function(){return new e(te.noAccountError.code,te.noAccountError.desc)},e.createSilentPromptValueError=function(r){return new e(te.silentPromptValueError.code,te.silentPromptValueError.desc+" Given value: "+r)},e.createUnableToParseTokenRequestCacheError=function(){return new e(te.unableToParseTokenRequestCacheError.code,te.unableToParseTokenRequestCacheError.desc)},e.createNoTokenRequestCacheError=function(){return new e(te.noTokenRequestCacheError.code,te.noTokenRequestCacheError.desc)},e.createAuthRequestNotSetError=function(){return new e(te.authRequestNotSet.code,te.authRequestNotSet.desc)},e.createNoCachedAuthorityError=function(){return new e(te.noCachedAuthorityError.code,te.noCachedAuthorityError.desc)},e.createInvalidCacheTypeError=function(){return new e(te.invalidCacheType.code,""+te.invalidCacheType.desc)},e.createNonBrowserEnvironmentError=function(){return new e(te.notInBrowserEnvironment.code,te.notInBrowserEnvironment.desc)},e.createDatabaseNotOpenError=function(){return new e(te.databaseNotOpen.code,te.databaseNotOpen.desc)},e.createNoNetworkConnectivityError=function(){return new e(te.noNetworkConnectivity.code,te.noNetworkConnectivity.desc)},e.createPostRequestFailedError=function(r,n){return new e(te.postRequestFailed.code,te.postRequestFailed.desc+" | Network client threw: "+r+" | Attempted to reach: "+n.split("?")[0])},e.createGetRequestFailedError=function(r,n){return new e(te.getRequestFailed.code,te.getRequestFailed.desc+" | Network client threw: "+r+" | Attempted to reach: "+n.split("?")[0])},e.createFailedToParseNetworkResponseError=function(r){return new e(te.failedToParseNetworkResponse.code,te.failedToParseNetworkResponse.desc+" | Attempted to reach: "+r.split("?")[0])},e.createUnableToLoadTokenError=function(r){return new e(te.unableToLoadTokenError.code,te.unableToLoadTokenError.desc+" | "+r)},e.createSigningKeyNotFoundInStorageError=function(r){return new e(te.signingKeyNotFoundInStorage.code,te.signingKeyNotFoundInStorage.desc+" | No match found for KeyId: "+r)},e.createAuthCodeRequiredError=function(){return new e(te.authCodeRequired.code,te.authCodeRequired.desc)},e.createDatabaseUnavailableError=function(){return new e(te.databaseUnavailable.code,te.databaseUnavailable.desc)},e}(me);/*! @azure/msal-browser v2.21.0 2022-01-04 */var mH=32,vH=function(){function t(e){this.base64Encode=new Hx,this.cryptoObj=e}return t.prototype.generateCodes=function(){return X(this,void 0,void 0,function(){var e,r;return Q(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(mH);this.cryptoObj.getRandomValues(e);var r=this.base64Encode.urlEncodeArr(e);return r}catch(n){throw ae.createPkceNotGeneratedError(n)}},t.prototype.generateCodeChallengeFromVerifier=function(e){return X(this,void 0,void 0,function(){var r,n;return Q(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(),ae.createPkceNotGeneratedError(n);case 3:return[2]}})})},t}();/*! @azure/msal-browser v2.21.0 2022-01-04 */var gH="RSASSA-PKCS1-v1_5",g0="SHA-256",yH=2048,_H=new Uint8Array([1,0,1]),y0=function(){function t(e){if(this.logger=e,!this.hasCryptoAPI())throw ae.createCryptoNotAvailableError("Browser crypto or msCrypto object not available.");this._keygenAlgorithmOptions={name:gH,hash:g0,modulusLength:yH,publicExponent:_H}}return t.prototype.sha256Digest=function(e){return X(this,void 0,void 0,function(){var r;return Q(this,function(n){return r=tl.stringToUtf8Arr(e),[2,this.hasIECrypto()?this.getMSCryptoDigest(g0,r):this.getSubtleCryptoDigest(g0,r)]})})},t.prototype.getRandomValues=function(e){var r=window.msCrypto||window.crypto;if(!r.getRandomValues)throw ae.createCryptoNotAvailableError("getRandomValues does not exist.");r.getRandomValues(e)},t.prototype.generateKeyPair=function(e,r){return X(this,void 0,void 0,function(){return Q(this,function(n){return[2,this.hasIECrypto()?this.msCryptoGenerateKey(e,r):window.crypto.subtle.generateKey(this._keygenAlgorithmOptions,e,r)]})})},t.prototype.exportJwk=function(e){return X(this,void 0,void 0,function(){return Q(this,function(r){return[2,this.hasIECrypto()?this.msCryptoExportJwk(e):window.crypto.subtle.exportKey(Ed,e)]})})},t.prototype.importJwk=function(e,r,n){return X(this,void 0,void 0,function(){var i,o;return Q(this,function(a){return i=t.getJwkString(e),o=tl.stringToArrayBuffer(i),[2,this.hasIECrypto()?this.msCryptoImportKey(o,r,n):window.crypto.subtle.importKey(Ed,e,this._keygenAlgorithmOptions,r,n)]})})},t.prototype.sign=function(e,r){return X(this,void 0,void 0,function(){return Q(this,function(n){return[2,this.hasIECrypto()?this.msCryptoSign(e,r):window.crypto.subtle.sign(this._keygenAlgorithmOptions,e,r)]})})},t.prototype.hasCryptoAPI=function(){return this.hasIECrypto()||this.hasBrowserCrypto()},t.prototype.hasIECrypto=function(){return"msCrypto"in window},t.prototype.hasBrowserCrypto=function(){return"crypto"in window},t.prototype.getSubtleCryptoDigest=function(e,r){return X(this,void 0,void 0,function(){return Q(this,function(n){return[2,window.crypto.subtle.digest(e,r)]})})},t.prototype.getMSCryptoDigest=function(e,r){return X(this,void 0,void 0,function(){return Q(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.prototype.msCryptoGenerateKey=function(e,r){return X(this,void 0,void 0,function(){var n=this;return Q(this,function(i){return[2,new Promise(function(o,a){var s=window.msCrypto.subtle.generateKey(n._keygenAlgorithmOptions,e,r);s.addEventListener("complete",function(c){o(c.target.result)}),s.addEventListener("error",function(c){a(c)})})]})})},t.prototype.msCryptoExportJwk=function(e){return X(this,void 0,void 0,function(){return Q(this,function(r){return[2,new Promise(function(n,i){var o=window.msCrypto.subtle.exportKey(Ed,e);o.addEventListener("complete",function(a){var s=a.target.result,c=tl.utf8ArrToString(new Uint8Array(s)).replace(/\r/g,"").replace(/\n/g,"").replace(/\t/g,"").split(" ").join("").replace("\0","");try{n(JSON.parse(c))}catch(l){i(l)}}),o.addEventListener("error",function(a){i(a)})})]})})},t.prototype.msCryptoImportKey=function(e,r,n){return X(this,void 0,void 0,function(){var i=this;return Q(this,function(o){return[2,new Promise(function(a,s){var c=window.msCrypto.subtle.importKey(Ed,e,i._keygenAlgorithmOptions,r,n);c.addEventListener("complete",function(l){a(l.target.result)}),c.addEventListener("error",function(l){s(l)})})]})})},t.prototype.msCryptoSign=function(e,r){return X(this,void 0,void 0,function(){var n=this;return Q(this,function(i){return[2,new Promise(function(o,a){var s=window.msCrypto.subtle.sign(n._keygenAlgorithmOptions,e,r);s.addEventListener("complete",function(c){o(c.target.result)}),s.addEventListener("error",function(c){a(c)})})]})})},t.getJwkString=function(e){return JSON.stringify(e,Object.keys(e).sort())},t}();/*! @azure/msal-browser v2.21.0 2022-01-04 */var bH=function(){function t(){this.dbName=Mv,this.version=uH,this.tableName=hH,this.dbOpen=!1}return t.prototype.open=function(){return X(this,void 0,void 0,function(){var e=this;return Q(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(ae.createDatabaseUnavailableError())})})]})})},t.prototype.validateDbIsOpen=function(){return X(this,void 0,void 0,function(){return Q(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 X(this,void 0,void 0,function(){var r=this;return Q(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(ae.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;i(d.target.result)}),c.addEventListener("error",function(l){return o(l)})})]}})})},t.prototype.setItem=function(e,r){return X(this,void 0,void 0,function(){var n=this;return Q(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(ae.createDatabaseNotOpenError());var s=n.db.transaction([n.tableName],"readwrite"),c=s.objectStore(n.tableName),l=c.put(r,e);l.addEventListener("success",function(){return o()}),l.addEventListener("error",function(d){return a(d)})})]}})})},t.prototype.removeItem=function(e){return X(this,void 0,void 0,function(){var r=this;return Q(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(ae.createDatabaseNotOpenError());var a=r.db.transaction([r.tableName],"readwrite"),s=a.objectStore(r.tableName),c=s.delete(e);c.addEventListener("success",function(){return i()}),c.addEventListener("error",function(l){return o(l)})})]}})})},t.prototype.getKeys=function(){return X(this,void 0,void 0,function(){var e=this;return Q(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(ae.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;n(l.target.result)}),s.addEventListener("error",function(c){return i(c)})})]}})})},t.prototype.containsKey=function(e){return X(this,void 0,void 0,function(){var r=this;return Q(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(ae.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;i(d.target.result===1)}),c.addEventListener("error",function(l){return o(l)})})]}})})},t.prototype.deleteDatabase=function(){return X(this,void 0,void 0,function(){return Q(this,function(e){return[2,new Promise(function(r,n){var i=window.indexedDB.deleteDatabase(Mv);i.addEventListener("success",function(){return r(!0)}),i.addEventListener("error",function(){return n(!1)})})]})})},t}();/*! @azure/msal-browser v2.21.0 2022-01-04 */var Zv=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.21.0 2022-01-04 */var b6=function(){function t(e){this.inMemoryCache=new Zv,this.indexedDBCache=new bH,this.logger=e}return t.prototype.handleDatabaseAccessError=function(e){e instanceof ae&&e.errorCode===te.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.")},t.prototype.getItem=function(e){return X(this,void 0,void 0,function(){var r,n;return Q(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 X(this,void 0,void 0,function(){var n;return Q(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 X(this,void 0,void 0,function(){var r;return Q(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 X(this,void 0,void 0,function(){var e,r;return Q(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 X(this,void 0,void 0,function(){var r,n;return Q(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.clear=function(){return X(this,void 0,void 0,function(){var e;return Q(this,function(r){switch(r.label){case 0:this.inMemoryCache.clear(),r.label=1;case 1:return r.trys.push([1,3,,4]),[4,this.indexedDBCache.deleteDatabase()];case 2:return r.sent(),[3,4];case 3:return e=r.sent(),this.handleDatabaseAccessError(e),[3,4];case 4:return[2]}})})},t}();/*! @azure/msal-browser v2.21.0 2022-01-04 */var wH=function(){function t(e){this.logger=e,this.browserCrypto=new y0(this.logger),this.b64Encode=new Hx,this.b64Decode=new pH,this.guidGenerator=new fH(this.browserCrypto),this.pkceGenerator=new vH(this.browserCrypto),this.cache={asymmetricKeys:new b6(this.logger),symmetricKeys:new b6(this.logger)}}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 X(this,void 0,void 0,function(){return Q(this,function(e){return[2,this.pkceGenerator.generateCodes()]})})},t.prototype.getPublicKeyThumbprint=function(e){return X(this,void 0,void 0,function(){var r,n,i,o,a,s,c;return Q(this,function(l){switch(l.label){case 0:return[4,this.browserCrypto.generateKeyPair(t.EXTRACTABLE,t.POP_KEY_USAGES)];case 1:return r=l.sent(),[4,this.browserCrypto.exportJwk(r.publicKey)];case 2:return n=l.sent(),i={e:n.e,kty:n.kty,n:n.n},o=y0.getJwkString(i),[4,this.hashString(o)];case 3:return a=l.sent(),[4,this.browserCrypto.exportJwk(r.privateKey)];case 4:return s=l.sent(),[4,this.browserCrypto.importJwk(s,!1,["sign"])];case 5:return c=l.sent(),[4,this.cache.asymmetricKeys.setItem(a,{privateKey:c,publicKey:r.publicKey,requestMethod:e.resourceRequestMethod,requestUri:e.resourceRequestUri})];case 6:return l.sent(),[2,a]}})})},t.prototype.removeTokenBindingKey=function(e){return X(this,void 0,void 0,function(){var r;return Q(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 X(this,void 0,void 0,function(){var e,r,n;return Q(this,function(i){switch(i.label){case 0:return e=Object.keys(this.cache),r=this.cache[e[0]],r?[4,r.deleteDatabase()]:[3,2];case 1:return n=i.sent(),[3,3];case 2:n=!1,i.label=3;case 3:return[2,n]}})})},t.prototype.signJwt=function(e,r){return X(this,void 0,void 0,function(){var n,i,o,a,s,c,l,d,u,h;return Q(this,function(f){switch(f.label){case 0:return[4,this.cache.asymmetricKeys.getItem(r)];case 1:if(n=f.sent(),!n)throw ae.createSigningKeyNotFoundInStorageError(r);return[4,this.browserCrypto.exportJwk(n.publicKey)];case 2:return i=f.sent(),o=y0.getJwkString(i),a={alg:i.alg,type:Ed},s=this.b64Encode.urlEncode(JSON.stringify(a)),e.cnf={jwk:JSON.parse(o)},c=this.b64Encode.urlEncode(JSON.stringify(e)),l=s+"."+c,d=tl.stringToArrayBuffer(l),[4,this.browserCrypto.sign(n.privateKey,d)];case 3:return u=f.sent(),h=this.b64Encode.urlEncodeArr(new Uint8Array(u)),[2,l+"."+h]}})})},t.prototype.hashString=function(e){return X(this,void 0,void 0,function(){var r,n;return Q(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.21.0 2022-01-04 */var Pn={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."}},Hv=function(t){Kr(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(Pn.redirectUriNotSet.code,Pn.redirectUriNotSet.desc)},e.createPostLogoutRedirectUriEmptyError=function(){return new e(Pn.postLogoutUriNotSet.code,Pn.postLogoutUriNotSet.desc)},e.createStorageNotSupportedError=function(r){return new e(Pn.storageNotSupportedError.code,Pn.storageNotSupportedError.desc+" Given Location: "+r)},e.createRedirectCallbacksNotSetError=function(){return new e(Pn.noRedirectCallbacksSet.code,Pn.noRedirectCallbacksSet.desc)},e.createStubPcaInstanceCalledError=function(){return new e(Pn.stubPcaInstanceCalled.code,Pn.stubPcaInstanceCalled.desc)},e.createInMemoryRedirectUnavailableError=function(){return new e(Pn.inMemRedirectUnavailable.code,Pn.inMemRedirectUnavailable.desc)},e}(me);/*! @azure/msal-browser v2.21.0 2022-01-04 */var w6=function(){function t(e){this.validateWindowStorage(e),this.windowStorage=window[e]}return t.prototype.validateWindowStorage=function(e){if(e!==Fr.LocalStorage&&e!==Fr.SessionStorage)throw Hv.createStorageNotSupportedError(e);var r=!!window[e];if(!r)throw Hv.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.21.0 2022-01-04 */var Lx=function(){function t(){}return t.extractBrowserRequestState=function(e,r){if(ie.isEmpty(r))return null;try{var n=el.parseRequestState(e,r);return n.libraryState.meta}catch(i){throw de.createInvalidStateError(r,i)}},t.parseServerResponseFromHash=function(e){if(!e)return{};var r=new et(e);return et.getDeserializedHash(r.getHash())},t}();/*! @azure/msal-browser v2.21.0 2022-01-04 */var Ox=function(t){Kr(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 Zv,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 Fr.LocalStorage:case Fr.SessionStorage:try{return new w6(r)}catch(n){this.logger.verbose(n);break}}return this.cacheConfig.cacheLocation=Fr.MemoryStorage,new Zv},e.prototype.setupTemporaryCacheStorage=function(r){switch(r){case Fr.LocalStorage:case Fr.SessionStorage:try{return new w6(Fr.SessionStorage)}catch(n){return this.logger.verbose(n),this.internalStorage}case Fr.MemoryStorage:default:return this.internalStorage}},e.prototype.migrateCacheEntries=function(){var r=this,n=D.CACHE_PREFIX+"."+gr.ID_TOKEN,i=D.CACHE_PREFIX+"."+gr.CLIENT_INFO,o=D.CACHE_PREFIX+"."+gr.ERROR,a=D.CACHE_PREFIX+"."+gr.ERROR_DESC,s=this.browserStorage.getItem(n),c=this.browserStorage.getItem(i),l=this.browserStorage.getItem(o),d=this.browserStorage.getItem(a),u=[s,c,l,d],h=[gr.ID_TOKEN,gr.CLIENT_INFO,gr.ERROR,gr.ERROR_DESC];h.forEach(function(f,p){return r.migrateCacheEntry(f,u[p])})},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||!sn.isAccountEntity(i)?null:ai.toObject(new sn,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||!Wf.isIdTokenEntity(i)?(this.logger.trace("BrowserCacheManager.getIdTokenCredential: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getIdTokenCredential: cache hit"),ai.toObject(new Wf,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||!qf.isAccessTokenEntity(i)?(this.logger.trace("BrowserCacheManager.getAccessTokenCredential: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getAccessTokenCredential: cache hit"),ai.toObject(new qf,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||!kv.isRefreshTokenEntity(i)?(this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: cache hit"),ai.toObject(new kv,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||!Tv.isAppMetadataEntity(r,i)?(this.logger.trace("BrowserCacheManager.getAppMetadata: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getAppMetadata: cache hit"),ai.toObject(new Tv,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||!Xf.isServerTelemetryEntity(r,i)?(this.logger.trace("BrowserCacheManager.getServerTelemetry: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getServerTelemetry: cache hit"),ai.toObject(new Xf,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&&Iv.isAuthorityMetadataEntity(r,i)?(this.logger.trace("BrowserCacheManager.getAuthorityMetadata: cache hit"),ai.toObject(new Iv,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(Fc.WRAPPER_SKU,r),this.internalStorage.setItem(Fc.WRAPPER_VER,n)},e.prototype.getWrapperMetadata=function(){var r=this.internalStorage.getItem(Fc.WRAPPER_SKU)||"",n=this.internalStorage.getItem(Fc.WRAPPER_VER)||"";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(gr.ACTIVE_ACCOUNT),n=this.browserStorage.getItem(r);return n&&this.getAccountInfoByFilter({localAccountId:n})[0]||null},e.prototype.setActiveAccount=function(r){var n=this.generateCacheKey(gr.ACTIVE_ACCOUNT);r?(this.logger.verbose("setActiveAccount: Active account set"),this.browserStorage.setItem(n,r.localAccountId)):(this.logger.verbose("setActiveAccount: No account passed, active account not set"),this.browserStorage.removeItem(n))},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.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||!v6.isThrottlingEntity(r,i)?(this.logger.trace("BrowserCacheManager.getThrottlingCache: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getThrottlingCache: cache hit"),ai.toObject(new v6,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===Fr.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 Rx(this.browserStorage.getKeys(),this.temporaryCacheStorage.getKeys())},e.prototype.clear=function(){return X(this,void 0,void 0,function(){var r=this;return Q(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(D.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=/;";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""},e.prototype.clearMsalCookies=function(){var r=this,n=D.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,"",-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):ie.startsWith(r,D.CACHE_PREFIX)||ie.startsWith(r,gr.ADAL_ID_TOKEN)?r:D.CACHE_PREFIX+"."+this.clientId+"."+r},e.prototype.generateAuthorityKey=function(r){var n=el.parseRequestState(this.cryptoImpl,r).libraryState.id;return this.generateCacheKey(rt.AUTHORITY+"."+n)},e.prototype.generateNonceKey=function(r){var n=el.parseRequestState(this.cryptoImpl,r).libraryState.id;return this.generateCacheKey(rt.NONCE_IDTOKEN+"."+n)},e.prototype.generateStateKey=function(r){var n=el.parseRequestState(this.cryptoImpl,r).libraryState.id;return this.generateCacheKey(rt.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:_n.HOME_ACCOUNT_ID};this.setTemporaryCache(rt.CCS_CREDENTIAL,JSON.stringify(d),!0)}else if(!ie.isEmpty(o)){var d={credential:o,type:_n.UPN};this.setTemporaryCache(rt.CCS_CREDENTIAL,JSON.stringify(d),!0)}},e.prototype.resetRequestCache=function(r){var n=this;this.logger.trace("BrowserCacheManager.resetRequestCache called"),ie.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(rt.REQUEST_PARAMS)),this.removeItem(this.generateCacheKey(rt.ORIGIN_URI)),this.removeItem(this.generateCacheKey(rt.URL_HASH)),this.removeItem(this.generateCacheKey(rt.CORRELATION_ID)),this.removeItem(this.generateCacheKey(rt.CCS_CREDENTIAL)),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||"")}this.clearMsalCookies()},e.prototype.cleanRequestByInteractionType=function(r){var n=this;this.logger.trace("BrowserCacheManager.cleanRequestByInteractionType called"),this.getKeys().forEach(function(i){if(i.indexOf(rt.REQUEST_STATE)!==-1){var o=n.temporaryCacheStorage.getItem(i);if(o){var a=Lx.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(rt.REQUEST_PARAMS,i,!0)},e.prototype.getCachedRequest=function(r,n){this.logger.trace("BrowserCacheManager.getCachedRequest called");var i=this.getTemporaryCache(rt.REQUEST_PARAMS,!0);if(!i)throw ae.createNoTokenRequestCacheError();var o=this.validateAndParseJson(n.base64Decode(i));if(!o)throw ae.createUnableToParseTokenRequestCacheError();if(this.removeItem(this.generateCacheKey(rt.REQUEST_PARAMS)),ie.isEmpty(o.authority)){var a=this.generateAuthorityKey(r),s=this.getTemporaryCache(a);if(!s)throw ae.createNoCachedAuthorityError();o.authority=s}return o},e.prototype.isInteractionInProgress=function(r){var n=this.getInteractionInProgress();return r?n===this.clientId:!!n},e.prototype.getInteractionInProgress=function(){var r=D.CACHE_PREFIX+"."+rt.INTERACTION_STATUS_KEY;return this.getTemporaryCache(r,!1)},e.prototype.setInteractionInProgress=function(r){var n=this.getInteractionInProgress(),i=D.CACHE_PREFIX+"."+rt.INTERACTION_STATUS_KEY;r&&!n?this.setTemporaryCache(i,this.clientId,!1):!r&&n===this.clientId&&this.removeItem(i)},e.prototype.getLegacyLoginHint=function(){var r=this.getTemporaryCache(gr.ADAL_ID_TOKEN);r&&(this.browserStorage.removeItem(gr.ADAL_ID_TOKEN),this.logger.verbose("Cached ADAL id token retrieved."));var n=this.getTemporaryCache(gr.ID_TOKEN,!0);n&&(this.removeItem(this.generateCacheKey(gr.ID_TOKEN)),this.logger.verbose("Cached MSAL.js v1 id token retrieved"));var i=n||r;if(i){var o=new Zs(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}(ai),xH=function(t,e){var r={cacheLocation:Fr.MemoryStorage,storeAuthStateInCookie:!1,secureCookies:!1};return new Ox(t,r,zf,e)};/*! @azure/msal-browser v2.21.0 2022-01-04 */var EH=function(){function t(){}return t.prototype.sendGetRequestAsync=function(e,r){return X(this,void 0,void 0,function(){var n,i,o;return Q(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,fetch(e,{method:$i.GET,headers:this.getFetchHeaders(r)})];case 1:return n=a.sent(),[3,3];case 2:throw i=a.sent(),window.navigator.onLine?ae.createGetRequestFailedError(i,e):ae.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(),ae.createFailedToParseNetworkResponseError(e);case 6:return[2]}})})},t.prototype.sendPostRequestAsync=function(e,r){return X(this,void 0,void 0,function(){var n,i,o,a;return Q(this,function(s){switch(s.label){case 0:n=r&&r.body||"",s.label=1;case 1:return s.trys.push([1,3,,4]),[4,fetch(e,{method:$i.POST,headers:this.getFetchHeaders(r),body:n})];case 2:return i=s.sent(),[3,4];case 3:throw o=s.sent(),window.navigator.onLine?ae.createPostRequestFailedError(o,e):ae.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(),ae.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.21.0 2022-01-04 */var CH=function(){function t(){}return t.prototype.sendGetRequestAsync=function(e,r){return X(this,void 0,void 0,function(){return Q(this,function(n){return[2,this.sendRequestAsync(e,$i.GET,r)]})})},t.prototype.sendPostRequestAsync=function(e,r){return X(this,void 0,void 0,function(){return Q(this,function(n){return[2,this.sendRequestAsync(e,$i.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===$i.POST?a(ae.createPostRequestFailedError("Failed with status "+s.status,e)):a(ae.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(ae.createFailedToParseNetworkResponseError(e))}},s.onerror=function(){window.navigator.onLine?r===$i.POST?a(ae.createPostRequestFailedError("Failed with status "+s.status,e)):a(ae.createGetRequestFailedError("Failed with status "+s.status,e)):a(ae.createNoNetworkConnectivityError())},r===$i.POST&&n&&n.body)s.send(n.body);else if(r===$i.GET)s.send();else throw ae.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.21.0 2022-01-04 */var Vt=function(){function t(){}return t.clearHash=function(e){e.location.hash=D.EMPTY_STRING,typeof e.history.replaceState=="function"&&e.history.replaceState(null,D.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("#"):""},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(On.POPUP_NAME_PREFIX+".")===0},t.getCurrentUri=function(){return window.location.href.split("?")[0].split("#")[0]},t.getHomepage=function(){var e=new et(window.location.href),r=e.getUrlComponents();return r.Protocol+"//"+r.HostNameAndPort+"/"},t.getBrowserNetworkClient=function(){return window.fetch&&window.Headers?new EH:new CH},t.blockReloadInHiddenIframes=function(){var e=et.hashContainsKnownProperties(window.location.hash);if(e&&t.isInIframe())throw ae.createBlockReloadInHiddenIframeError()},t.blockRedirectInIframe=function(e,r){var n=t.isInIframe();if(e===le.Redirect&&n&&!r)throw ae.createRedirectInIframeError(n)},t.blockAcquireTokenInPopups=function(){if(t.isInPopup())throw ae.createBlockAcquireTokenInPopupsError()},t.blockNonBrowserEnvironment=function(e){if(!e)throw ae.createNonBrowserEnvironmentError()},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.21.0 2022-01-04 */var SH=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.21.0 2022-01-04 */var kH=6e4,Lv=6e3,AH=3e4;function RH(t,e){var r=t.auth,n=t.cache,i=t.system,o={clientId:"",authority:""+D.DEFAULT_AUTHORITY,knownAuthorities:[],cloudDiscoveryMetadata:"",authorityMetadata:"",redirectUri:"",postLogoutRedirectUri:"",navigateToLoginRequestUrl:!0,clientCapabilities:[],protocolMode:Yf.AAD},a={cacheLocation:Fr.SessionStorage,storeAuthStateInCookie:!1,secureCookies:!1},s={loggerCallback:function(){},logLevel:$t.Info,piiLoggingEnabled:!1},c=ot(ot({},Ix),{loggerOptions:s,networkClient:e?Vt.getBrowserNetworkClient():lH,navigationClient:new SH,loadFrameTimeout:0,windowHashTimeout:i&&i.loadFrameTimeout||kH,iframeHashTimeout:i&&i.loadFrameTimeout||Lv,navigateFrameWait:e&&Vt.detectIEOrEdge()?500:0,redirectNavigationTimeout:AH,asyncPopups:!1,allowRedirectInIframe:!1}),l={auth:ot(ot({},o),r),cache:ot(ot({},a),n),system:ot(ot({},c),i)};return l}/*! @azure/msal-browser v2.21.0 2022-01-04 */var TH="@azure/msal-browser",n5="2.21.0";/*! @azure/msal-browser v2.21.0 2022-01-04 */var xe;(function(t){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"})(xe||(xe={}));/*! @azure/msal-browser v2.21.0 2022-01-04 */var IH=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"||!sn.isAccountEntity(n))return;var i=ai.toObject(new sn,n),o=i.getAccountInfo();!e.oldValue&&e.newValue?(this.logger.info("Account was added to cache in a different window"),this.emitEvent(xe.ACCOUNT_ADDED,void 0,o)):!e.newValue&&e.oldValue&&(this.logger.info("Account was removed from cache in a different window"),this.emitEvent(xe.ACCOUNT_REMOVED,void 0,o))}catch{return}},t}();/*! @azure/msal-browser v2.21.0 2022-01-04 */var PH=function(){function t(e,r,n,i,o,a){this.config=e,this.browserStorage=r,this.browserCrypto=n,this.networkClient=this.config.system.networkClient,this.eventHandler=o,this.correlationId=a||this.browserCrypto.createNewGuid(),this.logger=i.clone(On.MSAL_SKU,n5,this.correlationId)}return t.prototype.clearCacheOnLogout=function(e){return X(this,void 0,void 0,function(){return Q(this,function(r){switch(r.label){case 0:if(!e)return[3,5];sn.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(sn.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]),[4,this.browserStorage.clear()];case 6:return r.sent(),[4,this.browserCrypto.clearKeystore()];case 7:return r.sent(),this.logger.verbose("No account provided in logout request, clearing all cache items."),[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 X(this,void 0,void 0,function(){var r,n,i,o;return Q(this,function(a){switch(a.label){case 0:if(this.logger.verbose("Initializing BaseAuthRequest"),r=e.authority||this.config.auth.authority,n=Rx(e&&e.scopes||[]),!e.authenticationScheme)e.authenticationScheme=Zt.BEARER,this.logger.verbose(`Authentication Scheme wasn't explicitly set in request, defaulting to "Bearer" request`);else{if(e.authenticationScheme===Zt.SSH){if(!e.sshJwk)throw pt.createMissingSshJwkError();if(!e.sshKid)throw pt.createMissingSshKidError()}this.logger.verbose('Authentication Scheme set to "'+e.authenticationScheme+'" as configured in Auth request')}return e.claims&&!ie.isEmpty(e.claims)?(i=e,[4,this.browserCrypto.hashString(e.claims)]):[3,2];case 1:i.requestedClaimsHash=a.sent(),a.label=2;case 2:return o=ot(ot({},e),{correlationId:this.correlationId,authority:r,scopes:n}),[2,o]}})})},t.prototype.getRedirectUri=function(e){this.logger.verbose("getRedirectUri called");var r=e||this.config.auth.redirectUri||Vt.getCurrentUri();return et.getAbsoluteUrl(r,Vt.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 dH(n,this.browserStorage)},t}();/*! @azure/msal-browser v2.21.0 2022-01-04 */var Rl=function(t){Kr(e,t);function e(r,n,i,o,a,s,c){var l=t.call(this,r,n,i,o,a,c)||this;return l.navigationClient=s,l}return e.prototype.initializeAuthorizationCodeRequest=function(r){return X(this,void 0,void 0,function(){var n,i;return Q(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=ot(ot({},r),{redirectUri:r.redirectUri,code:"",codeVerifier:n.verifier}),r.codeChallenge=n.challenge,r.codeChallengeMethod=D.S256_CODE_CHALLENGE_METHOD,[2,i]}})})},e.prototype.initializeLogoutRequest=function(r){if(this.logger.verbose("initializeLogoutRequest called",r==null?void 0:r.correlationId),this.browserStorage.isInteractionInProgress())throw ae.createInteractionInProgressError();var n=ot({correlationId:this.browserCrypto.createNewGuid()},r);return!r||r.postLogoutRedirectUri!==null?r&&r.postLogoutRedirectUri?(this.logger.verbose("Setting postLogoutRedirectUri to uri set on logout request",n.correlationId),n.postLogoutRedirectUri=et.getAbsoluteUrl(r.postLogoutRedirectUri,Vt.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=et.getAbsoluteUrl(this.config.auth.postLogoutRedirectUri,Vt.getCurrentUri())):(this.logger.verbose("Setting postLogoutRedirectUri to current page",n.correlationId),n.postLogoutRedirectUri=et.getAbsoluteUrl(Vt.getCurrentUri(),Vt.getCurrentUri())):this.logger.verbose("postLogoutRedirectUri passed as null, not setting post logout redirect uri",n.correlationId),n},e.prototype.createAuthCodeClient=function(r,n){return X(this,void 0,void 0,function(){var i;return Q(this,function(o){switch(o.label){case 0:return[4,this.getClientConfiguration(r,n)];case 1:return i=o.sent(),[2,new Px(i)]}})})},e.prototype.getClientConfiguration=function(r,n){return X(this,void 0,void 0,function(){var i;return Q(this,function(o){switch(o.label){case 0:return this.logger.verbose("getClientConfiguration called"),[4,this.getDiscoveredAuthority(n)];case 1:return i=o.sent(),[2,{authOptions:{clientId:this.config.auth.clientId,authority:i,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:On.MSAL_SKU,version:n5,cpu:"",os:""}}]}})})},e.prototype.validateAndExtractStateFromHash=function(r,n,i){this.logger.verbose("validateAndExtractStateFromHash called",i);var o=et.getDeserializedHash(r);if(!o.state)throw ae.createHashDoesNotContainStateError();var a=Lx.extractBrowserRequestState(this.browserCrypto,o.state);if(!a)throw ae.createUnableToParseStateError();if(a.interactionType!==n)throw ae.createStateInteractionTypeMismatchError();return this.logger.verbose("Returning state from hash",i),o.state},e.prototype.getDiscoveredAuthority=function(r){return X(this,void 0,void 0,function(){var n;return Q(this,function(i){switch(i.label){case 0:return this.logger.verbose("getDiscoveredAuthority called"),n={protocolMode:this.config.auth.protocolMode,knownAuthorities:this.config.auth.knownAuthorities,cloudDiscoveryMetadata:this.config.auth.cloudDiscoveryMetadata,authorityMetadata:this.config.auth.authorityMetadata},r?(this.logger.verbose("Creating discovered authority with request authority"),[4,Pv.createDiscoveredInstance(r,this.config.system.networkClient,this.browserStorage,n)]):[3,2];case 1:return[2,i.sent()];case 2:return this.logger.verbose("Creating discovered authority with configured authority"),[4,Pv.createDiscoveredInstance(this.config.auth.authority,this.config.system.networkClient,this.browserStorage,n)];case 3:return[2,i.sent()]}})})},e.prototype.preflightInteractiveRequest=function(r,n){return X(this,void 0,void 0,function(){return Q(this,function(i){switch(i.label){case 0:if(this.logger.verbose("preflightInteractiveRequest called, validating app environment",r==null?void 0:r.correlationId),Vt.blockReloadInHiddenIframes(),this.browserStorage.isInteractionInProgress(!1))throw ae.createInteractionInProgressError();return[4,this.initializeAuthorizationRequest(r,n)];case 1:return[2,i.sent()]}})})},e.prototype.initializeAuthorizationRequest=function(r,n){return X(this,void 0,void 0,function(){var i,o,a,s,c,l,d;return Q(this,function(u){switch(u.label){case 0:return this.logger.verbose("initializeAuthorizationRequest called"),i=this.getRedirectUri(r.redirectUri),o={interactionType:n},a=el.setRequestState(this.browserCrypto,r&&r.state||"",o),c=[{}],[4,this.initializeBaseRequest(r)];case 1:return s=ot.apply(void 0,[ot.apply(void 0,c.concat([u.sent()])),{redirectUri:i,state:a,nonce:r.nonce||this.browserCrypto.createNewGuid(),responseMode:Df.FRAGMENT}]),l=r.account||this.browserStorage.getActiveAccount(),l&&(this.logger.verbose("Setting validated request account"),this.logger.verbosePii("Setting validated request account: "+l),s.account=l),ie.isEmpty(s.loginHint)&&!l&&(d=this.browserStorage.getLegacyLoginHint(),d&&(s.loginHint=d)),this.browserStorage.updateCacheEntries(s.state,s.nonce,s.authority,s.loginHint||"",s.account||null),[2,s]}})})},e}(PH);/*! @azure/msal-browser v2.21.0 2022-01-04 */var yc=function(){function t(e,r){this.browserStorage=e,this.logger=r,this.unloadWindow=this.unloadWindow.bind(this)}return t.prototype.openPopup=function(e,r){try{var n=void 0;if(r.popup?(n=r.popup,this.logger.verbosePii("Navigating popup window to: "+e),n.location.assign(e)):typeof r.popup>"u"&&(this.logger.verbosePii("Opening popup window to: "+e),n=t.openSizedPopup(e,r.popupName,r.popupWindowAttributes,this.logger)),!n)throw ae.createEmptyWindowCreatedError();return n.focus&&n.focus(),this.currentWindow=n,window.addEventListener("beforeunload",this.unloadWindow),n}catch(i){throw this.logger.error("error opening popup "+i.message),this.browserStorage.setInteractionInProgress(!1),ae.createPopupWindowError(i.toString())}},t.openSizedPopup=function(e,r,n,i){var o,a,s,c,l=window.screenLeft?window.screenLeft:window.screenX,d=window.screenTop?window.screenTop:window.screenY,u=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,h=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,f=(o=n.popupSize)===null||o===void 0?void 0:o.width,p=(a=n.popupSize)===null||a===void 0?void 0:a.height,m=(s=n.popupPosition)===null||s===void 0?void 0:s.top,w=(c=n.popupPosition)===null||c===void 0?void 0:c.left;return(!f||f<0||f>u)&&(i.verbose("Default popup window width used. Window width not configured or invalid."),f=On.POPUP_WIDTH),(!p||p<0||p>h)&&(i.verbose("Default popup window height used. Window height not configured or invalid."),p=On.POPUP_HEIGHT),(!m||m<0||m>h)&&(i.verbose("Default popup window top position used. Window top not configured or invalid."),m=Math.max(0,h/2-On.POPUP_HEIGHT/2+d)),(!w||w<0||w>u)&&(i.verbose("Default popup window left position used. Window left not configured or invalid."),w=Math.max(0,u/2-On.POPUP_WIDTH/2+l)),window.open(e,r,"width="+f+", height="+p+", top="+m+", left="+w+", scrollbars=yes")},t.prototype.unloadWindow=function(e){this.browserStorage.cleanRequestByInteractionType(le.Popup),this.currentWindow&&this.currentWindow.close(),e.preventDefault()},t.prototype.cleanPopup=function(e){e&&e.close(),window.removeEventListener("beforeunload",this.unloadWindow),this.browserStorage.setInteractionInProgress(!1)},t.prototype.monitorPopupForSameOrigin=function(e){var r=this;return new Promise(function(n,i){var o=setInterval(function(){if(e.closed){r.cleanPopup(),clearInterval(o),i(ae.createUserCancelledError());return}var a=D.EMPTY_STRING;try{a=e.location.href}catch{}ie.isEmpty(a)||a==="about:blank"||(clearInterval(o),n())},On.POLL_INTERVAL_MS)})},t.generatePopupName=function(e,r){return On.POPUP_NAME_PREFIX+"."+e+"."+r.scopes.join("-")+"."+r.authority+"."+r.correlationId},t.generateLogoutPopupName=function(e,r){var n=r.account&&r.account.homeAccountId;return On.POPUP_NAME_PREFIX+"."+e+"."+n+"."+r.correlationId},t}();/*! @azure/msal-browser v2.21.0 2022-01-04 */var i5=function(){function t(e,r,n,i){this.authModule=e,this.browserStorage=r,this.authCodeRequest=n,this.browserRequestLogger=i}return t.prototype.handleCodeResponseFromHash=function(e,r,n,i){return X(this,void 0,void 0,function(){var o,a,s;return Q(this,function(c){if(this.browserRequestLogger.verbose("InteractionHandler.handleCodeResponse called"),ie.isEmpty(e))throw ae.createEmptyHashError(e);if(o=this.browserStorage.generateStateKey(r),a=this.browserStorage.getTemporaryCache(o),!a)throw de.createStateNotFoundError("Cached State");return s=this.authModule.handleFragmentResponse(e,a),[2,this.handleCodeResponseFromServer(s,r,n,i)]})})},t.prototype.handleCodeResponseFromServer=function(e,r,n,i,o){return o===void 0&&(o=!0),X(this,void 0,void 0,function(){var a,s,c,l,d,u;return Q(this,function(h){switch(h.label){case 0:if(this.browserRequestLogger.trace("InteractionHandler.handleCodeResponseFromServer called"),a=this.browserStorage.generateStateKey(r),s=this.browserStorage.getTemporaryCache(a),!s)throw de.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:h.sent(),h.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 u=h.sent(),this.browserStorage.cleanRequestByState(r),[2,u]}})})},t.prototype.updateTokenEndpointAuthority=function(e,r,n){return X(this,void 0,void 0,function(){var i,o;return Q(this,function(a){switch(a.label){case 0:return i="https://"+e+"/"+r.tenant+"/",[4,Pv.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(rt.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.21.0 2022-01-04 */var MH=function(t){Kr(e,t);function e(r,n,i,o){var a=t.call(this,r,n,i,o)||this;return a.popupUtils=new yc(n,o),a}return e.prototype.initiateAuthRequest=function(r,n){if(ie.isEmpty(r))throw this.browserRequestLogger.error("Navigate url is empty"),ae.createEmptyNavigationUriError();return this.browserStorage.setInteractionInProgress(!0),this.browserRequestLogger.infoPii("Navigate to: "+r),this.popupUtils.openPopup(r,n)},e.prototype.monitorPopupForHash=function(r){var n=this;return this.popupUtils.monitorPopupForSameOrigin(r).then(function(){var i=r.location.hash;if(Vt.clearHash(r),n.popupUtils.cleanPopup(r),!i)throw ae.createEmptyHashError(r.location.href);if(et.hashContainsKnownProperties(i))return i;throw ae.createHashDoesNotContainKnownPropertiesError()})},e}(i5);/*! @azure/msal-browser v2.21.0 2022-01-04 */var x6=function(t){Kr(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.acquireToken=function(r){return X(this,void 0,void 0,function(){var n,i,o,a,s;return Q(this,function(c){switch(c.label){case 0:return c.trys.push([0,2,,3]),[4,this.preflightInteractiveRequest(r,le.Popup)];case 1:return n=c.sent(),i=yc.generatePopupName(this.config.auth.clientId,n),o=r.popupWindowAttributes||{},this.config.system.asyncPopups?(this.logger.verbose("asyncPopups set to true, acquiring token"),[2,this.acquireTokenPopupAsync(n,i,o)]):(this.logger.verbose("asyncPopup set to false, opening popup before acquiring token"),a=yc.openSizedPopup("about:blank",i,o,this.logger),[2,this.acquireTokenPopupAsync(n,i,o,a)]);case 2:return s=c.sent(),[2,Promise.reject(s)];case 3:return[2]}})})},e.prototype.logout=function(r){try{this.logger.verbose("logoutPopup called");var n=this.initializeLogoutRequest(r),i=yc.generateLogoutPopupName(this.config.auth.clientId,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=yc.openSizedPopup("about:blank",i,s,this.logger);return this.logoutPopupAsync(n,i,s,o,c,a)}catch(l){return Promise.reject(l)}},e.prototype.acquireTokenPopupAsync=function(r,n,i,o){return X(this,void 0,void 0,function(){var a,s,c,l,d,u,h,f,p,m,w;return Q(this,function(v){switch(v.label){case 0:this.logger.verbose("acquireTokenPopupAsync called"),a=this.initializeServerTelemetryManager(Or.acquireTokenPopup),v.label=1;case 1:return v.trys.push([1,7,,8]),[4,this.initializeAuthorizationCodeRequest(r)];case 2:return s=v.sent(),[4,this.createAuthCodeClient(a,r.authority)];case 3:return c=v.sent(),this.logger.verbose("Auth code client created"),[4,c.getAuthCodeUrl(r)];case 4:return l=v.sent(),d=new MH(c,this.browserStorage,s,this.logger),u={popup:o,popupName:n,popupWindowAttributes:i},h=d.initiateAuthRequest(l,u),this.eventHandler.emitEvent(xe.POPUP_OPENED,le.Popup,{popupWindow:h},null),[4,d.monitorPopupForHash(h)];case 5:return f=v.sent(),p=this.validateAndExtractStateFromHash(f,le.Popup,r.correlationId),Bf.removeThrottle(this.browserStorage,this.config.auth.clientId,s),[4,d.handleCodeResponseFromHash(f,p,c.authority,this.networkClient)];case 6:return m=v.sent(),[2,m];case 7:throw w=v.sent(),o&&o.close(),w instanceof me&&w.setCorrelationId(this.correlationId),a.cacheFailedRequest(w),this.browserStorage.cleanRequestByState(r.state),w;case 8:return[2]}})})},e.prototype.logoutPopupAsync=function(r,n,i,o,a,s){return X(this,void 0,void 0,function(){var c,l,d,u,h,f,p,m,w;return Q(this,function(v){switch(v.label){case 0:this.logger.verbose("logoutPopupAsync called"),this.eventHandler.emitEvent(xe.LOGOUT_START,le.Popup,r),c=this.initializeServerTelemetryManager(Or.logoutPopup),v.label=1;case 1:return v.trys.push([1,8,,9]),[4,this.clearCacheOnLogout(r.account)];case 2:return v.sent(),this.browserStorage.setInteractionInProgress(!0),[4,this.createAuthCodeClient(c,o)];case 3:l=v.sent(),this.logger.verbose("Auth code client created"),d=l.getLogoutUri(r),this.eventHandler.emitEvent(xe.LOGOUT_SUCCESS,le.Popup,r),u=new yc(this.browserStorage,this.logger),h=u.openPopup(d,{popupName:n,popupWindowAttributes:i,popup:a}),this.eventHandler.emitEvent(xe.POPUP_OPENED,le.Popup,{popupWindow:h},null),v.label=4;case 4:return v.trys.push([4,6,,7]),[4,u.monitorPopupForSameOrigin(h)];case 5:return v.sent(),this.logger.verbose("Popup successfully redirected to postLogoutRedirectUri"),[3,7];case 6:return f=v.sent(),this.logger.verbose("Error occurred while monitoring popup for same origin. Session on server may remain active. Error: "+f),[3,7];case 7:return u.cleanPopup(h),s?(p={apiId:Or.logoutPopup,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},m=et.getAbsoluteUrl(s,Vt.getCurrentUri()),this.logger.verbose("Redirecting main window to url specified in the request"),this.logger.verbosePii("Redirecing main window to: "+m),this.navigationClient.navigateInternal(m,p)):this.logger.verbose("No main window navigation requested"),[3,9];case 8:throw w=v.sent(),a&&a.close(),w instanceof me&&w.setCorrelationId(this.correlationId),this.browserStorage.setInteractionInProgress(!1),this.eventHandler.emitEvent(xe.LOGOUT_FAILURE,le.Popup,null,w),this.eventHandler.emitEvent(xe.LOGOUT_END,le.Popup),c.cacheFailedRequest(w),w;case 9:return this.eventHandler.emitEvent(xe.LOGOUT_END,le.Popup),[2]}})})},e}(Rl);/*! @azure/msal-browser v2.21.0 2022-01-04 */var E6=function(t){Kr(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 X(this,void 0,void 0,function(){var i,o;return Q(this,function(a){switch(a.label){case 0:return this.browserRequestLogger.verbose("RedirectHandler.initiateAuthRequest called"),ie.isEmpty(r)?[3,7]:(n.redirectStartPage&&(this.browserRequestLogger.verbose("RedirectHandler.initiateAuthRequest: redirectStartPage set, caching start page"),this.browserStorage.setTemporaryCache(rt.ORIGIN_URI,n.redirectStartPage,!0)),this.browserStorage.setInteractionInProgress(!0),this.browserStorage.setTemporaryCache(rt.CORRELATION_ID,this.authCodeRequest.correlationId,!0),this.browserStorage.cacheCodeRequest(this.authCodeRequest,this.browserCrypto),this.browserRequestLogger.infoPii("RedirectHandler.initiateAuthRequest: Navigate to: "+r),i={apiId:Or.acquireTokenRedirect,timeout:n.redirectTimeout,noHistory:!1},typeof n.onRedirectNavigate!="function"?[3,4]:(this.browserRequestLogger.verbose("RedirectHandler.initiateAuthRequest: Invoking onRedirectNavigate callback"),o=n.onRedirectNavigate(r),o===!1?[3,2]:(this.browserRequestLogger.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.browserRequestLogger.verbose("RedirectHandler.initiateAuthRequest: onRedirectNavigate returned false, stopping navigation"),[2];case 3:return[3,6];case 4:return this.browserRequestLogger.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.browserRequestLogger.info("RedirectHandler.initiateAuthRequest: Navigate url is empty"),ae.createEmptyNavigationUriError();case 8:return[2]}})})},e.prototype.handleCodeResponseFromHash=function(r,n,i,o,a){return X(this,void 0,void 0,function(){var s,c,l,d,u,h,f;return Q(this,function(p){switch(p.label){case 0:if(this.browserRequestLogger.verbose("RedirectHandler.handleCodeResponse called"),ie.isEmpty(r))throw ae.createEmptyHashError(r);if(this.browserStorage.setInteractionInProgress(!1),s=this.browserStorage.generateStateKey(n),c=this.browserStorage.getTemporaryCache(s),!c)throw de.createStateNotFoundError("Cached State");return l=this.authModule.handleFragmentResponse(r,c),d=this.browserStorage.generateNonceKey(c),u=this.browserStorage.getTemporaryCache(d),this.authCodeRequest.code=l.code,l.cloud_instance_host_name?[4,this.updateTokenEndpointAuthority(l.cloud_instance_host_name,i,o)]:[3,2];case 1:p.sent(),p.label=2;case 2:return l.nonce=u||void 0,l.state=c,l.client_info?this.authCodeRequest.clientInfo=l.client_info:(h=this.checkCcsCredentials(),h&&(this.authCodeRequest.ccsCredential=h)),a&&Bf.removeThrottle(this.browserStorage,a,this.authCodeRequest),[4,this.authModule.acquireToken(this.authCodeRequest,l)];case 3:return f=p.sent(),this.browserStorage.cleanRequestByState(n),[2,f]}})})},e}(i5);/*! @azure/msal-browser v2.21.0 2022-01-04 */var _0=function(t){Kr(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.acquireToken=function(r){return X(this,void 0,void 0,function(){var n,i,o,a,s,c,l,d;return Q(this,function(u){switch(u.label){case 0:return[4,this.preflightInteractiveRequest(r,le.Redirect)];case 1:n=u.sent(),i=this.initializeServerTelemetryManager(Or.acquireTokenRedirect),u.label=2;case 2:return u.trys.push([2,7,,8]),[4,this.initializeAuthorizationCodeRequest(n)];case 3:return o=u.sent(),[4,this.createAuthCodeClient(i,n.authority)];case 4:return a=u.sent(),this.logger.verbose("Auth code client created"),s=new E6(a,this.browserStorage,o,this.logger,this.browserCrypto),[4,a.getAuthCodeUrl(n)];case 5:return c=u.sent(),l=this.getRedirectStartPage(r.redirectStartPage),this.logger.verbosePii("Redirect start page: "+l),[4,s.initiateAuthRequest(c,{navigationClient:this.navigationClient,redirectTimeout:this.config.system.redirectNavigationTimeout,redirectStartPage:l,onRedirectNavigate:r.onRedirectNavigate})];case 6:return[2,u.sent()];case 7:throw d=u.sent(),d instanceof me&&d.setCorrelationId(this.correlationId),i.cacheFailedRequest(d),this.browserStorage.cleanRequestByState(n.state),d;case 8:return[2]}})})},e.prototype.handleRedirectPromise=function(r){return X(this,void 0,void 0,function(){var n,i,o,a,s,c,l,d,u,h,f;return Q(this,function(p){switch(p.label){case 0:n=this.initializeServerTelemetryManager(Or.handleRedirectPromise),p.label=1;case 1:if(p.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(le.Redirect),[2,null];o=void 0;try{o=this.validateAndExtractStateFromHash(i,le.Redirect),Vt.clearHash(window),this.logger.verbose("State extracted from hash")}catch(m){return this.logger.info("handleRedirectPromise was unable to extract state due to: "+m),this.browserStorage.cleanRequestByInteractionType(le.Redirect),[2,null]}return a=this.browserStorage.getTemporaryCache(rt.ORIGIN_URI,!0)||"",s=et.removeHashFromUrl(a),c=et.removeHashFromUrl(window.location.href),s===c&&this.config.auth.navigateToLoginRequestUrl?(this.logger.verbose("Current page is loginRequestUrl, handling hash"),[4,this.handleHash(i,o,n)]):[3,3];case 2:return l=p.sent(),a.indexOf("#")>-1&&Vt.replaceHash(a),[2,l];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!Vt.isInIframe()||this.config.system.allowRedirectInIframe?(this.browserStorage.setTemporaryCache(rt.URL_HASH,i,!0),d={apiId:Or.handleRedirectPromise,timeout:this.config.system.redirectNavigationTimeout,noHistory:!0},u=!0,!a||a==="null"?(h=Vt.getHomepage(),this.browserStorage.setTemporaryCache(rt.ORIGIN_URI,h,!0),this.logger.warning("Unable to get valid login request url from cache, redirecting to home page"),[4,this.navigationClient.navigateInternal(h,d)]):[3,6]):[3,9];case 5:return u=p.sent(),[3,8];case 6:return this.logger.verbose("Navigating to loginRequestUrl: "+a),[4,this.navigationClient.navigateInternal(a,d)];case 7:u=p.sent(),p.label=8;case 8:if(!u)return[2,this.handleHash(i,o,n)];p.label=9;case 9:return[2,null];case 10:throw f=p.sent(),f instanceof me&&f.setCorrelationId(this.correlationId),n.cacheFailedRequest(f),this.browserStorage.cleanRequestByInteractionType(le.Redirect),f;case 11:return[2]}})})},e.prototype.getRedirectResponseHash=function(r){this.logger.verbose("getRedirectResponseHash called");var n=et.hashContainsKnownProperties(r),i=this.browserStorage.getTemporaryCache(rt.URL_HASH,!0);return this.browserStorage.removeItem(this.browserStorage.generateCacheKey(rt.URL_HASH)),n?(this.logger.verbose("Hash contains known properties, returning response hash"),r):(this.logger.verbose("Hash does not contain known properties, returning cached hash"),i)},e.prototype.handleHash=function(r,n,i){return X(this,void 0,void 0,function(){var o,a,s,c;return Q(this,function(l){switch(l.label){case 0:if(o=this.browserStorage.getCachedRequest(n,this.browserCrypto),this.logger.verbose("handleHash called, retrieved cached request"),a=this.browserStorage.getCachedAuthority(n),!a)throw ae.createNoCachedAuthorityError();return[4,this.createAuthCodeClient(i,a)];case 1:return s=l.sent(),this.logger.verbose("Auth code client created"),c=new E6(s,this.browserStorage,o,this.logger,this.browserCrypto),[4,c.handleCodeResponseFromHash(r,n,s.authority,this.networkClient,this.config.auth.clientId)];case 2:return[2,l.sent()]}})})},e.prototype.logout=function(r){return X(this,void 0,void 0,function(){var n,i,o,a,s,c,l;return Q(this,function(d){switch(d.label){case 0:this.logger.verbose("logoutRedirect called"),n=this.initializeLogoutRequest(r),i=this.initializeServerTelemetryManager(Or.logout),d.label=1;case 1:return d.trys.push([1,10,,11]),this.eventHandler.emitEvent(xe.LOGOUT_START,le.Redirect,r),[4,this.clearCacheOnLogout(n.account)];case 2:return d.sent(),o={apiId:Or.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(xe.LOGOUT_SUCCESS,le.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"),[4,this.navigationClient.navigateExternal(s,o)])):[3,7];case 4:return d.sent(),[2];case 5:this.logger.verbose("Logout onRedirectNavigate returned false, stopping navigation"),d.label=6;case 6:return[3,9];case 7:return[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 me&&l.setCorrelationId(this.correlationId),i.cacheFailedRequest(l),this.eventHandler.emitEvent(xe.LOGOUT_FAILURE,le.Redirect,null,l),this.eventHandler.emitEvent(xe.LOGOUT_END,le.Redirect),l;case 11:return this.eventHandler.emitEvent(xe.LOGOUT_END,le.Redirect),[2]}})})},e.prototype.getRedirectStartPage=function(r){var n=r||window.location.href;return et.getAbsoluteUrl(n,Vt.getCurrentUri())},e}(Rl);/*! @azure/msal-browser v2.21.0 2022-01-04 */var $x=function(t){Kr(e,t);function e(r,n,i,o,a){var s=t.call(this,r,n,i,o)||this;return s.navigateFrameWait=a,s}return e.prototype.initiateAuthRequest=function(r){return X(this,void 0,void 0,function(){var n;return Q(this,function(i){switch(i.label){case 0:if(ie.isEmpty(r))throw this.browserRequestLogger.info("Navigate url is empty"),ae.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<Lv&&i.browserRequestLogger.warning("system.loadFrameTimeout or system.iframeHashTimeout set to lower ("+n+"ms) than the default ("+Lv+"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(ae.createMonitorIframeTimeoutError());return}var d=D.EMPTY_STRING,u=r.contentWindow;try{d=u?u.location.href:D.EMPTY_STRING}catch{}if(!ie.isEmpty(d)){var h=u?u.location.hash:D.EMPTY_STRING;if(et.hashContainsKnownProperties(h)){i.removeHiddenIframe(r),clearInterval(l),o(h);return}}},On.POLL_INTERVAL_MS)})},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}(i5);/*! @azure/msal-browser v2.21.0 2022-01-04 */var C6=function(t){Kr(e,t);function e(r,n,i,o,a,s,c,l){var d=t.call(this,r,n,i,o,a,s,l)||this;return d.apiId=c,d}return e.prototype.acquireToken=function(r){return X(this,void 0,void 0,function(){var n,i,o,a,s,c;return Q(this,function(l){switch(l.label){case 0:if(this.logger.verbose("acquireTokenByIframe called"),ie.isEmpty(r.loginHint)&&ie.isEmpty(r.sid)&&(!r.account||ie.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!==ys.NONE)throw ae.createSilentPromptValueError(r.prompt);return[4,this.initializeAuthorizationRequest(ot(ot({},r),{prompt:ys.NONE}),le.Silent)];case 1:n=l.sent(),i=this.initializeServerTelemetryManager(this.apiId),l.label=2;case 2:return l.trys.push([2,7,,8]),[4,this.initializeAuthorizationCodeRequest(n)];case 3:return o=l.sent(),[4,this.createAuthCodeClient(i,n.authority)];case 4:return a=l.sent(),this.logger.verbose("Auth code client created"),[4,a.getAuthCodeUrl(n)];case 5:return s=l.sent(),[4,this.silentTokenHelper(s,o,a,this.logger)];case 6:return[2,l.sent()];case 7:throw c=l.sent(),c instanceof me&&c.setCorrelationId(this.correlationId),i.cacheFailedRequest(c),this.browserStorage.cleanRequestByState(n.state),c;case 8:return[2]}})})},e.prototype.logout=function(){return Promise.reject(ae.createSilentLogoutUnsupportedError())},e.prototype.silentTokenHelper=function(r,n,i,o){return X(this,void 0,void 0,function(){var a,s,c,l;return Q(this,function(d){switch(d.label){case 0:return a=new $x(i,this.browserStorage,n,o,this.config.system.navigateFrameWait),[4,a.initiateAuthRequest(r)];case 1:return s=d.sent(),[4,a.monitorIframeForHash(s,this.config.system.iframeHashTimeout)];case 2:return c=d.sent(),l=this.validateAndExtractStateFromHash(c,le.Silent,n.correlationId),[2,a.handleCodeResponseFromHash(c,l,i.authority,this.networkClient)]}})})},e}(Rl);/*! @azure/msal-browser v2.21.0 2022-01-04 */var ZH=function(t){Kr(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.acquireToken=function(r){return X(this,void 0,void 0,function(){var n,i,o,a,s=this;return Q(this,function(c){switch(c.label){case 0:return i=[ot({},r)],[4,this.initializeBaseRequest(r)];case 1:return n=ot.apply(void 0,i.concat([c.sent()])),o=this.initializeServerTelemetryManager(Or.acquireTokenSilent_silentFlow),[4,this.createRefreshTokenClient(o,n.authority)];case 2:return a=c.sent(),this.logger.verbose("Refresh token client created"),[2,a.acquireTokenByRefreshToken(n).catch(function(l){throw l instanceof me&&l.setCorrelationId(s.correlationId),o.cacheFailedRequest(l),l})]}})})},e.prototype.logout=function(){return Promise.reject(ae.createSilentLogoutUnsupportedError())},e.prototype.createRefreshTokenClient=function(r,n){return X(this,void 0,void 0,function(){var i;return Q(this,function(o){switch(o.label){case 0:return[4,this.getClientConfiguration(r,n)];case 1:return i=o.sent(),[2,new Mx(i)]}})})},e}(Rl);/*! @azure/msal-browser v2.21.0 2022-01-04 */var HH=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 ae.createUnableToLoadTokenError("Please ensure server response includes id token.");if(e.account)this.loadIdToken(r.id_token,e.account.homeAccountId,e.account.environment,e.account.tenantId,n),this.loadAccessToken(e,r,e.account.homeAccountId,e.account.environment,e.account.tenantId,n);else if(e.authority){var i={protocolMode:this.config.auth.protocolMode,knownAuthorities:this.config.auth.knownAuthorities,cloudDiscoveryMetadata:this.config.auth.cloudDiscoveryMetadata,authorityMetadata:this.config.auth.authorityMetadata},o=new Zx(e.authority,this.config.system.networkClient,this.storage,i);if(n.clientInfo)this.logger.trace("TokenCache - homeAccountId from options"),this.loadIdToken(r.id_token,n.clientInfo,o.hostnameAndPort,o.tenant,n),this.loadAccessToken(e,r,n.clientInfo,o.hostnameAndPort,o.tenant,n);else if(r.client_info)this.logger.trace("TokenCache - homeAccountId from response"),this.loadIdToken(r.id_token,r.client_info,o.hostnameAndPort,o.tenant,n),this.loadAccessToken(e,r,r.client_info,o.hostnameAndPort,o.tenant,n);else throw ae.createUnableToLoadTokenError("Please provide clientInfo in the response or options.")}else throw ae.createUnableToLoadTokenError("Please provide a request with an account or a request with authority.")},t.prototype.loadIdToken=function(e,r,n,i,o){var a=Wf.createIdTokenEntity(r,n,e,this.config.auth.clientId,i),s=new Zs(e,this.cryptoObj),c=o.clientInfo?sn.createAccount(o.clientInfo,r,s,void 0,void 0,void 0,void 0,n):sn.createGenericAccount(r,s,void 0,void 0,void 0,void 0,n);if(this.isBrowserEnvironment)this.logger.verbose("TokenCache - loading id token"),this.storage.setAccount(c),this.storage.setIdTokenCredential(a);else throw ae.createUnableToLoadTokenError("loadExternalTokens is designed to work in browser environments only.")},t.prototype.loadAccessToken=function(e,r,n,i,o,a){if(!r.access_token){this.logger.verbose("TokenCache - No access token provided for caching");return}if(!r.expires_in)throw ae.createUnableToLoadTokenError("Please ensure server response includes expires_in value.");if(!a.extendedExpiresOn)throw ae.createUnableToLoadTokenError("Please provide an extendedExpiresOn value in the options.");var s=new Fi(e.scopes).printScopes(),c=r.expires_in,l=a.extendedExpiresOn,d=qf.createAccessTokenEntity(n,i,r.access_token,this.config.auth.clientId,o,s,c,l,this.cryptoObj);if(this.isBrowserEnvironment)this.logger.verbose("TokenCache - loading access token"),this.storage.setAccessTokenCredential(d);else throw ae.createUnableToLoadTokenError("loadExternalTokens is designed to work in browser environments only.")},t}();/*! @azure/msal-browser v2.21.0 2022-01-04 */var LH=function(t){Kr(e,t);function e(r){var n=t.call(this,r)||this;return n.includeRedirectUri=!1,n}return e}(Px);/*! @azure/msal-browser v2.21.0 2022-01-04 */var OH=function(t){Kr(e,t);function e(r,n,i,o,a,s,c,l){var d=t.call(this,r,n,i,o,a,s,l)||this;return d.apiId=c,d}return e.prototype.acquireToken=function(r){return X(this,void 0,void 0,function(){var n,i,o,a,s,c,l;return Q(this,function(d){switch(d.label){case 0:if(this.logger.trace("SilentAuthCodeClient.acquireToken called"),!r.code)throw ae.createAuthCodeRequiredError();return[4,this.initializeAuthorizationRequest(r,le.Silent)];case 1:n=d.sent(),i=this.initializeServerTelemetryManager(this.apiId),d.label=2;case 2:return d.trys.push([2,4,,5]),o=ot(ot({},n),{code:r.code}),[4,this.getClientConfiguration(i,n.authority)];case 3:return a=d.sent(),s=new LH(a),this.logger.verbose("Auth code client created"),c=new $x(s,this.browserStorage,o,this.logger,this.config.system.navigateFrameWait),[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 me&&l.setCorrelationId(this.correlationId),i.cacheFailedRequest(l),this.browserStorage.cleanRequestByState(n.state),l;case 5:return[2]}})})},e.prototype.logout=function(){return Promise.reject(ae.createSilentLogoutUnsupportedError())},e}(Rl);/*! @azure/msal-browser v2.21.0 2022-01-04 */var $H=function(){function t(e){this.isBrowserEnvironment=typeof window<"u",this.config=RH(e,this.isBrowserEnvironment),this.logger=new t5(this.config.system.loggerOptions,TH,n5),this.networkClient=this.config.system.networkClient,this.navigationClient=this.config.system.navigationClient,this.redirectResponse=new Map,this.hybridAuthCodeResponses=new Map,this.browserCrypto=this.isBrowserEnvironment?new wH(this.logger):zf,this.eventHandler=new IH(this.logger,this.browserCrypto),this.browserStorage=this.isBrowserEnvironment?new Ox(this.config.auth.clientId,this.config.cache,this.browserCrypto,this.logger):xH(this.config.auth.clientId,this.logger),this.tokenCache=new HH(this.config,this.browserStorage,this.logger,this.browserCrypto)}return t.prototype.handleRedirectPromise=function(e){return X(this,void 0,void 0,function(){var r,n,i,o,a,s=this;return Q(this,function(c){return this.logger.verbose("handleRedirectPromise called"),r=this.getAllAccounts(),this.isBrowserEnvironment?(n=e||D.EMPTY_STRING,i=this.redirectResponse.get(n),typeof i>"u"?(this.eventHandler.emitEvent(xe.HANDLE_REDIRECT_START,le.Redirect),this.logger.verbose("handleRedirectPromise has been called for the first time, storing the promise"),o=this.browserStorage.getTemporaryCache(rt.CORRELATION_ID,!0)||"",a=new _0(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,o),i=a.handleRedirectPromise(e).then(function(l){if(l){var d=r.length<s.getAllAccounts().length;d?(s.eventHandler.emitEvent(xe.LOGIN_SUCCESS,le.Redirect,l),s.logger.verbose("handleRedirectResponse returned result, login success")):(s.eventHandler.emitEvent(xe.ACQUIRE_TOKEN_SUCCESS,le.Redirect,l),s.logger.verbose("handleRedirectResponse returned result, acquire token success"))}return s.eventHandler.emitEvent(xe.HANDLE_REDIRECT_END,le.Redirect),l}).catch(function(l){throw r.length>0?s.eventHandler.emitEvent(xe.ACQUIRE_TOKEN_FAILURE,le.Redirect,null,l):s.eventHandler.emitEvent(xe.LOGIN_FAILURE,le.Redirect,null,l),s.eventHandler.emitEvent(xe.HANDLE_REDIRECT_END,le.Redirect),l}),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 X(this,void 0,void 0,function(){var r,n,i=this;return Q(this,function(o){return this.preflightBrowserEnvironmentCheck(le.Redirect),this.logger.verbose("acquireTokenRedirect called"),r=this.getAllAccounts().length>0,r?this.eventHandler.emitEvent(xe.ACQUIRE_TOKEN_START,le.Redirect,e):this.eventHandler.emitEvent(xe.LOGIN_START,le.Redirect,e),n=new _0(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,e.correlationId),[2,n.acquireToken(e).catch(function(a){throw r?i.eventHandler.emitEvent(xe.ACQUIRE_TOKEN_FAILURE,le.Redirect,null,a):i.eventHandler.emitEvent(xe.LOGIN_FAILURE,le.Redirect,null,a),a})]})})},t.prototype.acquireTokenPopup=function(e){var r=this;try{this.preflightBrowserEnvironmentCheck(le.Popup),this.logger.verbose("acquireTokenPopup called",e.correlationId)}catch(o){return Promise.reject(o)}var n=this.getAllAccounts();n.length>0?this.eventHandler.emitEvent(xe.ACQUIRE_TOKEN_START,le.Popup,e):this.eventHandler.emitEvent(xe.LOGIN_START,le.Popup,e);var i=new x6(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,e.correlationId);return i.acquireToken(e).then(function(o){var a=n.length<r.getAllAccounts().length;return a?r.eventHandler.emitEvent(xe.LOGIN_SUCCESS,le.Popup,o):r.eventHandler.emitEvent(xe.ACQUIRE_TOKEN_SUCCESS,le.Popup,o),o}).catch(function(o){return n.length>0?r.eventHandler.emitEvent(xe.ACQUIRE_TOKEN_FAILURE,le.Popup,null,o):r.eventHandler.emitEvent(xe.LOGIN_FAILURE,le.Popup,null,o),Promise.reject(o)})},t.prototype.ssoSilent=function(e){return X(this,void 0,void 0,function(){var r,n,i;return Q(this,function(o){switch(o.label){case 0:this.preflightBrowserEnvironmentCheck(le.Silent),this.logger.verbose("ssoSilent called",e.correlationId),this.eventHandler.emitEvent(xe.SSO_SILENT_START,le.Silent,e),o.label=1;case 1:return o.trys.push([1,3,,4]),r=new C6(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,Or.ssoSilent,e.correlationId),[4,r.acquireToken(e)];case 2:return n=o.sent(),this.eventHandler.emitEvent(xe.SSO_SILENT_SUCCESS,le.Silent,n),[2,n];case 3:throw i=o.sent(),this.eventHandler.emitEvent(xe.SSO_SILENT_FAILURE,le.Silent,null,i),i;case 4:return[2]}})})},t.prototype.acquireTokenByCode=function(e){return X(this,void 0,void 0,function(){var r,n=this;return Q(this,function(i){this.preflightBrowserEnvironmentCheck(le.Silent),this.logger.trace("acquireTokenByCode called",e.correlationId),this.eventHandler.emitEvent(xe.ACQUIRE_TOKEN_BY_CODE_START,le.Silent,e);try{if(!e.code)throw ae.createAuthCodeRequiredError();return r=this.hybridAuthCodeResponses.get(e.code),r?this.logger.verbose("Existing acquireTokenByCode request found",e.correlationId):(this.logger.verbose("Initiating new acquireTokenByCode request",e.correlationId),r=this.acquireTokenByCodeAsync(e).then(function(o){return n.eventHandler.emitEvent(xe.ACQUIRE_TOKEN_BY_CODE_SUCCESS,le.Silent,o),n.hybridAuthCodeResponses.delete(e.code),o}).catch(function(o){throw n.hybridAuthCodeResponses.delete(e.code),o}),this.hybridAuthCodeResponses.set(e.code,r)),[2,r]}catch(o){throw this.eventHandler.emitEvent(xe.ACQUIRE_TOKEN_BY_CODE_FAILURE,le.Silent,null,o),o}return[2]})})},t.prototype.acquireTokenByCodeAsync=function(e){return X(this,void 0,void 0,function(){var r,n;return Q(this,function(i){switch(i.label){case 0:return this.logger.trace("acquireTokenByCodeAsync called",e.correlationId),r=new OH(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,Or.acquireTokenByCode,e.correlationId),[4,r.acquireToken(e)];case 1:return n=i.sent(),[2,n]}})})},t.prototype.acquireTokenByRefreshToken=function(e){return X(this,void 0,void 0,function(){var r,n=this;return Q(this,function(i){return this.eventHandler.emitEvent(xe.ACQUIRE_TOKEN_NETWORK_START,le.Silent,e),Vt.blockReloadInHiddenIframes(),r=new ZH(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,e.correlationId),[2,r.acquireToken(e).catch(function(o){var a=o instanceof Su,s=o instanceof ds,c=o.errorCode===On.INVALID_GRANT_ERROR;if(a&&c&&!s){n.logger.verbose("Refresh token expired or invalid, attempting acquire token by iframe",e.correlationId);var l=new C6(n.config,n.browserStorage,n.browserCrypto,n.logger,n.eventHandler,n.navigationClient,Or.acquireTokenSilent_authCode,e.correlationId);return l.acquireToken(e)}throw o})]})})},t.prototype.logout=function(e){return X(this,void 0,void 0,function(){return Q(this,function(r){return this.logger.warning("logout API is deprecated and will be removed in msal-browser v3.0.0. Use logoutRedirect instead."),[2,this.logoutRedirect(e)]})})},t.prototype.logoutRedirect=function(e){return X(this,void 0,void 0,function(){var r;return Q(this,function(n){return this.preflightBrowserEnvironmentCheck(le.Redirect),r=new _0(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,e==null?void 0:e.correlationId),[2,r.logout(e)]})})},t.prototype.logoutPopup=function(e){try{this.preflightBrowserEnvironmentCheck(le.Popup);var r=new x6(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,e==null?void 0:e.correlationId);return r.logout(e)}catch(n){return Promise.reject(n)}},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!ie.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!ie.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!ie.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){if(this.logger.verbose("preflightBrowserEnvironmentCheck started"),Vt.blockNonBrowserEnvironment(this.isBrowserEnvironment),Vt.blockRedirectInIframe(e,this.config.system.allowRedirectInIframe),Vt.blockReloadInHiddenIframes(),Vt.blockAcquireTokenInPopups(),e===le.Redirect&&this.config.cache.cacheLocation===Fr.MemoryStorage&&!this.config.cache.storeAuthStateInCookie)throw Hv.createInMemoryRedirectUnavailableError()},t.prototype.addEventCallback=function(e){return this.eventHandler.addEventCallback(e)},t.prototype.removeEventCallback=function(e){this.eventHandler.removeEventCallback(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}();/*! @azure/msal-browser v2.21.0 2022-01-04 */var DH=function(t){Kr(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.acquireToken=function(r){return X(this,void 0,void 0,function(){var n,i,o,a;return Q(this,function(s){switch(s.label){case 0:return n=this.initializeServerTelemetryManager(Or.acquireTokenSilent_silentFlow),[4,this.createSilentFlowClient(n,r.authority)];case 1:i=s.sent(),this.logger.verbose("Silent auth client created"),s.label=2;case 2:return s.trys.push([2,4,,5]),[4,i.acquireCachedToken(r)];case 3:return o=s.sent(),this.eventHandler.emitEvent(xe.ACQUIRE_TOKEN_SUCCESS,le.Silent,o),[2,o];case 4:throw a=s.sent(),a instanceof ae&&a.errorCode===te.signingKeyNotFoundInStorage.code&&this.logger.verbose("Signing keypair for bound access token not found. Refreshing bound access token and generating a new crypto keypair."),a;case 5:return[2]}})})},e.prototype.logout=function(){return Promise.reject(ae.createSilentLogoutUnsupportedError())},e.prototype.createSilentFlowClient=function(r,n){return X(this,void 0,void 0,function(){var i;return Q(this,function(o){switch(o.label){case 0:return[4,this.getClientConfiguration(r,n)];case 1:return i=o.sent(),[2,new oH(i)]}})})},e.prototype.initializeSilentRequest=function(r,n){return X(this,void 0,void 0,function(){var i;return Q(this,function(o){switch(o.label){case 0:return i=[ot({},r)],[4,this.initializeBaseRequest(r)];case 1:return[2,ot.apply(void 0,[ot.apply(void 0,i.concat([o.sent()])),{account:n,forceRefresh:r.forceRefresh||!1}])]}})})},e}(Rl);/*! @azure/msal-browser v2.21.0 2022-01-04 */var NH=function(t){Kr(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 X(this,void 0,void 0,function(){return Q(this,function(n){return this.logger.verbose("loginRedirect called"),[2,this.acquireTokenRedirect(r||y6)]})})},e.prototype.loginPopup=function(r){return this.logger.verbose("loginPopup called"),this.acquireTokenPopup(r||y6)},e.prototype.acquireTokenSilent=function(r){return X(this,void 0,void 0,function(){var n,i,o,a,s,c=this;return Q(this,function(l){if(this.preflightBrowserEnvironmentCheck(le.Silent),this.logger.verbose("acquireTokenSilent called",r.correlationId),n=r.account||this.getActiveAccount(),!n)throw ae.createNoAccountError();return i={clientId:this.config.auth.clientId,authority:r.authority||"",scopes:r.scopes,homeAccountIdentifier:n.homeAccountId,claims:r.claims,authenticationScheme:r.authenticationScheme,resourceRequestMethod:r.resourceRequestMethod,resourceRequestUri:r.resourceRequestUri,shrClaims:r.shrClaims,sshKid:r.sshKid},o=JSON.stringify(i),a=this.activeSilentTokenRequests.get(o),typeof a>"u"?(this.logger.verbose("acquireTokenSilent called for the first time, storing active request",r.correlationId),s=this.acquireTokenSilentAsync(r,n).then(function(d){return c.activeSilentTokenRequests.delete(o),d}).catch(function(d){throw c.activeSilentTokenRequests.delete(o),d}),this.activeSilentTokenRequests.set(o,s),[2,s]):(this.logger.verbose("acquireTokenSilent has been called previously, returning the result from the first call",r.correlationId),[2,a])})})},e.prototype.acquireTokenSilentAsync=function(r,n){return X(this,void 0,void 0,function(){var i,o,a=this;return Q(this,function(s){switch(s.label){case 0:return i=new DH(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,r.correlationId),[4,i.initializeSilentRequest(r,n)];case 1:return o=s.sent(),this.eventHandler.emitEvent(xe.ACQUIRE_TOKEN_START,le.Silent,r),[2,i.acquireToken(o).catch(function(){return X(a,void 0,void 0,function(){var c,l;return Q(this,function(d){switch(d.label){case 0:return d.trys.push([0,2,,3]),[4,this.acquireTokenByRefreshToken(o)];case 1:return c=d.sent(),this.eventHandler.emitEvent(xe.ACQUIRE_TOKEN_SUCCESS,le.Silent,c),[2,c];case 2:throw l=d.sent(),this.eventHandler.emitEvent(xe.ACQUIRE_TOKEN_FAILURE,le.Silent,null,l),l;case 3:return[2]}})})})]}})})},e}($H);const S6="redirect";var k6=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(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};class VH extends NH{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=S6,n=!0){var i;return k6(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=S6,n=!0){return k6(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 FH=(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")},zH=(t,e,r,n,i)=>{const o=Object.assign({clientId:e,redirectUri:FH(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||VH)(t,{auth:o,cache:a,system:s})};class Dx extends t5{constructor(e){super({logLevel:e,loggerCallback:(...r)=>this.loggerCallback(...r)}),this.getLogType=r=>{switch(r){case $t.Error:return"error";case $t.Warning:return"warn";case $t.Info:return"info";case $t.Verbose:default:return"debug"}}}loggerCallback(e,r,n){console[this.getLogType(e)]("%c FUSION::MSAL %c %s","border: 1px solid;","border: none;",r)}}var b0=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(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const jH="default";class UH{get defaultClient(){return this.getClient(jH)}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=zH(r.tenantId,r.clientId,r.redirectUri,r.config);return n.setLogger(new Dx(0)),n}handleRedirect(){return b0(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 b0(this,void 0,void 0,function*(){const r=yield this.acquireToken(e);return r?r.accessToken:void 0})}login(){return b0(this,void 0,void 0,function*(){yield this.defaultClient.login()})}}var BH=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(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const Nx={name:"auth",configure:t=>{var e;const r=new FZ;return!((e=t==null?void 0:t.auth)===null||e===void 0)&&e.defaultConfig&&r.configureDefault(t.auth.defaultConfig),r},initialize:({config:t})=>BH(void 0,void 0,void 0,function*(){const e=new UH(t);return t.requiresAuth&&(yield e.handleRedirect(),e.defaultAccount||(yield e.login())),e})},WH=(t,e)=>({module:Nx,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??{};n&&Object.entries(n).forEach(([i,o])=>r.configureClient(i,o))}});var o5=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(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const qH=t=>{var e;return{id:t.id,isChildType:t.isChildType,parentTypeIds:(e=t.parentTypeIds)!==null&&e!==void 0?e:[]}},a5=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:qH(t.type),value:(i=t.value)!==null&&i!==void 0?i:{}}},GH=t=>o5(void 0,void 0,void 0,function*(){const e=yield t.json();return a5(e)}),KH=t=>o5(void 0,void 0,void 0,function*(){return(yield t.json()).map(a5)}),YH=t=>o5(void 0,void 0,void 0,function*(){return(yield t.json()).map(a5)});var XH=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},QH=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)},M1;class JH{constructor(e,r={}){this.config=r,M1.set(this,void 0),XH(this,M1,e,"f")}requireInstance(e){return QH(this,M1,"f").requireInstance(e)}setContextType(e){this.config.contextType=e}setContextFilter(e){this.config.contextFilter=e}connectParentContext(e){this.config.connectParentContext=e}setContextParameterFn(e){this.config.contextParameterFn=e}setValidateContext(e){this.config.validateContext=e}setResolveContext(e){this.config.resolveContext=e}setResolveInitialContext(e){this.config.resolveInitialContext=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},e.related&&(this.config.client.related=typeof e.related=="function"?{key:n=>JSON.stringify(n),client:{fn:e.related},expire:r}:e.related)}}M1=new WeakMap;const eL=/^(?:(?:[0-9a-fA-F]){8}-(?:[0-9a-fA-F]){4}-(?:[0-9a-fA-F]){4}-(?:[0-9a-fA-F]){4}-(?:[0-9a-fA-F]){12})$/,tL=t=>t.replace(/^\/+/,"").split("/").shift(),rL=t=>!!t.match(eL),nL=(t,e)=>r=>{const{extract:n=tL,validate:i=rL}=e??{},o=n(r);if(!o)return zt;if(i(o))return t.contextClient.resolveContext(o);throw Error(`Failed to validate context [${o}] from path [${r}]`)},iL=({ref:t})=>{const e=t==null?void 0:t.context;if(!e)throw Error(["resolveContextFromNavigation","ref does not support context!"].join(`
70
- `));return e.currentContext?yi(e.currentContext):zt},oL=t=>({ref:e,modules:r})=>{const{context:n,navigation:i}=r,o=nL(n,t==null?void 0:t.path);return oZ(i?o(i.path.pathname):zt,iL({ref:e,modules:r})).pipe(yZ())};var Vh=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(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})},A6=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)},Z1;class aL{constructor(){this.defaultExpireTime=1*60*1e3,Z1.set(this,[])}addConfigBuilder(e){A6(this,Z1,"f").push(e)}_getServiceProvider(e){var r;return Vh(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,n;return Vh(this,void 0,void 0,function*(){const i=yield A6(this,Z1,"f").reduce((o,a)=>Vh(this,void 0,void 0,function*(){const s=new JH(e,yield o);return yield Promise.resolve(a(s)),Object.assign(o,s.config)}),Promise.resolve({}));return(r=i.resolveInitialContext)!==null&&r!==void 0||(i.resolveInitialContext=oL()),(n=i.client)!==null&&n!==void 0||(i.client=yield(()=>Vh(this,void 0,void 0,function*(){const a=yield(yield this._getServiceProvider(e)).createContextClient("json$");return{get:{client:{fn:s=>a.get("v1",s,{selector:GH})},key:({id:s})=>s,expire:this.defaultExpireTime},query:{client:{fn:s=>a.query("v1",{query:s},{selector:KH})},key:s=>JSON.stringify(s),expire:this.defaultExpireTime},related:{client:{fn:s=>a.related("v1",{id:s.item.id,query:{filter:s.filter}},{selector:YH})},key:s=>JSON.stringify(s),expire:this.defaultExpireTime}}}))()),i})}}Z1=new WeakMap;var sL=function t(e,r){if(e===r)return!0;if(e&&r&&typeof e=="object"&&typeof r=="object"){if(e.constructor!==r.constructor)return!1;var n,i,o;if(Array.isArray(e)){if(n=e.length,n!=r.length)return!1;for(i=n;i--!==0;)if(!t(e[i],r[i]))return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if(o=Object.keys(e),n=o.length,n!==Object.keys(r).length)return!1;for(i=n;i--!==0;)if(!Object.prototype.hasOwnProperty.call(r,o[i]))return!1;for(i=n;i--!==0;){var a=o[i];if(!t(e[a],r[a]))return!1}return!0}return e!==e&&r!==r};const cL=Ug(sL);var R6;(function(t){t.IDLE="idle",t.ACTIVE="active",t.FAILED="failed",t.CANCELED="canceled"})(R6||(R6={}));const lL=t=>e=>e.pipe(pZ(t)),dL=t=>e=>e.pipe(mi(t)),uL=t=>e=>e.pipe(St(t)),hL=t=>t.pipe(We(e=>e.value));let Fh;const fL=new Uint8Array(16);function pL(){if(!Fh&&(Fh=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Fh))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Fh(fL)}const mL=/^(?:[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 vL(t){return typeof t=="string"&&mL.test(t)}const vr=[];for(let t=0;t<256;++t)vr.push((t+256).toString(16).slice(1));function Vx(t,e=0){return(vr[t[e+0]]+vr[t[e+1]]+vr[t[e+2]]+vr[t[e+3]]+"-"+vr[t[e+4]]+vr[t[e+5]]+"-"+vr[t[e+6]]+vr[t[e+7]]+"-"+vr[t[e+8]]+vr[t[e+9]]+"-"+vr[t[e+10]]+vr[t[e+11]]+vr[t[e+12]]+vr[t[e+13]]+vr[t[e+14]]+vr[t[e+15]]).toLowerCase()}function gL(t){if(!vL(t))throw TypeError("Invalid UUID");let e;const 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 yL(t){t=unescape(encodeURIComponent(t));const e=[];for(let r=0;r<t.length;++r)e.push(t.charCodeAt(r));return e}const _L="6ba7b810-9dad-11d1-80b4-00c04fd430c8",bL="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function wL(t,e,r){function n(i,o,a,s){var c;if(typeof i=="string"&&(i=yL(i)),typeof o=="string"&&(o=gL(o)),((c=o)===null||c===void 0?void 0:c.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let l=new Uint8Array(16+i.length);if(l.set(o),l.set(i,o.length),l=r(l),l[6]=l[6]&15|e,l[8]=l[8]&63|128,a){s=s||0;for(let d=0;d<16;++d)a[s+d]=l[d];return a}return Vx(l)}try{n.name=t}catch{}return n.DNS=_L,n.URL=bL,n}const xL=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),T6={randomUUID:xL};function Qf(t,e,r){if(T6.randomUUID&&!e&&!t)return T6.randomUUID();t=t||{};const n=t.random||(t.rng||pL)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,e){r=r||0;for(let i=0;i<16;++i)e[r+i]=n[i];return e}return Vx(n)}function EL(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 w0(t,e){return t<<e|t>>>32-e}function CL(t){const e=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof t=="string"){const a=unescape(encodeURIComponent(t));t=[];for(let s=0;s<a.length;++s)t.push(a.charCodeAt(s))}else Array.isArray(t)||(t=Array.prototype.slice.call(t));t.push(128);const n=t.length/4+2,i=Math.ceil(n/16),o=new Array(i);for(let a=0;a<i;++a){const s=new Uint32Array(16);for(let c=0;c<16;++c)s[c]=t[a*64+c*4]<<24|t[a*64+c*4+1]<<16|t[a*64+c*4+2]<<8|t[a*64+c*4+3];o[a]=s}o[i-1][14]=(t.length-1)*8/Math.pow(2,32),o[i-1][14]=Math.floor(o[i-1][14]),o[i-1][15]=(t.length-1)*8&4294967295;for(let a=0;a<i;++a){const s=new Uint32Array(80);for(let f=0;f<16;++f)s[f]=o[a][f];for(let f=16;f<80;++f)s[f]=w0(s[f-3]^s[f-8]^s[f-14]^s[f-16],1);let c=r[0],l=r[1],d=r[2],u=r[3],h=r[4];for(let f=0;f<80;++f){const p=Math.floor(f/20),m=w0(c,5)+EL(p,l,d,u)+h+e[p]+s[f]>>>0;h=u,u=d,d=w0(l,30)>>>0,l=c,c=m}r[0]=r[0]+c>>>0,r[1]=r[1]+l>>>0,r[2]=r[2]+d>>>0,r[3]=r[3]+u>>>0,r[4]=r[4]+h>>>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]}const SL=wL("v5",80,CL),kL=SL;class Ov extends Error{constructor(e,r){super(r.message,{cause:r.cause}),this.type=e,this.name="QueryClientError",this.request=r.request}}function gn(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 ga(t){return!!t&&!!t[Be]}function _i(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)===OL}(t)||Array.isArray(t)||!!t[$6]||!!(!((e=t.constructor)===null||e===void 0)&&e[$6])||s5(t)||c5(t))}function I6(t){return ga(t)||gn(23,t),t[Be].t}function hl(t,e,r){r===void 0&&(r=!1),Tl(t)===0?(r?Object.keys:f5)(t).forEach(function(n){r&&typeof n=="symbol"||e(n,t[n],t)}):t.forEach(function(n,i){return e(i,n,t)})}function Tl(t){var e=t[Be];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:s5(t)?2:c5(t)?3:0}function $v(t,e){return Tl(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function AL(t,e){return Tl(t)===2?t.get(e):t[e]}function Fx(t,e,r){var n=Tl(t);n===2?t.set(e,r):n===3?(t.delete(e),t.add(r)):t[e]=r}function RL(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function s5(t){return HL&&t instanceof Map}function c5(t){return LL&&t instanceof Set}function sr(t){return t.o||t.t}function l5(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=$L(t);delete e[Be];for(var r=f5(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 d5(t,e){return e===void 0&&(e=!1),u5(t)||ga(t)||!_i(t)||(Tl(t)>1&&(t.set=t.add=t.clear=t.delete=TL),Object.freeze(t),e&&hl(t,function(r,n){return d5(n,!0)},!0)),t}function TL(){gn(2)}function u5(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function Ki(t){var e=Nv[t];return e||gn(18,t),e}function IL(t,e){Nv[t]||(Nv[t]=e)}function Jf(){return Au}function x0(t,e){e&&(Ki("Patches"),t.u=[],t.s=[],t.v=e)}function e2(t){Dv(t),t.p.forEach(PL),t.p=null}function Dv(t){t===Au&&(Au=t.l)}function P6(t){return Au={p:[],l:Au,h:t,m:!0,_:0}}function PL(t){var e=t[Be];e.i===0||e.i===1?e.j():e.O=!0}function E0(t,e){e._=e.p.length;var r=e.p[0],n=t!==void 0&&t!==r;return e.h.g||Ki("ES5").S(e,t,n),n?(r[Be].P&&(e2(e),gn(4)),_i(t)&&(t=t2(e,t),e.l||r2(e,t)),e.u&&Ki("Patches").M(r[Be].t,t,e.u,e.s)):t=t2(e,r,[]),e2(e),e.u&&e.v(e.u,e.s),t!==zx?t:void 0}function t2(t,e,r){if(u5(e))return e;var n=e[Be];if(!n)return hl(e,function(o,a){return M6(t,n,e,o,a,r)},!0),e;if(n.A!==t)return e;if(!n.P)return r2(t,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=n.i===4||n.i===5?n.o=l5(n.k):n.o;hl(n.i===3?new Set(i):i,function(o,a){return M6(t,n,i,o,a,r)}),r2(t,i,!1),r&&t.u&&Ki("Patches").R(n,r,t.u,t.s)}return n.o}function M6(t,e,r,n,i,o){if(ga(i)){var a=t2(t,i,o&&e&&e.i!==3&&!$v(e.D,n)?o.concat(n):void 0);if(Fx(r,n,a),!ga(a))return;t.m=!1}if(_i(i)&&!u5(i)){if(!t.h.F&&t._<1)return;t2(t,i),e&&e.A.l||r2(t,i)}}function r2(t,e,r){r===void 0&&(r=!1),t.h.F&&t.m&&d5(e,r)}function C0(t,e){var r=t[Be];return(r?sr(r):t)[e]}function Z6(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 po(t){t.P||(t.P=!0,t.l&&po(t.l))}function S0(t){t.o||(t.o=l5(t.t))}function ku(t,e,r){var n=s5(e)?Ki("MapSet").N(e,r):c5(e)?Ki("MapSet").T(e,r):t.g?function(i,o){var a=Array.isArray(i),s={i:a?1:0,A:o?o.A:Jf(),P:!1,I:!1,D:{},l:o,t:i,k:null,o:null,j:null,C:!1},c=s,l=Vv;a&&(c=[s],l=Cd);var d=Proxy.revocable(c,l),u=d.revoke,h=d.proxy;return s.k=h,s.j=u,h}(e,r):Ki("ES5").J(e,r);return(r?r.A:Jf()).p.push(n),n}function ML(t){return ga(t)||gn(22,t),function e(r){if(!_i(r))return r;var n,i=r[Be],o=Tl(r);if(i){if(!i.P&&(i.i<4||!Ki("ES5").K(i)))return i.t;i.I=!0,n=H6(r,o),i.I=!1}else n=H6(r,o);return hl(n,function(a,s){i&&AL(i.t,a)===s||Fx(n,a,e(s))}),o===3?new Set(n):n}(t)}function H6(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return l5(t)}function ZL(){function t(s,c){function l(){this.constructor=s}i(s,c),s.prototype=(l.prototype=c.prototype,new l)}function e(s){s.o||(s.D=new Map,s.o=new Map(s.t))}function r(s){s.o||(s.o=new Set,s.t.forEach(function(c){if(_i(c)){var l=ku(s.A.h,c,s);s.p.set(c,l),s.o.add(l)}else s.o.add(c)}))}function n(s){s.O&&gn(3,JSON.stringify(sr(s)))}var i=function(s,c){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,d){l.__proto__=d}||function(l,d){for(var u in d)d.hasOwnProperty(u)&&(l[u]=d[u])})(s,c)},o=function(){function s(l,d){return this[Be]={i:2,l:d,A:d?d.A:Jf(),P:!1,I:!1,o:void 0,D:void 0,t:l,k:this,C:!1,O:!1},this}t(s,Map);var c=s.prototype;return Object.defineProperty(c,"size",{get:function(){return sr(this[Be]).size}}),c.has=function(l){return sr(this[Be]).has(l)},c.set=function(l,d){var u=this[Be];return n(u),sr(u).has(l)&&sr(u).get(l)===d||(e(u),po(u),u.D.set(l,!0),u.o.set(l,d),u.D.set(l,!0)),this},c.delete=function(l){if(!this.has(l))return!1;var d=this[Be];return n(d),e(d),po(d),d.t.has(l)?d.D.set(l,!1):d.D.delete(l),d.o.delete(l),!0},c.clear=function(){var l=this[Be];n(l),sr(l).size&&(e(l),po(l),l.D=new Map,hl(l.t,function(d){l.D.set(d,!1)}),l.o.clear())},c.forEach=function(l,d){var u=this;sr(this[Be]).forEach(function(h,f){l.call(d,u.get(f),f,u)})},c.get=function(l){var d=this[Be];n(d);var u=sr(d).get(l);if(d.I||!_i(u)||u!==d.t.get(l))return u;var h=ku(d.A.h,u,d);return e(d),d.o.set(l,h),h},c.keys=function(){return sr(this[Be]).keys()},c.values=function(){var l,d=this,u=this.keys();return(l={})[zh]=function(){return d.values()},l.next=function(){var h=u.next();return h.done?h:{done:!1,value:d.get(h.value)}},l},c.entries=function(){var l,d=this,u=this.keys();return(l={})[zh]=function(){return d.entries()},l.next=function(){var h=u.next();if(h.done)return h;var f=d.get(h.value);return{done:!1,value:[h.value,f]}},l},c[zh]=function(){return this.entries()},s}(),a=function(){function s(l,d){return this[Be]={i:3,l:d,A:d?d.A:Jf(),P:!1,I:!1,o:void 0,t:l,k:this,p:new Map,O:!1,C:!1},this}t(s,Set);var c=s.prototype;return Object.defineProperty(c,"size",{get:function(){return sr(this[Be]).size}}),c.has=function(l){var d=this[Be];return n(d),d.o?!!d.o.has(l)||!(!d.p.has(l)||!d.o.has(d.p.get(l))):d.t.has(l)},c.add=function(l){var d=this[Be];return n(d),this.has(l)||(r(d),po(d),d.o.add(l)),this},c.delete=function(l){if(!this.has(l))return!1;var d=this[Be];return n(d),r(d),po(d),d.o.delete(l)||!!d.p.has(l)&&d.o.delete(d.p.get(l))},c.clear=function(){var l=this[Be];n(l),sr(l).size&&(r(l),po(l),l.o.clear())},c.values=function(){var l=this[Be];return n(l),r(l),l.o.values()},c.entries=function(){var l=this[Be];return n(l),r(l),l.o.entries()},c.keys=function(){return this.values()},c[zh]=function(){return this.values()},c.forEach=function(l,d){for(var u=this.values(),h=u.next();!h.done;)l.call(d,h.value,h.value,this),h=u.next()},s}();IL("MapSet",{N:function(s,c){return new o(s,c)},T:function(s,c){return new a(s,c)}})}var L6,Au,h5=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",HL=typeof Map<"u",LL=typeof Set<"u",O6=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",zx=h5?Symbol.for("immer-nothing"):((L6={})["immer-nothing"]=!0,L6),$6=h5?Symbol.for("immer-draftable"):"__$immer_draftable",Be=h5?Symbol.for("immer-state"):"__$immer_state",zh=typeof Symbol<"u"&&Symbol.iterator||"@@iterator",OL=""+Object.prototype.constructor,f5=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,$L=Object.getOwnPropertyDescriptors||function(t){var e={};return f5(t).forEach(function(r){e[r]=Object.getOwnPropertyDescriptor(t,r)}),e},Nv={},Vv={get:function(t,e){if(e===Be)return t;var r=sr(t);if(!$v(r,e))return function(i,o,a){var s,c=Z6(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||!_i(n)?n:n===C0(t.t,e)?(S0(t),t.o[e]=ku(t.A.h,n,t)):n},has:function(t,e){return e in sr(t)},ownKeys:function(t){return Reflect.ownKeys(sr(t))},set:function(t,e,r){var n=Z6(sr(t),e);if(n!=null&&n.set)return n.set.call(t.k,r),!0;if(!t.P){var i=C0(sr(t),e),o=i==null?void 0:i[Be];if(o&&o.t===r)return t.o[e]=r,t.D[e]=!1,!0;if(RL(r,i)&&(r!==void 0||$v(t.t,e)))return!0;S0(t),po(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 C0(t.t,e)!==void 0||e in t.t?(t.D[e]=!1,S0(t),po(t)):delete t.D[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var r=sr(t),n=Reflect.getOwnPropertyDescriptor(r,e);return n&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:n.enumerable,value:r[e]}},defineProperty:function(){gn(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){gn(12)}},Cd={};hl(Vv,function(t,e){Cd[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),Cd.deleteProperty=function(t,e){return Cd.set.call(this,t,e,void 0)},Cd.set=function(t,e,r){return Vv.set.call(this,t[0],e,r,t[0])};var DL=function(){function t(r){var n=this;this.g=O6,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(m){var w=this;m===void 0&&(m=s);for(var v=arguments.length,g=Array(v>1?v-1:0),_=1;_<v;_++)g[_-1]=arguments[_];return c.produce(m,function(y){var C;return(C=o).call.apply(C,[w,y].concat(g))})}}var l;if(typeof o!="function"&&gn(6),a!==void 0&&typeof a!="function"&&gn(7),_i(i)){var d=P6(n),u=ku(n,i,void 0),h=!0;try{l=o(u),h=!1}finally{h?e2(d):Dv(d)}return typeof Promise<"u"&&l instanceof Promise?l.then(function(m){return x0(d,a),E0(m,d)},function(m){throw e2(d),m}):(x0(d,a),E0(l,d))}if(!i||typeof i!="object"){if((l=o(i))===void 0&&(l=i),l===zx&&(l=void 0),n.F&&d5(l,!0),a){var f=[],p=[];Ki("Patches").M(i,l,f,p),a(f,p)}return l}gn(21,i)},this.produceWithPatches=function(i,o){if(typeof i=="function")return function(l){for(var d=arguments.length,u=Array(d>1?d-1:0),h=1;h<d;h++)u[h-1]=arguments[h];return n.produceWithPatches(l,function(f){return i.apply(void 0,[f].concat(u))})};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){_i(r)||gn(8),ga(r)&&(r=ML(r));var n=P6(this),i=ku(this,r,void 0);return i[Be].C=!0,Dv(n),i},e.finishDraft=function(r,n){var i=r&&r[Be],o=i.A;return x0(o,n),E0(void 0,o)},e.setAutoFreeze=function(r){this.F=r},e.setUseProxies=function(r){r&&!O6&&gn(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=Ki("Patches").$;return ga(r)?a(r,n):this.produce(r,function(s){return a(s,n)})},t}(),Cn=new DL,jx=Cn.produce;Cn.produceWithPatches.bind(Cn);Cn.setAutoFreeze.bind(Cn);Cn.setUseProxies.bind(Cn);Cn.applyPatches.bind(Cn);Cn.createDraft.bind(Cn);Cn.finishDraft.bind(Cn);const Il=(...t)=>vt(e=>t.includes(e.type));var Pr=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)},NL=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},Pi,ti;class K2 extends $e{get action$(){return Pr(this,Pi,"f").asObservable()}get value(){return Pr(this,ti,"f").value}get closed(){return Pr(this,ti,"f").closed||Pr(this,Pi,"f").closed}constructor(e,r){super(i=>Pr(this,ti,"f").subscribe(i)),Pi.set(this,new jn),ti.set(this,void 0);const n="getInitialState"in e?e.getInitialState():r;NL(this,ti,new Al(n),"f"),Pr(this,Pi,"f").pipe(bx(e,n),yx()).subscribe(Pr(this,ti,"f")),this.reset=()=>Pr(this,ti,"f").next(n)}next(e){Pr(this,Pi,"f").next(e)}addEffect(e,r){const n=typeof e=="string"?this.action$.pipe(Il(e)):this.action$,i=r||e;return n.pipe(mi(o=>rr(new Promise((a,s)=>{try{a(i(o,this.value))}catch(c){s(c)}})).pipe(Qt(a=>(console.warn("unhandled effect",a),zt)))),vt(o=>!!o),Of(Lf)).subscribe(Pr(this,Pi,"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(Qt(n=>(console.trace("unhandled exception, epic closed!",n),zt)),Of(Lf)).subscribe(Pr(this,Pi,"f"))}unsubscribe(){Pr(this,Pi,"f").unsubscribe(),Pr(this,ti,"f").unsubscribe()}complete(){Pr(this,Pi,"f").complete(),Pr(this,ti,"f").complete()}asObservable(){return Pr(this,ti,"f").asObservable()}}Pi=new WeakMap,ti=new WeakMap;const Ux=(t,e)=>Object.entries(t).reduce((r,[n,i])=>Object.assign(r,{[n]:typeof i=="function"?(...o)=>e.next(i(...o)):Ux(i,e)}),{});function _r(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}const H1="::",p5=t=>new RegExp(`${H1}\\${t}$`),D6=t=>t.type.replace(p5("\\w+$"),"");function Di(t,e,r,n){const i=_r([t,"request"].join(H1),e);return r&&Object.assign(i,{success:_r([t,"success"].join(H1),r)}),n&&Object.assign(i,{failure:_r([t,"failure"].join(H1),n)}),i}const VL=t=>!!t.type.match(/::request$/),FL=t=>!!t.type.match(p5("success")),zL=t=>!!t.type.match(p5("failure")),jL=t=>FL(t)||zL(t);function N6(t){return _i(t)?jx(t,()=>{}):t}function UL(t){return typeof t=="function"}function Gu(t,e){const[r,n,i]=BL(e);let o;if(UL(t))o=()=>N6(t());else{const s=N6(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,u)=>{if(u)if(ga(d)){const f=u(d,c);return f===void 0?d:f}else{if(_i(d))return jx(d,h=>u(h,c));{const h=u(d,c);if(h===void 0){if(d===null)return d;throw Error("A case reducer on a non-draftable value must not return undefined")}return h}}return d},s)}return a.getInitialState=o,a}function BL(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]}function WL(t,e){const r=typeof e=="function"?e:Gu(e.initial,o=>e.builder(o,t)),n=new K2(r),i=Ux(t,n);return{actions:t,dispatch:i,subject:n}}const qL=()=>({request:_r("client/request",(e,r)=>{var n,i,o,a;return r??(r={}),(n=r.transaction)!==null&&n!==void 0||(r.transaction=Qf()),(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 Xw),{payload:e,meta:r}}),retry:_r("client/retry",e=>({payload:e})),success:_r("client/success",(e,r)=>({payload:e,meta:r})),cancel:_r("client/cancel",e=>({payload:e})),failure:_r("client/failure",(e,r)=>({payload:e,meta:r})),error:_r("client/error",(e,r)=>({payload:e,meta:r}))}),Gt=qL(),Bx=t=>e=>e.pipe(vt(Gt.request.match),mi(r=>{const{meta:{controller:n,transaction:i}}=r;return new $e(o=>{if(n.signal.aborted)return o.next(Gt.cancel({transaction:i,reason:`request [${i}] was aborted!`})),o.complete();o.add(e.pipe(vt(Gt.cancel.match)).subscribe(a=>{a.payload.transaction===i&&(n.signal.aborted||n.abort(),o.complete())})),o.add(_v(n.signal,"abort").subscribe(()=>{o.next(Gt.cancel({transaction:i,reason:`request [${i}] was aborted!`})),o.complete()})),o.add(rr(t(r)).subscribe({next:a=>o.next(a),error:a=>o.next(Gt.error(a,{request:r})),complete:()=>o.complete()}))})})),GL=t=>(t=Object.assign({},{count:0,delay:0},t),(e,r)=>e.pipe(Bx(n=>e.pipe(vt(Gt.failure.match),vt(i=>i.meta.request===n),Ex(r),St(([i,o])=>{var a,s;const{transaction:c}=n.meta,l=o[c];if(!l)return zt;const d=(s=(a=l.retry)===null||a===void 0?void 0:a.length)!==null&&s!==void 0?s:0,u=Object.assign({},t,n.meta.retry);if(d>=u.count)throw u.count?Error("maximum retries executed!",{cause:i.payload}):i.payload;return(typeof u.delay=="function"?rr(u.delay(i.payload.cause)).pipe(Qt(f=>{throw Error("failed to resolve delay",{cause:f})})):hZ(u.delay)).pipe(We(()=>Gt.retry(n)))}))))),KL=t=>e=>e.pipe(Bx(r=>rr(t(r.payload,r.meta.controller.signal)).pipe(We(n=>Gt.success(n,{request:r})),Qt(n=>yi(Gt.failure(Error(`failed to execute request for transaction ${r.meta.transaction}`,{cause:n}),{request:r})))))),YL=t=>t.pipe(vt(Gt.retry.match),We(e=>e.payload)),Wx=()=>vt(t=>t.status==="complete"),XL=(t={})=>Gu(t,e=>e.addCase(Gt.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(Gt.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(Gt.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(Gt.cancel,(r,n)=>{const{transaction:i,reason:o}=n.payload;if(r[i]){const a=Object.assign({},I6(r[i]));a.task.error(new Ov("abort",{request:a,message:o??"request was canceled"})),delete r[i]}}).addCase(Gt.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(Gt.error,(r,n)=>{const{payload:i,meta:o}=n,{transaction:a}=o.request.meta;if(r[a]){const s=Object.assign({},I6(r[a]));s.task.error(new Ov("error",{request:s,message:`failed to process task [${a}]`,cause:i.cause})),delete r[a]}}));var QL=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(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})},Ot=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)},V6=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},Wt,qa;class F6 extends $e{get closed(){return Ot(this,Wt,"f").closed}get state$(){return Ot(this,Wt,"f")}get action$(){return Ot(this,Wt,"f").action$}get success$(){return this.action$.pipe(vt(Gt.success.match),We(({payload:e})=>e))}get error$(){return this.action$.pipe(Il("client/error"),Ex(Ot(this,Wt,"f")),We(([e,r])=>{const{payload:n,meta:i}=e,{transaction:o}=i.request.meta,a=r[e.meta.request.meta.transaction];return new Ov("error",{request:a,message:`failed to process task [${o}]`,cause:n})}))}constructor(e,r){super(o=>Ot(this,Wt,"f").subscribe(o)),Wt.set(this,void 0),qa.set(this,void 0);const n={};V6(this,Wt,new K2(XL(n)),"f"),V6(this,qa,new Nr(()=>Ot(this,Wt,"f").complete()),"f"),Ot(this,qa,"f").add(Ot(this,Wt,"f").addFlow(KL(e))),Ot(this,qa,"f").add(Ot(this,Wt,"f").addFlow(YL));const i=Object.assign({count:0,delay:0},r==null?void 0:r.retry);Ot(this,qa,"f").add(Ot(this,Wt,"f").addFlow(GL(i)))}next(e,r){const n=Gt.request(e,r);return Ot(this,Wt,"f").next(n),n.meta}nextAsync(e,r){return QL(this,void 0,void 0,function*(){return Nn(this.next(e,r).task.pipe(Wx()))})}getTaskByTransaction(e){const r=Ot(this,Wt,"f").value[e];return r&&r.task}getTaskByRef(e){const r=Object.values(Ot(this,Wt,"f").value).find(n=>n.ref===e);return r&&r.task}cancel(e,r){if(e)e&&Ot(this,Wt,"f").value[e]&&(r??(r=`[${e}]: transaction canceled`),Ot(this,Wt,"f").next(Gt.cancel({transaction:e,reason:r})));else for(const n of Object.keys(Ot(this,Wt,"f").value))this.cancel(n,"all transactions canceled")}on(e,r){return Ot(this,Wt,"f").addEffect(Gt[e].type,n=>{r(n,this)})}complete(){Ot(this,qa,"f").unsubscribe()}asObservable(){return Ot(this,Wt,"f").asObservable()}}Wt=new WeakMap,qa=new WeakMap;function JL(){return{set:_r("cache/set",(t,e)=>({payload:{key:t,entry:e}})),remove:_r("cache/remove",t=>({payload:t})),invalidate:_r("cache/invalidate",t=>({payload:t})),trim:_r("cache/trim",t=>({payload:t}))}}const nc=JL(),eO=(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 tO(t,e={}){return Gu(e,r=>r.addCase(t.set,(n,i)=>{var o;const{key:a,entry:s}=i.payload,c=n[a];if(c)c.updated=Date.now(),(o=c.updates)!==null&&o!==void 0||(c.updates=0),c.updates++;else{const l=Date.now();n[a]=Object.assign(Object.assign({},s),{created:l,updated:l})}}).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:eO,l=Object.keys(n),d=Object.entries(n).filter(([u,h])=>!s.validate||s.validate(h)).sort((u,h)=>c(u[1],h[1])).slice(0,(a=s.size)!==null&&a!==void 0?a:Number.MAX_SAFE_INTEGER).map(([u])=>u);if(l.length!==d.length)for(const u of l){const h=d.indexOf(u);h!==-1?d.splice(h,1):delete n[u]}}))}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)},rO=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},pn;class z6{get state$(){return Ri(this,pn,"f").asObservable()}constructor(e){pn.set(this,void 0);const{trimming:r,initial:n}=e;rO(this,pn,new K2(tO(nc,n)),"f"),r&&Ri(this,pn,"f").addEffect("cache/set",()=>Ri(this,pn,"f").next(nc.trim(r)))}setItem(...e){Ri(this,pn,"f").next(nc.set(...e))}getItem(e){return Ri(this,pn,"f").value[e]}removeItem(e){Ri(this,pn,"f").next(nc.remove(e))}invalidate(e){Ri(this,pn,"f").next(nc.invalidate(e))}trim(e){Ri(this,pn,"f").next(nc.trim(e))}reset(){Ri(this,pn,"f").reset()}complete(){Ri(this,pn,"f").complete()}}pn=new WeakMap;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)},ic=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},nO=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},Ga,ri,Wo,_c,bc,L1,Fv;const iO=(t=0)=>e=>{var r;return((r=e.updated)!==null&&r!==void 0?r:0)+t>Date.now()},oO=t=>{if(typeof t=="function")return t;switch(t){case"concat":return lL;case"merge":return dL;case"switch":default:return uL}};class Hr{get client(){return lt(this,ri,"f")}get cache(){return lt(this,Wo,"f")}constructor(e){var r;Ga.set(this,new Nr),ri.set(this,void 0),Wo.set(this,void 0),_c.set(this,new jn),bc.set(this,void 0),L1.set(this,void 0),Fv.set(this,Qf()),ic(this,bc,i=>kL(e.key(i),lt(this,Fv,"f")),"f"),ic(this,L1,(r=e==null?void 0:e.validate)!==null&&r!==void 0?r:iO(e==null?void 0:e.expire),"f"),e.client instanceof F6?ic(this,ri,e.client,"f"):(ic(this,ri,new F6(e.client.fn,e.client.options),"f"),lt(this,Ga,"f").add(()=>lt(this,ri,"f").complete())),e.cache instanceof z6?ic(this,Wo,e.cache,"f"):(ic(this,Wo,new z6(e.cache||{}),"f"),lt(this,Ga,"f").add(()=>lt(this,Wo,"f").complete()));const n=oO(e.queueOperator);lt(this,Ga,"f").add(()=>lt(this,_c,"f").complete()),lt(this,Ga,"f").add(lt(this,_c,"f").pipe(n(({args:i,options:o})=>new $e(a=>{const{task:s,transaction:c}=lt(this,ri,"f").next(i,o);a.add(s.pipe(Qt(()=>zt)).subscribe(a)),a.add(()=>{setTimeout(()=>lt(this,ri,"f").cancel(c))})})),Wx(),xx(()=>!lt(this,ri,"f").closed)).subscribe(i=>{const{args:o,value:a,transaction:s,ref:c}=i,l=c??lt(this,bc,"f").call(this,o);lt(this,Wo,"f").setItem(l,{value:a,args:o,transaction:s})}))}next(e,r){lt(this,_c,"f").next({args:e,options:r})}query(e,r){var n;const i=lt(this,bc,"f").call(this,e);return(n=lt(this,ri,"f").getTaskByRef(i))!==null&&n!==void 0?n:this._createTask(i,e,r)}queryAsync(e,r){const n=r||{},{awaitResolve:i}=n,o=nO(n,["awaitResolve"]);return(i?ur:Nn)(this._query(e,o))}complete(){lt(this,Ga,"f").unsubscribe()}_query(e,r){var n;const i=lt(this,bc,"f").call(this,e);return(n=lt(this,ri,"f").getTaskByRef(i))!==null&&n!==void 0?n:this._createTask(i,e,r)}_createTask(e,r,n){var i;const o=new Xw,a=lt(this,Wo,"f").getItem(e);if(a){const{value:l,args:d,created:u,updated:h,updates:f,transaction:p}=a,m={status:"cache",value:l,args:d,created:u,updated:h,updates:f,transaction:p};o.next(m)}const s=((i=n==null?void 0:n.cache)===null||i===void 0?void 0:i.validate)||lt(this,L1,"f");return a&&s(a,r)?o.complete():lt(this,_c,"f").next({args:r,options:{ref:e,task:o}}),o.asObservable()}}Ga=new WeakMap,ri=new WeakMap,Wo=new WeakMap,_c=new WeakMap,bc=new WeakMap,L1=new WeakMap,Fv=new WeakMap;Hr.extractQueryValue=hL;var zo=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)},j6=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},Sd,io;class aO extends $e{get currentContext(){return zo(this,io,"f").value}get currentContext$(){return zo(this,io,"f").asObservable()}get client(){return zo(this,Sd,"f")}constructor(e){super(r=>zo(this,io,"f").subscribe(r)),Sd.set(this,void 0),io.set(this,void 0),j6(this,Sd,new Hr(e),"f"),j6(this,io,new Al(void 0),"f")}setCurrentContext(e){typeof e=="string"?this.resolveContext(e).pipe(Qt(()=>zt)).subscribe(r=>this.setCurrentContext(r)):cL(e,zo(this,io,"f").value)||zo(this,io,"f").next(e)}resolveContext(e){return zo(this,Sd,"f").query({id:e}).pipe(We(r=>r.value),Qt(r=>{throw r.cause?r.cause:r}))}resolveContextAsync(e,r){return(r!=null&&r.awaitResolve?ur:Nn)(this.resolveContext(e))}dispose(){zo(this,io,"f").complete()}}Sd=new WeakMap,io=new WeakMap;var id=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(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})},Ue=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)},Da=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,O1,kd,ni,Ka,Ya,Ad,$1,D1;let sO=class{get contextClient(){return Ue(this,oo,"f")}get queryClient(){return Ue(this,O1,"f")}get currentContext$(){return Ue(this,oo,"f").currentContext$}get currentContext(){return Ue(this,oo,"f").currentContext}set currentContext(e){if(console.warn("@deprecated","ContextProvider.currentContext","use setCurrentContextById|setCurrentContext|clearCurrentContext"),e===void 0)throw Error("not allowed to set current context as undefined undefined!");this.setCurrentContextAsync(e)}constructor(e){var r,n,i;oo.set(this,void 0),O1.set(this,void 0),kd.set(this,void 0),ni.set(this,void 0),Ka.set(this,new Nr),Ya.set(this,void 0),Ad.set(this,void 0),$1.set(this,void 0),D1.set(this,new jn);const{config:o,event:a}=e;e.parentContext&&console.warn("@deprecated","parentContext as arg is deprecated, use ContextProvider.connectParentContext"),Da(this,ni,a,"f"),o.resolveContext&&(this.resolveContext=(r=o.resolveContext)===null||r===void 0?void 0:r.bind(this)),o.validateContext&&(this.validateContext=(n=o.validateContext)===null||n===void 0?void 0:n.bind(this)),Da(this,Ya,o.contextType,"f"),Da(this,Ad,o.contextFilter,"f"),Da(this,oo,new aO(o.client.get),"f"),Da(this,O1,new Hr(o.client.query),"f"),o.client.related&&Da(this,kd,new Hr(o.client.related),"f"),Da(this,$1,(i=o.contextParameterFn)!==null&&i!==void 0?i:s=>({search:s.search,filter:{type:s.type}}),"f"),Ue(this,ni,"f")&&(Ue(this,Ka,"f").add(this.currentContext$.pipe(bv()).subscribe(([s,c])=>{var l;(l=Ue(this,ni,"f"))===null||l===void 0||l.dispatchEvent("onCurrentContextChanged",{source:this,canBubble:!0,detail:{previous:s,next:c}})})),Ue(this,Ka,"f").add(Ue(this,ni,"f").addEventListener("onCurrentContextChanged",s=>{s.source!==this&&s.detail.next!==void 0&&this.setCurrentContext(s.detail.next)}))),Ue(this,Ka,"f").add(Ue(this,D1,"f").pipe(St(s=>s),ul(s=>console.debug("ContextProvider::#contextQueue",s))).subscribe(s=>Ue(this,oo,"f").setCurrentContext(s??null)))}connectParentContext(e,r){const i=e.currentContext$.pipe(vt(o=>o!==void 0),vt((o,a)=>{var s;return r!=null&&r.skipFirst&&a<=1?(console.debug("ContextProvider::connectParentContext","skipping first item",o),!1):((s=this.currentContext)===null||s===void 0?void 0:s.id)!==(o==null?void 0:o.id)}),St(o=>id(this,void 0,void 0,function*(){var a;if(o){const s=yield(a=Ue(this,ni,"f"))===null||a===void 0?void 0:a.dispatchEvent("onParentContextChanged",{source:this,detail:o,cancelable:!0});return{next:o,canceled:s==null?void 0:s.canceled}}return{next:o}})),vt(o=>!o.canceled),St(({next:o})=>this.setCurrentContext(o,{validate:!0,resolve:!0}).pipe(Qt(a=>(console.warn("ContextProvider::onParentContextChanged","setCurrentContext",a),zt)))),Qt(o=>(console.warn("ContextProvider::onParentContextChanged","unhandled exception",o),zt))).subscribe();return Ue(this,Ka,"f").add(i),i}setCurrentContextById(e){return new $e(r=>{try{Ue(this,oo,"f").resolveContext(e).pipe(vt(n=>!!n),St(n=>this.setCurrentContext(n))).subscribe(r)}catch(n){r.error(n)}})}setCurrentContextByIdAsync(e){return ur(this.setCurrentContextById(e))}setCurrentContext(e,r){const n=new jn,i=new jn,o=this._setCurrentContext(e,r).pipe(ul(a=>i.next(a)),wx(n),i6(()=>i.complete()),Qt(a=>(i.error(a),zt)));return Ue(this,D1,"f").next(o),i.pipe(i6(()=>n.next(!0)))}_setCurrentContext(e,r){return new $e(n=>{var i;if(e===this.currentContext)return n.next(e),n.complete();if(e&&(r!=null&&r.validate)&&!this.validateContext(e)){if(!r.resolve)return(i=Ue(this,ni,"f"))===null||i===void 0||i.dispatchEvent("onSetContextValidationFailed",{source:this,detail:{context:e}}),n.error(Error("failed to validate provided context"));if(r.resolve)return yi(e).pipe(St(o=>id(this,void 0,void 0,function*(){var a;const s=yield(a=Ue(this,ni,"f"))===null||a===void 0?void 0:a.dispatchEvent("onSetContextResolve",{source:this,cancelable:!0,detail:{context:o}});if(s!=null&&s.canceled)throw Error("resolving of context was canceled");return o})),St(o=>this.resolveContext(o).pipe(We(a=>({context:o,resolved:a})))),St(({context:o,resolved:a})=>id(this,void 0,void 0,function*(){var s;const c=yield(s=Ue(this,ni,"f"))===null||s===void 0?void 0:s.dispatchEvent("onSetContextResolved",{source:this,cancelable:!0,detail:{context:o,resolved:a}});if(c!=null&&c.canceled)throw Error("resolving of context was canceled");return a})),St(o=>this._setCurrentContext(o))).subscribe(n)}return yi(e).pipe(St(o=>id(this,void 0,void 0,function*(){var a;const s=yield(a=Ue(this,ni,"f"))===null||a===void 0?void 0:a.dispatchEvent("onCurrentContextChange",{source:this,canBubble:!0,cancelable:!0,detail:{context:o}});if(s!=null&&s.canceled)throw Error("change of context was aborted");return o}))).subscribe(o=>{n.next(o),n.complete()})})}setCurrentContextAsync(e,r){return id(this,void 0,void 0,function*(){return ur(this.setCurrentContext(e,r))})}queryContext(e){const r=this.queryClient.query(Ue(this,$1,"f").call(this,{search:e,type:Ue(this,Ya,"f")})).pipe(We(n=>n.value));return Ue(this,Ad,"f")?r.pipe(We(Ue(this,Ad,"f"))):r}queryContextAsync(e){return ur(this.queryContext(e))}validateContext(e){return Ue(this,Ya,"f")?Ue(this,Ya,"f").map(r=>r.toLowerCase()).includes(e.type.id.toLowerCase()):!0}resolveContext(e){return this.relatedContexts({item:e,filter:{type:Ue(this,Ya,"f")}}).pipe(We(r=>r.filter(n=>this.validateContext(n))),We(r=>{const n=r.shift();if(!n)throw Error("failed to resolve context");return r.length&&console.warn("ContextProvider::relatedContext","multiple items found 🤣",r),n}))}resolveContextAsync(e){return ur(this.resolveContext(e))}relatedContexts(e){return Ue(this,kd,"f")?Ue(this,kd,"f").query(e).pipe(We(({value:r})=>r),Qt(r=>{throw r.cause?r.cause:r})):ux(()=>Error("ContextProvider::relatedContexts - no client defined for resolving related context"))}relatedContextsAsync(e){return ur(this.relatedContexts(e))}clearCurrentContext(){this.setCurrentContext(null)}dispose(){Ue(this,Ka,"f").unsubscribe(),Ue(this,oo,"f").dispose()}};oo=new WeakMap,O1=new WeakMap,kd=new WeakMap,ni=new WeakMap,Ka=new WeakMap,Ya=new WeakMap,Ad=new WeakMap,$1=new WeakMap,D1=new WeakMap;var cO=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(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const lO="context",dO={name:lO,configure:()=>new aL,initialize:function(t){var e;return cO(this,void 0,void 0,function*(){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,o=new sO({config:r,event:n,parentContext:i}),a=new Nr(()=>o.dispose());return this.postInitialize=s=>new $e(c=>{const l=r.resolveInitialContext?rr(r.resolveInitialContext(s)).pipe(vt(d=>!!d),St(d=>s.modules.context.setCurrentContext(d,{validate:!0,resolve:!0}))):zt;c.add(l.pipe(Qt(d=>(console.warn("ContextModule.postInitialize","failed to resolve initial context",d),zt))).subscribe({next:d=>{console.debug("ContextModule.postInitialize",`initial context was resolved to [${d?d.id:"none"}]`,d)},complete:()=>{r.connectParentContext!==!1&&i&&o.connectParentContext(i),c.complete()}}))}),this.dispose=()=>a.unsubscribe(),o})}};var U6=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(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};class uO{constructor(e){this.clientKey=e.clientKey,this.endpoint=e.endpoint,this.clientCtor=e.clientCtor}createHttpClientClient(e){return U6(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 U6(this,void 0,void 0,function*(){if(!this.endpoint)throw Error("no endpoint defined!");return new this.clientCtor({http:e,endpoint:this.endpoint})})}}var k0=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(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};class hO{constructor(e,r){this._client=e,this._http=r}get environment(){return this._client.environment}resolveServices(){return this._client.fetchEnvironment()}resolveService(e){return k0(this,void 0,void 0,function*(){return this._client.resolveService(e)})}createClient(e,r){return k0(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 k0(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(Ax(i,{baseUri:o,defaultScopes:a}))})}}var A0=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(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})},B6=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)},fO=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},Rd;const W6="services";class pO{get environment(){var e;const r=(e=B6(this,Rd,"f").cache.getItem(W6))===null||e===void 0?void 0:e.value;if(!r)throw Error("no cached environment found");return r}constructor({http:e,endpoint:r}){Rd.set(this,void 0),this.http=e,this.endpoint=r,fO(this,Rd,new Hr({client:{fn:()=>e.fetch$(r,{selector:this.selector.bind(this)})},key:()=>W6,expire:5*60*1e3}),"f")}fetchEnvironment(){return A0(this,void 0,void 0,function*(){return Nn(Hr.extractQueryValue(B6(this,Rd,"f").query(void 0,{cache:{suppressInvalid:!0}})))})}selector(e){return A0(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 A0(this,void 0,void 0,function*(){try{const{services:r}=yield this.fetchEnvironment();return r[e]}catch(r){throw console.error(r),r}})}}Rd=new WeakMap;const mO="serviceDiscovery";var vO=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(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const gO={name:mO,configure:()=>new uO({clientCtor:pO,clientKey:"service_discovery",endpoint:"/_discovery/environments/current"}),initialize:({config:t,requireInstance:e})=>vO(void 0,void 0,void 0,function*(){const r=yield e("http"),n=yield t.createHttpClientClient(r),i=yield t.createClient(n);return new hO(i,r)})};class yO{}var Un;(function(t){t.v1="1.0",t.v2="2.0"})(Un||(Un={}));class Qi extends Error{constructor(e,r){super(`unsupported version ${e}`,{cause:r}),this.version=e}}const _O=(t,e)=>{var r;const n=(r=Un[t])!==null&&r!==void 0?r:t;switch(n){case Un.v2:throw new Qi(t);case Un.v1:default:{const{id:i}=e,o=new URLSearchParams;return o.append("api-version",n),`/contexts/${i}/?${String(o)}`}}},bO=(t,e,r)=>[_O(t,e),r],wO=(t,e,r="json")=>(n,i)=>t[r](...bO(e,n,i));var xO=["eq","ne","gt","ge","lt","le"],jh=["and","or","not"],EO=["any","all"],CO=["startswith","endswith","contains"],SO=["expand","levels","select","skip","top","count","orderby","filter"],q6=/\((.*)\)/,G6=/(?!indexof)\((\w+)\)/,K6;(function(t){t.sum="sum",t.min="min",t.max="max",t.average="average",t.countdistinct="countdistinct"})(K6||(K6={}));var ro="";function qx(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,u=e.key,h=e.count,f=e.expand,p=e.action,m=e.func,w="",v=[],g={};if(u!=null&&(w+="(".concat(zi(u,v),")")),(c||typeof h=="object")&&(g.$filter=Ru(typeof h=="object"?h:c,v)),l&&(g.$apply=Gx(l)),f&&(g.$expand=N1(f)),d&&(g.$orderby=m5(d)),h&&(typeof h=="boolean"?g.$count=!0:w+="/$count"),typeof a=="number"&&(g.$top=a),typeof s=="number"&&(g.$skip=s),p&&(w+="/".concat(p)),m){if(typeof m=="string")w+="/".concat(m);else if(typeof m=="object"){var _=Object.keys(m)[0],y=zi(m[_],v);w+="/".concat(_),y!==""&&(w+="(".concat(y,")"))}}return v.length>0&&Object.assign(g,v.reduce(function(C,S){var A;return Object.assign(C,(A={},A["@".concat(S.name)]=zi(S.value),A))},{})),IO(w,Fe({$select:r,$search:n,$skiptoken:i,$format:o},g))}function R0(t,e,r){return r===void 0&&(r=[]),"".concat(t," eq ").concat(zi(e,r))}function Ru(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,u){var h=o[u];if(h===void 0)return d;var f="";if(s?u===ro?f=s:G6.test(u)?f=u.replace(G6,function(g,_){return _.trim()===ro?"(".concat(s,")"):"(".concat(s,"/").concat(_.trim(),")")}):q6.test(u)?f=u.replace(q6,function(g,_){return _.trim()===ro?"(".concat(s,")"):"(".concat(s,"/").concat(_.trim(),")")}):f="".concat(s,"/").concat(u):f=u,u===ro&&Array.isArray(h))return d.concat(h.map(function(g){return R0(f,g)}));if(["number","string","boolean"].indexOf(typeof h)!==-1||h instanceof Date||h===null)d.push(R0(f,h,a));else if(Array.isArray(h)){var p=u,m=h.map(function(g){return Ru(g,a,s)}).filter(function(g){return g}).map(function(g){return jh.indexOf(p)!==-1?"(".concat(g,")"):g});m.length&&(jh.indexOf(p)!==-1?m.length&&(p==="not"?d.push(Y6(m)):d.push("(".concat(m.join(" ".concat(p," ")),")"))):d.push(m.join(" ".concat(p," "))))}else if(jh.indexOf(f)!==-1){var w=f,m=Object.keys(h).map(function(_){var y;return n((y={},y[_]=h[_],y))});m.length&&(w==="not"?d.push(Y6(m)):d.push("(".concat(m.join(" ".concat(w," ")),")")))}else if(typeof h=="object")if("type"in h)d.push(R0(f,h,a));else{var v=Object.keys(h);v.forEach(function(g){if(h[g]!==void 0)if(xO.indexOf(g)!==-1)d.push("".concat(f," ").concat(g," ").concat(zi(h[g],a)));else if(jh.indexOf(g)!==-1)Array.isArray(h[g])?d.push(h[g].map(function(S){return"("+n(S,a,f)+")"}).join(" ".concat(g," "))):d.push("("+n(h[g],a,f)+")");else if(EO.indexOf(g)!==-1){var _=i(u.toLowerCase(),h[g],g,f);_&&d.push(_)}else if(g==="has")d.push("".concat(f," ").concat(g," ").concat(zi(h[g],a)));else if(g==="in"){var y=Array.isArray(h[g])?h[g]:h[g].value.map(function(S){return{type:h[g].type,value:S}});d.push(f+" in ("+y.map(function(S){return zi(S,a)}).join(",")+")")}else if(CO.indexOf(g)!==-1)d.push("".concat(g,"(").concat(f,",").concat(zi(h[g],a),")"));else{var C=n(h,a,f);C&&d.push(C)}})}else throw new Error("Unexpected value type: ".concat(h));return d},[]);c=l.join(" and ")}return c}function i(o,a,s,c){var l="";if(typeof a=="string"||a instanceof String)l=kO(o,a,s,c);else if(a){var d=Array.isArray(a)?a.reduce(function(h,f){return f.hasOwnProperty(ro)?(h.hasOwnProperty(ro)||(h[ro]=[]),h[ro].push(f[ro]),h):Fe(Fe({},h),f)},{}):a,u=n(d,e,o);l="".concat(c,"/").concat(s,"(").concat(u?"".concat(o,":").concat(u):"",")")}return l}}function kO(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 AO(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 zi(t,e){if(typeof t=="string")return"'".concat(AO(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 zi(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(zi(i,e))}).join(",")}return t}function N1(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 N1(r)}).join(","));if(typeof t=="object"){var e=Object.keys(t);return e.some(function(r){return SO.indexOf(r.toLowerCase())!==-1})?e.map(function(r){var n;switch(r){case"filter":n=Ru(t[r]);break;case"orderBy":n=m5(t[r]);break;case"levels":case"count":case"skip":case"top":n="".concat(t[r]);break;default:n=N1(t[r])}return"$".concat(r.toLowerCase(),"=").concat(n)}).join(";"):e.map(function(r){var n=N1(t[r]);return n?"".concat(r,"(").concat(n,")"):r}).join(",")}return""}function Gx(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=Bw(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(RO(o),")")),a){var d=Ru(a);d&&n.push("filter(".concat(Ru(d),")"))}return s&&n.push("groupby(".concat(TO(s),")")),n},[]);return r.join("/")||void 0}function RO(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&&i.as)return"".concat(n," as ").concat(i.as);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 TO(t){if(!t.properties)throw new Error("'properties' property required for groupBy");var e="(".concat(t.properties.join(","),")");return t.transform&&(e+=",".concat(Gx(t.transform))),e}function m5(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 m5(i,"".concat(n,"/"))}).map(function(r){return"".concat(e).concat(r)}).join(","):"".concat(e).concat(String(t))}function IO(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 Y6(t){return"not(".concat(t.join(" and "),")")}const PO=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]})}},{}),MO=t=>Object.entries(t).filter(([e,r])=>!!r).reduce((e,[r,n])=>{switch(r){case"filter":return Object.assign(Object.assign({},e),{[r]:PO(n)});default:return Object.assign(Object.assign({},e),{[r]:t[r]})}},{}),ZO=t=>typeof t=="string"?t:qx(MO(t)),HO=(t,e)=>{var r;const n=(r=Un[t])!==null&&r!==void 0?r:t;switch(n){case Un.v2:throw new Qi(t);case Un.v1:default:{const{query:i,includeDeleted:o}=e,a=new URLSearchParams(ZO(i));return a.append("api-version",n),o&&a.append("includeDeleted","true"),`/contexts/?${String(a)}`}}},LO=(t,e,r)=>[HO(t,e),r],OO=(t,e,r="json")=>(n,i)=>t[r](...LO(e,n,i)),$O=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]})}},{}),DO=t=>Object.entries(t).filter(([e,r])=>!!r).reduce((e,[r,n])=>{switch(r){case"filter":return Object.assign(Object.assign({},e),{[r]:$O(n)});default:return Object.assign(Object.assign({},e),{[r]:t[r]})}},{}),NO=t=>typeof t=="string"?t:qx(DO(t)),VO=(t,e)=>{var r;const n=(r=Un[t])!==null&&r!==void 0?r:t;switch(n){case Un.v2:throw new Qi(t);case Un.v1:default:{const{id:i,query:o}=e,a=new URLSearchParams(NO(o||""));return a.append("api-version",n),`/contexts/${i}/relations?${String(a)}`}}},FO=(t,e,r)=>[VO(t,e),r],zO=(t,e,r="json")=>(n,i)=>t[r](...FO(e,n,i));class jO{get Version(){return Un}constructor(e,r){this._client=e,this._method=r}get(e,...r){return wO(this._client,e,this._method)(...r)}query(e,...r){return OO(this._client,e,this._method)(...r)}related(e,...r){return zO(this._client,e,this._method)(...r)}}const UO=(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)}`}}},BO=(t,e,r)=>{const n=UO(t,e),i=Object.assign({},{method:"Delete"},r);return[n,i]},WO=(t,e,r="fetch")=>(n,i)=>t[r](...BO(e,n,i)),qO=WO,GO=(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)}`}}},KO=(t,e,r)=>[GO(t,e),r],YO=(t,e,r="json")=>(n,i)=>t[r](...KO(e,n,i)),XO=YO,QO=(t,e)=>{switch(t){case"v1":default:{const r=new URLSearchParams;return r.append("api-version",t),`/bookmarks?${String(r)}`}}},JO=(t,e,r)=>{const n=QO(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]},e$=(t,e,r="json")=>(n,i)=>t[r](...JO(e,n,i)),t$=e$,r$=(t,e)=>{switch(t){case"v1":default:{const r=new URLSearchParams;return r.append("api-version",t),`/bookmarks/${e.id}?${String(r)}`}}},n$=(t,e,r)=>{const n=r$(t,e),i=new Headers;i.append("content-type","application/json");const o=Object.assign({},{method:"patch",body:JSON.stringify(e),headers:i},r);return[n,o]},i$=(t,e,r="json")=>(n,i)=>t[r](...n$(e,n,i)),o$=i$,a$=t=>{switch(t){case"v1":default:{const e=new URLSearchParams;return e.append("api-version",t),`persons/me/bookmarks/?${String(e)}`}}},s$=(t,e)=>[a$(t),e],c$=(t,e,r="json")=>n=>t[r](...s$(e,n)),l$=c$,d$=(t,e)=>{switch(t){case"v1":default:{const r=new URLSearchParams;return r.append("api-version",t),`/persons/me/bookmarks/favourites?${String(r)}`}}},u$=(t,e,r)=>{const n=d$(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]},h$=(t,e,r="json")=>(n,i)=>t[r](...u$(e,n,i)),f$=h$,p$=(t,e)=>{switch(t){case"v1":default:{const{bookmarkId:r}=e,n=new URLSearchParams;return n.append("api-version","1.0"),`/persons/me/bookmarks/favourites/${r}/?${String(n)}`}}},m$=(t,e,r)=>{const n=p$(t,e),i=Object.assign({},{method:"Delete"},r);return[n,i]},v$=(t,e,r="fetch")=>(n,i)=>t[r](...m$(e,n,i)),g$=v$,y$=(t,e)=>{switch(t){case"v1":default:{const{bookmarkId:r}=e,n=new URLSearchParams;return n.append("api-version",t),`/persons/me/bookmarks/favourites/${r}?${String(n)}`}}},_$=(t,e,r)=>{const n=y$(t,e),i=new Headers;i.append("content-type","application/json");const o=Object.assign({},{method:"head",headers:i},r);return[n,o]},b$=(t,e,r="json")=>(n,i)=>t[r](..._$(e,n,i)),w$=b$;class x${constructor(e,r){this._client=e,this._method=r}get(e,...r){return XO(this._client,e,this._method)(...r)}getAll(e){return l$(this._client,e,this._method)()}post(e,...r){return t$(this._client,e,this._method)(...r)}patch(e,...r){return o$(this._client,e,this._method)(...r)}delete(e,...r){return qO(this._client,e,this._method)(...r)}addFavorite(e,...r){return f$(this._client,e,this._method)(...r)}removeFavorite(e,...r){return g$(this._client,e,this._method)(...r)}verifyFavorite(e,...r){return w$(this._client,e,this._method)(...r)}}const E$=x$,C$=(t,e)=>{var r;const n=(r=xt[t])!==null&&r!==void 0?r:t;switch(n){case xt.v2:throw new Qi(t);case xt.v1:default:{const{id:i}=e,o=new URLSearchParams;return o.append("api-version",n),`/notification/${i}/?${String(o)}`}}},S$=(t,e,r)=>[C$(t,e),r],k$=(t,e,r="json")=>(n,i)=>t[r](...S$(e,n,i)),A$=(t,e)=>{var r;const n=(r=xt[t])!==null&&r!==void 0?r:t;switch(n){case xt.v2:throw new Qi(t);case xt.v1:default:{const{userId:i}=e,o=new URLSearchParams;return o.append("api-version",n),`/person/${i}/notifications/?${String(o)}`}}},R$=(t,e,r)=>{const n=A$(t,e),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]},T$=(t,e,r="json")=>(n,i)=>t[r](...R$(e,n,i)),I$=(t,e)=>{var r;const n=(r=xt[t])!==null&&r!==void 0?r:t;switch(n){case xt.v2:throw new Qi(t);case xt.v1:default:{const{id:i}=e,o=new URLSearchParams;return o.append("api-version",n),`/notification/${i}/?${String(o)}`}}},P$=(t,e,r)=>{const n=I$(t,e),i=new Headers;i.append("content-type","application/json");const o=Object.assign({},{method:"patch",body:JSON.stringify(e),headers:i},r);return[n,o]},M$=(t,e,r="json")=>(n,i)=>t[r](...P$(e,n,i)),Z$=(t,e)=>{var r;const n=(r=xt[t])!==null&&r!==void 0?r:t;switch(n){case xt.v2:throw new Qi(t);case xt.v1:default:{const{userId:i}=e,o=new URLSearchParams;return o.append("api-version",n),`/person/${i}/notifications/?${String(o)}`}}},H$=(t,e,r)=>[Z$(t,e),r],L$=(t,e,r="json")=>(n,i)=>t[r](...H$(e,n,i)),O$=(t,e)=>{var r;const n=(r=xt[t])!==null&&r!==void 0?r:t;switch(n){case xt.v2:throw new Qi(t);case xt.v1:default:{const{id:i}=e,o=new URLSearchParams;return o.append("api-version",n),`/notification/${i}/?${String(o)}`}}},$$=(t,e,r)=>{const n=O$(t,e),i=new Headers;i.append("content-type","application/json");const o=Object.assign({},{method:"delete",headers:i},r);return[n,o]},D$=(t,e,r="json")=>(n,i)=>t[r](...$$(e,n,i));var xt;(function(t){t.v1="1.0",t.v2="2.0"})(xt||(xt={}));const N$=(t,e)=>{var r;const n=(r=xt[t])!==null&&r!==void 0?r:t;switch(n){case xt.v2:throw new Qi(t);case xt.v1:default:{const{userId:i}=e,o=new URLSearchParams;return o.append("api-version",n),`/person/${i}/notifications/settings/?${String(o)}`}}},V$=(t,e,r)=>{const n=N$(t,e),i=new Headers;i.append("content-type","application/json");const o=Object.assign({},{method:"put",body:JSON.stringify(e),headers:i},r);return[n,o]},F$=(t,e,r="json")=>(n,i)=>t[r](...V$(e,n,i)),z$=F$,j$=(t,e)=>{var r;const n=(r=xt[t])!==null&&r!==void 0?r:t;switch(n){case xt.v2:throw new Qi(t);case xt.v1:default:{const{userId:i}=e,o=new URLSearchParams;return o.append("api-version",n),`/person/${i}/notifications/settings/?${String(o)}`}}},U$=(t,e,r)=>[j$(t,e),r],B$=(t,e,r="json")=>(n,i)=>t[r](...U$(e,n,i)),W$=B$;class q${get Version(){return xt}constructor(e,r){this._client=e,this._method=r}getAll(e,...r){return L$(this._client,e,this._method)(...r)}getById(e,...r){return k$(this._client,e,this._method)(...r)}setSeenByUser(e,...r){return M$(this._client,e,this._method)(...r)}create(e,...r){return T$(this._client,e,this._method)(...r)}delete(e,...r){return D$(this._client,e,this._method)(...r)}getSettings(e,...r){return W$(this._client,e,this._method)(...r)}updateSettings(e,...r){return z$(this._client,e,this._method)(...r)}}var V1=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(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};class G$ extends Error{constructor(e,r,n){super(e,n),this.response=r,this.name="ApiProviderError"}}const T0=t=>V1(void 0,void 0,void 0,function*(){var e;if(!t.ok){const{headers:r,status:n,statusText:i,type:o,url:a,bodyUsed:s}=t,c=(e=r.get("content-type"))===null||e===void 0?void 0:e.match(/application\/(\w*)?[+]?json/),l=!s&&(yield c?t.json():t.text());throw new G$("failed to execute request, response was not ok",{headers:r,status:n,statusText:i,type:o,url:a,data:l})}});class K${constructor({createClient:e}){this._createClientFn=e}createNotificationClient(e){return V1(this,void 0,void 0,function*(){const r=yield this._createClientFn("notification");return r.responseHandler.add("validate_api_request",T0),new q$(r,e)})}createBookmarksClient(e){return V1(this,void 0,void 0,function*(){const r=yield this._createClientFn("bookmarks");return r.responseHandler.add("validate_api_request",T0),new E$(r,e)})}createContextClient(e){return V1(this,void 0,void 0,function*(){const r=yield this._createClientFn("context");return r.responseHandler.add("validate_api_request",T0),new jO(r,e)})}}var Kx=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(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const Y$="services",X$=(t,e)=>r=>Kx(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}`)}),Q$={name:Y$,configure:()=>new yO,initialize:({ref:t,config:e,requireInstance:r,hasModule:n})=>Kx(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=X$(i,o)}if(!e.createClient)throw Error("missing configuration for creating API client");return new K$(e)})},J$=Q$;class eD extends EZ{constructor(){super([TZ,Nx,J4,gO,J$,dO]),this.logger=new Uw("FrameworkConfigurator")}configureHttp(...e){this.addConfig(VZ(...e))}configureHttpClient(...e){this.addConfig(Ax(...e))}configureMsal(...e){this.addConfig(WH(...e))}configureServiceDiscovery(e){this.configureHttpClient("service_discovery",e.client)}}var tD=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(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const rD=(t,e)=>tD(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}),Yx=b.createContext(null),nD=Yx.Provider;var iD=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(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const oD=t=>b.lazy(()=>iD(void 0,void 0,void 0,function*(){const e=new eD;yield t(e);const r=yield rD(e);return{default:({children:n})=>x.jsx(nD,{value:r,children:n})}})),Yr=()=>{let t=b.useContext(Yx);return t||console.warn("could not locate fusion in context!"),t??(t=window.Fusion),t||console.error("Could not load framework, might not be initiated?"),t},aD=t=>{const{configure:e,fallback:r,children:n}=t,i=b.useMemo(()=>oD(e),[e]);return x.jsx(b.Suspense,{fallback:r,children:x.jsx(i,{children:n})})};function Ye(){return Ye=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Ye.apply(this,arguments)}function Xi(t){"@babel/helpers - typeof";return Xi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Xi(t)}function I0(t){return t&&Xi(t)==="object"&&t.constructor===Object}function Xx(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{clone:!0},n=r.clone?Ye({},t):t;return I0(t)&&I0(e)&&Object.keys(e).forEach(function(i){i!=="__proto__"&&(I0(e[i])&&i in t?n[i]=Xx(t[i],e[i],r):n[i]=e[i])}),n}function sD(t,e){if(Xi(t)!=="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(Xi(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Qx(t){var e=sD(t,"string");return Xi(e)==="symbol"?e:String(e)}function n2(t,e,r){return e=Qx(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var cD=typeof Symbol=="function"&&Symbol.for;const Jx=cD?Symbol.for("mui.nested"):"__THEME_NESTED__";var lD=["checked","disabled","error","focused","focusVisible","required","expanded","selected"];function dD(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=t.disableGlobal,r=e===void 0?!1:e,n=t.productionPrefix,i=n===void 0?"jss":n,o=t.seed,a=o===void 0?"":o,s=a===""?"":"".concat(a,"-"),c=0,l=function(){return c+=1,c};return function(d,u){var h=u.options.name;if(h&&h.indexOf("Mui")===0&&!u.options.link&&!r){if(lD.indexOf(d.key)!==-1)return"Mui-".concat(d.key);var f="".concat(s).concat(h,"-").concat(d.key);return!u.options.theme[Jx]||a!==""?f:"".concat(f,"-").concat(l())}return"".concat(s).concat(i).concat(l())}}var X6=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ku=(typeof window>"u"?"undefined":X6(window))==="object"&&(typeof document>"u"?"undefined":X6(document))==="object"&&document.nodeType===9;function Q6(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Qx(n.key),n)}}function eE(t,e,r){return e&&Q6(t.prototype,e),r&&Q6(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function zv(t,e){return zv=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},zv(t,e)}function tE(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,zv(t,e)}function J6(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function rE(t,e){if(t==null)return{};var r={},n=Object.keys(t),i,o;for(o=0;o<n.length;o++)i=n[o],!(e.indexOf(i)>=0)&&(r[i]=t[i]);return r}var uD={}.constructor;function jv(t){if(t==null||typeof t!="object")return t;if(Array.isArray(t))return t.map(jv);if(t.constructor!==uD)return t;var e={};for(var r in t)e[r]=jv(t[r]);return e}function v5(t,e,r){t===void 0&&(t="unnamed");var n=r.jss,i=jv(e),o=n.plugins.onCreateRule(t,i,r);return o||(t[0],null)}var e8=function(e,r){for(var n="",i=0;i<e.length&&e[i]!=="!important";i++)n&&(n+=r),n+=e[i];return n},bs=function(e){if(!Array.isArray(e))return e;var r="";if(Array.isArray(e[0]))for(var n=0;n<e.length&&e[n]!=="!important";n++)r&&(r+=", "),r+=e8(e[n]," ");else r=e8(e,", ");return e[e.length-1]==="!important"&&(r+=" !important"),r};function Pl(t){return t&&t.format===!1?{linebreak:"",space:""}:{linebreak:`
70
+ `));return e.currentContext?yi(e.currentContext):zt},oL=t=>({ref:e,modules:r})=>{const{context:n,navigation:i}=r,o=nL(n,t==null?void 0:t.path);return oZ(i?o(i.path.pathname):zt,iL({ref:e,modules:r})).pipe(yZ())};var Vh=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(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})},A6=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)},Z1;class aL{constructor(){this.defaultExpireTime=1*60*1e3,Z1.set(this,[])}addConfigBuilder(e){A6(this,Z1,"f").push(e)}_getServiceProvider(e){var r;return Vh(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,n;return Vh(this,void 0,void 0,function*(){const i=yield A6(this,Z1,"f").reduce((o,a)=>Vh(this,void 0,void 0,function*(){const s=new JH(e,yield o);return yield Promise.resolve(a(s)),Object.assign(o,s.config)}),Promise.resolve({}));return(r=i.resolveInitialContext)!==null&&r!==void 0||(i.resolveInitialContext=oL()),(n=i.client)!==null&&n!==void 0||(i.client=yield(()=>Vh(this,void 0,void 0,function*(){const a=yield(yield this._getServiceProvider(e)).createContextClient("json$");return{get:{client:{fn:s=>a.get("v1",s,{selector:GH})},key:({id:s})=>s,expire:this.defaultExpireTime},query:{client:{fn:s=>a.query("v1",{query:s},{selector:KH})},key:s=>JSON.stringify(s),expire:this.defaultExpireTime},related:{client:{fn:s=>a.related("v1",{id:s.item.id,query:{filter:s.filter}},{selector:YH})},key:s=>JSON.stringify(s),expire:this.defaultExpireTime}}}))()),i})}}Z1=new WeakMap;var sL=function t(e,r){if(e===r)return!0;if(e&&r&&typeof e=="object"&&typeof r=="object"){if(e.constructor!==r.constructor)return!1;var n,i,o;if(Array.isArray(e)){if(n=e.length,n!=r.length)return!1;for(i=n;i--!==0;)if(!t(e[i],r[i]))return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if(o=Object.keys(e),n=o.length,n!==Object.keys(r).length)return!1;for(i=n;i--!==0;)if(!Object.prototype.hasOwnProperty.call(r,o[i]))return!1;for(i=n;i--!==0;){var a=o[i];if(!t(e[a],r[a]))return!1}return!0}return e!==e&&r!==r};const cL=Ug(sL);var R6;(function(t){t.IDLE="idle",t.ACTIVE="active",t.FAILED="failed",t.CANCELED="canceled"})(R6||(R6={}));const lL=t=>e=>e.pipe(pZ(t)),dL=t=>e=>e.pipe(mi(t)),uL=t=>e=>e.pipe(St(t)),hL=t=>t.pipe(We(e=>e.value));let Fh;const fL=new Uint8Array(16);function pL(){if(!Fh&&(Fh=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Fh))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Fh(fL)}const mL=/^(?:[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 vL(t){return typeof t=="string"&&mL.test(t)}const vr=[];for(let t=0;t<256;++t)vr.push((t+256).toString(16).slice(1));function Vx(t,e=0){return(vr[t[e+0]]+vr[t[e+1]]+vr[t[e+2]]+vr[t[e+3]]+"-"+vr[t[e+4]]+vr[t[e+5]]+"-"+vr[t[e+6]]+vr[t[e+7]]+"-"+vr[t[e+8]]+vr[t[e+9]]+"-"+vr[t[e+10]]+vr[t[e+11]]+vr[t[e+12]]+vr[t[e+13]]+vr[t[e+14]]+vr[t[e+15]]).toLowerCase()}function gL(t){if(!vL(t))throw TypeError("Invalid UUID");let e;const 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 yL(t){t=unescape(encodeURIComponent(t));const e=[];for(let r=0;r<t.length;++r)e.push(t.charCodeAt(r));return e}const _L="6ba7b810-9dad-11d1-80b4-00c04fd430c8",bL="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function wL(t,e,r){function n(i,o,a,s){var c;if(typeof i=="string"&&(i=yL(i)),typeof o=="string"&&(o=gL(o)),((c=o)===null||c===void 0?void 0:c.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let l=new Uint8Array(16+i.length);if(l.set(o),l.set(i,o.length),l=r(l),l[6]=l[6]&15|e,l[8]=l[8]&63|128,a){s=s||0;for(let d=0;d<16;++d)a[s+d]=l[d];return a}return Vx(l)}try{n.name=t}catch{}return n.DNS=_L,n.URL=bL,n}const xL=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),T6={randomUUID:xL};function Qf(t,e,r){if(T6.randomUUID&&!e&&!t)return T6.randomUUID();t=t||{};const n=t.random||(t.rng||pL)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,e){r=r||0;for(let i=0;i<16;++i)e[r+i]=n[i];return e}return Vx(n)}function EL(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 w0(t,e){return t<<e|t>>>32-e}function CL(t){const e=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof t=="string"){const a=unescape(encodeURIComponent(t));t=[];for(let s=0;s<a.length;++s)t.push(a.charCodeAt(s))}else Array.isArray(t)||(t=Array.prototype.slice.call(t));t.push(128);const n=t.length/4+2,i=Math.ceil(n/16),o=new Array(i);for(let a=0;a<i;++a){const s=new Uint32Array(16);for(let c=0;c<16;++c)s[c]=t[a*64+c*4]<<24|t[a*64+c*4+1]<<16|t[a*64+c*4+2]<<8|t[a*64+c*4+3];o[a]=s}o[i-1][14]=(t.length-1)*8/Math.pow(2,32),o[i-1][14]=Math.floor(o[i-1][14]),o[i-1][15]=(t.length-1)*8&4294967295;for(let a=0;a<i;++a){const s=new Uint32Array(80);for(let f=0;f<16;++f)s[f]=o[a][f];for(let f=16;f<80;++f)s[f]=w0(s[f-3]^s[f-8]^s[f-14]^s[f-16],1);let c=r[0],l=r[1],d=r[2],u=r[3],h=r[4];for(let f=0;f<80;++f){const p=Math.floor(f/20),m=w0(c,5)+EL(p,l,d,u)+h+e[p]+s[f]>>>0;h=u,u=d,d=w0(l,30)>>>0,l=c,c=m}r[0]=r[0]+c>>>0,r[1]=r[1]+l>>>0,r[2]=r[2]+d>>>0,r[3]=r[3]+u>>>0,r[4]=r[4]+h>>>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]}const SL=wL("v5",80,CL),kL=SL;class Ov extends Error{constructor(e,r){super(r.message,{cause:r.cause}),this.type=e,this.name="QueryClientError",this.request=r.request}}function gn(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 ga(t){return!!t&&!!t[Be]}function _i(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)===OL}(t)||Array.isArray(t)||!!t[$6]||!!(!((e=t.constructor)===null||e===void 0)&&e[$6])||s5(t)||c5(t))}function I6(t){return ga(t)||gn(23,t),t[Be].t}function hl(t,e,r){r===void 0&&(r=!1),Tl(t)===0?(r?Object.keys:f5)(t).forEach(function(n){r&&typeof n=="symbol"||e(n,t[n],t)}):t.forEach(function(n,i){return e(i,n,t)})}function Tl(t){var e=t[Be];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:s5(t)?2:c5(t)?3:0}function $v(t,e){return Tl(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function AL(t,e){return Tl(t)===2?t.get(e):t[e]}function Fx(t,e,r){var n=Tl(t);n===2?t.set(e,r):n===3?(t.delete(e),t.add(r)):t[e]=r}function RL(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function s5(t){return HL&&t instanceof Map}function c5(t){return LL&&t instanceof Set}function sr(t){return t.o||t.t}function l5(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=$L(t);delete e[Be];for(var r=f5(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 d5(t,e){return e===void 0&&(e=!1),u5(t)||ga(t)||!_i(t)||(Tl(t)>1&&(t.set=t.add=t.clear=t.delete=TL),Object.freeze(t),e&&hl(t,function(r,n){return d5(n,!0)},!0)),t}function TL(){gn(2)}function u5(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function Ki(t){var e=Nv[t];return e||gn(18,t),e}function IL(t,e){Nv[t]||(Nv[t]=e)}function Jf(){return Au}function x0(t,e){e&&(Ki("Patches"),t.u=[],t.s=[],t.v=e)}function e2(t){Dv(t),t.p.forEach(PL),t.p=null}function Dv(t){t===Au&&(Au=t.l)}function P6(t){return Au={p:[],l:Au,h:t,m:!0,_:0}}function PL(t){var e=t[Be];e.i===0||e.i===1?e.j():e.O=!0}function E0(t,e){e._=e.p.length;var r=e.p[0],n=t!==void 0&&t!==r;return e.h.g||Ki("ES5").S(e,t,n),n?(r[Be].P&&(e2(e),gn(4)),_i(t)&&(t=t2(e,t),e.l||r2(e,t)),e.u&&Ki("Patches").M(r[Be].t,t,e.u,e.s)):t=t2(e,r,[]),e2(e),e.u&&e.v(e.u,e.s),t!==zx?t:void 0}function t2(t,e,r){if(u5(e))return e;var n=e[Be];if(!n)return hl(e,function(o,a){return M6(t,n,e,o,a,r)},!0),e;if(n.A!==t)return e;if(!n.P)return r2(t,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=n.i===4||n.i===5?n.o=l5(n.k):n.o;hl(n.i===3?new Set(i):i,function(o,a){return M6(t,n,i,o,a,r)}),r2(t,i,!1),r&&t.u&&Ki("Patches").R(n,r,t.u,t.s)}return n.o}function M6(t,e,r,n,i,o){if(ga(i)){var a=t2(t,i,o&&e&&e.i!==3&&!$v(e.D,n)?o.concat(n):void 0);if(Fx(r,n,a),!ga(a))return;t.m=!1}if(_i(i)&&!u5(i)){if(!t.h.F&&t._<1)return;t2(t,i),e&&e.A.l||r2(t,i)}}function r2(t,e,r){r===void 0&&(r=!1),t.h.F&&t.m&&d5(e,r)}function C0(t,e){var r=t[Be];return(r?sr(r):t)[e]}function Z6(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 po(t){t.P||(t.P=!0,t.l&&po(t.l))}function S0(t){t.o||(t.o=l5(t.t))}function ku(t,e,r){var n=s5(e)?Ki("MapSet").N(e,r):c5(e)?Ki("MapSet").T(e,r):t.g?function(i,o){var a=Array.isArray(i),s={i:a?1:0,A:o?o.A:Jf(),P:!1,I:!1,D:{},l:o,t:i,k:null,o:null,j:null,C:!1},c=s,l=Vv;a&&(c=[s],l=Cd);var d=Proxy.revocable(c,l),u=d.revoke,h=d.proxy;return s.k=h,s.j=u,h}(e,r):Ki("ES5").J(e,r);return(r?r.A:Jf()).p.push(n),n}function ML(t){return ga(t)||gn(22,t),function e(r){if(!_i(r))return r;var n,i=r[Be],o=Tl(r);if(i){if(!i.P&&(i.i<4||!Ki("ES5").K(i)))return i.t;i.I=!0,n=H6(r,o),i.I=!1}else n=H6(r,o);return hl(n,function(a,s){i&&AL(i.t,a)===s||Fx(n,a,e(s))}),o===3?new Set(n):n}(t)}function H6(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return l5(t)}function ZL(){function t(s,c){function l(){this.constructor=s}i(s,c),s.prototype=(l.prototype=c.prototype,new l)}function e(s){s.o||(s.D=new Map,s.o=new Map(s.t))}function r(s){s.o||(s.o=new Set,s.t.forEach(function(c){if(_i(c)){var l=ku(s.A.h,c,s);s.p.set(c,l),s.o.add(l)}else s.o.add(c)}))}function n(s){s.O&&gn(3,JSON.stringify(sr(s)))}var i=function(s,c){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,d){l.__proto__=d}||function(l,d){for(var u in d)d.hasOwnProperty(u)&&(l[u]=d[u])})(s,c)},o=function(){function s(l,d){return this[Be]={i:2,l:d,A:d?d.A:Jf(),P:!1,I:!1,o:void 0,D:void 0,t:l,k:this,C:!1,O:!1},this}t(s,Map);var c=s.prototype;return Object.defineProperty(c,"size",{get:function(){return sr(this[Be]).size}}),c.has=function(l){return sr(this[Be]).has(l)},c.set=function(l,d){var u=this[Be];return n(u),sr(u).has(l)&&sr(u).get(l)===d||(e(u),po(u),u.D.set(l,!0),u.o.set(l,d),u.D.set(l,!0)),this},c.delete=function(l){if(!this.has(l))return!1;var d=this[Be];return n(d),e(d),po(d),d.t.has(l)?d.D.set(l,!1):d.D.delete(l),d.o.delete(l),!0},c.clear=function(){var l=this[Be];n(l),sr(l).size&&(e(l),po(l),l.D=new Map,hl(l.t,function(d){l.D.set(d,!1)}),l.o.clear())},c.forEach=function(l,d){var u=this;sr(this[Be]).forEach(function(h,f){l.call(d,u.get(f),f,u)})},c.get=function(l){var d=this[Be];n(d);var u=sr(d).get(l);if(d.I||!_i(u)||u!==d.t.get(l))return u;var h=ku(d.A.h,u,d);return e(d),d.o.set(l,h),h},c.keys=function(){return sr(this[Be]).keys()},c.values=function(){var l,d=this,u=this.keys();return(l={})[zh]=function(){return d.values()},l.next=function(){var h=u.next();return h.done?h:{done:!1,value:d.get(h.value)}},l},c.entries=function(){var l,d=this,u=this.keys();return(l={})[zh]=function(){return d.entries()},l.next=function(){var h=u.next();if(h.done)return h;var f=d.get(h.value);return{done:!1,value:[h.value,f]}},l},c[zh]=function(){return this.entries()},s}(),a=function(){function s(l,d){return this[Be]={i:3,l:d,A:d?d.A:Jf(),P:!1,I:!1,o:void 0,t:l,k:this,p:new Map,O:!1,C:!1},this}t(s,Set);var c=s.prototype;return Object.defineProperty(c,"size",{get:function(){return sr(this[Be]).size}}),c.has=function(l){var d=this[Be];return n(d),d.o?!!d.o.has(l)||!(!d.p.has(l)||!d.o.has(d.p.get(l))):d.t.has(l)},c.add=function(l){var d=this[Be];return n(d),this.has(l)||(r(d),po(d),d.o.add(l)),this},c.delete=function(l){if(!this.has(l))return!1;var d=this[Be];return n(d),r(d),po(d),d.o.delete(l)||!!d.p.has(l)&&d.o.delete(d.p.get(l))},c.clear=function(){var l=this[Be];n(l),sr(l).size&&(r(l),po(l),l.o.clear())},c.values=function(){var l=this[Be];return n(l),r(l),l.o.values()},c.entries=function(){var l=this[Be];return n(l),r(l),l.o.entries()},c.keys=function(){return this.values()},c[zh]=function(){return this.values()},c.forEach=function(l,d){for(var u=this.values(),h=u.next();!h.done;)l.call(d,h.value,h.value,this),h=u.next()},s}();IL("MapSet",{N:function(s,c){return new o(s,c)},T:function(s,c){return new a(s,c)}})}var L6,Au,h5=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",HL=typeof Map<"u",LL=typeof Set<"u",O6=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",zx=h5?Symbol.for("immer-nothing"):((L6={})["immer-nothing"]=!0,L6),$6=h5?Symbol.for("immer-draftable"):"__$immer_draftable",Be=h5?Symbol.for("immer-state"):"__$immer_state",zh=typeof Symbol<"u"&&Symbol.iterator||"@@iterator",OL=""+Object.prototype.constructor,f5=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,$L=Object.getOwnPropertyDescriptors||function(t){var e={};return f5(t).forEach(function(r){e[r]=Object.getOwnPropertyDescriptor(t,r)}),e},Nv={},Vv={get:function(t,e){if(e===Be)return t;var r=sr(t);if(!$v(r,e))return function(i,o,a){var s,c=Z6(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||!_i(n)?n:n===C0(t.t,e)?(S0(t),t.o[e]=ku(t.A.h,n,t)):n},has:function(t,e){return e in sr(t)},ownKeys:function(t){return Reflect.ownKeys(sr(t))},set:function(t,e,r){var n=Z6(sr(t),e);if(n!=null&&n.set)return n.set.call(t.k,r),!0;if(!t.P){var i=C0(sr(t),e),o=i==null?void 0:i[Be];if(o&&o.t===r)return t.o[e]=r,t.D[e]=!1,!0;if(RL(r,i)&&(r!==void 0||$v(t.t,e)))return!0;S0(t),po(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 C0(t.t,e)!==void 0||e in t.t?(t.D[e]=!1,S0(t),po(t)):delete t.D[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var r=sr(t),n=Reflect.getOwnPropertyDescriptor(r,e);return n&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:n.enumerable,value:r[e]}},defineProperty:function(){gn(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){gn(12)}},Cd={};hl(Vv,function(t,e){Cd[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),Cd.deleteProperty=function(t,e){return Cd.set.call(this,t,e,void 0)},Cd.set=function(t,e,r){return Vv.set.call(this,t[0],e,r,t[0])};var DL=function(){function t(r){var n=this;this.g=O6,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(m){var w=this;m===void 0&&(m=s);for(var v=arguments.length,g=Array(v>1?v-1:0),_=1;_<v;_++)g[_-1]=arguments[_];return c.produce(m,function(y){var C;return(C=o).call.apply(C,[w,y].concat(g))})}}var l;if(typeof o!="function"&&gn(6),a!==void 0&&typeof a!="function"&&gn(7),_i(i)){var d=P6(n),u=ku(n,i,void 0),h=!0;try{l=o(u),h=!1}finally{h?e2(d):Dv(d)}return typeof Promise<"u"&&l instanceof Promise?l.then(function(m){return x0(d,a),E0(m,d)},function(m){throw e2(d),m}):(x0(d,a),E0(l,d))}if(!i||typeof i!="object"){if((l=o(i))===void 0&&(l=i),l===zx&&(l=void 0),n.F&&d5(l,!0),a){var f=[],p=[];Ki("Patches").M(i,l,f,p),a(f,p)}return l}gn(21,i)},this.produceWithPatches=function(i,o){if(typeof i=="function")return function(l){for(var d=arguments.length,u=Array(d>1?d-1:0),h=1;h<d;h++)u[h-1]=arguments[h];return n.produceWithPatches(l,function(f){return i.apply(void 0,[f].concat(u))})};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){_i(r)||gn(8),ga(r)&&(r=ML(r));var n=P6(this),i=ku(this,r,void 0);return i[Be].C=!0,Dv(n),i},e.finishDraft=function(r,n){var i=r&&r[Be],o=i.A;return x0(o,n),E0(void 0,o)},e.setAutoFreeze=function(r){this.F=r},e.setUseProxies=function(r){r&&!O6&&gn(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=Ki("Patches").$;return ga(r)?a(r,n):this.produce(r,function(s){return a(s,n)})},t}(),Cn=new DL,jx=Cn.produce;Cn.produceWithPatches.bind(Cn);Cn.setAutoFreeze.bind(Cn);Cn.setUseProxies.bind(Cn);Cn.applyPatches.bind(Cn);Cn.createDraft.bind(Cn);Cn.finishDraft.bind(Cn);const Il=(...t)=>vt(e=>t.includes(e.type));var Pr=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)},NL=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},Pi,ti;class K2 extends $e{get action$(){return Pr(this,Pi,"f").asObservable()}get value(){return Pr(this,ti,"f").value}get closed(){return Pr(this,ti,"f").closed||Pr(this,Pi,"f").closed}constructor(e,r){super(i=>Pr(this,ti,"f").subscribe(i)),Pi.set(this,new jn),ti.set(this,void 0);const n="getInitialState"in e?e.getInitialState():r;NL(this,ti,new Al(n),"f"),Pr(this,Pi,"f").pipe(bx(e,n),yx()).subscribe(Pr(this,ti,"f")),this.reset=()=>Pr(this,ti,"f").next(n)}next(e){Pr(this,Pi,"f").next(e)}addEffect(e,r){const n=typeof e=="string"?this.action$.pipe(Il(e)):this.action$,i=r||e;return n.pipe(mi(o=>rr(new Promise((a,s)=>{try{a(i(o,this.value))}catch(c){s(c)}})).pipe(Qt(a=>(console.warn("unhandled effect",a),zt)))),vt(o=>!!o),Of(Lf)).subscribe(Pr(this,Pi,"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(Qt(n=>(console.trace("unhandled exception, epic closed!",n),zt)),Of(Lf)).subscribe(Pr(this,Pi,"f"))}unsubscribe(){Pr(this,Pi,"f").unsubscribe(),Pr(this,ti,"f").unsubscribe()}complete(){Pr(this,Pi,"f").complete(),Pr(this,ti,"f").complete()}asObservable(){return Pr(this,ti,"f").asObservable()}}Pi=new WeakMap,ti=new WeakMap;const Ux=(t,e)=>Object.entries(t).reduce((r,[n,i])=>Object.assign(r,{[n]:typeof i=="function"?(...o)=>e.next(i(...o)):Ux(i,e)}),{});function _r(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}const H1="::",p5=t=>new RegExp(`${H1}\\${t}$`),D6=t=>t.type.replace(p5("\\w+$"),"");function Di(t,e,r,n){const i=_r([t,"request"].join(H1),e);return r&&Object.assign(i,{success:_r([t,"success"].join(H1),r)}),n&&Object.assign(i,{failure:_r([t,"failure"].join(H1),n)}),i}const VL=t=>!!t.type.match(/::request$/),FL=t=>!!t.type.match(p5("success")),zL=t=>!!t.type.match(p5("failure")),jL=t=>FL(t)||zL(t);function N6(t){return _i(t)?jx(t,()=>{}):t}function UL(t){return typeof t=="function"}function Gu(t,e){const[r,n,i]=BL(e);let o;if(UL(t))o=()=>N6(t());else{const s=N6(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,u)=>{if(u)if(ga(d)){const f=u(d,c);return f===void 0?d:f}else{if(_i(d))return jx(d,h=>u(h,c));{const h=u(d,c);if(h===void 0){if(d===null)return d;throw Error("A case reducer on a non-draftable value must not return undefined")}return h}}return d},s)}return a.getInitialState=o,a}function BL(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]}function WL(t,e){const r=typeof e=="function"?e:Gu(e.initial,o=>e.builder(o,t)),n=new K2(r),i=Ux(t,n);return{actions:t,dispatch:i,subject:n}}const qL=()=>({request:_r("client/request",(e,r)=>{var n,i,o,a;return r??(r={}),(n=r.transaction)!==null&&n!==void 0||(r.transaction=Qf()),(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 Xw),{payload:e,meta:r}}),retry:_r("client/retry",e=>({payload:e})),success:_r("client/success",(e,r)=>({payload:e,meta:r})),cancel:_r("client/cancel",e=>({payload:e})),failure:_r("client/failure",(e,r)=>({payload:e,meta:r})),error:_r("client/error",(e,r)=>({payload:e,meta:r}))}),Gt=qL(),Bx=t=>e=>e.pipe(vt(Gt.request.match),mi(r=>{const{meta:{controller:n,transaction:i}}=r;return new $e(o=>{if(n.signal.aborted)return o.next(Gt.cancel({transaction:i,reason:`request [${i}] was aborted!`})),o.complete();o.add(e.pipe(vt(Gt.cancel.match)).subscribe(a=>{a.payload.transaction===i&&(n.signal.aborted||n.abort(),o.complete())})),o.add(_v(n.signal,"abort").subscribe(()=>{o.next(Gt.cancel({transaction:i,reason:`request [${i}] was aborted!`})),o.complete()})),o.add(rr(t(r)).subscribe({next:a=>o.next(a),error:a=>o.next(Gt.error(a,{request:r})),complete:()=>o.complete()}))})})),GL=t=>(t=Object.assign({},{count:0,delay:0},t),(e,r)=>e.pipe(Bx(n=>e.pipe(vt(Gt.failure.match),vt(i=>i.meta.request===n),Ex(r),St(([i,o])=>{var a,s;const{transaction:c}=n.meta,l=o[c];if(!l)return zt;const d=(s=(a=l.retry)===null||a===void 0?void 0:a.length)!==null&&s!==void 0?s:0,u=Object.assign({},t,n.meta.retry);if(d>=u.count)throw u.count?Error("maximum retries executed!",{cause:i.payload}):i.payload;return(typeof u.delay=="function"?rr(u.delay(i.payload.cause)).pipe(Qt(f=>{throw Error("failed to resolve delay",{cause:f})})):hZ(u.delay)).pipe(We(()=>Gt.retry(n)))}))))),KL=t=>e=>e.pipe(Bx(r=>rr(t(r.payload,r.meta.controller.signal)).pipe(We(n=>Gt.success(n,{request:r})),Qt(n=>yi(Gt.failure(Error(`failed to execute request for transaction ${r.meta.transaction}`,{cause:n}),{request:r})))))),YL=t=>t.pipe(vt(Gt.retry.match),We(e=>e.payload)),Wx=()=>vt(t=>t.status==="complete"),XL=(t={})=>Gu(t,e=>e.addCase(Gt.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(Gt.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(Gt.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(Gt.cancel,(r,n)=>{const{transaction:i,reason:o}=n.payload;if(r[i]){const a=Object.assign({},I6(r[i]));a.task.error(new Ov("abort",{request:a,message:o??"request was canceled"})),delete r[i]}}).addCase(Gt.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(Gt.error,(r,n)=>{const{payload:i,meta:o}=n,{transaction:a}=o.request.meta;if(r[a]){const s=Object.assign({},I6(r[a]));s.task.error(new Ov("error",{request:s,message:`failed to process task [${a}]`,cause:i.cause})),delete r[a]}}));var QL=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(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})},Ot=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)},V6=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},Wt,qa;class F6 extends $e{get closed(){return Ot(this,Wt,"f").closed}get state$(){return Ot(this,Wt,"f")}get action$(){return Ot(this,Wt,"f").action$}get success$(){return this.action$.pipe(vt(Gt.success.match),We(({payload:e})=>e))}get error$(){return this.action$.pipe(Il("client/error"),Ex(Ot(this,Wt,"f")),We(([e,r])=>{const{payload:n,meta:i}=e,{transaction:o}=i.request.meta,a=r[e.meta.request.meta.transaction];return new Ov("error",{request:a,message:`failed to process task [${o}]`,cause:n})}))}constructor(e,r){super(o=>Ot(this,Wt,"f").subscribe(o)),Wt.set(this,void 0),qa.set(this,void 0);const n={};V6(this,Wt,new K2(XL(n)),"f"),V6(this,qa,new Nr(()=>Ot(this,Wt,"f").complete()),"f"),Ot(this,qa,"f").add(Ot(this,Wt,"f").addFlow(KL(e))),Ot(this,qa,"f").add(Ot(this,Wt,"f").addFlow(YL));const i=Object.assign({count:0,delay:0},r==null?void 0:r.retry);Ot(this,qa,"f").add(Ot(this,Wt,"f").addFlow(GL(i)))}next(e,r){const n=Gt.request(e,r);return Ot(this,Wt,"f").next(n),n.meta}nextAsync(e,r){return QL(this,void 0,void 0,function*(){return Nn(this.next(e,r).task.pipe(Wx()))})}getTaskByTransaction(e){const r=Ot(this,Wt,"f").value[e];return r&&r.task}getTaskByRef(e){const r=Object.values(Ot(this,Wt,"f").value).find(n=>n.ref===e);return r&&r.task}cancel(e,r){if(e)e&&Ot(this,Wt,"f").value[e]&&(r??(r=`[${e}]: transaction canceled`),Ot(this,Wt,"f").next(Gt.cancel({transaction:e,reason:r})));else for(const n of Object.keys(Ot(this,Wt,"f").value))this.cancel(n,"all transactions canceled")}on(e,r){return Ot(this,Wt,"f").addEffect(Gt[e].type,n=>{r(n,this)})}complete(){Ot(this,qa,"f").unsubscribe()}asObservable(){return Ot(this,Wt,"f").asObservable()}}Wt=new WeakMap,qa=new WeakMap;function JL(){return{set:_r("cache/set",(t,e)=>({payload:{key:t,entry:e}})),remove:_r("cache/remove",t=>({payload:t})),invalidate:_r("cache/invalidate",t=>({payload:t})),trim:_r("cache/trim",t=>({payload:t}))}}const nc=JL(),eO=(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 tO(t,e={}){return Gu(e,r=>r.addCase(t.set,(n,i)=>{var o;const{key:a,entry:s}=i.payload,c=n[a];if(c)c.updated=Date.now(),(o=c.updates)!==null&&o!==void 0||(c.updates=0),c.updates++;else{const l=Date.now();n[a]=Object.assign(Object.assign({},s),{created:l,updated:l})}}).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:eO,l=Object.keys(n),d=Object.entries(n).filter(([u,h])=>!s.validate||s.validate(h)).sort((u,h)=>c(u[1],h[1])).slice(0,(a=s.size)!==null&&a!==void 0?a:Number.MAX_SAFE_INTEGER).map(([u])=>u);if(l.length!==d.length)for(const u of l){const h=d.indexOf(u);h!==-1?d.splice(h,1):delete n[u]}}))}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)},rO=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},pn;class z6{get state$(){return Ri(this,pn,"f").asObservable()}constructor(e){pn.set(this,void 0);const{trimming:r,initial:n}=e;rO(this,pn,new K2(tO(nc,n)),"f"),r&&Ri(this,pn,"f").addEffect("cache/set",()=>Ri(this,pn,"f").next(nc.trim(r)))}setItem(...e){Ri(this,pn,"f").next(nc.set(...e))}getItem(e){return Ri(this,pn,"f").value[e]}removeItem(e){Ri(this,pn,"f").next(nc.remove(e))}invalidate(e){Ri(this,pn,"f").next(nc.invalidate(e))}trim(e){Ri(this,pn,"f").next(nc.trim(e))}reset(){Ri(this,pn,"f").reset()}complete(){Ri(this,pn,"f").complete()}}pn=new WeakMap;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)},ic=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},nO=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},Ga,ri,Wo,_c,bc,L1,Fv;const iO=(t=0)=>e=>{var r;return((r=e.updated)!==null&&r!==void 0?r:0)+t>Date.now()},oO=t=>{if(typeof t=="function")return t;switch(t){case"concat":return lL;case"merge":return dL;case"switch":default:return uL}};class Hr{get client(){return lt(this,ri,"f")}get cache(){return lt(this,Wo,"f")}constructor(e){var r;Ga.set(this,new Nr),ri.set(this,void 0),Wo.set(this,void 0),_c.set(this,new jn),bc.set(this,void 0),L1.set(this,void 0),Fv.set(this,Qf()),ic(this,bc,i=>kL(e.key(i),lt(this,Fv,"f")),"f"),ic(this,L1,(r=e==null?void 0:e.validate)!==null&&r!==void 0?r:iO(e==null?void 0:e.expire),"f"),e.client instanceof F6?ic(this,ri,e.client,"f"):(ic(this,ri,new F6(e.client.fn,e.client.options),"f"),lt(this,Ga,"f").add(()=>lt(this,ri,"f").complete())),e.cache instanceof z6?ic(this,Wo,e.cache,"f"):(ic(this,Wo,new z6(e.cache||{}),"f"),lt(this,Ga,"f").add(()=>lt(this,Wo,"f").complete()));const n=oO(e.queueOperator);lt(this,Ga,"f").add(()=>lt(this,_c,"f").complete()),lt(this,Ga,"f").add(lt(this,_c,"f").pipe(n(({args:i,options:o})=>new $e(a=>{const{task:s,transaction:c}=lt(this,ri,"f").next(i,o);a.add(s.pipe(Qt(()=>zt)).subscribe(a)),a.add(()=>{setTimeout(()=>lt(this,ri,"f").cancel(c))})})),Wx(),xx(()=>!lt(this,ri,"f").closed)).subscribe(i=>{const{args:o,value:a,transaction:s,ref:c}=i,l=c??lt(this,bc,"f").call(this,o);lt(this,Wo,"f").setItem(l,{value:a,args:o,transaction:s})}))}next(e,r){lt(this,_c,"f").next({args:e,options:r})}query(e,r){var n;const i=lt(this,bc,"f").call(this,e);return(n=lt(this,ri,"f").getTaskByRef(i))!==null&&n!==void 0?n:this._createTask(i,e,r)}queryAsync(e,r){const n=r||{},{awaitResolve:i}=n,o=nO(n,["awaitResolve"]);return(i?ur:Nn)(this._query(e,o))}complete(){lt(this,Ga,"f").unsubscribe()}_query(e,r){var n;const i=lt(this,bc,"f").call(this,e);return(n=lt(this,ri,"f").getTaskByRef(i))!==null&&n!==void 0?n:this._createTask(i,e,r)}_createTask(e,r,n){var i;const o=new Xw,a=lt(this,Wo,"f").getItem(e);if(a){const{value:l,args:d,created:u,updated:h,updates:f,transaction:p}=a,m={status:"cache",value:l,args:d,created:u,updated:h,updates:f,transaction:p};o.next(m)}const s=((i=n==null?void 0:n.cache)===null||i===void 0?void 0:i.validate)||lt(this,L1,"f");return a&&s(a,r)?o.complete():lt(this,_c,"f").next({args:r,options:{ref:e,task:o}}),o.asObservable()}}Ga=new WeakMap,ri=new WeakMap,Wo=new WeakMap,_c=new WeakMap,bc=new WeakMap,L1=new WeakMap,Fv=new WeakMap;Hr.extractQueryValue=hL;var zo=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)},j6=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},Sd,io;class aO extends $e{get currentContext(){return zo(this,io,"f").value}get currentContext$(){return zo(this,io,"f").asObservable()}get client(){return zo(this,Sd,"f")}constructor(e){super(r=>zo(this,io,"f").subscribe(r)),Sd.set(this,void 0),io.set(this,void 0),j6(this,Sd,new Hr(e),"f"),j6(this,io,new Al(void 0),"f")}setCurrentContext(e){typeof e=="string"?this.resolveContext(e).pipe(Qt(()=>zt)).subscribe(r=>this.setCurrentContext(r)):cL(e,zo(this,io,"f").value)||zo(this,io,"f").next(e)}resolveContext(e){return zo(this,Sd,"f").query({id:e}).pipe(We(r=>r.value),Qt(r=>{throw r.cause?r.cause:r}))}resolveContextAsync(e,r){return(r!=null&&r.awaitResolve?ur:Nn)(this.resolveContext(e))}dispose(){zo(this,io,"f").complete()}}Sd=new WeakMap,io=new WeakMap;var id=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(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})},Ue=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)},Da=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,O1,kd,ni,Ka,Ya,Ad,$1,D1;let sO=class{get contextClient(){return Ue(this,oo,"f")}get queryClient(){return Ue(this,O1,"f")}get currentContext$(){return Ue(this,oo,"f").currentContext$}get currentContext(){return Ue(this,oo,"f").currentContext}set currentContext(e){if(console.warn("@deprecated","ContextProvider.currentContext","use setCurrentContextById|setCurrentContext|clearCurrentContext"),e===void 0)throw Error("not allowed to set current context as undefined undefined!");this.setCurrentContextAsync(e)}constructor(e){var r,n,i;oo.set(this,void 0),O1.set(this,void 0),kd.set(this,void 0),ni.set(this,void 0),Ka.set(this,new Nr),Ya.set(this,void 0),Ad.set(this,void 0),$1.set(this,void 0),D1.set(this,new jn);const{config:o,event:a}=e;e.parentContext&&console.warn("@deprecated","parentContext as arg is deprecated, use ContextProvider.connectParentContext"),Da(this,ni,a,"f"),o.resolveContext&&(this.resolveContext=(r=o.resolveContext)===null||r===void 0?void 0:r.bind(this)),o.validateContext&&(this.validateContext=(n=o.validateContext)===null||n===void 0?void 0:n.bind(this)),Da(this,Ya,o.contextType,"f"),Da(this,Ad,o.contextFilter,"f"),Da(this,oo,new aO(o.client.get),"f"),Da(this,O1,new Hr(o.client.query),"f"),o.client.related&&Da(this,kd,new Hr(o.client.related),"f"),Da(this,$1,(i=o.contextParameterFn)!==null&&i!==void 0?i:s=>({search:s.search,filter:{type:s.type}}),"f"),Ue(this,ni,"f")&&(Ue(this,Ka,"f").add(this.currentContext$.pipe(bv()).subscribe(([s,c])=>{var l;(l=Ue(this,ni,"f"))===null||l===void 0||l.dispatchEvent("onCurrentContextChanged",{source:this,canBubble:!0,detail:{previous:s,next:c}})})),Ue(this,Ka,"f").add(Ue(this,ni,"f").addEventListener("onCurrentContextChanged",s=>{s.source!==this&&s.detail.next!==void 0&&this.setCurrentContext(s.detail.next)}))),Ue(this,Ka,"f").add(Ue(this,D1,"f").pipe(St(s=>s),ul(s=>console.debug("ContextProvider::#contextQueue",s))).subscribe(s=>Ue(this,oo,"f").setCurrentContext(s??null)))}connectParentContext(e,r){const i=e.currentContext$.pipe(vt(o=>o!==void 0),vt((o,a)=>{var s;return r!=null&&r.skipFirst&&a<=1?(console.debug("ContextProvider::connectParentContext","skipping first item",o),!1):((s=this.currentContext)===null||s===void 0?void 0:s.id)!==(o==null?void 0:o.id)}),St(o=>id(this,void 0,void 0,function*(){var a;if(o){const s=yield(a=Ue(this,ni,"f"))===null||a===void 0?void 0:a.dispatchEvent("onParentContextChanged",{source:this,detail:o,cancelable:!0});return{next:o,canceled:s==null?void 0:s.canceled}}return{next:o}})),vt(o=>!o.canceled),St(({next:o})=>this.setCurrentContext(o,{validate:!0,resolve:!0}).pipe(Qt(a=>(console.warn("ContextProvider::onParentContextChanged","setCurrentContext",a),zt)))),Qt(o=>(console.warn("ContextProvider::onParentContextChanged","unhandled exception",o),zt))).subscribe();return Ue(this,Ka,"f").add(i),i}setCurrentContextById(e){return new $e(r=>{try{Ue(this,oo,"f").resolveContext(e).pipe(vt(n=>!!n),St(n=>this.setCurrentContext(n))).subscribe(r)}catch(n){r.error(n)}})}setCurrentContextByIdAsync(e){return ur(this.setCurrentContextById(e))}setCurrentContext(e,r){const n=new jn,i=new jn,o=this._setCurrentContext(e,r).pipe(ul(a=>i.next(a)),wx(n),i6(()=>i.complete()),Qt(a=>(i.error(a),zt)));return Ue(this,D1,"f").next(o),i.pipe(i6(()=>n.next(!0)))}_setCurrentContext(e,r){return new $e(n=>{var i;if(e===this.currentContext)return n.next(e),n.complete();if(e&&(r!=null&&r.validate)&&!this.validateContext(e)){if(!r.resolve)return(i=Ue(this,ni,"f"))===null||i===void 0||i.dispatchEvent("onSetContextValidationFailed",{source:this,detail:{context:e}}),n.error(Error("failed to validate provided context"));if(r.resolve)return yi(e).pipe(St(o=>id(this,void 0,void 0,function*(){var a;const s=yield(a=Ue(this,ni,"f"))===null||a===void 0?void 0:a.dispatchEvent("onSetContextResolve",{source:this,cancelable:!0,detail:{context:o}});if(s!=null&&s.canceled)throw Error("resolving of context was canceled");return o})),St(o=>this.resolveContext(o).pipe(We(a=>({context:o,resolved:a})))),St(({context:o,resolved:a})=>id(this,void 0,void 0,function*(){var s;const c=yield(s=Ue(this,ni,"f"))===null||s===void 0?void 0:s.dispatchEvent("onSetContextResolved",{source:this,cancelable:!0,detail:{context:o,resolved:a}});if(c!=null&&c.canceled)throw Error("resolving of context was canceled");return a})),St(o=>this._setCurrentContext(o))).subscribe(n)}return yi(e).pipe(St(o=>id(this,void 0,void 0,function*(){var a;const s=yield(a=Ue(this,ni,"f"))===null||a===void 0?void 0:a.dispatchEvent("onCurrentContextChange",{source:this,canBubble:!0,cancelable:!0,detail:{context:o}});if(s!=null&&s.canceled)throw Error("change of context was aborted");return o}))).subscribe(o=>{n.next(o),n.complete()})})}setCurrentContextAsync(e,r){return id(this,void 0,void 0,function*(){return ur(this.setCurrentContext(e,r))})}queryContext(e){const r=this.queryClient.query(Ue(this,$1,"f").call(this,{search:e,type:Ue(this,Ya,"f")})).pipe(We(n=>n.value));return Ue(this,Ad,"f")?r.pipe(We(Ue(this,Ad,"f"))):r}queryContextAsync(e){return ur(this.queryContext(e))}validateContext(e){return Ue(this,Ya,"f")?Ue(this,Ya,"f").map(r=>r.toLowerCase()).includes(e.type.id.toLowerCase()):!0}resolveContext(e){return this.relatedContexts({item:e,filter:{type:Ue(this,Ya,"f")}}).pipe(We(r=>r.filter(n=>this.validateContext(n))),We(r=>{const n=r.shift();if(!n)throw Error("failed to resolve context");return r.length&&console.warn("ContextProvider::relatedContext","multiple items found 🤣",r),n}))}resolveContextAsync(e){return ur(this.resolveContext(e))}relatedContexts(e){return Ue(this,kd,"f")?Ue(this,kd,"f").query(e).pipe(We(({value:r})=>r),Qt(r=>{throw r.cause?r.cause:r})):ux(()=>Error("ContextProvider::relatedContexts - no client defined for resolving related context"))}relatedContextsAsync(e){return ur(this.relatedContexts(e))}clearCurrentContext(){this.setCurrentContext(null)}dispose(){Ue(this,Ka,"f").unsubscribe(),Ue(this,oo,"f").dispose()}};oo=new WeakMap,O1=new WeakMap,kd=new WeakMap,ni=new WeakMap,Ka=new WeakMap,Ya=new WeakMap,Ad=new WeakMap,$1=new WeakMap,D1=new WeakMap;var cO=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(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const lO="context",dO={name:lO,configure:()=>new aL,initialize:function(t){var e;return cO(this,void 0,void 0,function*(){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,o=new sO({config:r,event:n,parentContext:i}),a=new Nr(()=>o.dispose());return this.postInitialize=s=>new $e(c=>{const l=r.resolveInitialContext?rr(r.resolveInitialContext(s)).pipe(vt(d=>!!d),St(d=>s.modules.context.setCurrentContext(d,{validate:!0,resolve:!0}))):zt;c.add(l.pipe(Qt(d=>(console.warn("ContextModule.postInitialize","failed to resolve initial context",d),zt))).subscribe({next:d=>{console.debug("ContextModule.postInitialize",`initial context was resolved to [${d?d.id:"none"}]`,d)},complete:()=>{r.connectParentContext!==!1&&i&&o.connectParentContext(i),c.complete()}}))}),this.dispose=()=>a.unsubscribe(),o})}};var U6=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(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};class uO{constructor(e){this.clientKey=e.clientKey,this.endpoint=e.endpoint,this.clientCtor=e.clientCtor}createHttpClientClient(e){return U6(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 U6(this,void 0,void 0,function*(){if(!this.endpoint)throw Error("no endpoint defined!");return new this.clientCtor({http:e,endpoint:this.endpoint})})}}var k0=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(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};class hO{constructor(e,r){this._client=e,this._http=r}get environment(){return this._client.environment}resolveServices(){return this._client.fetchEnvironment()}resolveService(e){return k0(this,void 0,void 0,function*(){return this._client.resolveService(e)})}createClient(e,r){return k0(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 k0(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(Ax(i,{baseUri:o,defaultScopes:a}))})}}var A0=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(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})},B6=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)},fO=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},Rd;const W6="services";class pO{get environment(){var e;const r=(e=B6(this,Rd,"f").cache.getItem(W6))===null||e===void 0?void 0:e.value;if(!r)throw Error("no cached environment found");return r}constructor({http:e,endpoint:r}){Rd.set(this,void 0),this.http=e,this.endpoint=r,fO(this,Rd,new Hr({client:{fn:()=>e.fetch$(r,{selector:this.selector.bind(this)})},key:()=>W6,expire:5*60*1e3}),"f")}fetchEnvironment(){return A0(this,void 0,void 0,function*(){return Nn(Hr.extractQueryValue(B6(this,Rd,"f").query(void 0,{cache:{suppressInvalid:!0}})))})}selector(e){return A0(this,void 0,void 0,function*(){const r=yield e.json(),n=r.services.reduce((i,o)=>{var a;return Object.assign(i,{[o.key]:{clientId:r.clientId,uri:o.uri,defaultScopes:(a=o.defaultScopes)!==null&&a!==void 0?a:[r.clientId+"/.default"]}})},{});return Object.assign(Object.assign({},r),{services:n})})}resolveService(e){return A0(this,void 0,void 0,function*(){try{const{services:r}=yield this.fetchEnvironment();return r[e]}catch(r){throw console.error(r),r}})}}Rd=new WeakMap;const mO="serviceDiscovery";var vO=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(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const gO={name:mO,configure:()=>new uO({clientCtor:pO,clientKey:"service_discovery",endpoint:"/_discovery/environments/current"}),initialize:({config:t,requireInstance:e})=>vO(void 0,void 0,void 0,function*(){const r=yield e("http"),n=yield t.createHttpClientClient(r),i=yield t.createClient(n);return new hO(i,r)})};class yO{}var Un;(function(t){t.v1="1.0",t.v2="2.0"})(Un||(Un={}));class Qi extends Error{constructor(e,r){super(`unsupported version ${e}`,{cause:r}),this.version=e}}const _O=(t,e)=>{var r;const n=(r=Un[t])!==null&&r!==void 0?r:t;switch(n){case Un.v2:throw new Qi(t);case Un.v1:default:{const{id:i}=e,o=new URLSearchParams;return o.append("api-version",n),`/contexts/${i}/?${String(o)}`}}},bO=(t,e,r)=>[_O(t,e),r],wO=(t,e,r="json")=>(n,i)=>t[r](...bO(e,n,i));var xO=["eq","ne","gt","ge","lt","le"],jh=["and","or","not"],EO=["any","all"],CO=["startswith","endswith","contains"],SO=["expand","levels","select","skip","top","count","orderby","filter"],q6=/\((.*)\)/,G6=/(?!indexof)\((\w+)\)/,K6;(function(t){t.sum="sum",t.min="min",t.max="max",t.average="average",t.countdistinct="countdistinct"})(K6||(K6={}));var ro="";function qx(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,u=e.key,h=e.count,f=e.expand,p=e.action,m=e.func,w="",v=[],g={};if(u!=null&&(w+="(".concat(zi(u,v),")")),(c||typeof h=="object")&&(g.$filter=Ru(typeof h=="object"?h:c,v)),l&&(g.$apply=Gx(l)),f&&(g.$expand=N1(f)),d&&(g.$orderby=m5(d)),h&&(typeof h=="boolean"?g.$count=!0:w+="/$count"),typeof a=="number"&&(g.$top=a),typeof s=="number"&&(g.$skip=s),p&&(w+="/".concat(p)),m){if(typeof m=="string")w+="/".concat(m);else if(typeof m=="object"){var _=Object.keys(m)[0],y=zi(m[_],v);w+="/".concat(_),y!==""&&(w+="(".concat(y,")"))}}return v.length>0&&Object.assign(g,v.reduce(function(C,S){var A;return Object.assign(C,(A={},A["@".concat(S.name)]=zi(S.value),A))},{})),IO(w,Fe({$select:r,$search:n,$skiptoken:i,$format:o},g))}function R0(t,e,r){return r===void 0&&(r=[]),"".concat(t," eq ").concat(zi(e,r))}function Ru(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,u){var h=o[u];if(h===void 0)return d;var f="";if(s?u===ro?f=s:G6.test(u)?f=u.replace(G6,function(g,_){return _.trim()===ro?"(".concat(s,")"):"(".concat(s,"/").concat(_.trim(),")")}):q6.test(u)?f=u.replace(q6,function(g,_){return _.trim()===ro?"(".concat(s,")"):"(".concat(s,"/").concat(_.trim(),")")}):f="".concat(s,"/").concat(u):f=u,u===ro&&Array.isArray(h))return d.concat(h.map(function(g){return R0(f,g)}));if(["number","string","boolean"].indexOf(typeof h)!==-1||h instanceof Date||h===null)d.push(R0(f,h,a));else if(Array.isArray(h)){var p=u,m=h.map(function(g){return Ru(g,a,s)}).filter(function(g){return g}).map(function(g){return jh.indexOf(p)!==-1?"(".concat(g,")"):g});m.length&&(jh.indexOf(p)!==-1?m.length&&(p==="not"?d.push(Y6(m)):d.push("(".concat(m.join(" ".concat(p," ")),")"))):d.push(m.join(" ".concat(p," "))))}else if(jh.indexOf(f)!==-1){var w=f,m=Object.keys(h).map(function(_){var y;return n((y={},y[_]=h[_],y))});m.length&&(w==="not"?d.push(Y6(m)):d.push("(".concat(m.join(" ".concat(w," ")),")")))}else if(typeof h=="object")if("type"in h)d.push(R0(f,h,a));else{var v=Object.keys(h);v.forEach(function(g){if(h[g]!==void 0)if(xO.indexOf(g)!==-1)d.push("".concat(f," ").concat(g," ").concat(zi(h[g],a)));else if(jh.indexOf(g)!==-1)Array.isArray(h[g])?d.push(h[g].map(function(S){return"("+n(S,a,f)+")"}).join(" ".concat(g," "))):d.push("("+n(h[g],a,f)+")");else if(EO.indexOf(g)!==-1){var _=i(u.toLowerCase(),h[g],g,f);_&&d.push(_)}else if(g==="has")d.push("".concat(f," ").concat(g," ").concat(zi(h[g],a)));else if(g==="in"){var y=Array.isArray(h[g])?h[g]:h[g].value.map(function(S){return{type:h[g].type,value:S}});d.push(f+" in ("+y.map(function(S){return zi(S,a)}).join(",")+")")}else if(CO.indexOf(g)!==-1)d.push("".concat(g,"(").concat(f,",").concat(zi(h[g],a),")"));else{var C=n(h,a,f);C&&d.push(C)}})}else throw new Error("Unexpected value type: ".concat(h));return d},[]);c=l.join(" and ")}return c}function i(o,a,s,c){var l="";if(typeof a=="string"||a instanceof String)l=kO(o,a,s,c);else if(a){var d=Array.isArray(a)?a.reduce(function(h,f){return f.hasOwnProperty(ro)?(h.hasOwnProperty(ro)||(h[ro]=[]),h[ro].push(f[ro]),h):Fe(Fe({},h),f)},{}):a,u=n(d,e,o);l="".concat(c,"/").concat(s,"(").concat(u?"".concat(o,":").concat(u):"",")")}return l}}function kO(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 AO(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 zi(t,e){if(typeof t=="string")return"'".concat(AO(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 zi(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(zi(i,e))}).join(",")}return t}function N1(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 N1(r)}).join(","));if(typeof t=="object"){var e=Object.keys(t);return e.some(function(r){return SO.indexOf(r.toLowerCase())!==-1})?e.map(function(r){var n;switch(r){case"filter":n=Ru(t[r]);break;case"orderBy":n=m5(t[r]);break;case"levels":case"count":case"skip":case"top":n="".concat(t[r]);break;default:n=N1(t[r])}return"$".concat(r.toLowerCase(),"=").concat(n)}).join(";"):e.map(function(r){var n=N1(t[r]);return n?"".concat(r,"(").concat(n,")"):r}).join(",")}return""}function Gx(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=Bw(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(RO(o),")")),a){var d=Ru(a);d&&n.push("filter(".concat(Ru(d),")"))}return s&&n.push("groupby(".concat(TO(s),")")),n},[]);return r.join("/")||void 0}function RO(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&&i.as)return"".concat(n," as ").concat(i.as);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 TO(t){if(!t.properties)throw new Error("'properties' property required for groupBy");var e="(".concat(t.properties.join(","),")");return t.transform&&(e+=",".concat(Gx(t.transform))),e}function m5(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 m5(i,"".concat(n,"/"))}).map(function(r){return"".concat(e).concat(r)}).join(","):"".concat(e).concat(String(t))}function IO(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 Y6(t){return"not(".concat(t.join(" and "),")")}const PO=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]})}},{}),MO=t=>Object.entries(t).filter(([e,r])=>!!r).reduce((e,[r,n])=>{switch(r){case"filter":return Object.assign(Object.assign({},e),{[r]:PO(n)});default:return Object.assign(Object.assign({},e),{[r]:t[r]})}},{}),ZO=t=>typeof t=="string"?t:qx(MO(t)),HO=(t,e)=>{var r;const n=(r=Un[t])!==null&&r!==void 0?r:t;switch(n){case Un.v2:throw new Qi(t);case Un.v1:default:{const{query:i,includeDeleted:o}=e,a=new URLSearchParams(ZO(i));return a.append("api-version",n),o&&a.append("includeDeleted","true"),`/contexts/?${String(a)}`}}},LO=(t,e,r)=>[HO(t,e),r],OO=(t,e,r="json")=>(n,i)=>t[r](...LO(e,n,i)),$O=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]})}},{}),DO=t=>Object.entries(t).filter(([e,r])=>!!r).reduce((e,[r,n])=>{switch(r){case"filter":return Object.assign(Object.assign({},e),{[r]:$O(n)});default:return Object.assign(Object.assign({},e),{[r]:t[r]})}},{}),NO=t=>typeof t=="string"?t:qx(DO(t)),VO=(t,e)=>{var r;const n=(r=Un[t])!==null&&r!==void 0?r:t;switch(n){case Un.v2:throw new Qi(t);case Un.v1:default:{const{id:i,query:o}=e,a=new URLSearchParams(NO(o||""));return a.append("api-version",n),`/contexts/${i}/relations?${String(a)}`}}},FO=(t,e,r)=>[VO(t,e),r],zO=(t,e,r="json")=>(n,i)=>t[r](...FO(e,n,i));class jO{get Version(){return Un}constructor(e,r){this._client=e,this._method=r}get(e,...r){return wO(this._client,e,this._method)(...r)}query(e,...r){return OO(this._client,e,this._method)(...r)}related(e,...r){return zO(this._client,e,this._method)(...r)}}const UO=(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)}`}}},BO=(t,e,r)=>{const n=UO(t,e),i=Object.assign({},{method:"Delete"},r);return[n,i]},WO=(t,e,r="fetch")=>(n,i)=>t[r](...BO(e,n,i)),qO=WO,GO=(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)}`}}},KO=(t,e,r)=>[GO(t,e),r],YO=(t,e,r="json")=>(n,i)=>t[r](...KO(e,n,i)),XO=YO,QO=(t,e)=>{switch(t){case"v1":default:{const r=new URLSearchParams;return r.append("api-version",t),`/bookmarks?${String(r)}`}}},JO=(t,e,r)=>{const n=QO(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]},e$=(t,e,r="json")=>(n,i)=>t[r](...JO(e,n,i)),t$=e$,r$=(t,e)=>{switch(t){case"v1":default:{const r=new URLSearchParams;return r.append("api-version",t),`/bookmarks/${e.id}?${String(r)}`}}},n$=(t,e,r)=>{const n=r$(t,e),i=new Headers;i.append("content-type","application/json");const o=Object.assign({},{method:"patch",body:JSON.stringify(e),headers:i},r);return[n,o]},i$=(t,e,r="json")=>(n,i)=>t[r](...n$(e,n,i)),o$=i$,a$=t=>{switch(t){case"v1":default:{const e=new URLSearchParams;return e.append("api-version",t),`persons/me/bookmarks/?${String(e)}`}}},s$=(t,e)=>[a$(t),e],c$=(t,e,r="json")=>n=>t[r](...s$(e,n)),l$=c$,d$=(t,e)=>{switch(t){case"v1":default:{const r=new URLSearchParams;return r.append("api-version",t),`/persons/me/bookmarks/favourites?${String(r)}`}}},u$=(t,e,r)=>{const n=d$(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]},h$=(t,e,r="json")=>(n,i)=>t[r](...u$(e,n,i)),f$=h$,p$=(t,e)=>{switch(t){case"v1":default:{const{bookmarkId:r}=e,n=new URLSearchParams;return n.append("api-version","1.0"),`/persons/me/bookmarks/favourites/${r}/?${String(n)}`}}},m$=(t,e,r)=>{const n=p$(t,e),i=Object.assign({},{method:"Delete"},r);return[n,i]},v$=(t,e,r="fetch")=>(n,i)=>t[r](...m$(e,n,i)),g$=v$,y$=(t,e)=>{switch(t){case"v1":default:{const{bookmarkId:r}=e,n=new URLSearchParams;return n.append("api-version",t),`/persons/me/bookmarks/favourites/${r}?${String(n)}`}}},_$=(t,e,r)=>{const n=y$(t,e),i=new Headers;i.append("content-type","application/json");const o=Object.assign({},{method:"head",headers:i},r);return[n,o]},b$=(t,e,r="json")=>(n,i)=>t[r](..._$(e,n,i)),w$=b$;class x${constructor(e,r){this._client=e,this._method=r}get(e,...r){return XO(this._client,e,this._method)(...r)}getAll(e){return l$(this._client,e,this._method)()}post(e,...r){return t$(this._client,e,this._method)(...r)}patch(e,...r){return o$(this._client,e,this._method)(...r)}delete(e,...r){return qO(this._client,e,this._method)(...r)}addFavorite(e,...r){return f$(this._client,e,this._method)(...r)}removeFavorite(e,...r){return g$(this._client,e,this._method)(...r)}verifyFavorite(e,...r){return w$(this._client,e,this._method)(...r)}}const E$=x$,C$=(t,e)=>{var r;const n=(r=xt[t])!==null&&r!==void 0?r:t;switch(n){case xt.v2:throw new Qi(t);case xt.v1:default:{const{id:i}=e,o=new URLSearchParams;return o.append("api-version",n),`/notification/${i}/?${String(o)}`}}},S$=(t,e,r)=>[C$(t,e),r],k$=(t,e,r="json")=>(n,i)=>t[r](...S$(e,n,i)),A$=(t,e)=>{var r;const n=(r=xt[t])!==null&&r!==void 0?r:t;switch(n){case xt.v2:throw new Qi(t);case xt.v1:default:{const{userId:i}=e,o=new URLSearchParams;return o.append("api-version",n),`/person/${i}/notifications/?${String(o)}`}}},R$=(t,e,r)=>{const n=A$(t,e),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]},T$=(t,e,r="json")=>(n,i)=>t[r](...R$(e,n,i)),I$=(t,e)=>{var r;const n=(r=xt[t])!==null&&r!==void 0?r:t;switch(n){case xt.v2:throw new Qi(t);case xt.v1:default:{const{id:i}=e,o=new URLSearchParams;return o.append("api-version",n),`/notification/${i}/?${String(o)}`}}},P$=(t,e,r)=>{const n=I$(t,e),i=new Headers;i.append("content-type","application/json");const o=Object.assign({},{method:"patch",body:JSON.stringify(e),headers:i},r);return[n,o]},M$=(t,e,r="json")=>(n,i)=>t[r](...P$(e,n,i)),Z$=(t,e)=>{var r;const n=(r=xt[t])!==null&&r!==void 0?r:t;switch(n){case xt.v2:throw new Qi(t);case xt.v1:default:{const{userId:i}=e,o=new URLSearchParams;return o.append("api-version",n),`/person/${i}/notifications/?${String(o)}`}}},H$=(t,e,r)=>[Z$(t,e),r],L$=(t,e,r="json")=>(n,i)=>t[r](...H$(e,n,i)),O$=(t,e)=>{var r;const n=(r=xt[t])!==null&&r!==void 0?r:t;switch(n){case xt.v2:throw new Qi(t);case xt.v1:default:{const{id:i}=e,o=new URLSearchParams;return o.append("api-version",n),`/notification/${i}/?${String(o)}`}}},$$=(t,e,r)=>{const n=O$(t,e),i=new Headers;i.append("content-type","application/json");const o=Object.assign({},{method:"delete",headers:i},r);return[n,o]},D$=(t,e,r="json")=>(n,i)=>t[r](...$$(e,n,i));var xt;(function(t){t.v1="1.0",t.v2="2.0"})(xt||(xt={}));const N$=(t,e)=>{var r;const n=(r=xt[t])!==null&&r!==void 0?r:t;switch(n){case xt.v2:throw new Qi(t);case xt.v1:default:{const{userId:i}=e,o=new URLSearchParams;return o.append("api-version",n),`/person/${i}/notifications/settings/?${String(o)}`}}},V$=(t,e,r)=>{const n=N$(t,e),i=new Headers;i.append("content-type","application/json");const o=Object.assign({},{method:"put",body:JSON.stringify(e),headers:i},r);return[n,o]},F$=(t,e,r="json")=>(n,i)=>t[r](...V$(e,n,i)),z$=F$,j$=(t,e)=>{var r;const n=(r=xt[t])!==null&&r!==void 0?r:t;switch(n){case xt.v2:throw new Qi(t);case xt.v1:default:{const{userId:i}=e,o=new URLSearchParams;return o.append("api-version",n),`/person/${i}/notifications/settings/?${String(o)}`}}},U$=(t,e,r)=>[j$(t,e),r],B$=(t,e,r="json")=>(n,i)=>t[r](...U$(e,n,i)),W$=B$;class q${get Version(){return xt}constructor(e,r){this._client=e,this._method=r}getAll(e,...r){return L$(this._client,e,this._method)(...r)}getById(e,...r){return k$(this._client,e,this._method)(...r)}setSeenByUser(e,...r){return M$(this._client,e,this._method)(...r)}create(e,...r){return T$(this._client,e,this._method)(...r)}delete(e,...r){return D$(this._client,e,this._method)(...r)}getSettings(e,...r){return W$(this._client,e,this._method)(...r)}updateSettings(e,...r){return z$(this._client,e,this._method)(...r)}}var V1=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(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};class G$ extends Error{constructor(e,r,n){super(e,n),this.response=r,this.name="ApiProviderError"}}const T0=t=>V1(void 0,void 0,void 0,function*(){var e;if(!t.ok){const{headers:r,status:n,statusText:i,type:o,url:a,bodyUsed:s}=t,c=(e=r.get("content-type"))===null||e===void 0?void 0:e.match(/application\/(\w*)?[+]?json/),l=!s&&(yield c?t.json():t.text());throw new G$("failed to execute request, response was not ok",{headers:r,status:n,statusText:i,type:o,url:a,data:l})}});class K${constructor({createClient:e}){this._createClientFn=e}createNotificationClient(e){return V1(this,void 0,void 0,function*(){const r=yield this._createClientFn("notification");return r.responseHandler.add("validate_api_request",T0),new q$(r,e)})}createBookmarksClient(e){return V1(this,void 0,void 0,function*(){const r=yield this._createClientFn("bookmarks");return r.responseHandler.add("validate_api_request",T0),new E$(r,e)})}createContextClient(e){return V1(this,void 0,void 0,function*(){const r=yield this._createClientFn("context");return r.responseHandler.add("validate_api_request",T0),new jO(r,e)})}}var Kx=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(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const Y$="services",X$=(t,e)=>r=>Kx(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}`)}),Q$={name:Y$,configure:()=>new yO,initialize:({ref:t,config:e,requireInstance:r,hasModule:n})=>Kx(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=X$(i,o)}if(!e.createClient)throw Error("missing configuration for creating API client");return new K$(e)})},J$=Q$;class eD extends EZ{constructor(){super([TZ,Nx,J4,gO,J$,dO]),this.logger=new Uw("FrameworkConfigurator")}configureHttp(...e){this.addConfig(VZ(...e))}configureHttpClient(...e){this.addConfig(Ax(...e))}configureMsal(...e){this.addConfig(WH(...e))}configureServiceDiscovery(e){this.configureHttpClient("service_discovery",e.client)}}var tD=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(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const rD=(t,e)=>tD(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}),Yx=b.createContext(null),nD=Yx.Provider;var iD=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(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const oD=t=>b.lazy(()=>iD(void 0,void 0,void 0,function*(){const e=new eD;yield t(e);const r=yield rD(e);return{default:({children:n})=>x.jsx(nD,{value:r,children:n})}})),Yr=()=>{let t=b.useContext(Yx);return t||console.warn("could not locate fusion in context!"),t??(t=window.Fusion),t||console.error("Could not load framework, might not be initiated?"),t},aD=t=>{const{configure:e,fallback:r,children:n}=t,i=b.useMemo(()=>oD(e),[e]);return x.jsx(b.Suspense,{fallback:r,children:x.jsx(i,{children:n})})};function Ye(){return Ye=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Ye.apply(this,arguments)}function Xi(t){"@babel/helpers - typeof";return Xi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Xi(t)}function I0(t){return t&&Xi(t)==="object"&&t.constructor===Object}function Xx(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{clone:!0},n=r.clone?Ye({},t):t;return I0(t)&&I0(e)&&Object.keys(e).forEach(function(i){i!=="__proto__"&&(I0(e[i])&&i in t?n[i]=Xx(t[i],e[i],r):n[i]=e[i])}),n}function sD(t,e){if(Xi(t)!=="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(Xi(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Qx(t){var e=sD(t,"string");return Xi(e)==="symbol"?e:String(e)}function n2(t,e,r){return e=Qx(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var cD=typeof Symbol=="function"&&Symbol.for;const Jx=cD?Symbol.for("mui.nested"):"__THEME_NESTED__";var lD=["checked","disabled","error","focused","focusVisible","required","expanded","selected"];function dD(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=t.disableGlobal,r=e===void 0?!1:e,n=t.productionPrefix,i=n===void 0?"jss":n,o=t.seed,a=o===void 0?"":o,s=a===""?"":"".concat(a,"-"),c=0,l=function(){return c+=1,c};return function(d,u){var h=u.options.name;if(h&&h.indexOf("Mui")===0&&!u.options.link&&!r){if(lD.indexOf(d.key)!==-1)return"Mui-".concat(d.key);var f="".concat(s).concat(h,"-").concat(d.key);return!u.options.theme[Jx]||a!==""?f:"".concat(f,"-").concat(l())}return"".concat(s).concat(i).concat(l())}}var X6=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ku=(typeof window>"u"?"undefined":X6(window))==="object"&&(typeof document>"u"?"undefined":X6(document))==="object"&&document.nodeType===9;function Q6(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Qx(n.key),n)}}function eE(t,e,r){return e&&Q6(t.prototype,e),r&&Q6(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function zv(t,e){return zv=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},zv(t,e)}function tE(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,zv(t,e)}function J6(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function rE(t,e){if(t==null)return{};var r={},n=Object.keys(t),i,o;for(o=0;o<n.length;o++)i=n[o],!(e.indexOf(i)>=0)&&(r[i]=t[i]);return r}var uD={}.constructor;function jv(t){if(t==null||typeof t!="object")return t;if(Array.isArray(t))return t.map(jv);if(t.constructor!==uD)return t;var e={};for(var r in t)e[r]=jv(t[r]);return e}function v5(t,e,r){t===void 0&&(t="unnamed");var n=r.jss,i=jv(e),o=n.plugins.onCreateRule(t,i,r);return o||(t[0],null)}var e8=function(e,r){for(var n="",i=0;i<e.length&&e[i]!=="!important";i++)n&&(n+=r),n+=e[i];return n},bs=function(e){if(!Array.isArray(e))return e;var r="";if(Array.isArray(e[0]))for(var n=0;n<e.length&&e[n]!=="!important";n++)r&&(r+=", "),r+=e8(e[n]," ");else r=e8(e,", ");return e[e.length-1]==="!important"&&(r+=" !important"),r};function Pl(t){return t&&t.format===!1?{linebreak:"",space:""}:{linebreak:`
71
71
  `,space:" "}}function od(t,e){for(var r="",n=0;n<e;n++)r+=" ";return r+t}function Tu(t,e,r){r===void 0&&(r={});var n="";if(!e)return n;var i=r,o=i.indent,a=o===void 0?0:o,s=e.fallbacks;r.format===!1&&(a=-1/0);var c=Pl(r),l=c.linebreak,d=c.space;if(t&&a++,s)if(Array.isArray(s))for(var u=0;u<s.length;u++){var h=s[u];for(var f in h){var p=h[f];p!=null&&(n&&(n+=l),n+=od(f+":"+d+bs(p)+";",a))}}else for(var m in s){var w=s[m];w!=null&&(n&&(n+=l),n+=od(m+":"+d+bs(w)+";",a))}for(var v in e){var g=e[v];g!=null&&v!=="fallbacks"&&(n&&(n+=l),n+=od(v+":"+d+bs(g)+";",a))}return!n&&!r.allowEmpty||!t?n:(a--,n&&(n=""+l+n+l),od(""+t+d+"{"+n,a)+od("}",a))}var hD=/([[\].#*$><+~=|^:(),"'`\s])/g,t8=typeof CSS<"u"&&CSS.escape,g5=function(t){return t8?t8(t):t.replace(hD,"\\$1")},nE=function(){function t(r,n,i){this.type="style",this.isProcessed=!1;var o=i.sheet,a=i.Renderer;this.key=r,this.options=i,this.style=n,o?this.renderer=o.renderer:a&&(this.renderer=new a)}var e=t.prototype;return e.prop=function(n,i,o){if(i===void 0)return this.style[n];var a=o?o.force:!1;if(!a&&this.style[n]===i)return this;var s=i;(!o||o.process!==!1)&&(s=this.options.jss.plugins.onChangeValue(i,n,this));var c=s==null||s===!1,l=n in this.style;if(c&&!l&&!a)return this;var d=c&&l;if(d?delete this.style[n]:this.style[n]=s,this.renderable&&this.renderer)return d?this.renderer.removeProperty(this.renderable,n):this.renderer.setProperty(this.renderable,n,s),this;var u=this.options.sheet;return u&&u.attached,this},t}(),Uv=function(t){tE(e,t);function e(n,i,o){var a;a=t.call(this,n,i,o)||this;var s=o.selector,c=o.scoped,l=o.sheet,d=o.generateId;return s?a.selectorText=s:c!==!1&&(a.id=d(J6(J6(a)),l),a.selectorText="."+g5(a.id)),a}var r=e.prototype;return r.applyTo=function(i){var o=this.renderer;if(o){var a=this.toJSON();for(var s in a)o.setProperty(i,s,a[s])}return this},r.toJSON=function(){var i={};for(var o in this.style){var a=this.style[o];typeof a!="object"?i[o]=a:Array.isArray(a)&&(i[o]=bs(a))}return i},r.toString=function(i){var o=this.options.sheet,a=o?o.options.link:!1,s=a?Ye({},i,{allowEmpty:!0}):i;return Tu(this.selectorText,this.style,s)},eE(e,[{key:"selector",set:function(i){if(i!==this.selectorText){this.selectorText=i;var o=this.renderer,a=this.renderable;if(!(!a||!o)){var s=o.setSelector(a,i);s||o.replaceRule(a,this)}}},get:function(){return this.selectorText}}]),e}(nE),fD={onCreateRule:function(e,r,n){return e[0]==="@"||n.parent&&n.parent.type==="keyframes"?null:new Uv(e,r,n)}},P0={indent:1,children:!0},pD=/@([\w-]+)/,mD=function(){function t(r,n,i){this.type="conditional",this.isProcessed=!1,this.key=r;var o=r.match(pD);this.at=o?o[1]:"unknown",this.query=i.name||"@"+this.at,this.options=i,this.rules=new Y2(Ye({},i,{parent:this}));for(var a in n)this.rules.add(a,n[a]);this.rules.process()}var e=t.prototype;return e.getRule=function(n){return this.rules.get(n)},e.indexOf=function(n){return this.rules.indexOf(n)},e.addRule=function(n,i,o){var a=this.rules.add(n,i,o);return a?(this.options.jss.plugins.onProcessRule(a),a):null},e.replaceRule=function(n,i,o){var a=this.rules.replace(n,i,o);return a&&this.options.jss.plugins.onProcessRule(a),a},e.toString=function(n){n===void 0&&(n=P0);var i=Pl(n),o=i.linebreak;if(n.indent==null&&(n.indent=P0.indent),n.children==null&&(n.children=P0.children),n.children===!1)return this.query+" {}";var a=this.rules.toString(n);return a?this.query+" {"+o+a+o+"}":""},t}(),vD=/@container|@media|@supports\s+/,gD={onCreateRule:function(e,r,n){return vD.test(e)?new mD(e,r,n):null}},M0={indent:1,children:!0},yD=/@keyframes\s+([\w-]+)/,Bv=function(){function t(r,n,i){this.type="keyframes",this.at="@keyframes",this.isProcessed=!1;var o=r.match(yD);o&&o[1]?this.name=o[1]:this.name="noname",this.key=this.type+"-"+this.name,this.options=i;var a=i.scoped,s=i.sheet,c=i.generateId;this.id=a===!1?this.name:g5(c(this,s)),this.rules=new Y2(Ye({},i,{parent:this}));for(var l in n)this.rules.add(l,n[l],Ye({},i,{parent:this}));this.rules.process()}var e=t.prototype;return e.toString=function(n){n===void 0&&(n=M0);var i=Pl(n),o=i.linebreak;if(n.indent==null&&(n.indent=M0.indent),n.children==null&&(n.children=M0.children),n.children===!1)return this.at+" "+this.id+" {}";var a=this.rules.toString(n);return a&&(a=""+o+a+o),this.at+" "+this.id+" {"+a+"}"},t}(),_D=/@keyframes\s+/,bD=/\$([\w-]+)/g,Wv=function(e,r){return typeof e=="string"?e.replace(bD,function(n,i){return i in r?r[i]:n}):e},r8=function(e,r,n){var i=e[r],o=Wv(i,n);o!==i&&(e[r]=o)},wD={onCreateRule:function(e,r,n){return typeof e=="string"&&_D.test(e)?new Bv(e,r,n):null},onProcessStyle:function(e,r,n){return r.type!=="style"||!n||("animation-name"in e&&r8(e,"animation-name",n.keyframes),"animation"in e&&r8(e,"animation",n.keyframes)),e},onChangeValue:function(e,r,n){var i=n.options.sheet;if(!i)return e;switch(r){case"animation":return Wv(e,i.keyframes);case"animation-name":return Wv(e,i.keyframes);default:return e}}},xD=function(t){tE(e,t);function e(){return t.apply(this,arguments)||this}var r=e.prototype;return r.toString=function(i){var o=this.options.sheet,a=o?o.options.link:!1,s=a?Ye({},i,{allowEmpty:!0}):i;return Tu(this.key,this.style,s)},e}(nE),ED={onCreateRule:function(e,r,n){return n.parent&&n.parent.type==="keyframes"?new xD(e,r,n):null}},CD=function(){function t(r,n,i){this.type="font-face",this.at="@font-face",this.isProcessed=!1,this.key=r,this.style=n,this.options=i}var e=t.prototype;return e.toString=function(n){var i=Pl(n),o=i.linebreak;if(Array.isArray(this.style)){for(var a="",s=0;s<this.style.length;s++)a+=Tu(this.at,this.style[s]),this.style[s+1]&&(a+=o);return a}return Tu(this.at,this.style,n)},t}(),SD=/@font-face/,kD={onCreateRule:function(e,r,n){return SD.test(e)?new CD(e,r,n):null}},AD=function(){function t(r,n,i){this.type="viewport",this.at="@viewport",this.isProcessed=!1,this.key=r,this.style=n,this.options=i}var e=t.prototype;return e.toString=function(n){return Tu(this.key,this.style,n)},t}(),RD={onCreateRule:function(e,r,n){return e==="@viewport"||e==="@-ms-viewport"?new AD(e,r,n):null}},TD=function(){function t(r,n,i){this.type="simple",this.isProcessed=!1,this.key=r,this.value=n,this.options=i}var e=t.prototype;return e.toString=function(n){if(Array.isArray(this.value)){for(var i="",o=0;o<this.value.length;o++)i+=this.key+" "+this.value[o]+";",this.value[o+1]&&(i+=`
72
72
  `);return i}return this.key+" "+this.value+";"},t}(),ID={"@charset":!0,"@import":!0,"@namespace":!0},PD={onCreateRule:function(e,r,n){return e in ID?new TD(e,r,n):null}},n8=[fD,gD,wD,ED,kD,RD,PD],MD={process:!0},i8={force:!0,process:!0},Y2=function(){function t(r){this.map={},this.raw={},this.index=[],this.counter=0,this.options=r,this.classes=r.classes,this.keyframes=r.keyframes}var e=t.prototype;return e.add=function(n,i,o){var a=this.options,s=a.parent,c=a.sheet,l=a.jss,d=a.Renderer,u=a.generateId,h=a.scoped,f=Ye({classes:this.classes,parent:s,sheet:c,jss:l,Renderer:d,generateId:u,scoped:h,name:n,keyframes:this.keyframes,selector:void 0},o),p=n;n in this.raw&&(p=n+"-d"+this.counter++),this.raw[p]=i,p in this.classes&&(f.selector="."+g5(this.classes[p]));var m=v5(p,i,f);if(!m)return null;this.register(m);var w=f.index===void 0?this.index.length:f.index;return this.index.splice(w,0,m),m},e.replace=function(n,i,o){var a=this.get(n),s=this.index.indexOf(a);a&&this.remove(a);var c=o;return s!==-1&&(c=Ye({},o,{index:s})),this.add(n,i,c)},e.get=function(n){return this.map[n]},e.remove=function(n){this.unregister(n),delete this.raw[n.key],this.index.splice(this.index.indexOf(n),1)},e.indexOf=function(n){return this.index.indexOf(n)},e.process=function(){var n=this.options.jss.plugins;this.index.slice(0).forEach(n.onProcessRule,n)},e.register=function(n){this.map[n.key]=n,n instanceof Uv?(this.map[n.selector]=n,n.id&&(this.classes[n.key]=n.id)):n instanceof Bv&&this.keyframes&&(this.keyframes[n.name]=n.id)},e.unregister=function(n){delete this.map[n.key],n instanceof Uv?(delete this.map[n.selector],delete this.classes[n.key]):n instanceof Bv&&delete this.keyframes[n.name]},e.update=function(){var n,i,o;if(typeof(arguments.length<=0?void 0:arguments[0])=="string"?(n=arguments.length<=0?void 0:arguments[0],i=arguments.length<=1?void 0:arguments[1],o=arguments.length<=2?void 0:arguments[2]):(i=arguments.length<=0?void 0:arguments[0],o=arguments.length<=1?void 0:arguments[1],n=null),n)this.updateOne(this.get(n),i,o);else for(var a=0;a<this.index.length;a++)this.updateOne(this.index[a],i,o)},e.updateOne=function(n,i,o){o===void 0&&(o=MD);var a=this.options,s=a.jss.plugins,c=a.sheet;if(n.rules instanceof t){n.rules.update(i,o);return}var l=n.style;if(s.onUpdate(i,n,c,o),o.process&&l&&l!==n.style){s.onProcessStyle(n.style,n,c);for(var d in n.style){var u=n.style[d],h=l[d];u!==h&&n.prop(d,u,i8)}for(var f in l){var p=n.style[f],m=l[f];p==null&&p!==m&&n.prop(f,null,i8)}}},e.toString=function(n){for(var i="",o=this.options.sheet,a=o?o.options.link:!1,s=Pl(n),c=s.linebreak,l=0;l<this.index.length;l++){var d=this.index[l],u=d.toString(n);!u&&!a||(i&&(i+=c),i+=u)}return i},t}(),iE=function(){function t(r,n){this.attached=!1,this.deployed=!1,this.classes={},this.keyframes={},this.options=Ye({},n,{sheet:this,parent:this,classes:this.classes,keyframes:this.keyframes}),n.Renderer&&(this.renderer=new n.Renderer(this)),this.rules=new Y2(this.options);for(var i in r)this.rules.add(i,r[i]);this.rules.process()}var e=t.prototype;return e.attach=function(){return this.attached?this:(this.renderer&&this.renderer.attach(),this.attached=!0,this.deployed||this.deploy(),this)},e.detach=function(){return this.attached?(this.renderer&&this.renderer.detach(),this.attached=!1,this):this},e.addRule=function(n,i,o){var a=this.queue;this.attached&&!a&&(this.queue=[]);var s=this.rules.add(n,i,o);return s?(this.options.jss.plugins.onProcessRule(s),this.attached?(this.deployed&&(a?a.push(s):(this.insertRule(s),this.queue&&(this.queue.forEach(this.insertRule,this),this.queue=void 0))),s):(this.deployed=!1,s)):null},e.replaceRule=function(n,i,o){var a=this.rules.get(n);if(!a)return this.addRule(n,i,o);var s=this.rules.replace(n,i,o);return s&&this.options.jss.plugins.onProcessRule(s),this.attached?(this.deployed&&this.renderer&&(s?a.renderable&&this.renderer.replaceRule(a.renderable,s):this.renderer.deleteRule(a)),s):(this.deployed=!1,s)},e.insertRule=function(n){this.renderer&&this.renderer.insertRule(n)},e.addRules=function(n,i){var o=[];for(var a in n){var s=this.addRule(a,n[a],i);s&&o.push(s)}return o},e.getRule=function(n){return this.rules.get(n)},e.deleteRule=function(n){var i=typeof n=="object"?n:this.rules.get(n);return!i||this.attached&&!i.renderable?!1:(this.rules.remove(i),this.attached&&i.renderable&&this.renderer?this.renderer.deleteRule(i.renderable):!0)},e.indexOf=function(n){return this.rules.indexOf(n)},e.deploy=function(){return this.renderer&&this.renderer.deploy(),this.deployed=!0,this},e.update=function(){var n;return(n=this.rules).update.apply(n,arguments),this},e.updateOne=function(n,i,o){return this.rules.updateOne(n,i,o),this},e.toString=function(n){return this.rules.toString(n)},t}(),ZD=function(){function t(){this.plugins={internal:[],external:[]},this.registry={}}var e=t.prototype;return e.onCreateRule=function(n,i,o){for(var a=0;a<this.registry.onCreateRule.length;a++){var s=this.registry.onCreateRule[a](n,i,o);if(s)return s}return null},e.onProcessRule=function(n){if(!n.isProcessed){for(var i=n.options.sheet,o=0;o<this.registry.onProcessRule.length;o++)this.registry.onProcessRule[o](n,i);n.style&&this.onProcessStyle(n.style,n,i),n.isProcessed=!0}},e.onProcessStyle=function(n,i,o){for(var a=0;a<this.registry.onProcessStyle.length;a++)i.style=this.registry.onProcessStyle[a](i.style,i,o)},e.onProcessSheet=function(n){for(var i=0;i<this.registry.onProcessSheet.length;i++)this.registry.onProcessSheet[i](n)},e.onUpdate=function(n,i,o,a){for(var s=0;s<this.registry.onUpdate.length;s++)this.registry.onUpdate[s](n,i,o,a)},e.onChangeValue=function(n,i,o){for(var a=n,s=0;s<this.registry.onChangeValue.length;s++)a=this.registry.onChangeValue[s](a,i,o);return a},e.use=function(n,i){i===void 0&&(i={queue:"external"});var o=this.plugins[i.queue];o.indexOf(n)===-1&&(o.push(n),this.registry=[].concat(this.plugins.external,this.plugins.internal).reduce(function(a,s){for(var c in s)c in a&&a[c].push(s[c]);return a},{onCreateRule:[],onProcessRule:[],onProcessStyle:[],onProcessSheet:[],onChangeValue:[],onUpdate:[]}))},t}(),HD=function(){function t(){this.registry=[]}var e=t.prototype;return e.add=function(n){var i=this.registry,o=n.options.index;if(i.indexOf(n)===-1){if(i.length===0||o>=this.index){i.push(n);return}for(var a=0;a<i.length;a++)if(i[a].options.index>o){i.splice(a,0,n);return}}},e.reset=function(){this.registry=[]},e.remove=function(n){var i=this.registry.indexOf(n);this.registry.splice(i,1)},e.toString=function(n){for(var i=n===void 0?{}:n,o=i.attached,a=rE(i,["attached"]),s=Pl(a),c=s.linebreak,l="",d=0;d<this.registry.length;d++){var u=this.registry[d];o!=null&&u.attached!==o||(l&&(l+=c),l+=u.toString(a))}return l},eE(t,[{key:"index",get:function(){return this.registry.length===0?0:this.registry[this.registry.length-1].options.index}}]),t}(),eu=new HD,qv=typeof globalThis<"u"?globalThis:typeof window<"u"&&window.Math===Math?window:typeof self<"u"&&self.Math===Math?self:Function("return this")(),Gv="2f1acc6c3a606b082e5eef5e54414ffb";qv[Gv]==null&&(qv[Gv]=0);var o8=qv[Gv]++,a8=function(e){e===void 0&&(e={});var r=0,n=function(o,a){r+=1;var s="",c="";return a&&(a.options.classNamePrefix&&(c=a.options.classNamePrefix),a.options.jss.id!=null&&(s=String(a.options.jss.id))),e.minify?""+(c||"c")+o8+s+r:c+o.key+"-"+o8+(s?"-"+s:"")+"-"+r};return n},oE=function(e){var r;return function(){return r||(r=e()),r}},LD=function(e,r){try{return e.attributeStyleMap?e.attributeStyleMap.get(r):e.style.getPropertyValue(r)}catch{return""}},OD=function(e,r,n){try{var i=n;if(Array.isArray(n)&&(i=bs(n)),e.attributeStyleMap)e.attributeStyleMap.set(r,i);else{var o=i?i.indexOf("!important"):-1,a=o>-1?i.substr(0,o-1):i;e.style.setProperty(r,a,o>-1?"important":"")}}catch{return!1}return!0},$D=function(e,r){try{e.attributeStyleMap?e.attributeStyleMap.delete(r):e.style.removeProperty(r)}catch{}},DD=function(e,r){return e.selectorText=r,e.selectorText===r},aE=oE(function(){return document.querySelector("head")});function ND(t,e){for(var r=0;r<t.length;r++){var n=t[r];if(n.attached&&n.options.index>e.index&&n.options.insertionPoint===e.insertionPoint)return n}return null}function VD(t,e){for(var r=t.length-1;r>=0;r--){var n=t[r];if(n.attached&&n.options.insertionPoint===e.insertionPoint)return n}return null}function FD(t){for(var e=aE(),r=0;r<e.childNodes.length;r++){var n=e.childNodes[r];if(n.nodeType===8&&n.nodeValue.trim()===t)return n}return null}function zD(t){var e=eu.registry;if(e.length>0){var r=ND(e,t);if(r&&r.renderer)return{parent:r.renderer.element.parentNode,node:r.renderer.element};if(r=VD(e,t),r&&r.renderer)return{parent:r.renderer.element.parentNode,node:r.renderer.element.nextSibling}}var n=t.insertionPoint;if(n&&typeof n=="string"){var i=FD(n);if(i)return{parent:i.parentNode,node:i.nextSibling}}return!1}function jD(t,e){var r=e.insertionPoint,n=zD(e);if(n!==!1&&n.parent){n.parent.insertBefore(t,n.node);return}if(r&&typeof r.nodeType=="number"){var i=r,o=i.parentNode;o&&o.insertBefore(t,i.nextSibling);return}aE().appendChild(t)}var UD=oE(function(){var t=document.querySelector('meta[property="csp-nonce"]');return t?t.getAttribute("content"):null}),s8=function(e,r,n){try{"insertRule"in e?e.insertRule(r,n):"appendRule"in e&&e.appendRule(r)}catch{return!1}return e.cssRules[n]},c8=function(e,r){var n=e.cssRules.length;return r===void 0||r>n?n:r},BD=function(){var e=document.createElement("style");return e.textContent=`
73
73
  `,e},WD=function(){function t(r){this.getPropertyValue=LD,this.setProperty=OD,this.removeProperty=$D,this.setSelector=DD,this.hasInsertedRules=!1,this.cssRules=[],r&&eu.add(r),this.sheet=r;var n=this.sheet?this.sheet.options:{},i=n.media,o=n.meta,a=n.element;this.element=a||BD(),this.element.setAttribute("data-jss",""),i&&this.element.setAttribute("media",i),o&&this.element.setAttribute("data-meta",o);var s=UD();s&&this.element.setAttribute("nonce",s)}var e=t.prototype;return e.attach=function(){if(!(this.element.parentNode||!this.sheet)){jD(this.element,this.sheet.options);var n=!!(this.sheet&&this.sheet.deployed);this.hasInsertedRules&&n&&(this.hasInsertedRules=!1,this.deploy())}},e.detach=function(){if(this.sheet){var n=this.element.parentNode;n&&n.removeChild(this.element),this.sheet.options.link&&(this.cssRules=[],this.element.textContent=`
@@ -32,7 +32,7 @@
32
32
  }
33
33
  </style>
34
34
 
35
- <script type="module" crossorigin src="/assets/index-61aab88e.js"></script>
35
+ <script type="module" crossorigin src="/assets/index-6610901f.js"></script>
36
36
 
37
37
  <body>
38
38
  <div id="root"></div>
@@ -1 +1 @@
1
- export declare const version = "9.0.1";
1
+ export declare const version = "9.0.2";
package/dist/version.js CHANGED
@@ -1,2 +1,2 @@
1
- export const version = '9.0.1';
1
+ export const version = '9.0.2';
2
2
  //# sourceMappingURL=version.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@equinor/fusion-framework-cli",
3
- "version": "9.0.1",
3
+ "version": "9.0.2",
4
4
  "keywords": [
5
5
  "Fusion",
6
6
  "Fusion Framework",
@@ -51,7 +51,7 @@
51
51
  "vite-plugin-environment": "^1.1.3",
52
52
  "vite-plugin-restart": "^0.3.1",
53
53
  "vite-tsconfig-paths": "^4.2.0",
54
- "@equinor/fusion-framework-app": "^7.1.3",
54
+ "@equinor/fusion-framework-app": "^7.1.4",
55
55
  "@equinor/fusion-observable": "^8.1.1"
56
56
  },
57
57
  "devDependencies": {
@@ -80,8 +80,8 @@
80
80
  "styled-components": "^6.0.7",
81
81
  "types": "link:./types",
82
82
  "typescript": "^5.1.3",
83
- "@equinor/fusion-framework": "^7.0.18",
84
- "@equinor/fusion-framework-app": "^7.1.3",
83
+ "@equinor/fusion-framework": "^7.0.19",
84
+ "@equinor/fusion-framework-app": "^7.1.4",
85
85
  "@equinor/fusion-framework-module-app": "^5.2.4",
86
86
  "@equinor/fusion-framework-module-bookmark": "^1.0.10",
87
87
  "@equinor/fusion-framework-module-context": "^4.0.13",
@@ -89,9 +89,9 @@
89
89
  "@equinor/fusion-framework-module-msal": "^3.0.6",
90
90
  "@equinor/fusion-framework-module-navigation": "^3.0.5",
91
91
  "@equinor/fusion-framework-module-services": "^3.1.5",
92
- "@equinor/fusion-framework-react": "^5.2.6",
93
- "@equinor/fusion-framework-react-components-bookmark": "^0.2.5",
94
- "@equinor/fusion-framework-react-module-bookmark": "^2.0.16",
92
+ "@equinor/fusion-framework-react": "^5.2.7",
93
+ "@equinor/fusion-framework-react-components-bookmark": "^0.2.6",
94
+ "@equinor/fusion-framework-react-module-bookmark": "^2.0.17",
95
95
  "@equinor/fusion-query": "^3.0.7"
96
96
  },
97
97
  "scripts": {