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AMrD,WAClBG,SAAUkD,EAAMlD,SAChBC,UAGJ,OACI+D,EAAAA,cAAC7D,EAAY8D,SAAQ,CAACC,MAAOH,GACxBpB,EAGb,CC/LoCwB,EAAAA,E","sources":["../node_modules/@azure/msal-react/src/MsalContext.ts","../node_modules/@azure/msal-react/src/utils/utilities.ts","../node_modules/@azure/msal-react/src/packageMetadata.ts","../node_modules/@azure/msal-react/src/MsalProvider.tsx","../node_modules/@azure/msal-react/src/error/ReactAuthError.ts"],"sourcesContent":["/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport * as React from \"react\";\nimport {\n IPublicClientApplication,\n stubbedPublicClientApplication,\n Logger,\n InteractionStatus,\n AccountInfo,\n} from \"@azure/msal-browser\";\n\nexport interface IMsalContext {\n instance: IPublicClientApplication;\n inProgress: InteractionStatus;\n accounts: AccountInfo[];\n logger: Logger;\n}\n\n/*\n * Stubbed context implementation\n * Only used when there is no provider, which is an unsupported scenario\n */\nconst defaultMsalContext: IMsalContext = {\n instance: stubbedPublicClientApplication,\n inProgress: InteractionStatus.None,\n accounts: [],\n logger: new Logger({}),\n};\n\nexport const MsalContext =\n React.createContext(defaultMsalContext);\nexport const MsalConsumer = MsalContext.Consumer;\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { AccountIdentifiers } from \"../types/AccountIdentifiers.js\";\nimport { AccountInfo } from \"@azure/msal-browser\";\n\ntype FaaCFunction = (args: T) => React.ReactNode;\n\nexport function getChildrenOrFunction(\n children: React.ReactNode | FaaCFunction,\n args: T\n): React.ReactNode {\n if (typeof children === \"function\") {\n return children(args);\n }\n return children;\n}\n\n/*\n * Utility types\n * Reference: https://github.com/piotrwitek/utility-types\n */\nexport type SetDifference = A extends B ? never : A;\nexport type SetComplement = SetDifference;\nexport type Subtract = Pick<\n T,\n SetComplement\n>;\n\n/**\n * Helper function to determine whether 2 arrays are equal\n * Used to avoid unnecessary state updates\n * @param arrayA\n * @param arrayB\n */\nexport function accountArraysAreEqual(\n arrayA: Array,\n arrayB: Array\n): boolean {\n if (arrayA.length !== arrayB.length) {\n return false;\n }\n\n const comparisonArray = [...arrayB];\n\n return arrayA.every((elementA) => {\n const elementB = comparisonArray.shift();\n if (!elementA || !elementB) {\n return false;\n }\n\n return (\n elementA.homeAccountId === elementB.homeAccountId &&\n elementA.localAccountId === elementB.localAccountId &&\n elementA.username === elementB.username\n );\n });\n}\n\nexport function getAccountByIdentifiers(\n allAccounts: AccountInfo[],\n accountIdentifiers: AccountIdentifiers\n): AccountInfo | null {\n if (\n allAccounts.length > 0 &&\n (accountIdentifiers.homeAccountId ||\n accountIdentifiers.localAccountId ||\n accountIdentifiers.username)\n ) {\n const matchedAccounts = allAccounts.filter((accountObj) => {\n if (\n accountIdentifiers.username &&\n accountIdentifiers.username.toLowerCase() !==\n accountObj.username.toLowerCase()\n ) {\n return false;\n }\n if (\n accountIdentifiers.homeAccountId &&\n accountIdentifiers.homeAccountId.toLowerCase() !==\n accountObj.homeAccountId.toLowerCase()\n ) {\n return false;\n }\n if (\n accountIdentifiers.localAccountId &&\n accountIdentifiers.localAccountId.toLowerCase() !==\n accountObj.localAccountId.toLowerCase()\n ) {\n return false;\n }\n\n return true;\n });\n\n return matchedAccounts[0] || null;\n } else {\n return null;\n }\n}\n","/* eslint-disable header/header */\nexport const name = \"@azure/msal-react\";\nexport const version = \"2.2.0\";\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport React, {\n useEffect,\n useReducer,\n PropsWithChildren,\n useMemo,\n} from \"react\";\nimport {\n IPublicClientApplication,\n EventMessage,\n EventMessageUtils,\n InteractionStatus,\n Logger,\n WrapperSKU,\n AccountInfo,\n} from \"@azure/msal-browser\";\nimport { MsalContext, IMsalContext } from \"./MsalContext.js\";\nimport { accountArraysAreEqual } from \"./utils/utilities.js\";\nimport { name as SKU, version } from \"./packageMetadata.js\";\n\nexport type MsalProviderProps = PropsWithChildren<{\n instance: IPublicClientApplication;\n}>;\n\ntype MsalState = {\n inProgress: InteractionStatus;\n accounts: AccountInfo[];\n};\n\nconst MsalProviderActionType = {\n UNBLOCK_INPROGRESS: \"UNBLOCK_INPROGRESS\",\n EVENT: \"EVENT\",\n} as const;\ntype MsalProviderActionType =\n (typeof MsalProviderActionType)[keyof typeof MsalProviderActionType];\n\ntype MsalProviderReducerAction = {\n type: MsalProviderActionType;\n payload: {\n logger: Logger;\n instance: IPublicClientApplication;\n message?: EventMessage;\n };\n};\n\n/**\n * Returns the next inProgress and accounts state based on event message\n * @param previousState\n * @param action\n */\nconst reducer = (\n previousState: MsalState,\n action: MsalProviderReducerAction\n): MsalState => {\n const { type, payload } = action;\n let newInProgress = previousState.inProgress;\n\n switch (type) {\n case MsalProviderActionType.UNBLOCK_INPROGRESS:\n if (previousState.inProgress === InteractionStatus.Startup) {\n newInProgress = InteractionStatus.None;\n payload.logger.info(\n \"MsalProvider - handleRedirectPromise resolved, setting inProgress to 'none'\"\n );\n }\n break;\n case MsalProviderActionType.EVENT:\n const message = payload.message as EventMessage;\n const status = EventMessageUtils.getInteractionStatusFromEvent(\n message,\n previousState.inProgress\n );\n if (status) {\n payload.logger.info(\n `MsalProvider - ${message.eventType} results in setting inProgress from ${previousState.inProgress} to ${status}`\n );\n newInProgress = status;\n }\n break;\n default:\n throw new Error(`Unknown action type: ${type}`);\n }\n\n const currentAccounts = payload.instance.getAllAccounts();\n if (\n newInProgress !== previousState.inProgress &&\n !accountArraysAreEqual(currentAccounts, previousState.accounts)\n ) {\n // Both inProgress and accounts changed\n return {\n ...previousState,\n inProgress: newInProgress,\n accounts: currentAccounts,\n };\n } else if (newInProgress !== previousState.inProgress) {\n // Only only inProgress changed\n return {\n ...previousState,\n inProgress: newInProgress,\n };\n } else if (\n !accountArraysAreEqual(currentAccounts, previousState.accounts)\n ) {\n // Only accounts changed\n return {\n ...previousState,\n accounts: currentAccounts,\n };\n } else {\n // Nothing changed\n return previousState;\n }\n};\n\n/**\n * MSAL context provider component. This must be rendered above any other components that use MSAL.\n */\nexport function MsalProvider({\n instance,\n children,\n}: MsalProviderProps): React.ReactElement {\n useEffect(() => {\n instance.initializeWrapperLibrary(WrapperSKU.React, version);\n }, [instance]);\n // Create a logger instance for msal-react with the same options as PublicClientApplication\n const logger = useMemo(() => {\n return instance.getLogger().clone(SKU, version);\n }, [instance]);\n\n const [state, updateState] = useReducer(reducer, undefined, () => {\n // Lazy initialization of the initial state\n return {\n inProgress: InteractionStatus.Startup,\n accounts: instance.getAllAccounts(),\n };\n });\n\n useEffect(() => {\n const callbackId = instance.addEventCallback(\n (message: EventMessage) => {\n updateState({\n payload: {\n instance,\n logger,\n message,\n },\n type: MsalProviderActionType.EVENT,\n });\n }\n );\n logger.verbose(\n `MsalProvider - Registered event callback with id: ${callbackId}`\n );\n\n instance\n .initialize()\n .then(() => {\n instance\n .handleRedirectPromise()\n .catch(() => {\n // Errors should be handled by listening to the LOGIN_FAILURE event\n return;\n })\n .finally(() => {\n /*\n * If handleRedirectPromise returns a cached promise the necessary events may not be fired\n * This is a fallback to prevent inProgress from getting stuck in 'startup'\n */\n updateState({\n payload: {\n instance,\n logger,\n },\n type: MsalProviderActionType.UNBLOCK_INPROGRESS,\n });\n });\n })\n .catch(() => {\n // Errors should be handled by listening to the LOGIN_FAILURE event\n return;\n });\n\n return () => {\n // Remove callback when component unmounts or accounts change\n if (callbackId) {\n logger.verbose(\n `MsalProvider - Removing event callback ${callbackId}`\n );\n instance.removeEventCallback(callbackId);\n }\n };\n }, [instance, logger]);\n\n const contextValue: IMsalContext = {\n instance,\n inProgress: state.inProgress,\n accounts: state.accounts,\n logger,\n };\n\n return (\n \n {children}\n \n );\n}\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { AuthError } from \"@azure/msal-browser\";\n\nexport const ReactAuthErrorMessage = {\n invalidInteractionType: {\n code: \"invalid_interaction_type\",\n desc: \"The provided interaction type is invalid.\",\n },\n unableToFallbackToInteraction: {\n code: \"unable_to_fallback_to_interaction\",\n desc: \"Interaction is required but another interaction is already in progress. Please try again when the current interaction is complete.\",\n },\n};\n\nexport class ReactAuthError extends AuthError {\n constructor(errorCode: string, errorMessage?: string) {\n super(errorCode, errorMessage);\n\n Object.setPrototypeOf(this, ReactAuthError.prototype);\n this.name = \"ReactAuthError\";\n }\n\n static createInvalidInteractionTypeError(): ReactAuthError {\n return new ReactAuthError(\n ReactAuthErrorMessage.invalidInteractionType.code,\n ReactAuthErrorMessage.invalidInteractionType.desc\n );\n }\n\n static createUnableToFallbackToInteractionError(): ReactAuthError {\n return new ReactAuthError(\n ReactAuthErrorMessage.unableToFallbackToInteraction.code,\n ReactAuthErrorMessage.unableToFallbackToInteraction.desc\n );\n }\n}\n"],"names":["defaultMsalContext","instance","stubbedPublicClientApplication","inProgress","InteractionStatus","None","accounts","logger","Logger","MsalContext","React","Consumer","accountArraysAreEqual","arrayA","arrayB","length","comparisonArray","every","elementA","elementB","shift","homeAccountId","localAccountId","username","name","version","MsalProviderActionType","UNBLOCK_INPROGRESS","EVENT","reducer","previousState","action","type","payload","newInProgress","Startup","info","message","status","EventMessageUtils","getInteractionStatusFromEvent","concat","eventType","Error","currentAccounts","getAllAccounts","_objectSpread","MsalProvider","_ref","children","useEffect","initializeWrapperLibrary","WrapperSKU","useMemo","getLogger","clone","state","updateState","useReducer","undefined","callbackId","addEventCallback","verbose","initialize","then","handleRedirectPromise","catch","finally","removeEventCallback","contextValue","React__default","Provider","value","AuthError"],"sourceRoot":""}