@equinor/fusion-framework-cli 6.0.1 → 6.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.
@@ -70,7 +70,7 @@ PERFORMANCE OF THIS SOFTWARE.
70
70
  Error: `+s.errorCode+`
71
71
  Error Description: `+s.errorMessage):(c=s,this.logger.error(`A non-MSALJS error was thrown while attempting to get the cloud instance discovery metadata.
72
72
  Error: `+c.name+`
73
- Error Description: `+c.message)),[2,null];case 4:return i||(this.logger.warning("The developer's authority was not found within the CloudInstanceDiscoveryMetadata returned from the network request."),this.logger.verbose("Creating custom Authority for custom domain scenario."),i=r.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort)),[2,i]}})})},r.prototype.getCloudDiscoveryMetadataFromHarcodedValues=function(){return this.canonicalAuthority in _m?_m[this.canonicalAuthority]:null},r.prototype.isInKnownAuthorities=function(){var e=this,t=this.authorityOptions.knownAuthorities.filter(function(i){return ke.getDomainFromUrl(i).toLowerCase()===e.hostnameAndPort});return t.length>0},r.generateAuthority=function(e,t){var i;if(t&&t.azureCloudInstance!==Cc.None){var n=t.tenant?t.tenant:w.DEFAULT_COMMON_TENANT;i=t.azureCloudInstance+"/"+n+"/"}return i||e},r.createCloudDiscoveryMetadataFromHost=function(e){return{preferred_network:e,preferred_cache:e,aliases:[e]}},r.getCloudDiscoveryMetadataFromNetworkResponse=function(e,t){for(var i=0;i<e.length;i++){var n=e[i];if(n.aliases.indexOf(t)>-1)return n}return null},r.prototype.getPreferredCache=function(){if(this.discoveryComplete())return this.metadata.preferred_cache;throw j.createEndpointDiscoveryIncompleteError("Discovery incomplete.")},r.prototype.isAlias=function(e){return this.metadata.aliases.indexOf(e)>-1},r.isPublicCloudAuthority=function(e){return w.KNOWN_PUBLIC_CLOUDS.indexOf(e)>=0},r.buildRegionalAuthorityString=function(e,t,i){var n=new ke(e);n.validateAsUri();var a=n.getUrlComponents(),o=t+"."+a.HostNameAndPort;this.isPublicCloudAuthority(a.HostNameAndPort)&&(o=t+"."+w.REGIONAL_AUTH_PUBLIC_CLOUD_SUFFIX);var s=ke.constructAuthorityUriFromObject(Ue(Ue({},n.getUrlComponents()),{HostNameAndPort:o})).urlString;return i?s+"?"+i:s},r.replaceWithRegionalInformation=function(e,t){return e.authorization_endpoint=r.buildRegionalAuthorityString(e.authorization_endpoint,t),e.token_endpoint=r.buildRegionalAuthorityString(e.token_endpoint,t,w.REGIONAL_AUTH_NON_MSI_QUERY_STRING),e.end_session_endpoint&&(e.end_session_endpoint=r.buildRegionalAuthorityString(e.end_session_endpoint,t)),e},r}();/*! @azure/msal-common v9.1.1 2023-01-19 */var V0=function(){function r(){}return r.createDiscoveredInstance=function(e,t,i,n,a,o){return ae(this,void 0,void 0,function(){var s,c;return oe(this,function(l){switch(l.label){case 0:s=r.createInstance(e,t,i,n,a,o),l.label=1;case 1:return l.trys.push([1,3,,4]),[4,s.resolveEndpointsAsync()];case 2:return l.sent(),[2,s];case 3:throw c=l.sent(),j.createEndpointDiscoveryIncompleteError(c);case 4:return[2]}})})},r.createInstance=function(e,t,i,n,a,o){if(F.isEmpty(e))throw Ye.createUrlEmptyError();return new A0(e,t,i,n,a,o)},r}();/*! @azure/msal-common v9.1.1 2023-01-19 */var S0=function(){function r(){this.failedRequests=[],this.errors=[],this.cacheHits=0}return r.isServerTelemetryEntity=function(e,t){var i=e.indexOf(Ut.CACHE_KEY)===0,n=!0;return t&&(n=t.hasOwnProperty("failedRequests")&&t.hasOwnProperty("errors")&&t.hasOwnProperty("cacheHits")),i&&n},r}();/*! @azure/msal-common v9.1.1 2023-01-19 */var zm=function(){function r(){}return r.isThrottlingEntity=function(e,t){var i=!1;e&&(i=e.indexOf(Ws.THROTTLING_PREFIX)===0);var n=!0;return t&&(n=t.hasOwnProperty("throttleTime")),i&&n},r}();/*! @azure/msal-common v9.1.1 2023-01-19 */var oH={sendGetRequestAsync:function(){var r="Network interface - sendGetRequestAsync() has not been implemented for the Network interface.";return Promise.reject(Q.createUnexpectedError(r))},sendPostRequestAsync:function(){var r="Network interface - sendPostRequestAsync() has not been implemented for the Network interface.";return Promise.reject(Q.createUnexpectedError(r))}};/*! @azure/msal-common v9.1.1 2023-01-19 */var Kl={missingKidError:{code:"missing_kid_error",desc:"The JOSE Header for the requested JWT, JWS or JWK object requires a keyId to be configured as the 'kid' header claim. No 'kid' value was provided."},missingAlgError:{code:"missing_alg_error",desc:"The JOSE Header for the requested JWT, JWS or JWK object requires an algorithm to be specified as the 'alg' header claim. No 'alg' value was provided."}},ym=function(r){F1(e,r);function e(t,i){var n=r.call(this,t,i)||this;return n.name="JoseHeaderError",Object.setPrototypeOf(n,e.prototype),n}return e.createMissingKidError=function(){return new e(Kl.missingKidError.code,Kl.missingKidError.desc)},e.createMissingAlgError=function(){return new e(Kl.missingAlgError.code,Kl.missingAlgError.desc)},e}(Q);/*! @azure/msal-common v9.1.1 2023-01-19 */var sH=function(){function r(e){this.typ=e.typ,this.alg=e.alg,this.kid=e.kid}return r.getShrHeaderString=function(e){if(!e.kid)throw ym.createMissingKidError();if(!e.alg)throw ym.createMissingAlgError();var t=new r({typ:e.typ||q3.Jwt,kid:e.kid,alg:e.alg});return JSON.stringify(t)},r}();/*! @azure/msal-common v9.1.1 2023-01-19 */var cH=function(){function r(e,t){this.cacheOutcome=ga.NO_CACHE_HIT,this.cacheManager=t,this.apiId=e.apiId,this.correlationId=e.correlationId,this.wrapperSKU=e.wrapperSKU||w.EMPTY_STRING,this.wrapperVer=e.wrapperVer||w.EMPTY_STRING,this.telemetryCacheKey=Ut.CACHE_KEY+T1.CACHE_KEY_SEPARATOR+e.clientId}return r.prototype.generateCurrentRequestHeaderValue=function(){var e=""+this.apiId+Ut.VALUE_SEPARATOR+this.cacheOutcome,t=[this.wrapperSKU,this.wrapperVer].join(Ut.VALUE_SEPARATOR),i=this.getRegionDiscoveryFields(),n=[e,i].join(Ut.VALUE_SEPARATOR);return[Ut.SCHEMA_VERSION,n,t].join(Ut.CATEGORY_SEPARATOR)},r.prototype.generateLastRequestHeaderValue=function(){var e=this.getLastRequests(),t=r.maxErrorsToSend(e),i=e.failedRequests.slice(0,2*t).join(Ut.VALUE_SEPARATOR),n=e.errors.slice(0,t).join(Ut.VALUE_SEPARATOR),a=e.errors.length,o=t<a?Ut.OVERFLOW_TRUE:Ut.OVERFLOW_FALSE,s=[a,o].join(Ut.VALUE_SEPARATOR);return[Ut.SCHEMA_VERSION,e.cacheHits,i,n,s].join(Ut.CATEGORY_SEPARATOR)},r.prototype.cacheFailedRequest=function(e){var t=this.getLastRequests();t.errors.length>=Ut.MAX_CACHED_ERRORS&&(t.failedRequests.shift(),t.failedRequests.shift(),t.errors.shift()),t.failedRequests.push(this.apiId,this.correlationId),F.isEmpty(e.subError)?F.isEmpty(e.errorCode)?e&&e.toString()?t.errors.push(e.toString()):t.errors.push(Ut.UNKNOWN_ERROR):t.errors.push(e.errorCode):t.errors.push(e.subError),this.cacheManager.setServerTelemetry(this.telemetryCacheKey,t)},r.prototype.incrementCacheHits=function(){var e=this.getLastRequests();return e.cacheHits+=1,this.cacheManager.setServerTelemetry(this.telemetryCacheKey,e),e.cacheHits},r.prototype.getLastRequests=function(){var e=new S0,t=this.cacheManager.getServerTelemetry(this.telemetryCacheKey);return t||e},r.prototype.clearTelemetryCache=function(){var e=this.getLastRequests(),t=r.maxErrorsToSend(e),i=e.errors.length;if(t===i)this.cacheManager.removeItem(this.telemetryCacheKey);else{var n=new S0;n.failedRequests=e.failedRequests.slice(t*2),n.errors=e.errors.slice(t),this.cacheManager.setServerTelemetry(this.telemetryCacheKey,n)}},r.maxErrorsToSend=function(e){var t,i=0,n=0,a=e.errors.length;for(t=0;t<a;t++){var o=e.failedRequests[2*t]||w.EMPTY_STRING,s=e.failedRequests[2*t+1]||w.EMPTY_STRING,c=e.errors[t]||w.EMPTY_STRING;if(n+=o.toString().length+s.toString().length+c.length+3,n<Ut.MAX_LAST_HEADER_BYTES)i+=1;else break}return i},r.prototype.getRegionDiscoveryFields=function(){var e=[];return e.push(this.regionUsed||w.EMPTY_STRING),e.push(this.regionSource||w.EMPTY_STRING),e.push(this.regionOutcome||w.EMPTY_STRING),e.join(",")},r.prototype.updateRegionDiscoveryMetadata=function(e){this.regionUsed=e.region_used,this.regionSource=e.region_source,this.regionOutcome=e.region_outcome},r.prototype.setCacheOutcome=function(e){this.cacheOutcome=e},r}();/*! @azure/msal-common v9.1.1 2023-01-19 */var O_=function(){function r(e,t,i,n,a,o){this.authority=t,this.libraryName=n,this.libraryVersion=a,this.applicationTelemetry=o,this.clientId=e,this.logger=i,this.callbacks=new Map,this.eventsByCorrelationId=new Map,this.staticFieldsByCorrelationId=new Map,this.measurementsById=new Map,this.countersByCorrelationId=new Map}return r.prototype.startPerformanceMeasurement=function(e,t){return{}},r.prototype.startPerformanceMeasuremeant=function(e,t){return{}},r.prototype.startMeasurement=function(e,t){var i=this,n,a,o=t||this.generateId();t||this.logger.info("PerformanceClient: No correlation id provided for "+e+", generating",o),this.logger.trace("PerformanceClient: Performance measurement started for "+e,o);var s,c=this.startPerformanceMeasuremeant(e,o);if(c.startMeasurement)c.startMeasurement(),s=c;else{var l=this.startPerformanceMeasurement(e,o);l.startMeasurement(),s=l}var h={eventId:this.generateId(),status:M2.InProgress,authority:this.authority,libraryName:this.libraryName,libraryVersion:this.libraryVersion,clientId:this.clientId,name:e,startTimeMs:Date.now(),correlationId:o};this.cacheEventByCorrelationId(h);var d={appName:(n=this.applicationTelemetry)===null||n===void 0?void 0:n.appName,appVersion:(a=this.applicationTelemetry)===null||a===void 0?void 0:a.appVersion};return this.addStaticFields(d,o),this.cacheMeasurement(h,s),{endMeasurement:function(u){var v=i.endMeasurement(Ue(Ue({},h),u));return v&&i.cacheEventByCorrelationId(v),v},flushMeasurement:function(){return i.flushMeasurements(h.name,h.correlationId)},discardMeasurement:function(){return i.discardMeasurements(h.correlationId)},addStaticFields:function(u){return i.addStaticFields(u,h.correlationId)},increment:function(u){return i.increment(u,h.correlationId)},measurement:s,event:h}},r.prototype.endMeasurement=function(e){var t=this.measurementsById.get(e.eventId);if(t){this.measurementsById.delete(e.eventId),t.endMeasurement();var i=t.flushMeasurement();if(i!==null){this.logger.trace("PerformanceClient: Performance measurement ended for "+e.name+": "+i+" ms",e.correlationId);var n=Ue(Ue({durationMs:Math.round(i)},e),{status:M2.Completed});return n}else this.logger.trace("PerformanceClient: Performance measurement not taken",e.correlationId)}else this.logger.trace("PerformanceClient: Measurement not found for "+e.eventId,e.correlationId);return null},r.prototype.addStaticFields=function(e,t){var i=this.staticFieldsByCorrelationId.get(t);i?(this.logger.trace("PerformanceClient: Updating static fields"),this.staticFieldsByCorrelationId.set(t,Ue(Ue({},i),e))):(this.logger.trace("PerformanceClient: Adding static fields"),this.staticFieldsByCorrelationId.set(t,e))},r.prototype.increment=function(e,t){var i=this.countersByCorrelationId.get(t);if(!i){this.logger.trace("PerformanceClient: Setting counters"),this.countersByCorrelationId.set(t,Ue({},e));return}this.logger.trace("PerformanceClient: Updating counters");for(var n in e)i.hasOwnProperty(n)||(i[n]=0),i[n]+=e[n]},r.prototype.cacheEventByCorrelationId=function(e){var t=this.eventsByCorrelationId.get(e.correlationId);t?(this.logger.trace("PerformanceClient: Performance measurement for "+e.name+" added/updated",e.correlationId),t.set(e.eventId,e)):(this.logger.trace("PerformanceClient: Performance measurement for "+e.name+" started",e.correlationId),this.eventsByCorrelationId.set(e.correlationId,new Map().set(e.eventId,e)))},r.prototype.cacheMeasurement=function(e,t){this.measurementsById.set(e.eventId,t)},r.prototype.flushMeasurements=function(e,t){var i=this;this.logger.trace("PerformanceClient: Performance measurements flushed for "+e,t);var n=this.eventsByCorrelationId.get(t),a=this.staticFieldsByCorrelationId.get(t),o=this.countersByCorrelationId.get(t);if(n){this.discardCache(t);var s=[];n.forEach(function(v){if(v.name!==e&&v.status!==M2.Completed){i.logger.trace("PerformanceClient: Incomplete submeasurement "+v.name+" found for "+e,t);var m=i.endMeasurement(v);m&&s.push(m)}s.push(v)});var c=s.sort(function(v,m){return v.startTimeMs-m.startTimeMs}),l=c.filter(function(v){return v.name===e&&v.status===M2.Completed});if(l.length>0){l.length>1&&this.logger.verbose("PerformanceClient: Multiple distinct top-level performance events found, using the first",t);var h=l[0];this.logger.verbose("PerformanceClient: Measurement found for "+e,t);var d=c.reduce(function(v,m){if(m.name!==e){i.logger.trace("PerformanceClient: Complete submeasurement found for "+m.name,t);var f=m.name+"DurationMs";v[f]?i.logger.verbose("PerformanceClient: Submeasurement for "+e+" already exists for "+m.name+", ignoring",t):v[f]=m.durationMs}return v},h),u=Ue(Ue(Ue({},d),a),o);this.emitEvents([u],d.correlationId)}else this.logger.verbose("PerformanceClient: No completed top-level measurements found for "+e,t)}else this.logger.verbose("PerformanceClient: No measurements found",t)},r.prototype.discardMeasurements=function(e){this.logger.trace("PerformanceClient: Performance measurements discarded",e),this.eventsByCorrelationId.delete(e)},r.prototype.discardCache=function(e){this.discardMeasurements(e),this.logger.trace("PerformanceClient: Static fields discarded",e),this.staticFieldsByCorrelationId.delete(e),this.logger.trace("PerformanceClient: Counters discarded",e),this.countersByCorrelationId.delete(e)},r.prototype.addPerformanceCallback=function(e){var t=this.generateId();return this.callbacks.set(t,e),this.logger.verbose("PerformanceClient: Performance callback registered with id: "+t),t},r.prototype.removePerformanceCallback=function(e){var t=this.callbacks.delete(e);return t?this.logger.verbose("PerformanceClient: Performance callback "+e+" removed."):this.logger.verbose("PerformanceClient: Performance callback "+e+" not removed."),t},r.prototype.emitEvents=function(e,t){var i=this;this.logger.verbose("PerformanceClient: Emitting performance events",t),this.callbacks.forEach(function(n,a){i.logger.trace("PerformanceClient: Emitting event to callback "+a,t),n.apply(null,[e])})},r}();/*! @azure/msal-common v9.1.1 2023-01-19 */var wm=function(){function r(){}return r.prototype.startMeasurement=function(){},r.prototype.endMeasurement=function(){},r.prototype.flushMeasurement=function(){return null},r}(),lH=function(r){F1(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.generateId=function(){return"callback-id"},e.prototype.startPerformanceMeasuremeant=function(){return new wm},e.prototype.startPerformanceMeasurement=function(){return new wm},e}(O_);/*! @azure/msal-browser v2.32.2 2023-01-10 */var L={pkceNotGenerated:{code:"pkce_not_created",desc:"The PKCE code challenge and verifier could not be generated."},cryptoDoesNotExist:{code:"crypto_nonexistent",desc:"The crypto object or function is not available."},httpMethodNotImplementedError:{code:"http_method_not_implemented",desc:"The HTTP method given has not been implemented in this library."},emptyNavigateUriError:{code:"empty_navigate_uri",desc:"Navigation URI is empty. Please check stack trace for more info."},hashEmptyError:{code:"hash_empty_error",desc:"Hash value cannot be processed because it is empty. Please verify that your redirectUri is not clearing the hash. For more visit: aka.ms/msaljs/browser-errors."},hashDoesNotContainStateError:{code:"no_state_in_hash",desc:"Hash does not contain state. Please verify that the request originated from msal."},hashDoesNotContainKnownPropertiesError:{code:"hash_does_not_contain_known_properties",desc:"Hash does not contain known properites. Please verify that your redirectUri is not changing the hash. For more visit: aka.ms/msaljs/browser-errors."},unableToParseStateError:{code:"unable_to_parse_state",desc:"Unable to parse state. Please verify that the request originated from msal."},stateInteractionTypeMismatchError:{code:"state_interaction_type_mismatch",desc:"Hash contains state but the interaction type does not match the caller."},interactionInProgress:{code:"interaction_in_progress",desc:"Interaction is currently in progress. Please ensure that this interaction has been completed before calling an interactive API. For more visit: aka.ms/msaljs/browser-errors."},popupWindowError:{code:"popup_window_error",desc:"Error opening popup window. This can happen if you are using IE or if popups are blocked in the browser."},emptyWindowError:{code:"empty_window_error",desc:"window.open returned null or undefined window object."},userCancelledError:{code:"user_cancelled",desc:"User cancelled the flow."},monitorPopupTimeoutError:{code:"monitor_window_timeout",desc:"Token acquisition in popup failed due to timeout. For more visit: aka.ms/msaljs/browser-errors."},monitorIframeTimeoutError:{code:"monitor_window_timeout",desc:"Token acquisition in iframe failed due to timeout. For more visit: aka.ms/msaljs/browser-errors."},redirectInIframeError:{code:"redirect_in_iframe",desc:"Redirects are not supported for iframed or brokered applications. Please ensure you are using MSAL.js in a top frame of the window if using the redirect APIs, or use the popup APIs."},blockTokenRequestsInHiddenIframeError:{code:"block_iframe_reload",desc:"Request was blocked inside an iframe because MSAL detected an authentication response. For more visit: aka.ms/msaljs/browser-errors"},blockAcquireTokenInPopupsError:{code:"block_nested_popups",desc:"Request was blocked inside a popup because MSAL detected it was running in a popup."},iframeClosedPrematurelyError:{code:"iframe_closed_prematurely",desc:"The iframe being monitored was closed prematurely."},silentLogoutUnsupportedError:{code:"silent_logout_unsupported",desc:"Silent logout not supported. Please call logoutRedirect or logoutPopup instead."},noAccountError:{code:"no_account_error",desc:"No account object provided to acquireTokenSilent and no active account has been set. Please call setActiveAccount or provide an account on the request."},silentPromptValueError:{code:"silent_prompt_value_error",desc:"The value given for the prompt value is not valid for silent requests - must be set to 'none' or 'no_session'."},noTokenRequestCacheError:{code:"no_token_request_cache_error",desc:"No token request found in cache."},unableToParseTokenRequestCacheError:{code:"unable_to_parse_token_request_cache_error",desc:"The cached token request could not be parsed."},noCachedAuthorityError:{code:"no_cached_authority_error",desc:"No cached authority found."},authRequestNotSet:{code:"auth_request_not_set_error",desc:"Auth Request not set. Please ensure initiateAuthRequest was called from the InteractionHandler"},invalidCacheType:{code:"invalid_cache_type",desc:"Invalid cache type"},notInBrowserEnvironment:{code:"non_browser_environment",desc:"Login and token requests are not supported in non-browser environments."},databaseNotOpen:{code:"database_not_open",desc:"Database is not open!"},noNetworkConnectivity:{code:"no_network_connectivity",desc:"No network connectivity. Check your internet connection."},postRequestFailed:{code:"post_request_failed",desc:"Network request failed: If the browser threw a CORS error, check that the redirectUri is registered in the Azure App Portal as type 'SPA'"},getRequestFailed:{code:"get_request_failed",desc:"Network request failed. Please check the network trace to determine root cause."},failedToParseNetworkResponse:{code:"failed_to_parse_response",desc:"Failed to parse network response. Check network trace."},unableToLoadTokenError:{code:"unable_to_load_token",desc:"Error loading token to cache."},signingKeyNotFoundInStorage:{code:"crypto_key_not_found",desc:"Cryptographic Key or Keypair not found in browser storage."},authCodeRequired:{code:"auth_code_required",desc:"An authorization code must be provided (as the `code` property on the request) to this flow."},authCodeOrNativeAccountRequired:{code:"auth_code_or_nativeAccountId_required",desc:"An authorization code or nativeAccountId must be provided to this flow."},databaseUnavailable:{code:"database_unavailable",desc:"IndexedDB, which is required for persistent cryptographic key storage, is unavailable. This may be caused by browser privacy features which block persistent storage in third-party contexts."},unableToAcquireTokenFromNativePlatform:{code:"unable_to_acquire_token_from_native_platform",desc:"Unable to acquire token from native platform. For a list of possible reasons visit aka.ms/msaljs/browser-errors."},nativeHandshakeTimeout:{code:"native_handshake_timeout",desc:"Timed out while attempting to establish connection to browser extension"},nativeExtensionNotInstalled:{code:"native_extension_not_installed",desc:"Native extension is not installed. If you think this is a mistake call the initialize function."},nativeConnectionNotEstablished:{code:"native_connection_not_established",desc:"Connection to native platform has not been established. Please install a compatible browser extension and run initialize(). For more please visit aka.ms/msaljs/browser-errors."},nativeBrokerCalledBeforeInitialize:{code:"native_broker_called_before_initialize",desc:"You must call and await the initialize function before attempting to call any other MSAL API when native brokering is enabled. For more please visit aka.ms/msaljs/browser-errors."},nativePromptNotSupported:{code:"native_prompt_not_supported",desc:"The provided prompt is not supported by the native platform. This request should be routed to the web based flow."}},R=function(r){Jt(e,r);function e(t,i){var n=r.call(this,t,i)||this;return Object.setPrototypeOf(n,e.prototype),n.name="BrowserAuthError",n}return e.createPkceNotGeneratedError=function(t){return new e(L.pkceNotGenerated.code,L.pkceNotGenerated.desc+" Detail:"+t)},e.createCryptoNotAvailableError=function(t){return new e(L.cryptoDoesNotExist.code,L.cryptoDoesNotExist.desc+" Detail:"+t)},e.createHttpMethodNotImplementedError=function(t){return new e(L.httpMethodNotImplementedError.code,L.httpMethodNotImplementedError.desc+" Given Method: "+t)},e.createEmptyNavigationUriError=function(){return new e(L.emptyNavigateUriError.code,L.emptyNavigateUriError.desc)},e.createEmptyHashError=function(t){return new e(L.hashEmptyError.code,L.hashEmptyError.desc+" Given Url: "+t)},e.createHashDoesNotContainStateError=function(){return new e(L.hashDoesNotContainStateError.code,L.hashDoesNotContainStateError.desc)},e.createHashDoesNotContainKnownPropertiesError=function(){return new e(L.hashDoesNotContainKnownPropertiesError.code,L.hashDoesNotContainKnownPropertiesError.desc)},e.createUnableToParseStateError=function(){return new e(L.unableToParseStateError.code,L.unableToParseStateError.desc)},e.createStateInteractionTypeMismatchError=function(){return new e(L.stateInteractionTypeMismatchError.code,L.stateInteractionTypeMismatchError.desc)},e.createInteractionInProgressError=function(){return new e(L.interactionInProgress.code,L.interactionInProgress.desc)},e.createPopupWindowError=function(t){var i=L.popupWindowError.desc;return i=F.isEmpty(t)?i:i+" Details: "+t,new e(L.popupWindowError.code,i)},e.createEmptyWindowCreatedError=function(){return new e(L.emptyWindowError.code,L.emptyWindowError.desc)},e.createUserCancelledError=function(){return new e(L.userCancelledError.code,L.userCancelledError.desc)},e.createMonitorPopupTimeoutError=function(){return new e(L.monitorPopupTimeoutError.code,L.monitorPopupTimeoutError.desc)},e.createMonitorIframeTimeoutError=function(){return new e(L.monitorIframeTimeoutError.code,L.monitorIframeTimeoutError.desc)},e.createRedirectInIframeError=function(t){return new e(L.redirectInIframeError.code,L.redirectInIframeError.desc+" (window.parent !== window) => "+t)},e.createBlockReloadInHiddenIframeError=function(){return new e(L.blockTokenRequestsInHiddenIframeError.code,L.blockTokenRequestsInHiddenIframeError.desc)},e.createBlockAcquireTokenInPopupsError=function(){return new e(L.blockAcquireTokenInPopupsError.code,L.blockAcquireTokenInPopupsError.desc)},e.createIframeClosedPrematurelyError=function(){return new e(L.iframeClosedPrematurelyError.code,L.iframeClosedPrematurelyError.desc)},e.createSilentLogoutUnsupportedError=function(){return new e(L.silentLogoutUnsupportedError.code,L.silentLogoutUnsupportedError.desc)},e.createNoAccountError=function(){return new e(L.noAccountError.code,L.noAccountError.desc)},e.createSilentPromptValueError=function(t){return new e(L.silentPromptValueError.code,L.silentPromptValueError.desc+" Given value: "+t)},e.createUnableToParseTokenRequestCacheError=function(){return new e(L.unableToParseTokenRequestCacheError.code,L.unableToParseTokenRequestCacheError.desc)},e.createNoTokenRequestCacheError=function(){return new e(L.noTokenRequestCacheError.code,L.noTokenRequestCacheError.desc)},e.createAuthRequestNotSetError=function(){return new e(L.authRequestNotSet.code,L.authRequestNotSet.desc)},e.createNoCachedAuthorityError=function(){return new e(L.noCachedAuthorityError.code,L.noCachedAuthorityError.desc)},e.createInvalidCacheTypeError=function(){return new e(L.invalidCacheType.code,""+L.invalidCacheType.desc)},e.createNonBrowserEnvironmentError=function(){return new e(L.notInBrowserEnvironment.code,L.notInBrowserEnvironment.desc)},e.createDatabaseNotOpenError=function(){return new e(L.databaseNotOpen.code,L.databaseNotOpen.desc)},e.createNoNetworkConnectivityError=function(){return new e(L.noNetworkConnectivity.code,L.noNetworkConnectivity.desc)},e.createPostRequestFailedError=function(t,i){return new e(L.postRequestFailed.code,L.postRequestFailed.desc+" | Network client threw: "+t+" | Attempted to reach: "+i.split("?")[0])},e.createGetRequestFailedError=function(t,i){return new e(L.getRequestFailed.code,L.getRequestFailed.desc+" | Network client threw: "+t+" | Attempted to reach: "+i.split("?")[0])},e.createFailedToParseNetworkResponseError=function(t){return new e(L.failedToParseNetworkResponse.code,L.failedToParseNetworkResponse.desc+" | Attempted to reach: "+t.split("?")[0])},e.createUnableToLoadTokenError=function(t){return new e(L.unableToLoadTokenError.code,L.unableToLoadTokenError.desc+" | "+t)},e.createSigningKeyNotFoundInStorageError=function(t){return new e(L.signingKeyNotFoundInStorage.code,L.signingKeyNotFoundInStorage.desc+" | No match found for KeyId: "+t)},e.createAuthCodeRequiredError=function(){return new e(L.authCodeRequired.code,L.authCodeRequired.desc)},e.createAuthCodeOrNativeAccountIdRequiredError=function(){return new e(L.authCodeOrNativeAccountRequired.code,L.authCodeOrNativeAccountRequired.desc)},e.createDatabaseUnavailableError=function(){return new e(L.databaseUnavailable.code,L.databaseUnavailable.desc)},e.createUnableToAcquireTokenFromNativePlatformError=function(){return new e(L.unableToAcquireTokenFromNativePlatform.code,L.unableToAcquireTokenFromNativePlatform.desc)},e.createNativeHandshakeTimeoutError=function(){return new e(L.nativeHandshakeTimeout.code,L.nativeHandshakeTimeout.desc)},e.createNativeExtensionNotInstalledError=function(){return new e(L.nativeExtensionNotInstalled.code,L.nativeExtensionNotInstalled.desc)},e.createNativeConnectionNotEstablishedError=function(){return new e(L.nativeConnectionNotEstablished.code,L.nativeConnectionNotEstablished.desc)},e.createNativeBrokerCalledBeforeInitialize=function(){return new e(L.nativeBrokerCalledBeforeInitialize.code,L.nativeBrokerCalledBeforeInitialize.desc)},e.createNativePromptParameterNotSupportedError=function(){return new e(L.nativePromptNotSupported.code,L.nativePromptNotSupported.desc)},e}(Q);/*! @azure/msal-browser v2.32.2 2023-01-10 */var $r={INTERACTION_IN_PROGRESS_VALUE:"interaction_in_progress",INVALID_GRANT_ERROR:"invalid_grant",POPUP_WIDTH:483,POPUP_HEIGHT:600,POPUP_NAME_PREFIX:"msal",DEFAULT_POLL_INTERVAL_MS:30,MSAL_SKU:"msal.js.browser"},bs={CHANNEL_ID:"53ee284d-920a-4b59-9d30-a60315b26836",PREFERRED_EXTENSION_ID:"ppnbnpeolgkicgegkbkbjmhlideopiji",MATS_TELEMETRY:"MATS"},Vi;(function(r){r.HandshakeRequest="Handshake",r.HandshakeResponse="HandshakeResponse",r.GetToken="GetToken",r.Response="Response"})(Vi||(Vi={}));var c1;(function(r){r.LocalStorage="localStorage",r.SessionStorage="sessionStorage",r.MemoryStorage="memoryStorage"})(c1||(c1={}));var ti;(function(r){r.GET="GET",r.POST="POST"})(ti||(ti={}));var Ce;(function(r){r.AUTHORITY="authority",r.ACQUIRE_TOKEN_ACCOUNT="acquireToken.account",r.SESSION_STATE="session.state",r.REQUEST_STATE="request.state",r.NONCE_IDTOKEN="nonce.id_token",r.ORIGIN_URI="request.origin",r.RENEW_STATUS="token.renew.status",r.URL_HASH="urlHash",r.REQUEST_PARAMS="request.params",r.SCOPES="scopes",r.INTERACTION_STATUS_KEY="interaction.status",r.CCS_CREDENTIAL="ccs.credential",r.CORRELATION_ID="request.correlationId",r.NATIVE_REQUEST="request.native",r.REDIRECT_CONTEXT="request.redirect.context"})(Ce||(Ce={}));var C2;(function(r){r.WRAPPER_SKU="wrapper.sku",r.WRAPPER_VER="wrapper.version"})(C2||(C2={}));var je;(function(r){r[r.acquireTokenRedirect=861]="acquireTokenRedirect",r[r.acquireTokenPopup=862]="acquireTokenPopup",r[r.ssoSilent=863]="ssoSilent",r[r.acquireTokenSilent_authCode=864]="acquireTokenSilent_authCode",r[r.handleRedirectPromise=865]="handleRedirectPromise",r[r.acquireTokenByCode=866]="acquireTokenByCode",r[r.acquireTokenSilent_silentFlow=61]="acquireTokenSilent_silentFlow",r[r.logout=961]="logout",r[r.logoutPopup=962]="logoutPopup"})(je||(je={}));var W;(function(r){r.Redirect="redirect",r.Popup="popup",r.Silent="silent",r.None="none"})(W||(W={}));var bm;(function(r){r.Startup="startup",r.Login="login",r.Logout="logout",r.AcquireToken="acquireToken",r.SsoSilent="ssoSilent",r.HandleRedirect="handleRedirect",r.None="none"})(bm||(bm={}));var xm={scopes:rl},ro="jwk",Mm;(function(r){r.React="@azure/msal-react",r.Angular="@azure/msal-angular"})(Mm||(Mm={}));var Y3="msal.db",hH=1,dH=Y3+".keys",E1;(function(r){r[r.Default=0]="Default",r[r.AccessToken=1]="AccessToken",r[r.AccessTokenAndRefreshToken=2]="AccessTokenAndRefreshToken",r[r.RefreshToken=3]="RefreshToken",r[r.RefreshTokenAndNetwork=4]="RefreshTokenAndNetwork",r[r.Skip=5]="Skip"})(E1||(E1={}));/*! @azure/msal-browser v2.32.2 2023-01-10 */var H1={redirectUriNotSet:{code:"redirect_uri_empty",desc:"A redirect URI is required for all calls, and none has been set."},postLogoutUriNotSet:{code:"post_logout_uri_empty",desc:"A post logout redirect has not been set."},storageNotSupportedError:{code:"storage_not_supported",desc:"Given storage configuration option was not supported."},noRedirectCallbacksSet:{code:"no_redirect_callbacks",desc:"No redirect callbacks have been set. Please call setRedirectCallbacks() with the appropriate function arguments before continuing. More information is available here: https://github.com/AzureAD/microsoft-authentication-library-for-js/wiki/MSAL-basics."},invalidCallbackObject:{code:"invalid_callback_object",desc:"The object passed for the callback was invalid. More information is available here: https://github.com/AzureAD/microsoft-authentication-library-for-js/wiki/MSAL-basics."},stubPcaInstanceCalled:{code:"stubbed_public_client_application_called",desc:"Stub instance of Public Client Application was called. If using msal-react, please ensure context is not used without a provider. For more visit: aka.ms/msaljs/browser-errors"},inMemRedirectUnavailable:{code:"in_mem_redirect_unavailable",desc:"Redirect cannot be supported. In-memory storage was selected and storeAuthStateInCookie=false, which would cause the library to be unable to handle the incoming hash. If you would like to use the redirect API, please use session/localStorage or set storeAuthStateInCookie=true."},entropyNotProvided:{code:"entropy_not_provided",desc:"The available browser crypto interface requires entropy set via system.cryptoOptions.entropy configuration option."}},$0=function(r){Jt(e,r);function e(t,i){var n=r.call(this,t,i)||this;return n.name="BrowserConfigurationAuthError",Object.setPrototypeOf(n,e.prototype),n}return e.createRedirectUriEmptyError=function(){return new e(H1.redirectUriNotSet.code,H1.redirectUriNotSet.desc)},e.createPostLogoutRedirectUriEmptyError=function(){return new e(H1.postLogoutUriNotSet.code,H1.postLogoutUriNotSet.desc)},e.createStorageNotSupportedError=function(t){return new e(H1.storageNotSupportedError.code,H1.storageNotSupportedError.desc+" Given Location: "+t)},e.createRedirectCallbacksNotSetError=function(){return new e(H1.noRedirectCallbacksSet.code,H1.noRedirectCallbacksSet.desc)},e.createStubPcaInstanceCalledError=function(){return new e(H1.stubPcaInstanceCalled.code,H1.stubPcaInstanceCalled.desc)},e.createInMemoryRedirectUnavailableError=function(){return new e(H1.inMemRedirectUnavailable.code,H1.inMemRedirectUnavailable.desc)},e.createEntropyNotProvided=function(){return new e(H1.entropyNotProvided.code,H1.entropyNotProvided.desc)},e}(Q);/*! @azure/msal-browser v2.32.2 2023-01-10 */var Cm=function(){function r(e){this.validateWindowStorage(e),this.windowStorage=window[e]}return r.prototype.validateWindowStorage=function(e){if(e!==c1.LocalStorage&&e!==c1.SessionStorage)throw $0.createStorageNotSupportedError(e);var t=!!window[e];if(!t)throw $0.createStorageNotSupportedError(e)},r.prototype.getItem=function(e){return this.windowStorage.getItem(e)},r.prototype.setItem=function(e,t){this.windowStorage.setItem(e,t)},r.prototype.removeItem=function(e){this.windowStorage.removeItem(e)},r.prototype.getKeys=function(){return Object.keys(this.windowStorage)},r.prototype.containsKey=function(e){return this.windowStorage.hasOwnProperty(e)},r}();/*! @azure/msal-browser v2.32.2 2023-01-10 */var Q3=function(){function r(){this.cache=new Map}return r.prototype.getItem=function(e){return this.cache.get(e)||null},r.prototype.setItem=function(e,t){this.cache.set(e,t)},r.prototype.removeItem=function(e){this.cache.delete(e)},r.prototype.getKeys=function(){var e=[];return this.cache.forEach(function(t,i){e.push(i)}),e},r.prototype.containsKey=function(e){return this.cache.has(e)},r.prototype.clear=function(){this.cache.clear()},r}();/*! @azure/msal-browser v2.32.2 2023-01-10 */var N_=function(){function r(){}return r.extractBrowserRequestState=function(e,t){if(F.isEmpty(t))return null;try{var i=Di.parseRequestState(e,t);return i.libraryState.meta}catch(n){throw j.createInvalidStateError(t,n)}},r.parseServerResponseFromHash=function(e){if(!e)return{};var t=new ke(e);return ke.getDeserializedHash(t.getHash())},r}();/*! @azure/msal-browser v2.32.2 2023-01-10 */var X3=function(r){Jt(e,r);function e(t,i,n,a){var o=r.call(this,t,n)||this;return o.COOKIE_LIFE_MULTIPLIER=24*60*60*1e3,o.cacheConfig=i,o.logger=a,o.internalStorage=new Q3,o.browserStorage=o.setupBrowserStorage(o.cacheConfig.cacheLocation),o.temporaryCacheStorage=o.setupTemporaryCacheStorage(o.cacheConfig.cacheLocation),o.migrateCacheEntries(),o}return e.prototype.setupBrowserStorage=function(t){switch(t){case c1.LocalStorage:case c1.SessionStorage:try{return new Cm(t)}catch(i){this.logger.verbose(i);break}}return this.cacheConfig.cacheLocation=c1.MemoryStorage,new Q3},e.prototype.setupTemporaryCacheStorage=function(t){switch(t){case c1.LocalStorage:case c1.SessionStorage:try{return new Cm(c1.SessionStorage)}catch(i){return this.logger.verbose(i),this.internalStorage}case c1.MemoryStorage:default:return this.internalStorage}},e.prototype.migrateCacheEntries=function(){var t=this,i=w.CACHE_PREFIX+"."+Ct.ID_TOKEN,n=w.CACHE_PREFIX+"."+Ct.CLIENT_INFO,a=w.CACHE_PREFIX+"."+Ct.ERROR,o=w.CACHE_PREFIX+"."+Ct.ERROR_DESC,s=this.browserStorage.getItem(i),c=this.browserStorage.getItem(n),l=this.browserStorage.getItem(a),h=this.browserStorage.getItem(o),d=[s,c,l,h],u=[Ct.ID_TOKEN,Ct.CLIENT_INFO,Ct.ERROR,Ct.ERROR_DESC];u.forEach(function(v,m){return t.migrateCacheEntry(v,d[m])})},e.prototype.migrateCacheEntry=function(t,i){i&&this.setTemporaryCache(t,i,!0)},e.prototype.validateAndParseJson=function(t){try{var i=JSON.parse(t);return i&&typeof i=="object"?i:null}catch{return null}},e.prototype.getItem=function(t){return this.browserStorage.getItem(t)},e.prototype.setItem=function(t,i){this.browserStorage.setItem(t,i)},e.prototype.getAccount=function(t){var i=this.getItem(t);if(!i)return null;var n=this.validateAndParseJson(i);return!n||!Wt.isAccountEntity(n)?null:Pr.toObject(new Wt,n)},e.prototype.setAccount=function(t){this.logger.trace("BrowserCacheManager.setAccount called");var i=t.generateAccountKey();this.setItem(i,JSON.stringify(t))},e.prototype.getIdTokenCredential=function(t){var i=this.getItem(t);if(!i)return this.logger.trace("BrowserCacheManager.getIdTokenCredential: called, no cache hit"),null;var n=this.validateAndParseJson(i);return!n||!kc.isIdTokenEntity(n)?(this.logger.trace("BrowserCacheManager.getIdTokenCredential: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getIdTokenCredential: cache hit"),Pr.toObject(new kc,n))},e.prototype.setIdTokenCredential=function(t){this.logger.trace("BrowserCacheManager.setIdTokenCredential called");var i=t.generateCredentialKey();this.setItem(i,JSON.stringify(t))},e.prototype.getAccessTokenCredential=function(t){var i=this.getItem(t);if(!i)return this.logger.trace("BrowserCacheManager.getAccessTokenCredential: called, no cache hit"),null;var n=this.validateAndParseJson(i);return!n||!Ec.isAccessTokenEntity(n)?(this.logger.trace("BrowserCacheManager.getAccessTokenCredential: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getAccessTokenCredential: cache hit"),Pr.toObject(new Ec,n))},e.prototype.setAccessTokenCredential=function(t){this.logger.trace("BrowserCacheManager.setAccessTokenCredential called");var i=t.generateCredentialKey();this.setItem(i,JSON.stringify(t))},e.prototype.getRefreshTokenCredential=function(t){var i=this.getItem(t);if(!i)return this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: called, no cache hit"),null;var n=this.validateAndParseJson(i);return!n||!k0.isRefreshTokenEntity(n)?(this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: cache hit"),Pr.toObject(new k0,n))},e.prototype.setRefreshTokenCredential=function(t){this.logger.trace("BrowserCacheManager.setRefreshTokenCredential called");var i=t.generateCredentialKey();this.setItem(i,JSON.stringify(t))},e.prototype.getAppMetadata=function(t){var i=this.getItem(t);if(!i)return this.logger.trace("BrowserCacheManager.getAppMetadata: called, no cache hit"),null;var n=this.validateAndParseJson(i);return!n||!K3.isAppMetadataEntity(t,n)?(this.logger.trace("BrowserCacheManager.getAppMetadata: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getAppMetadata: cache hit"),Pr.toObject(new K3,n))},e.prototype.setAppMetadata=function(t){this.logger.trace("BrowserCacheManager.setAppMetadata called");var i=t.generateAppMetadataKey();this.setItem(i,JSON.stringify(t))},e.prototype.getServerTelemetry=function(t){var i=this.getItem(t);if(!i)return this.logger.trace("BrowserCacheManager.getServerTelemetry: called, no cache hit"),null;var n=this.validateAndParseJson(i);return!n||!S0.isServerTelemetryEntity(t,n)?(this.logger.trace("BrowserCacheManager.getServerTelemetry: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getServerTelemetry: cache hit"),Pr.toObject(new S0,n))},e.prototype.setServerTelemetry=function(t,i){this.logger.trace("BrowserCacheManager.setServerTelemetry called"),this.setItem(t,JSON.stringify(i))},e.prototype.getAuthorityMetadata=function(t){var i=this.internalStorage.getItem(t);if(!i)return this.logger.trace("BrowserCacheManager.getAuthorityMetadata: called, no cache hit"),null;var n=this.validateAndParseJson(i);return n&&W3.isAuthorityMetadataEntity(t,n)?(this.logger.trace("BrowserCacheManager.getAuthorityMetadata: cache hit"),Pr.toObject(new W3,n)):null},e.prototype.getAuthorityMetadataKeys=function(){var t=this,i=this.internalStorage.getKeys();return i.filter(function(n){return t.isAuthorityMetadata(n)})},e.prototype.setWrapperMetadata=function(t,i){this.internalStorage.setItem(C2.WRAPPER_SKU,t),this.internalStorage.setItem(C2.WRAPPER_VER,i)},e.prototype.getWrapperMetadata=function(){var t=this.internalStorage.getItem(C2.WRAPPER_SKU)||w.EMPTY_STRING,i=this.internalStorage.getItem(C2.WRAPPER_VER)||w.EMPTY_STRING;return[t,i]},e.prototype.setAuthorityMetadata=function(t,i){this.logger.trace("BrowserCacheManager.setAuthorityMetadata called"),this.internalStorage.setItem(t,JSON.stringify(i))},e.prototype.getActiveAccount=function(){var t=this.generateCacheKey(Ct.ACTIVE_ACCOUNT_FILTERS),i=this.getItem(t);if(!i){this.logger.trace("BrowserCacheManager.getActiveAccount: No active account filters cache schema found, looking for legacy schema");var n=this.generateCacheKey(Ct.ACTIVE_ACCOUNT),a=this.getItem(n);if(!a)return this.logger.trace("BrowserCacheManager.getActiveAccount: No active account found"),null;var o=this.getAccountInfoByFilter({localAccountId:a})[0]||null;return o?(this.logger.trace("BrowserCacheManager.getActiveAccount: Legacy active account cache schema found"),this.logger.trace("BrowserCacheManager.getActiveAccount: Adding active account filters cache schema"),this.setActiveAccount(o),o):null}var s=this.validateAndParseJson(i);return s?(this.logger.trace("BrowserCacheManager.getActiveAccount: Active account filters schema found"),this.getAccountInfoByFilter({homeAccountId:s.homeAccountId,localAccountId:s.localAccountId})[0]||null):(this.logger.trace("BrowserCacheManager.getActiveAccount: No active account found"),null)},e.prototype.setActiveAccount=function(t){var i=this.generateCacheKey(Ct.ACTIVE_ACCOUNT_FILTERS),n=this.generateCacheKey(Ct.ACTIVE_ACCOUNT);if(t){this.logger.verbose("setActiveAccount: Active account set");var a={homeAccountId:t.homeAccountId,localAccountId:t.localAccountId};this.browserStorage.setItem(i,JSON.stringify(a)),this.browserStorage.setItem(n,t.localAccountId)}else this.logger.verbose("setActiveAccount: No account passed, active account not set"),this.browserStorage.removeItem(i),this.browserStorage.removeItem(n)},e.prototype.getAccountInfoByFilter=function(t){var i=this.getAllAccounts();return this.logger.trace("BrowserCacheManager.getAccountInfoByFilter: total "+i.length+" accounts found"),i.filter(function(n){return!(t.username&&t.username.toLowerCase()!==n.username.toLowerCase()||t.homeAccountId&&t.homeAccountId!==n.homeAccountId||t.localAccountId&&t.localAccountId!==n.localAccountId||t.tenantId&&t.tenantId!==n.tenantId||t.environment&&t.environment!==n.environment)})},e.prototype.getAccountInfoByHints=function(t,i){var n=this.getAllAccounts().filter(function(a){if(i){var o=a.idTokenClaims&&a.idTokenClaims.sid;return i===o}return t?t===a.username:!1});if(n.length===1)return n[0];if(n.length>1)throw j.createMultipleMatchingAccountsInCacheError();return null},e.prototype.getThrottlingCache=function(t){var i=this.getItem(t);if(!i)return this.logger.trace("BrowserCacheManager.getThrottlingCache: called, no cache hit"),null;var n=this.validateAndParseJson(i);return!n||!zm.isThrottlingEntity(t,n)?(this.logger.trace("BrowserCacheManager.getThrottlingCache: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getThrottlingCache: cache hit"),Pr.toObject(new zm,n))},e.prototype.setThrottlingCache=function(t,i){this.logger.trace("BrowserCacheManager.setThrottlingCache called"),this.setItem(t,JSON.stringify(i))},e.prototype.getTemporaryCache=function(t,i){var n=i?this.generateCacheKey(t):t;if(this.cacheConfig.storeAuthStateInCookie){var a=this.getItemCookie(n);if(a)return this.logger.trace("BrowserCacheManager.getTemporaryCache: storeAuthStateInCookies set to true, retrieving from cookies"),a}var o=this.temporaryCacheStorage.getItem(n);if(!o){if(this.cacheConfig.cacheLocation===c1.LocalStorage){var s=this.browserStorage.getItem(n);if(s)return this.logger.trace("BrowserCacheManager.getTemporaryCache: Temporary cache item found in local storage"),s}return this.logger.trace("BrowserCacheManager.getTemporaryCache: No cache item found in local storage"),null}return this.logger.trace("BrowserCacheManager.getTemporaryCache: Temporary cache item returned"),o},e.prototype.setTemporaryCache=function(t,i,n){var a=n?this.generateCacheKey(t):t;this.temporaryCacheStorage.setItem(a,i),this.cacheConfig.storeAuthStateInCookie&&(this.logger.trace("BrowserCacheManager.setTemporaryCache: storeAuthStateInCookie set to true, setting item cookie"),this.setItemCookie(a,i))},e.prototype.removeItem=function(t){return this.browserStorage.removeItem(t),this.temporaryCacheStorage.removeItem(t),this.cacheConfig.storeAuthStateInCookie&&(this.logger.trace("BrowserCacheManager.removeItem: storeAuthStateInCookie is true, clearing item cookie"),this.clearItemCookie(t)),!0},e.prototype.containsKey=function(t){return this.browserStorage.containsKey(t)||this.temporaryCacheStorage.containsKey(t)},e.prototype.getKeys=function(){return i6(this.browserStorage.getKeys(),this.temporaryCacheStorage.getKeys())},e.prototype.clear=function(){return V(this,void 0,void 0,function(){var t=this;return S(this,function(i){switch(i.label){case 0:return[4,this.removeAllAccounts()];case 1:return i.sent(),this.removeAppMetadata(),this.getKeys().forEach(function(n){(t.browserStorage.containsKey(n)||t.temporaryCacheStorage.containsKey(n))&&(n.indexOf(w.CACHE_PREFIX)!==-1||n.indexOf(t.clientId)!==-1)&&t.removeItem(n)}),this.internalStorage.clear(),[2]}})})},e.prototype.setItemCookie=function(t,i,n){var a=encodeURIComponent(t)+"="+encodeURIComponent(i)+";path=/;SameSite=Lax;";if(n){var o=this.getCookieExpirationTime(n);a+="expires="+o+";"}this.cacheConfig.secureCookies&&(a+="Secure;"),document.cookie=a},e.prototype.getItemCookie=function(t){for(var i=encodeURIComponent(t)+"=",n=document.cookie.split(";"),a=0;a<n.length;a++){for(var o=n[a];o.charAt(0)===" ";)o=o.substring(1);if(o.indexOf(i)===0)return decodeURIComponent(o.substring(i.length,o.length))}return w.EMPTY_STRING},e.prototype.clearMsalCookies=function(){var t=this,i=w.CACHE_PREFIX+"."+this.clientId,n=document.cookie.split(";");n.forEach(function(a){for(;a.charAt(0)===" ";)a=a.substring(1);if(a.indexOf(i)===0){var o=a.split("=")[0];t.clearItemCookie(o)}})},e.prototype.clearItemCookie=function(t){this.setItemCookie(t,w.EMPTY_STRING,-1)},e.prototype.getCookieExpirationTime=function(t){var i=new Date,n=new Date(i.getTime()+t*this.COOKIE_LIFE_MULTIPLIER);return n.toUTCString()},e.prototype.getCache=function(){return this.browserStorage},e.prototype.setCache=function(){},e.prototype.generateCacheKey=function(t){var i=this.validateAndParseJson(t);return i?JSON.stringify(t):F.startsWith(t,w.CACHE_PREFIX)||F.startsWith(t,Ct.ADAL_ID_TOKEN)?t:w.CACHE_PREFIX+"."+this.clientId+"."+t},e.prototype.generateAuthorityKey=function(t){var i=Di.parseRequestState(this.cryptoImpl,t).libraryState.id;return this.generateCacheKey(Ce.AUTHORITY+"."+i)},e.prototype.generateNonceKey=function(t){var i=Di.parseRequestState(this.cryptoImpl,t).libraryState.id;return this.generateCacheKey(Ce.NONCE_IDTOKEN+"."+i)},e.prototype.generateStateKey=function(t){var i=Di.parseRequestState(this.cryptoImpl,t).libraryState.id;return this.generateCacheKey(Ce.REQUEST_STATE+"."+i)},e.prototype.getCachedAuthority=function(t){var i=this.generateStateKey(t),n=this.getTemporaryCache(i);if(!n)return null;var a=this.generateAuthorityKey(n);return this.getTemporaryCache(a)},e.prototype.updateCacheEntries=function(t,i,n,a,o){this.logger.trace("BrowserCacheManager.updateCacheEntries called");var s=this.generateStateKey(t);this.setTemporaryCache(s,t,!1);var c=this.generateNonceKey(t);this.setTemporaryCache(c,i,!1);var l=this.generateAuthorityKey(t);if(this.setTemporaryCache(l,n,!1),o){var h={credential:o.homeAccountId,type:Y1.HOME_ACCOUNT_ID};this.setTemporaryCache(Ce.CCS_CREDENTIAL,JSON.stringify(h),!0)}else if(!F.isEmpty(a)){var h={credential:a,type:Y1.UPN};this.setTemporaryCache(Ce.CCS_CREDENTIAL,JSON.stringify(h),!0)}},e.prototype.resetRequestCache=function(t){var i=this;this.logger.trace("BrowserCacheManager.resetRequestCache called"),F.isEmpty(t)||this.getKeys().forEach(function(n){n.indexOf(t)!==-1&&i.removeItem(n)}),t&&(this.removeItem(this.generateStateKey(t)),this.removeItem(this.generateNonceKey(t)),this.removeItem(this.generateAuthorityKey(t))),this.removeItem(this.generateCacheKey(Ce.REQUEST_PARAMS)),this.removeItem(this.generateCacheKey(Ce.ORIGIN_URI)),this.removeItem(this.generateCacheKey(Ce.URL_HASH)),this.removeItem(this.generateCacheKey(Ce.CORRELATION_ID)),this.removeItem(this.generateCacheKey(Ce.CCS_CREDENTIAL)),this.removeItem(this.generateCacheKey(Ce.NATIVE_REQUEST)),this.setInteractionInProgress(!1)},e.prototype.cleanRequestByState=function(t){if(this.logger.trace("BrowserCacheManager.cleanRequestByState called"),t){var i=this.generateStateKey(t),n=this.temporaryCacheStorage.getItem(i);this.logger.infoPii("BrowserCacheManager.cleanRequestByState: Removing temporary cache items for state: "+n),this.resetRequestCache(n||w.EMPTY_STRING)}this.clearMsalCookies()},e.prototype.cleanRequestByInteractionType=function(t){var i=this;this.logger.trace("BrowserCacheManager.cleanRequestByInteractionType called"),this.getKeys().forEach(function(n){if(n.indexOf(Ce.REQUEST_STATE)!==-1){var a=i.temporaryCacheStorage.getItem(n);if(a){var o=N_.extractBrowserRequestState(i.cryptoImpl,a);o&&o.interactionType===t&&(i.logger.infoPii("BrowserCacheManager.cleanRequestByInteractionType: Removing temporary cache items for state: "+a),i.resetRequestCache(a))}}}),this.clearMsalCookies(),this.setInteractionInProgress(!1)},e.prototype.cacheCodeRequest=function(t,i){this.logger.trace("BrowserCacheManager.cacheCodeRequest called");var n=i.base64Encode(JSON.stringify(t));this.setTemporaryCache(Ce.REQUEST_PARAMS,n,!0)},e.prototype.getCachedRequest=function(t,i){this.logger.trace("BrowserCacheManager.getCachedRequest called");var n=this.getTemporaryCache(Ce.REQUEST_PARAMS,!0);if(!n)throw R.createNoTokenRequestCacheError();var a=this.validateAndParseJson(i.base64Decode(n));if(!a)throw R.createUnableToParseTokenRequestCacheError();if(this.removeItem(this.generateCacheKey(Ce.REQUEST_PARAMS)),F.isEmpty(a.authority)){var o=this.generateAuthorityKey(t),s=this.getTemporaryCache(o);if(!s)throw R.createNoCachedAuthorityError();a.authority=s}return a},e.prototype.getCachedNativeRequest=function(){this.logger.trace("BrowserCacheManager.getCachedNativeRequest called");var t=this.getTemporaryCache(Ce.NATIVE_REQUEST,!0);if(!t)return this.logger.trace("BrowserCacheManager.getCachedNativeRequest: No cached native request found"),null;var i=this.validateAndParseJson(t);return i||(this.logger.error("BrowserCacheManager.getCachedNativeRequest: Unable to parse native request"),null)},e.prototype.isInteractionInProgress=function(t){var i=this.getInteractionInProgress();return t?i===this.clientId:!!i},e.prototype.getInteractionInProgress=function(){var t=w.CACHE_PREFIX+"."+Ce.INTERACTION_STATUS_KEY;return this.getTemporaryCache(t,!1)},e.prototype.setInteractionInProgress=function(t){var i=w.CACHE_PREFIX+"."+Ce.INTERACTION_STATUS_KEY;if(t){if(this.getInteractionInProgress())throw R.createInteractionInProgressError();this.setTemporaryCache(i,this.clientId,!1)}else!t&&this.getInteractionInProgress()===this.clientId&&this.removeItem(i)},e.prototype.getLegacyLoginHint=function(){var t=this.getTemporaryCache(Ct.ADAL_ID_TOKEN);t&&(this.browserStorage.removeItem(Ct.ADAL_ID_TOKEN),this.logger.verbose("Cached ADAL id token retrieved."));var i=this.getTemporaryCache(Ct.ID_TOKEN,!0);i&&(this.removeItem(this.generateCacheKey(Ct.ID_TOKEN)),this.logger.verbose("Cached MSAL.js v1 id token retrieved"));var n=i||t;if(n){var a=new ui(n,this.cryptoImpl);if(a.claims&&a.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"),a.claims.preferred_username;if(a.claims&&a.claims.upn)return this.logger.verbose("No SSO params used and ADAL/MSAL v1 token retrieved, setting ADAL/MSAL v1 upn as loginHint"),a.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(t,i){var n=i.generateCredentialKey();if(t!==n){var a=this.getItem(t);if(a)return this.removeItem(t),this.setItem(n,a),this.logger.verbose("Updated an outdated "+i.credentialType+" cache key"),n;this.logger.error("Attempted to update an outdated "+i.credentialType+" cache key but no item matching the outdated key was found in storage")}return t},e.prototype.getRedirectRequestContext=function(){return this.getTemporaryCache(Ce.REDIRECT_CONTEXT,!0)},e.prototype.setRedirectRequestContext=function(t){this.setTemporaryCache(Ce.REDIRECT_CONTEXT,t,!0)},e}(Pr),uH=function(r,e){var t={cacheLocation:c1.MemoryStorage,storeAuthStateInCookie:!1,secureCookies:!1};return new X3(r,t,M0,e)};/*! @azure/msal-browser v2.32.2 2023-01-10 */var Ed="@azure/msal-browser",Ys="2.32.2";/*! @azure/msal-browser v2.32.2 2023-01-10 */var vH=function(){function r(){}return r.prototype.sendGetRequestAsync=function(e,t){return V(this,void 0,void 0,function(){var i,n,a;return S(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,fetch(e,{method:ti.GET,headers:this.getFetchHeaders(t)})];case 1:return i=o.sent(),[3,3];case 2:throw n=o.sent(),window.navigator.onLine?R.createGetRequestFailedError(n,e):R.createNoNetworkConnectivityError();case 3:return o.trys.push([3,5,,6]),a={headers:this.getHeaderDict(i.headers)},[4,i.json()];case 4:return[2,(a.body=o.sent(),a.status=i.status,a)];case 5:throw o.sent(),R.createFailedToParseNetworkResponseError(e);case 6:return[2]}})})},r.prototype.sendPostRequestAsync=function(e,t){return V(this,void 0,void 0,function(){var i,n,a,o;return S(this,function(s){switch(s.label){case 0:i=t&&t.body||w.EMPTY_STRING,s.label=1;case 1:return s.trys.push([1,3,,4]),[4,fetch(e,{method:ti.POST,headers:this.getFetchHeaders(t),body:i})];case 2:return n=s.sent(),[3,4];case 3:throw a=s.sent(),window.navigator.onLine?R.createPostRequestFailedError(a,e):R.createNoNetworkConnectivityError();case 4:return s.trys.push([4,6,,7]),o={headers:this.getHeaderDict(n.headers)},[4,n.json()];case 5:return[2,(o.body=s.sent(),o.status=n.status,o)];case 6:throw s.sent(),R.createFailedToParseNetworkResponseError(e);case 7:return[2]}})})},r.prototype.getFetchHeaders=function(e){var t=new Headers;if(!(e&&e.headers))return t;var i=e.headers;return Object.keys(i).forEach(function(n){t.append(n,i[n])}),t},r.prototype.getHeaderDict=function(e){var t={};return e.forEach(function(i,n){t[n]=i}),t},r}();/*! @azure/msal-browser v2.32.2 2023-01-10 */var mH=function(){function r(){}return r.prototype.sendGetRequestAsync=function(e,t){return V(this,void 0,void 0,function(){return S(this,function(i){return[2,this.sendRequestAsync(e,ti.GET,t)]})})},r.prototype.sendPostRequestAsync=function(e,t){return V(this,void 0,void 0,function(){return S(this,function(i){return[2,this.sendRequestAsync(e,ti.POST,t)]})})},r.prototype.sendRequestAsync=function(e,t,i){var n=this;return new Promise(function(a,o){var s=new XMLHttpRequest;if(s.open(t,e,!0),n.setXhrHeaders(s,i),s.onload=function(){(s.status<200||s.status>=300)&&(t===ti.POST?o(R.createPostRequestFailedError("Failed with status "+s.status,e)):o(R.createGetRequestFailedError("Failed with status "+s.status,e)));try{var c=JSON.parse(s.responseText),l={headers:n.getHeaderDict(s),body:c,status:s.status};a(l)}catch{o(R.createFailedToParseNetworkResponseError(e))}},s.onerror=function(){window.navigator.onLine?t===ti.POST?o(R.createPostRequestFailedError("Failed with status "+s.status,e)):o(R.createGetRequestFailedError("Failed with status "+s.status,e)):o(R.createNoNetworkConnectivityError())},t===ti.POST&&i&&i.body)s.send(i.body);else if(t===ti.GET)s.send();else throw R.createHttpMethodNotImplementedError(t)})},r.prototype.setXhrHeaders=function(e,t){if(t&&t.headers){var i=t.headers;Object.keys(i).forEach(function(n){e.setRequestHeader(n,i[n])})}},r.prototype.getHeaderDict=function(e){var t=e.getAllResponseHeaders(),i=t.trim().split(/[\r\n]+/),n={};return i.forEach(function(a){var o=a.split(": "),s=o.shift(),c=o.join(": ");s&&c&&(n[s]=c)}),n},r}();/*! @azure/msal-browser v2.32.2 2023-01-10 */var lt=function(){function r(){}return r.clearHash=function(e){e.location.hash=w.EMPTY_STRING,typeof e.history.replaceState=="function"&&e.history.replaceState(null,w.EMPTY_STRING,""+e.location.origin+e.location.pathname+e.location.search)},r.replaceHash=function(e){var t=e.split("#");t.shift(),window.location.hash=t.length>0?t.join("#"):w.EMPTY_STRING},r.isInIframe=function(){return window.parent!==window},r.isInPopup=function(){return typeof window<"u"&&!!window.opener&&window.opener!==window&&typeof window.name=="string"&&window.name.indexOf($r.POPUP_NAME_PREFIX+".")===0},r.getCurrentUri=function(){return window.location.href.split("?")[0].split("#")[0]},r.getHomepage=function(){var e=new ke(window.location.href),t=e.getUrlComponents();return t.Protocol+"//"+t.HostNameAndPort+"/"},r.getBrowserNetworkClient=function(){return window.fetch&&window.Headers?new vH:new mH},r.blockReloadInHiddenIframes=function(){var e=ke.hashContainsKnownProperties(window.location.hash);if(e&&r.isInIframe())throw R.createBlockReloadInHiddenIframeError()},r.blockRedirectInIframe=function(e,t){var i=r.isInIframe();if(e===W.Redirect&&i&&!t)throw R.createRedirectInIframeError(i)},r.blockAcquireTokenInPopups=function(){if(r.isInPopup())throw R.createBlockAcquireTokenInPopupsError()},r.blockNonBrowserEnvironment=function(e){if(!e)throw R.createNonBrowserEnvironmentError()},r.blockNativeBrokerCalledBeforeInitialized=function(e,t){if(e&&!t)throw R.createNativeBrokerCalledBeforeInitialize()},r.detectIEOrEdge=function(){var e=window.navigator.userAgent,t=e.indexOf("MSIE "),i=e.indexOf("Trident/"),n=e.indexOf("Edge/"),a=t>0||i>0,o=n>0;return a||o},r}();/*! @azure/msal-browser v2.32.2 2023-01-10 */var U_=function(){function r(e,t,i,n,a,o,s,c,l){this.config=e,this.browserStorage=t,this.browserCrypto=i,this.networkClient=this.config.system.networkClient,this.eventHandler=a,this.navigationClient=o,this.nativeMessageHandler=c,this.correlationId=l||this.browserCrypto.createNewGuid(),this.logger=n.clone($r.MSAL_SKU,Ys,this.correlationId),this.performanceClient=s}return r.prototype.clearCacheOnLogout=function(e){return V(this,void 0,void 0,function(){return S(this,function(t){switch(t.label){case 0:if(!e)return[3,5];Wt.accountInfoIsEqual(e,this.browserStorage.getActiveAccount(),!1)&&(this.logger.verbose("Setting active account to null"),this.browserStorage.setActiveAccount(null)),t.label=1;case 1:return t.trys.push([1,3,,4]),[4,this.browserStorage.removeAccount(Wt.generateAccountCacheKey(e))];case 2:return t.sent(),this.logger.verbose("Cleared cache items belonging to the account provided in the logout request."),[3,4];case 3:return t.sent(),this.logger.error("Account provided in logout request was not found. Local cache unchanged."),[3,4];case 4:return[3,9];case 5:return t.trys.push([5,8,,9]),this.logger.verbose("No account provided in logout request, clearing all cache items.",this.correlationId),[4,this.browserStorage.clear()];case 6:return t.sent(),[4,this.browserCrypto.clearKeystore()];case 7:return t.sent(),[3,9];case 8:return t.sent(),this.logger.error("Attempted to clear all MSAL cache items and failed. Local cache unchanged."),[3,9];case 9:return[2]}})})},r.prototype.initializeBaseRequest=function(e){return V(this,void 0,void 0,function(){var t,i,n,a;return S(this,function(o){switch(o.label){case 0:if(this.logger.verbose("Initializing BaseAuthRequest"),t=e.authority||this.config.auth.authority,i=i6(e&&e.scopes||[]),n=Y(Y({},e),{correlationId:this.correlationId,authority:t,scopes:i}),!n.authenticationScheme)n.authenticationScheme=Ie.BEARER,this.logger.verbose(`Authentication Scheme wasn't explicitly set in request, defaulting to "Bearer" request`);else{if(n.authenticationScheme===Ie.SSH){if(!e.sshJwk)throw Ye.createMissingSshJwkError();if(!e.sshKid)throw Ye.createMissingSshKidError()}this.logger.verbose('Authentication Scheme set to "'+n.authenticationScheme+'" as configured in Auth request')}return e.claims&&!F.isEmpty(e.claims)?(a=n,[4,this.browserCrypto.hashString(e.claims)]):[3,2];case 1:a.requestedClaimsHash=o.sent(),o.label=2;case 2:return[2,n]}})})},r.prototype.getRedirectUri=function(e){this.logger.verbose("getRedirectUri called");var t=e||this.config.auth.redirectUri||lt.getCurrentUri();return ke.getAbsoluteUrl(t,lt.getCurrentUri())},r.prototype.initializeServerTelemetryManager=function(e,t){this.logger.verbose("initializeServerTelemetryManager called");var i={clientId:this.config.auth.clientId,correlationId:this.correlationId,apiId:e,forceRefresh:t||!1,wrapperSKU:this.browserStorage.getWrapperMetadata()[0],wrapperVer:this.browserStorage.getWrapperMetadata()[1]};return new cH(i,this.browserStorage)},r.prototype.getDiscoveredAuthority=function(e){return V(this,void 0,void 0,function(){var t;return S(this,function(i){switch(i.label){case 0:return this.logger.verbose("getDiscoveredAuthority called"),t={protocolMode:this.config.auth.protocolMode,knownAuthorities:this.config.auth.knownAuthorities,cloudDiscoveryMetadata:this.config.auth.cloudDiscoveryMetadata,authorityMetadata:this.config.auth.authorityMetadata},e?(this.logger.verbose("Creating discovered authority with request authority"),[4,V0.createDiscoveredInstance(e,this.config.system.networkClient,this.browserStorage,t,this.logger)]):[3,2];case 1:return[2,i.sent()];case 2:return this.logger.verbose("Creating discovered authority with configured authority"),[4,V0.createDiscoveredInstance(this.config.auth.authority,this.config.system.networkClient,this.browserStorage,t,this.logger)];case 3:return[2,i.sent()]}})})},r}();/*! @azure/msal-browser v2.32.2 2023-01-10 */var Lo=function(r){Jt(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.initializeAuthorizationCodeRequest=function(t){return V(this,void 0,void 0,function(){var i,n;return S(this,function(a){switch(a.label){case 0:return this.logger.verbose("initializeAuthorizationRequest called",t.correlationId),[4,this.browserCrypto.generatePkceCodes()];case 1:return i=a.sent(),n=Y(Y({},t),{redirectUri:t.redirectUri,code:w.EMPTY_STRING,codeVerifier:i.verifier}),t.codeChallenge=i.challenge,t.codeChallengeMethod=w.S256_CODE_CHALLENGE_METHOD,[2,n]}})})},e.prototype.initializeLogoutRequest=function(t){this.logger.verbose("initializeLogoutRequest called",t==null?void 0:t.correlationId);var i=Y({correlationId:this.correlationId||this.browserCrypto.createNewGuid()},t);if(t)if(t.logoutHint)this.logger.verbose("logoutHint has already been set in logoutRequest");else if(t.account){var n=this.getLogoutHintFromIdTokenClaims(t.account);n&&(this.logger.verbose("Setting logoutHint to login_hint ID Token Claim value for the account provided"),i.logoutHint=n)}else this.logger.verbose("logoutHint was not set and account was not passed into logout request, logoutHint will not be set");else this.logger.verbose("logoutHint will not be set since no logout request was configured");return!t||t.postLogoutRedirectUri!==null?t&&t.postLogoutRedirectUri?(this.logger.verbose("Setting postLogoutRedirectUri to uri set on logout request",i.correlationId),i.postLogoutRedirectUri=ke.getAbsoluteUrl(t.postLogoutRedirectUri,lt.getCurrentUri())):this.config.auth.postLogoutRedirectUri===null?this.logger.verbose("postLogoutRedirectUri configured as null and no uri set on request, not passing post logout redirect",i.correlationId):this.config.auth.postLogoutRedirectUri?(this.logger.verbose("Setting postLogoutRedirectUri to configured uri",i.correlationId),i.postLogoutRedirectUri=ke.getAbsoluteUrl(this.config.auth.postLogoutRedirectUri,lt.getCurrentUri())):(this.logger.verbose("Setting postLogoutRedirectUri to current page",i.correlationId),i.postLogoutRedirectUri=ke.getAbsoluteUrl(lt.getCurrentUri(),lt.getCurrentUri())):this.logger.verbose("postLogoutRedirectUri passed as null, not setting post logout redirect uri",i.correlationId),i},e.prototype.getLogoutHintFromIdTokenClaims=function(t){var i=t.idTokenClaims;if(i){if(i.login_hint)return i.login_hint;this.logger.verbose("The ID Token Claims tied to the provided account do not contain a login_hint claim, logoutHint will not be added to logout request")}else this.logger.verbose("The provided account does not contain ID Token Claims, logoutHint will not be added to logout request");return null},e.prototype.createAuthCodeClient=function(t,i,n){return V(this,void 0,void 0,function(){var a;return S(this,function(o){switch(o.label){case 0:return[4,this.getClientConfiguration(t,i,n)];case 1:return a=o.sent(),[2,new T_(a)]}})})},e.prototype.getClientConfiguration=function(t,i,n){return V(this,void 0,void 0,function(){var a,o;return S(this,function(s){switch(s.label){case 0:return this.logger.verbose("getClientConfiguration called",this.correlationId),[4,this.getDiscoveredAuthority(i,n)];case 1:return a=s.sent(),o=this.config.system.loggerOptions,[2,{authOptions:{clientId:this.config.auth.clientId,authority:a,clientCapabilities:this.config.auth.clientCapabilities},systemOptions:{tokenRenewalOffsetSeconds:this.config.system.tokenRenewalOffsetSeconds,preventCorsPreflight:!0},loggerOptions:{loggerCallback:o.loggerCallback,piiLoggingEnabled:o.piiLoggingEnabled,logLevel:o.logLevel,correlationId:this.correlationId},cryptoInterface:this.browserCrypto,networkInterface:this.networkClient,storageInterface:this.browserStorage,serverTelemetryManager:t,libraryInfo:{sku:$r.MSAL_SKU,version:Ys,cpu:w.EMPTY_STRING,os:w.EMPTY_STRING},telemetry:this.config.telemetry}]}})})},e.prototype.validateAndExtractStateFromHash=function(t,i,n){if(this.logger.verbose("validateAndExtractStateFromHash called",n),!t.state)throw R.createHashDoesNotContainStateError();var a=N_.extractBrowserRequestState(this.browserCrypto,t.state);if(!a)throw R.createUnableToParseStateError();if(a.interactionType!==i)throw R.createStateInteractionTypeMismatchError();return this.logger.verbose("Returning state from hash",n),t.state},e.prototype.getDiscoveredAuthority=function(t,i){var n;return V(this,void 0,void 0,function(){var a,o,s,c;return S(this,function(l){switch(l.label){case 0:return this.logger.verbose("getDiscoveredAuthority called",this.correlationId),a=(n=this.performanceClient)===null||n===void 0?void 0:n.startMeasurement(St.StandardInteractionClientGetDiscoveredAuthority,this.correlationId),o={protocolMode:this.config.auth.protocolMode,knownAuthorities:this.config.auth.knownAuthorities,cloudDiscoveryMetadata:this.config.auth.cloudDiscoveryMetadata,authorityMetadata:this.config.auth.authorityMetadata,skipAuthorityMetadataCache:this.config.auth.skipAuthorityMetadataCache},s=t||this.config.auth.authority,c=A0.generateAuthority(s,i||this.config.auth.azureCloudOptions),this.logger.verbose("Creating discovered authority with configured authority",this.correlationId),[4,V0.createDiscoveredInstance(c,this.config.system.networkClient,this.browserStorage,o,this.logger).then(function(h){return a.endMeasurement({success:!0}),h}).catch(function(h){throw a.endMeasurement({errorCode:h.errorCode,subErrorCode:h.subError,success:!1}),h})];case 1:return[2,l.sent()]}})})},e.prototype.initializeAuthorizationRequest=function(t,i){return V(this,void 0,void 0,function(){var n,a,o,s,c,l,h;return S(this,function(d){switch(d.label){case 0:return this.logger.verbose("initializeAuthorizationRequest called",this.correlationId),n=this.getRedirectUri(t.redirectUri),a={interactionType:i},o=Di.setRequestState(this.browserCrypto,t&&t.state||w.EMPTY_STRING,a),c=[{}],[4,this.initializeBaseRequest(t)];case 1:return s=Y.apply(void 0,[Y.apply(void 0,c.concat([d.sent()])),{redirectUri:n,state:o,nonce:t.nonce||this.browserCrypto.createNewGuid(),responseMode:y0.FRAGMENT}]),l=t.account||this.browserStorage.getActiveAccount(),l&&(this.logger.verbose("Setting validated request account",this.correlationId),this.logger.verbosePii("Setting validated request account: "+l.homeAccountId,this.correlationId),s.account=l),F.isEmpty(s.loginHint)&&!l&&(h=this.browserStorage.getLegacyLoginHint(),h&&(s.loginHint=h)),[2,s]}})})},e}(U_);/*! @azure/msal-browser v2.32.2 2023-01-10 */var o6=function(){function r(e,t,i,n){this.authModule=e,this.browserStorage=t,this.authCodeRequest=i,this.logger=n}return r.prototype.handleCodeResponseFromHash=function(e,t,i,n){return V(this,void 0,void 0,function(){var a,o,s;return S(this,function(c){if(this.logger.verbose("InteractionHandler.handleCodeResponse called"),F.isEmpty(e))throw R.createEmptyHashError(e);if(a=this.browserStorage.generateStateKey(t),o=this.browserStorage.getTemporaryCache(a),!o)throw j.createStateNotFoundError("Cached State");try{s=this.authModule.handleFragmentResponse(e,o)}catch(l){throw l instanceof Aa&&l.subError===L.userCancelledError.code?R.createUserCancelledError():l}return[2,this.handleCodeResponseFromServer(s,t,i,n)]})})},r.prototype.handleCodeResponseFromServer=function(e,t,i,n,a){return a===void 0&&(a=!0),V(this,void 0,void 0,function(){var o,s,c,l,h,d;return S(this,function(u){switch(u.label){case 0:if(this.logger.trace("InteractionHandler.handleCodeResponseFromServer called"),o=this.browserStorage.generateStateKey(t),s=this.browserStorage.getTemporaryCache(o),!s)throw j.createStateNotFoundError("Cached State");return c=this.browserStorage.generateNonceKey(s),l=this.browserStorage.getTemporaryCache(c),this.authCodeRequest.code=e.code,e.cloud_instance_host_name?[4,this.updateTokenEndpointAuthority(e.cloud_instance_host_name,i,n)]:[3,2];case 1:u.sent(),u.label=2;case 2:return a&&(e.nonce=l||void 0),e.state=s,e.client_info?this.authCodeRequest.clientInfo=e.client_info:(h=this.checkCcsCredentials(),h&&(this.authCodeRequest.ccsCredential=h)),[4,this.authModule.acquireToken(this.authCodeRequest,e)];case 3:return d=u.sent(),this.browserStorage.cleanRequestByState(t),[2,d]}})})},r.prototype.updateTokenEndpointAuthority=function(e,t,i){return V(this,void 0,void 0,function(){var n,a;return S(this,function(o){switch(o.label){case 0:return n="https://"+e+"/"+t.tenant+"/",[4,V0.createDiscoveredInstance(n,i,this.browserStorage,t.options,this.logger)];case 1:return a=o.sent(),this.authModule.updateAuthority(a),[2]}})})},r.prototype.checkCcsCredentials=function(){var e=this.browserStorage.getTemporaryCache(Ce.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},r}();/*! @azure/msal-browser v2.32.2 2023-01-10 */var Hm=function(r){Jt(e,r);function e(t,i,n,a,o){var s=r.call(this,t,i,n,a)||this;return s.browserCrypto=o,s}return e.prototype.initiateAuthRequest=function(t,i){return V(this,void 0,void 0,function(){var n,a;return S(this,function(o){switch(o.label){case 0:return this.logger.verbose("RedirectHandler.initiateAuthRequest called"),F.isEmpty(t)?[3,7]:(i.redirectStartPage&&(this.logger.verbose("RedirectHandler.initiateAuthRequest: redirectStartPage set, caching start page"),this.browserStorage.setTemporaryCache(Ce.ORIGIN_URI,i.redirectStartPage,!0)),this.browserStorage.setTemporaryCache(Ce.CORRELATION_ID,this.authCodeRequest.correlationId,!0),this.browserStorage.cacheCodeRequest(this.authCodeRequest,this.browserCrypto),this.logger.infoPii("RedirectHandler.initiateAuthRequest: Navigate to: "+t),n={apiId:je.acquireTokenRedirect,timeout:i.redirectTimeout,noHistory:!1},typeof i.onRedirectNavigate!="function"?[3,4]:(this.logger.verbose("RedirectHandler.initiateAuthRequest: Invoking onRedirectNavigate callback"),a=i.onRedirectNavigate(t),a===!1?[3,2]:(this.logger.verbose("RedirectHandler.initiateAuthRequest: onRedirectNavigate did not return false, navigating"),[4,i.navigationClient.navigateExternal(t,n)])));case 1:return o.sent(),[2];case 2:return this.logger.verbose("RedirectHandler.initiateAuthRequest: onRedirectNavigate returned false, stopping navigation"),[2];case 3:return[3,6];case 4:return this.logger.verbose("RedirectHandler.initiateAuthRequest: Navigating window to navigate url"),[4,i.navigationClient.navigateExternal(t,n)];case 5:return o.sent(),[2];case 6:return[3,8];case 7:throw this.logger.info("RedirectHandler.initiateAuthRequest: Navigate url is empty"),R.createEmptyNavigationUriError();case 8:return[2]}})})},e.prototype.handleCodeResponseFromHash=function(t,i,n,a){return V(this,void 0,void 0,function(){var o,s,c,l,h,d,u;return S(this,function(v){switch(v.label){case 0:if(this.logger.verbose("RedirectHandler.handleCodeResponse called"),F.isEmpty(t))throw R.createEmptyHashError(t);if(this.browserStorage.setInteractionInProgress(!1),o=this.browserStorage.generateStateKey(i),s=this.browserStorage.getTemporaryCache(o),!s)throw j.createStateNotFoundError("Cached State");try{c=this.authModule.handleFragmentResponse(t,s)}catch(m){throw m instanceof Aa&&m.subError===L.userCancelledError.code?R.createUserCancelledError():m}return l=this.browserStorage.generateNonceKey(s),h=this.browserStorage.getTemporaryCache(l),this.authCodeRequest.code=c.code,c.cloud_instance_host_name?[4,this.updateTokenEndpointAuthority(c.cloud_instance_host_name,n,a)]:[3,2];case 1:v.sent(),v.label=2;case 2:return c.nonce=h||void 0,c.state=s,c.client_info?this.authCodeRequest.clientInfo=c.client_info:(d=this.checkCcsCredentials(),d&&(this.authCodeRequest.ccsCredential=d)),[4,this.authModule.acquireToken(this.authCodeRequest,c)];case 3:return u=v.sent(),this.browserStorage.cleanRequestByState(i),[2,u]}})})},e}(o6);/*! @azure/msal-browser v2.32.2 2023-01-10 */var ie;(function(r){r.INITIALIZE_START="msal:initializeStart",r.INITIALIZE_END="msal:initializeEnd",r.ACCOUNT_ADDED="msal:accountAdded",r.ACCOUNT_REMOVED="msal:accountRemoved",r.LOGIN_START="msal:loginStart",r.LOGIN_SUCCESS="msal:loginSuccess",r.LOGIN_FAILURE="msal:loginFailure",r.ACQUIRE_TOKEN_START="msal:acquireTokenStart",r.ACQUIRE_TOKEN_SUCCESS="msal:acquireTokenSuccess",r.ACQUIRE_TOKEN_FAILURE="msal:acquireTokenFailure",r.ACQUIRE_TOKEN_NETWORK_START="msal:acquireTokenFromNetworkStart",r.SSO_SILENT_START="msal:ssoSilentStart",r.SSO_SILENT_SUCCESS="msal:ssoSilentSuccess",r.SSO_SILENT_FAILURE="msal:ssoSilentFailure",r.ACQUIRE_TOKEN_BY_CODE_START="msal:acquireTokenByCodeStart",r.ACQUIRE_TOKEN_BY_CODE_SUCCESS="msal:acquireTokenByCodeSuccess",r.ACQUIRE_TOKEN_BY_CODE_FAILURE="msal:acquireTokenByCodeFailure",r.HANDLE_REDIRECT_START="msal:handleRedirectStart",r.HANDLE_REDIRECT_END="msal:handleRedirectEnd",r.POPUP_OPENED="msal:popupOpened",r.LOGOUT_START="msal:logoutStart",r.LOGOUT_SUCCESS="msal:logoutSuccess",r.LOGOUT_FAILURE="msal:logoutFailure",r.LOGOUT_END="msal:logoutEnd"})(ie||(ie={}));/*! @azure/msal-browser v2.32.2 2023-01-10 */var an;(function(r){r.USER_INTERACTION_REQUIRED="USER_INTERACTION_REQUIRED",r.USER_CANCEL="USER_CANCEL",r.NO_NETWORK="NO_NETWORK",r.TRANSIENT_ERROR="TRANSIENT_ERROR",r.PERSISTENT_ERROR="PERSISTENT_ERROR",r.DISABLED="DISABLED",r.ACCOUNT_UNAVAILABLE="ACCOUNT_UNAVAILABLE"})(an||(an={}));var rs={extensionError:{code:"ContentError"},userSwitch:{code:"user_switch",desc:"User attempted to switch accounts in the native broker, which is not allowed. All new accounts must sign-in through the standard web flow first, please try again."},tokensNotFoundInCache:{code:"tokens_not_found_in_internal_memory_cache",desc:"Tokens not cached in MSAL JS internal memory, please make the WAM request"}},ii=function(r){Jt(e,r);function e(t,i,n){var a=r.call(this,t,i)||this;return Object.setPrototypeOf(a,e.prototype),a.name="NativeAuthError",a.ext=n,a}return e.prototype.isFatal=function(){if(this.ext&&this.ext.status&&(this.ext.status===an.PERSISTENT_ERROR||this.ext.status===an.DISABLED))return!0;switch(this.errorCode){case rs.extensionError.code:return!0;default:return!1}},e.createError=function(t,i,n){if(n&&n.status)switch(n.status){case an.ACCOUNT_UNAVAILABLE:return Tr.createNativeAccountUnavailableError();case an.USER_INTERACTION_REQUIRED:return new Tr(t,i);case an.USER_CANCEL:return R.createUserCancelledError();case an.NO_NETWORK:return R.createNoNetworkConnectivityError()}return new e(t,i,n)},e.createUserSwitchError=function(){return new e(rs.userSwitch.code,rs.userSwitch.desc)},e.createTokensNotFoundInCacheError=function(){return new e(rs.tokensNotFoundInCache.code,rs.tokensNotFoundInCache.desc)},e}(Q);/*! @azure/msal-browser v2.32.2 2023-01-10 */var F_=function(r){Jt(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.acquireToken=function(t){return V(this,void 0,void 0,function(){var i,n,a,o,s;return S(this,function(c){switch(c.label){case 0:return i=this.performanceClient.startMeasurement(St.SilentCacheClientAcquireToken,t.correlationId),n=this.initializeServerTelemetryManager(je.acquireTokenSilent_silentFlow),[4,this.createSilentFlowClient(n,t.authority,t.azureCloudOptions)];case 1:a=c.sent(),this.logger.verbose("Silent auth client created"),c.label=2;case 2:return c.trys.push([2,4,,5]),[4,a.acquireCachedToken(t)];case 3:return o=c.sent(),i.endMeasurement({success:!0,fromCache:!0}),[2,o];case 4:throw s=c.sent(),s instanceof R&&s.errorCode===L.signingKeyNotFoundInStorage.code&&this.logger.verbose("Signing keypair for bound access token not found. Refreshing bound access token and generating a new crypto keypair."),i.endMeasurement({errorCode:s instanceof Q&&s.errorCode||void 0,subErrorCode:s instanceof Q&&s.subError||void 0,success:!1}),s;case 5:return[2]}})})},e.prototype.logout=function(){return Promise.reject(R.createSilentLogoutUnsupportedError())},e.prototype.createSilentFlowClient=function(t,i,n){return V(this,void 0,void 0,function(){var a;return S(this,function(o){switch(o.label){case 0:return[4,this.getClientConfiguration(t,i,n)];case 1:return a=o.sent(),[2,new tH(a,this.performanceClient)]}})})},e.prototype.initializeSilentRequest=function(t,i){return V(this,void 0,void 0,function(){var n;return S(this,function(a){switch(a.label){case 0:return n=[Y({},t)],[4,this.initializeBaseRequest(t)];case 1:return[2,Y.apply(void 0,[Y.apply(void 0,n.concat([a.sent()])),{account:i,forceRefresh:t.forceRefresh||!1}])]}})})},e}(Lo);/*! @azure/msal-browser v2.32.2 2023-01-10 */var L2=function(r){Jt(e,r);function e(t,i,n,a,o,s,c,l,h,d,u,v){var m=r.call(this,t,i,n,a,o,s,l,h,v)||this;return m.apiId=c,m.accountId=d,m.nativeMessageHandler=h,m.nativeStorageManager=u,m.silentCacheClient=new F_(t,m.nativeStorageManager,n,a,o,s,l,h,v),m}return e.prototype.acquireToken=function(t){return V(this,void 0,void 0,function(){var i,n,a,o,s,c,l;return S(this,function(h){switch(h.label){case 0:return this.logger.trace("NativeInteractionClient - acquireToken called."),i=this.performanceClient.startMeasurement(St.NativeInteractionClientAcquireToken,t.correlationId),n=gr.nowSeconds(),[4,this.initializeNativeRequest(t)];case 1:a=h.sent(),h.label=2;case 2:return h.trys.push([2,4,,5]),[4,this.acquireTokensFromCache(this.accountId,a)];case 3:return o=h.sent(),i.endMeasurement({success:!0,isNativeBroker:!1,fromCache:!0}),[2,o];case 4:return h.sent(),this.logger.info("MSAL internal Cache does not contain tokens, proceed to make a native call"),[3,5];case 5:return s={method:Vi.GetToken,request:a},[4,this.nativeMessageHandler.sendMessage(s)];case 6:return c=h.sent(),l=this.validateNativeResponse(c),[2,this.handleNativeResponse(l,a,n).then(function(d){return i.endMeasurement({success:!0,isNativeBroker:!0,requestId:d.requestId}),d}).catch(function(d){throw i.endMeasurement({success:!1,errorCode:d.errorCode,subErrorCode:d.subError,isNativeBroker:!0}),d})]}})})},e.prototype.createSilentCacheRequest=function(t,i){return{authority:t.authority,correlationId:this.correlationId,scopes:g1.fromString(t.scope).asArray(),account:i,forceRefresh:!1}},e.prototype.acquireTokensFromCache=function(t,i){return V(this,void 0,void 0,function(){var n,a,o,s,c;return S(this,function(l){switch(l.label){case 0:if(n=this.browserStorage.readAccountFromCacheWithNativeAccountId(t),!n)throw j.createNoAccountFoundError();a=n.getAccountInfo(),l.label=1;case 1:return l.trys.push([1,3,,4]),o=this.createSilentCacheRequest(i,a),[4,this.silentCacheClient.acquireToken(o)];case 2:return s=l.sent(),[2,s];case 3:throw c=l.sent(),c;case 4:return[2]}})})},e.prototype.acquireTokenRedirect=function(t){return V(this,void 0,void 0,function(){var i,n,a,o,s,c;return S(this,function(l){switch(l.label){case 0:return this.logger.trace("NativeInteractionClient - acquireTokenRedirect called."),[4,this.initializeNativeRequest(t)];case 1:i=l.sent(),n={method:Vi.GetToken,request:i},l.label=2;case 2:return l.trys.push([2,4,,5]),[4,this.nativeMessageHandler.sendMessage(n)];case 3:return a=l.sent(),this.validateNativeResponse(a),[3,5];case 4:if(o=l.sent(),o instanceof ii&&o.isFatal())throw o;return[3,5];case 5:return this.browserStorage.setTemporaryCache(Ce.NATIVE_REQUEST,JSON.stringify(i),!0),s={apiId:je.acquireTokenRedirect,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},c=this.config.auth.navigateToLoginRequestUrl?window.location.href:this.getRedirectUri(t.redirectUri),[4,this.navigationClient.navigateExternal(c,s)];case 6:return l.sent(),[2]}})})},e.prototype.handleRedirectPromise=function(){return V(this,void 0,void 0,function(){var t,i,n,a,o,s,c,l;return S(this,function(h){switch(h.label){case 0:if(this.logger.trace("NativeInteractionClient - handleRedirectPromise called."),!this.browserStorage.isInteractionInProgress(!0))return this.logger.info("handleRedirectPromise called but there is no interaction in progress, returning null."),[2,null];if(t=this.browserStorage.getCachedNativeRequest(),!t)return this.logger.verbose("NativeInteractionClient - handleRedirectPromise called but there is no cached request, returning null."),[2,null];i=t.prompt,n=um(t,["prompt"]),i&&this.logger.verbose("NativeInteractionClient - handleRedirectPromise called and prompt was included in the original request, removing prompt from cached request to prevent second interaction with native broker window."),this.browserStorage.removeItem(this.browserStorage.generateCacheKey(Ce.NATIVE_REQUEST)),a={method:Vi.GetToken,request:n},o=gr.nowSeconds(),h.label=1;case 1:return h.trys.push([1,3,,4]),this.logger.verbose("NativeInteractionClient - handleRedirectPromise sending message to native broker."),[4,this.nativeMessageHandler.sendMessage(a)];case 2:return s=h.sent(),this.validateNativeResponse(s),c=this.handleNativeResponse(s,n,o),this.browserStorage.setInteractionInProgress(!1),[2,c];case 3:throw l=h.sent(),this.browserStorage.setInteractionInProgress(!1),l;case 4:return[2]}})})},e.prototype.logout=function(){return this.logger.trace("NativeInteractionClient - logout called."),Promise.reject("Logout not implemented yet")},e.prototype.handleNativeResponse=function(t,i,n){return V(this,void 0,void 0,function(){var a,o,s,c,l,h,d,u,v,m,f,C,_,p,z,M,A,I,N,U,Se=this;return S(this,function(ee){switch(ee.label){case 0:if(this.logger.trace("NativeInteractionClient - handleNativeResponse called."),a=this.getMATSFromResponse(t),this.performanceClient.addStaticFields({extensionId:this.nativeMessageHandler.getExtensionId(),extensionVersion:this.nativeMessageHandler.getExtensionVersion(),matsBrokerVersion:a?a.broker_version:void 0,matsAccountJoinOnStart:a?a.account_join_on_start:void 0,matsAccountJoinOnEnd:a?a.account_join_on_end:void 0,matsDeviceJoin:a?a.device_join:void 0,matsPromptBehavior:a?a.prompt_behavior:void 0,matsApiErrorCode:a?a.api_error_code:void 0,matsUiVisible:a?a.ui_visible:void 0,matsSilentCode:a?a.silent_code:void 0,matsSilentBiSubCode:a?a.silent_bi_sub_code:void 0,matsSilentMessage:a?a.silent_message:void 0,matsSilentStatus:a?a.silent_status:void 0,matsHttpStatus:a?a.http_status:void 0,matsHttpEventCount:a?a.http_event_count:void 0},this.correlationId),t.account.id!==i.accountId)throw ii.createUserSwitchError();return o=new ui(t.id_token||w.EMPTY_STRING,this.browserCrypto),[4,this.getDiscoveredAuthority(i.authority)];case 1:switch(s=ee.sent(),c=s.getPreferredCache(),l=Wt.generateHomeAccountId(t.client_info||w.EMPTY_STRING,ur.Default,this.logger,this.browserCrypto,o),h=Wt.createAccount(t.client_info,l,o,void 0,void 0,void 0,c,t.account.id),this.browserStorage.setAccount(h),d=t.scope?g1.fromString(t.scope):g1.fromString(i.scope),u=t.account.properties||{},v=u.UID||o.claims.oid||o.claims.sub||w.EMPTY_STRING,m=u.TenantId||o.claims.tid||w.EMPTY_STRING,C=Ie.BEARER,_=i.tokenType,_){case Ie.POP:return[3,2]}return[3,4];case 2:if(C=Ie.POP,t.shr)return this.logger.trace("handleNativeServerResponse: SHR is enabled in native layer"),f=t.shr,[3,5];if(p=new to(this.browserCrypto),z={resourceRequestMethod:i.resourceRequestMethod,resourceRequestUri:i.resourceRequestUri,shrClaims:i.shrClaims,shrNonce:i.shrNonce},!i.keyId)throw j.createKeyIdMissingError();return[4,p.signPopToken(t.access_token,i.keyId,z)];case 3:return f=ee.sent(),[3,5];case 4:f=t.access_token,ee.label=5;case 5:return M={authority:s.canonicalAuthority,uniqueId:v,tenantId:m,scopes:d.asArray(),account:h.getAccountInfo(),idToken:t.id_token,idTokenClaims:o.claims,accessToken:f,fromCache:a?this.isResponseFromCache(a):!1,expiresOn:new Date(Number(n+t.expires_in)*1e3),tokenType:C,correlationId:this.correlationId,state:t.state,fromNativeBroker:!0},A=kc.createIdTokenEntity(l,i.authority,t.id_token||w.EMPTY_STRING,i.clientId,o.claims.tid||w.EMPTY_STRING),this.nativeStorageManager.setIdTokenCredential(A),I=C===Ie.POP?w.SHR_NONCE_VALIDITY:(typeof t.expires_in=="string"?parseInt(t.expires_in,10):t.expires_in)||0,N=n+I,U=Ec.createAccessTokenEntity(l,i.authority,f,i.clientId,m,d.printScopes(),N,0,this.browserCrypto),this.nativeStorageManager.setAccessTokenCredential(U),this.browserStorage.removeAccountContext(h).catch(function(Xe){Se.logger.error("Error occurred while removing account context from browser storage. "+Xe)}),[2,M]}})})},e.prototype.validateNativeResponse=function(t){if(t.hasOwnProperty("access_token")&&t.hasOwnProperty("id_token")&&t.hasOwnProperty("client_info")&&t.hasOwnProperty("account")&&t.hasOwnProperty("scope")&&t.hasOwnProperty("expires_in"))return t;throw ii.createUnexpectedError("Response missing expected properties.")},e.prototype.getMATSFromResponse=function(t){if(t.properties.MATS)try{return JSON.parse(t.properties.MATS)}catch{this.logger.error("NativeInteractionClient - Error parsing MATS telemetry, returning null instead")}return null},e.prototype.isResponseFromCache=function(t){return typeof t.is_cached>"u"?(this.logger.verbose("NativeInteractionClient - MATS telemetry does not contain field indicating if response was served from cache. Returning false."),!1):!!t.is_cached},e.prototype.initializeNativeRequest=function(t){return V(this,void 0,void 0,function(){var i,n,a,o,s,c,l,h,d,u,v=this;return S(this,function(m){switch(m.label){case 0:return this.logger.trace("NativeInteractionClient - initializeNativeRequest called"),i=t.authority||this.config.auth.authority,n=new ke(i),n.validateAsUri(),a=t.scopes,o=um(t,["scopes"]),s=new g1(a||[]),s.appendScopes(rl),c=function(){switch(v.apiId){case je.ssoSilent:case je.acquireTokenSilent_silentFlow:return v.logger.trace("initializeNativeRequest: silent request sets prompt to none"),d1.NONE}if(!t.prompt){v.logger.trace("initializeNativeRequest: prompt was not provided");return}switch(t.prompt){case d1.NONE:case d1.CONSENT:case d1.LOGIN:return v.logger.trace("initializeNativeRequest: prompt is compatible with native flow"),t.prompt;default:throw v.logger.trace("initializeNativeRequest: prompt = "+t.prompt+" is not compatible with native flow"),R.createNativePromptParameterNotSupportedError()}},l=Y(Y({},o),{accountId:this.accountId,clientId:this.config.auth.clientId,authority:n.urlString,scope:s.printScopes(),redirectUri:this.getRedirectUri(t.redirectUri),prompt:c(),correlationId:this.correlationId,tokenType:t.authenticationScheme,windowTitleSubstring:document.title,extraParameters:Y(Y(Y({},t.extraQueryParameters),t.tokenQueryParameters),{telemetry:bs.MATS_TELEMETRY}),extendedExpiryToken:!1}),t.authenticationScheme!==Ie.POP?[3,2]:(h={resourceRequestUri:t.resourceRequestUri,resourceRequestMethod:t.resourceRequestMethod,shrClaims:t.shrClaims,shrNonce:t.shrNonce},d=new to(this.browserCrypto),[4,d.generateCnf(h)]);case 1:u=m.sent(),l.reqCnf=u.reqCnfHash,l.keyId=u.kid,m.label=2;case 2:return[2,l]}})})},e}(U_);/*! @azure/msal-browser v2.32.2 2023-01-10 */var ba=function(){function r(e,t,i){this.logger=e,this.handshakeTimeoutMs=t,this.extensionId=i,this.resolvers=new Map,this.handshakeResolvers=new Map,this.responseId=0,this.messageChannel=new MessageChannel,this.windowListener=this.onWindowMessage.bind(this)}return r.prototype.sendMessage=function(e){return V(this,void 0,void 0,function(){var t,i=this;return S(this,function(n){return this.logger.trace("NativeMessageHandler - sendMessage called."),t={channel:bs.CHANNEL_ID,extensionId:this.extensionId,responseId:this.responseId++,body:e},this.logger.trace("NativeMessageHandler - Sending request to browser extension"),this.logger.tracePii("NativeMessageHandler - Sending request to browser extension: "+JSON.stringify(t)),this.messageChannel.port1.postMessage(t),[2,new Promise(function(a,o){i.resolvers.set(t.responseId,{resolve:a,reject:o})})]})})},r.createProvider=function(e,t){return V(this,void 0,void 0,function(){var i,n;return S(this,function(a){switch(a.label){case 0:e.trace("NativeMessageHandler - createProvider called."),a.label=1;case 1:return a.trys.push([1,3,,5]),i=new r(e,t,bs.PREFERRED_EXTENSION_ID),[4,i.sendHandshakeRequest()];case 2:return a.sent(),[2,i];case 3:return a.sent(),n=new r(e,t),[4,n.sendHandshakeRequest()];case 4:return a.sent(),[2,n];case 5:return[2]}})})},r.prototype.sendHandshakeRequest=function(){return V(this,void 0,void 0,function(){var e,t=this;return S(this,function(i){return this.logger.trace("NativeMessageHandler - sendHandshakeRequest called."),window.addEventListener("message",this.windowListener,!1),e={channel:bs.CHANNEL_ID,extensionId:this.extensionId,responseId:this.responseId++,body:{method:Vi.HandshakeRequest}},this.messageChannel.port1.onmessage=function(n){t.onChannelMessage(n)},window.postMessage(e,window.origin,[this.messageChannel.port2]),[2,new Promise(function(n,a){t.handshakeResolvers.set(e.responseId,{resolve:n,reject:a}),t.timeoutId=window.setTimeout(function(){window.removeEventListener("message",t.windowListener,!1),t.messageChannel.port1.close(),t.messageChannel.port2.close(),a(R.createNativeHandshakeTimeoutError()),t.handshakeResolvers.delete(e.responseId)},t.handshakeTimeoutMs)})]})})},r.prototype.onWindowMessage=function(e){if(this.logger.trace("NativeMessageHandler - onWindowMessage called"),e.source===window){var t=e.data;if(!(!t.channel||t.channel!==bs.CHANNEL_ID)&&!(t.extensionId&&t.extensionId!==this.extensionId)&&t.body.method===Vi.HandshakeRequest){this.logger.verbose(t.extensionId?"Extension with id: "+t.extensionId+" not installed":"No extension installed"),clearTimeout(this.timeoutId),this.messageChannel.port1.close(),this.messageChannel.port2.close(),window.removeEventListener("message",this.windowListener,!1);var i=this.handshakeResolvers.get(t.responseId);i&&i.reject(R.createNativeExtensionNotInstalledError())}}},r.prototype.onChannelMessage=function(e){this.logger.trace("NativeMessageHandler - onChannelMessage called.");var t=e.data,i=this.resolvers.get(t.responseId),n=this.handshakeResolvers.get(t.responseId);try{var a=t.body.method;if(a===Vi.Response){if(!i)return;var o=t.body.response;if(this.logger.trace("NativeMessageHandler - Received response from browser extension"),this.logger.tracePii("NativeMessageHandler - Received response from browser extension: "+JSON.stringify(o)),o.status!=="Success")i.reject(ii.createError(o.code,o.description,o.ext));else if(o.result)o.result.code&&o.result.description?i.reject(ii.createError(o.result.code,o.result.description,o.result.ext)):i.resolve(o.result);else throw Q.createUnexpectedError("Event does not contain result.");this.resolvers.delete(t.responseId)}else if(a===Vi.HandshakeResponse){if(!n)return;clearTimeout(this.timeoutId),window.removeEventListener("message",this.windowListener,!1),this.extensionId=t.extensionId,this.extensionVersion=t.body.version,this.logger.verbose("NativeMessageHandler - Received HandshakeResponse from extension: "+this.extensionId),n.resolve(),this.handshakeResolvers.delete(t.responseId)}}catch(s){this.logger.error("Error parsing response from WAM Extension"),this.logger.errorPii("Error parsing response from WAM Extension: "+s.toString()),this.logger.errorPii("Unable to parse "+e),i?i.reject(s):n&&n.reject(s)}},r.prototype.getExtensionId=function(){return this.extensionId},r.prototype.getExtensionVersion=function(){return this.extensionVersion},r.isNativeAvailable=function(e,t,i,n){if(t.trace("isNativeAvailable called"),!e.system.allowNativeBroker)return t.trace("isNativeAvailable: allowNativeBroker is not enabled, returning false"),!1;if(!i)return t.trace("isNativeAvailable: WAM extension provider is not initialized, returning false"),!1;if(n)switch(n){case Ie.BEARER:case Ie.POP:return t.trace("isNativeAvailable: authenticationScheme is supported, returning true"),!0;default:return t.trace("isNativeAvailable: authenticationScheme is not supported, returning false"),!1}return!0},r}();/*! @azure/msal-browser v2.32.2 2023-01-10 */var fH=function(r){Jt(e,r);function e(t,i,n,a,o,s,c,l,h,d){var u=r.call(this,t,i,n,a,o,s,c,h,d)||this;return u.nativeStorage=l,u}return e.prototype.acquireToken=function(t){return V(this,void 0,void 0,function(){var i,n,a,o,s,c,l,h,d,u=this;return S(this,function(v){switch(v.label){case 0:return[4,this.initializeAuthorizationRequest(t,W.Redirect)];case 1:i=v.sent(),this.browserStorage.updateCacheEntries(i.state,i.nonce,i.authority,i.loginHint||w.EMPTY_STRING,i.account||null),n=this.initializeServerTelemetryManager(je.acquireTokenRedirect),a=function(m){m.persisted&&(u.logger.verbose("Page was restored from back/forward cache. Clearing temporary cache."),u.browserStorage.cleanRequestByState(i.state))},v.label=2;case 2:return v.trys.push([2,7,,8]),[4,this.initializeAuthorizationCodeRequest(i)];case 3:return o=v.sent(),[4,this.createAuthCodeClient(n,i.authority,i.azureCloudOptions)];case 4:return s=v.sent(),this.logger.verbose("Auth code client created"),c=new Hm(s,this.browserStorage,o,this.logger,this.browserCrypto),[4,s.getAuthCodeUrl(Y(Y({},i),{nativeBroker:ba.isNativeAvailable(this.config,this.logger,this.nativeMessageHandler,t.authenticationScheme)}))];case 5:return l=v.sent(),h=this.getRedirectStartPage(t.redirectStartPage),this.logger.verbosePii("Redirect start page: "+h),window.addEventListener("pageshow",a),[4,c.initiateAuthRequest(l,{navigationClient:this.navigationClient,redirectTimeout:this.config.system.redirectNavigationTimeout,redirectStartPage:h,onRedirectNavigate:t.onRedirectNavigate})];case 6:return[2,v.sent()];case 7:throw d=v.sent(),d instanceof Q&&d.setCorrelationId(this.correlationId),window.removeEventListener("pageshow",a),n.cacheFailedRequest(d),this.browserStorage.cleanRequestByState(i.state),d;case 8:return[2]}})})},e.prototype.handleRedirectPromise=function(t){return V(this,void 0,void 0,function(){var i,n,a,o,s,c,l,h,d,u,v,m;return S(this,function(f){switch(f.label){case 0:i=this.initializeServerTelemetryManager(je.handleRedirectPromise),f.label=1;case 1:if(f.trys.push([1,10,,11]),!this.browserStorage.isInteractionInProgress(!0))return this.logger.info("handleRedirectPromise called but there is no interaction in progress, returning null."),[2,null];if(n=this.getRedirectResponseHash(t||window.location.hash),!n)return this.logger.info("handleRedirectPromise did not detect a response hash as a result of a redirect. Cleaning temporary cache."),this.browserStorage.cleanRequestByInteractionType(W.Redirect),[2,null];a=void 0;try{o=ke.getDeserializedHash(n),a=this.validateAndExtractStateFromHash(o,W.Redirect),this.logger.verbose("State extracted from hash")}catch(C){return this.logger.info("handleRedirectPromise was unable to extract state due to: "+C),this.browserStorage.cleanRequestByInteractionType(W.Redirect),[2,null]}return s=this.browserStorage.getTemporaryCache(Ce.ORIGIN_URI,!0)||w.EMPTY_STRING,c=ke.removeHashFromUrl(s),l=ke.removeHashFromUrl(window.location.href),c===l&&this.config.auth.navigateToLoginRequestUrl?(this.logger.verbose("Current page is loginRequestUrl, handling hash"),[4,this.handleHash(n,a,i)]):[3,3];case 2:return h=f.sent(),s.indexOf("#")>-1&&lt.replaceHash(s),[2,h];case 3:return this.config.auth.navigateToLoginRequestUrl?[3,4]:(this.logger.verbose("NavigateToLoginRequestUrl set to false, handling hash"),[2,this.handleHash(n,a,i)]);case 4:return!lt.isInIframe()||this.config.system.allowRedirectInIframe?(this.browserStorage.setTemporaryCache(Ce.URL_HASH,n,!0),d={apiId:je.handleRedirectPromise,timeout:this.config.system.redirectNavigationTimeout,noHistory:!0},u=!0,!s||s==="null"?(v=lt.getHomepage(),this.browserStorage.setTemporaryCache(Ce.ORIGIN_URI,v,!0),this.logger.warning("Unable to get valid login request url from cache, redirecting to home page"),[4,this.navigationClient.navigateInternal(v,d)]):[3,6]):[3,9];case 5:return u=f.sent(),[3,8];case 6:return this.logger.verbose("Navigating to loginRequestUrl: "+s),[4,this.navigationClient.navigateInternal(s,d)];case 7:u=f.sent(),f.label=8;case 8:if(!u)return[2,this.handleHash(n,a,i)];f.label=9;case 9:return[2,null];case 10:throw m=f.sent(),m instanceof Q&&m.setCorrelationId(this.correlationId),i.cacheFailedRequest(m),this.browserStorage.cleanRequestByInteractionType(W.Redirect),m;case 11:return[2]}})})},e.prototype.getRedirectResponseHash=function(t){this.logger.verbose("getRedirectResponseHash called");var i=ke.hashContainsKnownProperties(t);if(i)return lt.clearHash(window),this.logger.verbose("Hash contains known properties, returning response hash"),t;var n=this.browserStorage.getTemporaryCache(Ce.URL_HASH,!0);return this.browserStorage.removeItem(this.browserStorage.generateCacheKey(Ce.URL_HASH)),this.logger.verbose("Hash does not contain known properties, returning cached hash"),n},e.prototype.handleHash=function(t,i,n){return V(this,void 0,void 0,function(){var a,o,s,c,l,h,d,u=this;return S(this,function(v){switch(v.label){case 0:if(a=this.browserStorage.getCachedRequest(i,this.browserCrypto),this.logger.verbose("handleHash called, retrieved cached request"),o=ke.getDeserializedHash(t),o.accountId){if(this.logger.verbose("Account id found in hash, calling WAM for token"),!this.nativeMessageHandler)throw R.createNativeConnectionNotEstablishedError();return s=new L2(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,je.acquireTokenPopup,this.performanceClient,this.nativeMessageHandler,o.accountId,this.browserStorage,a.correlationId),c=Di.parseRequestState(this.browserCrypto,i).userRequestState,[2,s.acquireToken(Y(Y({},a),{state:c,prompt:void 0})).finally(function(){u.browserStorage.cleanRequestByState(i)})]}if(l=this.browserStorage.getCachedAuthority(i),!l)throw R.createNoCachedAuthorityError();return[4,this.createAuthCodeClient(n,l)];case 1:return h=v.sent(),this.logger.verbose("Auth code client created"),H0.removeThrottle(this.browserStorage,this.config.auth.clientId,a),d=new Hm(h,this.browserStorage,a,this.logger,this.browserCrypto),[4,d.handleCodeResponseFromHash(t,i,h.authority,this.networkClient)];case 2:return[2,v.sent()]}})})},e.prototype.logout=function(t){return V(this,void 0,void 0,function(){var i,n,a,o,s,c,l;return S(this,function(h){switch(h.label){case 0:this.logger.verbose("logoutRedirect called"),i=this.initializeLogoutRequest(t),n=this.initializeServerTelemetryManager(je.logout),h.label=1;case 1:return h.trys.push([1,10,,11]),this.eventHandler.emitEvent(ie.LOGOUT_START,W.Redirect,t),[4,this.clearCacheOnLogout(i.account)];case 2:return h.sent(),a={apiId:je.logout,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},[4,this.createAuthCodeClient(n,t&&t.authority)];case 3:return o=h.sent(),this.logger.verbose("Auth code client created"),s=o.getLogoutUri(i),this.eventHandler.emitEvent(ie.LOGOUT_SUCCESS,W.Redirect,i),t&&typeof t.onRedirectNavigate=="function"?(c=t.onRedirectNavigate(s),c===!1?[3,5]:(this.logger.verbose("Logout onRedirectNavigate did not return false, navigating"),this.browserStorage.getInteractionInProgress()||this.browserStorage.setInteractionInProgress(!0),[4,this.navigationClient.navigateExternal(s,a)])):[3,7];case 4:return h.sent(),[2];case 5:this.browserStorage.setInteractionInProgress(!1),this.logger.verbose("Logout onRedirectNavigate returned false, stopping navigation"),h.label=6;case 6:return[3,9];case 7:return this.browserStorage.getInteractionInProgress()||this.browserStorage.setInteractionInProgress(!0),[4,this.navigationClient.navigateExternal(s,a)];case 8:return h.sent(),[2];case 9:return[3,11];case 10:throw l=h.sent(),l instanceof Q&&l.setCorrelationId(this.correlationId),n.cacheFailedRequest(l),this.eventHandler.emitEvent(ie.LOGOUT_FAILURE,W.Redirect,null,l),this.eventHandler.emitEvent(ie.LOGOUT_END,W.Redirect),l;case 11:return this.eventHandler.emitEvent(ie.LOGOUT_END,W.Redirect),[2]}})})},e.prototype.getRedirectStartPage=function(t){var i=t||window.location.href;return ke.getAbsoluteUrl(i,lt.getCurrentUri())},e}(Lo);/*! @azure/msal-browser v2.32.2 2023-01-10 */var pH=function(r){Jt(e,r);function e(t,i,n,a,o,s,c,l,h,d){var u=r.call(this,t,i,n,a,o,s,c,h,d)||this;return u.unloadWindow=u.unloadWindow.bind(u),u.nativeStorage=l,u}return e.prototype.acquireToken=function(t){try{var i=this.generatePopupName(t.scopes||rl,t.authority||this.config.auth.authority),n=t.popupWindowAttributes||{};if(this.config.system.asyncPopups)return this.logger.verbose("asyncPopups set to true, acquiring token"),this.acquireTokenPopupAsync(t,i,n);this.logger.verbose("asyncPopup set to false, opening popup before acquiring token");var a=this.openSizedPopup("about:blank",i,n);return this.acquireTokenPopupAsync(t,i,n,a)}catch(o){return Promise.reject(o)}},e.prototype.logout=function(t){try{this.logger.verbose("logoutPopup called");var i=this.initializeLogoutRequest(t),n=this.generateLogoutPopupName(i),a=t&&t.authority,o=t&&t.mainWindowRedirectUri,s=(t==null?void 0:t.popupWindowAttributes)||{};if(this.config.system.asyncPopups)return this.logger.verbose("asyncPopups set to true"),this.logoutPopupAsync(i,n,s,a,void 0,o);this.logger.verbose("asyncPopup set to false, opening popup");var c=this.openSizedPopup("about:blank",n,s);return this.logoutPopupAsync(i,n,s,a,c,o)}catch(l){return Promise.reject(l)}},e.prototype.acquireTokenPopupAsync=function(t,i,n,a){return V(this,void 0,void 0,function(){var o,s,c,l,h,d,u,v,m,f,C,_,p,z,M,A,I,N=this;return S(this,function(U){switch(U.label){case 0:return this.logger.verbose("acquireTokenPopupAsync called"),o=this.initializeServerTelemetryManager(je.acquireTokenPopup),[4,this.initializeAuthorizationRequest(t,W.Popup)];case 1:s=U.sent(),this.browserStorage.updateCacheEntries(s.state,s.nonce,s.authority,s.loginHint||w.EMPTY_STRING,s.account||null),U.label=2;case 2:return U.trys.push([2,8,,9]),[4,this.initializeAuthorizationCodeRequest(s)];case 3:return c=U.sent(),[4,this.createAuthCodeClient(o,s.authority,s.azureCloudOptions)];case 4:return l=U.sent(),this.logger.verbose("Auth code client created"),h=ba.isNativeAvailable(this.config,this.logger,this.nativeMessageHandler,t.authenticationScheme),d=void 0,h&&(d=this.performanceClient.startMeasurement(St.FetchAccountIdWithNativeBroker,t.correlationId)),[4,l.getAuthCodeUrl(Y(Y({},s),{nativeBroker:h}))];case 5:return u=U.sent(),v=new o6(l,this.browserStorage,c,this.logger),m={popup:a,popupName:i,popupWindowAttributes:n},f=this.initiateAuthRequest(u,m),this.eventHandler.emitEvent(ie.POPUP_OPENED,W.Popup,{popupWindow:f},null),[4,this.monitorPopupForHash(f)];case 6:if(C=U.sent(),_=ke.getDeserializedHash(C),p=this.validateAndExtractStateFromHash(_,W.Popup,s.correlationId),H0.removeThrottle(this.browserStorage,this.config.auth.clientId,c),_.accountId){if(this.logger.verbose("Account id found in hash, calling WAM for token"),d&&d.endMeasurement({success:!0,isNativeBroker:!0}),!this.nativeMessageHandler)throw R.createNativeConnectionNotEstablishedError();return z=new L2(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,je.acquireTokenPopup,this.performanceClient,this.nativeMessageHandler,_.accountId,this.nativeStorage,s.correlationId),M=Di.parseRequestState(this.browserCrypto,p).userRequestState,[2,z.acquireToken(Y(Y({},s),{state:M,prompt:void 0})).finally(function(){N.browserStorage.cleanRequestByState(p)})]}return[4,v.handleCodeResponseFromHash(C,p,l.authority,this.networkClient)];case 7:return A=U.sent(),[2,A];case 8:throw I=U.sent(),a&&a.close(),I instanceof Q&&I.setCorrelationId(this.correlationId),o.cacheFailedRequest(I),this.browserStorage.cleanRequestByState(s.state),I;case 9:return[2]}})})},e.prototype.logoutPopupAsync=function(t,i,n,a,o,s){return V(this,void 0,void 0,function(){var c,l,h,d,u,v,m;return S(this,function(f){switch(f.label){case 0:this.logger.verbose("logoutPopupAsync called"),this.eventHandler.emitEvent(ie.LOGOUT_START,W.Popup,t),c=this.initializeServerTelemetryManager(je.logoutPopup),f.label=1;case 1:return f.trys.push([1,5,,6]),[4,this.clearCacheOnLogout(t.account)];case 2:return f.sent(),[4,this.createAuthCodeClient(c,a)];case 3:return l=f.sent(),this.logger.verbose("Auth code client created"),h=l.getLogoutUri(t),this.eventHandler.emitEvent(ie.LOGOUT_SUCCESS,W.Popup,t),d=this.openPopup(h,{popupName:i,popupWindowAttributes:n,popup:o}),this.eventHandler.emitEvent(ie.POPUP_OPENED,W.Popup,{popupWindow:d},null),[4,this.waitForLogoutPopup(d)];case 4:return f.sent(),s?(u={apiId:je.logoutPopup,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},v=ke.getAbsoluteUrl(s,lt.getCurrentUri()),this.logger.verbose("Redirecting main window to url specified in the request"),this.logger.verbosePii("Redirecting main window to: "+v),this.navigationClient.navigateInternal(v,u)):this.logger.verbose("No main window navigation requested"),[3,6];case 5:throw m=f.sent(),o&&o.close(),m instanceof Q&&m.setCorrelationId(this.correlationId),this.browserStorage.setInteractionInProgress(!1),this.eventHandler.emitEvent(ie.LOGOUT_FAILURE,W.Popup,null,m),this.eventHandler.emitEvent(ie.LOGOUT_END,W.Popup),c.cacheFailedRequest(m),m;case 6:return this.eventHandler.emitEvent(ie.LOGOUT_END,W.Popup),[2]}})})},e.prototype.initiateAuthRequest=function(t,i){if(F.isEmpty(t))throw this.logger.error("Navigate url is empty"),R.createEmptyNavigationUriError();return this.logger.infoPii("Navigate to: "+t),this.openPopup(t,i)},e.prototype.monitorPopupForHash=function(t){var i=this;return new Promise(function(n,a){var o=i.config.system.windowHashTimeout/i.config.system.pollIntervalMilliseconds,s=0;i.logger.verbose("PopupHandler.monitorPopupForHash - polling started");var c=setInterval(function(){if(t.closed){i.logger.error("PopupHandler.monitorPopupForHash - window closed"),i.cleanPopup(),clearInterval(c),a(R.createUserCancelledError());return}var l=w.EMPTY_STRING,h=w.EMPTY_STRING;try{l=t.location.href,h=t.location.hash}catch{}F.isEmpty(l)||l==="about:blank"||(i.logger.verbose("PopupHandler.monitorPopupForHash - popup window is on same origin as caller"),s++,h?(i.logger.verbose("PopupHandler.monitorPopupForHash - found hash in url"),clearInterval(c),i.cleanPopup(t),ke.hashContainsKnownProperties(h)?(i.logger.verbose("PopupHandler.monitorPopupForHash - hash contains known properties, returning."),n(h)):(i.logger.error("PopupHandler.monitorPopupForHash - found hash in url but it does not contain known properties. Check that your router is not changing the hash prematurely."),i.logger.errorPii("PopupHandler.monitorPopupForHash - hash found: "+h),a(R.createHashDoesNotContainKnownPropertiesError()))):s>o&&(i.logger.error("PopupHandler.monitorPopupForHash - unable to find hash in url, timing out"),clearInterval(c),a(R.createMonitorPopupTimeoutError())))},i.config.system.pollIntervalMilliseconds)})},e.prototype.waitForLogoutPopup=function(t){var i=this;return new Promise(function(n){i.logger.verbose("PopupHandler.waitForLogoutPopup - polling started");var a=setInterval(function(){t.closed&&(i.logger.error("PopupHandler.waitForLogoutPopup - window closed"),i.cleanPopup(),clearInterval(a),n());var o=w.EMPTY_STRING;try{o=t.location.href}catch{}F.isEmpty(o)||o==="about:blank"||(i.logger.verbose("PopupHandler.waitForLogoutPopup - popup window is on same origin as caller, closing."),clearInterval(a),i.cleanPopup(t),n())},i.config.system.pollIntervalMilliseconds)})},e.prototype.openPopup=function(t,i){try{var n=void 0;if(i.popup?(n=i.popup,this.logger.verbosePii("Navigating popup window to: "+t),n.location.assign(t)):typeof i.popup>"u"&&(this.logger.verbosePii("Opening popup window to: "+t),n=this.openSizedPopup(t,i.popupName,i.popupWindowAttributes)),!n)throw R.createEmptyWindowCreatedError();return n.focus&&n.focus(),this.currentWindow=n,window.addEventListener("beforeunload",this.unloadWindow),n}catch(a){throw this.logger.error("error opening popup "+a.message),this.browserStorage.setInteractionInProgress(!1),R.createPopupWindowError(a.toString())}},e.prototype.openSizedPopup=function(t,i,n){var a,o,s,c,l=window.screenLeft?window.screenLeft:window.screenX,h=window.screenTop?window.screenTop:window.screenY,d=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,u=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,v=(a=n.popupSize)===null||a===void 0?void 0:a.width,m=(o=n.popupSize)===null||o===void 0?void 0:o.height,f=(s=n.popupPosition)===null||s===void 0?void 0:s.top,C=(c=n.popupPosition)===null||c===void 0?void 0:c.left;return(!v||v<0||v>d)&&(this.logger.verbose("Default popup window width used. Window width not configured or invalid."),v=$r.POPUP_WIDTH),(!m||m<0||m>u)&&(this.logger.verbose("Default popup window height used. Window height not configured or invalid."),m=$r.POPUP_HEIGHT),(!f||f<0||f>u)&&(this.logger.verbose("Default popup window top position used. Window top not configured or invalid."),f=Math.max(0,u/2-$r.POPUP_HEIGHT/2+h)),(!C||C<0||C>d)&&(this.logger.verbose("Default popup window left position used. Window left not configured or invalid."),C=Math.max(0,d/2-$r.POPUP_WIDTH/2+l)),window.open(t,i,"width="+v+", height="+m+", top="+f+", left="+C+", scrollbars=yes")},e.prototype.unloadWindow=function(t){this.browserStorage.cleanRequestByInteractionType(W.Popup),this.currentWindow&&this.currentWindow.close(),t.preventDefault()},e.prototype.cleanPopup=function(t){t&&t.close(),window.removeEventListener("beforeunload",this.unloadWindow),this.browserStorage.setInteractionInProgress(!1)},e.prototype.generatePopupName=function(t,i){return $r.POPUP_NAME_PREFIX+"."+this.config.auth.clientId+"."+t.join("-")+"."+i+"."+this.correlationId},e.prototype.generateLogoutPopupName=function(t){var i=t.account&&t.account.homeAccountId;return $r.POPUP_NAME_PREFIX+"."+this.config.auth.clientId+"."+i+"."+this.correlationId},e}(Lo);/*! @azure/msal-browser v2.32.2 2023-01-10 */var gH=function(){function r(){}return r.prototype.navigateInternal=function(e,t){return r.defaultNavigateWindow(e,t)},r.prototype.navigateExternal=function(e,t){return r.defaultNavigateWindow(e,t)},r.defaultNavigateWindow=function(e,t){return t.noHistory?window.location.replace(e):window.location.assign(e),new Promise(function(i){setTimeout(function(){i(!0)},t.timeout)})},r}();/*! @azure/msal-browser v2.32.2 2023-01-10 */var _H=6e4,J3=6e3,zH=3e4,yH=2e3;function wH(r,e){var t=r.auth,i=r.cache,n=r.system,a=r.telemetry,o={clientId:w.EMPTY_STRING,authority:""+w.DEFAULT_AUTHORITY,knownAuthorities:[],cloudDiscoveryMetadata:w.EMPTY_STRING,authorityMetadata:w.EMPTY_STRING,redirectUri:w.EMPTY_STRING,postLogoutRedirectUri:w.EMPTY_STRING,navigateToLoginRequestUrl:!0,clientCapabilities:[],protocolMode:P0.AAD,azureCloudOptions:{azureCloudInstance:Cc.None,tenant:w.EMPTY_STRING},skipAuthorityMetadataCache:!1},s={cacheLocation:c1.SessionStorage,storeAuthStateInCookie:!1,secureCookies:!1},c={loggerCallback:function(){},logLevel:ot.Info,piiLoggingEnabled:!1},l=Y(Y({},L_),{loggerOptions:c,networkClient:e?lt.getBrowserNetworkClient():oH,navigationClient:new gH,loadFrameTimeout:0,windowHashTimeout:(n==null?void 0:n.loadFrameTimeout)||_H,iframeHashTimeout:(n==null?void 0:n.loadFrameTimeout)||J3,navigateFrameWait:e&&lt.detectIEOrEdge()?500:0,redirectNavigationTimeout:zH,asyncPopups:!1,allowRedirectInIframe:!1,allowNativeBroker:!1,nativeBrokerHandshakeTimeout:(n==null?void 0:n.nativeBrokerHandshakeTimeout)||yH,pollIntervalMilliseconds:$r.DEFAULT_POLL_INTERVAL_MS,cryptoOptions:{useMsrCrypto:!1,entropy:void 0}}),h=Y(Y({},n),{loggerOptions:(n==null?void 0:n.loggerOptions)||c}),d={application:{appName:w.EMPTY_STRING,appVersion:w.EMPTY_STRING}},u={auth:Y(Y({},o),t),cache:Y(Y({},s),i),system:Y(Y({},l),h),telemetry:Y(Y({},d),a)};return u}/*! @azure/msal-browser v2.32.2 2023-01-10 */var B_=function(r){Jt(e,r);function e(t,i,n,a,o){var s=r.call(this,t,i,n,a)||this;return s.navigateFrameWait=o.navigateFrameWait,s.pollIntervalMilliseconds=o.pollIntervalMilliseconds,s}return e.prototype.initiateAuthRequest=function(t){return V(this,void 0,void 0,function(){var i;return S(this,function(n){switch(n.label){case 0:if(F.isEmpty(t))throw this.logger.info("Navigate url is empty"),R.createEmptyNavigationUriError();return this.navigateFrameWait?[4,this.loadFrame(t)]:[3,2];case 1:return i=n.sent(),[3,3];case 2:i=this.loadFrameSync(t),n.label=3;case 3:return[2,i]}})})},e.prototype.monitorIframeForHash=function(t,i){var n=this;return new Promise(function(a,o){i<J3&&n.logger.warning("system.loadFrameTimeout or system.iframeHashTimeout set to lower ("+i+"ms) than the default ("+J3+"ms). This may result in timeouts.");var s=window.performance.now(),c=s+i,l=setInterval(function(){if(window.performance.now()>c){n.removeHiddenIframe(t),clearInterval(l),o(R.createMonitorIframeTimeoutError());return}var h=w.EMPTY_STRING,d=t.contentWindow;try{h=d?d.location.href:w.EMPTY_STRING}catch{}if(!F.isEmpty(h)){var u=d?d.location.hash:w.EMPTY_STRING;if(ke.hashContainsKnownProperties(u)){n.removeHiddenIframe(t),clearInterval(l),a(u);return}}},n.pollIntervalMilliseconds)})},e.prototype.loadFrame=function(t){var i=this;return new Promise(function(n,a){var o=i.createHiddenIframe();setTimeout(function(){if(!o){a("Unable to load iframe");return}o.src=t,n(o)},i.navigateFrameWait)})},e.prototype.loadFrameSync=function(t){var i=this.createHiddenIframe();return i.src=t,i},e.prototype.createHiddenIframe=function(){var t=document.createElement("iframe");return t.style.visibility="hidden",t.style.position="absolute",t.style.width=t.style.height="0",t.style.border="0",t.setAttribute("sandbox","allow-scripts allow-same-origin allow-forms"),document.getElementsByTagName("body")[0].appendChild(t),t},e.prototype.removeHiddenIframe=function(t){document.body===t.parentNode&&document.body.removeChild(t)},e}(o6);/*! @azure/msal-browser v2.32.2 2023-01-10 */var bH=function(r){Jt(e,r);function e(t,i,n,a,o,s,c,l,h,d,u){var v=r.call(this,t,i,n,a,o,s,l,d,u)||this;return v.apiId=c,v.nativeStorage=h,v}return e.prototype.acquireToken=function(t){return V(this,void 0,void 0,function(){var i,n,a,o,s;return S(this,function(c){switch(c.label){case 0:if(this.logger.verbose("acquireTokenByIframe called"),i=this.performanceClient.startMeasurement(St.SilentIframeClientAcquireToken,t.correlationId),F.isEmpty(t.loginHint)&&F.isEmpty(t.sid)&&(!t.account||F.isEmpty(t.account.username))&&this.logger.warning("No user hint provided. The authorization server may need more information to complete this request."),t.prompt&&t.prompt!==d1.NONE&&t.prompt!==d1.NO_SESSION)throw i.endMeasurement({success:!1}),R.createSilentPromptValueError(t.prompt);return[4,this.initializeAuthorizationRequest(Y(Y({},t),{prompt:t.prompt||d1.NONE}),W.Silent)];case 1:n=c.sent(),this.browserStorage.updateCacheEntries(n.state,n.nonce,n.authority,n.loginHint||w.EMPTY_STRING,n.account||null),a=this.initializeServerTelemetryManager(this.apiId),c.label=2;case 2:return c.trys.push([2,5,,6]),[4,this.createAuthCodeClient(a,n.authority,n.azureCloudOptions)];case 3:return o=c.sent(),this.logger.verbose("Auth code client created"),[4,this.silentTokenHelper(o,n).then(function(l){return i.endMeasurement({success:!0,fromCache:!1,requestId:l.requestId}),l})];case 4:return[2,c.sent()];case 5:throw s=c.sent(),s instanceof Q&&s.setCorrelationId(this.correlationId),a.cacheFailedRequest(s),this.browserStorage.cleanRequestByState(n.state),i.endMeasurement({errorCode:s instanceof Q&&s.errorCode||void 0,subErrorCode:s instanceof Q&&s.subError||void 0,success:!1}),s;case 6:return[2]}})})},e.prototype.logout=function(){return Promise.reject(R.createSilentLogoutUnsupportedError())},e.prototype.silentTokenHelper=function(t,i){return V(this,void 0,void 0,function(){var n,a,o,s,c,l,h,d,u,v=this;return S(this,function(m){switch(m.label){case 0:return[4,this.initializeAuthorizationCodeRequest(i)];case 1:return n=m.sent(),[4,t.getAuthCodeUrl(Y(Y({},i),{nativeBroker:ba.isNativeAvailable(this.config,this.logger,this.nativeMessageHandler,i.authenticationScheme)}))];case 2:return a=m.sent(),o=new B_(t,this.browserStorage,n,this.logger,this.config.system),[4,o.initiateAuthRequest(a)];case 3:return s=m.sent(),[4,o.monitorIframeForHash(s,this.config.system.iframeHashTimeout)];case 4:if(c=m.sent(),l=ke.getDeserializedHash(c),h=this.validateAndExtractStateFromHash(l,W.Silent,n.correlationId),l.accountId){if(this.logger.verbose("Account id found in hash, calling WAM for token"),!this.nativeMessageHandler)throw R.createNativeConnectionNotEstablishedError();return d=new L2(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.apiId,this.performanceClient,this.nativeMessageHandler,l.accountId,this.browserStorage,this.correlationId),u=Di.parseRequestState(this.browserCrypto,h).userRequestState,[2,d.acquireToken(Y(Y({},i),{state:u,prompt:i.prompt||d1.NONE})).finally(function(){v.browserStorage.cleanRequestByState(h)})]}return[2,o.handleCodeResponseFromHash(c,h,t.authority,this.networkClient)]}})})},e}(Lo);/*! @azure/msal-browser v2.32.2 2023-01-10 */var xH=function(r){Jt(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.acquireToken=function(t){return V(this,void 0,void 0,function(){var i,n,a,o,s,c=this;return S(this,function(l){switch(l.label){case 0:return n=[Y({},t)],[4,this.initializeBaseRequest(t)];case 1:return i=Y.apply(void 0,n.concat([l.sent()])),a=this.performanceClient.startMeasurement(St.SilentRefreshClientAcquireToken,i.correlationId),o=this.initializeServerTelemetryManager(je.acquireTokenSilent_silentFlow),[4,this.createRefreshTokenClient(o,i.authority,i.azureCloudOptions)];case 2:return s=l.sent(),this.logger.verbose("Refresh token client created"),[2,s.acquireTokenByRefreshToken(i).then(function(h){return a.endMeasurement({success:!0,fromCache:h.fromCache,requestId:h.requestId}),h}).catch(function(h){throw h instanceof Q&&h.setCorrelationId(c.correlationId),o.cacheFailedRequest(h),a.endMeasurement({errorCode:h.errorCode,subErrorCode:h.subError,success:!1}),h})]}})})},e.prototype.logout=function(){return Promise.reject(R.createSilentLogoutUnsupportedError())},e.prototype.createRefreshTokenClient=function(t,i,n){return V(this,void 0,void 0,function(){var a;return S(this,function(o){switch(o.label){case 0:return[4,this.getClientConfiguration(t,i,n)];case 1:return a=o.sent(),[2,new I_(a,this.performanceClient)]}})})},e}(Lo);/*! @azure/msal-browser v2.32.2 2023-01-10 */var MH=function(){function r(e,t){this.eventCallbacks=new Map,this.logger=e,this.browserCrypto=t,this.listeningToStorageEvents=!1,this.handleAccountCacheChange=this.handleAccountCacheChange.bind(this)}return r.prototype.addEventCallback=function(e){if(typeof window<"u"){var t=this.browserCrypto.createNewGuid();return this.eventCallbacks.set(t,e),this.logger.verbose("Event callback registered with id: "+t),t}return null},r.prototype.removeEventCallback=function(e){this.eventCallbacks.delete(e),this.logger.verbose("Event callback "+e+" removed.")},r.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)))},r.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."))},r.prototype.emitEvent=function(e,t,i,n){var a=this;if(typeof window<"u"){var o={eventType:e,interactionType:t||null,payload:i||null,error:n||null,timestamp:Date.now()};this.logger.info("Emitting event: "+e),this.eventCallbacks.forEach(function(s,c){a.logger.verbose("Emitting event to callback "+c+": "+e),s.apply(null,[o])})}},r.prototype.handleAccountCacheChange=function(e){try{var t=e.newValue||e.oldValue;if(!t)return;var i=JSON.parse(t);if(typeof i!="object"||!Wt.isAccountEntity(i))return;var n=Pr.toObject(new Wt,i),a=n.getAccountInfo();!e.oldValue&&e.newValue?(this.logger.info("Account was added to cache in a different window"),this.emitEvent(ie.ACCOUNT_ADDED,void 0,a)):!e.newValue&&e.oldValue&&(this.logger.info("Account was removed from cache in a different window"),this.emitEvent(ie.ACCOUNT_REMOVED,void 0,a))}catch{return}},r}();/*! @azure/msal-browser v2.32.2 2023-01-10 */var a1=function(){function r(){}return r.decimalToHex=function(e){for(var t=e.toString(16);t.length<2;)t="0"+t;return t},r}();/*! @azure/msal-browser v2.32.2 2023-01-10 */var j_=function(){function r(e){this.cryptoObj=e}return r.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,a1.decimalToHex(e[0])+a1.decimalToHex(e[1])+a1.decimalToHex(e[2])+a1.decimalToHex(e[3])+"-"+a1.decimalToHex(e[4])+a1.decimalToHex(e[5])+"-"+a1.decimalToHex(e[6])+a1.decimalToHex(e[7])+"-"+a1.decimalToHex(e[8])+a1.decimalToHex(e[9])+"-"+a1.decimalToHex(e[10])+a1.decimalToHex(e[11])+a1.decimalToHex(e[12])+a1.decimalToHex(e[13])+a1.decimalToHex(e[14])+a1.decimalToHex(e[15])}catch{for(var t="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx",i="0123456789abcdef",n=0,a=w.EMPTY_STRING,o=0;o<36;o++)t[o]!=="-"&&t[o]!=="4"&&(n=Math.random()*16|0),t[o]==="x"?a+=i[n]:t[o]==="y"?(n&=3,n|=8,a+=i[n]):a+=t[o];return a}},r.prototype.isGuid=function(e){var t=/^[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 t.test(e)},r}();/*! @azure/msal-browser v2.32.2 2023-01-10 */var Li=function(){function r(){}return r.stringToUtf8Arr=function(e){for(var t,i=0,n=e.length,a=0;a<n;a++)t=e.charCodeAt(a),i+=t<128?1:t<2048?2:t<65536?3:t<2097152?4:t<67108864?5:6;for(var o=new Uint8Array(i),s=0,c=0;s<i;c++)t=e.charCodeAt(c),t<128?o[s++]=t:t<2048?(o[s++]=192+(t>>>6),o[s++]=128+(t&63)):t<65536?(o[s++]=224+(t>>>12),o[s++]=128+(t>>>6&63),o[s++]=128+(t&63)):t<2097152?(o[s++]=240+(t>>>18),o[s++]=128+(t>>>12&63),o[s++]=128+(t>>>6&63),o[s++]=128+(t&63)):t<67108864?(o[s++]=248+(t>>>24),o[s++]=128+(t>>>18&63),o[s++]=128+(t>>>12&63),o[s++]=128+(t>>>6&63),o[s++]=128+(t&63)):(o[s++]=252+(t>>>30),o[s++]=128+(t>>>24&63),o[s++]=128+(t>>>18&63),o[s++]=128+(t>>>12&63),o[s++]=128+(t>>>6&63),o[s++]=128+(t&63));return o},r.stringToArrayBuffer=function(e){for(var t=new ArrayBuffer(e.length),i=new Uint8Array(t),n=0;n<e.length;n++)i[n]=e.charCodeAt(n);return t},r.utf8ArrToString=function(e){for(var t=w.EMPTY_STRING,i=void 0,n=e.length,a=0;a<n;a++)i=e[a],t+=String.fromCharCode(i>251&&i<254&&a+5<n?(i-252)*1073741824+(e[++a]-128<<24)+(e[++a]-128<<18)+(e[++a]-128<<12)+(e[++a]-128<<6)+e[++a]-128:i>247&&i<252&&a+4<n?(i-248<<24)+(e[++a]-128<<18)+(e[++a]-128<<12)+(e[++a]-128<<6)+e[++a]-128:i>239&&i<248&&a+3<n?(i-240<<18)+(e[++a]-128<<12)+(e[++a]-128<<6)+e[++a]-128:i>223&&i<240&&a+2<n?(i-224<<12)+(e[++a]-128<<6)+e[++a]-128:i>191&&i<224&&a+1<n?(i-192<<6)+e[++a]-128:i);return t},r.getSortedObjectString=function(e){return JSON.stringify(e,Object.keys(e).sort())},r}();/*! @azure/msal-browser v2.32.2 2023-01-10 */var q_=function(){function r(){}return r.prototype.urlEncode=function(e){return encodeURIComponent(this.encode(e).replace(/=/g,w.EMPTY_STRING).replace(/\+/g,"-").replace(/\//g,"_"))},r.prototype.urlEncodeArr=function(e){return this.base64EncArr(e).replace(/=/g,w.EMPTY_STRING).replace(/\+/g,"-").replace(/\//g,"_")},r.prototype.encode=function(e){var t=Li.stringToUtf8Arr(e);return this.base64EncArr(t)},r.prototype.base64EncArr=function(e){for(var t=(3-e.length%3)%3,i=w.EMPTY_STRING,n=void 0,a=e.length,o=0,s=0;s<a;s++)n=s%3,o|=e[s]<<(16>>>n&24),(n===2||e.length-s===1)&&(i+=String.fromCharCode(this.uint6ToB64(o>>>18&63),this.uint6ToB64(o>>>12&63),this.uint6ToB64(o>>>6&63),this.uint6ToB64(o&63)),o=0);return t===0?i:i.substring(0,i.length-t)+(t===1?"=":"==")},r.prototype.uint6ToB64=function(e){return e<26?e+65:e<52?e+71:e<62?e-4:e===62?43:e===63?47:65},r}();/*! @azure/msal-browser v2.32.2 2023-01-10 */var CH=function(){function r(){}return r.prototype.decode=function(e){var t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw new Error("Invalid base64 string")}var i=this.base64DecToArr(t);return Li.utf8ArrToString(i)},r.prototype.base64DecToArr=function(e,t){for(var i=e.replace(/[^A-Za-z0-9\+\/]/g,w.EMPTY_STRING),n=i.length,a=t?Math.ceil((n*3+1>>>2)/t)*t:n*3+1>>>2,o=new Uint8Array(a),s=void 0,c=void 0,l=0,h=0,d=0;d<n;d++)if(c=d&3,l|=this.b64ToUint6(i.charCodeAt(d))<<18-6*c,c===3||n-d===1){for(s=0;s<3&&h<a;s++,h++)o[h]=l>>>(16>>>s&24)&255;l=0}return o},r.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},r}();/*! @azure/msal-browser v2.32.2 2023-01-10 */var HH=32,kH=function(){function r(e){this.base64Encode=new q_,this.cryptoObj=e}return r.prototype.generateCodes=function(){return V(this,void 0,void 0,function(){var e,t;return S(this,function(i){switch(i.label){case 0:return e=this.generateCodeVerifier(),[4,this.generateCodeChallengeFromVerifier(e)];case 1:return t=i.sent(),[2,{verifier:e,challenge:t}]}})})},r.prototype.generateCodeVerifier=function(){try{var e=new Uint8Array(HH);this.cryptoObj.getRandomValues(e);var t=this.base64Encode.urlEncodeArr(e);return t}catch(i){throw R.createPkceNotGeneratedError(i)}},r.prototype.generateCodeChallengeFromVerifier=function(e){return V(this,void 0,void 0,function(){var t,i;return S(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.cryptoObj.sha256Digest(e)];case 1:return t=n.sent(),[2,this.base64Encode.urlEncodeArr(new Uint8Array(t))];case 2:throw i=n.sent(),R.createPkceNotGeneratedError(i);case 3:return[2]}})})},r}();/*! @azure/msal-browser v2.32.2 2023-01-10 */var EH=function(){function r(){}return r.prototype.getRandomValues=function(e){return window.crypto.getRandomValues(e)},r.prototype.generateKey=function(e,t,i){return V(this,void 0,void 0,function(){return S(this,function(n){return[2,window.crypto.subtle.generateKey(e,t,i)]})})},r.prototype.exportKey=function(e){return V(this,void 0,void 0,function(){return S(this,function(t){return[2,window.crypto.subtle.exportKey(ro,e)]})})},r.prototype.importKey=function(e,t,i,n){return V(this,void 0,void 0,function(){return S(this,function(a){return[2,window.crypto.subtle.importKey(ro,e,t,i,n)]})})},r.prototype.sign=function(e,t,i){return V(this,void 0,void 0,function(){return S(this,function(n){return[2,window.crypto.subtle.sign(e,t,i)]})})},r.prototype.digest=function(e,t){return V(this,void 0,void 0,function(){return S(this,function(i){return[2,window.crypto.subtle.digest(e,t)]})})},r}();/*! @azure/msal-browser v2.32.2 2023-01-10 */var PH=function(){function r(){}return r.prototype.initPrng=function(e){return window.msrCrypto.initPrng(i6(e))},r.prototype.getRandomValues=function(e){return window.msrCrypto.getRandomValues(e)},r.prototype.generateKey=function(e,t,i){return V(this,void 0,void 0,function(){return S(this,function(n){return[2,window.msrCrypto.subtle.generateKey(e,t,i)]})})},r.prototype.exportKey=function(e){return V(this,void 0,void 0,function(){return S(this,function(t){return[2,window.msrCrypto.subtle.exportKey(ro,e)]})})},r.prototype.importKey=function(e,t,i,n){return V(this,void 0,void 0,function(){return S(this,function(a){return[2,window.msrCrypto.subtle.importKey(ro,e,t,i,n)]})})},r.prototype.sign=function(e,t,i){return V(this,void 0,void 0,function(){return S(this,function(n){return[2,window.msrCrypto.subtle.sign(e,t,i)]})})},r.prototype.digest=function(e,t){return V(this,void 0,void 0,function(){return S(this,function(i){return[2,window.msrCrypto.subtle.digest(e,t)]})})},r}();/*! @azure/msal-browser v2.32.2 2023-01-10 */var AH=function(){function r(){}return r.prototype.getRandomValues=function(e){return window.msCrypto.getRandomValues(e)},r.prototype.generateKey=function(e,t,i){return V(this,void 0,void 0,function(){return S(this,function(n){return[2,new Promise(function(a,o){var s=window.msCrypto.subtle.generateKey(e,t,i);s.addEventListener("complete",function(c){a(c.target.result)}),s.addEventListener("error",function(c){o(c)})})]})})},r.prototype.exportKey=function(e){return V(this,void 0,void 0,function(){return S(this,function(t){return[2,new Promise(function(i,n){var a=window.msCrypto.subtle.exportKey(ro,e);a.addEventListener("complete",function(o){var s=o.target.result,c=Li.utf8ArrToString(new Uint8Array(s)).replace(/\r/g,w.EMPTY_STRING).replace(/\n/g,w.EMPTY_STRING).replace(/\t/g,w.EMPTY_STRING).split(" ").join(w.EMPTY_STRING).replace("\0",w.EMPTY_STRING);try{i(JSON.parse(c))}catch(l){n(l)}}),a.addEventListener("error",function(o){n(o)})})]})})},r.prototype.importKey=function(e,t,i,n){return V(this,void 0,void 0,function(){var a,o;return S(this,function(s){return a=Li.getSortedObjectString(e),o=Li.stringToArrayBuffer(a),[2,new Promise(function(c,l){var h=window.msCrypto.subtle.importKey(ro,o,t,i,n);h.addEventListener("complete",function(d){c(d.target.result)}),h.addEventListener("error",function(d){l(d)})})]})})},r.prototype.sign=function(e,t,i){return V(this,void 0,void 0,function(){return S(this,function(n){return[2,new Promise(function(a,o){var s=window.msCrypto.subtle.sign(e,t,i);s.addEventListener("complete",function(c){a(c.target.result)}),s.addEventListener("error",function(c){o(c)})})]})})},r.prototype.digest=function(e,t){return V(this,void 0,void 0,function(){return S(this,function(i){return[2,new Promise(function(n,a){var o=window.msCrypto.subtle.digest(e,t.buffer);o.addEventListener("complete",function(s){n(s.target.result)}),o.addEventListener("error",function(s){a(s)})})]})})},r}();/*! @azure/msal-browser v2.32.2 2023-01-10 */var VH="RSASSA-PKCS1-v1_5",km="SHA-256",SH=2048,$H=new Uint8Array([1,0,1]),G_=function(){function r(e,t){var i,n;if(this.logger=e,this.cryptoOptions=t,this.hasBrowserCrypto())this.logger.verbose("BrowserCrypto: modern crypto interface available"),this.subtleCrypto=new EH;else if(this.hasIECrypto())this.logger.verbose("BrowserCrypto: MS crypto interface available"),this.subtleCrypto=new AH;else if(this.hasMsrCrypto()&&(!((i=this.cryptoOptions)===null||i===void 0)&&i.useMsrCrypto))this.logger.verbose("BrowserCrypto: MSR crypto interface available"),this.subtleCrypto=new PH;else throw this.hasMsrCrypto()&&this.logger.info("BrowserCrypto: MSR Crypto interface available but system.cryptoOptions.useMsrCrypto not enabled"),this.logger.error("BrowserCrypto: No crypto interfaces available."),R.createCryptoNotAvailableError("Browser crypto, msCrypto, or msrCrypto interfaces not available.");if(this.subtleCrypto.initPrng){if(this.logger.verbose("BrowserCrypto: Interface requires entropy"),!(!((n=this.cryptoOptions)===null||n===void 0)&&n.entropy))throw this.logger.error("BrowserCrypto: Interface requires entropy but none provided."),$0.createEntropyNotProvided();this.logger.verbose("BrowserCrypto: Entropy provided"),this.subtleCrypto.initPrng(this.cryptoOptions.entropy)}this.keygenAlgorithmOptions={name:VH,hash:km,modulusLength:SH,publicExponent:$H}}return r.prototype.hasIECrypto=function(){return"msCrypto"in window},r.prototype.hasBrowserCrypto=function(){return"crypto"in window},r.prototype.hasMsrCrypto=function(){return"msrCrypto"in window},r.prototype.sha256Digest=function(e){return V(this,void 0,void 0,function(){var t;return S(this,function(i){return t=Li.stringToUtf8Arr(e),[2,this.subtleCrypto.digest({name:km},t)]})})},r.prototype.getRandomValues=function(e){return this.subtleCrypto.getRandomValues(e)},r.prototype.generateKeyPair=function(e,t){return V(this,void 0,void 0,function(){return S(this,function(i){return[2,this.subtleCrypto.generateKey(this.keygenAlgorithmOptions,e,t)]})})},r.prototype.exportJwk=function(e){return V(this,void 0,void 0,function(){return S(this,function(t){return[2,this.subtleCrypto.exportKey(e)]})})},r.prototype.importJwk=function(e,t,i){return V(this,void 0,void 0,function(){return S(this,function(n){return[2,this.subtleCrypto.importKey(e,this.keygenAlgorithmOptions,t,i)]})})},r.prototype.sign=function(e,t){return V(this,void 0,void 0,function(){return S(this,function(i){return[2,this.subtleCrypto.sign(this.keygenAlgorithmOptions,e,t)]})})},r}();/*! @azure/msal-browser v2.32.2 2023-01-10 */var DH=function(){function r(){this.dbName=Y3,this.version=hH,this.tableName=dH,this.dbOpen=!1}return r.prototype.open=function(){return V(this,void 0,void 0,function(){var e=this;return S(this,function(t){return[2,new Promise(function(i,n){var a=window.indexedDB.open(e.dbName,e.version);a.addEventListener("upgradeneeded",function(o){var s=o;s.target.result.createObjectStore(e.tableName)}),a.addEventListener("success",function(o){var s=o;e.db=s.target.result,e.dbOpen=!0,i()}),a.addEventListener("error",function(){return n(R.createDatabaseUnavailableError())})})]})})},r.prototype.closeConnection=function(){var e=this.db;e&&this.dbOpen&&(e.close(),this.dbOpen=!1)},r.prototype.validateDbIsOpen=function(){return V(this,void 0,void 0,function(){return S(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]}})})},r.prototype.getItem=function(e){return V(this,void 0,void 0,function(){var t=this;return S(this,function(i){switch(i.label){case 0:return[4,this.validateDbIsOpen()];case 1:return i.sent(),[2,new Promise(function(n,a){if(!t.db)return a(R.createDatabaseNotOpenError());var o=t.db.transaction([t.tableName],"readonly"),s=o.objectStore(t.tableName),c=s.get(e);c.addEventListener("success",function(l){var h=l;t.closeConnection(),n(h.target.result)}),c.addEventListener("error",function(l){t.closeConnection(),a(l)})})]}})})},r.prototype.setItem=function(e,t){return V(this,void 0,void 0,function(){var i=this;return S(this,function(n){switch(n.label){case 0:return[4,this.validateDbIsOpen()];case 1:return n.sent(),[2,new Promise(function(a,o){if(!i.db)return o(R.createDatabaseNotOpenError());var s=i.db.transaction([i.tableName],"readwrite"),c=s.objectStore(i.tableName),l=c.put(t,e);l.addEventListener("success",function(){i.closeConnection(),a()}),l.addEventListener("error",function(h){i.closeConnection(),o(h)})})]}})})},r.prototype.removeItem=function(e){return V(this,void 0,void 0,function(){var t=this;return S(this,function(i){switch(i.label){case 0:return[4,this.validateDbIsOpen()];case 1:return i.sent(),[2,new Promise(function(n,a){if(!t.db)return a(R.createDatabaseNotOpenError());var o=t.db.transaction([t.tableName],"readwrite"),s=o.objectStore(t.tableName),c=s.delete(e);c.addEventListener("success",function(){t.closeConnection(),n()}),c.addEventListener("error",function(l){t.closeConnection(),a(l)})})]}})})},r.prototype.getKeys=function(){return V(this,void 0,void 0,function(){var e=this;return S(this,function(t){switch(t.label){case 0:return[4,this.validateDbIsOpen()];case 1:return t.sent(),[2,new Promise(function(i,n){if(!e.db)return n(R.createDatabaseNotOpenError());var a=e.db.transaction([e.tableName],"readonly"),o=a.objectStore(e.tableName),s=o.getAllKeys();s.addEventListener("success",function(c){var l=c;e.closeConnection(),i(l.target.result)}),s.addEventListener("error",function(c){e.closeConnection(),n(c)})})]}})})},r.prototype.containsKey=function(e){return V(this,void 0,void 0,function(){var t=this;return S(this,function(i){switch(i.label){case 0:return[4,this.validateDbIsOpen()];case 1:return i.sent(),[2,new Promise(function(n,a){if(!t.db)return a(R.createDatabaseNotOpenError());var o=t.db.transaction([t.tableName],"readonly"),s=o.objectStore(t.tableName),c=s.count(e);c.addEventListener("success",function(l){var h=l;t.closeConnection(),n(h.target.result===1)}),c.addEventListener("error",function(l){t.closeConnection(),a(l)})})]}})})},r.prototype.deleteDatabase=function(){return V(this,void 0,void 0,function(){return S(this,function(e){return this.db&&this.dbOpen&&this.closeConnection(),[2,new Promise(function(t,i){var n=window.indexedDB.deleteDatabase(Y3);n.addEventListener("success",function(){return t(!0)}),n.addEventListener("blocked",function(){return t(!0)}),n.addEventListener("error",function(){return i(!1)})})]})})},r}();/*! @azure/msal-browser v2.32.2 2023-01-10 */var Em=function(){function r(e,t){this.inMemoryCache=new Q3,this.indexedDBCache=new DH,this.logger=e,this.storeName=t}return r.prototype.handleDatabaseAccessError=function(e){if(e instanceof R&&e.errorCode===L.databaseUnavailable.code)this.logger.error("Could not access persistent storage. This may be caused by browser privacy features which block persistent storage in third-party contexts.");else throw e},r.prototype.getItem=function(e){return V(this,void 0,void 0,function(){var t,i;return S(this,function(n){switch(n.label){case 0:if(t=this.inMemoryCache.getItem(e),t)return[3,4];n.label=1;case 1:return n.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,n.sent()];case 3:return i=n.sent(),this.handleDatabaseAccessError(i),[3,4];case 4:return[2,t]}})})},r.prototype.setItem=function(e,t){return V(this,void 0,void 0,function(){var i;return S(this,function(n){switch(n.label){case 0:this.inMemoryCache.setItem(e,t),n.label=1;case 1:return n.trys.push([1,3,,4]),[4,this.indexedDBCache.setItem(e,t)];case 2:return n.sent(),[3,4];case 3:return i=n.sent(),this.handleDatabaseAccessError(i),[3,4];case 4:return[2]}})})},r.prototype.removeItem=function(e){return V(this,void 0,void 0,function(){var t;return S(this,function(i){switch(i.label){case 0:this.inMemoryCache.removeItem(e),i.label=1;case 1:return i.trys.push([1,3,,4]),[4,this.indexedDBCache.removeItem(e)];case 2:return i.sent(),[3,4];case 3:return t=i.sent(),this.handleDatabaseAccessError(t),[3,4];case 4:return[2]}})})},r.prototype.getKeys=function(){return V(this,void 0,void 0,function(){var e,t;return S(this,function(i){switch(i.label){case 0:if(e=this.inMemoryCache.getKeys(),e.length!==0)return[3,4];i.label=1;case 1:return i.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,i.sent()];case 3:return t=i.sent(),this.handleDatabaseAccessError(t),[3,4];case 4:return[2,e]}})})},r.prototype.containsKey=function(e){return V(this,void 0,void 0,function(){var t,i;return S(this,function(n){switch(n.label){case 0:if(t=this.inMemoryCache.containsKey(e),t)return[3,4];n.label=1;case 1:return n.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,n.sent()];case 3:return i=n.sent(),this.handleDatabaseAccessError(i),[3,4];case 4:return[2,t]}})})},r.prototype.clearInMemory=function(){this.logger.verbose("Deleting in-memory keystore "+this.storeName),this.inMemoryCache.clear(),this.logger.verbose("In-memory keystore "+this.storeName+" deleted")},r.prototype.clearPersistent=function(){return V(this,void 0,void 0,function(){var e,t;return S(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),this.logger.verbose("Deleting persistent keystore"),[4,this.indexedDBCache.deleteDatabase()];case 1:return e=i.sent(),e&&this.logger.verbose("Persistent keystore deleted"),[2,e];case 2:return t=i.sent(),this.handleDatabaseAccessError(t),[2,!1];case 3:return[2]}})})},r}();/*! @azure/msal-browser v2.32.2 2023-01-10 */var D0;(function(r){r.asymmetricKeys="asymmetricKeys",r.symmetricKeys="symmetricKeys"})(D0||(D0={}));var LH=function(){function r(e){this.logger=e,this.asymmetricKeys=new Em(this.logger,D0.asymmetricKeys),this.symmetricKeys=new Em(this.logger,D0.symmetricKeys)}return r.prototype.clear=function(){return V(this,void 0,void 0,function(){var e;return S(this,function(t){switch(t.label){case 0:this.asymmetricKeys.clearInMemory(),this.symmetricKeys.clearInMemory(),t.label=1;case 1:return t.trys.push([1,3,,4]),[4,this.asymmetricKeys.clearPersistent()];case 2:return t.sent(),[2,!0];case 3:return e=t.sent(),e instanceof Error?this.logger.error("Clearing keystore failed with error: "+e.message):this.logger.error("Clearing keystore failed with unknown error"),[2,!1];case 4:return[2]}})})},r}();/*! @azure/msal-browser v2.32.2 2023-01-10 */var TH=function(){function r(e,t,i){this.logger=e,this.browserCrypto=new G_(this.logger,i),this.b64Encode=new q_,this.b64Decode=new CH,this.guidGenerator=new j_(this.browserCrypto),this.pkceGenerator=new kH(this.browserCrypto),this.cache=new LH(this.logger),this.performanceClient=t}return r.prototype.createNewGuid=function(){return this.guidGenerator.generateGuid()},r.prototype.base64Encode=function(e){return this.b64Encode.encode(e)},r.prototype.base64Decode=function(e){return this.b64Decode.decode(e)},r.prototype.generatePkceCodes=function(){return V(this,void 0,void 0,function(){return S(this,function(e){return[2,this.pkceGenerator.generateCodes()]})})},r.prototype.getPublicKeyThumbprint=function(e){var t;return V(this,void 0,void 0,function(){var i,n,a,o,s,c,l,h;return S(this,function(d){switch(d.label){case 0:return i=(t=this.performanceClient)===null||t===void 0?void 0:t.startMeasurement(St.CryptoOptsGetPublicKeyThumbprint,e.correlationId),[4,this.browserCrypto.generateKeyPair(r.EXTRACTABLE,r.POP_KEY_USAGES)];case 1:return n=d.sent(),[4,this.browserCrypto.exportJwk(n.publicKey)];case 2:return a=d.sent(),o={e:a.e,kty:a.kty,n:a.n},s=Li.getSortedObjectString(o),[4,this.hashString(s)];case 3:return c=d.sent(),[4,this.browserCrypto.exportJwk(n.privateKey)];case 4:return l=d.sent(),[4,this.browserCrypto.importJwk(l,!1,["sign"])];case 5:return h=d.sent(),[4,this.cache.asymmetricKeys.setItem(c,{privateKey:h,publicKey:n.publicKey,requestMethod:e.resourceRequestMethod,requestUri:e.resourceRequestUri})];case 6:return d.sent(),i&&i.endMeasurement({success:!0}),[2,c]}})})},r.prototype.removeTokenBindingKey=function(e){return V(this,void 0,void 0,function(){var t;return S(this,function(i){switch(i.label){case 0:return[4,this.cache.asymmetricKeys.removeItem(e)];case 1:return i.sent(),[4,this.cache.asymmetricKeys.containsKey(e)];case 2:return t=i.sent(),[2,!t]}})})},r.prototype.clearKeystore=function(){return V(this,void 0,void 0,function(){return S(this,function(e){switch(e.label){case 0:return[4,this.cache.clear()];case 1:return[2,e.sent()]}})})},r.prototype.signJwt=function(e,t,i){var n;return V(this,void 0,void 0,function(){var a,o,s,c,l,h,d,u,v,m,f,C,_;return S(this,function(p){switch(p.label){case 0:return a=(n=this.performanceClient)===null||n===void 0?void 0:n.startMeasurement(St.CryptoOptsSignJwt,i),[4,this.cache.asymmetricKeys.getItem(t)];case 1:if(o=p.sent(),!o)throw R.createSigningKeyNotFoundInStorageError(t);return[4,this.browserCrypto.exportJwk(o.publicKey)];case 2:return s=p.sent(),c=Li.getSortedObjectString(s),l=this.b64Encode.urlEncode(JSON.stringify({kid:t})),h=sH.getShrHeaderString({kid:l,alg:s.alg}),d=this.b64Encode.urlEncode(h),e.cnf={jwk:JSON.parse(c)},u=this.b64Encode.urlEncode(JSON.stringify(e)),v=d+"."+u,m=Li.stringToArrayBuffer(v),[4,this.browserCrypto.sign(o.privateKey,m)];case 3:return f=p.sent(),C=this.b64Encode.urlEncodeArr(new Uint8Array(f)),_=v+"."+C,a&&a.endMeasurement({success:!0}),[2,_]}})})},r.prototype.hashString=function(e){return V(this,void 0,void 0,function(){var t,i;return S(this,function(n){switch(n.label){case 0:return[4,this.browserCrypto.sha256Digest(e)];case 1:return t=n.sent(),i=new Uint8Array(t),[2,this.b64Encode.urlEncodeArr(i)]}})})},r.POP_KEY_USAGES=["sign","verify"],r.EXTRACTABLE=!0,r}();/*! @azure/msal-browser v2.32.2 2023-01-10 */var IH=function(){function r(e,t,i,n){this.isBrowserEnvironment=typeof window<"u",this.config=e,this.storage=t,this.logger=i,this.cryptoObj=n}return r.prototype.loadExternalTokens=function(e,t,i){if(this.logger.info("TokenCache - loadExternalTokens called"),!t.id_token)throw R.createUnableToLoadTokenError("Please ensure server response includes id token.");var n=new ui(t.id_token,this.cryptoObj),a,o;if(e.account){var s=this.loadAccount(n,e.account.environment,void 0,void 0,e.account.homeAccountId);a=new Ch(s,this.loadIdToken(n,s.homeAccountId,e.account.environment,e.account.tenantId),this.loadAccessToken(e,t,s.homeAccountId,e.account.environment,e.account.tenantId,i),this.loadRefreshToken(e,t,s.homeAccountId,e.account.environment))}else if(e.authority){var c=A0.generateAuthority(e.authority,e.azureCloudOptions),l={protocolMode:this.config.auth.protocolMode,knownAuthorities:this.config.auth.knownAuthorities,cloudDiscoveryMetadata:this.config.auth.cloudDiscoveryMetadata,authorityMetadata:this.config.auth.authorityMetadata,skipAuthorityMetadataCache:this.config.auth.skipAuthorityMetadataCache};if(o=new A0(c,this.config.system.networkClient,this.storage,l,this.logger),i.clientInfo){this.logger.trace("TokenCache - homeAccountId from options");var s=this.loadAccount(n,o.hostnameAndPort,i.clientInfo,o.authorityType);a=new Ch(s,this.loadIdToken(n,s.homeAccountId,o.hostnameAndPort,o.tenant),this.loadAccessToken(e,t,s.homeAccountId,o.hostnameAndPort,o.tenant,i),this.loadRefreshToken(e,t,s.homeAccountId,o.hostnameAndPort))}else if(t.client_info){this.logger.trace("TokenCache - homeAccountId from response");var s=this.loadAccount(n,o.hostnameAndPort,t.client_info,o.authorityType);a=new Ch(s,this.loadIdToken(n,s.homeAccountId,o.hostnameAndPort,o.tenant),this.loadAccessToken(e,t,s.homeAccountId,o.hostnameAndPort,o.tenant,i),this.loadRefreshToken(e,t,s.homeAccountId,o.hostnameAndPort))}else throw R.createUnableToLoadTokenError("Please provide clientInfo in the response or options.")}else throw R.createUnableToLoadTokenError("Please provide a request with an account or a request with authority.");return this.generateAuthenticationResult(e,n,a,o)},r.prototype.loadAccount=function(e,t,i,n,a){var o;if(a?o=a:n!==void 0&&i&&(o=Wt.generateHomeAccountId(i,n,this.logger,this.cryptoObj,e)),!o)throw R.createUnableToLoadTokenError("Unexpected missing homeAccountId");var s=i?Wt.createAccount(i,o,e,void 0,void 0,void 0,t):Wt.createGenericAccount(o,e,void 0,void 0,void 0,t);if(this.isBrowserEnvironment)return this.logger.verbose("TokenCache - loading account"),this.storage.setAccount(s),s;throw R.createUnableToLoadTokenError("loadExternalTokens is designed to work in browser environments only.")},r.prototype.loadIdToken=function(e,t,i,n){var a=kc.createIdTokenEntity(t,i,e.rawToken,this.config.auth.clientId,n);if(this.isBrowserEnvironment)return this.logger.verbose("TokenCache - loading id token"),this.storage.setIdTokenCredential(a),a;throw R.createUnableToLoadTokenError("loadExternalTokens is designed to work in browser environments only.")},r.prototype.loadAccessToken=function(e,t,i,n,a,o){if(!t.access_token)return this.logger.verbose("TokenCache - No access token provided for caching"),null;if(!t.expires_in)throw R.createUnableToLoadTokenError("Please ensure server response includes expires_in value.");if(!o.extendedExpiresOn)throw R.createUnableToLoadTokenError("Please provide an extendedExpiresOn value in the options.");var s=new g1(e.scopes).printScopes(),c=o.expiresOn||t.expires_in+new Date().getTime()/1e3,l=o.extendedExpiresOn,h=Ec.createAccessTokenEntity(i,n,t.access_token,this.config.auth.clientId,a,s,c,l,this.cryptoObj);if(this.isBrowserEnvironment)return this.logger.verbose("TokenCache - loading access token"),this.storage.setAccessTokenCredential(h),h;throw R.createUnableToLoadTokenError("loadExternalTokens is designed to work in browser environments only.")},r.prototype.loadRefreshToken=function(e,t,i,n){if(!t.refresh_token)return this.logger.verbose("TokenCache - No refresh token provided for caching"),null;var a=k0.createRefreshTokenEntity(i,n,t.refresh_token,this.config.auth.clientId);if(this.isBrowserEnvironment)return this.logger.verbose("TokenCache - loading refresh token"),this.storage.setRefreshTokenCredential(a),a;throw R.createUnableToLoadTokenError("loadExternalTokens is designed to work in browser environments only.")},r.prototype.generateAuthenticationResult=function(e,t,i,n){var a,o,s,c=w.EMPTY_STRING,l=[],h=null,d;i!=null&&i.accessToken&&(c=i.accessToken.secret,l=g1.fromString(i.accessToken.target).asArray(),h=new Date(Number(i.accessToken.expiresOn)*1e3),d=new Date(Number(i.accessToken.extendedExpiresOn)*1e3));var u=(t==null?void 0:t.claims.oid)||(t==null?void 0:t.claims.sub)||w.EMPTY_STRING,v=(t==null?void 0:t.claims.tid)||w.EMPTY_STRING;return{authority:n?n.canonicalAuthority:w.EMPTY_STRING,uniqueId:u,tenantId:v,scopes:l,account:i!=null&&i.account?i.account.getAccountInfo():null,idToken:t?t.rawToken:w.EMPTY_STRING,idTokenClaims:t?t.claims:{},accessToken:c,fromCache:!0,expiresOn:h,correlationId:e.correlationId||w.EMPTY_STRING,requestId:w.EMPTY_STRING,extExpiresOn:d,familyId:w.EMPTY_STRING,tokenType:((a=i==null?void 0:i.accessToken)===null||a===void 0?void 0:a.tokenType)||w.EMPTY_STRING,state:w.EMPTY_STRING,cloudGraphHostName:((o=i==null?void 0:i.account)===null||o===void 0?void 0:o.cloudGraphHostName)||w.EMPTY_STRING,msGraphHost:((s=i==null?void 0:i.account)===null||s===void 0?void 0:s.msGraphHost)||w.EMPTY_STRING,code:void 0,fromNativeBroker:!1}},r}();/*! @azure/msal-browser v2.32.2 2023-01-10 */var RH=function(r){Jt(e,r);function e(t){var i=r.call(this,t)||this;return i.includeRedirectUri=!1,i}return e}(T_);/*! @azure/msal-browser v2.32.2 2023-01-10 */var OH=function(r){Jt(e,r);function e(t,i,n,a,o,s,c,l,h,d){var u=r.call(this,t,i,n,a,o,s,l,h,d)||this;return u.apiId=c,u}return e.prototype.acquireToken=function(t){return V(this,void 0,void 0,function(){var i,n,a,o,s,c,l;return S(this,function(h){switch(h.label){case 0:if(this.logger.trace("SilentAuthCodeClient.acquireToken called"),!t.code)throw R.createAuthCodeRequiredError();return[4,this.initializeAuthorizationRequest(t,W.Silent)];case 1:i=h.sent(),this.browserStorage.updateCacheEntries(i.state,i.nonce,i.authority,i.loginHint||w.EMPTY_STRING,i.account||null),n=this.initializeServerTelemetryManager(this.apiId),h.label=2;case 2:return h.trys.push([2,4,,5]),a=Y(Y({},i),{code:t.code}),[4,this.getClientConfiguration(n,i.authority)];case 3:return o=h.sent(),s=new RH(o),this.logger.verbose("Auth code client created"),c=new B_(s,this.browserStorage,a,this.logger,this.config.system),[2,c.handleCodeResponseFromServer({code:t.code,msgraph_host:t.msGraphHost,cloud_graph_host_name:t.cloudGraphHostName,cloud_instance_host_name:t.cloudInstanceHostName},i.state,s.authority,this.networkClient,!1)];case 4:throw l=h.sent(),l instanceof Q&&l.setCorrelationId(this.correlationId),n.cacheFailedRequest(l),this.browserStorage.cleanRequestByState(i.state),l;case 5:return[2]}})})},e.prototype.logout=function(){return Promise.reject(R.createSilentLogoutUnsupportedError())},e}(Lo);/*! @azure/msal-browser v2.32.2 2023-01-10 */var NH=function(){function r(e,t){this.correlationId=t,this.measureName="msal.measure."+e+"."+this.correlationId,this.startMark="msal.start."+e+"."+this.correlationId,this.endMark="msal.end."+e+"."+this.correlationId}return r.supportsBrowserPerformance=function(){return typeof window<"u"&&typeof window.performance<"u"&&typeof window.performance.mark=="function"&&typeof window.performance.measure=="function"&&typeof window.performance.clearMarks=="function"&&typeof window.performance.clearMeasures=="function"&&typeof window.performance.getEntriesByName=="function"},r.prototype.startMeasurement=function(){if(r.supportsBrowserPerformance())try{window.performance.mark(this.startMark)}catch{}},r.prototype.endMeasurement=function(){if(r.supportsBrowserPerformance())try{window.performance.mark(this.endMark),window.performance.measure(this.measureName,this.startMark,this.endMark)}catch{}},r.prototype.flushMeasurement=function(){if(r.supportsBrowserPerformance())try{var e=window.performance.getEntriesByName(this.measureName,"measure");if(e.length>0){var t=e[0].duration;return window.performance.clearMeasures(this.measureName),window.performance.clearMarks(this.startMark),window.performance.clearMarks(this.endMark),t}}catch{}return null},r}();/*! @azure/msal-browser v2.32.2 2023-01-10 */var UH=function(r){Jt(e,r);function e(t,i,n,a,o,s,c){var l=r.call(this,t,i,n,a,o,s)||this;return l.browserCrypto=new G_(l.logger,c),l.guidGenerator=new j_(l.browserCrypto),l}return e.prototype.startPerformanceMeasurement=function(t,i){return new NH(t,i)},e.prototype.generateId=function(){return this.guidGenerator.generateGuid()},e.prototype.getPageVisibility=function(){var t;return((t=document.visibilityState)===null||t===void 0?void 0:t.toString())||null},e.prototype.startMeasurement=function(t,i){var n=this,a=this.getPageVisibility(),o=r.prototype.startMeasurement.call(this,t,i);return Y(Y({},o),{endMeasurement:function(s){return o.endMeasurement(Y({startPageVisibility:a,endPageVisibility:n.getPageVisibility()},s))}})},e}(O_);/*! @azure/msal-browser v2.32.2 2023-01-10 */var FH=function(){function r(e){this.isBrowserEnvironment=typeof window<"u",this.config=wH(e,this.isBrowserEnvironment),this.initialized=!1,this.logger=new n6(this.config.system.loggerOptions,Ed,Ys),this.networkClient=this.config.system.networkClient,this.navigationClient=this.config.system.navigationClient,this.redirectResponse=new Map,this.hybridAuthCodeResponses=new Map,this.performanceClient=this.isBrowserEnvironment?new UH(this.config.auth.clientId,this.config.auth.authority,this.logger,Ed,Ys,this.config.telemetry.application,this.config.system.cryptoOptions):new lH(this.config.auth.clientId,this.config.auth.authority,this.logger,Ed,Ys,this.config.telemetry.application),this.browserCrypto=this.isBrowserEnvironment?new TH(this.logger,this.performanceClient,this.config.system.cryptoOptions):M0,this.eventHandler=new MH(this.logger,this.browserCrypto),this.browserStorage=this.isBrowserEnvironment?new X3(this.config.auth.clientId,this.config.cache,this.browserCrypto,this.logger):uH(this.config.auth.clientId,this.logger);var t={cacheLocation:c1.MemoryStorage,storeAuthStateInCookie:!1,secureCookies:!1};this.nativeInternalStorage=new X3(this.config.auth.clientId,t,this.browserCrypto,this.logger),this.tokenCache=new IH(this.config,this.browserStorage,this.logger,this.browserCrypto)}return r.prototype.initialize=function(){return V(this,void 0,void 0,function(){var e,t;return S(this,function(i){switch(i.label){case 0:if(this.logger.trace("initialize called"),this.initialized)return this.logger.info("initialize has already been called, exiting early."),[2];if(this.eventHandler.emitEvent(ie.INITIALIZE_START),!this.config.system.allowNativeBroker)return[3,4];i.label=1;case 1:return i.trys.push([1,3,,4]),e=this,[4,ba.createProvider(this.logger,this.config.system.nativeBrokerHandshakeTimeout)];case 2:return e.nativeExtensionProvider=i.sent(),[3,4];case 3:return t=i.sent(),this.logger.verbose(t),[3,4];case 4:return this.initialized=!0,this.eventHandler.emitEvent(ie.INITIALIZE_END),[2]}})})},r.prototype.handleRedirectPromise=function(e){return V(this,void 0,void 0,function(){var t,i,n,a,o,s,c,l,h=this;return S(this,function(d){return this.logger.verbose("handleRedirectPromise called"),lt.blockNativeBrokerCalledBeforeInitialized(this.config.system.allowNativeBroker,this.initialized),t=this.getAllAccounts(),this.isBrowserEnvironment?(i=e||w.EMPTY_STRING,n=this.redirectResponse.get(i),typeof n>"u"?(this.eventHandler.emitEvent(ie.HANDLE_REDIRECT_START,W.Redirect),this.logger.verbose("handleRedirectPromise has been called for the first time, storing the promise"),a=this.browserStorage.getCachedNativeRequest(),o=void 0,a&&ba.isNativeAvailable(this.config,this.logger,this.nativeExtensionProvider)&&this.nativeExtensionProvider&&!e?(this.logger.trace("handleRedirectPromise - acquiring token from native platform"),s=new L2(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,je.handleRedirectPromise,this.performanceClient,this.nativeExtensionProvider,a.accountId,this.nativeInternalStorage,a.correlationId),o=s.handleRedirectPromise()):(this.logger.trace("handleRedirectPromise - acquiring token from web flow"),c=this.browserStorage.getTemporaryCache(Ce.CORRELATION_ID,!0)||w.EMPTY_STRING,l=this.createRedirectClient(c),o=l.handleRedirectPromise(e)),n=o.then(function(u){if(u){var v=t.length<h.getAllAccounts().length;v?(h.eventHandler.emitEvent(ie.LOGIN_SUCCESS,W.Redirect,u),h.logger.verbose("handleRedirectResponse returned result, login success")):(h.eventHandler.emitEvent(ie.ACQUIRE_TOKEN_SUCCESS,W.Redirect,u),h.logger.verbose("handleRedirectResponse returned result, acquire token success"))}return h.eventHandler.emitEvent(ie.HANDLE_REDIRECT_END,W.Redirect),u}).catch(function(u){throw t.length>0?h.eventHandler.emitEvent(ie.ACQUIRE_TOKEN_FAILURE,W.Redirect,null,u):h.eventHandler.emitEvent(ie.LOGIN_FAILURE,W.Redirect,null,u),h.eventHandler.emitEvent(ie.HANDLE_REDIRECT_END,W.Redirect),u}),this.redirectResponse.set(i,n)):this.logger.verbose("handleRedirectPromise has been called previously, returning the result from the first call"),[2,n]):(this.logger.verbose("handleRedirectPromise returns null, not browser environment"),[2,null])})})},r.prototype.acquireTokenRedirect=function(e){return V(this,void 0,void 0,function(){var t,i,n,a,o,s=this;return S(this,function(c){return t=this.getRequestCorrelationId(e),this.logger.verbose("acquireTokenRedirect called",t),this.preflightBrowserEnvironmentCheck(W.Redirect),i=this.getAllAccounts().length>0,i?this.eventHandler.emitEvent(ie.ACQUIRE_TOKEN_START,W.Redirect,e):this.eventHandler.emitEvent(ie.LOGIN_START,W.Redirect,e),this.nativeExtensionProvider&&this.canUseNative(e)?(a=new L2(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,je.acquireTokenRedirect,this.performanceClient,this.nativeExtensionProvider,this.getNativeAccountId(e),this.nativeInternalStorage,e.correlationId),n=a.acquireTokenRedirect(e).catch(function(l){if(l instanceof ii&&l.isFatal()){s.nativeExtensionProvider=void 0;var h=s.createRedirectClient(e.correlationId);return h.acquireToken(e)}else if(l instanceof Tr){s.logger.verbose("acquireTokenRedirect - Resolving interaction required error thrown by native broker by falling back to web flow");var h=s.createRedirectClient(e.correlationId);return h.acquireToken(e)}throw s.browserStorage.setInteractionInProgress(!1),l})):(o=this.createRedirectClient(e.correlationId),n=o.acquireToken(e)),[2,n.catch(function(l){throw i?s.eventHandler.emitEvent(ie.ACQUIRE_TOKEN_FAILURE,W.Redirect,null,l):s.eventHandler.emitEvent(ie.LOGIN_FAILURE,W.Redirect,null,l),l})]})})},r.prototype.acquireTokenPopup=function(e){var t=this,i=this.getRequestCorrelationId(e),n=this.performanceClient.startMeasurement(St.AcquireTokenPopup,i);try{this.logger.verbose("acquireTokenPopup called",i),this.preflightBrowserEnvironmentCheck(W.Popup)}catch(c){return Promise.reject(c)}var a=this.getAllAccounts();a.length>0?this.eventHandler.emitEvent(ie.ACQUIRE_TOKEN_START,W.Popup,e):this.eventHandler.emitEvent(ie.LOGIN_START,W.Popup,e);var o;if(this.canUseNative(e))o=this.acquireTokenNative(e,je.acquireTokenPopup).then(function(c){return t.browserStorage.setInteractionInProgress(!1),n.endMeasurement({success:!0,isNativeBroker:!0,requestId:c.requestId}),n.flushMeasurement(),c}).catch(function(c){if(c instanceof ii&&c.isFatal()){t.nativeExtensionProvider=void 0;var l=t.createPopupClient(e.correlationId);return l.acquireToken(e)}else if(c instanceof Tr){t.logger.verbose("acquireTokenPopup - Resolving interaction required error thrown by native broker by falling back to web flow");var l=t.createPopupClient(e.correlationId);return l.acquireToken(e)}throw t.browserStorage.setInteractionInProgress(!1),c});else{var s=this.createPopupClient(e.correlationId);o=s.acquireToken(e)}return o.then(function(c){var l=a.length<t.getAllAccounts().length;return l?t.eventHandler.emitEvent(ie.LOGIN_SUCCESS,W.Popup,c):t.eventHandler.emitEvent(ie.ACQUIRE_TOKEN_SUCCESS,W.Popup,c),n.addStaticFields({accessTokenSize:c.accessToken.length,idTokenSize:c.idToken.length}),n.endMeasurement({success:!0,requestId:c.requestId}),n.flushMeasurement(),c}).catch(function(c){return a.length>0?t.eventHandler.emitEvent(ie.ACQUIRE_TOKEN_FAILURE,W.Popup,null,c):t.eventHandler.emitEvent(ie.LOGIN_FAILURE,W.Popup,null,c),n.endMeasurement({errorCode:c.errorCode,subErrorCode:c.subError,success:!1}),n.flushMeasurement(),Promise.reject(c)})},r.prototype.ssoSilent=function(e){return V(this,void 0,void 0,function(){var t,i,n,a,o,s=this;return S(this,function(c){return t=this.getRequestCorrelationId(e),i=Y(Y({},e),{prompt:e.prompt,correlationId:t}),this.preflightBrowserEnvironmentCheck(W.Silent),n=this.performanceClient.startMeasurement(St.SsoSilent,t),this.logger.verbose("ssoSilent called",t),this.eventHandler.emitEvent(ie.SSO_SILENT_START,W.Silent,i),this.canUseNative(i)?a=this.acquireTokenNative(i,je.ssoSilent).catch(function(l){if(l instanceof ii&&l.isFatal()){s.nativeExtensionProvider=void 0;var h=s.createSilentIframeClient(i.correlationId);return h.acquireToken(i)}throw l}):(o=this.createSilentIframeClient(i.correlationId),a=o.acquireToken(i)),[2,a.then(function(l){return s.eventHandler.emitEvent(ie.SSO_SILENT_SUCCESS,W.Silent,l),n.addStaticFields({accessTokenSize:l.accessToken.length,idTokenSize:l.idToken.length}),n.endMeasurement({success:!0,isNativeBroker:l.fromNativeBroker,requestId:l.requestId}),n.flushMeasurement(),l}).catch(function(l){throw s.eventHandler.emitEvent(ie.SSO_SILENT_FAILURE,W.Silent,null,l),n.endMeasurement({errorCode:l.errorCode,subErrorCode:l.subError,success:!1}),n.flushMeasurement(),l})]})})},r.prototype.acquireTokenByCode=function(e){return V(this,void 0,void 0,function(){var t,i,n,a,o=this;return S(this,function(s){t=this.getRequestCorrelationId(e),this.preflightBrowserEnvironmentCheck(W.Silent),this.logger.trace("acquireTokenByCode called",t),this.eventHandler.emitEvent(ie.ACQUIRE_TOKEN_BY_CODE_START,W.Silent,e),i=this.performanceClient.startMeasurement(St.AcquireTokenByCode,e.correlationId);try{if(e.code)return n=e.code,a=this.hybridAuthCodeResponses.get(n),a?(this.logger.verbose("Existing acquireTokenByCode request found",e.correlationId),i.endMeasurement({success:!0}),i.discardMeasurement()):(this.logger.verbose("Initiating new acquireTokenByCode request",t),a=this.acquireTokenByCodeAsync(Y(Y({},e),{correlationId:t})).then(function(c){return o.eventHandler.emitEvent(ie.ACQUIRE_TOKEN_BY_CODE_SUCCESS,W.Silent,c),o.hybridAuthCodeResponses.delete(n),i.addStaticFields({accessTokenSize:c.accessToken.length,idTokenSize:c.idToken.length}),i.endMeasurement({success:!0,isNativeBroker:c.fromNativeBroker,requestId:c.requestId}),i.flushMeasurement(),c}).catch(function(c){throw o.hybridAuthCodeResponses.delete(n),o.eventHandler.emitEvent(ie.ACQUIRE_TOKEN_BY_CODE_FAILURE,W.Silent,null,c),i.endMeasurement({errorCode:c.errorCode,subErrorCode:c.subError,success:!1}),i.flushMeasurement(),c}),this.hybridAuthCodeResponses.set(n,a)),[2,a];if(e.nativeAccountId){if(this.canUseNative(e,e.nativeAccountId))return[2,this.acquireTokenNative(e,je.acquireTokenByCode,e.nativeAccountId).catch(function(c){throw c instanceof ii&&c.isFatal()&&(o.nativeExtensionProvider=void 0),c})];throw R.createUnableToAcquireTokenFromNativePlatformError()}else throw R.createAuthCodeOrNativeAccountIdRequiredError()}catch(c){throw this.eventHandler.emitEvent(ie.ACQUIRE_TOKEN_BY_CODE_FAILURE,W.Silent,null,c),i.endMeasurement({errorCode:c instanceof Q&&c.errorCode||void 0,subErrorCode:c instanceof Q&&c.subError||void 0,success:!1}),c}return[2]})})},r.prototype.acquireTokenByCodeAsync=function(e){return V(this,void 0,void 0,function(){var t,i;return S(this,function(n){switch(n.label){case 0:return this.logger.trace("acquireTokenByCodeAsync called",e.correlationId),t=this.createSilentAuthCodeClient(e.correlationId),[4,t.acquireToken(e)];case 1:return i=n.sent(),[2,i]}})})},r.prototype.acquireTokenFromCache=function(e,t,i){return V(this,void 0,void 0,function(){return S(this,function(n){switch(i.cacheLookupPolicy){case E1.Default:case E1.AccessToken:case E1.AccessTokenAndRefreshToken:return[2,e.acquireToken(t)];default:throw j.createRefreshRequiredError()}return[2]})})},r.prototype.acquireTokenByRefreshToken=function(e,t){return V(this,void 0,void 0,function(){var i;return S(this,function(n){switch(t.cacheLookupPolicy){case E1.Default:case E1.AccessTokenAndRefreshToken:case E1.RefreshToken:case E1.RefreshTokenAndNetwork:return i=this.createSilentRefreshClient(e.correlationId),[2,i.acquireToken(e)];default:throw j.createRefreshRequiredError()}return[2]})})},r.prototype.acquireTokenBySilentIframe=function(e){return V(this,void 0,void 0,function(){var t;return S(this,function(i){return t=this.createSilentIframeClient(e.correlationId),[2,t.acquireToken(e)]})})},r.prototype.logout=function(e){return V(this,void 0,void 0,function(){var t;return S(this,function(i){return t=this.getRequestCorrelationId(e),this.logger.warning("logout API is deprecated and will be removed in msal-browser v3.0.0. Use logoutRedirect instead.",t),[2,this.logoutRedirect(Y({correlationId:t},e))]})})},r.prototype.logoutRedirect=function(e){return V(this,void 0,void 0,function(){var t,i;return S(this,function(n){return t=this.getRequestCorrelationId(e),this.preflightBrowserEnvironmentCheck(W.Redirect),i=this.createRedirectClient(t),[2,i.logout(e)]})})},r.prototype.logoutPopup=function(e){try{var t=this.getRequestCorrelationId(e);this.preflightBrowserEnvironmentCheck(W.Popup);var i=this.createPopupClient(t);return i.logout(e)}catch(n){return Promise.reject(n)}},r.prototype.getAllAccounts=function(){return this.logger.verbose("getAllAccounts called"),this.isBrowserEnvironment?this.browserStorage.getAllAccounts():[]},r.prototype.getAccountByUsername=function(e){var t=this.getAllAccounts();return!F.isEmpty(e)&&t&&t.length?(this.logger.verbose("Account matching username found, returning"),this.logger.verbosePii("Returning signed-in accounts matching username: "+e),t.filter(function(i){return i.username.toLowerCase()===e.toLowerCase()})[0]||null):(this.logger.verbose("getAccountByUsername: No matching account found, returning null"),null)},r.prototype.getAccountByHomeId=function(e){var t=this.getAllAccounts();return!F.isEmpty(e)&&t&&t.length?(this.logger.verbose("Account matching homeAccountId found, returning"),this.logger.verbosePii("Returning signed-in accounts matching homeAccountId: "+e),t.filter(function(i){return i.homeAccountId===e})[0]||null):(this.logger.verbose("getAccountByHomeId: No matching account found, returning null"),null)},r.prototype.getAccountByLocalId=function(e){var t=this.getAllAccounts();return!F.isEmpty(e)&&t&&t.length?(this.logger.verbose("Account matching localAccountId found, returning"),this.logger.verbosePii("Returning signed-in accounts matching localAccountId: "+e),t.filter(function(i){return i.localAccountId===e})[0]||null):(this.logger.verbose("getAccountByLocalId: No matching account found, returning null"),null)},r.prototype.setActiveAccount=function(e){this.browserStorage.setActiveAccount(e)},r.prototype.getActiveAccount=function(){return this.browserStorage.getActiveAccount()},r.prototype.preflightBrowserEnvironmentCheck=function(e,t){if(t===void 0&&(t=!0),this.logger.verbose("preflightBrowserEnvironmentCheck started"),lt.blockNonBrowserEnvironment(this.isBrowserEnvironment),lt.blockRedirectInIframe(e,this.config.system.allowRedirectInIframe),lt.blockReloadInHiddenIframes(),lt.blockAcquireTokenInPopups(),lt.blockNativeBrokerCalledBeforeInitialized(this.config.system.allowNativeBroker,this.initialized),e===W.Redirect&&this.config.cache.cacheLocation===c1.MemoryStorage&&!this.config.cache.storeAuthStateInCookie)throw $0.createInMemoryRedirectUnavailableError();(e===W.Redirect||e===W.Popup)&&this.preflightInteractiveRequest(t)},r.prototype.preflightInteractiveRequest=function(e){this.logger.verbose("preflightInteractiveRequest called, validating app environment"),lt.blockReloadInHiddenIframes(),e&&this.browserStorage.setInteractionInProgress(!0)},r.prototype.acquireTokenNative=function(e,t,i){return V(this,void 0,void 0,function(){var n;return S(this,function(a){if(this.logger.trace("acquireTokenNative called"),!this.nativeExtensionProvider)throw R.createNativeConnectionNotEstablishedError();return n=new L2(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,t,this.performanceClient,this.nativeExtensionProvider,i||this.getNativeAccountId(e),this.nativeInternalStorage,e.correlationId),[2,n.acquireToken(e)]})})},r.prototype.canUseNative=function(e,t){if(this.logger.trace("canUseNative called"),!ba.isNativeAvailable(this.config,this.logger,this.nativeExtensionProvider,e.authenticationScheme))return this.logger.trace("canUseNative: isNativeAvailable returned false, returning false"),!1;if(e.prompt)switch(e.prompt){case d1.NONE:case d1.CONSENT:case d1.LOGIN:this.logger.trace("canUseNative: prompt is compatible with native flow");break;default:return this.logger.trace("canUseNative: prompt = "+e.prompt+" is not compatible with native flow, returning false"),!1}return!t&&!this.getNativeAccountId(e)?(this.logger.trace("canUseNative: nativeAccountId is not available, returning false"),!1):!0},r.prototype.getNativeAccountId=function(e){var t=e.account||this.browserStorage.getAccountInfoByHints(e.loginHint,e.sid)||this.getActiveAccount();return t&&t.nativeAccountId||""},r.prototype.createPopupClient=function(e){return new pH(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeInternalStorage,this.nativeExtensionProvider,e)},r.prototype.createRedirectClient=function(e){return new fH(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeInternalStorage,this.nativeExtensionProvider,e)},r.prototype.createSilentIframeClient=function(e){return new bH(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,je.ssoSilent,this.performanceClient,this.nativeInternalStorage,this.nativeExtensionProvider,e)},r.prototype.createSilentCacheClient=function(e){return new F_(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeExtensionProvider,e)},r.prototype.createSilentRefreshClient=function(e){return new xH(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeExtensionProvider,e)},r.prototype.createSilentAuthCodeClient=function(e){return new OH(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,je.acquireTokenByCode,this.performanceClient,this.nativeExtensionProvider,e)},r.prototype.addEventCallback=function(e){return this.eventHandler.addEventCallback(e)},r.prototype.removeEventCallback=function(e){this.eventHandler.removeEventCallback(e)},r.prototype.addPerformanceCallback=function(e){return this.performanceClient.addPerformanceCallback(e)},r.prototype.removePerformanceCallback=function(e){return this.performanceClient.removePerformanceCallback(e)},r.prototype.enableAccountStorageEvents=function(){this.eventHandler.enableAccountStorageEvents()},r.prototype.disableAccountStorageEvents=function(){this.eventHandler.disableAccountStorageEvents()},r.prototype.getTokenCache=function(){return this.tokenCache},r.prototype.getLogger=function(){return this.logger},r.prototype.setLogger=function(e){this.logger=e},r.prototype.initializeWrapperLibrary=function(e,t){this.browserStorage.setWrapperMetadata(e,t)},r.prototype.setNavigationClient=function(e){this.navigationClient=e},r.prototype.getConfiguration=function(){return this.config},r.prototype.getRequestCorrelationId=function(e){return e!=null&&e.correlationId?e.correlationId:this.isBrowserEnvironment?this.browserCrypto.createNewGuid():w.EMPTY_STRING},r}();/*! @azure/msal-browser v2.32.2 2023-01-10 */var BH=function(r){Jt(e,r);function e(t){var i=r.call(this,t)||this;return i.activeSilentTokenRequests=new Map,i}return e.prototype.loginRedirect=function(t){return V(this,void 0,void 0,function(){var i;return S(this,function(n){return i=this.getRequestCorrelationId(t),this.logger.verbose("loginRedirect called",i),[2,this.acquireTokenRedirect(Y({correlationId:i},t||xm))]})})},e.prototype.loginPopup=function(t){var i=this.getRequestCorrelationId(t);return this.logger.verbose("loginPopup called",i),this.acquireTokenPopup(Y({correlationId:i},t||xm))},e.prototype.acquireTokenSilent=function(t){return V(this,void 0,void 0,function(){var i,n,a,o,s,c,l,h=this;return S(this,function(d){if(i=this.getRequestCorrelationId(t),n=this.performanceClient.startMeasurement(St.AcquireTokenSilent,i),n.addStaticFields({cacheLookupPolicy:t.cacheLookupPolicy}),this.preflightBrowserEnvironmentCheck(W.Silent),this.logger.verbose("acquireTokenSilent called",i),a=t.account||this.getActiveAccount(),!a)throw R.createNoAccountError();return o={clientId:this.config.auth.clientId,authority:t.authority||w.EMPTY_STRING,scopes:t.scopes,homeAccountIdentifier:a.homeAccountId,claims:t.claims,authenticationScheme:t.authenticationScheme,resourceRequestMethod:t.resourceRequestMethod,resourceRequestUri:t.resourceRequestUri,shrClaims:t.shrClaims,sshKid:t.sshKid},s=JSON.stringify(o),c=this.activeSilentTokenRequests.get(s),typeof c>"u"?(this.logger.verbose("acquireTokenSilent called for the first time, storing active request",i),l=this.acquireTokenSilentAsync(Y(Y({},t),{correlationId:i}),a).then(function(u){return h.activeSilentTokenRequests.delete(s),n.addStaticFields({accessTokenSize:u.accessToken.length,idTokenSize:u.idToken.length}),n.endMeasurement({success:!0,fromCache:u.fromCache,isNativeBroker:u.fromNativeBroker,cacheLookupPolicy:t.cacheLookupPolicy,requestId:u.requestId}),n.flushMeasurement(),u}).catch(function(u){throw h.activeSilentTokenRequests.delete(s),n.endMeasurement({errorCode:u.errorCode,subErrorCode:u.subError,success:!1}),n.flushMeasurement(),u}),this.activeSilentTokenRequests.set(s,l),[2,l]):(this.logger.verbose("acquireTokenSilent has been called previously, returning the result from the first call",i),n.endMeasurement({success:!0}),n.discardMeasurement(),[2,c])})})},e.prototype.acquireTokenSilentAsync=function(t,i){return V(this,void 0,void 0,function(){var n,a,o,s,c,l,h=this;return S(this,function(d){switch(d.label){case 0:return this.eventHandler.emitEvent(ie.ACQUIRE_TOKEN_START,W.Silent,t),n=this.performanceClient.startMeasurement(St.AcquireTokenSilentAsync,t.correlationId),ba.isNativeAvailable(this.config,this.logger,this.nativeExtensionProvider,t.authenticationScheme)&&i.nativeAccountId?(this.logger.verbose("acquireTokenSilent - attempting to acquire token from native platform"),o=Y(Y({},t),{account:i}),a=this.acquireTokenNative(o,je.acquireTokenSilent_silentFlow).catch(function(u){return V(h,void 0,void 0,function(){var v;return S(this,function(m){if(u instanceof ii&&u.isFatal())return this.logger.verbose("acquireTokenSilent - native platform unavailable, falling back to web flow"),this.nativeExtensionProvider=void 0,v=this.createSilentIframeClient(t.correlationId),[2,v.acquireToken(t)];throw u})})}),[3,3]):[3,1];case 1:return this.logger.verbose("acquireTokenSilent - attempting to acquire token from web flow"),s=this.createSilentCacheClient(t.correlationId),[4,s.initializeSilentRequest(t,i)];case 2:c=d.sent(),l=Y(Y({},t),{cacheLookupPolicy:t.cacheLookupPolicy||E1.Default}),a=this.acquireTokenFromCache(s,c,l).catch(function(u){if(l.cacheLookupPolicy===E1.AccessToken)throw u;return lt.blockReloadInHiddenIframes(),h.eventHandler.emitEvent(ie.ACQUIRE_TOKEN_NETWORK_START,W.Silent,c),h.acquireTokenByRefreshToken(c,l).catch(function(v){var m=v instanceof Aa,f=v instanceof Tr,C=v.errorCode===$r.INVALID_GRANT_ERROR;if((!m||!C||f||l.cacheLookupPolicy===E1.AccessTokenAndRefreshToken||l.cacheLookupPolicy===E1.RefreshToken)&&l.cacheLookupPolicy!==E1.Skip)throw v;return h.logger.verbose("Refresh token expired/invalid or CacheLookupPolicy is set to Skip, attempting acquire token by iframe.",t.correlationId),h.acquireTokenBySilentIframe(c)})}),d.label=3;case 3:return[2,a.then(function(u){return h.eventHandler.emitEvent(ie.ACQUIRE_TOKEN_SUCCESS,W.Silent,u),n.endMeasurement({success:!0,fromCache:u.fromCache,isNativeBroker:u.fromNativeBroker,requestId:u.requestId}),u}).catch(function(u){throw h.eventHandler.emitEvent(ie.ACQUIRE_TOKEN_FAILURE,W.Silent,null,u),n.endMeasurement({errorCode:u.errorCode,subErrorCode:u.subError,success:!1}),u})]}})})},e}(FH);const Pm="redirect";var Am=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(a){return a instanceof t?a:new t(function(o){o(a)})}return new(t||(t=Promise))(function(a,o){function s(h){try{l(i.next(h))}catch(d){o(d)}}function c(h){try{l(i.throw(h))}catch(d){o(d)}}function l(h){h.done?a(h.value):n(h.value).then(s,c)}l((i=i.apply(r,e||[])).next())})};class jH extends BH{get account(){return this.getAllAccounts().find(i=>{var n;return((n=i.idTokenClaims)===null||n===void 0?void 0:n.aud)===this.clientId})}get hasValidClaims(){var e;const t=(e=this.account)===null||e===void 0?void 0:e.idTokenClaims;if(t){const i=Math.ceil(Date.now()/1e3);return t.exp>i}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,t){super(t),this.tenantId=e}login(e,t=Pm,i=!0){var n;return Am(this,void 0,void 0,function*(){const a=(e==null?void 0:e.loginHint)||((n=this.account)===null||n===void 0?void 0:n.username),o=(e==null?void 0:e.scopes)||[],s=Object.assign(Object.assign({},e),{loginHint:a,scopes:o});if(a&&i){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 [${t}]`),t){case"popup":return this.loginPopup(s);case"redirect":return this.loginRedirect(s)}})}acquireToken(e={scopes:[]},t=Pm,i=!0){return Am(this,void 0,void 0,function*(){const n=yield this.account;if(i&&n){this.logger.verbose("Attempting to acquire token in silently");try{return yield this.acquireTokenSilent(Object.assign({account:n},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 [${t}]`),t){case"popup":return this.acquireTokenPopup(e);case"redirect":return this.acquireTokenRedirect(e)}})}}const qH=(r,e=window.location.origin)=>{r=r.match(/^http[s]?/)?r:e+r;const{origin:t,pathname:i}=new URL(r);return t+i.replace(/([^:]\/)\/+/g,"$1")},GH=(r,e,t,i,n)=>{const a=Object.assign({clientId:e,redirectUri:qH(t||""),navigateToLoginRequestUrl:!1,authority:`https://login.microsoftonline.com/${r}`},i==null?void 0:i.auth),o=Object.assign({cacheLocation:"localStorage"},i==null?void 0:i.cache),s=i==null?void 0:i.system;return new(n||jH)(r,{auth:a,cache:o,system:s})};class K_ extends n6{constructor(e){super({logLevel:e,loggerCallback:(...t)=>this.loggerCallback(...t)}),this.getLogType=t=>{switch(t){case ot.Error:return"error";case ot.Warning:return"warn";case ot.Info:return"info";case ot.Verbose:default:return"debug"}}}loggerCallback(e,t,i){console[this.getLogType(e)]("%c FUSION::MSAL %c %s","border: 1px solid;","border: none;",t)}}var Pd=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(a){return a instanceof t?a:new t(function(o){o(a)})}return new(t||(t=Promise))(function(a,o){function s(h){try{l(i.next(h))}catch(d){o(d)}}function c(h){try{l(i.throw(h))}catch(d){o(d)}}function l(h){h.done?a(h.value):n(h.value).then(s,c)}l((i=i.apply(r,e||[])).next())})};const KH="default";class WH{get defaultClient(){return this.getClient(KH)}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 t=e?this._config.getClientConfig(e):this._config.defaultConfig;if(!t)throw Error("Could not find any config");const i=GH(t.tenantId,t.clientId,t.redirectUri,t.config);return i.setLogger(new K_(0)),i}handleRedirect(){return Pd(this,void 0,void 0,function*(){const{redirectUri:e}=this.defaultConfig||{};if(window.location.pathname===e){const t=this.defaultClient,i=t.getLogger(),{requestOrigin:n}=t;yield t.handleRedirectPromise(),n===e?(i.warning(`detected callback loop from url ${e}, redirecting to root`),window.location.replace("/")):window.location.replace(n||"/")}return null})}acquireToken(e){return this.defaultClient.acquireToken(e)}acquireAccessToken(e){return Pd(this,void 0,void 0,function*(){const t=yield this.acquireToken(e);return t?t.accessToken:void 0})}login(){return Pd(this,void 0,void 0,function*(){yield this.defaultClient.login()})}}var YH=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(a){return a instanceof t?a:new t(function(o){o(a)})}return new(t||(t=Promise))(function(a,o){function s(h){try{l(i.next(h))}catch(d){o(d)}}function c(h){try{l(i.throw(h))}catch(d){o(d)}}function l(h){h.done?a(h.value):n(h.value).then(s,c)}l((i=i.apply(r,e||[])).next())})};const W_={name:"auth",configure:r=>{var e;const t=new RC;return!((e=r==null?void 0:r.auth)===null||e===void 0)&&e.defaultConfig&&t.configureDefault(r.auth.defaultConfig),t},initialize:({config:r})=>YH(void 0,void 0,void 0,function*(){const e=new WH(r);return r.requiresAuth&&(yield e.handleRedirect(),e.defaultAccount||(yield e.login())),e})},QH=(r,e)=>({module:W_,configure:t=>{t.configureDefault(r),(e==null?void 0:e.requiresAuth)!==void 0&&(t.requiresAuth=e==null?void 0:e.requiresAuth);const{clients:i}=e??{};i&&Object.entries(i).forEach(([n,a])=>t.configureClient(n,a))}});var s6=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(a){return a instanceof t?a:new t(function(o){o(a)})}return new(t||(t=Promise))(function(a,o){function s(h){try{l(i.next(h))}catch(d){o(d)}}function c(h){try{l(i.throw(h))}catch(d){o(d)}}function l(h){h.done?a(h.value):n(h.value).then(s,c)}l((i=i.apply(r,e||[])).next())})};const XH=r=>{var e;return{id:r.id,isChildType:r.isChildType,parentTypeIds:(e=r.parentTypeIds)!==null&&e!==void 0?e:[]}},c6=r=>{var e,t,i,n;return{id:r.id,externalId:(e=r.externalId)!==null&&e!==void 0?e:void 0,isActive:r.isActive,isDeleted:r.isDeleted,created:new Date(r.created),source:(t=r.source)!==null&&t!==void 0?t:void 0,title:(i=r.title)!==null&&i!==void 0?i:void 0,type:XH(r.type),value:(n=r.value)!==null&&n!==void 0?n:{}}},JH=r=>s6(void 0,void 0,void 0,function*(){const e=yield r.json();return c6(e)}),ZH=r=>s6(void 0,void 0,void 0,function*(){return(yield r.json()).map(c6)}),ek=r=>s6(void 0,void 0,void 0,function*(){return(yield r.json()).map(c6)});var tk=globalThis&&globalThis.__classPrivateFieldSet||function(r,e,t,i,n){if(i==="m")throw new TypeError("Private method is not writable");if(i==="a"&&!n)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?r!==e||!n:!e.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return i==="a"?n.call(r,t):n?n.value=t:e.set(r,t),t},rk=globalThis&&globalThis.__classPrivateFieldGet||function(r,e,t,i){if(t==="a"&&!i)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?r!==e||!i:!e.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?i:t==="a"?i.call(r):i?i.value:e.get(r)},Hh;class ik{constructor(e,t={}){this.config=t,Hh.set(this,void 0),tk(this,Hh,e,"f")}requireInstance(e){return rk(this,Hh,"f").requireInstance(e)}setContextType(e){this.config.contextType=e}setContextFilter(e){this.config.contextFilter=e}setContextParameterFn(e){this.config.contextParameterFn=e}setValidateContext(e){this.config.validateContext=e}setResolveContext(e){this.config.resolveContext=e}setContextClient(e,t=1*60*1e3){this.config.client={get:typeof e.get=="function"?{key:({id:i})=>i,client:{fn:e.get},expire:t}:e.get,query:typeof e.query=="function"?{key:i=>JSON.stringify(i),client:{fn:e.query},expire:t}:e.query},e.related&&(this.config.client.related=typeof e.related=="function"?{key:i=>JSON.stringify(i),client:{fn:e.related},expire:t}:e.related)}}Hh=new WeakMap;var Wl=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(a){return a instanceof t?a:new t(function(o){o(a)})}return new(t||(t=Promise))(function(a,o){function s(h){try{l(i.next(h))}catch(d){o(d)}}function c(h){try{l(i.throw(h))}catch(d){o(d)}}function l(h){h.done?a(h.value):n(h.value).then(s,c)}l((i=i.apply(r,e||[])).next())})},Vm=globalThis&&globalThis.__classPrivateFieldGet||function(r,e,t,i){if(t==="a"&&!i)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?r!==e||!i:!e.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?i:t==="a"?i.call(r):i?i.value:e.get(r)},kh;class nk{constructor(){this.defaultExpireTime=1*60*1e3,kh.set(this,[])}addConfigBuilder(e){Vm(this,kh,"f").push(e)}_getServiceProvider(e){var t;return Wl(this,void 0,void 0,function*(){if(e.hasModule("services"))return e.requireInstance("services");{const i=(t=e.ref)===null||t===void 0?void 0:t.services;if(i)return i;throw Error("no service services provider configures [ServicesModule]")}})}createConfig(e){var t;return Wl(this,void 0,void 0,function*(){const i=yield Vm(this,kh,"f").reduce((n,a)=>Wl(this,void 0,void 0,function*(){const o=new ik(e,yield n);return yield Promise.resolve(a(o)),Object.assign(n,o.config)}),Promise.resolve({}));return(t=i.client)!==null&&t!==void 0||(i.client=yield(()=>Wl(this,void 0,void 0,function*(){const a=yield(yield this._getServiceProvider(e)).createContextClient("json$");return{get:{client:{fn:o=>a.get("v1",o,{selector:JH})},key:({id:o})=>o,expire:this.defaultExpireTime},query:{client:{fn:o=>a.query("v1",{query:o},{selector:ZH})},key:o=>JSON.stringify(o),expire:this.defaultExpireTime},related:{client:{fn:o=>a.related("v1",{id:o.item.id,query:{filter:o.filter}},{selector:ek})},key:o=>JSON.stringify(o),expire:this.defaultExpireTime}}}))()),i})}}kh=new WeakMap;var ak=function r(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var i,n,a;if(Array.isArray(e)){if(i=e.length,i!=t.length)return!1;for(n=i;n--!==0;)if(!r(e[n],t[n]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if(a=Object.keys(e),i=a.length,i!==Object.keys(t).length)return!1;for(n=i;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,a[n]))return!1;for(n=i;n--!==0;){var o=a[n];if(!r(e[o],t[o]))return!1}return!0}return e!==e&&t!==t},Sm;(function(r){r.IDLE="idle",r.ACTIVE="active",r.FAILED="failed",r.CANCELED="canceled"})(Sm||(Sm={}));const ok=r=>e=>e.pipe(hC(r)),sk=r=>e=>e.pipe(di(r)),ck=r=>e=>e.pipe(L1(r)),lk=r=>r.pipe($e(e=>e.value));var Yl,hk=new Uint8Array(16);function dk(){if(!Yl&&(Yl=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!Yl))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Yl(hk)}const uk=/^(?:[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 Y_(r){return typeof r=="string"&&uk.test(r)}var Ft=[];for(var Ad=0;Ad<256;++Ad)Ft.push((Ad+256).toString(16).substr(1));function Q_(r){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,t=(Ft[r[e+0]]+Ft[r[e+1]]+Ft[r[e+2]]+Ft[r[e+3]]+"-"+Ft[r[e+4]]+Ft[r[e+5]]+"-"+Ft[r[e+6]]+Ft[r[e+7]]+"-"+Ft[r[e+8]]+Ft[r[e+9]]+"-"+Ft[r[e+10]]+Ft[r[e+11]]+Ft[r[e+12]]+Ft[r[e+13]]+Ft[r[e+14]]+Ft[r[e+15]]).toLowerCase();if(!Y_(t))throw TypeError("Stringified UUID is invalid");return t}function vk(r){if(!Y_(r))throw TypeError("Invalid UUID");var e,t=new Uint8Array(16);return t[0]=(e=parseInt(r.slice(0,8),16))>>>24,t[1]=e>>>16&255,t[2]=e>>>8&255,t[3]=e&255,t[4]=(e=parseInt(r.slice(9,13),16))>>>8,t[5]=e&255,t[6]=(e=parseInt(r.slice(14,18),16))>>>8,t[7]=e&255,t[8]=(e=parseInt(r.slice(19,23),16))>>>8,t[9]=e&255,t[10]=(e=parseInt(r.slice(24,36),16))/1099511627776&255,t[11]=e/4294967296&255,t[12]=e>>>24&255,t[13]=e>>>16&255,t[14]=e>>>8&255,t[15]=e&255,t}function mk(r){r=unescape(encodeURIComponent(r));for(var e=[],t=0;t<r.length;++t)e.push(r.charCodeAt(t));return e}var fk="6ba7b810-9dad-11d1-80b4-00c04fd430c8",pk="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function gk(r,e,t){function i(n,a,o,s){if(typeof n=="string"&&(n=mk(n)),typeof a=="string"&&(a=vk(a)),a.length!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var c=new Uint8Array(16+n.length);if(c.set(a),c.set(n,a.length),c=t(c),c[6]=c[6]&15|e,c[8]=c[8]&63|128,o){s=s||0;for(var l=0;l<16;++l)o[s+l]=c[l];return o}return Q_(c)}try{i.name=r}catch{}return i.DNS=fk,i.URL=pk,i}function X_(r,e,t){r=r||{};var i=r.random||(r.rng||dk)();if(i[6]=i[6]&15|64,i[8]=i[8]&63|128,e){t=t||0;for(var n=0;n<16;++n)e[t+n]=i[n];return e}return Q_(i)}function _k(r,e,t,i){switch(r){case 0:return e&t^~e&i;case 1:return e^t^i;case 2:return e&t^e&i^t&i;case 3:return e^t^i}}function Vd(r,e){return r<<e|r>>>32-e}function zk(r){var e=[1518500249,1859775393,2400959708,3395469782],t=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof r=="string"){var i=unescape(encodeURIComponent(r));r=[];for(var n=0;n<i.length;++n)r.push(i.charCodeAt(n))}else Array.isArray(r)||(r=Array.prototype.slice.call(r));r.push(128);for(var a=r.length/4+2,o=Math.ceil(a/16),s=new Array(o),c=0;c<o;++c){for(var l=new Uint32Array(16),h=0;h<16;++h)l[h]=r[c*64+h*4]<<24|r[c*64+h*4+1]<<16|r[c*64+h*4+2]<<8|r[c*64+h*4+3];s[c]=l}s[o-1][14]=(r.length-1)*8/Math.pow(2,32),s[o-1][14]=Math.floor(s[o-1][14]),s[o-1][15]=(r.length-1)*8&4294967295;for(var d=0;d<o;++d){for(var u=new Uint32Array(80),v=0;v<16;++v)u[v]=s[d][v];for(var m=16;m<80;++m)u[m]=Vd(u[m-3]^u[m-8]^u[m-14]^u[m-16],1);for(var f=t[0],C=t[1],_=t[2],p=t[3],z=t[4],M=0;M<80;++M){var A=Math.floor(M/20),I=Vd(f,5)+_k(A,C,_,p)+z+e[A]+u[M]>>>0;z=p,p=_,_=Vd(C,30)>>>0,C=f,f=I}t[0]=t[0]+f>>>0,t[1]=t[1]+C>>>0,t[2]=t[2]+_>>>0,t[3]=t[3]+p>>>0,t[4]=t[4]+z>>>0}return[t[0]>>24&255,t[0]>>16&255,t[0]>>8&255,t[0]&255,t[1]>>24&255,t[1]>>16&255,t[1]>>8&255,t[1]&255,t[2]>>24&255,t[2]>>16&255,t[2]>>8&255,t[2]&255,t[3]>>24&255,t[3]>>16&255,t[3]>>8&255,t[3]&255,t[4]>>24&255,t[4]>>16&255,t[4]>>8&255,t[4]&255]}var yk=gk("v5",80,zk);const wk=yk;class Z3 extends Error{constructor(e,t){super(t.message,{cause:t.cause}),this.type=e,this.request=t.request}}const To=(...r)=>Xt(e=>r.includes(e.type));var o1=globalThis&&globalThis.__classPrivateFieldGet||function(r,e,t,i){if(t==="a"&&!i)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?r!==e||!i:!e.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?i:t==="a"?i.call(r):i?i.value:e.get(r)},bk=globalThis&&globalThis.__classPrivateFieldSet||function(r,e,t,i,n){if(i==="m")throw new TypeError("Private method is not writable");if(i==="a"&&!n)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?r!==e||!n:!e.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return i==="a"?n.call(r,t):n?n.value=t:e.set(r,t),t},Qr,kr;class M4 extends Ee{get action$(){return o1(this,Qr,"f").asObservable()}get value(){return o1(this,kr,"f").value}get closed(){return o1(this,kr,"f").closed||o1(this,Qr,"f").closed}constructor(e,t){super(n=>o1(this,kr,"f").subscribe(n)),Qr.set(this,new $i),kr.set(this,void 0);const i="getInitialState"in e?e.getInitialState():t;bk(this,kr,new Do(i),"f"),o1(this,Qr,"f").pipe(E_(e,i),k_()).subscribe(o1(this,kr,"f")),this.reset=()=>o1(this,kr,"f").next(i)}next(e){o1(this,Qr,"f").next(e)}addEffect(e,t){const i=typeof e=="string"?this.action$.pipe(To(e)):this.action$,n=t||e;return i.pipe(di(a=>y1(new Promise((o,s)=>{try{o(n(a,this.value))}catch(c){s(c)}})).pipe(Z1(o=>(console.warn("unhandled effect",o),Ui)))),Xt(a=>!!a),_0(g0)).subscribe(o1(this,Qr,"f"))}addEpic(e){return this.addFlow(e)}addFlow(e){const t=e(this.action$,this);if(!t)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 t.pipe(Z1(i=>(console.trace("unhandled exception, epic closed!",i),Ui)),_0(g0)).subscribe(o1(this,Qr,"f"))}unsubscribe(){o1(this,Qr,"f").unsubscribe(),o1(this,kr,"f").unsubscribe()}complete(){o1(this,Qr,"f").complete(),o1(this,kr,"f").complete()}asObservable(){return o1(this,kr,"f").asObservable()}}Qr=new WeakMap,kr=new WeakMap;const J_=(r,e)=>Object.entries(r).reduce((t,[i,n])=>Object.assign(t,{[i]:typeof n=="function"?(...a)=>e.next(n(...a)):J_(n,e)}),{});function Gt(r,e){function t(...i){if(e){const n=e(...i);if(!n)throw new Error("prepareAction did not return an object");return Object.assign(Object.assign({type:r,payload:n.payload},"meta"in n&&{meta:n.meta}),"error"in n&&{error:n.error})}return{type:r,payload:i[0]}}return t.toString=()=>`${r}`,t.type=r,t.match=i=>i.type===r,t}const Eh="::",l6=r=>new RegExp(`${Eh}\\${r}$`),$m=r=>r.type.replace(l6("\\w+$"),"");function pn(r,e,t,i){const n=Gt([r,"request"].join(Eh),e);return t&&Object.assign(n,{success:Gt([r,"success"].join(Eh),t)}),i&&Object.assign(n,{failure:Gt([r,"failure"].join(Eh),i)}),n}const xk=r=>!!r.type.match(/::request$/),Mk=r=>!!r.type.match(l6("success")),Ck=r=>!!r.type.match(l6("failure")),Hk=r=>Mk(r)||Ck(r);function K1(r){for(var e=arguments.length,t=Array(e>1?e-1:0),i=1;i<e;i++)t[i-1]=arguments[i];throw Error("[Immer] minified error nr: "+r+(t.length?" "+t.map(function(n){return"'"+n+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Vn(r){return!!r&&!!r[Pe]}function Nr(r){var e;return!!r&&(function(t){if(!t||typeof t!="object")return!1;var i=Object.getPrototypeOf(t);if(i===null)return!0;var n=Object.hasOwnProperty.call(i,"constructor")&&i.constructor;return n===Object||typeof n=="function"&&Function.toString.call(n)===Tk}(r)||Array.isArray(r)||!!r[Um]||!!(!((e=r.constructor)===null||e===void 0)&&e[Um])||h6(r)||d6(r))}function Dm(r){return Vn(r)||K1(23,r),r[Pe].t}function io(r,e,t){t===void 0&&(t=!1),Io(r)===0?(t?Object.keys:p6)(r).forEach(function(i){t&&typeof i=="symbol"||e(i,r[i],r)}):r.forEach(function(i,n){return e(n,i,r)})}function Io(r){var e=r[Pe];return e?e.i>3?e.i-4:e.i:Array.isArray(r)?1:h6(r)?2:d6(r)?3:0}function eu(r,e){return Io(r)===2?r.has(e):Object.prototype.hasOwnProperty.call(r,e)}function kk(r,e){return Io(r)===2?r.get(e):r[e]}function Z_(r,e,t){var i=Io(r);i===2?r.set(e,t):i===3?r.add(t):r[e]=t}function Ek(r,e){return r===e?r!==0||1/r==1/e:r!=r&&e!=e}function h6(r){return Dk&&r instanceof Map}function d6(r){return Lk&&r instanceof Set}function Lt(r){return r.o||r.t}function u6(r){if(Array.isArray(r))return Array.prototype.slice.call(r);var e=Ik(r);delete e[Pe];for(var t=p6(e),i=0;i<t.length;i++){var n=t[i],a=e[n];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(e[n]={configurable:!0,writable:!0,enumerable:a.enumerable,value:r[n]})}return Object.create(Object.getPrototypeOf(r),e)}function v6(r,e){return e===void 0&&(e=!1),m6(r)||Vn(r)||!Nr(r)||(Io(r)>1&&(r.set=r.add=r.clear=r.delete=Pk),Object.freeze(r),e&&io(r,function(t,i){return v6(i,!0)},!0)),r}function Pk(){K1(2)}function m6(r){return r==null||typeof r!="object"||Object.isFrozen(r)}function li(r){var e=ru[r];return e||K1(18,r),e}function Ak(r,e){ru[r]||(ru[r]=e)}function L0(){return Ac}function Sd(r,e){e&&(li("Patches"),r.u=[],r.s=[],r.v=e)}function T0(r){tu(r),r.p.forEach(Vk),r.p=null}function tu(r){r===Ac&&(Ac=r.l)}function Lm(r){return Ac={p:[],l:Ac,h:r,m:!0,_:0}}function Vk(r){var e=r[Pe];e.i===0||e.i===1?e.j():e.O=!0}function $d(r,e){e._=e.p.length;var t=e.p[0],i=r!==void 0&&r!==t;return e.h.g||li("ES5").S(e,r,i),i?(t[Pe].P&&(T0(e),K1(4)),Nr(r)&&(r=I0(e,r),e.l||R0(e,r)),e.u&&li("Patches").M(t[Pe].t,r,e.u,e.s)):r=I0(e,t,[]),T0(e),e.u&&e.v(e.u,e.s),r!==ez?r:void 0}function I0(r,e,t){if(m6(e))return e;var i=e[Pe];if(!i)return io(e,function(s,c){return Tm(r,i,e,s,c,t)},!0),e;if(i.A!==r)return e;if(!i.P)return R0(r,i.t,!0),i.t;if(!i.I){i.I=!0,i.A._--;var n=i.i===4||i.i===5?i.o=u6(i.k):i.o,a=n,o=!1;i.i===3&&(a=new Set(n),n.clear(),o=!0),io(a,function(s,c){return Tm(r,i,n,s,c,t,o)}),R0(r,n,!1),t&&r.u&&li("Patches").N(i,t,r.u,r.s)}return i.o}function Tm(r,e,t,i,n,a,o){if(Vn(n)){var s=I0(r,n,a&&e&&e.i!==3&&!eu(e.R,i)?a.concat(i):void 0);if(Z_(t,i,s),!Vn(s))return;r.m=!1}else o&&t.add(n);if(Nr(n)&&!m6(n)){if(!r.h.D&&r._<1)return;I0(r,n),e&&e.A.l||R0(r,n)}}function R0(r,e,t){t===void 0&&(t=!1),!r.l&&r.h.D&&r.m&&v6(e,t)}function Dd(r,e){var t=r[Pe];return(t?Lt(t):r)[e]}function Im(r,e){if(e in r)for(var t=Object.getPrototypeOf(r);t;){var i=Object.getOwnPropertyDescriptor(t,e);if(i)return i;t=Object.getPrototypeOf(t)}}function Ci(r){r.P||(r.P=!0,r.l&&Ci(r.l))}function Ld(r){r.o||(r.o=u6(r.t))}function Pc(r,e,t){var i=h6(e)?li("MapSet").F(e,t):d6(e)?li("MapSet").T(e,t):r.g?function(n,a){var o=Array.isArray(n),s={i:o?1:0,A:a?a.A:L0(),P:!1,I:!1,R:{},l:a,t:n,k:null,o:null,j:null,C:!1},c=s,l=iu;o&&(c=[s],l=xs);var h=Proxy.revocable(c,l),d=h.revoke,u=h.proxy;return s.k=u,s.j=d,u}(e,t):li("ES5").J(e,t);return(t?t.A:L0()).p.push(i),i}function Sk(r){return Vn(r)||K1(22,r),function e(t){if(!Nr(t))return t;var i,n=t[Pe],a=Io(t);if(n){if(!n.P&&(n.i<4||!li("ES5").K(n)))return n.t;n.I=!0,i=Rm(t,a),n.I=!1}else i=Rm(t,a);return io(i,function(o,s){n&&kk(n.t,o)===s||Z_(i,o,e(s))}),a===3?new Set(i):i}(r)}function Rm(r,e){switch(e){case 2:return new Map(r);case 3:return Array.from(r)}return u6(r)}function $k(){function r(s,c){function l(){this.constructor=s}n(s,c),s.prototype=(l.prototype=c.prototype,new l)}function e(s){s.o||(s.R=new Map,s.o=new Map(s.t))}function t(s){s.o||(s.o=new Set,s.t.forEach(function(c){if(Nr(c)){var l=Pc(s.A.h,c,s);s.p.set(c,l),s.o.add(l)}else s.o.add(c)}))}function i(s){s.O&&K1(3,JSON.stringify(Lt(s)))}var n=function(s,c){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,h){l.__proto__=h}||function(l,h){for(var d in h)h.hasOwnProperty(d)&&(l[d]=h[d])})(s,c)},a=function(){function s(l,h){return this[Pe]={i:2,l:h,A:h?h.A:L0(),P:!1,I:!1,o:void 0,R:void 0,t:l,k:this,C:!1,O:!1},this}r(s,Map);var c=s.prototype;return Object.defineProperty(c,"size",{get:function(){return Lt(this[Pe]).size}}),c.has=function(l){return Lt(this[Pe]).has(l)},c.set=function(l,h){var d=this[Pe];return i(d),Lt(d).has(l)&&Lt(d).get(l)===h||(e(d),Ci(d),d.R.set(l,!0),d.o.set(l,h),d.R.set(l,!0)),this},c.delete=function(l){if(!this.has(l))return!1;var h=this[Pe];return i(h),e(h),Ci(h),h.t.has(l)?h.R.set(l,!1):h.R.delete(l),h.o.delete(l),!0},c.clear=function(){var l=this[Pe];i(l),Lt(l).size&&(e(l),Ci(l),l.R=new Map,io(l.t,function(h){l.R.set(h,!1)}),l.o.clear())},c.forEach=function(l,h){var d=this;Lt(this[Pe]).forEach(function(u,v){l.call(h,d.get(v),v,d)})},c.get=function(l){var h=this[Pe];i(h);var d=Lt(h).get(l);if(h.I||!Nr(d)||d!==h.t.get(l))return d;var u=Pc(h.A.h,d,h);return e(h),h.o.set(l,u),u},c.keys=function(){return Lt(this[Pe]).keys()},c.values=function(){var l,h=this,d=this.keys();return(l={})[Ql]=function(){return h.values()},l.next=function(){var u=d.next();return u.done?u:{done:!1,value:h.get(u.value)}},l},c.entries=function(){var l,h=this,d=this.keys();return(l={})[Ql]=function(){return h.entries()},l.next=function(){var u=d.next();if(u.done)return u;var v=h.get(u.value);return{done:!1,value:[u.value,v]}},l},c[Ql]=function(){return this.entries()},s}(),o=function(){function s(l,h){return this[Pe]={i:3,l:h,A:h?h.A:L0(),P:!1,I:!1,o:void 0,t:l,k:this,p:new Map,O:!1,C:!1},this}r(s,Set);var c=s.prototype;return Object.defineProperty(c,"size",{get:function(){return Lt(this[Pe]).size}}),c.has=function(l){var h=this[Pe];return i(h),h.o?!!h.o.has(l)||!(!h.p.has(l)||!h.o.has(h.p.get(l))):h.t.has(l)},c.add=function(l){var h=this[Pe];return i(h),this.has(l)||(t(h),Ci(h),h.o.add(l)),this},c.delete=function(l){if(!this.has(l))return!1;var h=this[Pe];return i(h),t(h),Ci(h),h.o.delete(l)||!!h.p.has(l)&&h.o.delete(h.p.get(l))},c.clear=function(){var l=this[Pe];i(l),Lt(l).size&&(t(l),Ci(l),l.o.clear())},c.values=function(){var l=this[Pe];return i(l),t(l),l.o.values()},c.entries=function(){var l=this[Pe];return i(l),t(l),l.o.entries()},c.keys=function(){return this.values()},c[Ql]=function(){return this.values()},c.forEach=function(l,h){for(var d=this.values(),u=d.next();!u.done;)l.call(h,u.value,u.value,this),u=d.next()},s}();Ak("MapSet",{F:function(s,c){return new a(s,c)},T:function(s,c){return new o(s,c)}})}var Om,Ac,f6=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",Dk=typeof Map<"u",Lk=typeof Set<"u",Nm=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",ez=f6?Symbol.for("immer-nothing"):((Om={})["immer-nothing"]=!0,Om),Um=f6?Symbol.for("immer-draftable"):"__$immer_draftable",Pe=f6?Symbol.for("immer-state"):"__$immer_state",Ql=typeof Symbol<"u"&&Symbol.iterator||"@@iterator",Tk=""+Object.prototype.constructor,p6=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(r){return Object.getOwnPropertyNames(r).concat(Object.getOwnPropertySymbols(r))}:Object.getOwnPropertyNames,Ik=Object.getOwnPropertyDescriptors||function(r){var e={};return p6(r).forEach(function(t){e[t]=Object.getOwnPropertyDescriptor(r,t)}),e},ru={},iu={get:function(r,e){if(e===Pe)return r;var t=Lt(r);if(!eu(t,e))return function(n,a,o){var s,c=Im(a,o);return c?"value"in c?c.value:(s=c.get)===null||s===void 0?void 0:s.call(n.k):void 0}(r,t,e);var i=t[e];return r.I||!Nr(i)?i:i===Dd(r.t,e)?(Ld(r),r.o[e]=Pc(r.A.h,i,r)):i},has:function(r,e){return e in Lt(r)},ownKeys:function(r){return Reflect.ownKeys(Lt(r))},set:function(r,e,t){var i=Im(Lt(r),e);if(i!=null&&i.set)return i.set.call(r.k,t),!0;if(!r.P){var n=Dd(Lt(r),e),a=n==null?void 0:n[Pe];if(a&&a.t===t)return r.o[e]=t,r.R[e]=!1,!0;if(Ek(t,n)&&(t!==void 0||eu(r.t,e)))return!0;Ld(r),Ci(r)}return r.o[e]===t&&(t!==void 0||e in r.o)||Number.isNaN(t)&&Number.isNaN(r.o[e])||(r.o[e]=t,r.R[e]=!0),!0},deleteProperty:function(r,e){return Dd(r.t,e)!==void 0||e in r.t?(r.R[e]=!1,Ld(r),Ci(r)):delete r.R[e],r.o&&delete r.o[e],!0},getOwnPropertyDescriptor:function(r,e){var t=Lt(r),i=Reflect.getOwnPropertyDescriptor(t,e);return i&&{writable:!0,configurable:r.i!==1||e!=="length",enumerable:i.enumerable,value:t[e]}},defineProperty:function(){K1(11)},getPrototypeOf:function(r){return Object.getPrototypeOf(r.t)},setPrototypeOf:function(){K1(12)}},xs={};io(iu,function(r,e){xs[r]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),xs.deleteProperty=function(r,e){return xs.set.call(this,r,e,void 0)},xs.set=function(r,e,t){return iu.set.call(this,r[0],e,t,r[0])};var Rk=function(){function r(t){var i=this;this.g=Nm,this.D=!0,this.produce=function(n,a,o){if(typeof n=="function"&&typeof a!="function"){var s=a;a=n;var c=i;return function(f){var C=this;f===void 0&&(f=s);for(var _=arguments.length,p=Array(_>1?_-1:0),z=1;z<_;z++)p[z-1]=arguments[z];return c.produce(f,function(M){var A;return(A=a).call.apply(A,[C,M].concat(p))})}}var l;if(typeof a!="function"&&K1(6),o!==void 0&&typeof o!="function"&&K1(7),Nr(n)){var h=Lm(i),d=Pc(i,n,void 0),u=!0;try{l=a(d),u=!1}finally{u?T0(h):tu(h)}return typeof Promise<"u"&&l instanceof Promise?l.then(function(f){return Sd(h,o),$d(f,h)},function(f){throw T0(h),f}):(Sd(h,o),$d(l,h))}if(!n||typeof n!="object"){if((l=a(n))===void 0&&(l=n),l===ez&&(l=void 0),i.D&&v6(l,!0),o){var v=[],m=[];li("Patches").M(n,l,v,m),o(v,m)}return l}K1(21,n)},this.produceWithPatches=function(n,a){if(typeof n=="function")return function(l){for(var h=arguments.length,d=Array(h>1?h-1:0),u=1;u<h;u++)d[u-1]=arguments[u];return i.produceWithPatches(l,function(v){return n.apply(void 0,[v].concat(d))})};var o,s,c=i.produce(n,a,function(l,h){o=l,s=h});return typeof Promise<"u"&&c instanceof Promise?c.then(function(l){return[l,o,s]}):[c,o,s]},typeof(t==null?void 0:t.useProxies)=="boolean"&&this.setUseProxies(t.useProxies),typeof(t==null?void 0:t.autoFreeze)=="boolean"&&this.setAutoFreeze(t.autoFreeze)}var e=r.prototype;return e.createDraft=function(t){Nr(t)||K1(8),Vn(t)&&(t=Sk(t));var i=Lm(this),n=Pc(this,t,void 0);return n[Pe].C=!0,tu(i),n},e.finishDraft=function(t,i){var n=t&&t[Pe],a=n.A;return Sd(a,i),$d(void 0,a)},e.setAutoFreeze=function(t){this.D=t},e.setUseProxies=function(t){t&&!Nm&&K1(20),this.g=t},e.applyPatches=function(t,i){var n;for(n=i.length-1;n>=0;n--){var a=i[n];if(a.path.length===0&&a.op==="replace"){t=a.value;break}}n>-1&&(i=i.slice(n+1));var o=li("Patches").$;return Vn(t)?o(t,i):this.produce(t,function(s){return o(s,i)})},r}(),er=new Rk,tz=er.produce;er.produceWithPatches.bind(er);er.setAutoFreeze.bind(er);er.setUseProxies.bind(er);er.applyPatches.bind(er);er.createDraft.bind(er);er.finishDraft.bind(er);function Fm(r){return Nr(r)?tz(r,()=>{}):r}function Ok(r){return typeof r=="function"}function il(r,e){const[t,i,n]=Nk(e);let a;if(Ok(r))a=()=>Fm(r());else{const s=Fm(r);a=()=>s}function o(s=a(),c){let l=[t[c.type],...i.filter(({matcher:h})=>h(c)).map(({reducer:h})=>h)];return l.filter(h=>!!h).length===0&&(l=[n]),l.reduce((h,d)=>{if(d)if(Vn(h)){const v=d(h,c);return v===void 0?h:v}else{if(Nr(h))return tz(h,u=>d(u,c));{const u=d(h,c);if(u===void 0){if(h===null)return h;throw Error("A case reducer on a non-draftable value must not return undefined")}return u}}return h},s)}return o.getInitialState=a,o}function Nk(r){const e={},t=[];let i;const n={addCase(a,o){const s=typeof a=="string"?a:a.type;if(s in e)throw new Error("addCase cannot be called with two reducers for the same action type");return e[s]=o,n},addMatcher(a,o){return t.push({matcher:a,reducer:o}),n},addDefaultCase(a){return i=a,n}};return r(n),[e,t,i]}function Uk(r,e){const t=typeof e=="function"?e:il(e.initial,a=>e.builder(a,r)),i=new M4(t),n=J_(r,i);return{actions:r,dispatch:n,subject:i}}const Fk=()=>({request:Gt("client/request",(e,t)=>{var i,n,a,o;return t??(t={}),(i=t.transaction)!==null&&i!==void 0||(t.transaction=X_()),(n=t.created)!==null&&n!==void 0||(t.created=Date.now()),(a=t.controller)!==null&&a!==void 0||(t.controller=new AbortController),(o=t.task)!==null&&o!==void 0||(t.task=new c_),{payload:e,meta:t}}),retry:Gt("client/retry",e=>({payload:e})),success:Gt("client/success",(e,t)=>({payload:e,meta:t})),cancel:Gt("client/cancel",e=>({payload:e})),failure:Gt("client/failure",(e,t)=>({payload:e,meta:t})),error:Gt("client/error",(e,t)=>({payload:e,meta:t}))}),gt=Fk(),rz=r=>e=>e.pipe(Xt(gt.request.match),di(t=>{const{meta:{controller:i,transaction:n}}=t;return new Ee(a=>{if(i.signal.aborted)return a.next(gt.cancel({transaction:n,reason:`request [${n}] was aborted!`})),a.complete();a.add(e.pipe(Xt(gt.cancel.match)).subscribe(o=>{o.payload.transaction===n&&(i.signal.aborted||i.abort(),a.complete())})),a.add(R3(i.signal,"abort").subscribe(()=>{a.next(gt.cancel({transaction:n,reason:`request [${n}] was aborted!`})),a.complete()})),a.add(y1(r(t)).subscribe({next:o=>a.next(o),error:o=>a.next(gt.error(o,{request:t})),complete:()=>a.complete()}))})})),Bk=r=>(r=Object.assign({},{count:0,delay:0},r),(e,t)=>e.pipe(rz(i=>e.pipe(Xt(gt.failure.match),Xt(n=>n.meta.request===i),A_(t),L1(([n,a])=>{var o,s;const{transaction:c}=i.meta,l=a[c];if(!l)return Ui;const h=(s=(o=l.retry)===null||o===void 0?void 0:o.length)!==null&&s!==void 0?s:0,d=Object.assign({},r,i.meta.retry);if(h>=d.count)throw d.count?Error("maximum retries executed!",{cause:n.payload}):n.payload;return(typeof d.delay=="function"?y1(d.delay(n.payload.cause)).pipe(Z1(v=>{throw Error("failed to resolve delay",{cause:v})})):cC(d.delay)).pipe($e(()=>gt.retry(i)))}))))),jk=r=>e=>e.pipe(rz(t=>y1(r(t.payload,t.meta.controller.signal)).pipe($e(i=>gt.success(i,{request:t})),Z1(i=>An(gt.failure(Error(`failed to execute request for transaction ${t.meta.transaction}`,{cause:i}),{request:t})))))),qk=r=>r.pipe(Xt(gt.retry.match),$e(e=>e.payload)),iz=()=>Xt(r=>r.status==="complete"),Gk=(r={})=>il(r,e=>e.addCase(gt.request,(t,i)=>{const{transaction:n,task:a,ref:o,created:s}=i.meta;t[n]={transaction:n,task:a,ref:o,created:s}}).addCase(gt.success,(t,i)=>{const{request:n}=i.meta,{transaction:a,ref:o}=n.meta,s=t[a];if(s){const c={status:"complete",transaction:a,ref:o,value:i.payload,args:n.payload,created:s.created,completed:Date.now()};s.task.next(c),s.task.complete()}delete t[a]}).addCase(gt.retry,(t,i)=>{var n;const{transaction:a}=i.payload.meta,o=t[a];o&&((n=o.retry)!==null&&n!==void 0||(o.retry=[]),o.retry.push(Date.now()))}).addCase(gt.cancel,(t,i)=>{const{transaction:n,reason:a}=i.payload;if(t[n]){const o=Object.assign({},Dm(t[n]));o.task.error(new Z3("abort",{request:o,message:a??"request was canceled"})),delete t[n]}}).addCase(gt.failure,(t,i)=>{var n;const{payload:a,meta:o}=i,{transaction:s}=o.request.meta,c=t[s];c&&((n=c.errors)!==null&&n!==void 0||(c.errors=[]),c.errors.push(a))}).addCase(gt.error,(t,i)=>{const{payload:n,meta:a}=i,{transaction:o}=a.request.meta;if(t[o]){const s=Object.assign({},Dm(t[o]));s.task.error(new Z3("error",{request:s,message:`failed to process task [${o}]`,cause:n.cause})),delete t[o]}}));var Kk=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(a){return a instanceof t?a:new t(function(o){o(a)})}return new(t||(t=Promise))(function(a,o){function s(h){try{l(i.next(h))}catch(d){o(d)}}function c(h){try{l(i.throw(h))}catch(d){o(d)}}function l(h){h.done?a(h.value):n(h.value).then(s,c)}l((i=i.apply(r,e||[])).next())})},dt=globalThis&&globalThis.__classPrivateFieldGet||function(r,e,t,i){if(t==="a"&&!i)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?r!==e||!i:!e.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?i:t==="a"?i.call(r):i?i.value:e.get(r)},Bm=globalThis&&globalThis.__classPrivateFieldSet||function(r,e,t,i,n){if(i==="m")throw new TypeError("Private method is not writable");if(i==="a"&&!n)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?r!==e||!n:!e.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return i==="a"?n.call(r,t):n?n.value=t:e.set(r,t),t},pt,oa;class jm extends Ee{get closed(){return dt(this,pt,"f").closed}get state$(){return dt(this,pt,"f")}get action$(){return dt(this,pt,"f").action$}get success$(){return this.action$.pipe(Xt(gt.success.match),$e(({payload:e})=>e))}get error$(){return this.action$.pipe(To("client/error"),A_(dt(this,pt,"f")),$e(([e,t])=>{const{payload:i,meta:n}=e,{transaction:a}=n.request.meta,o=t[e.meta.request.meta.transaction];return new Z3("error",{request:o,message:`failed to process task [${a}]`,cause:i})}))}constructor(e,t){super(a=>dt(this,pt,"f").subscribe(a)),pt.set(this,void 0),oa.set(this,void 0);const i={};Bm(this,pt,new M4(Gk(i)),"f"),Bm(this,oa,new U1(()=>dt(this,pt,"f").complete()),"f"),dt(this,oa,"f").add(dt(this,pt,"f").addFlow(jk(e))),dt(this,oa,"f").add(dt(this,pt,"f").addFlow(qk));const n=Object.assign({count:0,delay:0},t==null?void 0:t.retry);dt(this,oa,"f").add(dt(this,pt,"f").addFlow(Bk(n)))}next(e,t){const i=gt.request(e,t);return dt(this,pt,"f").next(i),i.meta}nextAsync(e,t){return Kk(this,void 0,void 0,function*(){return Lr(this.next(e,t).task.pipe(iz()))})}getTaskByTransaction(e){const t=dt(this,pt,"f").value[e];return t&&t.task}getTaskByRef(e){const t=Object.values(dt(this,pt,"f").value).find(i=>i.ref===e);return t&&t.task}cancel(e,t){if(e)e&&dt(this,pt,"f").value[e]&&(t??(t=`[${e}]: transaction canceled`),dt(this,pt,"f").next(gt.cancel({transaction:e,reason:t})));else for(const i of Object.keys(dt(this,pt,"f").value))this.cancel(i,"all transactions canceled")}on(e,t){return dt(this,pt,"f").addEffect(gt[e].type,i=>{t(i,this)})}complete(){dt(this,oa,"f").unsubscribe()}asObservable(){return dt(this,pt,"f").asObservable()}}pt=new WeakMap,oa=new WeakMap;function Wk(){return{set:Gt("cache/set",(r,e)=>({payload:{key:r,entry:e}})),remove:Gt("cache/remove",r=>({payload:r})),invalidate:Gt("cache/invalidate",r=>({payload:r})),trim:Gt("cache/trim",r=>({payload:r}))}}const Wa=Wk(),Yk=(r,e)=>{var t,i;return((t=e.updated)!==null&&t!==void 0?t:0)-((i=r.updated)!==null&&i!==void 0?i:0)};function Qk(r,e={}){return il(e,t=>t.addCase(r.set,(i,n)=>{var a;const{key:o,entry:s}=n.payload,c=i[o];c?(c.updated=Date.now(),(a=c.updates)!==null&&a!==void 0||(c.updates=0),c.updates++):i[o]=Object.assign(Object.assign({},s),{created:Date.now()})}).addCase(r.remove,(i,n)=>{delete i[n.payload]}).addCase(r.invalidate,(i,n)=>{const a=i[n.payload];a&&delete a.updated}).addCase(r.trim,(i,n)=>{var a,o;const{payload:s}=n,c=(a=s.sort)!==null&&a!==void 0?a:Yk,l=Object.keys(i),h=Object.entries(i).filter(([d,u])=>!s.validate||s.validate(u)).sort((d,u)=>c(d[1],u[1])).slice(0,(o=s.size)!==null&&o!==void 0?o:Number.MAX_SAFE_INTEGER).map(([d])=>d);if(l.length!==h.length)for(const d of l){const u=h.indexOf(d);u!==-1?h.splice(u,1):delete i[d]}}))}var Wr=globalThis&&globalThis.__classPrivateFieldGet||function(r,e,t,i){if(t==="a"&&!i)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?r!==e||!i:!e.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?i:t==="a"?i.call(r):i?i.value:e.get(r)},Xk=globalThis&&globalThis.__classPrivateFieldSet||function(r,e,t,i,n){if(i==="m")throw new TypeError("Private method is not writable");if(i==="a"&&!n)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?r!==e||!n:!e.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return i==="a"?n.call(r,t):n?n.value=t:e.set(r,t),t},q1;class qm{get state$(){return Wr(this,q1,"f").asObservable()}constructor(e){q1.set(this,void 0);const{trimming:t,initial:i}=e;Xk(this,q1,new M4(Qk(Wa,i)),"f"),t&&Wr(this,q1,"f").addEffect("cache/set",()=>Wr(this,q1,"f").next(Wa.trim(t)))}setItem(...e){Wr(this,q1,"f").next(Wa.set(...e))}getItem(e){return Wr(this,q1,"f").value[e]}removeItem(e){Wr(this,q1,"f").next(Wa.remove(e))}invalidate(e){Wr(this,q1,"f").next(Wa.invalidate(e))}trim(e){Wr(this,q1,"f").next(Wa.trim(e))}reset(){Wr(this,q1,"f").reset()}complete(){Wr(this,q1,"f").complete()}}q1=new WeakMap;var Ge=globalThis&&globalThis.__classPrivateFieldGet||function(r,e,t,i){if(t==="a"&&!i)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?r!==e||!i:!e.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?i:t==="a"?i.call(r):i?i.value:e.get(r)},Ya=globalThis&&globalThis.__classPrivateFieldSet||function(r,e,t,i,n){if(i==="m")throw new TypeError("Private method is not writable");if(i==="a"&&!n)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?r!==e||!n:!e.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return i==="a"?n.call(r,t):n?n.value=t:e.set(r,t),t},Jk=globalThis&&globalThis.__rest||function(r,e){var t={};for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&e.indexOf(i)<0&&(t[i]=r[i]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,i=Object.getOwnPropertySymbols(r);n<i.length;n++)e.indexOf(i[n])<0&&Object.prototype.propertyIsEnumerable.call(r,i[n])&&(t[i[n]]=r[i[n]]);return t},sa,Er,Yi,r2,i2,Ph,nu;const Zk=(r=0)=>e=>{var t;return((t=e.updated)!==null&&t!==void 0?t:0)+r>Date.now()},eE=r=>{if(typeof r=="function")return r;switch(r){case"concat":return ok;case"merge":return sk;case"switch":default:return ck}};class h1{get client(){return Ge(this,Er,"f")}get cache(){return Ge(this,Yi,"f")}constructor(e){var t;sa.set(this,new U1),Er.set(this,void 0),Yi.set(this,void 0),r2.set(this,new $i),i2.set(this,void 0),Ph.set(this,void 0),nu.set(this,X_()),Ya(this,i2,n=>wk(e.key(n),Ge(this,nu,"f")),"f"),Ya(this,Ph,(t=e==null?void 0:e.validate)!==null&&t!==void 0?t:Zk(e==null?void 0:e.expire),"f"),e.client instanceof jm?Ya(this,Er,e.client,"f"):(Ya(this,Er,new jm(e.client.fn,e.client.options),"f"),Ge(this,sa,"f").add(()=>Ge(this,Er,"f").complete())),e.cache instanceof qm?Ya(this,Yi,e.cache,"f"):(Ya(this,Yi,new qm(e.cache||{}),"f"),Ge(this,sa,"f").add(()=>Ge(this,Yi,"f").complete()));const i=eE(e.queueOperator);Ge(this,sa,"f").add(()=>Ge(this,r2,"f").complete()),Ge(this,sa,"f").add(Ge(this,r2,"f").pipe(i(({args:n,options:a})=>new Ee(o=>{const{task:s,transaction:c}=Ge(this,Er,"f").next(n,a);o.add(s.pipe(Z1(()=>Ui)).subscribe(o)),o.add(()=>{setTimeout(()=>Ge(this,Er,"f").cancel(c))})})),iz(),P_(()=>!Ge(this,Er,"f").closed)).subscribe(n=>{const{args:a,value:o,transaction:s,ref:c}=n,l=c??Ge(this,i2,"f").call(this,a);Ge(this,Yi,"f").setItem(l,{value:o,args:a,transaction:s})}))}next(e,t){Ge(this,r2,"f").next({args:e,options:t})}query(e,t){var i;const n=Ge(this,i2,"f").call(this,e);return(i=Ge(this,Er,"f").getTaskByRef(n))!==null&&i!==void 0?i:this._createTask(n,e,t)}queryAsync(e,t){const i=t||{},{awaitResolve:n}=i,a=Jk(i,["awaitResolve"]);return(n?V1:Lr)(this._query(e,a))}complete(){Ge(this,sa,"f").unsubscribe()}_query(e,t){var i;const n=Ge(this,i2,"f").call(this,e);return(i=Ge(this,Er,"f").getTaskByRef(n))!==null&&i!==void 0?i:this._createTask(n,e,t)}_createTask(e,t,i){var n;const a=new c_,o=Ge(this,Yi,"f").getItem(e);if(o){const{value:l,args:h,created:d,updated:u,updates:v,transaction:m}=o,f={status:"cache",value:l,args:h,created:d,updated:u,updates:v,transaction:m};a.next(f)}const s=((n=i==null?void 0:i.cache)===null||n===void 0?void 0:n.validate)||Ge(this,Ph,"f");return o&&s(o,t)?a.complete():Ge(this,r2,"f").next({args:t,options:{ref:e,task:a}}),a.asObservable()}}sa=new WeakMap,Er=new WeakMap,Yi=new WeakMap,r2=new WeakMap,i2=new WeakMap,Ph=new WeakMap,nu=new WeakMap;h1.extractQueryValue=lk;var jn=globalThis&&globalThis.__classPrivateFieldGet||function(r,e,t,i){if(t==="a"&&!i)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?r!==e||!i:!e.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?i:t==="a"?i.call(r):i?i.value:e.get(r)},Gm=globalThis&&globalThis.__classPrivateFieldSet||function(r,e,t,i,n){if(i==="m")throw new TypeError("Private method is not writable");if(i==="a"&&!n)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?r!==e||!n:!e.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return i==="a"?n.call(r,t):n?n.value=t:e.set(r,t),t},Ms,Qi;class tE extends Ee{get currentContext(){return jn(this,Qi,"f").value}get currentContext$(){return jn(this,Qi,"f").asObservable()}get client(){return jn(this,Ms,"f")}constructor(e){super(t=>jn(this,Qi,"f").subscribe(t)),Ms.set(this,void 0),Qi.set(this,void 0),Gm(this,Ms,new h1(e),"f"),Gm(this,Qi,new Do(void 0),"f")}setCurrentContext(e){typeof e=="string"?this.resolveContext(e).pipe(Z1(()=>Ui)).subscribe(t=>this.setCurrentContext(t)):ak(e,jn(this,Qi,"f").value)||jn(this,Qi,"f").next(e)}resolveContext(e){return jn(this,Ms,"f").query({id:e}).pipe($e(t=>t.value))}}Ms=new WeakMap,Qi=new WeakMap;var Td=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(a){return a instanceof t?a:new t(function(o){o(a)})}return new(t||(t=Promise))(function(a,o){function s(h){try{l(i.next(h))}catch(d){o(d)}}function c(h){try{l(i.throw(h))}catch(d){o(d)}}function l(h){h.done?a(h.value):n(h.value).then(s,c)}l((i=i.apply(r,e||[])).next())})},Je=globalThis&&globalThis.__classPrivateFieldGet||function(r,e,t,i){if(t==="a"&&!i)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?r!==e||!i:!e.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?i:t==="a"?i.call(r):i?i.value:e.get(r)},qn=globalThis&&globalThis.__classPrivateFieldSet||function(r,e,t,i,n){if(i==="m")throw new TypeError("Private method is not writable");if(i==="a"&&!n)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?r!==e||!n:!e.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return i==="a"?n.call(r,t):n?n.value=t:e.set(r,t),t},yi,Ah,Cs,ca,n2,la,Hs,Vh;let rE=class{get contextClient(){return Je(this,yi,"f")}get queryClient(){return Je(this,Ah,"f")}get currentContext$(){return Je(this,yi,"f").currentContext$}get currentContext(){return Je(this,yi,"f").currentContext}set currentContext(e){e?this.setCurrentContext(e):this.clearCurrentContext()}constructor(e){var t,i,n;yi.set(this,void 0),Ah.set(this,void 0),Cs.set(this,void 0),ca.set(this,void 0),n2.set(this,new U1),la.set(this,void 0),Hs.set(this,void 0),Vh.set(this,void 0);const{config:a,event:o,parentContext:s}=e;a.resolveContext&&(this.resolveContext=(t=a.resolveContext)===null||t===void 0?void 0:t.bind(this)),a.validateContext&&(this.validateContext=(i=a.validateContext)===null||i===void 0?void 0:i.bind(this)),qn(this,la,a.contextType,"f"),qn(this,Hs,a.contextFilter,"f"),qn(this,yi,new tE(a.client.get),"f"),qn(this,Ah,new h1(a.client.query),"f"),a.client.related&&qn(this,Cs,new h1(a.client.related),"f"),qn(this,Vh,(n=a.contextParameterFn)!==null&&n!==void 0?n:c=>({search:c.search,filter:{type:c.type}}),"f"),o&&(qn(this,ca,o,"f"),Je(this,n2,"f").add(Je(this,yi,"f").currentContext$.pipe(O3()).subscribe(([c,l])=>{o.dispatchEvent("onCurrentContextChanged",{source:this,canBubble:!0,detail:{previous:c,next:l}})})),Je(this,n2,"f").add(o.addEventListener("onCurrentContextChanged",c=>{c.source!==this&&(this.currentContext=c.detail.next)}))),s&&Je(this,n2,"f").add(s.contextClient.currentContext$.pipe(L1(c=>Td(this,void 0,void 0,function*(){var l;if(c){const h=yield(l=Je(this,ca,"f"))===null||l===void 0?void 0:l.dispatchEvent("onParentContextChanged",{source:this,detail:c,cancelable:!0});return{next:c,canceled:h==null?void 0:h.canceled}}return{next:c}})),Xt(c=>!c.canceled),$e(({next:c})=>c)).subscribe(c=>Td(this,void 0,void 0,function*(){if(c)try{yield this.setCurrentContext(c,{validate:!0,resolve:!0})}catch(l){console.warn("ContextProvider::onParentContextChanged",l)}else this.clearCurrentContext()})))}setCurrentContext(e,t){var i,n,a;return Td(this,void 0,void 0,function*(){if(e===this.currentContext)return e;if(t!=null&&t.validate&&!this.validateContext(e)){if(t.resolve){const s=yield(i=Je(this,ca,"f"))===null||i===void 0?void 0:i.dispatchEvent("onSetContextResolve",{source:this,cancelable:!0,detail:{context:e}});if(s!=null&&s.canceled)throw Error("resolving of context was canceled");try{const c=yield this.resolveContextAsync(e),l=yield(n=Je(this,ca,"f"))===null||n===void 0?void 0:n.dispatchEvent("onSetContextResolved",{source:this,cancelable:!0,detail:{input:e,result:c}});if(l!=null&&l.canceled)throw Error("resolving of context was canceled");return this.setCurrentContext(c)}catch(c){console.error("failed to resolve context",e,c),this.clearCurrentContext()}}throw Error("failed to validate provided context")}const o=yield(a=Je(this,ca,"f"))===null||a===void 0?void 0:a.dispatchEvent("onCurrentContextChange",{source:this,canBubble:!0,cancelable:!0,detail:{context:e}});if(o!=null&&o.canceled)throw Error("change of context was aborted");return Je(this,yi,"f").setCurrentContext(e),e})}queryContext(e){const t=this.queryClient.query(Je(this,Vh,"f").call(this,{search:e,type:Je(this,la,"f")})).pipe($e(i=>i.value));return Je(this,Hs,"f")?t.pipe($e(Je(this,Hs,"f"))):t}queryContextAsync(e){return V1(this.queryContext(e))}validateContext(e){return Je(this,la,"f")?Je(this,la,"f").map(t=>t.toLowerCase()).includes(e.type.id.toLowerCase()):!0}resolveContext(e){return this.relatedContexts({item:e,filter:{type:Je(this,la,"f")}}).pipe($e(t=>t.filter(i=>this.validateContext(i))),$e(t=>{const i=t.shift();if(!i)throw Error("failed to resolve context");return t.length&&console.warn("ContextProvider::relatedContext","multiple items found 🤣",t),i}))}resolveContextAsync(e){return V1(this.resolveContext(e))}relatedContexts(e){return Je(this,Cs,"f")?Je(this,Cs,"f").query(e).pipe($e(({value:t})=>t)):b_(()=>Error("ContextProvider::relatedContexts - no client defined for resolving related context"))}relatedContextsAsync(e){return V1(this.relatedContexts(e))}clearCurrentContext(){Je(this,yi,"f").setCurrentContext(void 0)}dispose(){Je(this,n2,"f").unsubscribe()}};yi=new WeakMap,Ah=new WeakMap,Cs=new WeakMap,ca=new WeakMap,n2=new WeakMap,la=new WeakMap,Hs=new WeakMap,Vh=new WeakMap;var iE=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(a){return a instanceof t?a:new t(function(o){o(a)})}return new(t||(t=Promise))(function(a,o){function s(h){try{l(i.next(h))}catch(d){o(d)}}function c(h){try{l(i.throw(h))}catch(d){o(d)}}function l(h){h.done?a(h.value):n(h.value).then(s,c)}l((i=i.apply(r,e||[])).next())})};const nE="context",aE={name:nE,configure:()=>new nk,initialize:r=>iE(void 0,void 0,void 0,function*(){var e;const t=yield r.config.createConfig(r),i=r.hasModule("event")?yield r.requireInstance("event"):void 0,n=(e=r.ref)===null||e===void 0?void 0:e.context;return new rE({config:t,event:i,parentContext:n})}),dispose:r=>{r.instance.dispose()}};var Km=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(a){return a instanceof t?a:new t(function(o){o(a)})}return new(t||(t=Promise))(function(a,o){function s(h){try{l(i.next(h))}catch(d){o(d)}}function c(h){try{l(i.throw(h))}catch(d){o(d)}}function l(h){h.done?a(h.value):n(h.value).then(s,c)}l((i=i.apply(r,e||[])).next())})};class oE{constructor(e){this.clientKey=e.clientKey,this.endpoint=e.endpoint,this.clientCtor=e.clientCtor}createHttpClientClient(e){return Km(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 Km(this,void 0,void 0,function*(){if(!this.endpoint)throw Error("no endpoint defined!");return new this.clientCtor({http:e,endpoint:this.endpoint})})}}var Id=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(a){return a instanceof t?a:new t(function(o){o(a)})}return new(t||(t=Promise))(function(a,o){function s(h){try{l(i.next(h))}catch(d){o(d)}}function c(h){try{l(i.throw(h))}catch(d){o(d)}}function l(h){h.done?a(h.value):n(h.value).then(s,c)}l((i=i.apply(r,e||[])).next())})};class sE{constructor(e,t){this._client=e,this._http=t}get environment(){return this._client.environment}resolveServices(){return this._client.fetchEnvironment()}resolveService(e){return Id(this,void 0,void 0,function*(){return this._client.resolveService(e)})}createClient(e,t){return Id(this,void 0,void 0,function*(){const i=yield this.resolveService(e);if(!i)throw Error(`Could not load configuration of service [${e}]`);return this._http.createClient(Object.assign(Object.assign({},t),{baseUri:i.uri,defaultScopes:i.defaultScopes}))})}configureClient(e,t){return Id(this,void 0,void 0,function*(){const{key:i,alias:n}=typeof e=="string"?{key:e,alias:e}:e,{uri:a,defaultScopes:o}=yield this.resolveService(i);t.addConfig($_(n,{baseUri:a,defaultScopes:o}))})}}var Rd=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(a){return a instanceof t?a:new t(function(o){o(a)})}return new(t||(t=Promise))(function(a,o){function s(h){try{l(i.next(h))}catch(d){o(d)}}function c(h){try{l(i.throw(h))}catch(d){o(d)}}function l(h){h.done?a(h.value):n(h.value).then(s,c)}l((i=i.apply(r,e||[])).next())})},Wm=globalThis&&globalThis.__classPrivateFieldGet||function(r,e,t,i){if(t==="a"&&!i)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?r!==e||!i:!e.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?i:t==="a"?i.call(r):i?i.value:e.get(r)},cE=globalThis&&globalThis.__classPrivateFieldSet||function(r,e,t,i,n){if(i==="m")throw new TypeError("Private method is not writable");if(i==="a"&&!n)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?r!==e||!n:!e.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return i==="a"?n.call(r,t):n?n.value=t:e.set(r,t),t},ks;const Ym="services";class lE{get environment(){var e;const t=(e=Wm(this,ks,"f").cache.getItem(Ym))===null||e===void 0?void 0:e.value;if(!t)throw Error("no cached environment found");return t}constructor({http:e,endpoint:t}){ks.set(this,void 0),this.http=e,this.endpoint=t,cE(this,ks,new h1({client:{fn:()=>e.fetch$(t,{selector:this.selector.bind(this)})},key:()=>Ym,expire:5*60*1e3}),"f")}fetchEnvironment(){return Rd(this,void 0,void 0,function*(){return Lr(h1.extractQueryValue(Wm(this,ks,"f").query(void 0,{cache:{suppressInvalid:!0}})))})}selector(e){return Rd(this,void 0,void 0,function*(){const t=yield e.json(),i=t.services.reduce((n,a)=>Object.assign(n,{[a.key]:{clientId:t.clientId,uri:a.uri,defaultScopes:[t.clientId+"/.default"]}}),{});return Object.assign(Object.assign({},t),{services:i})})}resolveService(e){return Rd(this,void 0,void 0,function*(){try{const{services:t}=yield this.fetchEnvironment();return t[e]}catch(t){throw console.error(t),t}})}}ks=new WeakMap;const hE="serviceDiscovery";var dE=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(a){return a instanceof t?a:new t(function(o){o(a)})}return new(t||(t=Promise))(function(a,o){function s(h){try{l(i.next(h))}catch(d){o(d)}}function c(h){try{l(i.throw(h))}catch(d){o(d)}}function l(h){h.done?a(h.value):n(h.value).then(s,c)}l((i=i.apply(r,e||[])).next())})};const uE={name:hE,configure:()=>new oE({clientCtor:lE,clientKey:"service_discovery",endpoint:"/_discovery/environments/current"}),initialize:({config:r,requireInstance:e})=>dE(void 0,void 0,void 0,function*(){const t=yield e("http"),i=yield r.createHttpClientClient(t),n=yield r.createClient(i);return new sE(n,t)})};class vE{}class vi extends Error{constructor(e,t){super(`unsupported version ${e}`,{cause:t}),this.version=e}}const mE=(r,e)=>{var t;const i=(t=_r[r])!==null&&t!==void 0?t:r;switch(i){case _r.v2:throw new vi(r);case _r.v1:default:{const{id:n}=e,a=new URLSearchParams;return a.append("api-version",i),`/contexts/${n}/?${String(a)}`}}},fE=(r,e,t)=>[mE(r,e),t],pE=(r,e,t="json")=>(i,n)=>r[t](...fE(e,i,n));var gE=["eq","ne","gt","ge","lt","le"],Xl=["and","or","not"],_E=["any","all"],zE=["startswith","endswith","contains"],yE=["expand","levels","select","skip","top","count","orderby","filter"],Qm=/\((.*)\)/,Xm=/(?!indexof)\((\w+)\)/,Jm;(function(r){r.sum="sum",r.min="min",r.max="max",r.average="average",r.countdistinct="countdistinct"})(Jm||(Jm={}));var _i="";function nz(r){var e=r===void 0?{}:r,t=e.select,i=e.search,n=e.skiptoken,a=e.format,o=e.top,s=e.skip,c=e.filter,l=e.transform,h=e.orderBy,d=e.key,u=e.count,v=e.expand,m=e.action,f=e.func,C="",_=[],p={};if(d!=null&&(C+="(".concat(ni(d,_),")")),(c||typeof u=="object")&&(p.$filter=Vc(typeof u=="object"?u:c,_)),l&&(p.$apply=az(l)),v&&(p.$expand=Sh(v)),h&&(p.$orderby=g6(h)),u&&(typeof u=="boolean"?p.$count=!0:C+="/$count"),typeof o=="number"&&(p.$top=o),typeof s=="number"&&(p.$skip=s),m&&(C+="/".concat(m)),f){if(typeof f=="string")C+="/".concat(f);else if(typeof f=="object"){var z=Object.keys(f)[0],M=ni(f[z],_);C+="/".concat(z),M!==""&&(C+="(".concat(M,")"))}}return _.length>0&&Object.assign(p,_.reduce(function(A,I){var N;return Object.assign(A,(N={},N["@".concat(I.name)]=ni(I.value),N))},{})),CE(C,wt({$select:t,$search:i,$skiptoken:n,$format:a},p))}function Od(r,e,t){return t===void 0&&(t=[]),"".concat(r," eq ").concat(ni(e,t))}function Vc(r,e,t){return r===void 0&&(r={}),e===void 0&&(e=[]),t===void 0&&(t=""),(Array.isArray(r)?r:[r]).reduce(function(a,o){if(o){var s=i(o,e,t);s&&a.push(s)}return a},[]).join(" and ");function i(a,o,s){a===void 0&&(a={}),o===void 0&&(o=[]),s===void 0&&(s="");var c="";if(typeof a=="string")c=a;else if(a&&typeof a=="object"){var l=Object.keys(a).reduce(function(h,d){var u=a[d];if(u===void 0)return h;var v="";if(s?d===_i?v=s:Xm.test(d)?v=d.replace(Xm,function(p,z){return z.trim()===_i?"(".concat(s,")"):"(".concat(s,"/").concat(z.trim(),")")}):Qm.test(d)?v=d.replace(Qm,function(p,z){return z.trim()===_i?"(".concat(s,")"):"(".concat(s,"/").concat(z.trim(),")")}):v="".concat(s,"/").concat(d):v=d,d===_i&&Array.isArray(u))return h.concat(u.map(function(p){return Od(v,p)}));if(["number","string","boolean"].indexOf(typeof u)!==-1||u instanceof Date||u===null)h.push(Od(v,u,o));else if(Array.isArray(u)){var m=d,f=u.map(function(p){return Vc(p,o,s)}).filter(function(p){return p}).map(function(p){return Xl.indexOf(m)!==-1?"(".concat(p,")"):p});f.length&&(Xl.indexOf(m)!==-1?f.length&&(m==="not"?h.push(Zm(f)):h.push("(".concat(f.join(" ".concat(m," ")),")"))):h.push(f.join(" ".concat(m," "))))}else if(Xl.indexOf(v)!==-1){var C=v,f=Object.keys(u).map(function(z){var M;return i((M={},M[z]=u[z],M))});f.length&&(C==="not"?h.push(Zm(f)):h.push("(".concat(f.join(" ".concat(C," ")),")")))}else if(typeof u=="object")if("type"in u)h.push(Od(v,u,o));else{var _=Object.keys(u);_.forEach(function(p){if(u[p]!==void 0)if(gE.indexOf(p)!==-1)h.push("".concat(v," ").concat(p," ").concat(ni(u[p],o)));else if(Xl.indexOf(p)!==-1)Array.isArray(u[p])?h.push(u[p].map(function(I){return"("+i(I,o,v)+")"}).join(" ".concat(p," "))):h.push("("+i(u[p],o,v)+")");else if(_E.indexOf(p)!==-1){var z=n(d.toLowerCase(),u[p],p,v);z&&h.push(z)}else if(p==="has")h.push("".concat(v," ").concat(p," ").concat(ni(u[p],o)));else if(p==="in"){var M=Array.isArray(u[p])?u[p]:u[p].value.map(function(I){return{type:u[p].type,value:I}});h.push(v+" in ("+M.map(function(I){return ni(I,o)}).join(",")+")")}else if(zE.indexOf(p)!==-1)h.push("".concat(p,"(").concat(v,",").concat(ni(u[p],o),")"));else{var A=i(u,o,v);A&&h.push(A)}})}else throw new Error("Unexpected value type: ".concat(u));return h},[]);c=l.join(" and ")}return c}function n(a,o,s,c){var l="";if(typeof o=="string"||o instanceof String)l=wE(a,o,s,c);else if(o){var h=Array.isArray(o)?o.reduce(function(u,v){return v.hasOwnProperty(_i)?(u.hasOwnProperty(_i)||(u[_i]=[]),u[_i].push(v[_i]),u):wt(wt({},u),v)},{}):o,d=i(h,e,a);l="".concat(c,"/").concat(s,"(").concat(d?"".concat(a,":").concat(d):"",")")}return l}}function wE(r,e,t,i){var n="",a=t=="all"?"ne":"eq";return n="".concat(i,"/").concat(t,"(").concat(r,": ").concat(r," ").concat(a," '").concat(e,"')"),n}function bE(r){return r=r.replace(/%/g,"%25"),r=r.replace(/\+/g,"%2B"),r=r.replace(/\//g,"%2F"),r=r.replace(/\?/g,"%3F"),r=r.replace(/#/g,"%23"),r=r.replace(/&/g,"%26"),r=r.replace(/'/g,"''"),r}function ni(r,e){if(typeof r=="string")return"'".concat(bE(r),"'");if(r instanceof Date)return r.toISOString();if(typeof r=="number")return r;if(Array.isArray(r))return"[".concat(r.map(function(t){return ni(t)}).join(","),"]");if(r===null)return r;if(typeof r=="object")switch(r.type){case"raw":case"guid":return r.value;case"duration":return"duration'".concat(r.value,"'");case"binary":return"binary'".concat(r.value,"'");case"alias":return Array.isArray(e)&&e.push(r),"@".concat(r.name);case"json":return escape(JSON.stringify(r.value));case"decimal":return"".concat(r.value,"M");default:return Object.entries(r).filter(function(t){var i=t[1];return i!==void 0}).map(function(t){var i=t[0],n=t[1];return"".concat(i,"=").concat(ni(n,e))}).join(",")}return r}function Sh(r){if(typeof r=="number")return r;if(typeof r=="string")return r.indexOf("/")===-1?r:r.split("/").reverse().reduce(function(t,i,n,a){return n===0?"$expand=".concat(i):n===a.length-1?"".concat(i,"(").concat(t,")"):"$expand=".concat(i,"(").concat(t,")")},"");if(Array.isArray(r))return"".concat(r.map(function(t){return Sh(t)}).join(","));if(typeof r=="object"){var e=Object.keys(r);return e.some(function(t){return yE.indexOf(t.toLowerCase())!==-1})?e.map(function(t){var i;switch(t){case"filter":i=Vc(r[t]);break;case"orderBy":i=g6(r[t]);break;case"levels":case"count":case"skip":case"top":i="".concat(r[t]);break;default:i=Sh(r[t])}return"$".concat(t.toLowerCase(),"=").concat(i)}).join(";"):e.map(function(t){var i=Sh(r[t]);return i?"".concat(t,"(").concat(i,")"):t}).join(",")}return""}function az(r){var e=Array.isArray(r)?r:[r],t=e.reduce(function(i,n){var a=n.aggregate,o=n.filter,s=n.groupBy,c=r_(n,["aggregate","filter","groupBy"]),l=Object.keys(c);if(l.length)throw new Error("Unsupported transform(s): ".concat(l));if(a&&i.push("aggregate(".concat(xE(a),")")),o){var h=Vc(o);h&&i.push("filter(".concat(Vc(h),")"))}return s&&i.push("groupby(".concat(ME(s),")")),i},[]);return t.join("/")||void 0}function xE(r){var e=Array.isArray(r)?r:[r];return e.map(function(t){return typeof t=="string"?t:Object.keys(t).map(function(i){var n=t[i];if(!n.with)throw new Error("'with' property required for '".concat(i,"'"));if(!n.as)throw new Error("'as' property required for '".concat(i,"'"));return"".concat(i," with ").concat(n.with," as ").concat(n.as)})}).join(",")}function ME(r){if(!r.properties)throw new Error("'properties' property required for groupBy");var e="(".concat(r.properties.join(","),")");return r.transform&&(e+=",".concat(az(r.transform))),e}function g6(r,e){return e===void 0&&(e=""),Array.isArray(r)?r.map(function(t){return Array.isArray(t)&&t.length===2&&["asc","desc"].indexOf(t[1])!==-1?t.join(" "):t}).map(function(t){return"".concat(e).concat(String(t))}).join(","):typeof r=="object"?Object.entries(r).map(function(t){var i=t[0],n=t[1];return g6(n,"".concat(i,"/"))}).map(function(t){return"".concat(e).concat(t)}).join(","):"".concat(e).concat(String(r))}function CE(r,e){var t=Object.getOwnPropertyNames(e).filter(function(i){return e[i]!==void 0&&e[i]!==""}).map(function(i){return"".concat(i,"=").concat(e[i])});return t.length?"".concat(r,"?").concat(t.join("&")):r}function Zm(r){return"not(".concat(r.join(" and "),")")}const HE=r=>Object.keys(r).reduce((e,t)=>{var i;switch(t){case"type":return!((i=r[t])===null||i===void 0)&&i.length?Object.assign(Object.assign({},e),{[t]:{in:r[t]}}):e;default:return Object.assign(Object.assign({},e),{[t]:r[t]})}},{}),kE=r=>Object.entries(r).filter(([e,t])=>!!t).reduce((e,[t,i])=>{switch(t){case"filter":return Object.assign(Object.assign({},e),{[t]:HE(i)});default:return Object.assign(Object.assign({},e),{[t]:r[t]})}},{}),EE=r=>typeof r=="string"?r:nz(kE(r)),PE=(r,e)=>{var t;const i=(t=_r[r])!==null&&t!==void 0?t:r;switch(i){case _r.v2:throw new vi(r);case _r.v1:default:{const{query:n,includeDeleted:a}=e,o=new URLSearchParams(EE(n));return o.append("api-version",i),a&&o.append("includeDeleted","true"),`/contexts/?${String(o)}`}}},AE=(r,e,t)=>[PE(r,e),t],VE=(r,e,t="json")=>(i,n)=>r[t](...AE(e,i,n)),SE=r=>Object.keys(r).reduce((e,t)=>{var i;switch(t){case"type":return!((i=r[t])===null||i===void 0)&&i.length?Object.assign(Object.assign({},e),{[t]:{in:r[t]}}):e;default:return Object.assign(Object.assign({},e),{[t]:r[t]})}},{}),$E=r=>Object.entries(r).filter(([e,t])=>!!t).reduce((e,[t,i])=>{switch(t){case"filter":return Object.assign(Object.assign({},e),{[t]:SE(i)});default:return Object.assign(Object.assign({},e),{[t]:r[t]})}},{}),DE=r=>typeof r=="string"?r:nz($E(r)),LE=(r,e)=>{var t;const i=(t=_r[r])!==null&&t!==void 0?t:r;switch(i){case _r.v2:throw new vi(r);case _r.v1:default:{const{id:n,query:a}=e,o=new URLSearchParams(DE(a||""));return o.append("api-version",i),`/contexts/${n}/relations?${String(o)}`}}},TE=(r,e,t)=>[LE(r,e),t],IE=(r,e,t="json")=>(i,n)=>r[t](...TE(e,i,n));class RE{get Version(){return _r}constructor(e,t){this._client=e,this._method=t}get(e,...t){return pE(this._client,e,this._method)(...t)}query(e,...t){return VE(this._client,e,this._method)(...t)}related(e,...t){return IE(this._client,e,this._method)(...t)}}var _r;(function(r){r.v1="1.0",r.v2="2.0"})(_r||(_r={}));const OE=(r,e)=>{switch(r){case"v1":{const{id:t}=e,i=new URLSearchParams;return i.append("api-version","1.0"),`/bookmarks/${t}/?${String(i)}`}default:{const{id:t}=e,i=new URLSearchParams;return i.append("api-version",r),`/bookmarks/${t}/?${String(i)}`}}},NE=(r,e,t)=>{const i=OE(r,e),n=Object.assign({},{method:"Delete"},t);return[i,n]},UE=(r,e,t="fetch")=>(i,n)=>r[t](...NE(e,i,n)),FE=UE,BE=(r,e)=>{switch(r){case"v1":{const{id:t}=e,i=new URLSearchParams;return i.append("api-version","1.0"),`/bookmarks/${t}/?${String(i)}`}default:{const{id:t}=e,i=new URLSearchParams;return i.append("api-version",r),`/bookmarks/${t}/?${String(i)}`}}},jE=(r,e,t)=>[BE(r,e),t],qE=(r,e,t="json")=>(i,n)=>r[t](...jE(e,i,n)),GE=qE,KE=(r,e)=>{switch(r){case"v1":default:{const t=new URLSearchParams;return t.append("api-version",r),`/bookmarks?${String(t)}`}}},WE=(r,e,t)=>{const i=KE(r),n=new Headers;n.append("content-type","application/json");const a=Object.assign({},{method:"post",body:JSON.stringify(e),headers:n},t);return[i,a]},YE=(r,e,t="json")=>(i,n)=>r[t](...WE(e,i,n)),QE=YE,XE=(r,e)=>{switch(r){case"v1":default:{const t=new URLSearchParams;return t.append("api-version",r),`/bookmarks/${e.id}?${String(t)}`}}},JE=(r,e,t)=>{const i=XE(r,e),n=new Headers;n.append("content-type","application/json");const a=Object.assign({},{method:"patch",body:JSON.stringify(e),headers:n},t);return[i,a]},ZE=(r,e,t="json")=>(i,n)=>r[t](...JE(e,i,n)),eP=ZE,tP=r=>{switch(r){case"v1":default:{const e=new URLSearchParams;return e.append("api-version",r),`persons/me/bookmarks/?${String(e)}`}}},rP=(r,e)=>[tP(r),e],iP=(r,e,t="json")=>i=>r[t](...rP(e,i)),nP=iP,aP=(r,e)=>{switch(r){case"v1":default:{const t=new URLSearchParams;return t.append("api-version",r),`/persons/me/bookmarks/favorites?${String(t)}`}}},oP=(r,e,t)=>{const i=aP(r),n=new Headers;n.append("content-type","application/json");const a=Object.assign({},{method:"post",body:JSON.stringify(e),headers:n},t);return[i,a]},sP=(r,e,t="json")=>(i,n)=>r[t](...oP(e,i,n)),cP=sP,lP=(r,e)=>{switch(r){case"v1":default:{const{bookmarkId:t}=e,i=new URLSearchParams;return i.append("api-version","1.0"),`/persons/me/bookmarks/favorites/${t}/?${String(i)}`}}},hP=(r,e,t)=>{const i=lP(r,e),n=Object.assign({},{method:"Delete"},t);return[i,n]},dP=(r,e,t="fetch")=>(i,n)=>r[t](...hP(e,i,n)),uP=dP,vP=(r,e)=>{switch(r){case"v1":default:{const{bookmarkId:t}=e,i=new URLSearchParams;return i.append("api-version",r),`/persons/me/bookmarks/favorites/${t}?${String(i)}`}}},mP=(r,e,t)=>{const i=vP(r,e),n=new Headers;n.append("content-type","application/json");const a=Object.assign({},{method:"head",headers:n},t);return[i,a]},fP=(r,e,t="json")=>(i,n)=>r[t](...mP(e,i,n)),pP=fP;class gP{constructor(e,t){this._client=e,this._method=t}get(e,...t){return GE(this._client,e,this._method)(...t)}getAll(e){return nP(this._client,e,this._method)()}post(e,...t){return QE(this._client,e,this._method)(...t)}patch(e,...t){return eP(this._client,e,this._method)(...t)}delete(e,...t){return FE(this._client,e,this._method)(...t)}addFavorite(e,...t){return cP(this._client,e,this._method)(...t)}removeFavorite(e,...t){return uP(this._client,e,this._method)(...t)}verifyFavorite(e,...t){return pP(this._client,e,this._method)(...t)}}const _P=gP,zP=(r,e)=>{var t;const i=(t=tt[r])!==null&&t!==void 0?t:r;switch(i){case tt.v2:throw new vi(r);case tt.v1:default:{const{id:n}=e,a=new URLSearchParams;return a.append("api-version",i),`/notification/${n}/?${String(a)}`}}},yP=(r,e,t)=>[zP(r,e),t],wP=(r,e,t="json")=>(i,n)=>r[t](...yP(e,i,n)),bP=(r,e)=>{var t;const i=(t=tt[r])!==null&&t!==void 0?t:r;switch(i){case tt.v2:throw new vi(r);case tt.v1:default:{const{userId:n}=e,a=new URLSearchParams;return a.append("api-version",i),`/person/${n}/notifications/?${String(a)}`}}},xP=(r,e,t)=>{const i=bP(r,e),n=new Headers;n.append("content-type","application/json");const a=Object.assign({},{method:"post",body:JSON.stringify(e),headers:n},t);return[i,a]},MP=(r,e,t="json")=>(i,n)=>r[t](...xP(e,i,n)),CP=(r,e)=>{var t;const i=(t=tt[r])!==null&&t!==void 0?t:r;switch(i){case tt.v2:throw new vi(r);case tt.v1:default:{const{id:n}=e,a=new URLSearchParams;return a.append("api-version",i),`/notification/${n}/?${String(a)}`}}},HP=(r,e,t)=>{const i=CP(r,e),n=new Headers;n.append("content-type","application/json");const a=Object.assign({},{method:"patch",body:JSON.stringify(e),headers:n},t);return[i,a]},kP=(r,e,t="json")=>(i,n)=>r[t](...HP(e,i,n)),EP=(r,e)=>{var t;const i=(t=tt[r])!==null&&t!==void 0?t:r;switch(i){case tt.v2:throw new vi(r);case tt.v1:default:{const{userId:n}=e,a=new URLSearchParams;return a.append("api-version",i),`/person/${n}/notifications/?${String(a)}`}}},PP=(r,e,t)=>[EP(r,e),t],AP=(r,e,t="json")=>(i,n)=>r[t](...PP(e,i,n)),VP=(r,e)=>{var t;const i=(t=tt[r])!==null&&t!==void 0?t:r;switch(i){case tt.v2:throw new vi(r);case tt.v1:default:{const{id:n}=e,a=new URLSearchParams;return a.append("api-version",i),`/notification/${n}/?${String(a)}`}}},SP=(r,e,t)=>{const i=VP(r,e),n=new Headers;n.append("content-type","application/json");const a=Object.assign({},{method:"delete",headers:n},t);return[i,a]},$P=(r,e,t="json")=>(i,n)=>r[t](...SP(e,i,n));var tt;(function(r){r.v1="1.0",r.v2="2.0"})(tt||(tt={}));const DP=(r,e)=>{var t;const i=(t=tt[r])!==null&&t!==void 0?t:r;switch(i){case tt.v2:throw new vi(r);case tt.v1:default:{const{userId:n}=e,a=new URLSearchParams;return a.append("api-version",i),`/person/${n}/notifications/settings/?${String(a)}`}}},LP=(r,e,t)=>{const i=DP(r,e),n=new Headers;n.append("content-type","application/json");const a=Object.assign({},{method:"put",body:JSON.stringify(e),headers:n},t);return[i,a]},TP=(r,e,t="json")=>(i,n)=>r[t](...LP(e,i,n)),IP=TP,RP=(r,e)=>{var t;const i=(t=tt[r])!==null&&t!==void 0?t:r;switch(i){case tt.v2:throw new vi(r);case tt.v1:default:{const{userId:n}=e,a=new URLSearchParams;return a.append("api-version",i),`/person/${n}/notifications/settings/?${String(a)}`}}},OP=(r,e,t)=>[RP(r,e),t],NP=(r,e,t="json")=>(i,n)=>r[t](...OP(e,i,n)),UP=NP;class FP{get Version(){return tt}constructor(e,t){this._client=e,this._method=t}getAll(e,...t){return AP(this._client,e,this._method)(...t)}getById(e,...t){return wP(this._client,e,this._method)(...t)}setSeenByUser(e,...t){return kP(this._client,e,this._method)(...t)}create(e,...t){return MP(this._client,e,this._method)(...t)}delete(e,...t){return $P(this._client,e,this._method)(...t)}getSettings(e,...t){return UP(this._client,e,this._method)(...t)}updateSettings(e,...t){return IP(this._client,e,this._method)(...t)}}var Nd=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(a){return a instanceof t?a:new t(function(o){o(a)})}return new(t||(t=Promise))(function(a,o){function s(h){try{l(i.next(h))}catch(d){o(d)}}function c(h){try{l(i.throw(h))}catch(d){o(d)}}function l(h){h.done?a(h.value):n(h.value).then(s,c)}l((i=i.apply(r,e||[])).next())})};class BP{constructor({createClient:e}){this._createClientFn=e}createNotificationClient(e){return Nd(this,void 0,void 0,function*(){const t=yield this._createClientFn("notification");return new FP(t,e)})}createBookmarksClient(e){return Nd(this,void 0,void 0,function*(){const t=yield this._createClientFn("bookmarks");return new _P(t,e)})}createContextClient(e){return Nd(this,void 0,void 0,function*(){const t=yield this._createClientFn("context");return new RE(t,e)})}}var oz=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(a){return a instanceof t?a:new t(function(o){o(a)})}return new(t||(t=Promise))(function(a,o){function s(h){try{l(i.next(h))}catch(d){o(d)}}function c(h){try{l(i.throw(h))}catch(d){o(d)}}function l(h){h.done?a(h.value):n(h.value).then(s,c)}l((i=i.apply(r,e||[])).next())})};const jP="services",qP=(r,e)=>t=>oz(void 0,void 0,void 0,function*(){if(r.hasClient(t))return r.createClient(t);if(e)return e.createClient(t);throw Error(`failed to create http client for service ${t}`)}),GP={name:jP,configure:()=>new vE,initialize:({ref:r,config:e,requireInstance:t,hasModule:i})=>oz(void 0,void 0,void 0,function*(){if(!e.createClient){const n=yield t("http"),a=i("serviceDiscovery")?yield t("serviceDiscovery"):r==null?void 0:r.serviceDiscovery;e.createClient=qP(n,a)}if(!e.createClient)throw Error("missing configuration for creating API client");return new BP(e)})},KP=GP;class WP extends zC{constructor(){super([HC,W_,r6,uE,KP,aE]),this.logger=new t_("FrameworkConfigurator")}configureHttp(...e){this.addConfig(IC(...e))}configureHttpClient(...e){this.addConfig($_(...e))}configureMsal(...e){this.addConfig(QH(...e))}configureServiceDiscovery(e){this.configureHttpClient("service_discovery",e.client)}}var YP=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(a){return a instanceof t?a:new t(function(o){o(a)})}return new(t||(t=Promise))(function(a,o){function s(h){try{l(i.next(h))}catch(d){o(d)}}function c(h){try{l(i.throw(h))}catch(d){o(d)}}function l(h){h.done?a(h.value):n(h.value).then(s,c)}l((i=i.apply(r,e||[])).next())})};const QP=(r,e)=>YP(void 0,void 0,void 0,function*(){const t=yield r.initialize(e),i={modules:t};return window.Fusion=i,t.event.dispatchEvent("onFrameworkLoaded",{detail:i}),i}),sz=k.createContext(null),XP=sz.Provider;var JP=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(a){return a instanceof t?a:new t(function(o){o(a)})}return new(t||(t=Promise))(function(a,o){function s(h){try{l(i.next(h))}catch(d){o(d)}}function c(h){try{l(i.throw(h))}catch(d){o(d)}}function l(h){h.done?a(h.value):n(h.value).then(s,c)}l((i=i.apply(r,e||[])).next())})};const ZP=r=>k.lazy(()=>JP(void 0,void 0,void 0,function*(){const e=new WP;yield r(e);const t=yield QP(e);return{default:({children:i})=>G(XP,Object.assign({value:t},{children:i}))}})),Ra=()=>{let r=k.useContext(sz);return r||console.warn("could not locate fusion in context!"),r??(r=window.Fusion),r||console.error("Could not load framework, might not be initiated?"),r},eA=r=>{const e=k.useMemo(()=>ZP(r.configure),[r.configure]);return G(k.Suspense,Object.assign({fallback:r.fallback},{children:G(e,{children:r.children})}))};function Re(){return Re=Object.assign?Object.assign.bind():function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[i]=t[i])}return r},Re.apply(this,arguments)}function no(r){return no=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},no(r)}function Ud(r){return r&&no(r)==="object"&&r.constructor===Object}function cz(r,e){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{clone:!0},i=t.clone?Re({},r):r;return Ud(r)&&Ud(e)&&Object.keys(e).forEach(function(n){n!=="__proto__"&&(Ud(e[n])&&n in r?i[n]=cz(r[n],e[n],t):i[n]=e[n])}),i}function tA(r,e){if(no(r)!=="object"||r===null)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var i=t.call(r,e||"default");if(no(i)!=="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}function rA(r){var e=tA(r,"string");return no(e)==="symbol"?e:String(e)}var iA=typeof Symbol=="function"&&Symbol.for;const lz=iA?Symbol.for("mui.nested"):"__THEME_NESTED__";var nA=["checked","disabled","error","focused","focusVisible","required","expanded","selected"];function aA(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=r.disableGlobal,t=e===void 0?!1:e,i=r.productionPrefix,n=i===void 0?"jss":i,a=r.seed,o=a===void 0?"":a,s=o===""?"":"".concat(o,"-"),c=0,l=function(){return c+=1,c};return function(h,d){var u=d.options.name;if(u&&u.indexOf("Mui")===0&&!d.options.link&&!t){if(nA.indexOf(h.key)!==-1)return"Mui-".concat(h.key);var v="".concat(s).concat(u,"-").concat(h.key);return!d.options.theme[lz]||o!==""?v:"".concat(v,"-").concat(l())}return"".concat(s).concat(n).concat(l())}}var e9=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},nl=(typeof window>"u"?"undefined":e9(window))==="object"&&(typeof document>"u"?"undefined":e9(document))==="object"&&document.nodeType===9;function t9(r,e){for(var t=0;t<e.length;t++){var i=e[t];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(r,rA(i.key),i)}}function hz(r,e,t){return e&&t9(r.prototype,e),t&&t9(r,t),Object.defineProperty(r,"prototype",{writable:!1}),r}function au(r,e){return au=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,n){return i.__proto__=n,i},au(r,e)}function dz(r,e){r.prototype=Object.create(e.prototype),r.prototype.constructor=r,au(r,e)}function r9(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function uz(r,e){if(r==null)return{};var t={},i=Object.keys(r),n,a;for(a=0;a<i.length;a++)n=i[a],!(e.indexOf(n)>=0)&&(t[n]=r[n]);return t}var oA={}.constructor;function ou(r){if(r==null||typeof r!="object")return r;if(Array.isArray(r))return r.map(ou);if(r.constructor!==oA)return r;var e={};for(var t in r)e[t]=ou(r[t]);return e}function _6(r,e,t){r===void 0&&(r="unnamed");var i=t.jss,n=ou(e),a=i.plugins.onCreateRule(r,n,t);return a||(r[0],null)}var i9=function(e,t){for(var i="",n=0;n<e.length&&e[n]!=="!important";n++)i&&(i+=t),i+=e[n];return i},xa=function(e){if(!Array.isArray(e))return e;var t="";if(Array.isArray(e[0]))for(var i=0;i<e.length&&e[i]!=="!important";i++)t&&(t+=", "),t+=i9(e[i]," ");else t=i9(e,", ");return e[e.length-1]==="!important"&&(t+=" !important"),t};function Ro(r){return r&&r.format===!1?{linebreak:"",space:""}:{linebreak:`
73
+ Error Description: `+c.message)),[2,null];case 4:return i||(this.logger.warning("The developer's authority was not found within the CloudInstanceDiscoveryMetadata returned from the network request."),this.logger.verbose("Creating custom Authority for custom domain scenario."),i=r.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort)),[2,i]}})})},r.prototype.getCloudDiscoveryMetadataFromHarcodedValues=function(){return this.canonicalAuthority in _m?_m[this.canonicalAuthority]:null},r.prototype.isInKnownAuthorities=function(){var e=this,t=this.authorityOptions.knownAuthorities.filter(function(i){return ke.getDomainFromUrl(i).toLowerCase()===e.hostnameAndPort});return t.length>0},r.generateAuthority=function(e,t){var i;if(t&&t.azureCloudInstance!==Cc.None){var n=t.tenant?t.tenant:w.DEFAULT_COMMON_TENANT;i=t.azureCloudInstance+"/"+n+"/"}return i||e},r.createCloudDiscoveryMetadataFromHost=function(e){return{preferred_network:e,preferred_cache:e,aliases:[e]}},r.getCloudDiscoveryMetadataFromNetworkResponse=function(e,t){for(var i=0;i<e.length;i++){var n=e[i];if(n.aliases.indexOf(t)>-1)return n}return null},r.prototype.getPreferredCache=function(){if(this.discoveryComplete())return this.metadata.preferred_cache;throw j.createEndpointDiscoveryIncompleteError("Discovery incomplete.")},r.prototype.isAlias=function(e){return this.metadata.aliases.indexOf(e)>-1},r.isPublicCloudAuthority=function(e){return w.KNOWN_PUBLIC_CLOUDS.indexOf(e)>=0},r.buildRegionalAuthorityString=function(e,t,i){var n=new ke(e);n.validateAsUri();var a=n.getUrlComponents(),o=t+"."+a.HostNameAndPort;this.isPublicCloudAuthority(a.HostNameAndPort)&&(o=t+"."+w.REGIONAL_AUTH_PUBLIC_CLOUD_SUFFIX);var s=ke.constructAuthorityUriFromObject(Ue(Ue({},n.getUrlComponents()),{HostNameAndPort:o})).urlString;return i?s+"?"+i:s},r.replaceWithRegionalInformation=function(e,t){return e.authorization_endpoint=r.buildRegionalAuthorityString(e.authorization_endpoint,t),e.token_endpoint=r.buildRegionalAuthorityString(e.token_endpoint,t,w.REGIONAL_AUTH_NON_MSI_QUERY_STRING),e.end_session_endpoint&&(e.end_session_endpoint=r.buildRegionalAuthorityString(e.end_session_endpoint,t)),e},r}();/*! @azure/msal-common v9.1.1 2023-01-19 */var V0=function(){function r(){}return r.createDiscoveredInstance=function(e,t,i,n,a,o){return ae(this,void 0,void 0,function(){var s,c;return oe(this,function(l){switch(l.label){case 0:s=r.createInstance(e,t,i,n,a,o),l.label=1;case 1:return l.trys.push([1,3,,4]),[4,s.resolveEndpointsAsync()];case 2:return l.sent(),[2,s];case 3:throw c=l.sent(),j.createEndpointDiscoveryIncompleteError(c);case 4:return[2]}})})},r.createInstance=function(e,t,i,n,a,o){if(F.isEmpty(e))throw Ye.createUrlEmptyError();return new A0(e,t,i,n,a,o)},r}();/*! @azure/msal-common v9.1.1 2023-01-19 */var S0=function(){function r(){this.failedRequests=[],this.errors=[],this.cacheHits=0}return r.isServerTelemetryEntity=function(e,t){var i=e.indexOf(Ut.CACHE_KEY)===0,n=!0;return t&&(n=t.hasOwnProperty("failedRequests")&&t.hasOwnProperty("errors")&&t.hasOwnProperty("cacheHits")),i&&n},r}();/*! @azure/msal-common v9.1.1 2023-01-19 */var zm=function(){function r(){}return r.isThrottlingEntity=function(e,t){var i=!1;e&&(i=e.indexOf(Ws.THROTTLING_PREFIX)===0);var n=!0;return t&&(n=t.hasOwnProperty("throttleTime")),i&&n},r}();/*! @azure/msal-common v9.1.1 2023-01-19 */var oH={sendGetRequestAsync:function(){var r="Network interface - sendGetRequestAsync() has not been implemented for the Network interface.";return Promise.reject(Q.createUnexpectedError(r))},sendPostRequestAsync:function(){var r="Network interface - sendPostRequestAsync() has not been implemented for the Network interface.";return Promise.reject(Q.createUnexpectedError(r))}};/*! @azure/msal-common v9.1.1 2023-01-19 */var Kl={missingKidError:{code:"missing_kid_error",desc:"The JOSE Header for the requested JWT, JWS or JWK object requires a keyId to be configured as the 'kid' header claim. No 'kid' value was provided."},missingAlgError:{code:"missing_alg_error",desc:"The JOSE Header for the requested JWT, JWS or JWK object requires an algorithm to be specified as the 'alg' header claim. No 'alg' value was provided."}},ym=function(r){F1(e,r);function e(t,i){var n=r.call(this,t,i)||this;return n.name="JoseHeaderError",Object.setPrototypeOf(n,e.prototype),n}return e.createMissingKidError=function(){return new e(Kl.missingKidError.code,Kl.missingKidError.desc)},e.createMissingAlgError=function(){return new e(Kl.missingAlgError.code,Kl.missingAlgError.desc)},e}(Q);/*! @azure/msal-common v9.1.1 2023-01-19 */var sH=function(){function r(e){this.typ=e.typ,this.alg=e.alg,this.kid=e.kid}return r.getShrHeaderString=function(e){if(!e.kid)throw ym.createMissingKidError();if(!e.alg)throw ym.createMissingAlgError();var t=new r({typ:e.typ||q3.Jwt,kid:e.kid,alg:e.alg});return JSON.stringify(t)},r}();/*! @azure/msal-common v9.1.1 2023-01-19 */var cH=function(){function r(e,t){this.cacheOutcome=ga.NO_CACHE_HIT,this.cacheManager=t,this.apiId=e.apiId,this.correlationId=e.correlationId,this.wrapperSKU=e.wrapperSKU||w.EMPTY_STRING,this.wrapperVer=e.wrapperVer||w.EMPTY_STRING,this.telemetryCacheKey=Ut.CACHE_KEY+T1.CACHE_KEY_SEPARATOR+e.clientId}return r.prototype.generateCurrentRequestHeaderValue=function(){var e=""+this.apiId+Ut.VALUE_SEPARATOR+this.cacheOutcome,t=[this.wrapperSKU,this.wrapperVer].join(Ut.VALUE_SEPARATOR),i=this.getRegionDiscoveryFields(),n=[e,i].join(Ut.VALUE_SEPARATOR);return[Ut.SCHEMA_VERSION,n,t].join(Ut.CATEGORY_SEPARATOR)},r.prototype.generateLastRequestHeaderValue=function(){var e=this.getLastRequests(),t=r.maxErrorsToSend(e),i=e.failedRequests.slice(0,2*t).join(Ut.VALUE_SEPARATOR),n=e.errors.slice(0,t).join(Ut.VALUE_SEPARATOR),a=e.errors.length,o=t<a?Ut.OVERFLOW_TRUE:Ut.OVERFLOW_FALSE,s=[a,o].join(Ut.VALUE_SEPARATOR);return[Ut.SCHEMA_VERSION,e.cacheHits,i,n,s].join(Ut.CATEGORY_SEPARATOR)},r.prototype.cacheFailedRequest=function(e){var t=this.getLastRequests();t.errors.length>=Ut.MAX_CACHED_ERRORS&&(t.failedRequests.shift(),t.failedRequests.shift(),t.errors.shift()),t.failedRequests.push(this.apiId,this.correlationId),F.isEmpty(e.subError)?F.isEmpty(e.errorCode)?e&&e.toString()?t.errors.push(e.toString()):t.errors.push(Ut.UNKNOWN_ERROR):t.errors.push(e.errorCode):t.errors.push(e.subError),this.cacheManager.setServerTelemetry(this.telemetryCacheKey,t)},r.prototype.incrementCacheHits=function(){var e=this.getLastRequests();return e.cacheHits+=1,this.cacheManager.setServerTelemetry(this.telemetryCacheKey,e),e.cacheHits},r.prototype.getLastRequests=function(){var e=new S0,t=this.cacheManager.getServerTelemetry(this.telemetryCacheKey);return t||e},r.prototype.clearTelemetryCache=function(){var e=this.getLastRequests(),t=r.maxErrorsToSend(e),i=e.errors.length;if(t===i)this.cacheManager.removeItem(this.telemetryCacheKey);else{var n=new S0;n.failedRequests=e.failedRequests.slice(t*2),n.errors=e.errors.slice(t),this.cacheManager.setServerTelemetry(this.telemetryCacheKey,n)}},r.maxErrorsToSend=function(e){var t,i=0,n=0,a=e.errors.length;for(t=0;t<a;t++){var o=e.failedRequests[2*t]||w.EMPTY_STRING,s=e.failedRequests[2*t+1]||w.EMPTY_STRING,c=e.errors[t]||w.EMPTY_STRING;if(n+=o.toString().length+s.toString().length+c.length+3,n<Ut.MAX_LAST_HEADER_BYTES)i+=1;else break}return i},r.prototype.getRegionDiscoveryFields=function(){var e=[];return e.push(this.regionUsed||w.EMPTY_STRING),e.push(this.regionSource||w.EMPTY_STRING),e.push(this.regionOutcome||w.EMPTY_STRING),e.join(",")},r.prototype.updateRegionDiscoveryMetadata=function(e){this.regionUsed=e.region_used,this.regionSource=e.region_source,this.regionOutcome=e.region_outcome},r.prototype.setCacheOutcome=function(e){this.cacheOutcome=e},r}();/*! @azure/msal-common v9.1.1 2023-01-19 */var O_=function(){function r(e,t,i,n,a,o){this.authority=t,this.libraryName=n,this.libraryVersion=a,this.applicationTelemetry=o,this.clientId=e,this.logger=i,this.callbacks=new Map,this.eventsByCorrelationId=new Map,this.staticFieldsByCorrelationId=new Map,this.measurementsById=new Map,this.countersByCorrelationId=new Map}return r.prototype.startPerformanceMeasurement=function(e,t){return{}},r.prototype.startPerformanceMeasuremeant=function(e,t){return{}},r.prototype.startMeasurement=function(e,t){var i=this,n,a,o=t||this.generateId();t||this.logger.info("PerformanceClient: No correlation id provided for "+e+", generating",o),this.logger.trace("PerformanceClient: Performance measurement started for "+e,o);var s,c=this.startPerformanceMeasuremeant(e,o);if(c.startMeasurement)c.startMeasurement(),s=c;else{var l=this.startPerformanceMeasurement(e,o);l.startMeasurement(),s=l}var h={eventId:this.generateId(),status:M2.InProgress,authority:this.authority,libraryName:this.libraryName,libraryVersion:this.libraryVersion,clientId:this.clientId,name:e,startTimeMs:Date.now(),correlationId:o};this.cacheEventByCorrelationId(h);var d={appName:(n=this.applicationTelemetry)===null||n===void 0?void 0:n.appName,appVersion:(a=this.applicationTelemetry)===null||a===void 0?void 0:a.appVersion};return this.addStaticFields(d,o),this.cacheMeasurement(h,s),{endMeasurement:function(u){var v=i.endMeasurement(Ue(Ue({},h),u));return v&&i.cacheEventByCorrelationId(v),v},flushMeasurement:function(){return i.flushMeasurements(h.name,h.correlationId)},discardMeasurement:function(){return i.discardMeasurements(h.correlationId)},addStaticFields:function(u){return i.addStaticFields(u,h.correlationId)},increment:function(u){return i.increment(u,h.correlationId)},measurement:s,event:h}},r.prototype.endMeasurement=function(e){var t=this.measurementsById.get(e.eventId);if(t){this.measurementsById.delete(e.eventId),t.endMeasurement();var i=t.flushMeasurement();if(i!==null){this.logger.trace("PerformanceClient: Performance measurement ended for "+e.name+": "+i+" ms",e.correlationId);var n=Ue(Ue({durationMs:Math.round(i)},e),{status:M2.Completed});return n}else this.logger.trace("PerformanceClient: Performance measurement not taken",e.correlationId)}else this.logger.trace("PerformanceClient: Measurement not found for "+e.eventId,e.correlationId);return null},r.prototype.addStaticFields=function(e,t){var i=this.staticFieldsByCorrelationId.get(t);i?(this.logger.trace("PerformanceClient: Updating static fields"),this.staticFieldsByCorrelationId.set(t,Ue(Ue({},i),e))):(this.logger.trace("PerformanceClient: Adding static fields"),this.staticFieldsByCorrelationId.set(t,e))},r.prototype.increment=function(e,t){var i=this.countersByCorrelationId.get(t);if(!i){this.logger.trace("PerformanceClient: Setting counters"),this.countersByCorrelationId.set(t,Ue({},e));return}this.logger.trace("PerformanceClient: Updating counters");for(var n in e)i.hasOwnProperty(n)||(i[n]=0),i[n]+=e[n]},r.prototype.cacheEventByCorrelationId=function(e){var t=this.eventsByCorrelationId.get(e.correlationId);t?(this.logger.trace("PerformanceClient: Performance measurement for "+e.name+" added/updated",e.correlationId),t.set(e.eventId,e)):(this.logger.trace("PerformanceClient: Performance measurement for "+e.name+" started",e.correlationId),this.eventsByCorrelationId.set(e.correlationId,new Map().set(e.eventId,e)))},r.prototype.cacheMeasurement=function(e,t){this.measurementsById.set(e.eventId,t)},r.prototype.flushMeasurements=function(e,t){var i=this;this.logger.trace("PerformanceClient: Performance measurements flushed for "+e,t);var n=this.eventsByCorrelationId.get(t),a=this.staticFieldsByCorrelationId.get(t),o=this.countersByCorrelationId.get(t);if(n){this.discardCache(t);var s=[];n.forEach(function(v){if(v.name!==e&&v.status!==M2.Completed){i.logger.trace("PerformanceClient: Incomplete submeasurement "+v.name+" found for "+e,t);var m=i.endMeasurement(v);m&&s.push(m)}s.push(v)});var c=s.sort(function(v,m){return v.startTimeMs-m.startTimeMs}),l=c.filter(function(v){return v.name===e&&v.status===M2.Completed});if(l.length>0){l.length>1&&this.logger.verbose("PerformanceClient: Multiple distinct top-level performance events found, using the first",t);var h=l[0];this.logger.verbose("PerformanceClient: Measurement found for "+e,t);var d=c.reduce(function(v,m){if(m.name!==e){i.logger.trace("PerformanceClient: Complete submeasurement found for "+m.name,t);var f=m.name+"DurationMs";v[f]?i.logger.verbose("PerformanceClient: Submeasurement for "+e+" already exists for "+m.name+", ignoring",t):v[f]=m.durationMs}return v},h),u=Ue(Ue(Ue({},d),a),o);this.emitEvents([u],d.correlationId)}else this.logger.verbose("PerformanceClient: No completed top-level measurements found for "+e,t)}else this.logger.verbose("PerformanceClient: No measurements found",t)},r.prototype.discardMeasurements=function(e){this.logger.trace("PerformanceClient: Performance measurements discarded",e),this.eventsByCorrelationId.delete(e)},r.prototype.discardCache=function(e){this.discardMeasurements(e),this.logger.trace("PerformanceClient: Static fields discarded",e),this.staticFieldsByCorrelationId.delete(e),this.logger.trace("PerformanceClient: Counters discarded",e),this.countersByCorrelationId.delete(e)},r.prototype.addPerformanceCallback=function(e){var t=this.generateId();return this.callbacks.set(t,e),this.logger.verbose("PerformanceClient: Performance callback registered with id: "+t),t},r.prototype.removePerformanceCallback=function(e){var t=this.callbacks.delete(e);return t?this.logger.verbose("PerformanceClient: Performance callback "+e+" removed."):this.logger.verbose("PerformanceClient: Performance callback "+e+" not removed."),t},r.prototype.emitEvents=function(e,t){var i=this;this.logger.verbose("PerformanceClient: Emitting performance events",t),this.callbacks.forEach(function(n,a){i.logger.trace("PerformanceClient: Emitting event to callback "+a,t),n.apply(null,[e])})},r}();/*! @azure/msal-common v9.1.1 2023-01-19 */var wm=function(){function r(){}return r.prototype.startMeasurement=function(){},r.prototype.endMeasurement=function(){},r.prototype.flushMeasurement=function(){return null},r}(),lH=function(r){F1(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.generateId=function(){return"callback-id"},e.prototype.startPerformanceMeasuremeant=function(){return new wm},e.prototype.startPerformanceMeasurement=function(){return new wm},e}(O_);/*! @azure/msal-browser v2.32.2 2023-01-10 */var L={pkceNotGenerated:{code:"pkce_not_created",desc:"The PKCE code challenge and verifier could not be generated."},cryptoDoesNotExist:{code:"crypto_nonexistent",desc:"The crypto object or function is not available."},httpMethodNotImplementedError:{code:"http_method_not_implemented",desc:"The HTTP method given has not been implemented in this library."},emptyNavigateUriError:{code:"empty_navigate_uri",desc:"Navigation URI is empty. Please check stack trace for more info."},hashEmptyError:{code:"hash_empty_error",desc:"Hash value cannot be processed because it is empty. Please verify that your redirectUri is not clearing the hash. For more visit: aka.ms/msaljs/browser-errors."},hashDoesNotContainStateError:{code:"no_state_in_hash",desc:"Hash does not contain state. Please verify that the request originated from msal."},hashDoesNotContainKnownPropertiesError:{code:"hash_does_not_contain_known_properties",desc:"Hash does not contain known properites. Please verify that your redirectUri is not changing the hash. For more visit: aka.ms/msaljs/browser-errors."},unableToParseStateError:{code:"unable_to_parse_state",desc:"Unable to parse state. Please verify that the request originated from msal."},stateInteractionTypeMismatchError:{code:"state_interaction_type_mismatch",desc:"Hash contains state but the interaction type does not match the caller."},interactionInProgress:{code:"interaction_in_progress",desc:"Interaction is currently in progress. Please ensure that this interaction has been completed before calling an interactive API. For more visit: aka.ms/msaljs/browser-errors."},popupWindowError:{code:"popup_window_error",desc:"Error opening popup window. This can happen if you are using IE or if popups are blocked in the browser."},emptyWindowError:{code:"empty_window_error",desc:"window.open returned null or undefined window object."},userCancelledError:{code:"user_cancelled",desc:"User cancelled the flow."},monitorPopupTimeoutError:{code:"monitor_window_timeout",desc:"Token acquisition in popup failed due to timeout. For more visit: aka.ms/msaljs/browser-errors."},monitorIframeTimeoutError:{code:"monitor_window_timeout",desc:"Token acquisition in iframe failed due to timeout. For more visit: aka.ms/msaljs/browser-errors."},redirectInIframeError:{code:"redirect_in_iframe",desc:"Redirects are not supported for iframed or brokered applications. Please ensure you are using MSAL.js in a top frame of the window if using the redirect APIs, or use the popup APIs."},blockTokenRequestsInHiddenIframeError:{code:"block_iframe_reload",desc:"Request was blocked inside an iframe because MSAL detected an authentication response. For more visit: aka.ms/msaljs/browser-errors"},blockAcquireTokenInPopupsError:{code:"block_nested_popups",desc:"Request was blocked inside a popup because MSAL detected it was running in a popup."},iframeClosedPrematurelyError:{code:"iframe_closed_prematurely",desc:"The iframe being monitored was closed prematurely."},silentLogoutUnsupportedError:{code:"silent_logout_unsupported",desc:"Silent logout not supported. Please call logoutRedirect or logoutPopup instead."},noAccountError:{code:"no_account_error",desc:"No account object provided to acquireTokenSilent and no active account has been set. Please call setActiveAccount or provide an account on the request."},silentPromptValueError:{code:"silent_prompt_value_error",desc:"The value given for the prompt value is not valid for silent requests - must be set to 'none' or 'no_session'."},noTokenRequestCacheError:{code:"no_token_request_cache_error",desc:"No token request found in cache."},unableToParseTokenRequestCacheError:{code:"unable_to_parse_token_request_cache_error",desc:"The cached token request could not be parsed."},noCachedAuthorityError:{code:"no_cached_authority_error",desc:"No cached authority found."},authRequestNotSet:{code:"auth_request_not_set_error",desc:"Auth Request not set. Please ensure initiateAuthRequest was called from the InteractionHandler"},invalidCacheType:{code:"invalid_cache_type",desc:"Invalid cache type"},notInBrowserEnvironment:{code:"non_browser_environment",desc:"Login and token requests are not supported in non-browser environments."},databaseNotOpen:{code:"database_not_open",desc:"Database is not open!"},noNetworkConnectivity:{code:"no_network_connectivity",desc:"No network connectivity. Check your internet connection."},postRequestFailed:{code:"post_request_failed",desc:"Network request failed: If the browser threw a CORS error, check that the redirectUri is registered in the Azure App Portal as type 'SPA'"},getRequestFailed:{code:"get_request_failed",desc:"Network request failed. Please check the network trace to determine root cause."},failedToParseNetworkResponse:{code:"failed_to_parse_response",desc:"Failed to parse network response. Check network trace."},unableToLoadTokenError:{code:"unable_to_load_token",desc:"Error loading token to cache."},signingKeyNotFoundInStorage:{code:"crypto_key_not_found",desc:"Cryptographic Key or Keypair not found in browser storage."},authCodeRequired:{code:"auth_code_required",desc:"An authorization code must be provided (as the `code` property on the request) to this flow."},authCodeOrNativeAccountRequired:{code:"auth_code_or_nativeAccountId_required",desc:"An authorization code or nativeAccountId must be provided to this flow."},databaseUnavailable:{code:"database_unavailable",desc:"IndexedDB, which is required for persistent cryptographic key storage, is unavailable. This may be caused by browser privacy features which block persistent storage in third-party contexts."},unableToAcquireTokenFromNativePlatform:{code:"unable_to_acquire_token_from_native_platform",desc:"Unable to acquire token from native platform. For a list of possible reasons visit aka.ms/msaljs/browser-errors."},nativeHandshakeTimeout:{code:"native_handshake_timeout",desc:"Timed out while attempting to establish connection to browser extension"},nativeExtensionNotInstalled:{code:"native_extension_not_installed",desc:"Native extension is not installed. If you think this is a mistake call the initialize function."},nativeConnectionNotEstablished:{code:"native_connection_not_established",desc:"Connection to native platform has not been established. Please install a compatible browser extension and run initialize(). For more please visit aka.ms/msaljs/browser-errors."},nativeBrokerCalledBeforeInitialize:{code:"native_broker_called_before_initialize",desc:"You must call and await the initialize function before attempting to call any other MSAL API when native brokering is enabled. For more please visit aka.ms/msaljs/browser-errors."},nativePromptNotSupported:{code:"native_prompt_not_supported",desc:"The provided prompt is not supported by the native platform. This request should be routed to the web based flow."}},R=function(r){Jt(e,r);function e(t,i){var n=r.call(this,t,i)||this;return Object.setPrototypeOf(n,e.prototype),n.name="BrowserAuthError",n}return e.createPkceNotGeneratedError=function(t){return new e(L.pkceNotGenerated.code,L.pkceNotGenerated.desc+" Detail:"+t)},e.createCryptoNotAvailableError=function(t){return new e(L.cryptoDoesNotExist.code,L.cryptoDoesNotExist.desc+" Detail:"+t)},e.createHttpMethodNotImplementedError=function(t){return new e(L.httpMethodNotImplementedError.code,L.httpMethodNotImplementedError.desc+" Given Method: "+t)},e.createEmptyNavigationUriError=function(){return new e(L.emptyNavigateUriError.code,L.emptyNavigateUriError.desc)},e.createEmptyHashError=function(t){return new e(L.hashEmptyError.code,L.hashEmptyError.desc+" Given Url: "+t)},e.createHashDoesNotContainStateError=function(){return new e(L.hashDoesNotContainStateError.code,L.hashDoesNotContainStateError.desc)},e.createHashDoesNotContainKnownPropertiesError=function(){return new e(L.hashDoesNotContainKnownPropertiesError.code,L.hashDoesNotContainKnownPropertiesError.desc)},e.createUnableToParseStateError=function(){return new e(L.unableToParseStateError.code,L.unableToParseStateError.desc)},e.createStateInteractionTypeMismatchError=function(){return new e(L.stateInteractionTypeMismatchError.code,L.stateInteractionTypeMismatchError.desc)},e.createInteractionInProgressError=function(){return new e(L.interactionInProgress.code,L.interactionInProgress.desc)},e.createPopupWindowError=function(t){var i=L.popupWindowError.desc;return i=F.isEmpty(t)?i:i+" Details: "+t,new e(L.popupWindowError.code,i)},e.createEmptyWindowCreatedError=function(){return new e(L.emptyWindowError.code,L.emptyWindowError.desc)},e.createUserCancelledError=function(){return new e(L.userCancelledError.code,L.userCancelledError.desc)},e.createMonitorPopupTimeoutError=function(){return new e(L.monitorPopupTimeoutError.code,L.monitorPopupTimeoutError.desc)},e.createMonitorIframeTimeoutError=function(){return new e(L.monitorIframeTimeoutError.code,L.monitorIframeTimeoutError.desc)},e.createRedirectInIframeError=function(t){return new e(L.redirectInIframeError.code,L.redirectInIframeError.desc+" (window.parent !== window) => "+t)},e.createBlockReloadInHiddenIframeError=function(){return new e(L.blockTokenRequestsInHiddenIframeError.code,L.blockTokenRequestsInHiddenIframeError.desc)},e.createBlockAcquireTokenInPopupsError=function(){return new e(L.blockAcquireTokenInPopupsError.code,L.blockAcquireTokenInPopupsError.desc)},e.createIframeClosedPrematurelyError=function(){return new e(L.iframeClosedPrematurelyError.code,L.iframeClosedPrematurelyError.desc)},e.createSilentLogoutUnsupportedError=function(){return new e(L.silentLogoutUnsupportedError.code,L.silentLogoutUnsupportedError.desc)},e.createNoAccountError=function(){return new e(L.noAccountError.code,L.noAccountError.desc)},e.createSilentPromptValueError=function(t){return new e(L.silentPromptValueError.code,L.silentPromptValueError.desc+" Given value: "+t)},e.createUnableToParseTokenRequestCacheError=function(){return new e(L.unableToParseTokenRequestCacheError.code,L.unableToParseTokenRequestCacheError.desc)},e.createNoTokenRequestCacheError=function(){return new e(L.noTokenRequestCacheError.code,L.noTokenRequestCacheError.desc)},e.createAuthRequestNotSetError=function(){return new e(L.authRequestNotSet.code,L.authRequestNotSet.desc)},e.createNoCachedAuthorityError=function(){return new e(L.noCachedAuthorityError.code,L.noCachedAuthorityError.desc)},e.createInvalidCacheTypeError=function(){return new e(L.invalidCacheType.code,""+L.invalidCacheType.desc)},e.createNonBrowserEnvironmentError=function(){return new e(L.notInBrowserEnvironment.code,L.notInBrowserEnvironment.desc)},e.createDatabaseNotOpenError=function(){return new e(L.databaseNotOpen.code,L.databaseNotOpen.desc)},e.createNoNetworkConnectivityError=function(){return new e(L.noNetworkConnectivity.code,L.noNetworkConnectivity.desc)},e.createPostRequestFailedError=function(t,i){return new e(L.postRequestFailed.code,L.postRequestFailed.desc+" | Network client threw: "+t+" | Attempted to reach: "+i.split("?")[0])},e.createGetRequestFailedError=function(t,i){return new e(L.getRequestFailed.code,L.getRequestFailed.desc+" | Network client threw: "+t+" | Attempted to reach: "+i.split("?")[0])},e.createFailedToParseNetworkResponseError=function(t){return new e(L.failedToParseNetworkResponse.code,L.failedToParseNetworkResponse.desc+" | Attempted to reach: "+t.split("?")[0])},e.createUnableToLoadTokenError=function(t){return new e(L.unableToLoadTokenError.code,L.unableToLoadTokenError.desc+" | "+t)},e.createSigningKeyNotFoundInStorageError=function(t){return new e(L.signingKeyNotFoundInStorage.code,L.signingKeyNotFoundInStorage.desc+" | No match found for KeyId: "+t)},e.createAuthCodeRequiredError=function(){return new e(L.authCodeRequired.code,L.authCodeRequired.desc)},e.createAuthCodeOrNativeAccountIdRequiredError=function(){return new e(L.authCodeOrNativeAccountRequired.code,L.authCodeOrNativeAccountRequired.desc)},e.createDatabaseUnavailableError=function(){return new e(L.databaseUnavailable.code,L.databaseUnavailable.desc)},e.createUnableToAcquireTokenFromNativePlatformError=function(){return new e(L.unableToAcquireTokenFromNativePlatform.code,L.unableToAcquireTokenFromNativePlatform.desc)},e.createNativeHandshakeTimeoutError=function(){return new e(L.nativeHandshakeTimeout.code,L.nativeHandshakeTimeout.desc)},e.createNativeExtensionNotInstalledError=function(){return new e(L.nativeExtensionNotInstalled.code,L.nativeExtensionNotInstalled.desc)},e.createNativeConnectionNotEstablishedError=function(){return new e(L.nativeConnectionNotEstablished.code,L.nativeConnectionNotEstablished.desc)},e.createNativeBrokerCalledBeforeInitialize=function(){return new e(L.nativeBrokerCalledBeforeInitialize.code,L.nativeBrokerCalledBeforeInitialize.desc)},e.createNativePromptParameterNotSupportedError=function(){return new e(L.nativePromptNotSupported.code,L.nativePromptNotSupported.desc)},e}(Q);/*! @azure/msal-browser v2.32.2 2023-01-10 */var $r={INTERACTION_IN_PROGRESS_VALUE:"interaction_in_progress",INVALID_GRANT_ERROR:"invalid_grant",POPUP_WIDTH:483,POPUP_HEIGHT:600,POPUP_NAME_PREFIX:"msal",DEFAULT_POLL_INTERVAL_MS:30,MSAL_SKU:"msal.js.browser"},bs={CHANNEL_ID:"53ee284d-920a-4b59-9d30-a60315b26836",PREFERRED_EXTENSION_ID:"ppnbnpeolgkicgegkbkbjmhlideopiji",MATS_TELEMETRY:"MATS"},Vi;(function(r){r.HandshakeRequest="Handshake",r.HandshakeResponse="HandshakeResponse",r.GetToken="GetToken",r.Response="Response"})(Vi||(Vi={}));var c1;(function(r){r.LocalStorage="localStorage",r.SessionStorage="sessionStorage",r.MemoryStorage="memoryStorage"})(c1||(c1={}));var ti;(function(r){r.GET="GET",r.POST="POST"})(ti||(ti={}));var Ce;(function(r){r.AUTHORITY="authority",r.ACQUIRE_TOKEN_ACCOUNT="acquireToken.account",r.SESSION_STATE="session.state",r.REQUEST_STATE="request.state",r.NONCE_IDTOKEN="nonce.id_token",r.ORIGIN_URI="request.origin",r.RENEW_STATUS="token.renew.status",r.URL_HASH="urlHash",r.REQUEST_PARAMS="request.params",r.SCOPES="scopes",r.INTERACTION_STATUS_KEY="interaction.status",r.CCS_CREDENTIAL="ccs.credential",r.CORRELATION_ID="request.correlationId",r.NATIVE_REQUEST="request.native",r.REDIRECT_CONTEXT="request.redirect.context"})(Ce||(Ce={}));var C2;(function(r){r.WRAPPER_SKU="wrapper.sku",r.WRAPPER_VER="wrapper.version"})(C2||(C2={}));var je;(function(r){r[r.acquireTokenRedirect=861]="acquireTokenRedirect",r[r.acquireTokenPopup=862]="acquireTokenPopup",r[r.ssoSilent=863]="ssoSilent",r[r.acquireTokenSilent_authCode=864]="acquireTokenSilent_authCode",r[r.handleRedirectPromise=865]="handleRedirectPromise",r[r.acquireTokenByCode=866]="acquireTokenByCode",r[r.acquireTokenSilent_silentFlow=61]="acquireTokenSilent_silentFlow",r[r.logout=961]="logout",r[r.logoutPopup=962]="logoutPopup"})(je||(je={}));var W;(function(r){r.Redirect="redirect",r.Popup="popup",r.Silent="silent",r.None="none"})(W||(W={}));var bm;(function(r){r.Startup="startup",r.Login="login",r.Logout="logout",r.AcquireToken="acquireToken",r.SsoSilent="ssoSilent",r.HandleRedirect="handleRedirect",r.None="none"})(bm||(bm={}));var xm={scopes:rl},ro="jwk",Mm;(function(r){r.React="@azure/msal-react",r.Angular="@azure/msal-angular"})(Mm||(Mm={}));var Y3="msal.db",hH=1,dH=Y3+".keys",E1;(function(r){r[r.Default=0]="Default",r[r.AccessToken=1]="AccessToken",r[r.AccessTokenAndRefreshToken=2]="AccessTokenAndRefreshToken",r[r.RefreshToken=3]="RefreshToken",r[r.RefreshTokenAndNetwork=4]="RefreshTokenAndNetwork",r[r.Skip=5]="Skip"})(E1||(E1={}));/*! @azure/msal-browser v2.32.2 2023-01-10 */var H1={redirectUriNotSet:{code:"redirect_uri_empty",desc:"A redirect URI is required for all calls, and none has been set."},postLogoutUriNotSet:{code:"post_logout_uri_empty",desc:"A post logout redirect has not been set."},storageNotSupportedError:{code:"storage_not_supported",desc:"Given storage configuration option was not supported."},noRedirectCallbacksSet:{code:"no_redirect_callbacks",desc:"No redirect callbacks have been set. Please call setRedirectCallbacks() with the appropriate function arguments before continuing. More information is available here: https://github.com/AzureAD/microsoft-authentication-library-for-js/wiki/MSAL-basics."},invalidCallbackObject:{code:"invalid_callback_object",desc:"The object passed for the callback was invalid. More information is available here: https://github.com/AzureAD/microsoft-authentication-library-for-js/wiki/MSAL-basics."},stubPcaInstanceCalled:{code:"stubbed_public_client_application_called",desc:"Stub instance of Public Client Application was called. If using msal-react, please ensure context is not used without a provider. For more visit: aka.ms/msaljs/browser-errors"},inMemRedirectUnavailable:{code:"in_mem_redirect_unavailable",desc:"Redirect cannot be supported. In-memory storage was selected and storeAuthStateInCookie=false, which would cause the library to be unable to handle the incoming hash. If you would like to use the redirect API, please use session/localStorage or set storeAuthStateInCookie=true."},entropyNotProvided:{code:"entropy_not_provided",desc:"The available browser crypto interface requires entropy set via system.cryptoOptions.entropy configuration option."}},$0=function(r){Jt(e,r);function e(t,i){var n=r.call(this,t,i)||this;return n.name="BrowserConfigurationAuthError",Object.setPrototypeOf(n,e.prototype),n}return e.createRedirectUriEmptyError=function(){return new e(H1.redirectUriNotSet.code,H1.redirectUriNotSet.desc)},e.createPostLogoutRedirectUriEmptyError=function(){return new e(H1.postLogoutUriNotSet.code,H1.postLogoutUriNotSet.desc)},e.createStorageNotSupportedError=function(t){return new e(H1.storageNotSupportedError.code,H1.storageNotSupportedError.desc+" Given Location: "+t)},e.createRedirectCallbacksNotSetError=function(){return new e(H1.noRedirectCallbacksSet.code,H1.noRedirectCallbacksSet.desc)},e.createStubPcaInstanceCalledError=function(){return new e(H1.stubPcaInstanceCalled.code,H1.stubPcaInstanceCalled.desc)},e.createInMemoryRedirectUnavailableError=function(){return new e(H1.inMemRedirectUnavailable.code,H1.inMemRedirectUnavailable.desc)},e.createEntropyNotProvided=function(){return new e(H1.entropyNotProvided.code,H1.entropyNotProvided.desc)},e}(Q);/*! @azure/msal-browser v2.32.2 2023-01-10 */var Cm=function(){function r(e){this.validateWindowStorage(e),this.windowStorage=window[e]}return r.prototype.validateWindowStorage=function(e){if(e!==c1.LocalStorage&&e!==c1.SessionStorage)throw $0.createStorageNotSupportedError(e);var t=!!window[e];if(!t)throw $0.createStorageNotSupportedError(e)},r.prototype.getItem=function(e){return this.windowStorage.getItem(e)},r.prototype.setItem=function(e,t){this.windowStorage.setItem(e,t)},r.prototype.removeItem=function(e){this.windowStorage.removeItem(e)},r.prototype.getKeys=function(){return Object.keys(this.windowStorage)},r.prototype.containsKey=function(e){return this.windowStorage.hasOwnProperty(e)},r}();/*! @azure/msal-browser v2.32.2 2023-01-10 */var Q3=function(){function r(){this.cache=new Map}return r.prototype.getItem=function(e){return this.cache.get(e)||null},r.prototype.setItem=function(e,t){this.cache.set(e,t)},r.prototype.removeItem=function(e){this.cache.delete(e)},r.prototype.getKeys=function(){var e=[];return this.cache.forEach(function(t,i){e.push(i)}),e},r.prototype.containsKey=function(e){return this.cache.has(e)},r.prototype.clear=function(){this.cache.clear()},r}();/*! @azure/msal-browser v2.32.2 2023-01-10 */var N_=function(){function r(){}return r.extractBrowserRequestState=function(e,t){if(F.isEmpty(t))return null;try{var i=Di.parseRequestState(e,t);return i.libraryState.meta}catch(n){throw j.createInvalidStateError(t,n)}},r.parseServerResponseFromHash=function(e){if(!e)return{};var t=new ke(e);return ke.getDeserializedHash(t.getHash())},r}();/*! @azure/msal-browser v2.32.2 2023-01-10 */var X3=function(r){Jt(e,r);function e(t,i,n,a){var o=r.call(this,t,n)||this;return o.COOKIE_LIFE_MULTIPLIER=24*60*60*1e3,o.cacheConfig=i,o.logger=a,o.internalStorage=new Q3,o.browserStorage=o.setupBrowserStorage(o.cacheConfig.cacheLocation),o.temporaryCacheStorage=o.setupTemporaryCacheStorage(o.cacheConfig.cacheLocation),o.migrateCacheEntries(),o}return e.prototype.setupBrowserStorage=function(t){switch(t){case c1.LocalStorage:case c1.SessionStorage:try{return new Cm(t)}catch(i){this.logger.verbose(i);break}}return this.cacheConfig.cacheLocation=c1.MemoryStorage,new Q3},e.prototype.setupTemporaryCacheStorage=function(t){switch(t){case c1.LocalStorage:case c1.SessionStorage:try{return new Cm(c1.SessionStorage)}catch(i){return this.logger.verbose(i),this.internalStorage}case c1.MemoryStorage:default:return this.internalStorage}},e.prototype.migrateCacheEntries=function(){var t=this,i=w.CACHE_PREFIX+"."+Ct.ID_TOKEN,n=w.CACHE_PREFIX+"."+Ct.CLIENT_INFO,a=w.CACHE_PREFIX+"."+Ct.ERROR,o=w.CACHE_PREFIX+"."+Ct.ERROR_DESC,s=this.browserStorage.getItem(i),c=this.browserStorage.getItem(n),l=this.browserStorage.getItem(a),h=this.browserStorage.getItem(o),d=[s,c,l,h],u=[Ct.ID_TOKEN,Ct.CLIENT_INFO,Ct.ERROR,Ct.ERROR_DESC];u.forEach(function(v,m){return t.migrateCacheEntry(v,d[m])})},e.prototype.migrateCacheEntry=function(t,i){i&&this.setTemporaryCache(t,i,!0)},e.prototype.validateAndParseJson=function(t){try{var i=JSON.parse(t);return i&&typeof i=="object"?i:null}catch{return null}},e.prototype.getItem=function(t){return this.browserStorage.getItem(t)},e.prototype.setItem=function(t,i){this.browserStorage.setItem(t,i)},e.prototype.getAccount=function(t){var i=this.getItem(t);if(!i)return null;var n=this.validateAndParseJson(i);return!n||!Wt.isAccountEntity(n)?null:Pr.toObject(new Wt,n)},e.prototype.setAccount=function(t){this.logger.trace("BrowserCacheManager.setAccount called");var i=t.generateAccountKey();this.setItem(i,JSON.stringify(t))},e.prototype.getIdTokenCredential=function(t){var i=this.getItem(t);if(!i)return this.logger.trace("BrowserCacheManager.getIdTokenCredential: called, no cache hit"),null;var n=this.validateAndParseJson(i);return!n||!kc.isIdTokenEntity(n)?(this.logger.trace("BrowserCacheManager.getIdTokenCredential: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getIdTokenCredential: cache hit"),Pr.toObject(new kc,n))},e.prototype.setIdTokenCredential=function(t){this.logger.trace("BrowserCacheManager.setIdTokenCredential called");var i=t.generateCredentialKey();this.setItem(i,JSON.stringify(t))},e.prototype.getAccessTokenCredential=function(t){var i=this.getItem(t);if(!i)return this.logger.trace("BrowserCacheManager.getAccessTokenCredential: called, no cache hit"),null;var n=this.validateAndParseJson(i);return!n||!Ec.isAccessTokenEntity(n)?(this.logger.trace("BrowserCacheManager.getAccessTokenCredential: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getAccessTokenCredential: cache hit"),Pr.toObject(new Ec,n))},e.prototype.setAccessTokenCredential=function(t){this.logger.trace("BrowserCacheManager.setAccessTokenCredential called");var i=t.generateCredentialKey();this.setItem(i,JSON.stringify(t))},e.prototype.getRefreshTokenCredential=function(t){var i=this.getItem(t);if(!i)return this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: called, no cache hit"),null;var n=this.validateAndParseJson(i);return!n||!k0.isRefreshTokenEntity(n)?(this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: cache hit"),Pr.toObject(new k0,n))},e.prototype.setRefreshTokenCredential=function(t){this.logger.trace("BrowserCacheManager.setRefreshTokenCredential called");var i=t.generateCredentialKey();this.setItem(i,JSON.stringify(t))},e.prototype.getAppMetadata=function(t){var i=this.getItem(t);if(!i)return this.logger.trace("BrowserCacheManager.getAppMetadata: called, no cache hit"),null;var n=this.validateAndParseJson(i);return!n||!K3.isAppMetadataEntity(t,n)?(this.logger.trace("BrowserCacheManager.getAppMetadata: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getAppMetadata: cache hit"),Pr.toObject(new K3,n))},e.prototype.setAppMetadata=function(t){this.logger.trace("BrowserCacheManager.setAppMetadata called");var i=t.generateAppMetadataKey();this.setItem(i,JSON.stringify(t))},e.prototype.getServerTelemetry=function(t){var i=this.getItem(t);if(!i)return this.logger.trace("BrowserCacheManager.getServerTelemetry: called, no cache hit"),null;var n=this.validateAndParseJson(i);return!n||!S0.isServerTelemetryEntity(t,n)?(this.logger.trace("BrowserCacheManager.getServerTelemetry: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getServerTelemetry: cache hit"),Pr.toObject(new S0,n))},e.prototype.setServerTelemetry=function(t,i){this.logger.trace("BrowserCacheManager.setServerTelemetry called"),this.setItem(t,JSON.stringify(i))},e.prototype.getAuthorityMetadata=function(t){var i=this.internalStorage.getItem(t);if(!i)return this.logger.trace("BrowserCacheManager.getAuthorityMetadata: called, no cache hit"),null;var n=this.validateAndParseJson(i);return n&&W3.isAuthorityMetadataEntity(t,n)?(this.logger.trace("BrowserCacheManager.getAuthorityMetadata: cache hit"),Pr.toObject(new W3,n)):null},e.prototype.getAuthorityMetadataKeys=function(){var t=this,i=this.internalStorage.getKeys();return i.filter(function(n){return t.isAuthorityMetadata(n)})},e.prototype.setWrapperMetadata=function(t,i){this.internalStorage.setItem(C2.WRAPPER_SKU,t),this.internalStorage.setItem(C2.WRAPPER_VER,i)},e.prototype.getWrapperMetadata=function(){var t=this.internalStorage.getItem(C2.WRAPPER_SKU)||w.EMPTY_STRING,i=this.internalStorage.getItem(C2.WRAPPER_VER)||w.EMPTY_STRING;return[t,i]},e.prototype.setAuthorityMetadata=function(t,i){this.logger.trace("BrowserCacheManager.setAuthorityMetadata called"),this.internalStorage.setItem(t,JSON.stringify(i))},e.prototype.getActiveAccount=function(){var t=this.generateCacheKey(Ct.ACTIVE_ACCOUNT_FILTERS),i=this.getItem(t);if(!i){this.logger.trace("BrowserCacheManager.getActiveAccount: No active account filters cache schema found, looking for legacy schema");var n=this.generateCacheKey(Ct.ACTIVE_ACCOUNT),a=this.getItem(n);if(!a)return this.logger.trace("BrowserCacheManager.getActiveAccount: No active account found"),null;var o=this.getAccountInfoByFilter({localAccountId:a})[0]||null;return o?(this.logger.trace("BrowserCacheManager.getActiveAccount: Legacy active account cache schema found"),this.logger.trace("BrowserCacheManager.getActiveAccount: Adding active account filters cache schema"),this.setActiveAccount(o),o):null}var s=this.validateAndParseJson(i);return s?(this.logger.trace("BrowserCacheManager.getActiveAccount: Active account filters schema found"),this.getAccountInfoByFilter({homeAccountId:s.homeAccountId,localAccountId:s.localAccountId})[0]||null):(this.logger.trace("BrowserCacheManager.getActiveAccount: No active account found"),null)},e.prototype.setActiveAccount=function(t){var i=this.generateCacheKey(Ct.ACTIVE_ACCOUNT_FILTERS),n=this.generateCacheKey(Ct.ACTIVE_ACCOUNT);if(t){this.logger.verbose("setActiveAccount: Active account set");var a={homeAccountId:t.homeAccountId,localAccountId:t.localAccountId};this.browserStorage.setItem(i,JSON.stringify(a)),this.browserStorage.setItem(n,t.localAccountId)}else this.logger.verbose("setActiveAccount: No account passed, active account not set"),this.browserStorage.removeItem(i),this.browserStorage.removeItem(n)},e.prototype.getAccountInfoByFilter=function(t){var i=this.getAllAccounts();return this.logger.trace("BrowserCacheManager.getAccountInfoByFilter: total "+i.length+" accounts found"),i.filter(function(n){return!(t.username&&t.username.toLowerCase()!==n.username.toLowerCase()||t.homeAccountId&&t.homeAccountId!==n.homeAccountId||t.localAccountId&&t.localAccountId!==n.localAccountId||t.tenantId&&t.tenantId!==n.tenantId||t.environment&&t.environment!==n.environment)})},e.prototype.getAccountInfoByHints=function(t,i){var n=this.getAllAccounts().filter(function(a){if(i){var o=a.idTokenClaims&&a.idTokenClaims.sid;return i===o}return t?t===a.username:!1});if(n.length===1)return n[0];if(n.length>1)throw j.createMultipleMatchingAccountsInCacheError();return null},e.prototype.getThrottlingCache=function(t){var i=this.getItem(t);if(!i)return this.logger.trace("BrowserCacheManager.getThrottlingCache: called, no cache hit"),null;var n=this.validateAndParseJson(i);return!n||!zm.isThrottlingEntity(t,n)?(this.logger.trace("BrowserCacheManager.getThrottlingCache: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getThrottlingCache: cache hit"),Pr.toObject(new zm,n))},e.prototype.setThrottlingCache=function(t,i){this.logger.trace("BrowserCacheManager.setThrottlingCache called"),this.setItem(t,JSON.stringify(i))},e.prototype.getTemporaryCache=function(t,i){var n=i?this.generateCacheKey(t):t;if(this.cacheConfig.storeAuthStateInCookie){var a=this.getItemCookie(n);if(a)return this.logger.trace("BrowserCacheManager.getTemporaryCache: storeAuthStateInCookies set to true, retrieving from cookies"),a}var o=this.temporaryCacheStorage.getItem(n);if(!o){if(this.cacheConfig.cacheLocation===c1.LocalStorage){var s=this.browserStorage.getItem(n);if(s)return this.logger.trace("BrowserCacheManager.getTemporaryCache: Temporary cache item found in local storage"),s}return this.logger.trace("BrowserCacheManager.getTemporaryCache: No cache item found in local storage"),null}return this.logger.trace("BrowserCacheManager.getTemporaryCache: Temporary cache item returned"),o},e.prototype.setTemporaryCache=function(t,i,n){var a=n?this.generateCacheKey(t):t;this.temporaryCacheStorage.setItem(a,i),this.cacheConfig.storeAuthStateInCookie&&(this.logger.trace("BrowserCacheManager.setTemporaryCache: storeAuthStateInCookie set to true, setting item cookie"),this.setItemCookie(a,i))},e.prototype.removeItem=function(t){return this.browserStorage.removeItem(t),this.temporaryCacheStorage.removeItem(t),this.cacheConfig.storeAuthStateInCookie&&(this.logger.trace("BrowserCacheManager.removeItem: storeAuthStateInCookie is true, clearing item cookie"),this.clearItemCookie(t)),!0},e.prototype.containsKey=function(t){return this.browserStorage.containsKey(t)||this.temporaryCacheStorage.containsKey(t)},e.prototype.getKeys=function(){return i6(this.browserStorage.getKeys(),this.temporaryCacheStorage.getKeys())},e.prototype.clear=function(){return V(this,void 0,void 0,function(){var t=this;return S(this,function(i){switch(i.label){case 0:return[4,this.removeAllAccounts()];case 1:return i.sent(),this.removeAppMetadata(),this.getKeys().forEach(function(n){(t.browserStorage.containsKey(n)||t.temporaryCacheStorage.containsKey(n))&&(n.indexOf(w.CACHE_PREFIX)!==-1||n.indexOf(t.clientId)!==-1)&&t.removeItem(n)}),this.internalStorage.clear(),[2]}})})},e.prototype.setItemCookie=function(t,i,n){var a=encodeURIComponent(t)+"="+encodeURIComponent(i)+";path=/;SameSite=Lax;";if(n){var o=this.getCookieExpirationTime(n);a+="expires="+o+";"}this.cacheConfig.secureCookies&&(a+="Secure;"),document.cookie=a},e.prototype.getItemCookie=function(t){for(var i=encodeURIComponent(t)+"=",n=document.cookie.split(";"),a=0;a<n.length;a++){for(var o=n[a];o.charAt(0)===" ";)o=o.substring(1);if(o.indexOf(i)===0)return decodeURIComponent(o.substring(i.length,o.length))}return w.EMPTY_STRING},e.prototype.clearMsalCookies=function(){var t=this,i=w.CACHE_PREFIX+"."+this.clientId,n=document.cookie.split(";");n.forEach(function(a){for(;a.charAt(0)===" ";)a=a.substring(1);if(a.indexOf(i)===0){var o=a.split("=")[0];t.clearItemCookie(o)}})},e.prototype.clearItemCookie=function(t){this.setItemCookie(t,w.EMPTY_STRING,-1)},e.prototype.getCookieExpirationTime=function(t){var i=new Date,n=new Date(i.getTime()+t*this.COOKIE_LIFE_MULTIPLIER);return n.toUTCString()},e.prototype.getCache=function(){return this.browserStorage},e.prototype.setCache=function(){},e.prototype.generateCacheKey=function(t){var i=this.validateAndParseJson(t);return i?JSON.stringify(t):F.startsWith(t,w.CACHE_PREFIX)||F.startsWith(t,Ct.ADAL_ID_TOKEN)?t:w.CACHE_PREFIX+"."+this.clientId+"."+t},e.prototype.generateAuthorityKey=function(t){var i=Di.parseRequestState(this.cryptoImpl,t).libraryState.id;return this.generateCacheKey(Ce.AUTHORITY+"."+i)},e.prototype.generateNonceKey=function(t){var i=Di.parseRequestState(this.cryptoImpl,t).libraryState.id;return this.generateCacheKey(Ce.NONCE_IDTOKEN+"."+i)},e.prototype.generateStateKey=function(t){var i=Di.parseRequestState(this.cryptoImpl,t).libraryState.id;return this.generateCacheKey(Ce.REQUEST_STATE+"."+i)},e.prototype.getCachedAuthority=function(t){var i=this.generateStateKey(t),n=this.getTemporaryCache(i);if(!n)return null;var a=this.generateAuthorityKey(n);return this.getTemporaryCache(a)},e.prototype.updateCacheEntries=function(t,i,n,a,o){this.logger.trace("BrowserCacheManager.updateCacheEntries called");var s=this.generateStateKey(t);this.setTemporaryCache(s,t,!1);var c=this.generateNonceKey(t);this.setTemporaryCache(c,i,!1);var l=this.generateAuthorityKey(t);if(this.setTemporaryCache(l,n,!1),o){var h={credential:o.homeAccountId,type:Y1.HOME_ACCOUNT_ID};this.setTemporaryCache(Ce.CCS_CREDENTIAL,JSON.stringify(h),!0)}else if(!F.isEmpty(a)){var h={credential:a,type:Y1.UPN};this.setTemporaryCache(Ce.CCS_CREDENTIAL,JSON.stringify(h),!0)}},e.prototype.resetRequestCache=function(t){var i=this;this.logger.trace("BrowserCacheManager.resetRequestCache called"),F.isEmpty(t)||this.getKeys().forEach(function(n){n.indexOf(t)!==-1&&i.removeItem(n)}),t&&(this.removeItem(this.generateStateKey(t)),this.removeItem(this.generateNonceKey(t)),this.removeItem(this.generateAuthorityKey(t))),this.removeItem(this.generateCacheKey(Ce.REQUEST_PARAMS)),this.removeItem(this.generateCacheKey(Ce.ORIGIN_URI)),this.removeItem(this.generateCacheKey(Ce.URL_HASH)),this.removeItem(this.generateCacheKey(Ce.CORRELATION_ID)),this.removeItem(this.generateCacheKey(Ce.CCS_CREDENTIAL)),this.removeItem(this.generateCacheKey(Ce.NATIVE_REQUEST)),this.setInteractionInProgress(!1)},e.prototype.cleanRequestByState=function(t){if(this.logger.trace("BrowserCacheManager.cleanRequestByState called"),t){var i=this.generateStateKey(t),n=this.temporaryCacheStorage.getItem(i);this.logger.infoPii("BrowserCacheManager.cleanRequestByState: Removing temporary cache items for state: "+n),this.resetRequestCache(n||w.EMPTY_STRING)}this.clearMsalCookies()},e.prototype.cleanRequestByInteractionType=function(t){var i=this;this.logger.trace("BrowserCacheManager.cleanRequestByInteractionType called"),this.getKeys().forEach(function(n){if(n.indexOf(Ce.REQUEST_STATE)!==-1){var a=i.temporaryCacheStorage.getItem(n);if(a){var o=N_.extractBrowserRequestState(i.cryptoImpl,a);o&&o.interactionType===t&&(i.logger.infoPii("BrowserCacheManager.cleanRequestByInteractionType: Removing temporary cache items for state: "+a),i.resetRequestCache(a))}}}),this.clearMsalCookies(),this.setInteractionInProgress(!1)},e.prototype.cacheCodeRequest=function(t,i){this.logger.trace("BrowserCacheManager.cacheCodeRequest called");var n=i.base64Encode(JSON.stringify(t));this.setTemporaryCache(Ce.REQUEST_PARAMS,n,!0)},e.prototype.getCachedRequest=function(t,i){this.logger.trace("BrowserCacheManager.getCachedRequest called");var n=this.getTemporaryCache(Ce.REQUEST_PARAMS,!0);if(!n)throw R.createNoTokenRequestCacheError();var a=this.validateAndParseJson(i.base64Decode(n));if(!a)throw R.createUnableToParseTokenRequestCacheError();if(this.removeItem(this.generateCacheKey(Ce.REQUEST_PARAMS)),F.isEmpty(a.authority)){var o=this.generateAuthorityKey(t),s=this.getTemporaryCache(o);if(!s)throw R.createNoCachedAuthorityError();a.authority=s}return a},e.prototype.getCachedNativeRequest=function(){this.logger.trace("BrowserCacheManager.getCachedNativeRequest called");var t=this.getTemporaryCache(Ce.NATIVE_REQUEST,!0);if(!t)return this.logger.trace("BrowserCacheManager.getCachedNativeRequest: No cached native request found"),null;var i=this.validateAndParseJson(t);return i||(this.logger.error("BrowserCacheManager.getCachedNativeRequest: Unable to parse native request"),null)},e.prototype.isInteractionInProgress=function(t){var i=this.getInteractionInProgress();return t?i===this.clientId:!!i},e.prototype.getInteractionInProgress=function(){var t=w.CACHE_PREFIX+"."+Ce.INTERACTION_STATUS_KEY;return this.getTemporaryCache(t,!1)},e.prototype.setInteractionInProgress=function(t){var i=w.CACHE_PREFIX+"."+Ce.INTERACTION_STATUS_KEY;if(t){if(this.getInteractionInProgress())throw R.createInteractionInProgressError();this.setTemporaryCache(i,this.clientId,!1)}else!t&&this.getInteractionInProgress()===this.clientId&&this.removeItem(i)},e.prototype.getLegacyLoginHint=function(){var t=this.getTemporaryCache(Ct.ADAL_ID_TOKEN);t&&(this.browserStorage.removeItem(Ct.ADAL_ID_TOKEN),this.logger.verbose("Cached ADAL id token retrieved."));var i=this.getTemporaryCache(Ct.ID_TOKEN,!0);i&&(this.removeItem(this.generateCacheKey(Ct.ID_TOKEN)),this.logger.verbose("Cached MSAL.js v1 id token retrieved"));var n=i||t;if(n){var a=new ui(n,this.cryptoImpl);if(a.claims&&a.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"),a.claims.preferred_username;if(a.claims&&a.claims.upn)return this.logger.verbose("No SSO params used and ADAL/MSAL v1 token retrieved, setting ADAL/MSAL v1 upn as loginHint"),a.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(t,i){var n=i.generateCredentialKey();if(t!==n){var a=this.getItem(t);if(a)return this.removeItem(t),this.setItem(n,a),this.logger.verbose("Updated an outdated "+i.credentialType+" cache key"),n;this.logger.error("Attempted to update an outdated "+i.credentialType+" cache key but no item matching the outdated key was found in storage")}return t},e.prototype.getRedirectRequestContext=function(){return this.getTemporaryCache(Ce.REDIRECT_CONTEXT,!0)},e.prototype.setRedirectRequestContext=function(t){this.setTemporaryCache(Ce.REDIRECT_CONTEXT,t,!0)},e}(Pr),uH=function(r,e){var t={cacheLocation:c1.MemoryStorage,storeAuthStateInCookie:!1,secureCookies:!1};return new X3(r,t,M0,e)};/*! @azure/msal-browser v2.32.2 2023-01-10 */var Ed="@azure/msal-browser",Ys="2.32.2";/*! @azure/msal-browser v2.32.2 2023-01-10 */var vH=function(){function r(){}return r.prototype.sendGetRequestAsync=function(e,t){return V(this,void 0,void 0,function(){var i,n,a;return S(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,fetch(e,{method:ti.GET,headers:this.getFetchHeaders(t)})];case 1:return i=o.sent(),[3,3];case 2:throw n=o.sent(),window.navigator.onLine?R.createGetRequestFailedError(n,e):R.createNoNetworkConnectivityError();case 3:return o.trys.push([3,5,,6]),a={headers:this.getHeaderDict(i.headers)},[4,i.json()];case 4:return[2,(a.body=o.sent(),a.status=i.status,a)];case 5:throw o.sent(),R.createFailedToParseNetworkResponseError(e);case 6:return[2]}})})},r.prototype.sendPostRequestAsync=function(e,t){return V(this,void 0,void 0,function(){var i,n,a,o;return S(this,function(s){switch(s.label){case 0:i=t&&t.body||w.EMPTY_STRING,s.label=1;case 1:return s.trys.push([1,3,,4]),[4,fetch(e,{method:ti.POST,headers:this.getFetchHeaders(t),body:i})];case 2:return n=s.sent(),[3,4];case 3:throw a=s.sent(),window.navigator.onLine?R.createPostRequestFailedError(a,e):R.createNoNetworkConnectivityError();case 4:return s.trys.push([4,6,,7]),o={headers:this.getHeaderDict(n.headers)},[4,n.json()];case 5:return[2,(o.body=s.sent(),o.status=n.status,o)];case 6:throw s.sent(),R.createFailedToParseNetworkResponseError(e);case 7:return[2]}})})},r.prototype.getFetchHeaders=function(e){var t=new Headers;if(!(e&&e.headers))return t;var i=e.headers;return Object.keys(i).forEach(function(n){t.append(n,i[n])}),t},r.prototype.getHeaderDict=function(e){var t={};return e.forEach(function(i,n){t[n]=i}),t},r}();/*! @azure/msal-browser v2.32.2 2023-01-10 */var mH=function(){function r(){}return r.prototype.sendGetRequestAsync=function(e,t){return V(this,void 0,void 0,function(){return S(this,function(i){return[2,this.sendRequestAsync(e,ti.GET,t)]})})},r.prototype.sendPostRequestAsync=function(e,t){return V(this,void 0,void 0,function(){return S(this,function(i){return[2,this.sendRequestAsync(e,ti.POST,t)]})})},r.prototype.sendRequestAsync=function(e,t,i){var n=this;return new Promise(function(a,o){var s=new XMLHttpRequest;if(s.open(t,e,!0),n.setXhrHeaders(s,i),s.onload=function(){(s.status<200||s.status>=300)&&(t===ti.POST?o(R.createPostRequestFailedError("Failed with status "+s.status,e)):o(R.createGetRequestFailedError("Failed with status "+s.status,e)));try{var c=JSON.parse(s.responseText),l={headers:n.getHeaderDict(s),body:c,status:s.status};a(l)}catch{o(R.createFailedToParseNetworkResponseError(e))}},s.onerror=function(){window.navigator.onLine?t===ti.POST?o(R.createPostRequestFailedError("Failed with status "+s.status,e)):o(R.createGetRequestFailedError("Failed with status "+s.status,e)):o(R.createNoNetworkConnectivityError())},t===ti.POST&&i&&i.body)s.send(i.body);else if(t===ti.GET)s.send();else throw R.createHttpMethodNotImplementedError(t)})},r.prototype.setXhrHeaders=function(e,t){if(t&&t.headers){var i=t.headers;Object.keys(i).forEach(function(n){e.setRequestHeader(n,i[n])})}},r.prototype.getHeaderDict=function(e){var t=e.getAllResponseHeaders(),i=t.trim().split(/[\r\n]+/),n={};return i.forEach(function(a){var o=a.split(": "),s=o.shift(),c=o.join(": ");s&&c&&(n[s]=c)}),n},r}();/*! @azure/msal-browser v2.32.2 2023-01-10 */var lt=function(){function r(){}return r.clearHash=function(e){e.location.hash=w.EMPTY_STRING,typeof e.history.replaceState=="function"&&e.history.replaceState(null,w.EMPTY_STRING,""+e.location.origin+e.location.pathname+e.location.search)},r.replaceHash=function(e){var t=e.split("#");t.shift(),window.location.hash=t.length>0?t.join("#"):w.EMPTY_STRING},r.isInIframe=function(){return window.parent!==window},r.isInPopup=function(){return typeof window<"u"&&!!window.opener&&window.opener!==window&&typeof window.name=="string"&&window.name.indexOf($r.POPUP_NAME_PREFIX+".")===0},r.getCurrentUri=function(){return window.location.href.split("?")[0].split("#")[0]},r.getHomepage=function(){var e=new ke(window.location.href),t=e.getUrlComponents();return t.Protocol+"//"+t.HostNameAndPort+"/"},r.getBrowserNetworkClient=function(){return window.fetch&&window.Headers?new vH:new mH},r.blockReloadInHiddenIframes=function(){var e=ke.hashContainsKnownProperties(window.location.hash);if(e&&r.isInIframe())throw R.createBlockReloadInHiddenIframeError()},r.blockRedirectInIframe=function(e,t){var i=r.isInIframe();if(e===W.Redirect&&i&&!t)throw R.createRedirectInIframeError(i)},r.blockAcquireTokenInPopups=function(){if(r.isInPopup())throw R.createBlockAcquireTokenInPopupsError()},r.blockNonBrowserEnvironment=function(e){if(!e)throw R.createNonBrowserEnvironmentError()},r.blockNativeBrokerCalledBeforeInitialized=function(e,t){if(e&&!t)throw R.createNativeBrokerCalledBeforeInitialize()},r.detectIEOrEdge=function(){var e=window.navigator.userAgent,t=e.indexOf("MSIE "),i=e.indexOf("Trident/"),n=e.indexOf("Edge/"),a=t>0||i>0,o=n>0;return a||o},r}();/*! @azure/msal-browser v2.32.2 2023-01-10 */var U_=function(){function r(e,t,i,n,a,o,s,c,l){this.config=e,this.browserStorage=t,this.browserCrypto=i,this.networkClient=this.config.system.networkClient,this.eventHandler=a,this.navigationClient=o,this.nativeMessageHandler=c,this.correlationId=l||this.browserCrypto.createNewGuid(),this.logger=n.clone($r.MSAL_SKU,Ys,this.correlationId),this.performanceClient=s}return r.prototype.clearCacheOnLogout=function(e){return V(this,void 0,void 0,function(){return S(this,function(t){switch(t.label){case 0:if(!e)return[3,5];Wt.accountInfoIsEqual(e,this.browserStorage.getActiveAccount(),!1)&&(this.logger.verbose("Setting active account to null"),this.browserStorage.setActiveAccount(null)),t.label=1;case 1:return t.trys.push([1,3,,4]),[4,this.browserStorage.removeAccount(Wt.generateAccountCacheKey(e))];case 2:return t.sent(),this.logger.verbose("Cleared cache items belonging to the account provided in the logout request."),[3,4];case 3:return t.sent(),this.logger.error("Account provided in logout request was not found. Local cache unchanged."),[3,4];case 4:return[3,9];case 5:return t.trys.push([5,8,,9]),this.logger.verbose("No account provided in logout request, clearing all cache items.",this.correlationId),[4,this.browserStorage.clear()];case 6:return t.sent(),[4,this.browserCrypto.clearKeystore()];case 7:return t.sent(),[3,9];case 8:return t.sent(),this.logger.error("Attempted to clear all MSAL cache items and failed. Local cache unchanged."),[3,9];case 9:return[2]}})})},r.prototype.initializeBaseRequest=function(e){return V(this,void 0,void 0,function(){var t,i,n,a;return S(this,function(o){switch(o.label){case 0:if(this.logger.verbose("Initializing BaseAuthRequest"),t=e.authority||this.config.auth.authority,i=i6(e&&e.scopes||[]),n=Y(Y({},e),{correlationId:this.correlationId,authority:t,scopes:i}),!n.authenticationScheme)n.authenticationScheme=Ie.BEARER,this.logger.verbose(`Authentication Scheme wasn't explicitly set in request, defaulting to "Bearer" request`);else{if(n.authenticationScheme===Ie.SSH){if(!e.sshJwk)throw Ye.createMissingSshJwkError();if(!e.sshKid)throw Ye.createMissingSshKidError()}this.logger.verbose('Authentication Scheme set to "'+n.authenticationScheme+'" as configured in Auth request')}return e.claims&&!F.isEmpty(e.claims)?(a=n,[4,this.browserCrypto.hashString(e.claims)]):[3,2];case 1:a.requestedClaimsHash=o.sent(),o.label=2;case 2:return[2,n]}})})},r.prototype.getRedirectUri=function(e){this.logger.verbose("getRedirectUri called");var t=e||this.config.auth.redirectUri||lt.getCurrentUri();return ke.getAbsoluteUrl(t,lt.getCurrentUri())},r.prototype.initializeServerTelemetryManager=function(e,t){this.logger.verbose("initializeServerTelemetryManager called");var i={clientId:this.config.auth.clientId,correlationId:this.correlationId,apiId:e,forceRefresh:t||!1,wrapperSKU:this.browserStorage.getWrapperMetadata()[0],wrapperVer:this.browserStorage.getWrapperMetadata()[1]};return new cH(i,this.browserStorage)},r.prototype.getDiscoveredAuthority=function(e){return V(this,void 0,void 0,function(){var t;return S(this,function(i){switch(i.label){case 0:return this.logger.verbose("getDiscoveredAuthority called"),t={protocolMode:this.config.auth.protocolMode,knownAuthorities:this.config.auth.knownAuthorities,cloudDiscoveryMetadata:this.config.auth.cloudDiscoveryMetadata,authorityMetadata:this.config.auth.authorityMetadata},e?(this.logger.verbose("Creating discovered authority with request authority"),[4,V0.createDiscoveredInstance(e,this.config.system.networkClient,this.browserStorage,t,this.logger)]):[3,2];case 1:return[2,i.sent()];case 2:return this.logger.verbose("Creating discovered authority with configured authority"),[4,V0.createDiscoveredInstance(this.config.auth.authority,this.config.system.networkClient,this.browserStorage,t,this.logger)];case 3:return[2,i.sent()]}})})},r}();/*! @azure/msal-browser v2.32.2 2023-01-10 */var Lo=function(r){Jt(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.initializeAuthorizationCodeRequest=function(t){return V(this,void 0,void 0,function(){var i,n;return S(this,function(a){switch(a.label){case 0:return this.logger.verbose("initializeAuthorizationRequest called",t.correlationId),[4,this.browserCrypto.generatePkceCodes()];case 1:return i=a.sent(),n=Y(Y({},t),{redirectUri:t.redirectUri,code:w.EMPTY_STRING,codeVerifier:i.verifier}),t.codeChallenge=i.challenge,t.codeChallengeMethod=w.S256_CODE_CHALLENGE_METHOD,[2,n]}})})},e.prototype.initializeLogoutRequest=function(t){this.logger.verbose("initializeLogoutRequest called",t==null?void 0:t.correlationId);var i=Y({correlationId:this.correlationId||this.browserCrypto.createNewGuid()},t);if(t)if(t.logoutHint)this.logger.verbose("logoutHint has already been set in logoutRequest");else if(t.account){var n=this.getLogoutHintFromIdTokenClaims(t.account);n&&(this.logger.verbose("Setting logoutHint to login_hint ID Token Claim value for the account provided"),i.logoutHint=n)}else this.logger.verbose("logoutHint was not set and account was not passed into logout request, logoutHint will not be set");else this.logger.verbose("logoutHint will not be set since no logout request was configured");return!t||t.postLogoutRedirectUri!==null?t&&t.postLogoutRedirectUri?(this.logger.verbose("Setting postLogoutRedirectUri to uri set on logout request",i.correlationId),i.postLogoutRedirectUri=ke.getAbsoluteUrl(t.postLogoutRedirectUri,lt.getCurrentUri())):this.config.auth.postLogoutRedirectUri===null?this.logger.verbose("postLogoutRedirectUri configured as null and no uri set on request, not passing post logout redirect",i.correlationId):this.config.auth.postLogoutRedirectUri?(this.logger.verbose("Setting postLogoutRedirectUri to configured uri",i.correlationId),i.postLogoutRedirectUri=ke.getAbsoluteUrl(this.config.auth.postLogoutRedirectUri,lt.getCurrentUri())):(this.logger.verbose("Setting postLogoutRedirectUri to current page",i.correlationId),i.postLogoutRedirectUri=ke.getAbsoluteUrl(lt.getCurrentUri(),lt.getCurrentUri())):this.logger.verbose("postLogoutRedirectUri passed as null, not setting post logout redirect uri",i.correlationId),i},e.prototype.getLogoutHintFromIdTokenClaims=function(t){var i=t.idTokenClaims;if(i){if(i.login_hint)return i.login_hint;this.logger.verbose("The ID Token Claims tied to the provided account do not contain a login_hint claim, logoutHint will not be added to logout request")}else this.logger.verbose("The provided account does not contain ID Token Claims, logoutHint will not be added to logout request");return null},e.prototype.createAuthCodeClient=function(t,i,n){return V(this,void 0,void 0,function(){var a;return S(this,function(o){switch(o.label){case 0:return[4,this.getClientConfiguration(t,i,n)];case 1:return a=o.sent(),[2,new T_(a)]}})})},e.prototype.getClientConfiguration=function(t,i,n){return V(this,void 0,void 0,function(){var a,o;return S(this,function(s){switch(s.label){case 0:return this.logger.verbose("getClientConfiguration called",this.correlationId),[4,this.getDiscoveredAuthority(i,n)];case 1:return a=s.sent(),o=this.config.system.loggerOptions,[2,{authOptions:{clientId:this.config.auth.clientId,authority:a,clientCapabilities:this.config.auth.clientCapabilities},systemOptions:{tokenRenewalOffsetSeconds:this.config.system.tokenRenewalOffsetSeconds,preventCorsPreflight:!0},loggerOptions:{loggerCallback:o.loggerCallback,piiLoggingEnabled:o.piiLoggingEnabled,logLevel:o.logLevel,correlationId:this.correlationId},cryptoInterface:this.browserCrypto,networkInterface:this.networkClient,storageInterface:this.browserStorage,serverTelemetryManager:t,libraryInfo:{sku:$r.MSAL_SKU,version:Ys,cpu:w.EMPTY_STRING,os:w.EMPTY_STRING},telemetry:this.config.telemetry}]}})})},e.prototype.validateAndExtractStateFromHash=function(t,i,n){if(this.logger.verbose("validateAndExtractStateFromHash called",n),!t.state)throw R.createHashDoesNotContainStateError();var a=N_.extractBrowserRequestState(this.browserCrypto,t.state);if(!a)throw R.createUnableToParseStateError();if(a.interactionType!==i)throw R.createStateInteractionTypeMismatchError();return this.logger.verbose("Returning state from hash",n),t.state},e.prototype.getDiscoveredAuthority=function(t,i){var n;return V(this,void 0,void 0,function(){var a,o,s,c;return S(this,function(l){switch(l.label){case 0:return this.logger.verbose("getDiscoveredAuthority called",this.correlationId),a=(n=this.performanceClient)===null||n===void 0?void 0:n.startMeasurement(St.StandardInteractionClientGetDiscoveredAuthority,this.correlationId),o={protocolMode:this.config.auth.protocolMode,knownAuthorities:this.config.auth.knownAuthorities,cloudDiscoveryMetadata:this.config.auth.cloudDiscoveryMetadata,authorityMetadata:this.config.auth.authorityMetadata,skipAuthorityMetadataCache:this.config.auth.skipAuthorityMetadataCache},s=t||this.config.auth.authority,c=A0.generateAuthority(s,i||this.config.auth.azureCloudOptions),this.logger.verbose("Creating discovered authority with configured authority",this.correlationId),[4,V0.createDiscoveredInstance(c,this.config.system.networkClient,this.browserStorage,o,this.logger).then(function(h){return a.endMeasurement({success:!0}),h}).catch(function(h){throw a.endMeasurement({errorCode:h.errorCode,subErrorCode:h.subError,success:!1}),h})];case 1:return[2,l.sent()]}})})},e.prototype.initializeAuthorizationRequest=function(t,i){return V(this,void 0,void 0,function(){var n,a,o,s,c,l,h;return S(this,function(d){switch(d.label){case 0:return this.logger.verbose("initializeAuthorizationRequest called",this.correlationId),n=this.getRedirectUri(t.redirectUri),a={interactionType:i},o=Di.setRequestState(this.browserCrypto,t&&t.state||w.EMPTY_STRING,a),c=[{}],[4,this.initializeBaseRequest(t)];case 1:return s=Y.apply(void 0,[Y.apply(void 0,c.concat([d.sent()])),{redirectUri:n,state:o,nonce:t.nonce||this.browserCrypto.createNewGuid(),responseMode:y0.FRAGMENT}]),l=t.account||this.browserStorage.getActiveAccount(),l&&(this.logger.verbose("Setting validated request account",this.correlationId),this.logger.verbosePii("Setting validated request account: "+l.homeAccountId,this.correlationId),s.account=l),F.isEmpty(s.loginHint)&&!l&&(h=this.browserStorage.getLegacyLoginHint(),h&&(s.loginHint=h)),[2,s]}})})},e}(U_);/*! @azure/msal-browser v2.32.2 2023-01-10 */var o6=function(){function r(e,t,i,n){this.authModule=e,this.browserStorage=t,this.authCodeRequest=i,this.logger=n}return r.prototype.handleCodeResponseFromHash=function(e,t,i,n){return V(this,void 0,void 0,function(){var a,o,s;return S(this,function(c){if(this.logger.verbose("InteractionHandler.handleCodeResponse called"),F.isEmpty(e))throw R.createEmptyHashError(e);if(a=this.browserStorage.generateStateKey(t),o=this.browserStorage.getTemporaryCache(a),!o)throw j.createStateNotFoundError("Cached State");try{s=this.authModule.handleFragmentResponse(e,o)}catch(l){throw l instanceof Aa&&l.subError===L.userCancelledError.code?R.createUserCancelledError():l}return[2,this.handleCodeResponseFromServer(s,t,i,n)]})})},r.prototype.handleCodeResponseFromServer=function(e,t,i,n,a){return a===void 0&&(a=!0),V(this,void 0,void 0,function(){var o,s,c,l,h,d;return S(this,function(u){switch(u.label){case 0:if(this.logger.trace("InteractionHandler.handleCodeResponseFromServer called"),o=this.browserStorage.generateStateKey(t),s=this.browserStorage.getTemporaryCache(o),!s)throw j.createStateNotFoundError("Cached State");return c=this.browserStorage.generateNonceKey(s),l=this.browserStorage.getTemporaryCache(c),this.authCodeRequest.code=e.code,e.cloud_instance_host_name?[4,this.updateTokenEndpointAuthority(e.cloud_instance_host_name,i,n)]:[3,2];case 1:u.sent(),u.label=2;case 2:return a&&(e.nonce=l||void 0),e.state=s,e.client_info?this.authCodeRequest.clientInfo=e.client_info:(h=this.checkCcsCredentials(),h&&(this.authCodeRequest.ccsCredential=h)),[4,this.authModule.acquireToken(this.authCodeRequest,e)];case 3:return d=u.sent(),this.browserStorage.cleanRequestByState(t),[2,d]}})})},r.prototype.updateTokenEndpointAuthority=function(e,t,i){return V(this,void 0,void 0,function(){var n,a;return S(this,function(o){switch(o.label){case 0:return n="https://"+e+"/"+t.tenant+"/",[4,V0.createDiscoveredInstance(n,i,this.browserStorage,t.options,this.logger)];case 1:return a=o.sent(),this.authModule.updateAuthority(a),[2]}})})},r.prototype.checkCcsCredentials=function(){var e=this.browserStorage.getTemporaryCache(Ce.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},r}();/*! @azure/msal-browser v2.32.2 2023-01-10 */var Hm=function(r){Jt(e,r);function e(t,i,n,a,o){var s=r.call(this,t,i,n,a)||this;return s.browserCrypto=o,s}return e.prototype.initiateAuthRequest=function(t,i){return V(this,void 0,void 0,function(){var n,a;return S(this,function(o){switch(o.label){case 0:return this.logger.verbose("RedirectHandler.initiateAuthRequest called"),F.isEmpty(t)?[3,7]:(i.redirectStartPage&&(this.logger.verbose("RedirectHandler.initiateAuthRequest: redirectStartPage set, caching start page"),this.browserStorage.setTemporaryCache(Ce.ORIGIN_URI,i.redirectStartPage,!0)),this.browserStorage.setTemporaryCache(Ce.CORRELATION_ID,this.authCodeRequest.correlationId,!0),this.browserStorage.cacheCodeRequest(this.authCodeRequest,this.browserCrypto),this.logger.infoPii("RedirectHandler.initiateAuthRequest: Navigate to: "+t),n={apiId:je.acquireTokenRedirect,timeout:i.redirectTimeout,noHistory:!1},typeof i.onRedirectNavigate!="function"?[3,4]:(this.logger.verbose("RedirectHandler.initiateAuthRequest: Invoking onRedirectNavigate callback"),a=i.onRedirectNavigate(t),a===!1?[3,2]:(this.logger.verbose("RedirectHandler.initiateAuthRequest: onRedirectNavigate did not return false, navigating"),[4,i.navigationClient.navigateExternal(t,n)])));case 1:return o.sent(),[2];case 2:return this.logger.verbose("RedirectHandler.initiateAuthRequest: onRedirectNavigate returned false, stopping navigation"),[2];case 3:return[3,6];case 4:return this.logger.verbose("RedirectHandler.initiateAuthRequest: Navigating window to navigate url"),[4,i.navigationClient.navigateExternal(t,n)];case 5:return o.sent(),[2];case 6:return[3,8];case 7:throw this.logger.info("RedirectHandler.initiateAuthRequest: Navigate url is empty"),R.createEmptyNavigationUriError();case 8:return[2]}})})},e.prototype.handleCodeResponseFromHash=function(t,i,n,a){return V(this,void 0,void 0,function(){var o,s,c,l,h,d,u;return S(this,function(v){switch(v.label){case 0:if(this.logger.verbose("RedirectHandler.handleCodeResponse called"),F.isEmpty(t))throw R.createEmptyHashError(t);if(this.browserStorage.setInteractionInProgress(!1),o=this.browserStorage.generateStateKey(i),s=this.browserStorage.getTemporaryCache(o),!s)throw j.createStateNotFoundError("Cached State");try{c=this.authModule.handleFragmentResponse(t,s)}catch(m){throw m instanceof Aa&&m.subError===L.userCancelledError.code?R.createUserCancelledError():m}return l=this.browserStorage.generateNonceKey(s),h=this.browserStorage.getTemporaryCache(l),this.authCodeRequest.code=c.code,c.cloud_instance_host_name?[4,this.updateTokenEndpointAuthority(c.cloud_instance_host_name,n,a)]:[3,2];case 1:v.sent(),v.label=2;case 2:return c.nonce=h||void 0,c.state=s,c.client_info?this.authCodeRequest.clientInfo=c.client_info:(d=this.checkCcsCredentials(),d&&(this.authCodeRequest.ccsCredential=d)),[4,this.authModule.acquireToken(this.authCodeRequest,c)];case 3:return u=v.sent(),this.browserStorage.cleanRequestByState(i),[2,u]}})})},e}(o6);/*! @azure/msal-browser v2.32.2 2023-01-10 */var ie;(function(r){r.INITIALIZE_START="msal:initializeStart",r.INITIALIZE_END="msal:initializeEnd",r.ACCOUNT_ADDED="msal:accountAdded",r.ACCOUNT_REMOVED="msal:accountRemoved",r.LOGIN_START="msal:loginStart",r.LOGIN_SUCCESS="msal:loginSuccess",r.LOGIN_FAILURE="msal:loginFailure",r.ACQUIRE_TOKEN_START="msal:acquireTokenStart",r.ACQUIRE_TOKEN_SUCCESS="msal:acquireTokenSuccess",r.ACQUIRE_TOKEN_FAILURE="msal:acquireTokenFailure",r.ACQUIRE_TOKEN_NETWORK_START="msal:acquireTokenFromNetworkStart",r.SSO_SILENT_START="msal:ssoSilentStart",r.SSO_SILENT_SUCCESS="msal:ssoSilentSuccess",r.SSO_SILENT_FAILURE="msal:ssoSilentFailure",r.ACQUIRE_TOKEN_BY_CODE_START="msal:acquireTokenByCodeStart",r.ACQUIRE_TOKEN_BY_CODE_SUCCESS="msal:acquireTokenByCodeSuccess",r.ACQUIRE_TOKEN_BY_CODE_FAILURE="msal:acquireTokenByCodeFailure",r.HANDLE_REDIRECT_START="msal:handleRedirectStart",r.HANDLE_REDIRECT_END="msal:handleRedirectEnd",r.POPUP_OPENED="msal:popupOpened",r.LOGOUT_START="msal:logoutStart",r.LOGOUT_SUCCESS="msal:logoutSuccess",r.LOGOUT_FAILURE="msal:logoutFailure",r.LOGOUT_END="msal:logoutEnd"})(ie||(ie={}));/*! @azure/msal-browser v2.32.2 2023-01-10 */var an;(function(r){r.USER_INTERACTION_REQUIRED="USER_INTERACTION_REQUIRED",r.USER_CANCEL="USER_CANCEL",r.NO_NETWORK="NO_NETWORK",r.TRANSIENT_ERROR="TRANSIENT_ERROR",r.PERSISTENT_ERROR="PERSISTENT_ERROR",r.DISABLED="DISABLED",r.ACCOUNT_UNAVAILABLE="ACCOUNT_UNAVAILABLE"})(an||(an={}));var rs={extensionError:{code:"ContentError"},userSwitch:{code:"user_switch",desc:"User attempted to switch accounts in the native broker, which is not allowed. All new accounts must sign-in through the standard web flow first, please try again."},tokensNotFoundInCache:{code:"tokens_not_found_in_internal_memory_cache",desc:"Tokens not cached in MSAL JS internal memory, please make the WAM request"}},ii=function(r){Jt(e,r);function e(t,i,n){var a=r.call(this,t,i)||this;return Object.setPrototypeOf(a,e.prototype),a.name="NativeAuthError",a.ext=n,a}return e.prototype.isFatal=function(){if(this.ext&&this.ext.status&&(this.ext.status===an.PERSISTENT_ERROR||this.ext.status===an.DISABLED))return!0;switch(this.errorCode){case rs.extensionError.code:return!0;default:return!1}},e.createError=function(t,i,n){if(n&&n.status)switch(n.status){case an.ACCOUNT_UNAVAILABLE:return Tr.createNativeAccountUnavailableError();case an.USER_INTERACTION_REQUIRED:return new Tr(t,i);case an.USER_CANCEL:return R.createUserCancelledError();case an.NO_NETWORK:return R.createNoNetworkConnectivityError()}return new e(t,i,n)},e.createUserSwitchError=function(){return new e(rs.userSwitch.code,rs.userSwitch.desc)},e.createTokensNotFoundInCacheError=function(){return new e(rs.tokensNotFoundInCache.code,rs.tokensNotFoundInCache.desc)},e}(Q);/*! @azure/msal-browser v2.32.2 2023-01-10 */var F_=function(r){Jt(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.acquireToken=function(t){return V(this,void 0,void 0,function(){var i,n,a,o,s;return S(this,function(c){switch(c.label){case 0:return i=this.performanceClient.startMeasurement(St.SilentCacheClientAcquireToken,t.correlationId),n=this.initializeServerTelemetryManager(je.acquireTokenSilent_silentFlow),[4,this.createSilentFlowClient(n,t.authority,t.azureCloudOptions)];case 1:a=c.sent(),this.logger.verbose("Silent auth client created"),c.label=2;case 2:return c.trys.push([2,4,,5]),[4,a.acquireCachedToken(t)];case 3:return o=c.sent(),i.endMeasurement({success:!0,fromCache:!0}),[2,o];case 4:throw s=c.sent(),s instanceof R&&s.errorCode===L.signingKeyNotFoundInStorage.code&&this.logger.verbose("Signing keypair for bound access token not found. Refreshing bound access token and generating a new crypto keypair."),i.endMeasurement({errorCode:s instanceof Q&&s.errorCode||void 0,subErrorCode:s instanceof Q&&s.subError||void 0,success:!1}),s;case 5:return[2]}})})},e.prototype.logout=function(){return Promise.reject(R.createSilentLogoutUnsupportedError())},e.prototype.createSilentFlowClient=function(t,i,n){return V(this,void 0,void 0,function(){var a;return S(this,function(o){switch(o.label){case 0:return[4,this.getClientConfiguration(t,i,n)];case 1:return a=o.sent(),[2,new tH(a,this.performanceClient)]}})})},e.prototype.initializeSilentRequest=function(t,i){return V(this,void 0,void 0,function(){var n;return S(this,function(a){switch(a.label){case 0:return n=[Y({},t)],[4,this.initializeBaseRequest(t)];case 1:return[2,Y.apply(void 0,[Y.apply(void 0,n.concat([a.sent()])),{account:i,forceRefresh:t.forceRefresh||!1}])]}})})},e}(Lo);/*! @azure/msal-browser v2.32.2 2023-01-10 */var L2=function(r){Jt(e,r);function e(t,i,n,a,o,s,c,l,h,d,u,v){var m=r.call(this,t,i,n,a,o,s,l,h,v)||this;return m.apiId=c,m.accountId=d,m.nativeMessageHandler=h,m.nativeStorageManager=u,m.silentCacheClient=new F_(t,m.nativeStorageManager,n,a,o,s,l,h,v),m}return e.prototype.acquireToken=function(t){return V(this,void 0,void 0,function(){var i,n,a,o,s,c,l;return S(this,function(h){switch(h.label){case 0:return this.logger.trace("NativeInteractionClient - acquireToken called."),i=this.performanceClient.startMeasurement(St.NativeInteractionClientAcquireToken,t.correlationId),n=gr.nowSeconds(),[4,this.initializeNativeRequest(t)];case 1:a=h.sent(),h.label=2;case 2:return h.trys.push([2,4,,5]),[4,this.acquireTokensFromCache(this.accountId,a)];case 3:return o=h.sent(),i.endMeasurement({success:!0,isNativeBroker:!1,fromCache:!0}),[2,o];case 4:return h.sent(),this.logger.info("MSAL internal Cache does not contain tokens, proceed to make a native call"),[3,5];case 5:return s={method:Vi.GetToken,request:a},[4,this.nativeMessageHandler.sendMessage(s)];case 6:return c=h.sent(),l=this.validateNativeResponse(c),[2,this.handleNativeResponse(l,a,n).then(function(d){return i.endMeasurement({success:!0,isNativeBroker:!0,requestId:d.requestId}),d}).catch(function(d){throw i.endMeasurement({success:!1,errorCode:d.errorCode,subErrorCode:d.subError,isNativeBroker:!0}),d})]}})})},e.prototype.createSilentCacheRequest=function(t,i){return{authority:t.authority,correlationId:this.correlationId,scopes:g1.fromString(t.scope).asArray(),account:i,forceRefresh:!1}},e.prototype.acquireTokensFromCache=function(t,i){return V(this,void 0,void 0,function(){var n,a,o,s,c;return S(this,function(l){switch(l.label){case 0:if(n=this.browserStorage.readAccountFromCacheWithNativeAccountId(t),!n)throw j.createNoAccountFoundError();a=n.getAccountInfo(),l.label=1;case 1:return l.trys.push([1,3,,4]),o=this.createSilentCacheRequest(i,a),[4,this.silentCacheClient.acquireToken(o)];case 2:return s=l.sent(),[2,s];case 3:throw c=l.sent(),c;case 4:return[2]}})})},e.prototype.acquireTokenRedirect=function(t){return V(this,void 0,void 0,function(){var i,n,a,o,s,c;return S(this,function(l){switch(l.label){case 0:return this.logger.trace("NativeInteractionClient - acquireTokenRedirect called."),[4,this.initializeNativeRequest(t)];case 1:i=l.sent(),n={method:Vi.GetToken,request:i},l.label=2;case 2:return l.trys.push([2,4,,5]),[4,this.nativeMessageHandler.sendMessage(n)];case 3:return a=l.sent(),this.validateNativeResponse(a),[3,5];case 4:if(o=l.sent(),o instanceof ii&&o.isFatal())throw o;return[3,5];case 5:return this.browserStorage.setTemporaryCache(Ce.NATIVE_REQUEST,JSON.stringify(i),!0),s={apiId:je.acquireTokenRedirect,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},c=this.config.auth.navigateToLoginRequestUrl?window.location.href:this.getRedirectUri(t.redirectUri),[4,this.navigationClient.navigateExternal(c,s)];case 6:return l.sent(),[2]}})})},e.prototype.handleRedirectPromise=function(){return V(this,void 0,void 0,function(){var t,i,n,a,o,s,c,l;return S(this,function(h){switch(h.label){case 0:if(this.logger.trace("NativeInteractionClient - handleRedirectPromise called."),!this.browserStorage.isInteractionInProgress(!0))return this.logger.info("handleRedirectPromise called but there is no interaction in progress, returning null."),[2,null];if(t=this.browserStorage.getCachedNativeRequest(),!t)return this.logger.verbose("NativeInteractionClient - handleRedirectPromise called but there is no cached request, returning null."),[2,null];i=t.prompt,n=um(t,["prompt"]),i&&this.logger.verbose("NativeInteractionClient - handleRedirectPromise called and prompt was included in the original request, removing prompt from cached request to prevent second interaction with native broker window."),this.browserStorage.removeItem(this.browserStorage.generateCacheKey(Ce.NATIVE_REQUEST)),a={method:Vi.GetToken,request:n},o=gr.nowSeconds(),h.label=1;case 1:return h.trys.push([1,3,,4]),this.logger.verbose("NativeInteractionClient - handleRedirectPromise sending message to native broker."),[4,this.nativeMessageHandler.sendMessage(a)];case 2:return s=h.sent(),this.validateNativeResponse(s),c=this.handleNativeResponse(s,n,o),this.browserStorage.setInteractionInProgress(!1),[2,c];case 3:throw l=h.sent(),this.browserStorage.setInteractionInProgress(!1),l;case 4:return[2]}})})},e.prototype.logout=function(){return this.logger.trace("NativeInteractionClient - logout called."),Promise.reject("Logout not implemented yet")},e.prototype.handleNativeResponse=function(t,i,n){return V(this,void 0,void 0,function(){var a,o,s,c,l,h,d,u,v,m,f,C,_,p,z,M,A,I,N,U,Se=this;return S(this,function(ee){switch(ee.label){case 0:if(this.logger.trace("NativeInteractionClient - handleNativeResponse called."),a=this.getMATSFromResponse(t),this.performanceClient.addStaticFields({extensionId:this.nativeMessageHandler.getExtensionId(),extensionVersion:this.nativeMessageHandler.getExtensionVersion(),matsBrokerVersion:a?a.broker_version:void 0,matsAccountJoinOnStart:a?a.account_join_on_start:void 0,matsAccountJoinOnEnd:a?a.account_join_on_end:void 0,matsDeviceJoin:a?a.device_join:void 0,matsPromptBehavior:a?a.prompt_behavior:void 0,matsApiErrorCode:a?a.api_error_code:void 0,matsUiVisible:a?a.ui_visible:void 0,matsSilentCode:a?a.silent_code:void 0,matsSilentBiSubCode:a?a.silent_bi_sub_code:void 0,matsSilentMessage:a?a.silent_message:void 0,matsSilentStatus:a?a.silent_status:void 0,matsHttpStatus:a?a.http_status:void 0,matsHttpEventCount:a?a.http_event_count:void 0},this.correlationId),t.account.id!==i.accountId)throw ii.createUserSwitchError();return o=new ui(t.id_token||w.EMPTY_STRING,this.browserCrypto),[4,this.getDiscoveredAuthority(i.authority)];case 1:switch(s=ee.sent(),c=s.getPreferredCache(),l=Wt.generateHomeAccountId(t.client_info||w.EMPTY_STRING,ur.Default,this.logger,this.browserCrypto,o),h=Wt.createAccount(t.client_info,l,o,void 0,void 0,void 0,c,t.account.id),this.browserStorage.setAccount(h),d=t.scope?g1.fromString(t.scope):g1.fromString(i.scope),u=t.account.properties||{},v=u.UID||o.claims.oid||o.claims.sub||w.EMPTY_STRING,m=u.TenantId||o.claims.tid||w.EMPTY_STRING,C=Ie.BEARER,_=i.tokenType,_){case Ie.POP:return[3,2]}return[3,4];case 2:if(C=Ie.POP,t.shr)return this.logger.trace("handleNativeServerResponse: SHR is enabled in native layer"),f=t.shr,[3,5];if(p=new to(this.browserCrypto),z={resourceRequestMethod:i.resourceRequestMethod,resourceRequestUri:i.resourceRequestUri,shrClaims:i.shrClaims,shrNonce:i.shrNonce},!i.keyId)throw j.createKeyIdMissingError();return[4,p.signPopToken(t.access_token,i.keyId,z)];case 3:return f=ee.sent(),[3,5];case 4:f=t.access_token,ee.label=5;case 5:return M={authority:s.canonicalAuthority,uniqueId:v,tenantId:m,scopes:d.asArray(),account:h.getAccountInfo(),idToken:t.id_token,idTokenClaims:o.claims,accessToken:f,fromCache:a?this.isResponseFromCache(a):!1,expiresOn:new Date(Number(n+t.expires_in)*1e3),tokenType:C,correlationId:this.correlationId,state:t.state,fromNativeBroker:!0},A=kc.createIdTokenEntity(l,i.authority,t.id_token||w.EMPTY_STRING,i.clientId,o.claims.tid||w.EMPTY_STRING),this.nativeStorageManager.setIdTokenCredential(A),I=C===Ie.POP?w.SHR_NONCE_VALIDITY:(typeof t.expires_in=="string"?parseInt(t.expires_in,10):t.expires_in)||0,N=n+I,U=Ec.createAccessTokenEntity(l,i.authority,f,i.clientId,m,d.printScopes(),N,0,this.browserCrypto),this.nativeStorageManager.setAccessTokenCredential(U),this.browserStorage.removeAccountContext(h).catch(function(Xe){Se.logger.error("Error occurred while removing account context from browser storage. "+Xe)}),[2,M]}})})},e.prototype.validateNativeResponse=function(t){if(t.hasOwnProperty("access_token")&&t.hasOwnProperty("id_token")&&t.hasOwnProperty("client_info")&&t.hasOwnProperty("account")&&t.hasOwnProperty("scope")&&t.hasOwnProperty("expires_in"))return t;throw ii.createUnexpectedError("Response missing expected properties.")},e.prototype.getMATSFromResponse=function(t){if(t.properties.MATS)try{return JSON.parse(t.properties.MATS)}catch{this.logger.error("NativeInteractionClient - Error parsing MATS telemetry, returning null instead")}return null},e.prototype.isResponseFromCache=function(t){return typeof t.is_cached>"u"?(this.logger.verbose("NativeInteractionClient - MATS telemetry does not contain field indicating if response was served from cache. Returning false."),!1):!!t.is_cached},e.prototype.initializeNativeRequest=function(t){return V(this,void 0,void 0,function(){var i,n,a,o,s,c,l,h,d,u,v=this;return S(this,function(m){switch(m.label){case 0:return this.logger.trace("NativeInteractionClient - initializeNativeRequest called"),i=t.authority||this.config.auth.authority,n=new ke(i),n.validateAsUri(),a=t.scopes,o=um(t,["scopes"]),s=new g1(a||[]),s.appendScopes(rl),c=function(){switch(v.apiId){case je.ssoSilent:case je.acquireTokenSilent_silentFlow:return v.logger.trace("initializeNativeRequest: silent request sets prompt to none"),d1.NONE}if(!t.prompt){v.logger.trace("initializeNativeRequest: prompt was not provided");return}switch(t.prompt){case d1.NONE:case d1.CONSENT:case d1.LOGIN:return v.logger.trace("initializeNativeRequest: prompt is compatible with native flow"),t.prompt;default:throw v.logger.trace("initializeNativeRequest: prompt = "+t.prompt+" is not compatible with native flow"),R.createNativePromptParameterNotSupportedError()}},l=Y(Y({},o),{accountId:this.accountId,clientId:this.config.auth.clientId,authority:n.urlString,scope:s.printScopes(),redirectUri:this.getRedirectUri(t.redirectUri),prompt:c(),correlationId:this.correlationId,tokenType:t.authenticationScheme,windowTitleSubstring:document.title,extraParameters:Y(Y(Y({},t.extraQueryParameters),t.tokenQueryParameters),{telemetry:bs.MATS_TELEMETRY}),extendedExpiryToken:!1}),t.authenticationScheme!==Ie.POP?[3,2]:(h={resourceRequestUri:t.resourceRequestUri,resourceRequestMethod:t.resourceRequestMethod,shrClaims:t.shrClaims,shrNonce:t.shrNonce},d=new to(this.browserCrypto),[4,d.generateCnf(h)]);case 1:u=m.sent(),l.reqCnf=u.reqCnfHash,l.keyId=u.kid,m.label=2;case 2:return[2,l]}})})},e}(U_);/*! @azure/msal-browser v2.32.2 2023-01-10 */var ba=function(){function r(e,t,i){this.logger=e,this.handshakeTimeoutMs=t,this.extensionId=i,this.resolvers=new Map,this.handshakeResolvers=new Map,this.responseId=0,this.messageChannel=new MessageChannel,this.windowListener=this.onWindowMessage.bind(this)}return r.prototype.sendMessage=function(e){return V(this,void 0,void 0,function(){var t,i=this;return S(this,function(n){return this.logger.trace("NativeMessageHandler - sendMessage called."),t={channel:bs.CHANNEL_ID,extensionId:this.extensionId,responseId:this.responseId++,body:e},this.logger.trace("NativeMessageHandler - Sending request to browser extension"),this.logger.tracePii("NativeMessageHandler - Sending request to browser extension: "+JSON.stringify(t)),this.messageChannel.port1.postMessage(t),[2,new Promise(function(a,o){i.resolvers.set(t.responseId,{resolve:a,reject:o})})]})})},r.createProvider=function(e,t){return V(this,void 0,void 0,function(){var i,n;return S(this,function(a){switch(a.label){case 0:e.trace("NativeMessageHandler - createProvider called."),a.label=1;case 1:return a.trys.push([1,3,,5]),i=new r(e,t,bs.PREFERRED_EXTENSION_ID),[4,i.sendHandshakeRequest()];case 2:return a.sent(),[2,i];case 3:return a.sent(),n=new r(e,t),[4,n.sendHandshakeRequest()];case 4:return a.sent(),[2,n];case 5:return[2]}})})},r.prototype.sendHandshakeRequest=function(){return V(this,void 0,void 0,function(){var e,t=this;return S(this,function(i){return this.logger.trace("NativeMessageHandler - sendHandshakeRequest called."),window.addEventListener("message",this.windowListener,!1),e={channel:bs.CHANNEL_ID,extensionId:this.extensionId,responseId:this.responseId++,body:{method:Vi.HandshakeRequest}},this.messageChannel.port1.onmessage=function(n){t.onChannelMessage(n)},window.postMessage(e,window.origin,[this.messageChannel.port2]),[2,new Promise(function(n,a){t.handshakeResolvers.set(e.responseId,{resolve:n,reject:a}),t.timeoutId=window.setTimeout(function(){window.removeEventListener("message",t.windowListener,!1),t.messageChannel.port1.close(),t.messageChannel.port2.close(),a(R.createNativeHandshakeTimeoutError()),t.handshakeResolvers.delete(e.responseId)},t.handshakeTimeoutMs)})]})})},r.prototype.onWindowMessage=function(e){if(this.logger.trace("NativeMessageHandler - onWindowMessage called"),e.source===window){var t=e.data;if(!(!t.channel||t.channel!==bs.CHANNEL_ID)&&!(t.extensionId&&t.extensionId!==this.extensionId)&&t.body.method===Vi.HandshakeRequest){this.logger.verbose(t.extensionId?"Extension with id: "+t.extensionId+" not installed":"No extension installed"),clearTimeout(this.timeoutId),this.messageChannel.port1.close(),this.messageChannel.port2.close(),window.removeEventListener("message",this.windowListener,!1);var i=this.handshakeResolvers.get(t.responseId);i&&i.reject(R.createNativeExtensionNotInstalledError())}}},r.prototype.onChannelMessage=function(e){this.logger.trace("NativeMessageHandler - onChannelMessage called.");var t=e.data,i=this.resolvers.get(t.responseId),n=this.handshakeResolvers.get(t.responseId);try{var a=t.body.method;if(a===Vi.Response){if(!i)return;var o=t.body.response;if(this.logger.trace("NativeMessageHandler - Received response from browser extension"),this.logger.tracePii("NativeMessageHandler - Received response from browser extension: "+JSON.stringify(o)),o.status!=="Success")i.reject(ii.createError(o.code,o.description,o.ext));else if(o.result)o.result.code&&o.result.description?i.reject(ii.createError(o.result.code,o.result.description,o.result.ext)):i.resolve(o.result);else throw Q.createUnexpectedError("Event does not contain result.");this.resolvers.delete(t.responseId)}else if(a===Vi.HandshakeResponse){if(!n)return;clearTimeout(this.timeoutId),window.removeEventListener("message",this.windowListener,!1),this.extensionId=t.extensionId,this.extensionVersion=t.body.version,this.logger.verbose("NativeMessageHandler - Received HandshakeResponse from extension: "+this.extensionId),n.resolve(),this.handshakeResolvers.delete(t.responseId)}}catch(s){this.logger.error("Error parsing response from WAM Extension"),this.logger.errorPii("Error parsing response from WAM Extension: "+s.toString()),this.logger.errorPii("Unable to parse "+e),i?i.reject(s):n&&n.reject(s)}},r.prototype.getExtensionId=function(){return this.extensionId},r.prototype.getExtensionVersion=function(){return this.extensionVersion},r.isNativeAvailable=function(e,t,i,n){if(t.trace("isNativeAvailable called"),!e.system.allowNativeBroker)return t.trace("isNativeAvailable: allowNativeBroker is not enabled, returning false"),!1;if(!i)return t.trace("isNativeAvailable: WAM extension provider is not initialized, returning false"),!1;if(n)switch(n){case Ie.BEARER:case Ie.POP:return t.trace("isNativeAvailable: authenticationScheme is supported, returning true"),!0;default:return t.trace("isNativeAvailable: authenticationScheme is not supported, returning false"),!1}return!0},r}();/*! @azure/msal-browser v2.32.2 2023-01-10 */var fH=function(r){Jt(e,r);function e(t,i,n,a,o,s,c,l,h,d){var u=r.call(this,t,i,n,a,o,s,c,h,d)||this;return u.nativeStorage=l,u}return e.prototype.acquireToken=function(t){return V(this,void 0,void 0,function(){var i,n,a,o,s,c,l,h,d,u=this;return S(this,function(v){switch(v.label){case 0:return[4,this.initializeAuthorizationRequest(t,W.Redirect)];case 1:i=v.sent(),this.browserStorage.updateCacheEntries(i.state,i.nonce,i.authority,i.loginHint||w.EMPTY_STRING,i.account||null),n=this.initializeServerTelemetryManager(je.acquireTokenRedirect),a=function(m){m.persisted&&(u.logger.verbose("Page was restored from back/forward cache. Clearing temporary cache."),u.browserStorage.cleanRequestByState(i.state))},v.label=2;case 2:return v.trys.push([2,7,,8]),[4,this.initializeAuthorizationCodeRequest(i)];case 3:return o=v.sent(),[4,this.createAuthCodeClient(n,i.authority,i.azureCloudOptions)];case 4:return s=v.sent(),this.logger.verbose("Auth code client created"),c=new Hm(s,this.browserStorage,o,this.logger,this.browserCrypto),[4,s.getAuthCodeUrl(Y(Y({},i),{nativeBroker:ba.isNativeAvailable(this.config,this.logger,this.nativeMessageHandler,t.authenticationScheme)}))];case 5:return l=v.sent(),h=this.getRedirectStartPage(t.redirectStartPage),this.logger.verbosePii("Redirect start page: "+h),window.addEventListener("pageshow",a),[4,c.initiateAuthRequest(l,{navigationClient:this.navigationClient,redirectTimeout:this.config.system.redirectNavigationTimeout,redirectStartPage:h,onRedirectNavigate:t.onRedirectNavigate})];case 6:return[2,v.sent()];case 7:throw d=v.sent(),d instanceof Q&&d.setCorrelationId(this.correlationId),window.removeEventListener("pageshow",a),n.cacheFailedRequest(d),this.browserStorage.cleanRequestByState(i.state),d;case 8:return[2]}})})},e.prototype.handleRedirectPromise=function(t){return V(this,void 0,void 0,function(){var i,n,a,o,s,c,l,h,d,u,v,m;return S(this,function(f){switch(f.label){case 0:i=this.initializeServerTelemetryManager(je.handleRedirectPromise),f.label=1;case 1:if(f.trys.push([1,10,,11]),!this.browserStorage.isInteractionInProgress(!0))return this.logger.info("handleRedirectPromise called but there is no interaction in progress, returning null."),[2,null];if(n=this.getRedirectResponseHash(t||window.location.hash),!n)return this.logger.info("handleRedirectPromise did not detect a response hash as a result of a redirect. Cleaning temporary cache."),this.browserStorage.cleanRequestByInteractionType(W.Redirect),[2,null];a=void 0;try{o=ke.getDeserializedHash(n),a=this.validateAndExtractStateFromHash(o,W.Redirect),this.logger.verbose("State extracted from hash")}catch(C){return this.logger.info("handleRedirectPromise was unable to extract state due to: "+C),this.browserStorage.cleanRequestByInteractionType(W.Redirect),[2,null]}return s=this.browserStorage.getTemporaryCache(Ce.ORIGIN_URI,!0)||w.EMPTY_STRING,c=ke.removeHashFromUrl(s),l=ke.removeHashFromUrl(window.location.href),c===l&&this.config.auth.navigateToLoginRequestUrl?(this.logger.verbose("Current page is loginRequestUrl, handling hash"),[4,this.handleHash(n,a,i)]):[3,3];case 2:return h=f.sent(),s.indexOf("#")>-1&&lt.replaceHash(s),[2,h];case 3:return this.config.auth.navigateToLoginRequestUrl?[3,4]:(this.logger.verbose("NavigateToLoginRequestUrl set to false, handling hash"),[2,this.handleHash(n,a,i)]);case 4:return!lt.isInIframe()||this.config.system.allowRedirectInIframe?(this.browserStorage.setTemporaryCache(Ce.URL_HASH,n,!0),d={apiId:je.handleRedirectPromise,timeout:this.config.system.redirectNavigationTimeout,noHistory:!0},u=!0,!s||s==="null"?(v=lt.getHomepage(),this.browserStorage.setTemporaryCache(Ce.ORIGIN_URI,v,!0),this.logger.warning("Unable to get valid login request url from cache, redirecting to home page"),[4,this.navigationClient.navigateInternal(v,d)]):[3,6]):[3,9];case 5:return u=f.sent(),[3,8];case 6:return this.logger.verbose("Navigating to loginRequestUrl: "+s),[4,this.navigationClient.navigateInternal(s,d)];case 7:u=f.sent(),f.label=8;case 8:if(!u)return[2,this.handleHash(n,a,i)];f.label=9;case 9:return[2,null];case 10:throw m=f.sent(),m instanceof Q&&m.setCorrelationId(this.correlationId),i.cacheFailedRequest(m),this.browserStorage.cleanRequestByInteractionType(W.Redirect),m;case 11:return[2]}})})},e.prototype.getRedirectResponseHash=function(t){this.logger.verbose("getRedirectResponseHash called");var i=ke.hashContainsKnownProperties(t);if(i)return lt.clearHash(window),this.logger.verbose("Hash contains known properties, returning response hash"),t;var n=this.browserStorage.getTemporaryCache(Ce.URL_HASH,!0);return this.browserStorage.removeItem(this.browserStorage.generateCacheKey(Ce.URL_HASH)),this.logger.verbose("Hash does not contain known properties, returning cached hash"),n},e.prototype.handleHash=function(t,i,n){return V(this,void 0,void 0,function(){var a,o,s,c,l,h,d,u=this;return S(this,function(v){switch(v.label){case 0:if(a=this.browserStorage.getCachedRequest(i,this.browserCrypto),this.logger.verbose("handleHash called, retrieved cached request"),o=ke.getDeserializedHash(t),o.accountId){if(this.logger.verbose("Account id found in hash, calling WAM for token"),!this.nativeMessageHandler)throw R.createNativeConnectionNotEstablishedError();return s=new L2(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,je.acquireTokenPopup,this.performanceClient,this.nativeMessageHandler,o.accountId,this.browserStorage,a.correlationId),c=Di.parseRequestState(this.browserCrypto,i).userRequestState,[2,s.acquireToken(Y(Y({},a),{state:c,prompt:void 0})).finally(function(){u.browserStorage.cleanRequestByState(i)})]}if(l=this.browserStorage.getCachedAuthority(i),!l)throw R.createNoCachedAuthorityError();return[4,this.createAuthCodeClient(n,l)];case 1:return h=v.sent(),this.logger.verbose("Auth code client created"),H0.removeThrottle(this.browserStorage,this.config.auth.clientId,a),d=new Hm(h,this.browserStorage,a,this.logger,this.browserCrypto),[4,d.handleCodeResponseFromHash(t,i,h.authority,this.networkClient)];case 2:return[2,v.sent()]}})})},e.prototype.logout=function(t){return V(this,void 0,void 0,function(){var i,n,a,o,s,c,l;return S(this,function(h){switch(h.label){case 0:this.logger.verbose("logoutRedirect called"),i=this.initializeLogoutRequest(t),n=this.initializeServerTelemetryManager(je.logout),h.label=1;case 1:return h.trys.push([1,10,,11]),this.eventHandler.emitEvent(ie.LOGOUT_START,W.Redirect,t),[4,this.clearCacheOnLogout(i.account)];case 2:return h.sent(),a={apiId:je.logout,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},[4,this.createAuthCodeClient(n,t&&t.authority)];case 3:return o=h.sent(),this.logger.verbose("Auth code client created"),s=o.getLogoutUri(i),this.eventHandler.emitEvent(ie.LOGOUT_SUCCESS,W.Redirect,i),t&&typeof t.onRedirectNavigate=="function"?(c=t.onRedirectNavigate(s),c===!1?[3,5]:(this.logger.verbose("Logout onRedirectNavigate did not return false, navigating"),this.browserStorage.getInteractionInProgress()||this.browserStorage.setInteractionInProgress(!0),[4,this.navigationClient.navigateExternal(s,a)])):[3,7];case 4:return h.sent(),[2];case 5:this.browserStorage.setInteractionInProgress(!1),this.logger.verbose("Logout onRedirectNavigate returned false, stopping navigation"),h.label=6;case 6:return[3,9];case 7:return this.browserStorage.getInteractionInProgress()||this.browserStorage.setInteractionInProgress(!0),[4,this.navigationClient.navigateExternal(s,a)];case 8:return h.sent(),[2];case 9:return[3,11];case 10:throw l=h.sent(),l instanceof Q&&l.setCorrelationId(this.correlationId),n.cacheFailedRequest(l),this.eventHandler.emitEvent(ie.LOGOUT_FAILURE,W.Redirect,null,l),this.eventHandler.emitEvent(ie.LOGOUT_END,W.Redirect),l;case 11:return this.eventHandler.emitEvent(ie.LOGOUT_END,W.Redirect),[2]}})})},e.prototype.getRedirectStartPage=function(t){var i=t||window.location.href;return ke.getAbsoluteUrl(i,lt.getCurrentUri())},e}(Lo);/*! @azure/msal-browser v2.32.2 2023-01-10 */var pH=function(r){Jt(e,r);function e(t,i,n,a,o,s,c,l,h,d){var u=r.call(this,t,i,n,a,o,s,c,h,d)||this;return u.unloadWindow=u.unloadWindow.bind(u),u.nativeStorage=l,u}return e.prototype.acquireToken=function(t){try{var i=this.generatePopupName(t.scopes||rl,t.authority||this.config.auth.authority),n=t.popupWindowAttributes||{};if(this.config.system.asyncPopups)return this.logger.verbose("asyncPopups set to true, acquiring token"),this.acquireTokenPopupAsync(t,i,n);this.logger.verbose("asyncPopup set to false, opening popup before acquiring token");var a=this.openSizedPopup("about:blank",i,n);return this.acquireTokenPopupAsync(t,i,n,a)}catch(o){return Promise.reject(o)}},e.prototype.logout=function(t){try{this.logger.verbose("logoutPopup called");var i=this.initializeLogoutRequest(t),n=this.generateLogoutPopupName(i),a=t&&t.authority,o=t&&t.mainWindowRedirectUri,s=(t==null?void 0:t.popupWindowAttributes)||{};if(this.config.system.asyncPopups)return this.logger.verbose("asyncPopups set to true"),this.logoutPopupAsync(i,n,s,a,void 0,o);this.logger.verbose("asyncPopup set to false, opening popup");var c=this.openSizedPopup("about:blank",n,s);return this.logoutPopupAsync(i,n,s,a,c,o)}catch(l){return Promise.reject(l)}},e.prototype.acquireTokenPopupAsync=function(t,i,n,a){return V(this,void 0,void 0,function(){var o,s,c,l,h,d,u,v,m,f,C,_,p,z,M,A,I,N=this;return S(this,function(U){switch(U.label){case 0:return this.logger.verbose("acquireTokenPopupAsync called"),o=this.initializeServerTelemetryManager(je.acquireTokenPopup),[4,this.initializeAuthorizationRequest(t,W.Popup)];case 1:s=U.sent(),this.browserStorage.updateCacheEntries(s.state,s.nonce,s.authority,s.loginHint||w.EMPTY_STRING,s.account||null),U.label=2;case 2:return U.trys.push([2,8,,9]),[4,this.initializeAuthorizationCodeRequest(s)];case 3:return c=U.sent(),[4,this.createAuthCodeClient(o,s.authority,s.azureCloudOptions)];case 4:return l=U.sent(),this.logger.verbose("Auth code client created"),h=ba.isNativeAvailable(this.config,this.logger,this.nativeMessageHandler,t.authenticationScheme),d=void 0,h&&(d=this.performanceClient.startMeasurement(St.FetchAccountIdWithNativeBroker,t.correlationId)),[4,l.getAuthCodeUrl(Y(Y({},s),{nativeBroker:h}))];case 5:return u=U.sent(),v=new o6(l,this.browserStorage,c,this.logger),m={popup:a,popupName:i,popupWindowAttributes:n},f=this.initiateAuthRequest(u,m),this.eventHandler.emitEvent(ie.POPUP_OPENED,W.Popup,{popupWindow:f},null),[4,this.monitorPopupForHash(f)];case 6:if(C=U.sent(),_=ke.getDeserializedHash(C),p=this.validateAndExtractStateFromHash(_,W.Popup,s.correlationId),H0.removeThrottle(this.browserStorage,this.config.auth.clientId,c),_.accountId){if(this.logger.verbose("Account id found in hash, calling WAM for token"),d&&d.endMeasurement({success:!0,isNativeBroker:!0}),!this.nativeMessageHandler)throw R.createNativeConnectionNotEstablishedError();return z=new L2(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,je.acquireTokenPopup,this.performanceClient,this.nativeMessageHandler,_.accountId,this.nativeStorage,s.correlationId),M=Di.parseRequestState(this.browserCrypto,p).userRequestState,[2,z.acquireToken(Y(Y({},s),{state:M,prompt:void 0})).finally(function(){N.browserStorage.cleanRequestByState(p)})]}return[4,v.handleCodeResponseFromHash(C,p,l.authority,this.networkClient)];case 7:return A=U.sent(),[2,A];case 8:throw I=U.sent(),a&&a.close(),I instanceof Q&&I.setCorrelationId(this.correlationId),o.cacheFailedRequest(I),this.browserStorage.cleanRequestByState(s.state),I;case 9:return[2]}})})},e.prototype.logoutPopupAsync=function(t,i,n,a,o,s){return V(this,void 0,void 0,function(){var c,l,h,d,u,v,m;return S(this,function(f){switch(f.label){case 0:this.logger.verbose("logoutPopupAsync called"),this.eventHandler.emitEvent(ie.LOGOUT_START,W.Popup,t),c=this.initializeServerTelemetryManager(je.logoutPopup),f.label=1;case 1:return f.trys.push([1,5,,6]),[4,this.clearCacheOnLogout(t.account)];case 2:return f.sent(),[4,this.createAuthCodeClient(c,a)];case 3:return l=f.sent(),this.logger.verbose("Auth code client created"),h=l.getLogoutUri(t),this.eventHandler.emitEvent(ie.LOGOUT_SUCCESS,W.Popup,t),d=this.openPopup(h,{popupName:i,popupWindowAttributes:n,popup:o}),this.eventHandler.emitEvent(ie.POPUP_OPENED,W.Popup,{popupWindow:d},null),[4,this.waitForLogoutPopup(d)];case 4:return f.sent(),s?(u={apiId:je.logoutPopup,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},v=ke.getAbsoluteUrl(s,lt.getCurrentUri()),this.logger.verbose("Redirecting main window to url specified in the request"),this.logger.verbosePii("Redirecting main window to: "+v),this.navigationClient.navigateInternal(v,u)):this.logger.verbose("No main window navigation requested"),[3,6];case 5:throw m=f.sent(),o&&o.close(),m instanceof Q&&m.setCorrelationId(this.correlationId),this.browserStorage.setInteractionInProgress(!1),this.eventHandler.emitEvent(ie.LOGOUT_FAILURE,W.Popup,null,m),this.eventHandler.emitEvent(ie.LOGOUT_END,W.Popup),c.cacheFailedRequest(m),m;case 6:return this.eventHandler.emitEvent(ie.LOGOUT_END,W.Popup),[2]}})})},e.prototype.initiateAuthRequest=function(t,i){if(F.isEmpty(t))throw this.logger.error("Navigate url is empty"),R.createEmptyNavigationUriError();return this.logger.infoPii("Navigate to: "+t),this.openPopup(t,i)},e.prototype.monitorPopupForHash=function(t){var i=this;return new Promise(function(n,a){var o=i.config.system.windowHashTimeout/i.config.system.pollIntervalMilliseconds,s=0;i.logger.verbose("PopupHandler.monitorPopupForHash - polling started");var c=setInterval(function(){if(t.closed){i.logger.error("PopupHandler.monitorPopupForHash - window closed"),i.cleanPopup(),clearInterval(c),a(R.createUserCancelledError());return}var l=w.EMPTY_STRING,h=w.EMPTY_STRING;try{l=t.location.href,h=t.location.hash}catch{}F.isEmpty(l)||l==="about:blank"||(i.logger.verbose("PopupHandler.monitorPopupForHash - popup window is on same origin as caller"),s++,h?(i.logger.verbose("PopupHandler.monitorPopupForHash - found hash in url"),clearInterval(c),i.cleanPopup(t),ke.hashContainsKnownProperties(h)?(i.logger.verbose("PopupHandler.monitorPopupForHash - hash contains known properties, returning."),n(h)):(i.logger.error("PopupHandler.monitorPopupForHash - found hash in url but it does not contain known properties. Check that your router is not changing the hash prematurely."),i.logger.errorPii("PopupHandler.monitorPopupForHash - hash found: "+h),a(R.createHashDoesNotContainKnownPropertiesError()))):s>o&&(i.logger.error("PopupHandler.monitorPopupForHash - unable to find hash in url, timing out"),clearInterval(c),a(R.createMonitorPopupTimeoutError())))},i.config.system.pollIntervalMilliseconds)})},e.prototype.waitForLogoutPopup=function(t){var i=this;return new Promise(function(n){i.logger.verbose("PopupHandler.waitForLogoutPopup - polling started");var a=setInterval(function(){t.closed&&(i.logger.error("PopupHandler.waitForLogoutPopup - window closed"),i.cleanPopup(),clearInterval(a),n());var o=w.EMPTY_STRING;try{o=t.location.href}catch{}F.isEmpty(o)||o==="about:blank"||(i.logger.verbose("PopupHandler.waitForLogoutPopup - popup window is on same origin as caller, closing."),clearInterval(a),i.cleanPopup(t),n())},i.config.system.pollIntervalMilliseconds)})},e.prototype.openPopup=function(t,i){try{var n=void 0;if(i.popup?(n=i.popup,this.logger.verbosePii("Navigating popup window to: "+t),n.location.assign(t)):typeof i.popup>"u"&&(this.logger.verbosePii("Opening popup window to: "+t),n=this.openSizedPopup(t,i.popupName,i.popupWindowAttributes)),!n)throw R.createEmptyWindowCreatedError();return n.focus&&n.focus(),this.currentWindow=n,window.addEventListener("beforeunload",this.unloadWindow),n}catch(a){throw this.logger.error("error opening popup "+a.message),this.browserStorage.setInteractionInProgress(!1),R.createPopupWindowError(a.toString())}},e.prototype.openSizedPopup=function(t,i,n){var a,o,s,c,l=window.screenLeft?window.screenLeft:window.screenX,h=window.screenTop?window.screenTop:window.screenY,d=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,u=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,v=(a=n.popupSize)===null||a===void 0?void 0:a.width,m=(o=n.popupSize)===null||o===void 0?void 0:o.height,f=(s=n.popupPosition)===null||s===void 0?void 0:s.top,C=(c=n.popupPosition)===null||c===void 0?void 0:c.left;return(!v||v<0||v>d)&&(this.logger.verbose("Default popup window width used. Window width not configured or invalid."),v=$r.POPUP_WIDTH),(!m||m<0||m>u)&&(this.logger.verbose("Default popup window height used. Window height not configured or invalid."),m=$r.POPUP_HEIGHT),(!f||f<0||f>u)&&(this.logger.verbose("Default popup window top position used. Window top not configured or invalid."),f=Math.max(0,u/2-$r.POPUP_HEIGHT/2+h)),(!C||C<0||C>d)&&(this.logger.verbose("Default popup window left position used. Window left not configured or invalid."),C=Math.max(0,d/2-$r.POPUP_WIDTH/2+l)),window.open(t,i,"width="+v+", height="+m+", top="+f+", left="+C+", scrollbars=yes")},e.prototype.unloadWindow=function(t){this.browserStorage.cleanRequestByInteractionType(W.Popup),this.currentWindow&&this.currentWindow.close(),t.preventDefault()},e.prototype.cleanPopup=function(t){t&&t.close(),window.removeEventListener("beforeunload",this.unloadWindow),this.browserStorage.setInteractionInProgress(!1)},e.prototype.generatePopupName=function(t,i){return $r.POPUP_NAME_PREFIX+"."+this.config.auth.clientId+"."+t.join("-")+"."+i+"."+this.correlationId},e.prototype.generateLogoutPopupName=function(t){var i=t.account&&t.account.homeAccountId;return $r.POPUP_NAME_PREFIX+"."+this.config.auth.clientId+"."+i+"."+this.correlationId},e}(Lo);/*! @azure/msal-browser v2.32.2 2023-01-10 */var gH=function(){function r(){}return r.prototype.navigateInternal=function(e,t){return r.defaultNavigateWindow(e,t)},r.prototype.navigateExternal=function(e,t){return r.defaultNavigateWindow(e,t)},r.defaultNavigateWindow=function(e,t){return t.noHistory?window.location.replace(e):window.location.assign(e),new Promise(function(i){setTimeout(function(){i(!0)},t.timeout)})},r}();/*! @azure/msal-browser v2.32.2 2023-01-10 */var _H=6e4,J3=6e3,zH=3e4,yH=2e3;function wH(r,e){var t=r.auth,i=r.cache,n=r.system,a=r.telemetry,o={clientId:w.EMPTY_STRING,authority:""+w.DEFAULT_AUTHORITY,knownAuthorities:[],cloudDiscoveryMetadata:w.EMPTY_STRING,authorityMetadata:w.EMPTY_STRING,redirectUri:w.EMPTY_STRING,postLogoutRedirectUri:w.EMPTY_STRING,navigateToLoginRequestUrl:!0,clientCapabilities:[],protocolMode:P0.AAD,azureCloudOptions:{azureCloudInstance:Cc.None,tenant:w.EMPTY_STRING},skipAuthorityMetadataCache:!1},s={cacheLocation:c1.SessionStorage,storeAuthStateInCookie:!1,secureCookies:!1},c={loggerCallback:function(){},logLevel:ot.Info,piiLoggingEnabled:!1},l=Y(Y({},L_),{loggerOptions:c,networkClient:e?lt.getBrowserNetworkClient():oH,navigationClient:new gH,loadFrameTimeout:0,windowHashTimeout:(n==null?void 0:n.loadFrameTimeout)||_H,iframeHashTimeout:(n==null?void 0:n.loadFrameTimeout)||J3,navigateFrameWait:e&&lt.detectIEOrEdge()?500:0,redirectNavigationTimeout:zH,asyncPopups:!1,allowRedirectInIframe:!1,allowNativeBroker:!1,nativeBrokerHandshakeTimeout:(n==null?void 0:n.nativeBrokerHandshakeTimeout)||yH,pollIntervalMilliseconds:$r.DEFAULT_POLL_INTERVAL_MS,cryptoOptions:{useMsrCrypto:!1,entropy:void 0}}),h=Y(Y({},n),{loggerOptions:(n==null?void 0:n.loggerOptions)||c}),d={application:{appName:w.EMPTY_STRING,appVersion:w.EMPTY_STRING}},u={auth:Y(Y({},o),t),cache:Y(Y({},s),i),system:Y(Y({},l),h),telemetry:Y(Y({},d),a)};return u}/*! @azure/msal-browser v2.32.2 2023-01-10 */var B_=function(r){Jt(e,r);function e(t,i,n,a,o){var s=r.call(this,t,i,n,a)||this;return s.navigateFrameWait=o.navigateFrameWait,s.pollIntervalMilliseconds=o.pollIntervalMilliseconds,s}return e.prototype.initiateAuthRequest=function(t){return V(this,void 0,void 0,function(){var i;return S(this,function(n){switch(n.label){case 0:if(F.isEmpty(t))throw this.logger.info("Navigate url is empty"),R.createEmptyNavigationUriError();return this.navigateFrameWait?[4,this.loadFrame(t)]:[3,2];case 1:return i=n.sent(),[3,3];case 2:i=this.loadFrameSync(t),n.label=3;case 3:return[2,i]}})})},e.prototype.monitorIframeForHash=function(t,i){var n=this;return new Promise(function(a,o){i<J3&&n.logger.warning("system.loadFrameTimeout or system.iframeHashTimeout set to lower ("+i+"ms) than the default ("+J3+"ms). This may result in timeouts.");var s=window.performance.now(),c=s+i,l=setInterval(function(){if(window.performance.now()>c){n.removeHiddenIframe(t),clearInterval(l),o(R.createMonitorIframeTimeoutError());return}var h=w.EMPTY_STRING,d=t.contentWindow;try{h=d?d.location.href:w.EMPTY_STRING}catch{}if(!F.isEmpty(h)){var u=d?d.location.hash:w.EMPTY_STRING;if(ke.hashContainsKnownProperties(u)){n.removeHiddenIframe(t),clearInterval(l),a(u);return}}},n.pollIntervalMilliseconds)})},e.prototype.loadFrame=function(t){var i=this;return new Promise(function(n,a){var o=i.createHiddenIframe();setTimeout(function(){if(!o){a("Unable to load iframe");return}o.src=t,n(o)},i.navigateFrameWait)})},e.prototype.loadFrameSync=function(t){var i=this.createHiddenIframe();return i.src=t,i},e.prototype.createHiddenIframe=function(){var t=document.createElement("iframe");return t.style.visibility="hidden",t.style.position="absolute",t.style.width=t.style.height="0",t.style.border="0",t.setAttribute("sandbox","allow-scripts allow-same-origin allow-forms"),document.getElementsByTagName("body")[0].appendChild(t),t},e.prototype.removeHiddenIframe=function(t){document.body===t.parentNode&&document.body.removeChild(t)},e}(o6);/*! @azure/msal-browser v2.32.2 2023-01-10 */var bH=function(r){Jt(e,r);function e(t,i,n,a,o,s,c,l,h,d,u){var v=r.call(this,t,i,n,a,o,s,l,d,u)||this;return v.apiId=c,v.nativeStorage=h,v}return e.prototype.acquireToken=function(t){return V(this,void 0,void 0,function(){var i,n,a,o,s;return S(this,function(c){switch(c.label){case 0:if(this.logger.verbose("acquireTokenByIframe called"),i=this.performanceClient.startMeasurement(St.SilentIframeClientAcquireToken,t.correlationId),F.isEmpty(t.loginHint)&&F.isEmpty(t.sid)&&(!t.account||F.isEmpty(t.account.username))&&this.logger.warning("No user hint provided. The authorization server may need more information to complete this request."),t.prompt&&t.prompt!==d1.NONE&&t.prompt!==d1.NO_SESSION)throw i.endMeasurement({success:!1}),R.createSilentPromptValueError(t.prompt);return[4,this.initializeAuthorizationRequest(Y(Y({},t),{prompt:t.prompt||d1.NONE}),W.Silent)];case 1:n=c.sent(),this.browserStorage.updateCacheEntries(n.state,n.nonce,n.authority,n.loginHint||w.EMPTY_STRING,n.account||null),a=this.initializeServerTelemetryManager(this.apiId),c.label=2;case 2:return c.trys.push([2,5,,6]),[4,this.createAuthCodeClient(a,n.authority,n.azureCloudOptions)];case 3:return o=c.sent(),this.logger.verbose("Auth code client created"),[4,this.silentTokenHelper(o,n).then(function(l){return i.endMeasurement({success:!0,fromCache:!1,requestId:l.requestId}),l})];case 4:return[2,c.sent()];case 5:throw s=c.sent(),s instanceof Q&&s.setCorrelationId(this.correlationId),a.cacheFailedRequest(s),this.browserStorage.cleanRequestByState(n.state),i.endMeasurement({errorCode:s instanceof Q&&s.errorCode||void 0,subErrorCode:s instanceof Q&&s.subError||void 0,success:!1}),s;case 6:return[2]}})})},e.prototype.logout=function(){return Promise.reject(R.createSilentLogoutUnsupportedError())},e.prototype.silentTokenHelper=function(t,i){return V(this,void 0,void 0,function(){var n,a,o,s,c,l,h,d,u,v=this;return S(this,function(m){switch(m.label){case 0:return[4,this.initializeAuthorizationCodeRequest(i)];case 1:return n=m.sent(),[4,t.getAuthCodeUrl(Y(Y({},i),{nativeBroker:ba.isNativeAvailable(this.config,this.logger,this.nativeMessageHandler,i.authenticationScheme)}))];case 2:return a=m.sent(),o=new B_(t,this.browserStorage,n,this.logger,this.config.system),[4,o.initiateAuthRequest(a)];case 3:return s=m.sent(),[4,o.monitorIframeForHash(s,this.config.system.iframeHashTimeout)];case 4:if(c=m.sent(),l=ke.getDeserializedHash(c),h=this.validateAndExtractStateFromHash(l,W.Silent,n.correlationId),l.accountId){if(this.logger.verbose("Account id found in hash, calling WAM for token"),!this.nativeMessageHandler)throw R.createNativeConnectionNotEstablishedError();return d=new L2(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.apiId,this.performanceClient,this.nativeMessageHandler,l.accountId,this.browserStorage,this.correlationId),u=Di.parseRequestState(this.browserCrypto,h).userRequestState,[2,d.acquireToken(Y(Y({},i),{state:u,prompt:i.prompt||d1.NONE})).finally(function(){v.browserStorage.cleanRequestByState(h)})]}return[2,o.handleCodeResponseFromHash(c,h,t.authority,this.networkClient)]}})})},e}(Lo);/*! @azure/msal-browser v2.32.2 2023-01-10 */var xH=function(r){Jt(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.acquireToken=function(t){return V(this,void 0,void 0,function(){var i,n,a,o,s,c=this;return S(this,function(l){switch(l.label){case 0:return n=[Y({},t)],[4,this.initializeBaseRequest(t)];case 1:return i=Y.apply(void 0,n.concat([l.sent()])),a=this.performanceClient.startMeasurement(St.SilentRefreshClientAcquireToken,i.correlationId),o=this.initializeServerTelemetryManager(je.acquireTokenSilent_silentFlow),[4,this.createRefreshTokenClient(o,i.authority,i.azureCloudOptions)];case 2:return s=l.sent(),this.logger.verbose("Refresh token client created"),[2,s.acquireTokenByRefreshToken(i).then(function(h){return a.endMeasurement({success:!0,fromCache:h.fromCache,requestId:h.requestId}),h}).catch(function(h){throw h instanceof Q&&h.setCorrelationId(c.correlationId),o.cacheFailedRequest(h),a.endMeasurement({errorCode:h.errorCode,subErrorCode:h.subError,success:!1}),h})]}})})},e.prototype.logout=function(){return Promise.reject(R.createSilentLogoutUnsupportedError())},e.prototype.createRefreshTokenClient=function(t,i,n){return V(this,void 0,void 0,function(){var a;return S(this,function(o){switch(o.label){case 0:return[4,this.getClientConfiguration(t,i,n)];case 1:return a=o.sent(),[2,new I_(a,this.performanceClient)]}})})},e}(Lo);/*! @azure/msal-browser v2.32.2 2023-01-10 */var MH=function(){function r(e,t){this.eventCallbacks=new Map,this.logger=e,this.browserCrypto=t,this.listeningToStorageEvents=!1,this.handleAccountCacheChange=this.handleAccountCacheChange.bind(this)}return r.prototype.addEventCallback=function(e){if(typeof window<"u"){var t=this.browserCrypto.createNewGuid();return this.eventCallbacks.set(t,e),this.logger.verbose("Event callback registered with id: "+t),t}return null},r.prototype.removeEventCallback=function(e){this.eventCallbacks.delete(e),this.logger.verbose("Event callback "+e+" removed.")},r.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)))},r.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."))},r.prototype.emitEvent=function(e,t,i,n){var a=this;if(typeof window<"u"){var o={eventType:e,interactionType:t||null,payload:i||null,error:n||null,timestamp:Date.now()};this.logger.info("Emitting event: "+e),this.eventCallbacks.forEach(function(s,c){a.logger.verbose("Emitting event to callback "+c+": "+e),s.apply(null,[o])})}},r.prototype.handleAccountCacheChange=function(e){try{var t=e.newValue||e.oldValue;if(!t)return;var i=JSON.parse(t);if(typeof i!="object"||!Wt.isAccountEntity(i))return;var n=Pr.toObject(new Wt,i),a=n.getAccountInfo();!e.oldValue&&e.newValue?(this.logger.info("Account was added to cache in a different window"),this.emitEvent(ie.ACCOUNT_ADDED,void 0,a)):!e.newValue&&e.oldValue&&(this.logger.info("Account was removed from cache in a different window"),this.emitEvent(ie.ACCOUNT_REMOVED,void 0,a))}catch{return}},r}();/*! @azure/msal-browser v2.32.2 2023-01-10 */var a1=function(){function r(){}return r.decimalToHex=function(e){for(var t=e.toString(16);t.length<2;)t="0"+t;return t},r}();/*! @azure/msal-browser v2.32.2 2023-01-10 */var j_=function(){function r(e){this.cryptoObj=e}return r.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,a1.decimalToHex(e[0])+a1.decimalToHex(e[1])+a1.decimalToHex(e[2])+a1.decimalToHex(e[3])+"-"+a1.decimalToHex(e[4])+a1.decimalToHex(e[5])+"-"+a1.decimalToHex(e[6])+a1.decimalToHex(e[7])+"-"+a1.decimalToHex(e[8])+a1.decimalToHex(e[9])+"-"+a1.decimalToHex(e[10])+a1.decimalToHex(e[11])+a1.decimalToHex(e[12])+a1.decimalToHex(e[13])+a1.decimalToHex(e[14])+a1.decimalToHex(e[15])}catch{for(var t="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx",i="0123456789abcdef",n=0,a=w.EMPTY_STRING,o=0;o<36;o++)t[o]!=="-"&&t[o]!=="4"&&(n=Math.random()*16|0),t[o]==="x"?a+=i[n]:t[o]==="y"?(n&=3,n|=8,a+=i[n]):a+=t[o];return a}},r.prototype.isGuid=function(e){var t=/^[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 t.test(e)},r}();/*! @azure/msal-browser v2.32.2 2023-01-10 */var Li=function(){function r(){}return r.stringToUtf8Arr=function(e){for(var t,i=0,n=e.length,a=0;a<n;a++)t=e.charCodeAt(a),i+=t<128?1:t<2048?2:t<65536?3:t<2097152?4:t<67108864?5:6;for(var o=new Uint8Array(i),s=0,c=0;s<i;c++)t=e.charCodeAt(c),t<128?o[s++]=t:t<2048?(o[s++]=192+(t>>>6),o[s++]=128+(t&63)):t<65536?(o[s++]=224+(t>>>12),o[s++]=128+(t>>>6&63),o[s++]=128+(t&63)):t<2097152?(o[s++]=240+(t>>>18),o[s++]=128+(t>>>12&63),o[s++]=128+(t>>>6&63),o[s++]=128+(t&63)):t<67108864?(o[s++]=248+(t>>>24),o[s++]=128+(t>>>18&63),o[s++]=128+(t>>>12&63),o[s++]=128+(t>>>6&63),o[s++]=128+(t&63)):(o[s++]=252+(t>>>30),o[s++]=128+(t>>>24&63),o[s++]=128+(t>>>18&63),o[s++]=128+(t>>>12&63),o[s++]=128+(t>>>6&63),o[s++]=128+(t&63));return o},r.stringToArrayBuffer=function(e){for(var t=new ArrayBuffer(e.length),i=new Uint8Array(t),n=0;n<e.length;n++)i[n]=e.charCodeAt(n);return t},r.utf8ArrToString=function(e){for(var t=w.EMPTY_STRING,i=void 0,n=e.length,a=0;a<n;a++)i=e[a],t+=String.fromCharCode(i>251&&i<254&&a+5<n?(i-252)*1073741824+(e[++a]-128<<24)+(e[++a]-128<<18)+(e[++a]-128<<12)+(e[++a]-128<<6)+e[++a]-128:i>247&&i<252&&a+4<n?(i-248<<24)+(e[++a]-128<<18)+(e[++a]-128<<12)+(e[++a]-128<<6)+e[++a]-128:i>239&&i<248&&a+3<n?(i-240<<18)+(e[++a]-128<<12)+(e[++a]-128<<6)+e[++a]-128:i>223&&i<240&&a+2<n?(i-224<<12)+(e[++a]-128<<6)+e[++a]-128:i>191&&i<224&&a+1<n?(i-192<<6)+e[++a]-128:i);return t},r.getSortedObjectString=function(e){return JSON.stringify(e,Object.keys(e).sort())},r}();/*! @azure/msal-browser v2.32.2 2023-01-10 */var q_=function(){function r(){}return r.prototype.urlEncode=function(e){return encodeURIComponent(this.encode(e).replace(/=/g,w.EMPTY_STRING).replace(/\+/g,"-").replace(/\//g,"_"))},r.prototype.urlEncodeArr=function(e){return this.base64EncArr(e).replace(/=/g,w.EMPTY_STRING).replace(/\+/g,"-").replace(/\//g,"_")},r.prototype.encode=function(e){var t=Li.stringToUtf8Arr(e);return this.base64EncArr(t)},r.prototype.base64EncArr=function(e){for(var t=(3-e.length%3)%3,i=w.EMPTY_STRING,n=void 0,a=e.length,o=0,s=0;s<a;s++)n=s%3,o|=e[s]<<(16>>>n&24),(n===2||e.length-s===1)&&(i+=String.fromCharCode(this.uint6ToB64(o>>>18&63),this.uint6ToB64(o>>>12&63),this.uint6ToB64(o>>>6&63),this.uint6ToB64(o&63)),o=0);return t===0?i:i.substring(0,i.length-t)+(t===1?"=":"==")},r.prototype.uint6ToB64=function(e){return e<26?e+65:e<52?e+71:e<62?e-4:e===62?43:e===63?47:65},r}();/*! @azure/msal-browser v2.32.2 2023-01-10 */var CH=function(){function r(){}return r.prototype.decode=function(e){var t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw new Error("Invalid base64 string")}var i=this.base64DecToArr(t);return Li.utf8ArrToString(i)},r.prototype.base64DecToArr=function(e,t){for(var i=e.replace(/[^A-Za-z0-9\+\/]/g,w.EMPTY_STRING),n=i.length,a=t?Math.ceil((n*3+1>>>2)/t)*t:n*3+1>>>2,o=new Uint8Array(a),s=void 0,c=void 0,l=0,h=0,d=0;d<n;d++)if(c=d&3,l|=this.b64ToUint6(i.charCodeAt(d))<<18-6*c,c===3||n-d===1){for(s=0;s<3&&h<a;s++,h++)o[h]=l>>>(16>>>s&24)&255;l=0}return o},r.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},r}();/*! @azure/msal-browser v2.32.2 2023-01-10 */var HH=32,kH=function(){function r(e){this.base64Encode=new q_,this.cryptoObj=e}return r.prototype.generateCodes=function(){return V(this,void 0,void 0,function(){var e,t;return S(this,function(i){switch(i.label){case 0:return e=this.generateCodeVerifier(),[4,this.generateCodeChallengeFromVerifier(e)];case 1:return t=i.sent(),[2,{verifier:e,challenge:t}]}})})},r.prototype.generateCodeVerifier=function(){try{var e=new Uint8Array(HH);this.cryptoObj.getRandomValues(e);var t=this.base64Encode.urlEncodeArr(e);return t}catch(i){throw R.createPkceNotGeneratedError(i)}},r.prototype.generateCodeChallengeFromVerifier=function(e){return V(this,void 0,void 0,function(){var t,i;return S(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.cryptoObj.sha256Digest(e)];case 1:return t=n.sent(),[2,this.base64Encode.urlEncodeArr(new Uint8Array(t))];case 2:throw i=n.sent(),R.createPkceNotGeneratedError(i);case 3:return[2]}})})},r}();/*! @azure/msal-browser v2.32.2 2023-01-10 */var EH=function(){function r(){}return r.prototype.getRandomValues=function(e){return window.crypto.getRandomValues(e)},r.prototype.generateKey=function(e,t,i){return V(this,void 0,void 0,function(){return S(this,function(n){return[2,window.crypto.subtle.generateKey(e,t,i)]})})},r.prototype.exportKey=function(e){return V(this,void 0,void 0,function(){return S(this,function(t){return[2,window.crypto.subtle.exportKey(ro,e)]})})},r.prototype.importKey=function(e,t,i,n){return V(this,void 0,void 0,function(){return S(this,function(a){return[2,window.crypto.subtle.importKey(ro,e,t,i,n)]})})},r.prototype.sign=function(e,t,i){return V(this,void 0,void 0,function(){return S(this,function(n){return[2,window.crypto.subtle.sign(e,t,i)]})})},r.prototype.digest=function(e,t){return V(this,void 0,void 0,function(){return S(this,function(i){return[2,window.crypto.subtle.digest(e,t)]})})},r}();/*! @azure/msal-browser v2.32.2 2023-01-10 */var PH=function(){function r(){}return r.prototype.initPrng=function(e){return window.msrCrypto.initPrng(i6(e))},r.prototype.getRandomValues=function(e){return window.msrCrypto.getRandomValues(e)},r.prototype.generateKey=function(e,t,i){return V(this,void 0,void 0,function(){return S(this,function(n){return[2,window.msrCrypto.subtle.generateKey(e,t,i)]})})},r.prototype.exportKey=function(e){return V(this,void 0,void 0,function(){return S(this,function(t){return[2,window.msrCrypto.subtle.exportKey(ro,e)]})})},r.prototype.importKey=function(e,t,i,n){return V(this,void 0,void 0,function(){return S(this,function(a){return[2,window.msrCrypto.subtle.importKey(ro,e,t,i,n)]})})},r.prototype.sign=function(e,t,i){return V(this,void 0,void 0,function(){return S(this,function(n){return[2,window.msrCrypto.subtle.sign(e,t,i)]})})},r.prototype.digest=function(e,t){return V(this,void 0,void 0,function(){return S(this,function(i){return[2,window.msrCrypto.subtle.digest(e,t)]})})},r}();/*! @azure/msal-browser v2.32.2 2023-01-10 */var AH=function(){function r(){}return r.prototype.getRandomValues=function(e){return window.msCrypto.getRandomValues(e)},r.prototype.generateKey=function(e,t,i){return V(this,void 0,void 0,function(){return S(this,function(n){return[2,new Promise(function(a,o){var s=window.msCrypto.subtle.generateKey(e,t,i);s.addEventListener("complete",function(c){a(c.target.result)}),s.addEventListener("error",function(c){o(c)})})]})})},r.prototype.exportKey=function(e){return V(this,void 0,void 0,function(){return S(this,function(t){return[2,new Promise(function(i,n){var a=window.msCrypto.subtle.exportKey(ro,e);a.addEventListener("complete",function(o){var s=o.target.result,c=Li.utf8ArrToString(new Uint8Array(s)).replace(/\r/g,w.EMPTY_STRING).replace(/\n/g,w.EMPTY_STRING).replace(/\t/g,w.EMPTY_STRING).split(" ").join(w.EMPTY_STRING).replace("\0",w.EMPTY_STRING);try{i(JSON.parse(c))}catch(l){n(l)}}),a.addEventListener("error",function(o){n(o)})})]})})},r.prototype.importKey=function(e,t,i,n){return V(this,void 0,void 0,function(){var a,o;return S(this,function(s){return a=Li.getSortedObjectString(e),o=Li.stringToArrayBuffer(a),[2,new Promise(function(c,l){var h=window.msCrypto.subtle.importKey(ro,o,t,i,n);h.addEventListener("complete",function(d){c(d.target.result)}),h.addEventListener("error",function(d){l(d)})})]})})},r.prototype.sign=function(e,t,i){return V(this,void 0,void 0,function(){return S(this,function(n){return[2,new Promise(function(a,o){var s=window.msCrypto.subtle.sign(e,t,i);s.addEventListener("complete",function(c){a(c.target.result)}),s.addEventListener("error",function(c){o(c)})})]})})},r.prototype.digest=function(e,t){return V(this,void 0,void 0,function(){return S(this,function(i){return[2,new Promise(function(n,a){var o=window.msCrypto.subtle.digest(e,t.buffer);o.addEventListener("complete",function(s){n(s.target.result)}),o.addEventListener("error",function(s){a(s)})})]})})},r}();/*! @azure/msal-browser v2.32.2 2023-01-10 */var VH="RSASSA-PKCS1-v1_5",km="SHA-256",SH=2048,$H=new Uint8Array([1,0,1]),G_=function(){function r(e,t){var i,n;if(this.logger=e,this.cryptoOptions=t,this.hasBrowserCrypto())this.logger.verbose("BrowserCrypto: modern crypto interface available"),this.subtleCrypto=new EH;else if(this.hasIECrypto())this.logger.verbose("BrowserCrypto: MS crypto interface available"),this.subtleCrypto=new AH;else if(this.hasMsrCrypto()&&(!((i=this.cryptoOptions)===null||i===void 0)&&i.useMsrCrypto))this.logger.verbose("BrowserCrypto: MSR crypto interface available"),this.subtleCrypto=new PH;else throw this.hasMsrCrypto()&&this.logger.info("BrowserCrypto: MSR Crypto interface available but system.cryptoOptions.useMsrCrypto not enabled"),this.logger.error("BrowserCrypto: No crypto interfaces available."),R.createCryptoNotAvailableError("Browser crypto, msCrypto, or msrCrypto interfaces not available.");if(this.subtleCrypto.initPrng){if(this.logger.verbose("BrowserCrypto: Interface requires entropy"),!(!((n=this.cryptoOptions)===null||n===void 0)&&n.entropy))throw this.logger.error("BrowserCrypto: Interface requires entropy but none provided."),$0.createEntropyNotProvided();this.logger.verbose("BrowserCrypto: Entropy provided"),this.subtleCrypto.initPrng(this.cryptoOptions.entropy)}this.keygenAlgorithmOptions={name:VH,hash:km,modulusLength:SH,publicExponent:$H}}return r.prototype.hasIECrypto=function(){return"msCrypto"in window},r.prototype.hasBrowserCrypto=function(){return"crypto"in window},r.prototype.hasMsrCrypto=function(){return"msrCrypto"in window},r.prototype.sha256Digest=function(e){return V(this,void 0,void 0,function(){var t;return S(this,function(i){return t=Li.stringToUtf8Arr(e),[2,this.subtleCrypto.digest({name:km},t)]})})},r.prototype.getRandomValues=function(e){return this.subtleCrypto.getRandomValues(e)},r.prototype.generateKeyPair=function(e,t){return V(this,void 0,void 0,function(){return S(this,function(i){return[2,this.subtleCrypto.generateKey(this.keygenAlgorithmOptions,e,t)]})})},r.prototype.exportJwk=function(e){return V(this,void 0,void 0,function(){return S(this,function(t){return[2,this.subtleCrypto.exportKey(e)]})})},r.prototype.importJwk=function(e,t,i){return V(this,void 0,void 0,function(){return S(this,function(n){return[2,this.subtleCrypto.importKey(e,this.keygenAlgorithmOptions,t,i)]})})},r.prototype.sign=function(e,t){return V(this,void 0,void 0,function(){return S(this,function(i){return[2,this.subtleCrypto.sign(this.keygenAlgorithmOptions,e,t)]})})},r}();/*! @azure/msal-browser v2.32.2 2023-01-10 */var DH=function(){function r(){this.dbName=Y3,this.version=hH,this.tableName=dH,this.dbOpen=!1}return r.prototype.open=function(){return V(this,void 0,void 0,function(){var e=this;return S(this,function(t){return[2,new Promise(function(i,n){var a=window.indexedDB.open(e.dbName,e.version);a.addEventListener("upgradeneeded",function(o){var s=o;s.target.result.createObjectStore(e.tableName)}),a.addEventListener("success",function(o){var s=o;e.db=s.target.result,e.dbOpen=!0,i()}),a.addEventListener("error",function(){return n(R.createDatabaseUnavailableError())})})]})})},r.prototype.closeConnection=function(){var e=this.db;e&&this.dbOpen&&(e.close(),this.dbOpen=!1)},r.prototype.validateDbIsOpen=function(){return V(this,void 0,void 0,function(){return S(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]}})})},r.prototype.getItem=function(e){return V(this,void 0,void 0,function(){var t=this;return S(this,function(i){switch(i.label){case 0:return[4,this.validateDbIsOpen()];case 1:return i.sent(),[2,new Promise(function(n,a){if(!t.db)return a(R.createDatabaseNotOpenError());var o=t.db.transaction([t.tableName],"readonly"),s=o.objectStore(t.tableName),c=s.get(e);c.addEventListener("success",function(l){var h=l;t.closeConnection(),n(h.target.result)}),c.addEventListener("error",function(l){t.closeConnection(),a(l)})})]}})})},r.prototype.setItem=function(e,t){return V(this,void 0,void 0,function(){var i=this;return S(this,function(n){switch(n.label){case 0:return[4,this.validateDbIsOpen()];case 1:return n.sent(),[2,new Promise(function(a,o){if(!i.db)return o(R.createDatabaseNotOpenError());var s=i.db.transaction([i.tableName],"readwrite"),c=s.objectStore(i.tableName),l=c.put(t,e);l.addEventListener("success",function(){i.closeConnection(),a()}),l.addEventListener("error",function(h){i.closeConnection(),o(h)})})]}})})},r.prototype.removeItem=function(e){return V(this,void 0,void 0,function(){var t=this;return S(this,function(i){switch(i.label){case 0:return[4,this.validateDbIsOpen()];case 1:return i.sent(),[2,new Promise(function(n,a){if(!t.db)return a(R.createDatabaseNotOpenError());var o=t.db.transaction([t.tableName],"readwrite"),s=o.objectStore(t.tableName),c=s.delete(e);c.addEventListener("success",function(){t.closeConnection(),n()}),c.addEventListener("error",function(l){t.closeConnection(),a(l)})})]}})})},r.prototype.getKeys=function(){return V(this,void 0,void 0,function(){var e=this;return S(this,function(t){switch(t.label){case 0:return[4,this.validateDbIsOpen()];case 1:return t.sent(),[2,new Promise(function(i,n){if(!e.db)return n(R.createDatabaseNotOpenError());var a=e.db.transaction([e.tableName],"readonly"),o=a.objectStore(e.tableName),s=o.getAllKeys();s.addEventListener("success",function(c){var l=c;e.closeConnection(),i(l.target.result)}),s.addEventListener("error",function(c){e.closeConnection(),n(c)})})]}})})},r.prototype.containsKey=function(e){return V(this,void 0,void 0,function(){var t=this;return S(this,function(i){switch(i.label){case 0:return[4,this.validateDbIsOpen()];case 1:return i.sent(),[2,new Promise(function(n,a){if(!t.db)return a(R.createDatabaseNotOpenError());var o=t.db.transaction([t.tableName],"readonly"),s=o.objectStore(t.tableName),c=s.count(e);c.addEventListener("success",function(l){var h=l;t.closeConnection(),n(h.target.result===1)}),c.addEventListener("error",function(l){t.closeConnection(),a(l)})})]}})})},r.prototype.deleteDatabase=function(){return V(this,void 0,void 0,function(){return S(this,function(e){return this.db&&this.dbOpen&&this.closeConnection(),[2,new Promise(function(t,i){var n=window.indexedDB.deleteDatabase(Y3);n.addEventListener("success",function(){return t(!0)}),n.addEventListener("blocked",function(){return t(!0)}),n.addEventListener("error",function(){return i(!1)})})]})})},r}();/*! @azure/msal-browser v2.32.2 2023-01-10 */var Em=function(){function r(e,t){this.inMemoryCache=new Q3,this.indexedDBCache=new DH,this.logger=e,this.storeName=t}return r.prototype.handleDatabaseAccessError=function(e){if(e instanceof R&&e.errorCode===L.databaseUnavailable.code)this.logger.error("Could not access persistent storage. This may be caused by browser privacy features which block persistent storage in third-party contexts.");else throw e},r.prototype.getItem=function(e){return V(this,void 0,void 0,function(){var t,i;return S(this,function(n){switch(n.label){case 0:if(t=this.inMemoryCache.getItem(e),t)return[3,4];n.label=1;case 1:return n.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,n.sent()];case 3:return i=n.sent(),this.handleDatabaseAccessError(i),[3,4];case 4:return[2,t]}})})},r.prototype.setItem=function(e,t){return V(this,void 0,void 0,function(){var i;return S(this,function(n){switch(n.label){case 0:this.inMemoryCache.setItem(e,t),n.label=1;case 1:return n.trys.push([1,3,,4]),[4,this.indexedDBCache.setItem(e,t)];case 2:return n.sent(),[3,4];case 3:return i=n.sent(),this.handleDatabaseAccessError(i),[3,4];case 4:return[2]}})})},r.prototype.removeItem=function(e){return V(this,void 0,void 0,function(){var t;return S(this,function(i){switch(i.label){case 0:this.inMemoryCache.removeItem(e),i.label=1;case 1:return i.trys.push([1,3,,4]),[4,this.indexedDBCache.removeItem(e)];case 2:return i.sent(),[3,4];case 3:return t=i.sent(),this.handleDatabaseAccessError(t),[3,4];case 4:return[2]}})})},r.prototype.getKeys=function(){return V(this,void 0,void 0,function(){var e,t;return S(this,function(i){switch(i.label){case 0:if(e=this.inMemoryCache.getKeys(),e.length!==0)return[3,4];i.label=1;case 1:return i.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,i.sent()];case 3:return t=i.sent(),this.handleDatabaseAccessError(t),[3,4];case 4:return[2,e]}})})},r.prototype.containsKey=function(e){return V(this,void 0,void 0,function(){var t,i;return S(this,function(n){switch(n.label){case 0:if(t=this.inMemoryCache.containsKey(e),t)return[3,4];n.label=1;case 1:return n.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,n.sent()];case 3:return i=n.sent(),this.handleDatabaseAccessError(i),[3,4];case 4:return[2,t]}})})},r.prototype.clearInMemory=function(){this.logger.verbose("Deleting in-memory keystore "+this.storeName),this.inMemoryCache.clear(),this.logger.verbose("In-memory keystore "+this.storeName+" deleted")},r.prototype.clearPersistent=function(){return V(this,void 0,void 0,function(){var e,t;return S(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),this.logger.verbose("Deleting persistent keystore"),[4,this.indexedDBCache.deleteDatabase()];case 1:return e=i.sent(),e&&this.logger.verbose("Persistent keystore deleted"),[2,e];case 2:return t=i.sent(),this.handleDatabaseAccessError(t),[2,!1];case 3:return[2]}})})},r}();/*! @azure/msal-browser v2.32.2 2023-01-10 */var D0;(function(r){r.asymmetricKeys="asymmetricKeys",r.symmetricKeys="symmetricKeys"})(D0||(D0={}));var LH=function(){function r(e){this.logger=e,this.asymmetricKeys=new Em(this.logger,D0.asymmetricKeys),this.symmetricKeys=new Em(this.logger,D0.symmetricKeys)}return r.prototype.clear=function(){return V(this,void 0,void 0,function(){var e;return S(this,function(t){switch(t.label){case 0:this.asymmetricKeys.clearInMemory(),this.symmetricKeys.clearInMemory(),t.label=1;case 1:return t.trys.push([1,3,,4]),[4,this.asymmetricKeys.clearPersistent()];case 2:return t.sent(),[2,!0];case 3:return e=t.sent(),e instanceof Error?this.logger.error("Clearing keystore failed with error: "+e.message):this.logger.error("Clearing keystore failed with unknown error"),[2,!1];case 4:return[2]}})})},r}();/*! @azure/msal-browser v2.32.2 2023-01-10 */var TH=function(){function r(e,t,i){this.logger=e,this.browserCrypto=new G_(this.logger,i),this.b64Encode=new q_,this.b64Decode=new CH,this.guidGenerator=new j_(this.browserCrypto),this.pkceGenerator=new kH(this.browserCrypto),this.cache=new LH(this.logger),this.performanceClient=t}return r.prototype.createNewGuid=function(){return this.guidGenerator.generateGuid()},r.prototype.base64Encode=function(e){return this.b64Encode.encode(e)},r.prototype.base64Decode=function(e){return this.b64Decode.decode(e)},r.prototype.generatePkceCodes=function(){return V(this,void 0,void 0,function(){return S(this,function(e){return[2,this.pkceGenerator.generateCodes()]})})},r.prototype.getPublicKeyThumbprint=function(e){var t;return V(this,void 0,void 0,function(){var i,n,a,o,s,c,l,h;return S(this,function(d){switch(d.label){case 0:return i=(t=this.performanceClient)===null||t===void 0?void 0:t.startMeasurement(St.CryptoOptsGetPublicKeyThumbprint,e.correlationId),[4,this.browserCrypto.generateKeyPair(r.EXTRACTABLE,r.POP_KEY_USAGES)];case 1:return n=d.sent(),[4,this.browserCrypto.exportJwk(n.publicKey)];case 2:return a=d.sent(),o={e:a.e,kty:a.kty,n:a.n},s=Li.getSortedObjectString(o),[4,this.hashString(s)];case 3:return c=d.sent(),[4,this.browserCrypto.exportJwk(n.privateKey)];case 4:return l=d.sent(),[4,this.browserCrypto.importJwk(l,!1,["sign"])];case 5:return h=d.sent(),[4,this.cache.asymmetricKeys.setItem(c,{privateKey:h,publicKey:n.publicKey,requestMethod:e.resourceRequestMethod,requestUri:e.resourceRequestUri})];case 6:return d.sent(),i&&i.endMeasurement({success:!0}),[2,c]}})})},r.prototype.removeTokenBindingKey=function(e){return V(this,void 0,void 0,function(){var t;return S(this,function(i){switch(i.label){case 0:return[4,this.cache.asymmetricKeys.removeItem(e)];case 1:return i.sent(),[4,this.cache.asymmetricKeys.containsKey(e)];case 2:return t=i.sent(),[2,!t]}})})},r.prototype.clearKeystore=function(){return V(this,void 0,void 0,function(){return S(this,function(e){switch(e.label){case 0:return[4,this.cache.clear()];case 1:return[2,e.sent()]}})})},r.prototype.signJwt=function(e,t,i){var n;return V(this,void 0,void 0,function(){var a,o,s,c,l,h,d,u,v,m,f,C,_;return S(this,function(p){switch(p.label){case 0:return a=(n=this.performanceClient)===null||n===void 0?void 0:n.startMeasurement(St.CryptoOptsSignJwt,i),[4,this.cache.asymmetricKeys.getItem(t)];case 1:if(o=p.sent(),!o)throw R.createSigningKeyNotFoundInStorageError(t);return[4,this.browserCrypto.exportJwk(o.publicKey)];case 2:return s=p.sent(),c=Li.getSortedObjectString(s),l=this.b64Encode.urlEncode(JSON.stringify({kid:t})),h=sH.getShrHeaderString({kid:l,alg:s.alg}),d=this.b64Encode.urlEncode(h),e.cnf={jwk:JSON.parse(c)},u=this.b64Encode.urlEncode(JSON.stringify(e)),v=d+"."+u,m=Li.stringToArrayBuffer(v),[4,this.browserCrypto.sign(o.privateKey,m)];case 3:return f=p.sent(),C=this.b64Encode.urlEncodeArr(new Uint8Array(f)),_=v+"."+C,a&&a.endMeasurement({success:!0}),[2,_]}})})},r.prototype.hashString=function(e){return V(this,void 0,void 0,function(){var t,i;return S(this,function(n){switch(n.label){case 0:return[4,this.browserCrypto.sha256Digest(e)];case 1:return t=n.sent(),i=new Uint8Array(t),[2,this.b64Encode.urlEncodeArr(i)]}})})},r.POP_KEY_USAGES=["sign","verify"],r.EXTRACTABLE=!0,r}();/*! @azure/msal-browser v2.32.2 2023-01-10 */var IH=function(){function r(e,t,i,n){this.isBrowserEnvironment=typeof window<"u",this.config=e,this.storage=t,this.logger=i,this.cryptoObj=n}return r.prototype.loadExternalTokens=function(e,t,i){if(this.logger.info("TokenCache - loadExternalTokens called"),!t.id_token)throw R.createUnableToLoadTokenError("Please ensure server response includes id token.");var n=new ui(t.id_token,this.cryptoObj),a,o;if(e.account){var s=this.loadAccount(n,e.account.environment,void 0,void 0,e.account.homeAccountId);a=new Ch(s,this.loadIdToken(n,s.homeAccountId,e.account.environment,e.account.tenantId),this.loadAccessToken(e,t,s.homeAccountId,e.account.environment,e.account.tenantId,i),this.loadRefreshToken(e,t,s.homeAccountId,e.account.environment))}else if(e.authority){var c=A0.generateAuthority(e.authority,e.azureCloudOptions),l={protocolMode:this.config.auth.protocolMode,knownAuthorities:this.config.auth.knownAuthorities,cloudDiscoveryMetadata:this.config.auth.cloudDiscoveryMetadata,authorityMetadata:this.config.auth.authorityMetadata,skipAuthorityMetadataCache:this.config.auth.skipAuthorityMetadataCache};if(o=new A0(c,this.config.system.networkClient,this.storage,l,this.logger),i.clientInfo){this.logger.trace("TokenCache - homeAccountId from options");var s=this.loadAccount(n,o.hostnameAndPort,i.clientInfo,o.authorityType);a=new Ch(s,this.loadIdToken(n,s.homeAccountId,o.hostnameAndPort,o.tenant),this.loadAccessToken(e,t,s.homeAccountId,o.hostnameAndPort,o.tenant,i),this.loadRefreshToken(e,t,s.homeAccountId,o.hostnameAndPort))}else if(t.client_info){this.logger.trace("TokenCache - homeAccountId from response");var s=this.loadAccount(n,o.hostnameAndPort,t.client_info,o.authorityType);a=new Ch(s,this.loadIdToken(n,s.homeAccountId,o.hostnameAndPort,o.tenant),this.loadAccessToken(e,t,s.homeAccountId,o.hostnameAndPort,o.tenant,i),this.loadRefreshToken(e,t,s.homeAccountId,o.hostnameAndPort))}else throw R.createUnableToLoadTokenError("Please provide clientInfo in the response or options.")}else throw R.createUnableToLoadTokenError("Please provide a request with an account or a request with authority.");return this.generateAuthenticationResult(e,n,a,o)},r.prototype.loadAccount=function(e,t,i,n,a){var o;if(a?o=a:n!==void 0&&i&&(o=Wt.generateHomeAccountId(i,n,this.logger,this.cryptoObj,e)),!o)throw R.createUnableToLoadTokenError("Unexpected missing homeAccountId");var s=i?Wt.createAccount(i,o,e,void 0,void 0,void 0,t):Wt.createGenericAccount(o,e,void 0,void 0,void 0,t);if(this.isBrowserEnvironment)return this.logger.verbose("TokenCache - loading account"),this.storage.setAccount(s),s;throw R.createUnableToLoadTokenError("loadExternalTokens is designed to work in browser environments only.")},r.prototype.loadIdToken=function(e,t,i,n){var a=kc.createIdTokenEntity(t,i,e.rawToken,this.config.auth.clientId,n);if(this.isBrowserEnvironment)return this.logger.verbose("TokenCache - loading id token"),this.storage.setIdTokenCredential(a),a;throw R.createUnableToLoadTokenError("loadExternalTokens is designed to work in browser environments only.")},r.prototype.loadAccessToken=function(e,t,i,n,a,o){if(!t.access_token)return this.logger.verbose("TokenCache - No access token provided for caching"),null;if(!t.expires_in)throw R.createUnableToLoadTokenError("Please ensure server response includes expires_in value.");if(!o.extendedExpiresOn)throw R.createUnableToLoadTokenError("Please provide an extendedExpiresOn value in the options.");var s=new g1(e.scopes).printScopes(),c=o.expiresOn||t.expires_in+new Date().getTime()/1e3,l=o.extendedExpiresOn,h=Ec.createAccessTokenEntity(i,n,t.access_token,this.config.auth.clientId,a,s,c,l,this.cryptoObj);if(this.isBrowserEnvironment)return this.logger.verbose("TokenCache - loading access token"),this.storage.setAccessTokenCredential(h),h;throw R.createUnableToLoadTokenError("loadExternalTokens is designed to work in browser environments only.")},r.prototype.loadRefreshToken=function(e,t,i,n){if(!t.refresh_token)return this.logger.verbose("TokenCache - No refresh token provided for caching"),null;var a=k0.createRefreshTokenEntity(i,n,t.refresh_token,this.config.auth.clientId);if(this.isBrowserEnvironment)return this.logger.verbose("TokenCache - loading refresh token"),this.storage.setRefreshTokenCredential(a),a;throw R.createUnableToLoadTokenError("loadExternalTokens is designed to work in browser environments only.")},r.prototype.generateAuthenticationResult=function(e,t,i,n){var a,o,s,c=w.EMPTY_STRING,l=[],h=null,d;i!=null&&i.accessToken&&(c=i.accessToken.secret,l=g1.fromString(i.accessToken.target).asArray(),h=new Date(Number(i.accessToken.expiresOn)*1e3),d=new Date(Number(i.accessToken.extendedExpiresOn)*1e3));var u=(t==null?void 0:t.claims.oid)||(t==null?void 0:t.claims.sub)||w.EMPTY_STRING,v=(t==null?void 0:t.claims.tid)||w.EMPTY_STRING;return{authority:n?n.canonicalAuthority:w.EMPTY_STRING,uniqueId:u,tenantId:v,scopes:l,account:i!=null&&i.account?i.account.getAccountInfo():null,idToken:t?t.rawToken:w.EMPTY_STRING,idTokenClaims:t?t.claims:{},accessToken:c,fromCache:!0,expiresOn:h,correlationId:e.correlationId||w.EMPTY_STRING,requestId:w.EMPTY_STRING,extExpiresOn:d,familyId:w.EMPTY_STRING,tokenType:((a=i==null?void 0:i.accessToken)===null||a===void 0?void 0:a.tokenType)||w.EMPTY_STRING,state:w.EMPTY_STRING,cloudGraphHostName:((o=i==null?void 0:i.account)===null||o===void 0?void 0:o.cloudGraphHostName)||w.EMPTY_STRING,msGraphHost:((s=i==null?void 0:i.account)===null||s===void 0?void 0:s.msGraphHost)||w.EMPTY_STRING,code:void 0,fromNativeBroker:!1}},r}();/*! @azure/msal-browser v2.32.2 2023-01-10 */var RH=function(r){Jt(e,r);function e(t){var i=r.call(this,t)||this;return i.includeRedirectUri=!1,i}return e}(T_);/*! @azure/msal-browser v2.32.2 2023-01-10 */var OH=function(r){Jt(e,r);function e(t,i,n,a,o,s,c,l,h,d){var u=r.call(this,t,i,n,a,o,s,l,h,d)||this;return u.apiId=c,u}return e.prototype.acquireToken=function(t){return V(this,void 0,void 0,function(){var i,n,a,o,s,c,l;return S(this,function(h){switch(h.label){case 0:if(this.logger.trace("SilentAuthCodeClient.acquireToken called"),!t.code)throw R.createAuthCodeRequiredError();return[4,this.initializeAuthorizationRequest(t,W.Silent)];case 1:i=h.sent(),this.browserStorage.updateCacheEntries(i.state,i.nonce,i.authority,i.loginHint||w.EMPTY_STRING,i.account||null),n=this.initializeServerTelemetryManager(this.apiId),h.label=2;case 2:return h.trys.push([2,4,,5]),a=Y(Y({},i),{code:t.code}),[4,this.getClientConfiguration(n,i.authority)];case 3:return o=h.sent(),s=new RH(o),this.logger.verbose("Auth code client created"),c=new B_(s,this.browserStorage,a,this.logger,this.config.system),[2,c.handleCodeResponseFromServer({code:t.code,msgraph_host:t.msGraphHost,cloud_graph_host_name:t.cloudGraphHostName,cloud_instance_host_name:t.cloudInstanceHostName},i.state,s.authority,this.networkClient,!1)];case 4:throw l=h.sent(),l instanceof Q&&l.setCorrelationId(this.correlationId),n.cacheFailedRequest(l),this.browserStorage.cleanRequestByState(i.state),l;case 5:return[2]}})})},e.prototype.logout=function(){return Promise.reject(R.createSilentLogoutUnsupportedError())},e}(Lo);/*! @azure/msal-browser v2.32.2 2023-01-10 */var NH=function(){function r(e,t){this.correlationId=t,this.measureName="msal.measure."+e+"."+this.correlationId,this.startMark="msal.start."+e+"."+this.correlationId,this.endMark="msal.end."+e+"."+this.correlationId}return r.supportsBrowserPerformance=function(){return typeof window<"u"&&typeof window.performance<"u"&&typeof window.performance.mark=="function"&&typeof window.performance.measure=="function"&&typeof window.performance.clearMarks=="function"&&typeof window.performance.clearMeasures=="function"&&typeof window.performance.getEntriesByName=="function"},r.prototype.startMeasurement=function(){if(r.supportsBrowserPerformance())try{window.performance.mark(this.startMark)}catch{}},r.prototype.endMeasurement=function(){if(r.supportsBrowserPerformance())try{window.performance.mark(this.endMark),window.performance.measure(this.measureName,this.startMark,this.endMark)}catch{}},r.prototype.flushMeasurement=function(){if(r.supportsBrowserPerformance())try{var e=window.performance.getEntriesByName(this.measureName,"measure");if(e.length>0){var t=e[0].duration;return window.performance.clearMeasures(this.measureName),window.performance.clearMarks(this.startMark),window.performance.clearMarks(this.endMark),t}}catch{}return null},r}();/*! @azure/msal-browser v2.32.2 2023-01-10 */var UH=function(r){Jt(e,r);function e(t,i,n,a,o,s,c){var l=r.call(this,t,i,n,a,o,s)||this;return l.browserCrypto=new G_(l.logger,c),l.guidGenerator=new j_(l.browserCrypto),l}return e.prototype.startPerformanceMeasurement=function(t,i){return new NH(t,i)},e.prototype.generateId=function(){return this.guidGenerator.generateGuid()},e.prototype.getPageVisibility=function(){var t;return((t=document.visibilityState)===null||t===void 0?void 0:t.toString())||null},e.prototype.startMeasurement=function(t,i){var n=this,a=this.getPageVisibility(),o=r.prototype.startMeasurement.call(this,t,i);return Y(Y({},o),{endMeasurement:function(s){return o.endMeasurement(Y({startPageVisibility:a,endPageVisibility:n.getPageVisibility()},s))}})},e}(O_);/*! @azure/msal-browser v2.32.2 2023-01-10 */var FH=function(){function r(e){this.isBrowserEnvironment=typeof window<"u",this.config=wH(e,this.isBrowserEnvironment),this.initialized=!1,this.logger=new n6(this.config.system.loggerOptions,Ed,Ys),this.networkClient=this.config.system.networkClient,this.navigationClient=this.config.system.navigationClient,this.redirectResponse=new Map,this.hybridAuthCodeResponses=new Map,this.performanceClient=this.isBrowserEnvironment?new UH(this.config.auth.clientId,this.config.auth.authority,this.logger,Ed,Ys,this.config.telemetry.application,this.config.system.cryptoOptions):new lH(this.config.auth.clientId,this.config.auth.authority,this.logger,Ed,Ys,this.config.telemetry.application),this.browserCrypto=this.isBrowserEnvironment?new TH(this.logger,this.performanceClient,this.config.system.cryptoOptions):M0,this.eventHandler=new MH(this.logger,this.browserCrypto),this.browserStorage=this.isBrowserEnvironment?new X3(this.config.auth.clientId,this.config.cache,this.browserCrypto,this.logger):uH(this.config.auth.clientId,this.logger);var t={cacheLocation:c1.MemoryStorage,storeAuthStateInCookie:!1,secureCookies:!1};this.nativeInternalStorage=new X3(this.config.auth.clientId,t,this.browserCrypto,this.logger),this.tokenCache=new IH(this.config,this.browserStorage,this.logger,this.browserCrypto)}return r.prototype.initialize=function(){return V(this,void 0,void 0,function(){var e,t;return S(this,function(i){switch(i.label){case 0:if(this.logger.trace("initialize called"),this.initialized)return this.logger.info("initialize has already been called, exiting early."),[2];if(this.eventHandler.emitEvent(ie.INITIALIZE_START),!this.config.system.allowNativeBroker)return[3,4];i.label=1;case 1:return i.trys.push([1,3,,4]),e=this,[4,ba.createProvider(this.logger,this.config.system.nativeBrokerHandshakeTimeout)];case 2:return e.nativeExtensionProvider=i.sent(),[3,4];case 3:return t=i.sent(),this.logger.verbose(t),[3,4];case 4:return this.initialized=!0,this.eventHandler.emitEvent(ie.INITIALIZE_END),[2]}})})},r.prototype.handleRedirectPromise=function(e){return V(this,void 0,void 0,function(){var t,i,n,a,o,s,c,l,h=this;return S(this,function(d){return this.logger.verbose("handleRedirectPromise called"),lt.blockNativeBrokerCalledBeforeInitialized(this.config.system.allowNativeBroker,this.initialized),t=this.getAllAccounts(),this.isBrowserEnvironment?(i=e||w.EMPTY_STRING,n=this.redirectResponse.get(i),typeof n>"u"?(this.eventHandler.emitEvent(ie.HANDLE_REDIRECT_START,W.Redirect),this.logger.verbose("handleRedirectPromise has been called for the first time, storing the promise"),a=this.browserStorage.getCachedNativeRequest(),o=void 0,a&&ba.isNativeAvailable(this.config,this.logger,this.nativeExtensionProvider)&&this.nativeExtensionProvider&&!e?(this.logger.trace("handleRedirectPromise - acquiring token from native platform"),s=new L2(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,je.handleRedirectPromise,this.performanceClient,this.nativeExtensionProvider,a.accountId,this.nativeInternalStorage,a.correlationId),o=s.handleRedirectPromise()):(this.logger.trace("handleRedirectPromise - acquiring token from web flow"),c=this.browserStorage.getTemporaryCache(Ce.CORRELATION_ID,!0)||w.EMPTY_STRING,l=this.createRedirectClient(c),o=l.handleRedirectPromise(e)),n=o.then(function(u){if(u){var v=t.length<h.getAllAccounts().length;v?(h.eventHandler.emitEvent(ie.LOGIN_SUCCESS,W.Redirect,u),h.logger.verbose("handleRedirectResponse returned result, login success")):(h.eventHandler.emitEvent(ie.ACQUIRE_TOKEN_SUCCESS,W.Redirect,u),h.logger.verbose("handleRedirectResponse returned result, acquire token success"))}return h.eventHandler.emitEvent(ie.HANDLE_REDIRECT_END,W.Redirect),u}).catch(function(u){throw t.length>0?h.eventHandler.emitEvent(ie.ACQUIRE_TOKEN_FAILURE,W.Redirect,null,u):h.eventHandler.emitEvent(ie.LOGIN_FAILURE,W.Redirect,null,u),h.eventHandler.emitEvent(ie.HANDLE_REDIRECT_END,W.Redirect),u}),this.redirectResponse.set(i,n)):this.logger.verbose("handleRedirectPromise has been called previously, returning the result from the first call"),[2,n]):(this.logger.verbose("handleRedirectPromise returns null, not browser environment"),[2,null])})})},r.prototype.acquireTokenRedirect=function(e){return V(this,void 0,void 0,function(){var t,i,n,a,o,s=this;return S(this,function(c){return t=this.getRequestCorrelationId(e),this.logger.verbose("acquireTokenRedirect called",t),this.preflightBrowserEnvironmentCheck(W.Redirect),i=this.getAllAccounts().length>0,i?this.eventHandler.emitEvent(ie.ACQUIRE_TOKEN_START,W.Redirect,e):this.eventHandler.emitEvent(ie.LOGIN_START,W.Redirect,e),this.nativeExtensionProvider&&this.canUseNative(e)?(a=new L2(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,je.acquireTokenRedirect,this.performanceClient,this.nativeExtensionProvider,this.getNativeAccountId(e),this.nativeInternalStorage,e.correlationId),n=a.acquireTokenRedirect(e).catch(function(l){if(l instanceof ii&&l.isFatal()){s.nativeExtensionProvider=void 0;var h=s.createRedirectClient(e.correlationId);return h.acquireToken(e)}else if(l instanceof Tr){s.logger.verbose("acquireTokenRedirect - Resolving interaction required error thrown by native broker by falling back to web flow");var h=s.createRedirectClient(e.correlationId);return h.acquireToken(e)}throw s.browserStorage.setInteractionInProgress(!1),l})):(o=this.createRedirectClient(e.correlationId),n=o.acquireToken(e)),[2,n.catch(function(l){throw i?s.eventHandler.emitEvent(ie.ACQUIRE_TOKEN_FAILURE,W.Redirect,null,l):s.eventHandler.emitEvent(ie.LOGIN_FAILURE,W.Redirect,null,l),l})]})})},r.prototype.acquireTokenPopup=function(e){var t=this,i=this.getRequestCorrelationId(e),n=this.performanceClient.startMeasurement(St.AcquireTokenPopup,i);try{this.logger.verbose("acquireTokenPopup called",i),this.preflightBrowserEnvironmentCheck(W.Popup)}catch(c){return Promise.reject(c)}var a=this.getAllAccounts();a.length>0?this.eventHandler.emitEvent(ie.ACQUIRE_TOKEN_START,W.Popup,e):this.eventHandler.emitEvent(ie.LOGIN_START,W.Popup,e);var o;if(this.canUseNative(e))o=this.acquireTokenNative(e,je.acquireTokenPopup).then(function(c){return t.browserStorage.setInteractionInProgress(!1),n.endMeasurement({success:!0,isNativeBroker:!0,requestId:c.requestId}),n.flushMeasurement(),c}).catch(function(c){if(c instanceof ii&&c.isFatal()){t.nativeExtensionProvider=void 0;var l=t.createPopupClient(e.correlationId);return l.acquireToken(e)}else if(c instanceof Tr){t.logger.verbose("acquireTokenPopup - Resolving interaction required error thrown by native broker by falling back to web flow");var l=t.createPopupClient(e.correlationId);return l.acquireToken(e)}throw t.browserStorage.setInteractionInProgress(!1),c});else{var s=this.createPopupClient(e.correlationId);o=s.acquireToken(e)}return o.then(function(c){var l=a.length<t.getAllAccounts().length;return l?t.eventHandler.emitEvent(ie.LOGIN_SUCCESS,W.Popup,c):t.eventHandler.emitEvent(ie.ACQUIRE_TOKEN_SUCCESS,W.Popup,c),n.addStaticFields({accessTokenSize:c.accessToken.length,idTokenSize:c.idToken.length}),n.endMeasurement({success:!0,requestId:c.requestId}),n.flushMeasurement(),c}).catch(function(c){return a.length>0?t.eventHandler.emitEvent(ie.ACQUIRE_TOKEN_FAILURE,W.Popup,null,c):t.eventHandler.emitEvent(ie.LOGIN_FAILURE,W.Popup,null,c),n.endMeasurement({errorCode:c.errorCode,subErrorCode:c.subError,success:!1}),n.flushMeasurement(),Promise.reject(c)})},r.prototype.ssoSilent=function(e){return V(this,void 0,void 0,function(){var t,i,n,a,o,s=this;return S(this,function(c){return t=this.getRequestCorrelationId(e),i=Y(Y({},e),{prompt:e.prompt,correlationId:t}),this.preflightBrowserEnvironmentCheck(W.Silent),n=this.performanceClient.startMeasurement(St.SsoSilent,t),this.logger.verbose("ssoSilent called",t),this.eventHandler.emitEvent(ie.SSO_SILENT_START,W.Silent,i),this.canUseNative(i)?a=this.acquireTokenNative(i,je.ssoSilent).catch(function(l){if(l instanceof ii&&l.isFatal()){s.nativeExtensionProvider=void 0;var h=s.createSilentIframeClient(i.correlationId);return h.acquireToken(i)}throw l}):(o=this.createSilentIframeClient(i.correlationId),a=o.acquireToken(i)),[2,a.then(function(l){return s.eventHandler.emitEvent(ie.SSO_SILENT_SUCCESS,W.Silent,l),n.addStaticFields({accessTokenSize:l.accessToken.length,idTokenSize:l.idToken.length}),n.endMeasurement({success:!0,isNativeBroker:l.fromNativeBroker,requestId:l.requestId}),n.flushMeasurement(),l}).catch(function(l){throw s.eventHandler.emitEvent(ie.SSO_SILENT_FAILURE,W.Silent,null,l),n.endMeasurement({errorCode:l.errorCode,subErrorCode:l.subError,success:!1}),n.flushMeasurement(),l})]})})},r.prototype.acquireTokenByCode=function(e){return V(this,void 0,void 0,function(){var t,i,n,a,o=this;return S(this,function(s){t=this.getRequestCorrelationId(e),this.preflightBrowserEnvironmentCheck(W.Silent),this.logger.trace("acquireTokenByCode called",t),this.eventHandler.emitEvent(ie.ACQUIRE_TOKEN_BY_CODE_START,W.Silent,e),i=this.performanceClient.startMeasurement(St.AcquireTokenByCode,e.correlationId);try{if(e.code)return n=e.code,a=this.hybridAuthCodeResponses.get(n),a?(this.logger.verbose("Existing acquireTokenByCode request found",e.correlationId),i.endMeasurement({success:!0}),i.discardMeasurement()):(this.logger.verbose("Initiating new acquireTokenByCode request",t),a=this.acquireTokenByCodeAsync(Y(Y({},e),{correlationId:t})).then(function(c){return o.eventHandler.emitEvent(ie.ACQUIRE_TOKEN_BY_CODE_SUCCESS,W.Silent,c),o.hybridAuthCodeResponses.delete(n),i.addStaticFields({accessTokenSize:c.accessToken.length,idTokenSize:c.idToken.length}),i.endMeasurement({success:!0,isNativeBroker:c.fromNativeBroker,requestId:c.requestId}),i.flushMeasurement(),c}).catch(function(c){throw o.hybridAuthCodeResponses.delete(n),o.eventHandler.emitEvent(ie.ACQUIRE_TOKEN_BY_CODE_FAILURE,W.Silent,null,c),i.endMeasurement({errorCode:c.errorCode,subErrorCode:c.subError,success:!1}),i.flushMeasurement(),c}),this.hybridAuthCodeResponses.set(n,a)),[2,a];if(e.nativeAccountId){if(this.canUseNative(e,e.nativeAccountId))return[2,this.acquireTokenNative(e,je.acquireTokenByCode,e.nativeAccountId).catch(function(c){throw c instanceof ii&&c.isFatal()&&(o.nativeExtensionProvider=void 0),c})];throw R.createUnableToAcquireTokenFromNativePlatformError()}else throw R.createAuthCodeOrNativeAccountIdRequiredError()}catch(c){throw this.eventHandler.emitEvent(ie.ACQUIRE_TOKEN_BY_CODE_FAILURE,W.Silent,null,c),i.endMeasurement({errorCode:c instanceof Q&&c.errorCode||void 0,subErrorCode:c instanceof Q&&c.subError||void 0,success:!1}),c}return[2]})})},r.prototype.acquireTokenByCodeAsync=function(e){return V(this,void 0,void 0,function(){var t,i;return S(this,function(n){switch(n.label){case 0:return this.logger.trace("acquireTokenByCodeAsync called",e.correlationId),t=this.createSilentAuthCodeClient(e.correlationId),[4,t.acquireToken(e)];case 1:return i=n.sent(),[2,i]}})})},r.prototype.acquireTokenFromCache=function(e,t,i){return V(this,void 0,void 0,function(){return S(this,function(n){switch(i.cacheLookupPolicy){case E1.Default:case E1.AccessToken:case E1.AccessTokenAndRefreshToken:return[2,e.acquireToken(t)];default:throw j.createRefreshRequiredError()}return[2]})})},r.prototype.acquireTokenByRefreshToken=function(e,t){return V(this,void 0,void 0,function(){var i;return S(this,function(n){switch(t.cacheLookupPolicy){case E1.Default:case E1.AccessTokenAndRefreshToken:case E1.RefreshToken:case E1.RefreshTokenAndNetwork:return i=this.createSilentRefreshClient(e.correlationId),[2,i.acquireToken(e)];default:throw j.createRefreshRequiredError()}return[2]})})},r.prototype.acquireTokenBySilentIframe=function(e){return V(this,void 0,void 0,function(){var t;return S(this,function(i){return t=this.createSilentIframeClient(e.correlationId),[2,t.acquireToken(e)]})})},r.prototype.logout=function(e){return V(this,void 0,void 0,function(){var t;return S(this,function(i){return t=this.getRequestCorrelationId(e),this.logger.warning("logout API is deprecated and will be removed in msal-browser v3.0.0. Use logoutRedirect instead.",t),[2,this.logoutRedirect(Y({correlationId:t},e))]})})},r.prototype.logoutRedirect=function(e){return V(this,void 0,void 0,function(){var t,i;return S(this,function(n){return t=this.getRequestCorrelationId(e),this.preflightBrowserEnvironmentCheck(W.Redirect),i=this.createRedirectClient(t),[2,i.logout(e)]})})},r.prototype.logoutPopup=function(e){try{var t=this.getRequestCorrelationId(e);this.preflightBrowserEnvironmentCheck(W.Popup);var i=this.createPopupClient(t);return i.logout(e)}catch(n){return Promise.reject(n)}},r.prototype.getAllAccounts=function(){return this.logger.verbose("getAllAccounts called"),this.isBrowserEnvironment?this.browserStorage.getAllAccounts():[]},r.prototype.getAccountByUsername=function(e){var t=this.getAllAccounts();return!F.isEmpty(e)&&t&&t.length?(this.logger.verbose("Account matching username found, returning"),this.logger.verbosePii("Returning signed-in accounts matching username: "+e),t.filter(function(i){return i.username.toLowerCase()===e.toLowerCase()})[0]||null):(this.logger.verbose("getAccountByUsername: No matching account found, returning null"),null)},r.prototype.getAccountByHomeId=function(e){var t=this.getAllAccounts();return!F.isEmpty(e)&&t&&t.length?(this.logger.verbose("Account matching homeAccountId found, returning"),this.logger.verbosePii("Returning signed-in accounts matching homeAccountId: "+e),t.filter(function(i){return i.homeAccountId===e})[0]||null):(this.logger.verbose("getAccountByHomeId: No matching account found, returning null"),null)},r.prototype.getAccountByLocalId=function(e){var t=this.getAllAccounts();return!F.isEmpty(e)&&t&&t.length?(this.logger.verbose("Account matching localAccountId found, returning"),this.logger.verbosePii("Returning signed-in accounts matching localAccountId: "+e),t.filter(function(i){return i.localAccountId===e})[0]||null):(this.logger.verbose("getAccountByLocalId: No matching account found, returning null"),null)},r.prototype.setActiveAccount=function(e){this.browserStorage.setActiveAccount(e)},r.prototype.getActiveAccount=function(){return this.browserStorage.getActiveAccount()},r.prototype.preflightBrowserEnvironmentCheck=function(e,t){if(t===void 0&&(t=!0),this.logger.verbose("preflightBrowserEnvironmentCheck started"),lt.blockNonBrowserEnvironment(this.isBrowserEnvironment),lt.blockRedirectInIframe(e,this.config.system.allowRedirectInIframe),lt.blockReloadInHiddenIframes(),lt.blockAcquireTokenInPopups(),lt.blockNativeBrokerCalledBeforeInitialized(this.config.system.allowNativeBroker,this.initialized),e===W.Redirect&&this.config.cache.cacheLocation===c1.MemoryStorage&&!this.config.cache.storeAuthStateInCookie)throw $0.createInMemoryRedirectUnavailableError();(e===W.Redirect||e===W.Popup)&&this.preflightInteractiveRequest(t)},r.prototype.preflightInteractiveRequest=function(e){this.logger.verbose("preflightInteractiveRequest called, validating app environment"),lt.blockReloadInHiddenIframes(),e&&this.browserStorage.setInteractionInProgress(!0)},r.prototype.acquireTokenNative=function(e,t,i){return V(this,void 0,void 0,function(){var n;return S(this,function(a){if(this.logger.trace("acquireTokenNative called"),!this.nativeExtensionProvider)throw R.createNativeConnectionNotEstablishedError();return n=new L2(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,t,this.performanceClient,this.nativeExtensionProvider,i||this.getNativeAccountId(e),this.nativeInternalStorage,e.correlationId),[2,n.acquireToken(e)]})})},r.prototype.canUseNative=function(e,t){if(this.logger.trace("canUseNative called"),!ba.isNativeAvailable(this.config,this.logger,this.nativeExtensionProvider,e.authenticationScheme))return this.logger.trace("canUseNative: isNativeAvailable returned false, returning false"),!1;if(e.prompt)switch(e.prompt){case d1.NONE:case d1.CONSENT:case d1.LOGIN:this.logger.trace("canUseNative: prompt is compatible with native flow");break;default:return this.logger.trace("canUseNative: prompt = "+e.prompt+" is not compatible with native flow, returning false"),!1}return!t&&!this.getNativeAccountId(e)?(this.logger.trace("canUseNative: nativeAccountId is not available, returning false"),!1):!0},r.prototype.getNativeAccountId=function(e){var t=e.account||this.browserStorage.getAccountInfoByHints(e.loginHint,e.sid)||this.getActiveAccount();return t&&t.nativeAccountId||""},r.prototype.createPopupClient=function(e){return new pH(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeInternalStorage,this.nativeExtensionProvider,e)},r.prototype.createRedirectClient=function(e){return new fH(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeInternalStorage,this.nativeExtensionProvider,e)},r.prototype.createSilentIframeClient=function(e){return new bH(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,je.ssoSilent,this.performanceClient,this.nativeInternalStorage,this.nativeExtensionProvider,e)},r.prototype.createSilentCacheClient=function(e){return new F_(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeExtensionProvider,e)},r.prototype.createSilentRefreshClient=function(e){return new xH(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeExtensionProvider,e)},r.prototype.createSilentAuthCodeClient=function(e){return new OH(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,je.acquireTokenByCode,this.performanceClient,this.nativeExtensionProvider,e)},r.prototype.addEventCallback=function(e){return this.eventHandler.addEventCallback(e)},r.prototype.removeEventCallback=function(e){this.eventHandler.removeEventCallback(e)},r.prototype.addPerformanceCallback=function(e){return this.performanceClient.addPerformanceCallback(e)},r.prototype.removePerformanceCallback=function(e){return this.performanceClient.removePerformanceCallback(e)},r.prototype.enableAccountStorageEvents=function(){this.eventHandler.enableAccountStorageEvents()},r.prototype.disableAccountStorageEvents=function(){this.eventHandler.disableAccountStorageEvents()},r.prototype.getTokenCache=function(){return this.tokenCache},r.prototype.getLogger=function(){return this.logger},r.prototype.setLogger=function(e){this.logger=e},r.prototype.initializeWrapperLibrary=function(e,t){this.browserStorage.setWrapperMetadata(e,t)},r.prototype.setNavigationClient=function(e){this.navigationClient=e},r.prototype.getConfiguration=function(){return this.config},r.prototype.getRequestCorrelationId=function(e){return e!=null&&e.correlationId?e.correlationId:this.isBrowserEnvironment?this.browserCrypto.createNewGuid():w.EMPTY_STRING},r}();/*! @azure/msal-browser v2.32.2 2023-01-10 */var BH=function(r){Jt(e,r);function e(t){var i=r.call(this,t)||this;return i.activeSilentTokenRequests=new Map,i}return e.prototype.loginRedirect=function(t){return V(this,void 0,void 0,function(){var i;return S(this,function(n){return i=this.getRequestCorrelationId(t),this.logger.verbose("loginRedirect called",i),[2,this.acquireTokenRedirect(Y({correlationId:i},t||xm))]})})},e.prototype.loginPopup=function(t){var i=this.getRequestCorrelationId(t);return this.logger.verbose("loginPopup called",i),this.acquireTokenPopup(Y({correlationId:i},t||xm))},e.prototype.acquireTokenSilent=function(t){return V(this,void 0,void 0,function(){var i,n,a,o,s,c,l,h=this;return S(this,function(d){if(i=this.getRequestCorrelationId(t),n=this.performanceClient.startMeasurement(St.AcquireTokenSilent,i),n.addStaticFields({cacheLookupPolicy:t.cacheLookupPolicy}),this.preflightBrowserEnvironmentCheck(W.Silent),this.logger.verbose("acquireTokenSilent called",i),a=t.account||this.getActiveAccount(),!a)throw R.createNoAccountError();return o={clientId:this.config.auth.clientId,authority:t.authority||w.EMPTY_STRING,scopes:t.scopes,homeAccountIdentifier:a.homeAccountId,claims:t.claims,authenticationScheme:t.authenticationScheme,resourceRequestMethod:t.resourceRequestMethod,resourceRequestUri:t.resourceRequestUri,shrClaims:t.shrClaims,sshKid:t.sshKid},s=JSON.stringify(o),c=this.activeSilentTokenRequests.get(s),typeof c>"u"?(this.logger.verbose("acquireTokenSilent called for the first time, storing active request",i),l=this.acquireTokenSilentAsync(Y(Y({},t),{correlationId:i}),a).then(function(u){return h.activeSilentTokenRequests.delete(s),n.addStaticFields({accessTokenSize:u.accessToken.length,idTokenSize:u.idToken.length}),n.endMeasurement({success:!0,fromCache:u.fromCache,isNativeBroker:u.fromNativeBroker,cacheLookupPolicy:t.cacheLookupPolicy,requestId:u.requestId}),n.flushMeasurement(),u}).catch(function(u){throw h.activeSilentTokenRequests.delete(s),n.endMeasurement({errorCode:u.errorCode,subErrorCode:u.subError,success:!1}),n.flushMeasurement(),u}),this.activeSilentTokenRequests.set(s,l),[2,l]):(this.logger.verbose("acquireTokenSilent has been called previously, returning the result from the first call",i),n.endMeasurement({success:!0}),n.discardMeasurement(),[2,c])})})},e.prototype.acquireTokenSilentAsync=function(t,i){return V(this,void 0,void 0,function(){var n,a,o,s,c,l,h=this;return S(this,function(d){switch(d.label){case 0:return this.eventHandler.emitEvent(ie.ACQUIRE_TOKEN_START,W.Silent,t),n=this.performanceClient.startMeasurement(St.AcquireTokenSilentAsync,t.correlationId),ba.isNativeAvailable(this.config,this.logger,this.nativeExtensionProvider,t.authenticationScheme)&&i.nativeAccountId?(this.logger.verbose("acquireTokenSilent - attempting to acquire token from native platform"),o=Y(Y({},t),{account:i}),a=this.acquireTokenNative(o,je.acquireTokenSilent_silentFlow).catch(function(u){return V(h,void 0,void 0,function(){var v;return S(this,function(m){if(u instanceof ii&&u.isFatal())return this.logger.verbose("acquireTokenSilent - native platform unavailable, falling back to web flow"),this.nativeExtensionProvider=void 0,v=this.createSilentIframeClient(t.correlationId),[2,v.acquireToken(t)];throw u})})}),[3,3]):[3,1];case 1:return this.logger.verbose("acquireTokenSilent - attempting to acquire token from web flow"),s=this.createSilentCacheClient(t.correlationId),[4,s.initializeSilentRequest(t,i)];case 2:c=d.sent(),l=Y(Y({},t),{cacheLookupPolicy:t.cacheLookupPolicy||E1.Default}),a=this.acquireTokenFromCache(s,c,l).catch(function(u){if(l.cacheLookupPolicy===E1.AccessToken)throw u;return lt.blockReloadInHiddenIframes(),h.eventHandler.emitEvent(ie.ACQUIRE_TOKEN_NETWORK_START,W.Silent,c),h.acquireTokenByRefreshToken(c,l).catch(function(v){var m=v instanceof Aa,f=v instanceof Tr,C=v.errorCode===$r.INVALID_GRANT_ERROR;if((!m||!C||f||l.cacheLookupPolicy===E1.AccessTokenAndRefreshToken||l.cacheLookupPolicy===E1.RefreshToken)&&l.cacheLookupPolicy!==E1.Skip)throw v;return h.logger.verbose("Refresh token expired/invalid or CacheLookupPolicy is set to Skip, attempting acquire token by iframe.",t.correlationId),h.acquireTokenBySilentIframe(c)})}),d.label=3;case 3:return[2,a.then(function(u){return h.eventHandler.emitEvent(ie.ACQUIRE_TOKEN_SUCCESS,W.Silent,u),n.endMeasurement({success:!0,fromCache:u.fromCache,isNativeBroker:u.fromNativeBroker,requestId:u.requestId}),u}).catch(function(u){throw h.eventHandler.emitEvent(ie.ACQUIRE_TOKEN_FAILURE,W.Silent,null,u),n.endMeasurement({errorCode:u.errorCode,subErrorCode:u.subError,success:!1}),u})]}})})},e}(FH);const Pm="redirect";var Am=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(a){return a instanceof t?a:new t(function(o){o(a)})}return new(t||(t=Promise))(function(a,o){function s(h){try{l(i.next(h))}catch(d){o(d)}}function c(h){try{l(i.throw(h))}catch(d){o(d)}}function l(h){h.done?a(h.value):n(h.value).then(s,c)}l((i=i.apply(r,e||[])).next())})};class jH extends BH{get account(){return this.getAllAccounts().find(i=>{var n;return((n=i.idTokenClaims)===null||n===void 0?void 0:n.aud)===this.clientId})}get hasValidClaims(){var e;const t=(e=this.account)===null||e===void 0?void 0:e.idTokenClaims;if(t){const i=Math.ceil(Date.now()/1e3);return t.exp>i}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,t){super(t),this.tenantId=e}login(e,t=Pm,i=!0){var n;return Am(this,void 0,void 0,function*(){const a=(e==null?void 0:e.loginHint)||((n=this.account)===null||n===void 0?void 0:n.username),o=(e==null?void 0:e.scopes)||[],s=Object.assign(Object.assign({},e),{loginHint:a,scopes:o});if(a&&i){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 [${t}]`),t){case"popup":return this.loginPopup(s);case"redirect":return this.loginRedirect(s)}})}acquireToken(e={scopes:[]},t=Pm,i=!0){return Am(this,void 0,void 0,function*(){const n=yield this.account;if(i&&n){this.logger.verbose("Attempting to acquire token in silently");try{return yield this.acquireTokenSilent(Object.assign({account:n},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 [${t}]`),t){case"popup":return this.acquireTokenPopup(e);case"redirect":return this.acquireTokenRedirect(e)}})}}const qH=(r,e=window.location.origin)=>{r=r.match(/^http[s]?/)?r:e+r;const{origin:t,pathname:i}=new URL(r);return t+i.replace(/([^:]\/)\/+/g,"$1")},GH=(r,e,t,i,n)=>{const a=Object.assign({clientId:e,redirectUri:qH(t||""),navigateToLoginRequestUrl:!1,authority:`https://login.microsoftonline.com/${r}`},i==null?void 0:i.auth),o=Object.assign({cacheLocation:"localStorage"},i==null?void 0:i.cache),s=i==null?void 0:i.system;return new(n||jH)(r,{auth:a,cache:o,system:s})};class K_ extends n6{constructor(e){super({logLevel:e,loggerCallback:(...t)=>this.loggerCallback(...t)}),this.getLogType=t=>{switch(t){case ot.Error:return"error";case ot.Warning:return"warn";case ot.Info:return"info";case ot.Verbose:default:return"debug"}}}loggerCallback(e,t,i){console[this.getLogType(e)]("%c FUSION::MSAL %c %s","border: 1px solid;","border: none;",t)}}var Pd=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(a){return a instanceof t?a:new t(function(o){o(a)})}return new(t||(t=Promise))(function(a,o){function s(h){try{l(i.next(h))}catch(d){o(d)}}function c(h){try{l(i.throw(h))}catch(d){o(d)}}function l(h){h.done?a(h.value):n(h.value).then(s,c)}l((i=i.apply(r,e||[])).next())})};const KH="default";class WH{get defaultClient(){return this.getClient(KH)}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 t=e?this._config.getClientConfig(e):this._config.defaultConfig;if(!t)throw Error("Could not find any config");const i=GH(t.tenantId,t.clientId,t.redirectUri,t.config);return i.setLogger(new K_(0)),i}handleRedirect(){return Pd(this,void 0,void 0,function*(){const{redirectUri:e}=this.defaultConfig||{};if(window.location.pathname===e){const t=this.defaultClient,i=t.getLogger(),{requestOrigin:n}=t;yield t.handleRedirectPromise(),n===e?(i.warning(`detected callback loop from url ${e}, redirecting to root`),window.location.replace("/")):window.location.replace(n||"/")}return null})}acquireToken(e){return this.defaultClient.acquireToken(e)}acquireAccessToken(e){return Pd(this,void 0,void 0,function*(){const t=yield this.acquireToken(e);return t?t.accessToken:void 0})}login(){return Pd(this,void 0,void 0,function*(){yield this.defaultClient.login()})}}var YH=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(a){return a instanceof t?a:new t(function(o){o(a)})}return new(t||(t=Promise))(function(a,o){function s(h){try{l(i.next(h))}catch(d){o(d)}}function c(h){try{l(i.throw(h))}catch(d){o(d)}}function l(h){h.done?a(h.value):n(h.value).then(s,c)}l((i=i.apply(r,e||[])).next())})};const W_={name:"auth",configure:r=>{var e;const t=new RC;return!((e=r==null?void 0:r.auth)===null||e===void 0)&&e.defaultConfig&&t.configureDefault(r.auth.defaultConfig),t},initialize:({config:r})=>YH(void 0,void 0,void 0,function*(){const e=new WH(r);return r.requiresAuth&&(yield e.handleRedirect(),e.defaultAccount||(yield e.login())),e})},QH=(r,e)=>({module:W_,configure:t=>{t.configureDefault(r),(e==null?void 0:e.requiresAuth)!==void 0&&(t.requiresAuth=e==null?void 0:e.requiresAuth);const{clients:i}=e??{};i&&Object.entries(i).forEach(([n,a])=>t.configureClient(n,a))}});var s6=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(a){return a instanceof t?a:new t(function(o){o(a)})}return new(t||(t=Promise))(function(a,o){function s(h){try{l(i.next(h))}catch(d){o(d)}}function c(h){try{l(i.throw(h))}catch(d){o(d)}}function l(h){h.done?a(h.value):n(h.value).then(s,c)}l((i=i.apply(r,e||[])).next())})};const XH=r=>{var e;return{id:r.id,isChildType:r.isChildType,parentTypeIds:(e=r.parentTypeIds)!==null&&e!==void 0?e:[]}},c6=r=>{var e,t,i,n;return{id:r.id,externalId:(e=r.externalId)!==null&&e!==void 0?e:void 0,isActive:r.isActive,isDeleted:r.isDeleted,created:new Date(r.created),source:(t=r.source)!==null&&t!==void 0?t:void 0,title:(i=r.title)!==null&&i!==void 0?i:void 0,type:XH(r.type),value:(n=r.value)!==null&&n!==void 0?n:{}}},JH=r=>s6(void 0,void 0,void 0,function*(){const e=yield r.json();return c6(e)}),ZH=r=>s6(void 0,void 0,void 0,function*(){return(yield r.json()).map(c6)}),ek=r=>s6(void 0,void 0,void 0,function*(){return(yield r.json()).map(c6)});var tk=globalThis&&globalThis.__classPrivateFieldSet||function(r,e,t,i,n){if(i==="m")throw new TypeError("Private method is not writable");if(i==="a"&&!n)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?r!==e||!n:!e.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return i==="a"?n.call(r,t):n?n.value=t:e.set(r,t),t},rk=globalThis&&globalThis.__classPrivateFieldGet||function(r,e,t,i){if(t==="a"&&!i)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?r!==e||!i:!e.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?i:t==="a"?i.call(r):i?i.value:e.get(r)},Hh;class ik{constructor(e,t={}){this.config=t,Hh.set(this,void 0),tk(this,Hh,e,"f")}requireInstance(e){return rk(this,Hh,"f").requireInstance(e)}setContextType(e){this.config.contextType=e}setContextFilter(e){this.config.contextFilter=e}setContextParameterFn(e){this.config.contextParameterFn=e}setValidateContext(e){this.config.validateContext=e}setResolveContext(e){this.config.resolveContext=e}setContextClient(e,t=1*60*1e3){this.config.client={get:typeof e.get=="function"?{key:({id:i})=>i,client:{fn:e.get},expire:t}:e.get,query:typeof e.query=="function"?{key:i=>JSON.stringify(i),client:{fn:e.query},expire:t}:e.query},e.related&&(this.config.client.related=typeof e.related=="function"?{key:i=>JSON.stringify(i),client:{fn:e.related},expire:t}:e.related)}}Hh=new WeakMap;var Wl=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(a){return a instanceof t?a:new t(function(o){o(a)})}return new(t||(t=Promise))(function(a,o){function s(h){try{l(i.next(h))}catch(d){o(d)}}function c(h){try{l(i.throw(h))}catch(d){o(d)}}function l(h){h.done?a(h.value):n(h.value).then(s,c)}l((i=i.apply(r,e||[])).next())})},Vm=globalThis&&globalThis.__classPrivateFieldGet||function(r,e,t,i){if(t==="a"&&!i)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?r!==e||!i:!e.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?i:t==="a"?i.call(r):i?i.value:e.get(r)},kh;class nk{constructor(){this.defaultExpireTime=1*60*1e3,kh.set(this,[])}addConfigBuilder(e){Vm(this,kh,"f").push(e)}_getServiceProvider(e){var t;return Wl(this,void 0,void 0,function*(){if(e.hasModule("services"))return e.requireInstance("services");{const i=(t=e.ref)===null||t===void 0?void 0:t.services;if(i)return i;throw Error("no service services provider configures [ServicesModule]")}})}createConfig(e){var t;return Wl(this,void 0,void 0,function*(){const i=yield Vm(this,kh,"f").reduce((n,a)=>Wl(this,void 0,void 0,function*(){const o=new ik(e,yield n);return yield Promise.resolve(a(o)),Object.assign(n,o.config)}),Promise.resolve({}));return(t=i.client)!==null&&t!==void 0||(i.client=yield(()=>Wl(this,void 0,void 0,function*(){const a=yield(yield this._getServiceProvider(e)).createContextClient("json$");return{get:{client:{fn:o=>a.get("v1",o,{selector:JH})},key:({id:o})=>o,expire:this.defaultExpireTime},query:{client:{fn:o=>a.query("v1",{query:o},{selector:ZH})},key:o=>JSON.stringify(o),expire:this.defaultExpireTime},related:{client:{fn:o=>a.related("v1",{id:o.item.id,query:{filter:o.filter}},{selector:ek})},key:o=>JSON.stringify(o),expire:this.defaultExpireTime}}}))()),i})}}kh=new WeakMap;var ak=function r(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var i,n,a;if(Array.isArray(e)){if(i=e.length,i!=t.length)return!1;for(n=i;n--!==0;)if(!r(e[n],t[n]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if(a=Object.keys(e),i=a.length,i!==Object.keys(t).length)return!1;for(n=i;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,a[n]))return!1;for(n=i;n--!==0;){var o=a[n];if(!r(e[o],t[o]))return!1}return!0}return e!==e&&t!==t},Sm;(function(r){r.IDLE="idle",r.ACTIVE="active",r.FAILED="failed",r.CANCELED="canceled"})(Sm||(Sm={}));const ok=r=>e=>e.pipe(hC(r)),sk=r=>e=>e.pipe(di(r)),ck=r=>e=>e.pipe(L1(r)),lk=r=>r.pipe($e(e=>e.value));var Yl,hk=new Uint8Array(16);function dk(){if(!Yl&&(Yl=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!Yl))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Yl(hk)}const uk=/^(?:[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 Y_(r){return typeof r=="string"&&uk.test(r)}var Ft=[];for(var Ad=0;Ad<256;++Ad)Ft.push((Ad+256).toString(16).substr(1));function Q_(r){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,t=(Ft[r[e+0]]+Ft[r[e+1]]+Ft[r[e+2]]+Ft[r[e+3]]+"-"+Ft[r[e+4]]+Ft[r[e+5]]+"-"+Ft[r[e+6]]+Ft[r[e+7]]+"-"+Ft[r[e+8]]+Ft[r[e+9]]+"-"+Ft[r[e+10]]+Ft[r[e+11]]+Ft[r[e+12]]+Ft[r[e+13]]+Ft[r[e+14]]+Ft[r[e+15]]).toLowerCase();if(!Y_(t))throw TypeError("Stringified UUID is invalid");return t}function vk(r){if(!Y_(r))throw TypeError("Invalid UUID");var e,t=new Uint8Array(16);return t[0]=(e=parseInt(r.slice(0,8),16))>>>24,t[1]=e>>>16&255,t[2]=e>>>8&255,t[3]=e&255,t[4]=(e=parseInt(r.slice(9,13),16))>>>8,t[5]=e&255,t[6]=(e=parseInt(r.slice(14,18),16))>>>8,t[7]=e&255,t[8]=(e=parseInt(r.slice(19,23),16))>>>8,t[9]=e&255,t[10]=(e=parseInt(r.slice(24,36),16))/1099511627776&255,t[11]=e/4294967296&255,t[12]=e>>>24&255,t[13]=e>>>16&255,t[14]=e>>>8&255,t[15]=e&255,t}function mk(r){r=unescape(encodeURIComponent(r));for(var e=[],t=0;t<r.length;++t)e.push(r.charCodeAt(t));return e}var fk="6ba7b810-9dad-11d1-80b4-00c04fd430c8",pk="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function gk(r,e,t){function i(n,a,o,s){if(typeof n=="string"&&(n=mk(n)),typeof a=="string"&&(a=vk(a)),a.length!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var c=new Uint8Array(16+n.length);if(c.set(a),c.set(n,a.length),c=t(c),c[6]=c[6]&15|e,c[8]=c[8]&63|128,o){s=s||0;for(var l=0;l<16;++l)o[s+l]=c[l];return o}return Q_(c)}try{i.name=r}catch{}return i.DNS=fk,i.URL=pk,i}function X_(r,e,t){r=r||{};var i=r.random||(r.rng||dk)();if(i[6]=i[6]&15|64,i[8]=i[8]&63|128,e){t=t||0;for(var n=0;n<16;++n)e[t+n]=i[n];return e}return Q_(i)}function _k(r,e,t,i){switch(r){case 0:return e&t^~e&i;case 1:return e^t^i;case 2:return e&t^e&i^t&i;case 3:return e^t^i}}function Vd(r,e){return r<<e|r>>>32-e}function zk(r){var e=[1518500249,1859775393,2400959708,3395469782],t=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof r=="string"){var i=unescape(encodeURIComponent(r));r=[];for(var n=0;n<i.length;++n)r.push(i.charCodeAt(n))}else Array.isArray(r)||(r=Array.prototype.slice.call(r));r.push(128);for(var a=r.length/4+2,o=Math.ceil(a/16),s=new Array(o),c=0;c<o;++c){for(var l=new Uint32Array(16),h=0;h<16;++h)l[h]=r[c*64+h*4]<<24|r[c*64+h*4+1]<<16|r[c*64+h*4+2]<<8|r[c*64+h*4+3];s[c]=l}s[o-1][14]=(r.length-1)*8/Math.pow(2,32),s[o-1][14]=Math.floor(s[o-1][14]),s[o-1][15]=(r.length-1)*8&4294967295;for(var d=0;d<o;++d){for(var u=new Uint32Array(80),v=0;v<16;++v)u[v]=s[d][v];for(var m=16;m<80;++m)u[m]=Vd(u[m-3]^u[m-8]^u[m-14]^u[m-16],1);for(var f=t[0],C=t[1],_=t[2],p=t[3],z=t[4],M=0;M<80;++M){var A=Math.floor(M/20),I=Vd(f,5)+_k(A,C,_,p)+z+e[A]+u[M]>>>0;z=p,p=_,_=Vd(C,30)>>>0,C=f,f=I}t[0]=t[0]+f>>>0,t[1]=t[1]+C>>>0,t[2]=t[2]+_>>>0,t[3]=t[3]+p>>>0,t[4]=t[4]+z>>>0}return[t[0]>>24&255,t[0]>>16&255,t[0]>>8&255,t[0]&255,t[1]>>24&255,t[1]>>16&255,t[1]>>8&255,t[1]&255,t[2]>>24&255,t[2]>>16&255,t[2]>>8&255,t[2]&255,t[3]>>24&255,t[3]>>16&255,t[3]>>8&255,t[3]&255,t[4]>>24&255,t[4]>>16&255,t[4]>>8&255,t[4]&255]}var yk=gk("v5",80,zk);const wk=yk;class Z3 extends Error{constructor(e,t){super(t.message,{cause:t.cause}),this.type=e,this.request=t.request}}const To=(...r)=>Xt(e=>r.includes(e.type));var o1=globalThis&&globalThis.__classPrivateFieldGet||function(r,e,t,i){if(t==="a"&&!i)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?r!==e||!i:!e.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?i:t==="a"?i.call(r):i?i.value:e.get(r)},bk=globalThis&&globalThis.__classPrivateFieldSet||function(r,e,t,i,n){if(i==="m")throw new TypeError("Private method is not writable");if(i==="a"&&!n)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?r!==e||!n:!e.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return i==="a"?n.call(r,t):n?n.value=t:e.set(r,t),t},Qr,kr;class M4 extends Ee{get action$(){return o1(this,Qr,"f").asObservable()}get value(){return o1(this,kr,"f").value}get closed(){return o1(this,kr,"f").closed||o1(this,Qr,"f").closed}constructor(e,t){super(n=>o1(this,kr,"f").subscribe(n)),Qr.set(this,new $i),kr.set(this,void 0);const i="getInitialState"in e?e.getInitialState():t;bk(this,kr,new Do(i),"f"),o1(this,Qr,"f").pipe(E_(e,i),k_()).subscribe(o1(this,kr,"f")),this.reset=()=>o1(this,kr,"f").next(i)}next(e){o1(this,Qr,"f").next(e)}addEffect(e,t){const i=typeof e=="string"?this.action$.pipe(To(e)):this.action$,n=t||e;return i.pipe(di(a=>y1(new Promise((o,s)=>{try{o(n(a,this.value))}catch(c){s(c)}})).pipe(Z1(o=>(console.warn("unhandled effect",o),Ui)))),Xt(a=>!!a),_0(g0)).subscribe(o1(this,Qr,"f"))}addEpic(e){return this.addFlow(e)}addFlow(e){const t=e(this.action$,this);if(!t)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 t.pipe(Z1(i=>(console.trace("unhandled exception, epic closed!",i),Ui)),_0(g0)).subscribe(o1(this,Qr,"f"))}unsubscribe(){o1(this,Qr,"f").unsubscribe(),o1(this,kr,"f").unsubscribe()}complete(){o1(this,Qr,"f").complete(),o1(this,kr,"f").complete()}asObservable(){return o1(this,kr,"f").asObservable()}}Qr=new WeakMap,kr=new WeakMap;const J_=(r,e)=>Object.entries(r).reduce((t,[i,n])=>Object.assign(t,{[i]:typeof n=="function"?(...a)=>e.next(n(...a)):J_(n,e)}),{});function Gt(r,e){function t(...i){if(e){const n=e(...i);if(!n)throw new Error("prepareAction did not return an object");return Object.assign(Object.assign({type:r,payload:n.payload},"meta"in n&&{meta:n.meta}),"error"in n&&{error:n.error})}return{type:r,payload:i[0]}}return t.toString=()=>`${r}`,t.type=r,t.match=i=>i.type===r,t}const Eh="::",l6=r=>new RegExp(`${Eh}\\${r}$`),$m=r=>r.type.replace(l6("\\w+$"),"");function pn(r,e,t,i){const n=Gt([r,"request"].join(Eh),e);return t&&Object.assign(n,{success:Gt([r,"success"].join(Eh),t)}),i&&Object.assign(n,{failure:Gt([r,"failure"].join(Eh),i)}),n}const xk=r=>!!r.type.match(/::request$/),Mk=r=>!!r.type.match(l6("success")),Ck=r=>!!r.type.match(l6("failure")),Hk=r=>Mk(r)||Ck(r);function K1(r){for(var e=arguments.length,t=Array(e>1?e-1:0),i=1;i<e;i++)t[i-1]=arguments[i];throw Error("[Immer] minified error nr: "+r+(t.length?" "+t.map(function(n){return"'"+n+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Vn(r){return!!r&&!!r[Pe]}function Nr(r){var e;return!!r&&(function(t){if(!t||typeof t!="object")return!1;var i=Object.getPrototypeOf(t);if(i===null)return!0;var n=Object.hasOwnProperty.call(i,"constructor")&&i.constructor;return n===Object||typeof n=="function"&&Function.toString.call(n)===Tk}(r)||Array.isArray(r)||!!r[Um]||!!(!((e=r.constructor)===null||e===void 0)&&e[Um])||h6(r)||d6(r))}function Dm(r){return Vn(r)||K1(23,r),r[Pe].t}function io(r,e,t){t===void 0&&(t=!1),Io(r)===0?(t?Object.keys:p6)(r).forEach(function(i){t&&typeof i=="symbol"||e(i,r[i],r)}):r.forEach(function(i,n){return e(n,i,r)})}function Io(r){var e=r[Pe];return e?e.i>3?e.i-4:e.i:Array.isArray(r)?1:h6(r)?2:d6(r)?3:0}function eu(r,e){return Io(r)===2?r.has(e):Object.prototype.hasOwnProperty.call(r,e)}function kk(r,e){return Io(r)===2?r.get(e):r[e]}function Z_(r,e,t){var i=Io(r);i===2?r.set(e,t):i===3?r.add(t):r[e]=t}function Ek(r,e){return r===e?r!==0||1/r==1/e:r!=r&&e!=e}function h6(r){return Dk&&r instanceof Map}function d6(r){return Lk&&r instanceof Set}function Lt(r){return r.o||r.t}function u6(r){if(Array.isArray(r))return Array.prototype.slice.call(r);var e=Ik(r);delete e[Pe];for(var t=p6(e),i=0;i<t.length;i++){var n=t[i],a=e[n];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(e[n]={configurable:!0,writable:!0,enumerable:a.enumerable,value:r[n]})}return Object.create(Object.getPrototypeOf(r),e)}function v6(r,e){return e===void 0&&(e=!1),m6(r)||Vn(r)||!Nr(r)||(Io(r)>1&&(r.set=r.add=r.clear=r.delete=Pk),Object.freeze(r),e&&io(r,function(t,i){return v6(i,!0)},!0)),r}function Pk(){K1(2)}function m6(r){return r==null||typeof r!="object"||Object.isFrozen(r)}function li(r){var e=ru[r];return e||K1(18,r),e}function Ak(r,e){ru[r]||(ru[r]=e)}function L0(){return Ac}function Sd(r,e){e&&(li("Patches"),r.u=[],r.s=[],r.v=e)}function T0(r){tu(r),r.p.forEach(Vk),r.p=null}function tu(r){r===Ac&&(Ac=r.l)}function Lm(r){return Ac={p:[],l:Ac,h:r,m:!0,_:0}}function Vk(r){var e=r[Pe];e.i===0||e.i===1?e.j():e.O=!0}function $d(r,e){e._=e.p.length;var t=e.p[0],i=r!==void 0&&r!==t;return e.h.g||li("ES5").S(e,r,i),i?(t[Pe].P&&(T0(e),K1(4)),Nr(r)&&(r=I0(e,r),e.l||R0(e,r)),e.u&&li("Patches").M(t[Pe].t,r,e.u,e.s)):r=I0(e,t,[]),T0(e),e.u&&e.v(e.u,e.s),r!==ez?r:void 0}function I0(r,e,t){if(m6(e))return e;var i=e[Pe];if(!i)return io(e,function(s,c){return Tm(r,i,e,s,c,t)},!0),e;if(i.A!==r)return e;if(!i.P)return R0(r,i.t,!0),i.t;if(!i.I){i.I=!0,i.A._--;var n=i.i===4||i.i===5?i.o=u6(i.k):i.o,a=n,o=!1;i.i===3&&(a=new Set(n),n.clear(),o=!0),io(a,function(s,c){return Tm(r,i,n,s,c,t,o)}),R0(r,n,!1),t&&r.u&&li("Patches").N(i,t,r.u,r.s)}return i.o}function Tm(r,e,t,i,n,a,o){if(Vn(n)){var s=I0(r,n,a&&e&&e.i!==3&&!eu(e.R,i)?a.concat(i):void 0);if(Z_(t,i,s),!Vn(s))return;r.m=!1}else o&&t.add(n);if(Nr(n)&&!m6(n)){if(!r.h.D&&r._<1)return;I0(r,n),e&&e.A.l||R0(r,n)}}function R0(r,e,t){t===void 0&&(t=!1),!r.l&&r.h.D&&r.m&&v6(e,t)}function Dd(r,e){var t=r[Pe];return(t?Lt(t):r)[e]}function Im(r,e){if(e in r)for(var t=Object.getPrototypeOf(r);t;){var i=Object.getOwnPropertyDescriptor(t,e);if(i)return i;t=Object.getPrototypeOf(t)}}function Ci(r){r.P||(r.P=!0,r.l&&Ci(r.l))}function Ld(r){r.o||(r.o=u6(r.t))}function Pc(r,e,t){var i=h6(e)?li("MapSet").F(e,t):d6(e)?li("MapSet").T(e,t):r.g?function(n,a){var o=Array.isArray(n),s={i:o?1:0,A:a?a.A:L0(),P:!1,I:!1,R:{},l:a,t:n,k:null,o:null,j:null,C:!1},c=s,l=iu;o&&(c=[s],l=xs);var h=Proxy.revocable(c,l),d=h.revoke,u=h.proxy;return s.k=u,s.j=d,u}(e,t):li("ES5").J(e,t);return(t?t.A:L0()).p.push(i),i}function Sk(r){return Vn(r)||K1(22,r),function e(t){if(!Nr(t))return t;var i,n=t[Pe],a=Io(t);if(n){if(!n.P&&(n.i<4||!li("ES5").K(n)))return n.t;n.I=!0,i=Rm(t,a),n.I=!1}else i=Rm(t,a);return io(i,function(o,s){n&&kk(n.t,o)===s||Z_(i,o,e(s))}),a===3?new Set(i):i}(r)}function Rm(r,e){switch(e){case 2:return new Map(r);case 3:return Array.from(r)}return u6(r)}function $k(){function r(s,c){function l(){this.constructor=s}n(s,c),s.prototype=(l.prototype=c.prototype,new l)}function e(s){s.o||(s.R=new Map,s.o=new Map(s.t))}function t(s){s.o||(s.o=new Set,s.t.forEach(function(c){if(Nr(c)){var l=Pc(s.A.h,c,s);s.p.set(c,l),s.o.add(l)}else s.o.add(c)}))}function i(s){s.O&&K1(3,JSON.stringify(Lt(s)))}var n=function(s,c){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,h){l.__proto__=h}||function(l,h){for(var d in h)h.hasOwnProperty(d)&&(l[d]=h[d])})(s,c)},a=function(){function s(l,h){return this[Pe]={i:2,l:h,A:h?h.A:L0(),P:!1,I:!1,o:void 0,R:void 0,t:l,k:this,C:!1,O:!1},this}r(s,Map);var c=s.prototype;return Object.defineProperty(c,"size",{get:function(){return Lt(this[Pe]).size}}),c.has=function(l){return Lt(this[Pe]).has(l)},c.set=function(l,h){var d=this[Pe];return i(d),Lt(d).has(l)&&Lt(d).get(l)===h||(e(d),Ci(d),d.R.set(l,!0),d.o.set(l,h),d.R.set(l,!0)),this},c.delete=function(l){if(!this.has(l))return!1;var h=this[Pe];return i(h),e(h),Ci(h),h.t.has(l)?h.R.set(l,!1):h.R.delete(l),h.o.delete(l),!0},c.clear=function(){var l=this[Pe];i(l),Lt(l).size&&(e(l),Ci(l),l.R=new Map,io(l.t,function(h){l.R.set(h,!1)}),l.o.clear())},c.forEach=function(l,h){var d=this;Lt(this[Pe]).forEach(function(u,v){l.call(h,d.get(v),v,d)})},c.get=function(l){var h=this[Pe];i(h);var d=Lt(h).get(l);if(h.I||!Nr(d)||d!==h.t.get(l))return d;var u=Pc(h.A.h,d,h);return e(h),h.o.set(l,u),u},c.keys=function(){return Lt(this[Pe]).keys()},c.values=function(){var l,h=this,d=this.keys();return(l={})[Ql]=function(){return h.values()},l.next=function(){var u=d.next();return u.done?u:{done:!1,value:h.get(u.value)}},l},c.entries=function(){var l,h=this,d=this.keys();return(l={})[Ql]=function(){return h.entries()},l.next=function(){var u=d.next();if(u.done)return u;var v=h.get(u.value);return{done:!1,value:[u.value,v]}},l},c[Ql]=function(){return this.entries()},s}(),o=function(){function s(l,h){return this[Pe]={i:3,l:h,A:h?h.A:L0(),P:!1,I:!1,o:void 0,t:l,k:this,p:new Map,O:!1,C:!1},this}r(s,Set);var c=s.prototype;return Object.defineProperty(c,"size",{get:function(){return Lt(this[Pe]).size}}),c.has=function(l){var h=this[Pe];return i(h),h.o?!!h.o.has(l)||!(!h.p.has(l)||!h.o.has(h.p.get(l))):h.t.has(l)},c.add=function(l){var h=this[Pe];return i(h),this.has(l)||(t(h),Ci(h),h.o.add(l)),this},c.delete=function(l){if(!this.has(l))return!1;var h=this[Pe];return i(h),t(h),Ci(h),h.o.delete(l)||!!h.p.has(l)&&h.o.delete(h.p.get(l))},c.clear=function(){var l=this[Pe];i(l),Lt(l).size&&(t(l),Ci(l),l.o.clear())},c.values=function(){var l=this[Pe];return i(l),t(l),l.o.values()},c.entries=function(){var l=this[Pe];return i(l),t(l),l.o.entries()},c.keys=function(){return this.values()},c[Ql]=function(){return this.values()},c.forEach=function(l,h){for(var d=this.values(),u=d.next();!u.done;)l.call(h,u.value,u.value,this),u=d.next()},s}();Ak("MapSet",{F:function(s,c){return new a(s,c)},T:function(s,c){return new o(s,c)}})}var Om,Ac,f6=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",Dk=typeof Map<"u",Lk=typeof Set<"u",Nm=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",ez=f6?Symbol.for("immer-nothing"):((Om={})["immer-nothing"]=!0,Om),Um=f6?Symbol.for("immer-draftable"):"__$immer_draftable",Pe=f6?Symbol.for("immer-state"):"__$immer_state",Ql=typeof Symbol<"u"&&Symbol.iterator||"@@iterator",Tk=""+Object.prototype.constructor,p6=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(r){return Object.getOwnPropertyNames(r).concat(Object.getOwnPropertySymbols(r))}:Object.getOwnPropertyNames,Ik=Object.getOwnPropertyDescriptors||function(r){var e={};return p6(r).forEach(function(t){e[t]=Object.getOwnPropertyDescriptor(r,t)}),e},ru={},iu={get:function(r,e){if(e===Pe)return r;var t=Lt(r);if(!eu(t,e))return function(n,a,o){var s,c=Im(a,o);return c?"value"in c?c.value:(s=c.get)===null||s===void 0?void 0:s.call(n.k):void 0}(r,t,e);var i=t[e];return r.I||!Nr(i)?i:i===Dd(r.t,e)?(Ld(r),r.o[e]=Pc(r.A.h,i,r)):i},has:function(r,e){return e in Lt(r)},ownKeys:function(r){return Reflect.ownKeys(Lt(r))},set:function(r,e,t){var i=Im(Lt(r),e);if(i!=null&&i.set)return i.set.call(r.k,t),!0;if(!r.P){var n=Dd(Lt(r),e),a=n==null?void 0:n[Pe];if(a&&a.t===t)return r.o[e]=t,r.R[e]=!1,!0;if(Ek(t,n)&&(t!==void 0||eu(r.t,e)))return!0;Ld(r),Ci(r)}return r.o[e]===t&&(t!==void 0||e in r.o)||Number.isNaN(t)&&Number.isNaN(r.o[e])||(r.o[e]=t,r.R[e]=!0),!0},deleteProperty:function(r,e){return Dd(r.t,e)!==void 0||e in r.t?(r.R[e]=!1,Ld(r),Ci(r)):delete r.R[e],r.o&&delete r.o[e],!0},getOwnPropertyDescriptor:function(r,e){var t=Lt(r),i=Reflect.getOwnPropertyDescriptor(t,e);return i&&{writable:!0,configurable:r.i!==1||e!=="length",enumerable:i.enumerable,value:t[e]}},defineProperty:function(){K1(11)},getPrototypeOf:function(r){return Object.getPrototypeOf(r.t)},setPrototypeOf:function(){K1(12)}},xs={};io(iu,function(r,e){xs[r]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),xs.deleteProperty=function(r,e){return xs.set.call(this,r,e,void 0)},xs.set=function(r,e,t){return iu.set.call(this,r[0],e,t,r[0])};var Rk=function(){function r(t){var i=this;this.g=Nm,this.D=!0,this.produce=function(n,a,o){if(typeof n=="function"&&typeof a!="function"){var s=a;a=n;var c=i;return function(f){var C=this;f===void 0&&(f=s);for(var _=arguments.length,p=Array(_>1?_-1:0),z=1;z<_;z++)p[z-1]=arguments[z];return c.produce(f,function(M){var A;return(A=a).call.apply(A,[C,M].concat(p))})}}var l;if(typeof a!="function"&&K1(6),o!==void 0&&typeof o!="function"&&K1(7),Nr(n)){var h=Lm(i),d=Pc(i,n,void 0),u=!0;try{l=a(d),u=!1}finally{u?T0(h):tu(h)}return typeof Promise<"u"&&l instanceof Promise?l.then(function(f){return Sd(h,o),$d(f,h)},function(f){throw T0(h),f}):(Sd(h,o),$d(l,h))}if(!n||typeof n!="object"){if((l=a(n))===void 0&&(l=n),l===ez&&(l=void 0),i.D&&v6(l,!0),o){var v=[],m=[];li("Patches").M(n,l,v,m),o(v,m)}return l}K1(21,n)},this.produceWithPatches=function(n,a){if(typeof n=="function")return function(l){for(var h=arguments.length,d=Array(h>1?h-1:0),u=1;u<h;u++)d[u-1]=arguments[u];return i.produceWithPatches(l,function(v){return n.apply(void 0,[v].concat(d))})};var o,s,c=i.produce(n,a,function(l,h){o=l,s=h});return typeof Promise<"u"&&c instanceof Promise?c.then(function(l){return[l,o,s]}):[c,o,s]},typeof(t==null?void 0:t.useProxies)=="boolean"&&this.setUseProxies(t.useProxies),typeof(t==null?void 0:t.autoFreeze)=="boolean"&&this.setAutoFreeze(t.autoFreeze)}var e=r.prototype;return e.createDraft=function(t){Nr(t)||K1(8),Vn(t)&&(t=Sk(t));var i=Lm(this),n=Pc(this,t,void 0);return n[Pe].C=!0,tu(i),n},e.finishDraft=function(t,i){var n=t&&t[Pe],a=n.A;return Sd(a,i),$d(void 0,a)},e.setAutoFreeze=function(t){this.D=t},e.setUseProxies=function(t){t&&!Nm&&K1(20),this.g=t},e.applyPatches=function(t,i){var n;for(n=i.length-1;n>=0;n--){var a=i[n];if(a.path.length===0&&a.op==="replace"){t=a.value;break}}n>-1&&(i=i.slice(n+1));var o=li("Patches").$;return Vn(t)?o(t,i):this.produce(t,function(s){return o(s,i)})},r}(),er=new Rk,tz=er.produce;er.produceWithPatches.bind(er);er.setAutoFreeze.bind(er);er.setUseProxies.bind(er);er.applyPatches.bind(er);er.createDraft.bind(er);er.finishDraft.bind(er);function Fm(r){return Nr(r)?tz(r,()=>{}):r}function Ok(r){return typeof r=="function"}function il(r,e){const[t,i,n]=Nk(e);let a;if(Ok(r))a=()=>Fm(r());else{const s=Fm(r);a=()=>s}function o(s=a(),c){let l=[t[c.type],...i.filter(({matcher:h})=>h(c)).map(({reducer:h})=>h)];return l.filter(h=>!!h).length===0&&(l=[n]),l.reduce((h,d)=>{if(d)if(Vn(h)){const v=d(h,c);return v===void 0?h:v}else{if(Nr(h))return tz(h,u=>d(u,c));{const u=d(h,c);if(u===void 0){if(h===null)return h;throw Error("A case reducer on a non-draftable value must not return undefined")}return u}}return h},s)}return o.getInitialState=a,o}function Nk(r){const e={},t=[];let i;const n={addCase(a,o){const s=typeof a=="string"?a:a.type;if(s in e)throw new Error("addCase cannot be called with two reducers for the same action type");return e[s]=o,n},addMatcher(a,o){return t.push({matcher:a,reducer:o}),n},addDefaultCase(a){return i=a,n}};return r(n),[e,t,i]}function Uk(r,e){const t=typeof e=="function"?e:il(e.initial,a=>e.builder(a,r)),i=new M4(t),n=J_(r,i);return{actions:r,dispatch:n,subject:i}}const Fk=()=>({request:Gt("client/request",(e,t)=>{var i,n,a,o;return t??(t={}),(i=t.transaction)!==null&&i!==void 0||(t.transaction=X_()),(n=t.created)!==null&&n!==void 0||(t.created=Date.now()),(a=t.controller)!==null&&a!==void 0||(t.controller=new AbortController),(o=t.task)!==null&&o!==void 0||(t.task=new c_),{payload:e,meta:t}}),retry:Gt("client/retry",e=>({payload:e})),success:Gt("client/success",(e,t)=>({payload:e,meta:t})),cancel:Gt("client/cancel",e=>({payload:e})),failure:Gt("client/failure",(e,t)=>({payload:e,meta:t})),error:Gt("client/error",(e,t)=>({payload:e,meta:t}))}),gt=Fk(),rz=r=>e=>e.pipe(Xt(gt.request.match),di(t=>{const{meta:{controller:i,transaction:n}}=t;return new Ee(a=>{if(i.signal.aborted)return a.next(gt.cancel({transaction:n,reason:`request [${n}] was aborted!`})),a.complete();a.add(e.pipe(Xt(gt.cancel.match)).subscribe(o=>{o.payload.transaction===n&&(i.signal.aborted||i.abort(),a.complete())})),a.add(R3(i.signal,"abort").subscribe(()=>{a.next(gt.cancel({transaction:n,reason:`request [${n}] was aborted!`})),a.complete()})),a.add(y1(r(t)).subscribe({next:o=>a.next(o),error:o=>a.next(gt.error(o,{request:t})),complete:()=>a.complete()}))})})),Bk=r=>(r=Object.assign({},{count:0,delay:0},r),(e,t)=>e.pipe(rz(i=>e.pipe(Xt(gt.failure.match),Xt(n=>n.meta.request===i),A_(t),L1(([n,a])=>{var o,s;const{transaction:c}=i.meta,l=a[c];if(!l)return Ui;const h=(s=(o=l.retry)===null||o===void 0?void 0:o.length)!==null&&s!==void 0?s:0,d=Object.assign({},r,i.meta.retry);if(h>=d.count)throw d.count?Error("maximum retries executed!",{cause:n.payload}):n.payload;return(typeof d.delay=="function"?y1(d.delay(n.payload.cause)).pipe(Z1(v=>{throw Error("failed to resolve delay",{cause:v})})):cC(d.delay)).pipe($e(()=>gt.retry(i)))}))))),jk=r=>e=>e.pipe(rz(t=>y1(r(t.payload,t.meta.controller.signal)).pipe($e(i=>gt.success(i,{request:t})),Z1(i=>An(gt.failure(Error(`failed to execute request for transaction ${t.meta.transaction}`,{cause:i}),{request:t})))))),qk=r=>r.pipe(Xt(gt.retry.match),$e(e=>e.payload)),iz=()=>Xt(r=>r.status==="complete"),Gk=(r={})=>il(r,e=>e.addCase(gt.request,(t,i)=>{const{transaction:n,task:a,ref:o,created:s}=i.meta;t[n]={transaction:n,task:a,ref:o,created:s}}).addCase(gt.success,(t,i)=>{const{request:n}=i.meta,{transaction:a,ref:o}=n.meta,s=t[a];if(s){const c={status:"complete",transaction:a,ref:o,value:i.payload,args:n.payload,created:s.created,completed:Date.now()};s.task.next(c),s.task.complete()}delete t[a]}).addCase(gt.retry,(t,i)=>{var n;const{transaction:a}=i.payload.meta,o=t[a];o&&((n=o.retry)!==null&&n!==void 0||(o.retry=[]),o.retry.push(Date.now()))}).addCase(gt.cancel,(t,i)=>{const{transaction:n,reason:a}=i.payload;if(t[n]){const o=Object.assign({},Dm(t[n]));o.task.error(new Z3("abort",{request:o,message:a??"request was canceled"})),delete t[n]}}).addCase(gt.failure,(t,i)=>{var n;const{payload:a,meta:o}=i,{transaction:s}=o.request.meta,c=t[s];c&&((n=c.errors)!==null&&n!==void 0||(c.errors=[]),c.errors.push(a))}).addCase(gt.error,(t,i)=>{const{payload:n,meta:a}=i,{transaction:o}=a.request.meta;if(t[o]){const s=Object.assign({},Dm(t[o]));s.task.error(new Z3("error",{request:s,message:`failed to process task [${o}]`,cause:n.cause})),delete t[o]}}));var Kk=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(a){return a instanceof t?a:new t(function(o){o(a)})}return new(t||(t=Promise))(function(a,o){function s(h){try{l(i.next(h))}catch(d){o(d)}}function c(h){try{l(i.throw(h))}catch(d){o(d)}}function l(h){h.done?a(h.value):n(h.value).then(s,c)}l((i=i.apply(r,e||[])).next())})},dt=globalThis&&globalThis.__classPrivateFieldGet||function(r,e,t,i){if(t==="a"&&!i)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?r!==e||!i:!e.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?i:t==="a"?i.call(r):i?i.value:e.get(r)},Bm=globalThis&&globalThis.__classPrivateFieldSet||function(r,e,t,i,n){if(i==="m")throw new TypeError("Private method is not writable");if(i==="a"&&!n)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?r!==e||!n:!e.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return i==="a"?n.call(r,t):n?n.value=t:e.set(r,t),t},pt,oa;class jm extends Ee{get closed(){return dt(this,pt,"f").closed}get state$(){return dt(this,pt,"f")}get action$(){return dt(this,pt,"f").action$}get success$(){return this.action$.pipe(Xt(gt.success.match),$e(({payload:e})=>e))}get error$(){return this.action$.pipe(To("client/error"),A_(dt(this,pt,"f")),$e(([e,t])=>{const{payload:i,meta:n}=e,{transaction:a}=n.request.meta,o=t[e.meta.request.meta.transaction];return new Z3("error",{request:o,message:`failed to process task [${a}]`,cause:i})}))}constructor(e,t){super(a=>dt(this,pt,"f").subscribe(a)),pt.set(this,void 0),oa.set(this,void 0);const i={};Bm(this,pt,new M4(Gk(i)),"f"),Bm(this,oa,new U1(()=>dt(this,pt,"f").complete()),"f"),dt(this,oa,"f").add(dt(this,pt,"f").addFlow(jk(e))),dt(this,oa,"f").add(dt(this,pt,"f").addFlow(qk));const n=Object.assign({count:0,delay:0},t==null?void 0:t.retry);dt(this,oa,"f").add(dt(this,pt,"f").addFlow(Bk(n)))}next(e,t){const i=gt.request(e,t);return dt(this,pt,"f").next(i),i.meta}nextAsync(e,t){return Kk(this,void 0,void 0,function*(){return Lr(this.next(e,t).task.pipe(iz()))})}getTaskByTransaction(e){const t=dt(this,pt,"f").value[e];return t&&t.task}getTaskByRef(e){const t=Object.values(dt(this,pt,"f").value).find(i=>i.ref===e);return t&&t.task}cancel(e,t){if(e)e&&dt(this,pt,"f").value[e]&&(t??(t=`[${e}]: transaction canceled`),dt(this,pt,"f").next(gt.cancel({transaction:e,reason:t})));else for(const i of Object.keys(dt(this,pt,"f").value))this.cancel(i,"all transactions canceled")}on(e,t){return dt(this,pt,"f").addEffect(gt[e].type,i=>{t(i,this)})}complete(){dt(this,oa,"f").unsubscribe()}asObservable(){return dt(this,pt,"f").asObservable()}}pt=new WeakMap,oa=new WeakMap;function Wk(){return{set:Gt("cache/set",(r,e)=>({payload:{key:r,entry:e}})),remove:Gt("cache/remove",r=>({payload:r})),invalidate:Gt("cache/invalidate",r=>({payload:r})),trim:Gt("cache/trim",r=>({payload:r}))}}const Wa=Wk(),Yk=(r,e)=>{var t,i;return((t=e.updated)!==null&&t!==void 0?t:0)-((i=r.updated)!==null&&i!==void 0?i:0)};function Qk(r,e={}){return il(e,t=>t.addCase(r.set,(i,n)=>{var a;const{key:o,entry:s}=n.payload,c=i[o];c?(c.updated=Date.now(),(a=c.updates)!==null&&a!==void 0||(c.updates=0),c.updates++):i[o]=Object.assign(Object.assign({},s),{created:Date.now()})}).addCase(r.remove,(i,n)=>{delete i[n.payload]}).addCase(r.invalidate,(i,n)=>{const a=i[n.payload];a&&delete a.updated}).addCase(r.trim,(i,n)=>{var a,o;const{payload:s}=n,c=(a=s.sort)!==null&&a!==void 0?a:Yk,l=Object.keys(i),h=Object.entries(i).filter(([d,u])=>!s.validate||s.validate(u)).sort((d,u)=>c(d[1],u[1])).slice(0,(o=s.size)!==null&&o!==void 0?o:Number.MAX_SAFE_INTEGER).map(([d])=>d);if(l.length!==h.length)for(const d of l){const u=h.indexOf(d);u!==-1?h.splice(u,1):delete i[d]}}))}var Wr=globalThis&&globalThis.__classPrivateFieldGet||function(r,e,t,i){if(t==="a"&&!i)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?r!==e||!i:!e.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?i:t==="a"?i.call(r):i?i.value:e.get(r)},Xk=globalThis&&globalThis.__classPrivateFieldSet||function(r,e,t,i,n){if(i==="m")throw new TypeError("Private method is not writable");if(i==="a"&&!n)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?r!==e||!n:!e.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return i==="a"?n.call(r,t):n?n.value=t:e.set(r,t),t},q1;class qm{get state$(){return Wr(this,q1,"f").asObservable()}constructor(e){q1.set(this,void 0);const{trimming:t,initial:i}=e;Xk(this,q1,new M4(Qk(Wa,i)),"f"),t&&Wr(this,q1,"f").addEffect("cache/set",()=>Wr(this,q1,"f").next(Wa.trim(t)))}setItem(...e){Wr(this,q1,"f").next(Wa.set(...e))}getItem(e){return Wr(this,q1,"f").value[e]}removeItem(e){Wr(this,q1,"f").next(Wa.remove(e))}invalidate(e){Wr(this,q1,"f").next(Wa.invalidate(e))}trim(e){Wr(this,q1,"f").next(Wa.trim(e))}reset(){Wr(this,q1,"f").reset()}complete(){Wr(this,q1,"f").complete()}}q1=new WeakMap;var Ge=globalThis&&globalThis.__classPrivateFieldGet||function(r,e,t,i){if(t==="a"&&!i)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?r!==e||!i:!e.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?i:t==="a"?i.call(r):i?i.value:e.get(r)},Ya=globalThis&&globalThis.__classPrivateFieldSet||function(r,e,t,i,n){if(i==="m")throw new TypeError("Private method is not writable");if(i==="a"&&!n)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?r!==e||!n:!e.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return i==="a"?n.call(r,t):n?n.value=t:e.set(r,t),t},Jk=globalThis&&globalThis.__rest||function(r,e){var t={};for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&e.indexOf(i)<0&&(t[i]=r[i]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,i=Object.getOwnPropertySymbols(r);n<i.length;n++)e.indexOf(i[n])<0&&Object.prototype.propertyIsEnumerable.call(r,i[n])&&(t[i[n]]=r[i[n]]);return t},sa,Er,Yi,r2,i2,Ph,nu;const Zk=(r=0)=>e=>{var t;return((t=e.updated)!==null&&t!==void 0?t:0)+r>Date.now()},eE=r=>{if(typeof r=="function")return r;switch(r){case"concat":return ok;case"merge":return sk;case"switch":default:return ck}};class h1{get client(){return Ge(this,Er,"f")}get cache(){return Ge(this,Yi,"f")}constructor(e){var t;sa.set(this,new U1),Er.set(this,void 0),Yi.set(this,void 0),r2.set(this,new $i),i2.set(this,void 0),Ph.set(this,void 0),nu.set(this,X_()),Ya(this,i2,n=>wk(e.key(n),Ge(this,nu,"f")),"f"),Ya(this,Ph,(t=e==null?void 0:e.validate)!==null&&t!==void 0?t:Zk(e==null?void 0:e.expire),"f"),e.client instanceof jm?Ya(this,Er,e.client,"f"):(Ya(this,Er,new jm(e.client.fn,e.client.options),"f"),Ge(this,sa,"f").add(()=>Ge(this,Er,"f").complete())),e.cache instanceof qm?Ya(this,Yi,e.cache,"f"):(Ya(this,Yi,new qm(e.cache||{}),"f"),Ge(this,sa,"f").add(()=>Ge(this,Yi,"f").complete()));const i=eE(e.queueOperator);Ge(this,sa,"f").add(()=>Ge(this,r2,"f").complete()),Ge(this,sa,"f").add(Ge(this,r2,"f").pipe(i(({args:n,options:a})=>new Ee(o=>{const{task:s,transaction:c}=Ge(this,Er,"f").next(n,a);o.add(s.pipe(Z1(()=>Ui)).subscribe(o)),o.add(()=>{setTimeout(()=>Ge(this,Er,"f").cancel(c))})})),iz(),P_(()=>!Ge(this,Er,"f").closed)).subscribe(n=>{const{args:a,value:o,transaction:s,ref:c}=n,l=c??Ge(this,i2,"f").call(this,a);Ge(this,Yi,"f").setItem(l,{value:o,args:a,transaction:s})}))}next(e,t){Ge(this,r2,"f").next({args:e,options:t})}query(e,t){var i;const n=Ge(this,i2,"f").call(this,e);return(i=Ge(this,Er,"f").getTaskByRef(n))!==null&&i!==void 0?i:this._createTask(n,e,t)}queryAsync(e,t){const i=t||{},{awaitResolve:n}=i,a=Jk(i,["awaitResolve"]);return(n?V1:Lr)(this._query(e,a))}complete(){Ge(this,sa,"f").unsubscribe()}_query(e,t){var i;const n=Ge(this,i2,"f").call(this,e);return(i=Ge(this,Er,"f").getTaskByRef(n))!==null&&i!==void 0?i:this._createTask(n,e,t)}_createTask(e,t,i){var n;const a=new c_,o=Ge(this,Yi,"f").getItem(e);if(o){const{value:l,args:h,created:d,updated:u,updates:v,transaction:m}=o,f={status:"cache",value:l,args:h,created:d,updated:u,updates:v,transaction:m};a.next(f)}const s=((n=i==null?void 0:i.cache)===null||n===void 0?void 0:n.validate)||Ge(this,Ph,"f");return o&&s(o,t)?a.complete():Ge(this,r2,"f").next({args:t,options:{ref:e,task:a}}),a.asObservable()}}sa=new WeakMap,Er=new WeakMap,Yi=new WeakMap,r2=new WeakMap,i2=new WeakMap,Ph=new WeakMap,nu=new WeakMap;h1.extractQueryValue=lk;var jn=globalThis&&globalThis.__classPrivateFieldGet||function(r,e,t,i){if(t==="a"&&!i)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?r!==e||!i:!e.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?i:t==="a"?i.call(r):i?i.value:e.get(r)},Gm=globalThis&&globalThis.__classPrivateFieldSet||function(r,e,t,i,n){if(i==="m")throw new TypeError("Private method is not writable");if(i==="a"&&!n)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?r!==e||!n:!e.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return i==="a"?n.call(r,t):n?n.value=t:e.set(r,t),t},Ms,Qi;class tE extends Ee{get currentContext(){return jn(this,Qi,"f").value}get currentContext$(){return jn(this,Qi,"f").asObservable()}get client(){return jn(this,Ms,"f")}constructor(e){super(t=>jn(this,Qi,"f").subscribe(t)),Ms.set(this,void 0),Qi.set(this,void 0),Gm(this,Ms,new h1(e),"f"),Gm(this,Qi,new Do(void 0),"f")}setCurrentContext(e){typeof e=="string"?this.resolveContext(e).pipe(Z1(()=>Ui)).subscribe(t=>this.setCurrentContext(t)):ak(e,jn(this,Qi,"f").value)||jn(this,Qi,"f").next(e)}resolveContext(e){return jn(this,Ms,"f").query({id:e}).pipe($e(t=>t.value))}}Ms=new WeakMap,Qi=new WeakMap;var Td=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(a){return a instanceof t?a:new t(function(o){o(a)})}return new(t||(t=Promise))(function(a,o){function s(h){try{l(i.next(h))}catch(d){o(d)}}function c(h){try{l(i.throw(h))}catch(d){o(d)}}function l(h){h.done?a(h.value):n(h.value).then(s,c)}l((i=i.apply(r,e||[])).next())})},Je=globalThis&&globalThis.__classPrivateFieldGet||function(r,e,t,i){if(t==="a"&&!i)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?r!==e||!i:!e.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?i:t==="a"?i.call(r):i?i.value:e.get(r)},qn=globalThis&&globalThis.__classPrivateFieldSet||function(r,e,t,i,n){if(i==="m")throw new TypeError("Private method is not writable");if(i==="a"&&!n)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?r!==e||!n:!e.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return i==="a"?n.call(r,t):n?n.value=t:e.set(r,t),t},yi,Ah,Cs,ca,n2,la,Hs,Vh;let rE=class{get contextClient(){return Je(this,yi,"f")}get queryClient(){return Je(this,Ah,"f")}get currentContext$(){return Je(this,yi,"f").currentContext$}get currentContext(){return Je(this,yi,"f").currentContext}set currentContext(e){e?this.setCurrentContext(e):this.clearCurrentContext()}constructor(e){var t,i,n;yi.set(this,void 0),Ah.set(this,void 0),Cs.set(this,void 0),ca.set(this,void 0),n2.set(this,new U1),la.set(this,void 0),Hs.set(this,void 0),Vh.set(this,void 0);const{config:a,event:o,parentContext:s}=e;a.resolveContext&&(this.resolveContext=(t=a.resolveContext)===null||t===void 0?void 0:t.bind(this)),a.validateContext&&(this.validateContext=(i=a.validateContext)===null||i===void 0?void 0:i.bind(this)),qn(this,la,a.contextType,"f"),qn(this,Hs,a.contextFilter,"f"),qn(this,yi,new tE(a.client.get),"f"),qn(this,Ah,new h1(a.client.query),"f"),a.client.related&&qn(this,Cs,new h1(a.client.related),"f"),qn(this,Vh,(n=a.contextParameterFn)!==null&&n!==void 0?n:c=>({search:c.search,filter:{type:c.type}}),"f"),o&&(qn(this,ca,o,"f"),Je(this,n2,"f").add(Je(this,yi,"f").currentContext$.pipe(O3()).subscribe(([c,l])=>{o.dispatchEvent("onCurrentContextChanged",{source:this,canBubble:!0,detail:{previous:c,next:l}})})),Je(this,n2,"f").add(o.addEventListener("onCurrentContextChanged",c=>{c.source!==this&&(this.currentContext=c.detail.next)}))),s&&Je(this,n2,"f").add(s.contextClient.currentContext$.pipe(L1(c=>Td(this,void 0,void 0,function*(){var l;if(c){const h=yield(l=Je(this,ca,"f"))===null||l===void 0?void 0:l.dispatchEvent("onParentContextChanged",{source:this,detail:c,cancelable:!0});return{next:c,canceled:h==null?void 0:h.canceled}}return{next:c}})),Xt(c=>!c.canceled),$e(({next:c})=>c)).subscribe(c=>Td(this,void 0,void 0,function*(){if(c)try{yield this.setCurrentContext(c,{validate:!0,resolve:!0})}catch(l){console.warn("ContextProvider::onParentContextChanged",l)}else this.clearCurrentContext()})))}setCurrentContext(e,t){var i,n,a;return Td(this,void 0,void 0,function*(){if(e===this.currentContext)return e;if(t!=null&&t.validate&&!this.validateContext(e)){if(t.resolve){const s=yield(i=Je(this,ca,"f"))===null||i===void 0?void 0:i.dispatchEvent("onSetContextResolve",{source:this,cancelable:!0,detail:{context:e}});if(s!=null&&s.canceled)throw Error("resolving of context was canceled");try{const c=yield this.resolveContextAsync(e),l=yield(n=Je(this,ca,"f"))===null||n===void 0?void 0:n.dispatchEvent("onSetContextResolved",{source:this,cancelable:!0,detail:{input:e,result:c}});if(l!=null&&l.canceled)throw Error("resolving of context was canceled");return this.setCurrentContext(c)}catch(c){console.error("failed to resolve context",e,c)}}throw Error("failed to validate provided context")}const o=yield(a=Je(this,ca,"f"))===null||a===void 0?void 0:a.dispatchEvent("onCurrentContextChange",{source:this,canBubble:!0,cancelable:!0,detail:{context:e}});if(o!=null&&o.canceled)throw Error("change of context was aborted");return Je(this,yi,"f").setCurrentContext(e),e})}queryContext(e){const t=this.queryClient.query(Je(this,Vh,"f").call(this,{search:e,type:Je(this,la,"f")})).pipe($e(i=>i.value));return Je(this,Hs,"f")?t.pipe($e(Je(this,Hs,"f"))):t}queryContextAsync(e){return V1(this.queryContext(e))}validateContext(e){return Je(this,la,"f")?Je(this,la,"f").map(t=>t.toLowerCase()).includes(e.type.id.toLowerCase()):!0}resolveContext(e){return this.relatedContexts({item:e,filter:{type:Je(this,la,"f")}}).pipe($e(t=>t.filter(i=>this.validateContext(i))),$e(t=>{const i=t.shift();if(!i)throw Error("failed to resolve context");return t.length&&console.warn("ContextProvider::relatedContext","multiple items found 🤣",t),i}))}resolveContextAsync(e){return V1(this.resolveContext(e))}relatedContexts(e){return Je(this,Cs,"f")?Je(this,Cs,"f").query(e).pipe($e(({value:t})=>t)):b_(()=>Error("ContextProvider::relatedContexts - no client defined for resolving related context"))}relatedContextsAsync(e){return V1(this.relatedContexts(e))}clearCurrentContext(){Je(this,yi,"f").setCurrentContext(void 0)}dispose(){Je(this,n2,"f").unsubscribe()}};yi=new WeakMap,Ah=new WeakMap,Cs=new WeakMap,ca=new WeakMap,n2=new WeakMap,la=new WeakMap,Hs=new WeakMap,Vh=new WeakMap;var iE=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(a){return a instanceof t?a:new t(function(o){o(a)})}return new(t||(t=Promise))(function(a,o){function s(h){try{l(i.next(h))}catch(d){o(d)}}function c(h){try{l(i.throw(h))}catch(d){o(d)}}function l(h){h.done?a(h.value):n(h.value).then(s,c)}l((i=i.apply(r,e||[])).next())})};const nE="context",aE={name:nE,configure:()=>new nk,initialize:r=>iE(void 0,void 0,void 0,function*(){var e;const t=yield r.config.createConfig(r),i=r.hasModule("event")?yield r.requireInstance("event"):void 0,n=(e=r.ref)===null||e===void 0?void 0:e.context;return new rE({config:t,event:i,parentContext:n})}),dispose:r=>{r.instance.dispose()}};var Km=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(a){return a instanceof t?a:new t(function(o){o(a)})}return new(t||(t=Promise))(function(a,o){function s(h){try{l(i.next(h))}catch(d){o(d)}}function c(h){try{l(i.throw(h))}catch(d){o(d)}}function l(h){h.done?a(h.value):n(h.value).then(s,c)}l((i=i.apply(r,e||[])).next())})};class oE{constructor(e){this.clientKey=e.clientKey,this.endpoint=e.endpoint,this.clientCtor=e.clientCtor}createHttpClientClient(e){return Km(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 Km(this,void 0,void 0,function*(){if(!this.endpoint)throw Error("no endpoint defined!");return new this.clientCtor({http:e,endpoint:this.endpoint})})}}var Id=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(a){return a instanceof t?a:new t(function(o){o(a)})}return new(t||(t=Promise))(function(a,o){function s(h){try{l(i.next(h))}catch(d){o(d)}}function c(h){try{l(i.throw(h))}catch(d){o(d)}}function l(h){h.done?a(h.value):n(h.value).then(s,c)}l((i=i.apply(r,e||[])).next())})};class sE{constructor(e,t){this._client=e,this._http=t}get environment(){return this._client.environment}resolveServices(){return this._client.fetchEnvironment()}resolveService(e){return Id(this,void 0,void 0,function*(){return this._client.resolveService(e)})}createClient(e,t){return Id(this,void 0,void 0,function*(){const i=yield this.resolveService(e);if(!i)throw Error(`Could not load configuration of service [${e}]`);return this._http.createClient(Object.assign(Object.assign({},t),{baseUri:i.uri,defaultScopes:i.defaultScopes}))})}configureClient(e,t){return Id(this,void 0,void 0,function*(){const{key:i,alias:n}=typeof e=="string"?{key:e,alias:e}:e,{uri:a,defaultScopes:o}=yield this.resolveService(i);t.addConfig($_(n,{baseUri:a,defaultScopes:o}))})}}var Rd=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(a){return a instanceof t?a:new t(function(o){o(a)})}return new(t||(t=Promise))(function(a,o){function s(h){try{l(i.next(h))}catch(d){o(d)}}function c(h){try{l(i.throw(h))}catch(d){o(d)}}function l(h){h.done?a(h.value):n(h.value).then(s,c)}l((i=i.apply(r,e||[])).next())})},Wm=globalThis&&globalThis.__classPrivateFieldGet||function(r,e,t,i){if(t==="a"&&!i)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?r!==e||!i:!e.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?i:t==="a"?i.call(r):i?i.value:e.get(r)},cE=globalThis&&globalThis.__classPrivateFieldSet||function(r,e,t,i,n){if(i==="m")throw new TypeError("Private method is not writable");if(i==="a"&&!n)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?r!==e||!n:!e.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return i==="a"?n.call(r,t):n?n.value=t:e.set(r,t),t},ks;const Ym="services";class lE{get environment(){var e;const t=(e=Wm(this,ks,"f").cache.getItem(Ym))===null||e===void 0?void 0:e.value;if(!t)throw Error("no cached environment found");return t}constructor({http:e,endpoint:t}){ks.set(this,void 0),this.http=e,this.endpoint=t,cE(this,ks,new h1({client:{fn:()=>e.fetch$(t,{selector:this.selector.bind(this)})},key:()=>Ym,expire:5*60*1e3}),"f")}fetchEnvironment(){return Rd(this,void 0,void 0,function*(){return Lr(h1.extractQueryValue(Wm(this,ks,"f").query(void 0,{cache:{suppressInvalid:!0}})))})}selector(e){return Rd(this,void 0,void 0,function*(){const t=yield e.json(),i=t.services.reduce((n,a)=>Object.assign(n,{[a.key]:{clientId:t.clientId,uri:a.uri,defaultScopes:[t.clientId+"/.default"]}}),{});return Object.assign(Object.assign({},t),{services:i})})}resolveService(e){return Rd(this,void 0,void 0,function*(){try{const{services:t}=yield this.fetchEnvironment();return t[e]}catch(t){throw console.error(t),t}})}}ks=new WeakMap;const hE="serviceDiscovery";var dE=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(a){return a instanceof t?a:new t(function(o){o(a)})}return new(t||(t=Promise))(function(a,o){function s(h){try{l(i.next(h))}catch(d){o(d)}}function c(h){try{l(i.throw(h))}catch(d){o(d)}}function l(h){h.done?a(h.value):n(h.value).then(s,c)}l((i=i.apply(r,e||[])).next())})};const uE={name:hE,configure:()=>new oE({clientCtor:lE,clientKey:"service_discovery",endpoint:"/_discovery/environments/current"}),initialize:({config:r,requireInstance:e})=>dE(void 0,void 0,void 0,function*(){const t=yield e("http"),i=yield r.createHttpClientClient(t),n=yield r.createClient(i);return new sE(n,t)})};class vE{}class vi extends Error{constructor(e,t){super(`unsupported version ${e}`,{cause:t}),this.version=e}}const mE=(r,e)=>{var t;const i=(t=_r[r])!==null&&t!==void 0?t:r;switch(i){case _r.v2:throw new vi(r);case _r.v1:default:{const{id:n}=e,a=new URLSearchParams;return a.append("api-version",i),`/contexts/${n}/?${String(a)}`}}},fE=(r,e,t)=>[mE(r,e),t],pE=(r,e,t="json")=>(i,n)=>r[t](...fE(e,i,n));var gE=["eq","ne","gt","ge","lt","le"],Xl=["and","or","not"],_E=["any","all"],zE=["startswith","endswith","contains"],yE=["expand","levels","select","skip","top","count","orderby","filter"],Qm=/\((.*)\)/,Xm=/(?!indexof)\((\w+)\)/,Jm;(function(r){r.sum="sum",r.min="min",r.max="max",r.average="average",r.countdistinct="countdistinct"})(Jm||(Jm={}));var _i="";function nz(r){var e=r===void 0?{}:r,t=e.select,i=e.search,n=e.skiptoken,a=e.format,o=e.top,s=e.skip,c=e.filter,l=e.transform,h=e.orderBy,d=e.key,u=e.count,v=e.expand,m=e.action,f=e.func,C="",_=[],p={};if(d!=null&&(C+="(".concat(ni(d,_),")")),(c||typeof u=="object")&&(p.$filter=Vc(typeof u=="object"?u:c,_)),l&&(p.$apply=az(l)),v&&(p.$expand=Sh(v)),h&&(p.$orderby=g6(h)),u&&(typeof u=="boolean"?p.$count=!0:C+="/$count"),typeof o=="number"&&(p.$top=o),typeof s=="number"&&(p.$skip=s),m&&(C+="/".concat(m)),f){if(typeof f=="string")C+="/".concat(f);else if(typeof f=="object"){var z=Object.keys(f)[0],M=ni(f[z],_);C+="/".concat(z),M!==""&&(C+="(".concat(M,")"))}}return _.length>0&&Object.assign(p,_.reduce(function(A,I){var N;return Object.assign(A,(N={},N["@".concat(I.name)]=ni(I.value),N))},{})),CE(C,wt({$select:t,$search:i,$skiptoken:n,$format:a},p))}function Od(r,e,t){return t===void 0&&(t=[]),"".concat(r," eq ").concat(ni(e,t))}function Vc(r,e,t){return r===void 0&&(r={}),e===void 0&&(e=[]),t===void 0&&(t=""),(Array.isArray(r)?r:[r]).reduce(function(a,o){if(o){var s=i(o,e,t);s&&a.push(s)}return a},[]).join(" and ");function i(a,o,s){a===void 0&&(a={}),o===void 0&&(o=[]),s===void 0&&(s="");var c="";if(typeof a=="string")c=a;else if(a&&typeof a=="object"){var l=Object.keys(a).reduce(function(h,d){var u=a[d];if(u===void 0)return h;var v="";if(s?d===_i?v=s:Xm.test(d)?v=d.replace(Xm,function(p,z){return z.trim()===_i?"(".concat(s,")"):"(".concat(s,"/").concat(z.trim(),")")}):Qm.test(d)?v=d.replace(Qm,function(p,z){return z.trim()===_i?"(".concat(s,")"):"(".concat(s,"/").concat(z.trim(),")")}):v="".concat(s,"/").concat(d):v=d,d===_i&&Array.isArray(u))return h.concat(u.map(function(p){return Od(v,p)}));if(["number","string","boolean"].indexOf(typeof u)!==-1||u instanceof Date||u===null)h.push(Od(v,u,o));else if(Array.isArray(u)){var m=d,f=u.map(function(p){return Vc(p,o,s)}).filter(function(p){return p}).map(function(p){return Xl.indexOf(m)!==-1?"(".concat(p,")"):p});f.length&&(Xl.indexOf(m)!==-1?f.length&&(m==="not"?h.push(Zm(f)):h.push("(".concat(f.join(" ".concat(m," ")),")"))):h.push(f.join(" ".concat(m," "))))}else if(Xl.indexOf(v)!==-1){var C=v,f=Object.keys(u).map(function(z){var M;return i((M={},M[z]=u[z],M))});f.length&&(C==="not"?h.push(Zm(f)):h.push("(".concat(f.join(" ".concat(C," ")),")")))}else if(typeof u=="object")if("type"in u)h.push(Od(v,u,o));else{var _=Object.keys(u);_.forEach(function(p){if(u[p]!==void 0)if(gE.indexOf(p)!==-1)h.push("".concat(v," ").concat(p," ").concat(ni(u[p],o)));else if(Xl.indexOf(p)!==-1)Array.isArray(u[p])?h.push(u[p].map(function(I){return"("+i(I,o,v)+")"}).join(" ".concat(p," "))):h.push("("+i(u[p],o,v)+")");else if(_E.indexOf(p)!==-1){var z=n(d.toLowerCase(),u[p],p,v);z&&h.push(z)}else if(p==="has")h.push("".concat(v," ").concat(p," ").concat(ni(u[p],o)));else if(p==="in"){var M=Array.isArray(u[p])?u[p]:u[p].value.map(function(I){return{type:u[p].type,value:I}});h.push(v+" in ("+M.map(function(I){return ni(I,o)}).join(",")+")")}else if(zE.indexOf(p)!==-1)h.push("".concat(p,"(").concat(v,",").concat(ni(u[p],o),")"));else{var A=i(u,o,v);A&&h.push(A)}})}else throw new Error("Unexpected value type: ".concat(u));return h},[]);c=l.join(" and ")}return c}function n(a,o,s,c){var l="";if(typeof o=="string"||o instanceof String)l=wE(a,o,s,c);else if(o){var h=Array.isArray(o)?o.reduce(function(u,v){return v.hasOwnProperty(_i)?(u.hasOwnProperty(_i)||(u[_i]=[]),u[_i].push(v[_i]),u):wt(wt({},u),v)},{}):o,d=i(h,e,a);l="".concat(c,"/").concat(s,"(").concat(d?"".concat(a,":").concat(d):"",")")}return l}}function wE(r,e,t,i){var n="",a=t=="all"?"ne":"eq";return n="".concat(i,"/").concat(t,"(").concat(r,": ").concat(r," ").concat(a," '").concat(e,"')"),n}function bE(r){return r=r.replace(/%/g,"%25"),r=r.replace(/\+/g,"%2B"),r=r.replace(/\//g,"%2F"),r=r.replace(/\?/g,"%3F"),r=r.replace(/#/g,"%23"),r=r.replace(/&/g,"%26"),r=r.replace(/'/g,"''"),r}function ni(r,e){if(typeof r=="string")return"'".concat(bE(r),"'");if(r instanceof Date)return r.toISOString();if(typeof r=="number")return r;if(Array.isArray(r))return"[".concat(r.map(function(t){return ni(t)}).join(","),"]");if(r===null)return r;if(typeof r=="object")switch(r.type){case"raw":case"guid":return r.value;case"duration":return"duration'".concat(r.value,"'");case"binary":return"binary'".concat(r.value,"'");case"alias":return Array.isArray(e)&&e.push(r),"@".concat(r.name);case"json":return escape(JSON.stringify(r.value));case"decimal":return"".concat(r.value,"M");default:return Object.entries(r).filter(function(t){var i=t[1];return i!==void 0}).map(function(t){var i=t[0],n=t[1];return"".concat(i,"=").concat(ni(n,e))}).join(",")}return r}function Sh(r){if(typeof r=="number")return r;if(typeof r=="string")return r.indexOf("/")===-1?r:r.split("/").reverse().reduce(function(t,i,n,a){return n===0?"$expand=".concat(i):n===a.length-1?"".concat(i,"(").concat(t,")"):"$expand=".concat(i,"(").concat(t,")")},"");if(Array.isArray(r))return"".concat(r.map(function(t){return Sh(t)}).join(","));if(typeof r=="object"){var e=Object.keys(r);return e.some(function(t){return yE.indexOf(t.toLowerCase())!==-1})?e.map(function(t){var i;switch(t){case"filter":i=Vc(r[t]);break;case"orderBy":i=g6(r[t]);break;case"levels":case"count":case"skip":case"top":i="".concat(r[t]);break;default:i=Sh(r[t])}return"$".concat(t.toLowerCase(),"=").concat(i)}).join(";"):e.map(function(t){var i=Sh(r[t]);return i?"".concat(t,"(").concat(i,")"):t}).join(",")}return""}function az(r){var e=Array.isArray(r)?r:[r],t=e.reduce(function(i,n){var a=n.aggregate,o=n.filter,s=n.groupBy,c=r_(n,["aggregate","filter","groupBy"]),l=Object.keys(c);if(l.length)throw new Error("Unsupported transform(s): ".concat(l));if(a&&i.push("aggregate(".concat(xE(a),")")),o){var h=Vc(o);h&&i.push("filter(".concat(Vc(h),")"))}return s&&i.push("groupby(".concat(ME(s),")")),i},[]);return t.join("/")||void 0}function xE(r){var e=Array.isArray(r)?r:[r];return e.map(function(t){return typeof t=="string"?t:Object.keys(t).map(function(i){var n=t[i];if(!n.with)throw new Error("'with' property required for '".concat(i,"'"));if(!n.as)throw new Error("'as' property required for '".concat(i,"'"));return"".concat(i," with ").concat(n.with," as ").concat(n.as)})}).join(",")}function ME(r){if(!r.properties)throw new Error("'properties' property required for groupBy");var e="(".concat(r.properties.join(","),")");return r.transform&&(e+=",".concat(az(r.transform))),e}function g6(r,e){return e===void 0&&(e=""),Array.isArray(r)?r.map(function(t){return Array.isArray(t)&&t.length===2&&["asc","desc"].indexOf(t[1])!==-1?t.join(" "):t}).map(function(t){return"".concat(e).concat(String(t))}).join(","):typeof r=="object"?Object.entries(r).map(function(t){var i=t[0],n=t[1];return g6(n,"".concat(i,"/"))}).map(function(t){return"".concat(e).concat(t)}).join(","):"".concat(e).concat(String(r))}function CE(r,e){var t=Object.getOwnPropertyNames(e).filter(function(i){return e[i]!==void 0&&e[i]!==""}).map(function(i){return"".concat(i,"=").concat(e[i])});return t.length?"".concat(r,"?").concat(t.join("&")):r}function Zm(r){return"not(".concat(r.join(" and "),")")}const HE=r=>Object.keys(r).reduce((e,t)=>{var i;switch(t){case"type":return!((i=r[t])===null||i===void 0)&&i.length?Object.assign(Object.assign({},e),{[t]:{in:r[t]}}):e;default:return Object.assign(Object.assign({},e),{[t]:r[t]})}},{}),kE=r=>Object.entries(r).filter(([e,t])=>!!t).reduce((e,[t,i])=>{switch(t){case"filter":return Object.assign(Object.assign({},e),{[t]:HE(i)});default:return Object.assign(Object.assign({},e),{[t]:r[t]})}},{}),EE=r=>typeof r=="string"?r:nz(kE(r)),PE=(r,e)=>{var t;const i=(t=_r[r])!==null&&t!==void 0?t:r;switch(i){case _r.v2:throw new vi(r);case _r.v1:default:{const{query:n,includeDeleted:a}=e,o=new URLSearchParams(EE(n));return o.append("api-version",i),a&&o.append("includeDeleted","true"),`/contexts/?${String(o)}`}}},AE=(r,e,t)=>[PE(r,e),t],VE=(r,e,t="json")=>(i,n)=>r[t](...AE(e,i,n)),SE=r=>Object.keys(r).reduce((e,t)=>{var i;switch(t){case"type":return!((i=r[t])===null||i===void 0)&&i.length?Object.assign(Object.assign({},e),{[t]:{in:r[t]}}):e;default:return Object.assign(Object.assign({},e),{[t]:r[t]})}},{}),$E=r=>Object.entries(r).filter(([e,t])=>!!t).reduce((e,[t,i])=>{switch(t){case"filter":return Object.assign(Object.assign({},e),{[t]:SE(i)});default:return Object.assign(Object.assign({},e),{[t]:r[t]})}},{}),DE=r=>typeof r=="string"?r:nz($E(r)),LE=(r,e)=>{var t;const i=(t=_r[r])!==null&&t!==void 0?t:r;switch(i){case _r.v2:throw new vi(r);case _r.v1:default:{const{id:n,query:a}=e,o=new URLSearchParams(DE(a||""));return o.append("api-version",i),`/contexts/${n}/relations?${String(o)}`}}},TE=(r,e,t)=>[LE(r,e),t],IE=(r,e,t="json")=>(i,n)=>r[t](...TE(e,i,n));class RE{get Version(){return _r}constructor(e,t){this._client=e,this._method=t}get(e,...t){return pE(this._client,e,this._method)(...t)}query(e,...t){return VE(this._client,e,this._method)(...t)}related(e,...t){return IE(this._client,e,this._method)(...t)}}var _r;(function(r){r.v1="1.0",r.v2="2.0"})(_r||(_r={}));const OE=(r,e)=>{switch(r){case"v1":{const{id:t}=e,i=new URLSearchParams;return i.append("api-version","1.0"),`/bookmarks/${t}/?${String(i)}`}default:{const{id:t}=e,i=new URLSearchParams;return i.append("api-version",r),`/bookmarks/${t}/?${String(i)}`}}},NE=(r,e,t)=>{const i=OE(r,e),n=Object.assign({},{method:"Delete"},t);return[i,n]},UE=(r,e,t="fetch")=>(i,n)=>r[t](...NE(e,i,n)),FE=UE,BE=(r,e)=>{switch(r){case"v1":{const{id:t}=e,i=new URLSearchParams;return i.append("api-version","1.0"),`/bookmarks/${t}/?${String(i)}`}default:{const{id:t}=e,i=new URLSearchParams;return i.append("api-version",r),`/bookmarks/${t}/?${String(i)}`}}},jE=(r,e,t)=>[BE(r,e),t],qE=(r,e,t="json")=>(i,n)=>r[t](...jE(e,i,n)),GE=qE,KE=(r,e)=>{switch(r){case"v1":default:{const t=new URLSearchParams;return t.append("api-version",r),`/bookmarks?${String(t)}`}}},WE=(r,e,t)=>{const i=KE(r),n=new Headers;n.append("content-type","application/json");const a=Object.assign({},{method:"post",body:JSON.stringify(e),headers:n},t);return[i,a]},YE=(r,e,t="json")=>(i,n)=>r[t](...WE(e,i,n)),QE=YE,XE=(r,e)=>{switch(r){case"v1":default:{const t=new URLSearchParams;return t.append("api-version",r),`/bookmarks/${e.id}?${String(t)}`}}},JE=(r,e,t)=>{const i=XE(r,e),n=new Headers;n.append("content-type","application/json");const a=Object.assign({},{method:"patch",body:JSON.stringify(e),headers:n},t);return[i,a]},ZE=(r,e,t="json")=>(i,n)=>r[t](...JE(e,i,n)),eP=ZE,tP=r=>{switch(r){case"v1":default:{const e=new URLSearchParams;return e.append("api-version",r),`persons/me/bookmarks/?${String(e)}`}}},rP=(r,e)=>[tP(r),e],iP=(r,e,t="json")=>i=>r[t](...rP(e,i)),nP=iP,aP=(r,e)=>{switch(r){case"v1":default:{const t=new URLSearchParams;return t.append("api-version",r),`/persons/me/bookmarks/favorites?${String(t)}`}}},oP=(r,e,t)=>{const i=aP(r),n=new Headers;n.append("content-type","application/json");const a=Object.assign({},{method:"post",body:JSON.stringify(e),headers:n},t);return[i,a]},sP=(r,e,t="json")=>(i,n)=>r[t](...oP(e,i,n)),cP=sP,lP=(r,e)=>{switch(r){case"v1":default:{const{bookmarkId:t}=e,i=new URLSearchParams;return i.append("api-version","1.0"),`/persons/me/bookmarks/favorites/${t}/?${String(i)}`}}},hP=(r,e,t)=>{const i=lP(r,e),n=Object.assign({},{method:"Delete"},t);return[i,n]},dP=(r,e,t="fetch")=>(i,n)=>r[t](...hP(e,i,n)),uP=dP,vP=(r,e)=>{switch(r){case"v1":default:{const{bookmarkId:t}=e,i=new URLSearchParams;return i.append("api-version",r),`/persons/me/bookmarks/favorites/${t}?${String(i)}`}}},mP=(r,e,t)=>{const i=vP(r,e),n=new Headers;n.append("content-type","application/json");const a=Object.assign({},{method:"head",headers:n},t);return[i,a]},fP=(r,e,t="json")=>(i,n)=>r[t](...mP(e,i,n)),pP=fP;class gP{constructor(e,t){this._client=e,this._method=t}get(e,...t){return GE(this._client,e,this._method)(...t)}getAll(e){return nP(this._client,e,this._method)()}post(e,...t){return QE(this._client,e,this._method)(...t)}patch(e,...t){return eP(this._client,e,this._method)(...t)}delete(e,...t){return FE(this._client,e,this._method)(...t)}addFavorite(e,...t){return cP(this._client,e,this._method)(...t)}removeFavorite(e,...t){return uP(this._client,e,this._method)(...t)}verifyFavorite(e,...t){return pP(this._client,e,this._method)(...t)}}const _P=gP,zP=(r,e)=>{var t;const i=(t=tt[r])!==null&&t!==void 0?t:r;switch(i){case tt.v2:throw new vi(r);case tt.v1:default:{const{id:n}=e,a=new URLSearchParams;return a.append("api-version",i),`/notification/${n}/?${String(a)}`}}},yP=(r,e,t)=>[zP(r,e),t],wP=(r,e,t="json")=>(i,n)=>r[t](...yP(e,i,n)),bP=(r,e)=>{var t;const i=(t=tt[r])!==null&&t!==void 0?t:r;switch(i){case tt.v2:throw new vi(r);case tt.v1:default:{const{userId:n}=e,a=new URLSearchParams;return a.append("api-version",i),`/person/${n}/notifications/?${String(a)}`}}},xP=(r,e,t)=>{const i=bP(r,e),n=new Headers;n.append("content-type","application/json");const a=Object.assign({},{method:"post",body:JSON.stringify(e),headers:n},t);return[i,a]},MP=(r,e,t="json")=>(i,n)=>r[t](...xP(e,i,n)),CP=(r,e)=>{var t;const i=(t=tt[r])!==null&&t!==void 0?t:r;switch(i){case tt.v2:throw new vi(r);case tt.v1:default:{const{id:n}=e,a=new URLSearchParams;return a.append("api-version",i),`/notification/${n}/?${String(a)}`}}},HP=(r,e,t)=>{const i=CP(r,e),n=new Headers;n.append("content-type","application/json");const a=Object.assign({},{method:"patch",body:JSON.stringify(e),headers:n},t);return[i,a]},kP=(r,e,t="json")=>(i,n)=>r[t](...HP(e,i,n)),EP=(r,e)=>{var t;const i=(t=tt[r])!==null&&t!==void 0?t:r;switch(i){case tt.v2:throw new vi(r);case tt.v1:default:{const{userId:n}=e,a=new URLSearchParams;return a.append("api-version",i),`/person/${n}/notifications/?${String(a)}`}}},PP=(r,e,t)=>[EP(r,e),t],AP=(r,e,t="json")=>(i,n)=>r[t](...PP(e,i,n)),VP=(r,e)=>{var t;const i=(t=tt[r])!==null&&t!==void 0?t:r;switch(i){case tt.v2:throw new vi(r);case tt.v1:default:{const{id:n}=e,a=new URLSearchParams;return a.append("api-version",i),`/notification/${n}/?${String(a)}`}}},SP=(r,e,t)=>{const i=VP(r,e),n=new Headers;n.append("content-type","application/json");const a=Object.assign({},{method:"delete",headers:n},t);return[i,a]},$P=(r,e,t="json")=>(i,n)=>r[t](...SP(e,i,n));var tt;(function(r){r.v1="1.0",r.v2="2.0"})(tt||(tt={}));const DP=(r,e)=>{var t;const i=(t=tt[r])!==null&&t!==void 0?t:r;switch(i){case tt.v2:throw new vi(r);case tt.v1:default:{const{userId:n}=e,a=new URLSearchParams;return a.append("api-version",i),`/person/${n}/notifications/settings/?${String(a)}`}}},LP=(r,e,t)=>{const i=DP(r,e),n=new Headers;n.append("content-type","application/json");const a=Object.assign({},{method:"put",body:JSON.stringify(e),headers:n},t);return[i,a]},TP=(r,e,t="json")=>(i,n)=>r[t](...LP(e,i,n)),IP=TP,RP=(r,e)=>{var t;const i=(t=tt[r])!==null&&t!==void 0?t:r;switch(i){case tt.v2:throw new vi(r);case tt.v1:default:{const{userId:n}=e,a=new URLSearchParams;return a.append("api-version",i),`/person/${n}/notifications/settings/?${String(a)}`}}},OP=(r,e,t)=>[RP(r,e),t],NP=(r,e,t="json")=>(i,n)=>r[t](...OP(e,i,n)),UP=NP;class FP{get Version(){return tt}constructor(e,t){this._client=e,this._method=t}getAll(e,...t){return AP(this._client,e,this._method)(...t)}getById(e,...t){return wP(this._client,e,this._method)(...t)}setSeenByUser(e,...t){return kP(this._client,e,this._method)(...t)}create(e,...t){return MP(this._client,e,this._method)(...t)}delete(e,...t){return $P(this._client,e,this._method)(...t)}getSettings(e,...t){return UP(this._client,e,this._method)(...t)}updateSettings(e,...t){return IP(this._client,e,this._method)(...t)}}var Nd=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(a){return a instanceof t?a:new t(function(o){o(a)})}return new(t||(t=Promise))(function(a,o){function s(h){try{l(i.next(h))}catch(d){o(d)}}function c(h){try{l(i.throw(h))}catch(d){o(d)}}function l(h){h.done?a(h.value):n(h.value).then(s,c)}l((i=i.apply(r,e||[])).next())})};class BP{constructor({createClient:e}){this._createClientFn=e}createNotificationClient(e){return Nd(this,void 0,void 0,function*(){const t=yield this._createClientFn("notification");return new FP(t,e)})}createBookmarksClient(e){return Nd(this,void 0,void 0,function*(){const t=yield this._createClientFn("bookmarks");return new _P(t,e)})}createContextClient(e){return Nd(this,void 0,void 0,function*(){const t=yield this._createClientFn("context");return new RE(t,e)})}}var oz=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(a){return a instanceof t?a:new t(function(o){o(a)})}return new(t||(t=Promise))(function(a,o){function s(h){try{l(i.next(h))}catch(d){o(d)}}function c(h){try{l(i.throw(h))}catch(d){o(d)}}function l(h){h.done?a(h.value):n(h.value).then(s,c)}l((i=i.apply(r,e||[])).next())})};const jP="services",qP=(r,e)=>t=>oz(void 0,void 0,void 0,function*(){if(r.hasClient(t))return r.createClient(t);if(e)return e.createClient(t);throw Error(`failed to create http client for service ${t}`)}),GP={name:jP,configure:()=>new vE,initialize:({ref:r,config:e,requireInstance:t,hasModule:i})=>oz(void 0,void 0,void 0,function*(){if(!e.createClient){const n=yield t("http"),a=i("serviceDiscovery")?yield t("serviceDiscovery"):r==null?void 0:r.serviceDiscovery;e.createClient=qP(n,a)}if(!e.createClient)throw Error("missing configuration for creating API client");return new BP(e)})},KP=GP;class WP extends zC{constructor(){super([HC,W_,r6,uE,KP,aE]),this.logger=new t_("FrameworkConfigurator")}configureHttp(...e){this.addConfig(IC(...e))}configureHttpClient(...e){this.addConfig($_(...e))}configureMsal(...e){this.addConfig(QH(...e))}configureServiceDiscovery(e){this.configureHttpClient("service_discovery",e.client)}}var YP=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(a){return a instanceof t?a:new t(function(o){o(a)})}return new(t||(t=Promise))(function(a,o){function s(h){try{l(i.next(h))}catch(d){o(d)}}function c(h){try{l(i.throw(h))}catch(d){o(d)}}function l(h){h.done?a(h.value):n(h.value).then(s,c)}l((i=i.apply(r,e||[])).next())})};const QP=(r,e)=>YP(void 0,void 0,void 0,function*(){const t=yield r.initialize(e),i={modules:t};return window.Fusion=i,t.event.dispatchEvent("onFrameworkLoaded",{detail:i}),i}),sz=k.createContext(null),XP=sz.Provider;var JP=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(a){return a instanceof t?a:new t(function(o){o(a)})}return new(t||(t=Promise))(function(a,o){function s(h){try{l(i.next(h))}catch(d){o(d)}}function c(h){try{l(i.throw(h))}catch(d){o(d)}}function l(h){h.done?a(h.value):n(h.value).then(s,c)}l((i=i.apply(r,e||[])).next())})};const ZP=r=>k.lazy(()=>JP(void 0,void 0,void 0,function*(){const e=new WP;yield r(e);const t=yield QP(e);return{default:({children:i})=>G(XP,Object.assign({value:t},{children:i}))}})),Ra=()=>{let r=k.useContext(sz);return r||console.warn("could not locate fusion in context!"),r??(r=window.Fusion),r||console.error("Could not load framework, might not be initiated?"),r},eA=r=>{const e=k.useMemo(()=>ZP(r.configure),[r.configure]);return G(k.Suspense,Object.assign({fallback:r.fallback},{children:G(e,{children:r.children})}))};function Re(){return Re=Object.assign?Object.assign.bind():function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[i]=t[i])}return r},Re.apply(this,arguments)}function no(r){return no=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},no(r)}function Ud(r){return r&&no(r)==="object"&&r.constructor===Object}function cz(r,e){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{clone:!0},i=t.clone?Re({},r):r;return Ud(r)&&Ud(e)&&Object.keys(e).forEach(function(n){n!=="__proto__"&&(Ud(e[n])&&n in r?i[n]=cz(r[n],e[n],t):i[n]=e[n])}),i}function tA(r,e){if(no(r)!=="object"||r===null)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var i=t.call(r,e||"default");if(no(i)!=="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}function rA(r){var e=tA(r,"string");return no(e)==="symbol"?e:String(e)}var iA=typeof Symbol=="function"&&Symbol.for;const lz=iA?Symbol.for("mui.nested"):"__THEME_NESTED__";var nA=["checked","disabled","error","focused","focusVisible","required","expanded","selected"];function aA(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=r.disableGlobal,t=e===void 0?!1:e,i=r.productionPrefix,n=i===void 0?"jss":i,a=r.seed,o=a===void 0?"":a,s=o===""?"":"".concat(o,"-"),c=0,l=function(){return c+=1,c};return function(h,d){var u=d.options.name;if(u&&u.indexOf("Mui")===0&&!d.options.link&&!t){if(nA.indexOf(h.key)!==-1)return"Mui-".concat(h.key);var v="".concat(s).concat(u,"-").concat(h.key);return!d.options.theme[lz]||o!==""?v:"".concat(v,"-").concat(l())}return"".concat(s).concat(n).concat(l())}}var e9=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},nl=(typeof window>"u"?"undefined":e9(window))==="object"&&(typeof document>"u"?"undefined":e9(document))==="object"&&document.nodeType===9;function t9(r,e){for(var t=0;t<e.length;t++){var i=e[t];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(r,rA(i.key),i)}}function hz(r,e,t){return e&&t9(r.prototype,e),t&&t9(r,t),Object.defineProperty(r,"prototype",{writable:!1}),r}function au(r,e){return au=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,n){return i.__proto__=n,i},au(r,e)}function dz(r,e){r.prototype=Object.create(e.prototype),r.prototype.constructor=r,au(r,e)}function r9(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function uz(r,e){if(r==null)return{};var t={},i=Object.keys(r),n,a;for(a=0;a<i.length;a++)n=i[a],!(e.indexOf(n)>=0)&&(t[n]=r[n]);return t}var oA={}.constructor;function ou(r){if(r==null||typeof r!="object")return r;if(Array.isArray(r))return r.map(ou);if(r.constructor!==oA)return r;var e={};for(var t in r)e[t]=ou(r[t]);return e}function _6(r,e,t){r===void 0&&(r="unnamed");var i=t.jss,n=ou(e),a=i.plugins.onCreateRule(r,n,t);return a||(r[0],null)}var i9=function(e,t){for(var i="",n=0;n<e.length&&e[n]!=="!important";n++)i&&(i+=t),i+=e[n];return i},xa=function(e){if(!Array.isArray(e))return e;var t="";if(Array.isArray(e[0]))for(var i=0;i<e.length&&e[i]!=="!important";i++)t&&(t+=", "),t+=i9(e[i]," ");else t=i9(e,", ");return e[e.length-1]==="!important"&&(t+=" !important"),t};function Ro(r){return r&&r.format===!1?{linebreak:"",space:""}:{linebreak:`
74
74
  `,space:" "}}function is(r,e){for(var t="",i=0;i<e;i++)t+=" ";return t+r}function Sc(r,e,t){t===void 0&&(t={});var i="";if(!e)return i;var n=t,a=n.indent,o=a===void 0?0:a,s=e.fallbacks;t.format===!1&&(o=-1/0);var c=Ro(t),l=c.linebreak,h=c.space;if(r&&o++,s)if(Array.isArray(s))for(var d=0;d<s.length;d++){var u=s[d];for(var v in u){var m=u[v];m!=null&&(i&&(i+=l),i+=is(v+":"+h+xa(m)+";",o))}}else for(var f in s){var C=s[f];C!=null&&(i&&(i+=l),i+=is(f+":"+h+xa(C)+";",o))}for(var _ in e){var p=e[_];p!=null&&_!=="fallbacks"&&(i&&(i+=l),i+=is(_+":"+h+xa(p)+";",o))}return!i&&!t.allowEmpty||!r?i:(o--,i&&(i=""+l+i+l),is(""+r+h+"{"+i,o)+is("}",o))}var sA=/([[\].#*$><+~=|^:(),"'`\s])/g,n9=typeof CSS<"u"&&CSS.escape,z6=function(r){return n9?n9(r):r.replace(sA,"\\$1")},vz=function(){function r(t,i,n){this.type="style",this.isProcessed=!1;var a=n.sheet,o=n.Renderer;this.key=t,this.options=n,this.style=i,a?this.renderer=a.renderer:o&&(this.renderer=new o)}var e=r.prototype;return e.prop=function(i,n,a){if(n===void 0)return this.style[i];var o=a?a.force:!1;if(!o&&this.style[i]===n)return this;var s=n;(!a||a.process!==!1)&&(s=this.options.jss.plugins.onChangeValue(n,i,this));var c=s==null||s===!1,l=i in this.style;if(c&&!l&&!o)return this;var h=c&&l;if(h?delete this.style[i]:this.style[i]=s,this.renderable&&this.renderer)return h?this.renderer.removeProperty(this.renderable,i):this.renderer.setProperty(this.renderable,i,s),this;var d=this.options.sheet;return d&&d.attached,this},r}(),su=function(r){dz(e,r);function e(i,n,a){var o;o=r.call(this,i,n,a)||this;var s=a.selector,c=a.scoped,l=a.sheet,h=a.generateId;return s?o.selectorText=s:c!==!1&&(o.id=h(r9(r9(o)),l),o.selectorText="."+z6(o.id)),o}var t=e.prototype;return t.applyTo=function(n){var a=this.renderer;if(a){var o=this.toJSON();for(var s in o)a.setProperty(n,s,o[s])}return this},t.toJSON=function(){var n={};for(var a in this.style){var o=this.style[a];typeof o!="object"?n[a]=o:Array.isArray(o)&&(n[a]=xa(o))}return n},t.toString=function(n){var a=this.options.sheet,o=a?a.options.link:!1,s=o?Re({},n,{allowEmpty:!0}):n;return Sc(this.selectorText,this.style,s)},hz(e,[{key:"selector",set:function(n){if(n!==this.selectorText){this.selectorText=n;var a=this.renderer,o=this.renderable;if(!(!o||!a)){var s=a.setSelector(o,n);s||a.replaceRule(o,this)}}},get:function(){return this.selectorText}}]),e}(vz),cA={onCreateRule:function(e,t,i){return e[0]==="@"||i.parent&&i.parent.type==="keyframes"?null:new su(e,t,i)}},Fd={indent:1,children:!0},lA=/@([\w-]+)/,hA=function(){function r(t,i,n){this.type="conditional",this.isProcessed=!1,this.key=t;var a=t.match(lA);this.at=a?a[1]:"unknown",this.query=n.name||"@"+this.at,this.options=n,this.rules=new C4(Re({},n,{parent:this}));for(var o in i)this.rules.add(o,i[o]);this.rules.process()}var e=r.prototype;return e.getRule=function(i){return this.rules.get(i)},e.indexOf=function(i){return this.rules.indexOf(i)},e.addRule=function(i,n,a){var o=this.rules.add(i,n,a);return o?(this.options.jss.plugins.onProcessRule(o),o):null},e.replaceRule=function(i,n,a){var o=this.rules.replace(i,n,a);return o&&this.options.jss.plugins.onProcessRule(o),o},e.toString=function(i){i===void 0&&(i=Fd);var n=Ro(i),a=n.linebreak;if(i.indent==null&&(i.indent=Fd.indent),i.children==null&&(i.children=Fd.children),i.children===!1)return this.query+" {}";var o=this.rules.toString(i);return o?this.query+" {"+a+o+a+"}":""},r}(),dA=/@media|@supports\s+/,uA={onCreateRule:function(e,t,i){return dA.test(e)?new hA(e,t,i):null}},Bd={indent:1,children:!0},vA=/@keyframes\s+([\w-]+)/,cu=function(){function r(t,i,n){this.type="keyframes",this.at="@keyframes",this.isProcessed=!1;var a=t.match(vA);a&&a[1]?this.name=a[1]:this.name="noname",this.key=this.type+"-"+this.name,this.options=n;var o=n.scoped,s=n.sheet,c=n.generateId;this.id=o===!1?this.name:z6(c(this,s)),this.rules=new C4(Re({},n,{parent:this}));for(var l in i)this.rules.add(l,i[l],Re({},n,{parent:this}));this.rules.process()}var e=r.prototype;return e.toString=function(i){i===void 0&&(i=Bd);var n=Ro(i),a=n.linebreak;if(i.indent==null&&(i.indent=Bd.indent),i.children==null&&(i.children=Bd.children),i.children===!1)return this.at+" "+this.id+" {}";var o=this.rules.toString(i);return o&&(o=""+a+o+a),this.at+" "+this.id+" {"+o+"}"},r}(),mA=/@keyframes\s+/,fA=/\$([\w-]+)/g,lu=function(e,t){return typeof e=="string"?e.replace(fA,function(i,n){return n in t?t[n]:i}):e},a9=function(e,t,i){var n=e[t],a=lu(n,i);a!==n&&(e[t]=a)},pA={onCreateRule:function(e,t,i){return typeof e=="string"&&mA.test(e)?new cu(e,t,i):null},onProcessStyle:function(e,t,i){return t.type!=="style"||!i||("animation-name"in e&&a9(e,"animation-name",i.keyframes),"animation"in e&&a9(e,"animation",i.keyframes)),e},onChangeValue:function(e,t,i){var n=i.options.sheet;if(!n)return e;switch(t){case"animation":return lu(e,n.keyframes);case"animation-name":return lu(e,n.keyframes);default:return e}}},gA=function(r){dz(e,r);function e(){return r.apply(this,arguments)||this}var t=e.prototype;return t.toString=function(n){var a=this.options.sheet,o=a?a.options.link:!1,s=o?Re({},n,{allowEmpty:!0}):n;return Sc(this.key,this.style,s)},e}(vz),_A={onCreateRule:function(e,t,i){return i.parent&&i.parent.type==="keyframes"?new gA(e,t,i):null}},zA=function(){function r(t,i,n){this.type="font-face",this.at="@font-face",this.isProcessed=!1,this.key=t,this.style=i,this.options=n}var e=r.prototype;return e.toString=function(i){var n=Ro(i),a=n.linebreak;if(Array.isArray(this.style)){for(var o="",s=0;s<this.style.length;s++)o+=Sc(this.at,this.style[s]),this.style[s+1]&&(o+=a);return o}return Sc(this.at,this.style,i)},r}(),yA=/@font-face/,wA={onCreateRule:function(e,t,i){return yA.test(e)?new zA(e,t,i):null}},bA=function(){function r(t,i,n){this.type="viewport",this.at="@viewport",this.isProcessed=!1,this.key=t,this.style=i,this.options=n}var e=r.prototype;return e.toString=function(i){return Sc(this.key,this.style,i)},r}(),xA={onCreateRule:function(e,t,i){return e==="@viewport"||e==="@-ms-viewport"?new bA(e,t,i):null}},MA=function(){function r(t,i,n){this.type="simple",this.isProcessed=!1,this.key=t,this.value=i,this.options=n}var e=r.prototype;return e.toString=function(i){if(Array.isArray(this.value)){for(var n="",a=0;a<this.value.length;a++)n+=this.key+" "+this.value[a]+";",this.value[a+1]&&(n+=`
75
75
  `);return n}return this.key+" "+this.value+";"},r}(),CA={"@charset":!0,"@import":!0,"@namespace":!0},HA={onCreateRule:function(e,t,i){return e in CA?new MA(e,t,i):null}},o9=[cA,uA,pA,_A,wA,xA,HA],kA={process:!0},s9={force:!0,process:!0},C4=function(){function r(t){this.map={},this.raw={},this.index=[],this.counter=0,this.options=t,this.classes=t.classes,this.keyframes=t.keyframes}var e=r.prototype;return e.add=function(i,n,a){var o=this.options,s=o.parent,c=o.sheet,l=o.jss,h=o.Renderer,d=o.generateId,u=o.scoped,v=Re({classes:this.classes,parent:s,sheet:c,jss:l,Renderer:h,generateId:d,scoped:u,name:i,keyframes:this.keyframes,selector:void 0},a),m=i;i in this.raw&&(m=i+"-d"+this.counter++),this.raw[m]=n,m in this.classes&&(v.selector="."+z6(this.classes[m]));var f=_6(m,n,v);if(!f)return null;this.register(f);var C=v.index===void 0?this.index.length:v.index;return this.index.splice(C,0,f),f},e.replace=function(i,n,a){var o=this.get(i),s=this.index.indexOf(o);o&&this.remove(o);var c=a;return s!==-1&&(c=Re({},a,{index:s})),this.add(i,n,c)},e.get=function(i){return this.map[i]},e.remove=function(i){this.unregister(i),delete this.raw[i.key],this.index.splice(this.index.indexOf(i),1)},e.indexOf=function(i){return this.index.indexOf(i)},e.process=function(){var i=this.options.jss.plugins;this.index.slice(0).forEach(i.onProcessRule,i)},e.register=function(i){this.map[i.key]=i,i instanceof su?(this.map[i.selector]=i,i.id&&(this.classes[i.key]=i.id)):i instanceof cu&&this.keyframes&&(this.keyframes[i.name]=i.id)},e.unregister=function(i){delete this.map[i.key],i instanceof su?(delete this.map[i.selector],delete this.classes[i.key]):i instanceof cu&&delete this.keyframes[i.name]},e.update=function(){var i,n,a;if(typeof(arguments.length<=0?void 0:arguments[0])=="string"?(i=arguments.length<=0?void 0:arguments[0],n=arguments.length<=1?void 0:arguments[1],a=arguments.length<=2?void 0:arguments[2]):(n=arguments.length<=0?void 0:arguments[0],a=arguments.length<=1?void 0:arguments[1],i=null),i)this.updateOne(this.get(i),n,a);else for(var o=0;o<this.index.length;o++)this.updateOne(this.index[o],n,a)},e.updateOne=function(i,n,a){a===void 0&&(a=kA);var o=this.options,s=o.jss.plugins,c=o.sheet;if(i.rules instanceof r){i.rules.update(n,a);return}var l=i.style;if(s.onUpdate(n,i,c,a),a.process&&l&&l!==i.style){s.onProcessStyle(i.style,i,c);for(var h in i.style){var d=i.style[h],u=l[h];d!==u&&i.prop(h,d,s9)}for(var v in l){var m=i.style[v],f=l[v];m==null&&m!==f&&i.prop(v,null,s9)}}},e.toString=function(i){for(var n="",a=this.options.sheet,o=a?a.options.link:!1,s=Ro(i),c=s.linebreak,l=0;l<this.index.length;l++){var h=this.index[l],d=h.toString(i);!d&&!o||(n&&(n+=c),n+=d)}return n},r}(),mz=function(){function r(t,i){this.attached=!1,this.deployed=!1,this.classes={},this.keyframes={},this.options=Re({},i,{sheet:this,parent:this,classes:this.classes,keyframes:this.keyframes}),i.Renderer&&(this.renderer=new i.Renderer(this)),this.rules=new C4(this.options);for(var n in t)this.rules.add(n,t[n]);this.rules.process()}var e=r.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(i,n,a){var o=this.queue;this.attached&&!o&&(this.queue=[]);var s=this.rules.add(i,n,a);return s?(this.options.jss.plugins.onProcessRule(s),this.attached?(this.deployed&&(o?o.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(i,n,a){var o=this.rules.get(i);if(!o)return this.addRule(i,n,a);var s=this.rules.replace(i,n,a);return s&&this.options.jss.plugins.onProcessRule(s),this.attached?(this.deployed&&this.renderer&&(s?o.renderable&&this.renderer.replaceRule(o.renderable,s):this.renderer.deleteRule(o)),s):(this.deployed=!1,s)},e.insertRule=function(i){this.renderer&&this.renderer.insertRule(i)},e.addRules=function(i,n){var a=[];for(var o in i){var s=this.addRule(o,i[o],n);s&&a.push(s)}return a},e.getRule=function(i){return this.rules.get(i)},e.deleteRule=function(i){var n=typeof i=="object"?i:this.rules.get(i);return!n||this.attached&&!n.renderable?!1:(this.rules.remove(n),this.attached&&n.renderable&&this.renderer?this.renderer.deleteRule(n.renderable):!0)},e.indexOf=function(i){return this.rules.indexOf(i)},e.deploy=function(){return this.renderer&&this.renderer.deploy(),this.deployed=!0,this},e.update=function(){var i;return(i=this.rules).update.apply(i,arguments),this},e.updateOne=function(i,n,a){return this.rules.updateOne(i,n,a),this},e.toString=function(i){return this.rules.toString(i)},r}(),EA=function(){function r(){this.plugins={internal:[],external:[]},this.registry={}}var e=r.prototype;return e.onCreateRule=function(i,n,a){for(var o=0;o<this.registry.onCreateRule.length;o++){var s=this.registry.onCreateRule[o](i,n,a);if(s)return s}return null},e.onProcessRule=function(i){if(!i.isProcessed){for(var n=i.options.sheet,a=0;a<this.registry.onProcessRule.length;a++)this.registry.onProcessRule[a](i,n);i.style&&this.onProcessStyle(i.style,i,n),i.isProcessed=!0}},e.onProcessStyle=function(i,n,a){for(var o=0;o<this.registry.onProcessStyle.length;o++)n.style=this.registry.onProcessStyle[o](n.style,n,a)},e.onProcessSheet=function(i){for(var n=0;n<this.registry.onProcessSheet.length;n++)this.registry.onProcessSheet[n](i)},e.onUpdate=function(i,n,a,o){for(var s=0;s<this.registry.onUpdate.length;s++)this.registry.onUpdate[s](i,n,a,o)},e.onChangeValue=function(i,n,a){for(var o=i,s=0;s<this.registry.onChangeValue.length;s++)o=this.registry.onChangeValue[s](o,n,a);return o},e.use=function(i,n){n===void 0&&(n={queue:"external"});var a=this.plugins[n.queue];a.indexOf(i)===-1&&(a.push(i),this.registry=[].concat(this.plugins.external,this.plugins.internal).reduce(function(o,s){for(var c in s)c in o&&o[c].push(s[c]);return o},{onCreateRule:[],onProcessRule:[],onProcessStyle:[],onProcessSheet:[],onChangeValue:[],onUpdate:[]}))},r}(),PA=function(){function r(){this.registry=[]}var e=r.prototype;return e.add=function(i){var n=this.registry,a=i.options.index;if(n.indexOf(i)===-1){if(n.length===0||a>=this.index){n.push(i);return}for(var o=0;o<n.length;o++)if(n[o].options.index>a){n.splice(o,0,i);return}}},e.reset=function(){this.registry=[]},e.remove=function(i){var n=this.registry.indexOf(i);this.registry.splice(n,1)},e.toString=function(i){for(var n=i===void 0?{}:i,a=n.attached,o=uz(n,["attached"]),s=Ro(o),c=s.linebreak,l="",h=0;h<this.registry.length;h++){var d=this.registry[h];a!=null&&d.attached!==a||(l&&(l+=c),l+=d.toString(o))}return l},hz(r,[{key:"index",get:function(){return this.registry.length===0?0:this.registry[this.registry.length-1].options.index}}]),r}(),Qs=new PA,hu=typeof globalThis<"u"?globalThis:typeof window<"u"&&window.Math===Math?window:typeof self<"u"&&self.Math===Math?self:Function("return this")(),du="2f1acc6c3a606b082e5eef5e54414ffb";hu[du]==null&&(hu[du]=0);var c9=hu[du]++,l9=function(e){e===void 0&&(e={});var t=0,i=function(a,o){t+=1;var s="",c="";return o&&(o.options.classNamePrefix&&(c=o.options.classNamePrefix),o.options.jss.id!=null&&(s=String(o.options.jss.id))),e.minify?""+(c||"c")+c9+s+t:c+a.key+"-"+c9+(s?"-"+s:"")+"-"+t};return i},fz=function(e){var t;return function(){return t||(t=e()),t}},AA=function(e,t){try{return e.attributeStyleMap?e.attributeStyleMap.get(t):e.style.getPropertyValue(t)}catch{return""}},VA=function(e,t,i){try{var n=i;if(Array.isArray(i)&&(n=xa(i)),e.attributeStyleMap)e.attributeStyleMap.set(t,n);else{var a=n?n.indexOf("!important"):-1,o=a>-1?n.substr(0,a-1):n;e.style.setProperty(t,o,a>-1?"important":"")}}catch{return!1}return!0},SA=function(e,t){try{e.attributeStyleMap?e.attributeStyleMap.delete(t):e.style.removeProperty(t)}catch{}},$A=function(e,t){return e.selectorText=t,e.selectorText===t},pz=fz(function(){return document.querySelector("head")});function DA(r,e){for(var t=0;t<r.length;t++){var i=r[t];if(i.attached&&i.options.index>e.index&&i.options.insertionPoint===e.insertionPoint)return i}return null}function LA(r,e){for(var t=r.length-1;t>=0;t--){var i=r[t];if(i.attached&&i.options.insertionPoint===e.insertionPoint)return i}return null}function TA(r){for(var e=pz(),t=0;t<e.childNodes.length;t++){var i=e.childNodes[t];if(i.nodeType===8&&i.nodeValue.trim()===r)return i}return null}function IA(r){var e=Qs.registry;if(e.length>0){var t=DA(e,r);if(t&&t.renderer)return{parent:t.renderer.element.parentNode,node:t.renderer.element};if(t=LA(e,r),t&&t.renderer)return{parent:t.renderer.element.parentNode,node:t.renderer.element.nextSibling}}var i=r.insertionPoint;if(i&&typeof i=="string"){var n=TA(i);if(n)return{parent:n.parentNode,node:n.nextSibling}}return!1}function RA(r,e){var t=e.insertionPoint,i=IA(e);if(i!==!1&&i.parent){i.parent.insertBefore(r,i.node);return}if(t&&typeof t.nodeType=="number"){var n=t,a=n.parentNode;a&&a.insertBefore(r,n.nextSibling);return}pz().appendChild(r)}var OA=fz(function(){var r=document.querySelector('meta[property="csp-nonce"]');return r?r.getAttribute("content"):null}),h9=function(e,t,i){try{"insertRule"in e?e.insertRule(t,i):"appendRule"in e&&e.appendRule(t)}catch{return!1}return e.cssRules[i]},d9=function(e,t){var i=e.cssRules.length;return t===void 0||t>i?i:t},NA=function(){var e=document.createElement("style");return e.textContent=`
76
76
  `,e},UA=function(){function r(t){this.getPropertyValue=AA,this.setProperty=VA,this.removeProperty=SA,this.setSelector=$A,this.hasInsertedRules=!1,this.cssRules=[],t&&Qs.add(t),this.sheet=t;var i=this.sheet?this.sheet.options:{},n=i.media,a=i.meta,o=i.element;this.element=o||NA(),this.element.setAttribute("data-jss",""),n&&this.element.setAttribute("media",n),a&&this.element.setAttribute("data-meta",a);var s=OA();s&&this.element.setAttribute("nonce",s)}var e=r.prototype;return e.attach=function(){if(!(this.element.parentNode||!this.sheet)){RA(this.element,this.sheet.options);var i=!!(this.sheet&&this.sheet.deployed);this.hasInsertedRules&&i&&(this.hasInsertedRules=!1,this.deploy())}},e.detach=function(){if(this.sheet){var i=this.element.parentNode;i&&i.removeChild(this.element),this.sheet.options.link&&(this.cssRules=[],this.element.textContent=`