@ngxs/store 20.1.0-dev.master-9256584 → 20.1.0-dev.master-49efc08
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/fesm2022/ngxs-store.mjs
CHANGED
|
@@ -2233,7 +2233,10 @@ function createPickSelector(selector, keys) {
|
|
|
2233
2233
|
ensureValidSelector(selector, { prefix: '[createPickSelector]' });
|
|
2234
2234
|
}
|
|
2235
2235
|
const validKeys = keys.filter(Boolean);
|
|
2236
|
-
const selectors = validKeys.map(key =>
|
|
2236
|
+
const selectors = validKeys.map(key =>
|
|
2237
|
+
// Optional chaining is used because the state being selected may not be
|
|
2238
|
+
// registered yet — for example, if the selector is called before `provideStates()`.
|
|
2239
|
+
createSelector([selector], (state) => state?.[key]));
|
|
2237
2240
|
return createSelector([...selectors], (...props) => {
|
|
2238
2241
|
return validKeys.reduce((acc, key, index) => {
|
|
2239
2242
|
acc[key] = props[index];
|
|
@@ -2253,7 +2256,10 @@ function createPropertySelectors(parentSelector) {
|
|
|
2253
2256
|
return new Proxy({}, {
|
|
2254
2257
|
get(_target, prop) {
|
|
2255
2258
|
const selector = cache[prop] ||
|
|
2256
|
-
createSelector([parentSelector],
|
|
2259
|
+
createSelector([parentSelector],
|
|
2260
|
+
// Optional chaining is used because the state being selected may not be
|
|
2261
|
+
// registered yet — for example, if the selector is called before `provideStates()`.
|
|
2262
|
+
(state) => state?.[prop]);
|
|
2257
2263
|
cache[prop] = selector;
|
|
2258
2264
|
return selector;
|
|
2259
2265
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngxs-store.mjs","sources":["../../../packages/store/src/plugin-manager.ts","../../../packages/store/src/operators/leave-ngxs.ts","../../../packages/store/src/internal/unhandled-rxjs-error-callback.ts","../../../packages/store/src/internal/fallback-subscriber.ts","../../../packages/store/src/internal/action-results.ts","../../../packages/store/src/execution/execution-strategy.ts","../../../packages/store/src/actions-stream.ts","../../../packages/store/src/internal/dispatcher.ts","../../../packages/store/src/symbols.ts","../../../packages/store/src/utils/freeze.ts","../../../packages/store/src/internal/state-operations.ts","../../../packages/store/src/selectors/selector-utils.ts","../../../packages/store/src/internal/internals.ts","../../../packages/store/src/configs/messages.config.ts","../../../packages/store/src/utils/store-validators.ts","../../../packages/store/src/ivy/ivy-enabled-in-dev-mode.ts","../../../packages/store/src/dev-features/symbols.ts","../../../packages/store/src/dev-features/ngxs-unhandled-actions-logger.ts","../../../packages/store/src/ngxs-unhandled-error-handler.ts","../../../packages/store/src/operators/of-action.ts","../../../packages/store/src/internal/state-operators.ts","../../../packages/store/src/internal/state-context-factory.ts","../../../packages/store/src/internal/action-handler-factory.ts","../../../packages/store/src/internal/state-factory.ts","../../../packages/store/src/store.ts","../../../packages/store/src/standalone-features/preboot.ts","../../../packages/store/src/standalone-features/root-guard.ts","../../../packages/store/src/decorators/select/select-factory.ts","../../../packages/store/src/internal/lifecycle-state-manager.ts","../../../packages/store/src/standalone-features/initializers.ts","../../../packages/store/src/modules/ngxs-root.module.ts","../../../packages/store/src/modules/ngxs-feature.module.ts","../../../packages/store/src/standalone-features/root-providers.ts","../../../packages/store/src/standalone-features/feature-providers.ts","../../../packages/store/src/module.ts","../../../packages/store/src/decorators/action.ts","../../../packages/store/src/decorators/state.ts","../../../packages/store/src/decorators/select/symbols.ts","../../../packages/store/src/decorators/select/select.ts","../../../packages/store/src/selectors/selector-metadata.ts","../../../packages/store/src/decorators/selector-options.ts","../../../packages/store/src/selectors/create-selector.ts","../../../packages/store/src/decorators/selector/selector.ts","../../../packages/store/src/actions/action-director.ts","../../../packages/store/src/dev-features/ngxs-development.module.ts","../../../packages/store/src/execution/noop-execution-strategy.ts","../../../packages/store/src/selectors/selector-checks.util.ts","../../../packages/store/src/selectors/create-model-selector.ts","../../../packages/store/src/selectors/create-pick-selector.ts","../../../packages/store/src/selectors/create-property-selectors.ts","../../../packages/store/src/pending-tasks.ts","../../../packages/store/src/standalone-features/provide-store.ts","../../../packages/store/src/standalone-features/provide-states.ts","../../../packages/store/src/standalone-features/plugin.ts","../../../packages/store/src/utils/select.ts","../../../packages/store/src/utils/dispatch.ts","../../../packages/store/src/utils/create-select-map.ts","../../../packages/store/src/utils/create-dispatch-map.ts","../../../packages/store/src/utils/lazy-provider.ts","../../../packages/store/src/internal/provide-internal-tokens.ts","../../../packages/store/index.ts","../../../packages/store/ngxs-store.ts"],"sourcesContent":["import { inject, Injectable } from '@angular/core';\nimport { NGXS_PLUGINS, NgxsPlugin, NgxsPluginFn } from '@ngxs/store/plugins';\n\n@Injectable({ providedIn: 'root' })\nexport class PluginManager {\n readonly plugins: NgxsPluginFn[] = [];\n\n private readonly _parentManager = inject(PluginManager, {\n optional: true,\n skipSelf: true\n });\n\n private readonly _pluginHandlers = inject<NgxsPlugin[]>(NGXS_PLUGINS, {\n optional: true\n });\n\n constructor() {\n this.registerHandlers();\n }\n\n private get _rootPlugins(): NgxsPluginFn[] {\n return this._parentManager?.plugins || this.plugins;\n }\n\n private registerHandlers(): void {\n const pluginHandlers: NgxsPluginFn[] = this.getPluginHandlers();\n this._rootPlugins.push(...pluginHandlers);\n }\n\n private getPluginHandlers(): NgxsPluginFn[] {\n const handlers: NgxsPlugin[] = this._pluginHandlers || [];\n return handlers.map(\n (plugin: NgxsPlugin) =>\n (plugin.handle ? plugin.handle.bind(plugin) : plugin) as NgxsPluginFn\n );\n }\n}\n","import { Observable } from 'rxjs';\nimport { InternalNgxsExecutionStrategy } from '../execution/execution-strategy';\n\n/**\n * Returns operator that will run\n * `subscribe` outside of the ngxs execution context\n */\nexport function leaveNgxs<T>(ngxsExecutionStrategy: InternalNgxsExecutionStrategy) {\n return (source: Observable<T>) =>\n new Observable<T>(subscriber =>\n source.subscribe({\n next: value => ngxsExecutionStrategy.leave(() => subscriber.next(value)),\n error: error => ngxsExecutionStrategy.leave(() => subscriber.error(error)),\n complete: () => ngxsExecutionStrategy.leave(() => subscriber.complete())\n })\n );\n}\n","import { config } from 'rxjs';\n\nconst ɵɵunhandledRxjsErrorCallbacks = new WeakMap<object, VoidFunction>();\n\nlet installed = false;\nexport function installOnUnhandhedErrorHandler(): void {\n if (installed) {\n return;\n }\n\n const existingHandler = config.onUnhandledError;\n config.onUnhandledError = function (error: any) {\n const unhandledErrorCallback = ɵɵunhandledRxjsErrorCallbacks.get(error);\n if (unhandledErrorCallback) {\n unhandledErrorCallback();\n } else if (existingHandler) {\n existingHandler.call(this, error);\n } else {\n throw error;\n }\n };\n\n installed = true;\n}\n\nexport function executeUnhandledCallback(error: any) {\n const unhandledErrorCallback = ɵɵunhandledRxjsErrorCallbacks.get(error);\n if (unhandledErrorCallback) {\n unhandledErrorCallback();\n return true;\n }\n return false;\n}\n\nexport function assignUnhandledCallback(error: any, callback: VoidFunction) {\n // Since the error can be essentially anything, we must ensure that we only\n // handle objects, as weak maps do not allow any other key type besides objects.\n // The error can also be a string if thrown in the following manner: `throwError('My Error')`.\n if (error && typeof error === 'object') {\n let hasBeenCalled = false;\n ɵɵunhandledRxjsErrorCallbacks.set(error, () => {\n if (!hasBeenCalled) {\n hasBeenCalled = true;\n callback();\n }\n });\n }\n return error;\n}\n","import { NgZone } from '@angular/core';\nimport { Observable, type Subscription } from 'rxjs';\n\nimport { executeUnhandledCallback } from './unhandled-rxjs-error-callback';\n\nexport function fallbackSubscriber<T>(ngZone: NgZone) {\n return (source: Observable<T>) => {\n let subscription: Subscription | null = source.subscribe({\n error: error => {\n ngZone.runOutsideAngular(() => {\n // This is necessary to schedule a microtask to ensure that synchronous\n // errors are not reported before the real subscriber arrives. If an error\n // is thrown synchronously in any action, it will be reported to the error\n // handler regardless. Since RxJS reports unhandled errors asynchronously,\n // implementing a microtask ensures that we are also safe in this scenario.\n queueMicrotask(() => {\n if (subscription) {\n executeUnhandledCallback(error);\n }\n });\n });\n }\n });\n\n return new Observable<T>(subscriber => {\n // Now that there is a real subscriber, we can unsubscribe our pro-active subscription\n subscription?.unsubscribe();\n subscription = null;\n\n return source.subscribe(subscriber);\n });\n };\n}\n","import { DestroyRef, inject, Injectable } from '@angular/core';\nimport { Subject } from 'rxjs';\n\nimport type { ActionContext } from '../actions-stream';\n\n/**\n * Internal Action result stream that is emitted when an action is completed.\n * This is used as a method of returning the action result to the dispatcher\n * for the observable returned by the dispatch(...) call.\n * The dispatcher then asynchronously pushes the result from this stream onto the main action stream as a result.\n */\n@Injectable({ providedIn: 'root' })\nexport class InternalDispatchedActionResults extends Subject<ActionContext> {\n constructor() {\n super();\n // Complete the subject once the root injector is destroyed to ensure\n // there are no active subscribers that would receive events or perform\n // any actions after the application is destroyed.\n inject(DestroyRef).onDestroy(() => this.complete());\n }\n}\n","import { inject, Injectable, NgZone } from '@angular/core';\nimport { NgxsExecutionStrategy } from './symbols';\n\n@Injectable({ providedIn: 'root' })\nexport class InternalNgxsExecutionStrategy implements NgxsExecutionStrategy {\n private _ngZone = inject(NgZone);\n\n enter<T>(func: () => T): T {\n if (typeof ngServerMode !== 'undefined' && ngServerMode) {\n return this._runInsideAngular(func);\n }\n return this._runOutsideAngular(func);\n }\n\n leave<T>(func: () => T): T {\n return this._runInsideAngular(func);\n }\n\n private _runInsideAngular<T>(func: () => T): T {\n if (NgZone.isInAngularZone()) {\n return func();\n }\n return this._ngZone.run(func);\n }\n\n private _runOutsideAngular<T>(func: () => T): T {\n if (NgZone.isInAngularZone()) {\n return this._ngZone.runOutsideAngular(func);\n }\n return func();\n }\n}\n","import { DestroyRef, inject, Injectable } from '@angular/core';\nimport { ɵOrderedSubject } from '@ngxs/store/internals';\nimport { Observable, Subject } from 'rxjs';\n\nimport { leaveNgxs } from './operators/leave-ngxs';\nimport { InternalNgxsExecutionStrategy } from './execution/execution-strategy';\n\n/**\n * Status of a dispatched action\n */\nexport enum ActionStatus {\n Dispatched = 'DISPATCHED',\n Successful = 'SUCCESSFUL',\n Canceled = 'CANCELED',\n Errored = 'ERRORED'\n}\n\nexport interface ActionContext<T = any> {\n status: ActionStatus;\n action: T;\n error?: Error;\n}\n\n/**\n * Internal Action stream that is emitted anytime an action is dispatched.\n */\n@Injectable({ providedIn: 'root' })\nexport class InternalActions extends ɵOrderedSubject<ActionContext> {\n // This subject will be the first to know about the dispatched action, its purpose is for\n // any logic that must be executed before action handlers are invoked (i.e., cancelation).\n readonly dispatched$ = new Subject<ActionContext>();\n\n constructor() {\n super();\n\n this.subscribe(ctx => {\n if (ctx.status === ActionStatus.Dispatched) {\n this.dispatched$.next(ctx);\n }\n });\n\n const destroyRef = inject(DestroyRef);\n destroyRef.onDestroy(() => {\n // Complete the subject once the root injector is destroyed to ensure\n // there are no active subscribers that would receive events or perform\n // any actions after the application is destroyed.\n this.complete();\n this.dispatched$.complete();\n });\n }\n}\n\n/**\n * Action stream that is emitted anytime an action is dispatched.\n *\n * You can listen to this in services to react without stores.\n */\n@Injectable({ providedIn: 'root' })\nexport class Actions extends Observable<ActionContext> {\n constructor() {\n const internalActions$ = inject(InternalActions);\n const internalExecutionStrategy = inject(InternalNgxsExecutionStrategy);\n\n // The `InternalActions` subject emits outside of the Angular zone.\n // We have to re-enter the Angular zone for any incoming consumer.\n // The shared `Subject` reduces the number of change detections.\n // This would call leave only once for any stream emission across all active subscribers.\n const sharedInternalActions$ = new Subject<ActionContext>();\n\n internalActions$\n .pipe(leaveNgxs(internalExecutionStrategy))\n .subscribe(sharedInternalActions$);\n\n super(observer => {\n const childSubscription = sharedInternalActions$.subscribe({\n next: ctx => observer.next(ctx),\n error: error => observer.error(error),\n complete: () => observer.complete()\n });\n\n observer.add(childSubscription);\n });\n }\n}\n","import {\n DestroyRef,\n inject,\n Injectable,\n Injector,\n NgZone,\n runInInjectionContext\n} from '@angular/core';\nimport {\n EMPTY,\n forkJoin,\n Observable,\n filter,\n map,\n mergeMap,\n shareReplay,\n take,\n of\n} from 'rxjs';\n\nimport { getActionTypeFromInstance } from '@ngxs/store/plugins';\nimport { ɵPlainObject, ɵStateStream } from '@ngxs/store/internals';\n\nimport { PluginManager } from '../plugin-manager';\nimport { leaveNgxs } from '../operators/leave-ngxs';\nimport { fallbackSubscriber } from './fallback-subscriber';\nimport { InternalDispatchedActionResults } from './action-results';\nimport { ActionContext, ActionStatus, InternalActions } from '../actions-stream';\nimport { InternalNgxsExecutionStrategy } from '../execution/execution-strategy';\n\n@Injectable({ providedIn: 'root' })\nexport class InternalDispatcher {\n private _ngZone = inject(NgZone);\n private _actions = inject(InternalActions);\n private _actionResults = inject(InternalDispatchedActionResults);\n private _pluginManager = inject(PluginManager);\n private _stateStream = inject(ɵStateStream);\n private _ngxsExecutionStrategy = inject(InternalNgxsExecutionStrategy);\n private _injector = inject(Injector);\n private _destroyRef = inject(DestroyRef);\n\n /**\n * Dispatches event(s).\n */\n dispatch(actionOrActions: any | any[]): Observable<void> {\n const result = this._ngxsExecutionStrategy.enter(() =>\n this.dispatchByEvents(actionOrActions)\n );\n\n return result.pipe(\n fallbackSubscriber(this._ngZone),\n leaveNgxs(this._ngxsExecutionStrategy)\n );\n }\n\n private dispatchByEvents(actionOrActions: any | any[]): Observable<void> {\n if (Array.isArray(actionOrActions)) {\n if (actionOrActions.length === 0) return of(undefined);\n\n return forkJoin(actionOrActions.map(action => this.dispatchSingle(action))).pipe(\n map(() => undefined)\n );\n } else {\n return this.dispatchSingle(actionOrActions);\n }\n }\n\n private dispatchSingle(action: any): Observable<void> {\n if (typeof ngDevMode !== 'undefined' && ngDevMode) {\n const type: string | undefined = getActionTypeFromInstance(action);\n if (!type) {\n const error = new Error(\n `This action doesn't have a type property: ${action.constructor.name}`\n );\n return new Observable(subscriber => subscriber.error(error));\n }\n }\n\n const prevState = this._stateStream.getValue();\n const plugins = this._pluginManager.plugins;\n\n return compose(this._injector, this._destroyRef, [\n ...plugins,\n (nextState: any, nextAction: any) => {\n if (nextState !== prevState) {\n this._stateStream.next(nextState);\n }\n const actionResult$ = this.getActionResultStream(nextAction);\n actionResult$.subscribe(ctx => this._actions.next(ctx));\n this._actions.next({ action: nextAction, status: ActionStatus.Dispatched });\n return this.createDispatchObservable(actionResult$);\n }\n ])(prevState, action).pipe(shareReplay());\n }\n\n private getActionResultStream(action: any): Observable<ActionContext> {\n return this._actionResults.pipe(\n filter(\n (ctx: ActionContext) => ctx.action === action && ctx.status !== ActionStatus.Dispatched\n ),\n take(1),\n shareReplay()\n );\n }\n\n private createDispatchObservable(\n actionResult$: Observable<ActionContext>\n ): Observable<ɵPlainObject> {\n return actionResult$.pipe(\n mergeMap((ctx: ActionContext) => {\n switch (ctx.status) {\n case ActionStatus.Successful:\n // The `createDispatchObservable` function should return the\n // state, as its result is used by plugins.\n return of(this._stateStream.getValue());\n case ActionStatus.Errored:\n throw ctx.error;\n default:\n // Once dispatched or canceled, we complete it immediately because\n // `dispatch()` should emit (or error, or complete) as soon as it succeeds or fails.\n return EMPTY;\n }\n }),\n shareReplay()\n );\n }\n}\n\ntype StateFn = (...args: any[]) => Observable<void>;\n\n/**\n * Composes a array of functions from left to right. Example:\n *\n * compose([fn, final])(state, action);\n *\n * then the funcs have a signature like:\n *\n * function fn (state, action, next) {\n * console.log('here', state, action, next);\n * return next(state, action);\n * }\n *\n * function final (state, action) {\n * console.log('here', state, action);\n * return state;\n * }\n *\n * the last function should not call `next`.\n */\nconst compose =\n (injector: Injector, destroyRef: DestroyRef, fns: StateFn[]) =>\n (...args: any[]) => {\n const fn = fns.shift();\n\n if (destroyRef.destroyed || !fn) {\n // Injector was already destroyed → no-op\n return EMPTY;\n }\n\n return runInInjectionContext(injector, () =>\n fn(...args, (...nextArgs: any[]) => compose(injector, destroyRef, fns)(...nextArgs))\n );\n };\n","import { Injectable, InjectionToken, inject } from '@angular/core';\nimport type { Observable } from 'rxjs';\n\nimport { StateOperator } from '@ngxs/store/operators';\nimport { ɵSharedSelectorOptions, ɵStateClass } from '@ngxs/store/internals';\n\n// The injection token is used to resolve a list of states provided at\n// the root level through either `NgxsModule.forRoot` or `provideStore`.\nexport const ROOT_STATE_TOKEN = new InjectionToken<Array<ɵStateClass>>(\n typeof ngDevMode !== 'undefined' && ngDevMode ? 'ROOT_STATE_TOKEN' : ''\n);\n\n// The injection token is used to resolve a list of states provided at\n// the feature level through either `NgxsModule.forFeature` or `provideStates`.\n// The Array<Array> is used to overload the resolved value of the token because\n// it is a multi-provider token.\nexport const FEATURE_STATE_TOKEN = new InjectionToken<Array<Array<ɵStateClass>>>(\n typeof ngDevMode !== 'undefined' && ngDevMode ? 'FEATURE_STATE_TOKEN' : ''\n);\n\n// The injection token is used to resolve to options provided at the root\n// level through either `NgxsModule.forRoot` or `provideStore`.\nexport const NGXS_OPTIONS = new InjectionToken<NgxsModuleOptions>(\n typeof ngDevMode !== 'undefined' && ngDevMode ? 'NGXS_OPTIONS' : ''\n);\n\nexport type NgxsLifeCycle = Partial<NgxsOnChanges> &\n Partial<NgxsOnInit> &\n Partial<NgxsAfterBootstrap>;\n\n/**\n * The NGXS config settings.\n */\n@Injectable({\n providedIn: 'root',\n useFactory: (): NgxsConfig => {\n const defaultConfig = new NgxsConfig();\n const config = inject(NGXS_OPTIONS);\n return {\n ...defaultConfig,\n ...config,\n selectorOptions: {\n ...defaultConfig.selectorOptions,\n ...config.selectorOptions\n }\n };\n }\n})\nexport class NgxsConfig {\n /**\n * Run in development mode. This will add additional debugging features:\n * - Object.freeze on the state and actions to guarantee immutability\n * (default: false)\n *\n * Note: this property will be accounted only in development mode.\n * It makes sense to use it only during development to ensure there're no state mutations.\n * When building for production, the `Object.freeze` will be tree-shaken away.\n */\n developmentMode!: boolean;\n compatibility: {\n /**\n * Support a strict Content Security Policy.\n * This will circumvent some optimisations that violate a strict CSP through the use of `new Function(...)`.\n * (default: false)\n */\n strictContentSecurityPolicy: boolean;\n } = {\n strictContentSecurityPolicy: false\n };\n /**\n * Defining shared selector options\n */\n selectorOptions: ɵSharedSelectorOptions = {\n injectContainerState: false,\n suppressErrors: false\n };\n}\n\nexport type { StateOperator };\n\n/**\n * State context provided to the actions in the state.\n */\nexport interface StateContext<T> {\n /**\n * An AbortSignal tied to the current action's lifecycle.\n *\n * It gives you a handle to proactively cancel ongoing async work.\n * If you're using an observable, it will be unsubscribed automatically when cancellation occurs.\n * If you're using async/await, check `abortSignal.aborted` after `await` blocks to decide whether to continue.\n */\n abortSignal: AbortSignal;\n\n /**\n * Get the current state.\n */\n getState(): T;\n\n /**\n * Reset the state to a new value.\n */\n setState(val: T | StateOperator<T>): void;\n\n /**\n * Patch the existing state with the provided value.\n */\n patchState(val: Partial<T>): void;\n\n /**\n * Dispatch a new action and return the dispatched observable.\n */\n dispatch(actions: any | any[]): Observable<void>;\n}\n\n/**\n * Represents a basic change from a previous to a new value for a single state instance.\n * Passed as a value in a NgxsSimpleChanges object to the ngxsOnChanges hook.\n */\nexport class NgxsSimpleChange<T = any> {\n constructor(\n public readonly previousValue: T,\n public readonly currentValue: T,\n public readonly firstChange: boolean\n ) {}\n}\n\n/**\n * On init interface\n */\nexport interface NgxsOnInit {\n ngxsOnInit(ctx: StateContext<any>): void;\n}\n\n/**\n * On change interface\n */\nexport interface NgxsOnChanges {\n ngxsOnChanges(change: NgxsSimpleChange): void;\n}\n\n/**\n * After bootstrap interface\n */\nexport interface NgxsAfterBootstrap {\n ngxsAfterBootstrap(ctx: StateContext<any>): void;\n}\n\nexport type NgxsModuleOptions = Partial<NgxsConfig>;\n","import { ɵhasOwnProperty } from '@ngxs/store/internals';\n\n/**\n * Object freeze code\n * https://github.com/jsdf/deep-freeze\n */\nexport const deepFreeze = (o: any) => {\n Object.freeze(o);\n\n const oIsFunction = typeof o === 'function';\n\n Object.getOwnPropertyNames(o).forEach(function (prop) {\n if (\n ɵhasOwnProperty(o, prop) &&\n (oIsFunction ? prop !== 'caller' && prop !== 'callee' && prop !== 'arguments' : true) &&\n o[prop] !== null &&\n (typeof o[prop] === 'object' || typeof o[prop] === 'function') &&\n !Object.isFrozen(o[prop])\n ) {\n deepFreeze(o[prop]);\n }\n });\n\n return o;\n};\n","import { inject, Injectable } from '@angular/core';\nimport { ɵStateStream } from '@ngxs/store/internals';\n\nimport { StateOperations, StatesAndDefaults } from '../internal/internals';\nimport { InternalDispatcher } from '../internal/dispatcher';\nimport { NgxsConfig } from '../symbols';\nimport { deepFreeze } from '../utils/freeze';\n\n/**\n * @ignore\n */\n@Injectable({ providedIn: 'root' })\nexport class InternalStateOperations {\n private _stateStream = inject(ɵStateStream);\n private _dispatcher = inject(InternalDispatcher);\n private _config = inject(NgxsConfig);\n\n /**\n * Returns the root state operators.\n */\n getRootStateOperations(): StateOperations<any> {\n const rootStateOperations = {\n getState: () => this._stateStream.getValue(),\n setState: (newState: any) => this._stateStream.next(newState),\n dispatch: (actionOrActions: any | any[]) => this._dispatcher.dispatch(actionOrActions)\n };\n\n if (typeof ngDevMode !== 'undefined' && ngDevMode) {\n return this._config.developmentMode\n ? ensureStateAndActionsAreImmutable(rootStateOperations)\n : rootStateOperations;\n } else {\n return rootStateOperations;\n }\n }\n\n setStateToTheCurrentWithNew(results: StatesAndDefaults): void {\n const stateOperations: StateOperations<any> = this.getRootStateOperations();\n\n // Get our current stream\n const currentState = stateOperations.getState();\n // Set the state to the current + new\n stateOperations.setState({ ...currentState, ...results.defaults });\n }\n}\n\nfunction ensureStateAndActionsAreImmutable(root: StateOperations<any>): StateOperations<any> {\n return {\n getState: () => root.getState(),\n setState: value => {\n const frozenValue = deepFreeze(value);\n return root.setState(frozenValue);\n },\n dispatch: actions => {\n return root.dispatch(actions);\n }\n };\n}\n","import {\n ɵmemoize,\n ɵRuntimeSelectorContext,\n ɵSelectorFactory,\n ɵgetStoreMetadata,\n ɵgetSelectorMetadata,\n ɵSelectorMetaDataModel,\n ɵSharedSelectorOptions\n} from '@ngxs/store/internals';\n\nimport { CreationMetadata, RuntimeSelectorInfo } from './selector-models';\n\ndeclare const ngDevMode: boolean;\n\nexport function createRootSelectorFactory<T extends (...args: any[]) => any>(\n selectorMetaData: ɵSelectorMetaDataModel,\n selectors: any[] | undefined,\n memoizedSelectorFn: T\n): ɵSelectorFactory {\n return (context: ɵRuntimeSelectorContext) => {\n const { argumentSelectorFunctions, selectorOptions } = getRuntimeSelectorInfo(\n context,\n selectorMetaData,\n selectors\n );\n\n const { suppressErrors } = selectorOptions;\n\n return function selectFromRoot(rootState: any) {\n // Determine arguments from the app state using the selectors\n const results = argumentSelectorFunctions.map(argFn => argFn(rootState));\n\n // If the lambda attempts to access something in the state that doesn't exist,\n // it will throw a `TypeError`. Since this behavior is common, we simply return\n // `undefined` in such cases.\n try {\n return memoizedSelectorFn(...results);\n } catch (ex) {\n if (suppressErrors && ex instanceof TypeError) {\n return undefined;\n }\n\n // We're logging an error in this function because it may be used by `select`,\n // `selectSignal`, and `selectSnapshot`. Therefore, there's no need to catch\n // exceptions there to log errors.\n if (typeof ngDevMode !== 'undefined' && ngDevMode) {\n const message =\n 'The selector below has thrown an error upon invocation. ' +\n 'Please check for any unsafe property access that may result in null ' +\n 'or undefined values.';\n\n // Avoid concatenating the message with the original function, as this will\n // invoke `toString()` on the function. Instead, log it as the second argument.\n // This way, developers will be able to navigate to the actual code in the browser.\n console.error(message, selectorMetaData.originalFn);\n }\n\n throw ex;\n }\n };\n };\n}\n\nexport function createMemoizedSelectorFn<T extends (...args: any[]) => any>(\n originalFn: T,\n creationMetadata: Partial<CreationMetadata> | undefined\n) {\n const containerClass = creationMetadata?.containerClass;\n const wrappedFn = function wrappedSelectorFn() {\n // eslint-disable-next-line prefer-rest-params\n const returnValue = originalFn.apply(containerClass, <any>arguments);\n if (typeof returnValue === 'function') {\n const innerMemoizedFn = ɵmemoize.apply(null, [returnValue]);\n return innerMemoizedFn;\n }\n return returnValue;\n } as T;\n const memoizedFn = ɵmemoize(wrappedFn);\n Object.setPrototypeOf(memoizedFn, originalFn);\n return memoizedFn;\n}\n\nfunction getRuntimeSelectorInfo(\n context: ɵRuntimeSelectorContext,\n selectorMetaData: ɵSelectorMetaDataModel,\n selectors: any[] | undefined = []\n): RuntimeSelectorInfo {\n const localSelectorOptions = selectorMetaData.getSelectorOptions();\n const selectorOptions = context.getSelectorOptions(localSelectorOptions);\n const selectorsToApply = getSelectorsToApply(\n selectors,\n selectorOptions,\n selectorMetaData.containerClass\n );\n\n const argumentSelectorFunctions = selectorsToApply.map(selector => {\n const factory = getRootSelectorFactory(selector);\n return factory(context);\n });\n return {\n selectorOptions,\n argumentSelectorFunctions\n };\n}\n\nfunction getSelectorsToApply(\n selectors: any[] | undefined = [],\n selectorOptions: ɵSharedSelectorOptions,\n containerClass: any\n) {\n const selectorsToApply = [];\n // The container state refers to the state class that includes the\n // definition of the selector function, for example:\n // @State()\n // class AnimalsState {\n // @Selector()\n // static getAnimals(state: AnimalsStateModel) {}\n // }\n // The `AnimalsState` serves as the container state. Additionally, the\n // selector may reside within a namespace or another class lacking the\n // `@State` decorator, thus not being treated as the container state.\n const canInjectContainerState =\n selectorOptions.injectContainerState || selectors.length === 0;\n\n if (containerClass && canInjectContainerState) {\n // If we are on a state class, add it as the first selector parameter\n const metadata = ɵgetStoreMetadata(containerClass);\n if (metadata) {\n selectorsToApply.push(containerClass);\n }\n }\n selectorsToApply.push(...selectors);\n return selectorsToApply;\n}\n\n/**\n * This function gets the factory function to create the selector to get the selected slice from the app state\n * @ignore\n */\nexport function getRootSelectorFactory(selector: any): ɵSelectorFactory {\n const metadata = ɵgetSelectorMetadata(selector) || ɵgetStoreMetadata(selector);\n return metadata?.makeRootSelector || (() => selector);\n}\n","import { InjectionToken, inject } from '@angular/core';\nimport type { Observable } from 'rxjs';\n\nimport {\n ɵMETA_KEY,\n ɵPlainObjectOf,\n ɵStateClassInternal,\n ɵActionHandlerMetaData\n} from '@ngxs/store/internals';\n\nimport { NgxsConfig } from '../symbols';\n\ndeclare const ngDevMode: boolean;\n\nexport type StateKeyGraph = ɵPlainObjectOf<string[]>;\nexport type StatesByName = ɵPlainObjectOf<ɵStateClassInternal>;\n\nexport interface StateOperations<T> {\n getState(): T;\n\n setState(val: T): void;\n\n dispatch(actionOrActions: any | any[]): Observable<void>;\n}\n\nexport interface MappedStore {\n name: string;\n isInitialised: boolean;\n actions: ɵPlainObjectOf<ɵActionHandlerMetaData[]>;\n defaults: any;\n instance: any;\n path: string;\n}\n\nexport interface StatesAndDefaults {\n defaults: any;\n states: MappedStore[];\n}\n\n/**\n * Get a deeply nested value. Example:\n *\n * getValue({ foo: bar: [] }, 'foo.bar') //=> []\n *\n * Note: This is not as fast as the `fastPropGetter` but is strict Content Security Policy compliant.\n * See perf hit: https://jsperf.com/fast-value-getter-given-path/1\n *\n * @ignore\n */\nexport function compliantPropGetter(paths: string[]): (x: any) => any {\n return obj => {\n for (let i = 0; i < paths.length; i++) {\n if (!obj) return undefined;\n obj = obj[paths[i]];\n }\n return obj;\n };\n}\n\n/**\n * The generated function is faster than:\n * - pluck (Observable operator)\n * - memoize\n *\n * @ignore\n */\nexport function fastPropGetter(paths: string[]): (x: any) => any {\n const segments = paths;\n let seg = 'store.' + segments[0];\n let i = 0;\n const l = segments.length;\n\n let expr = seg;\n while (++i < l) {\n expr = expr + ' && ' + (seg = seg + '.' + segments[i]);\n }\n\n const fn = new Function('store', 'return ' + expr + ';');\n\n return <(x: any) => any>fn;\n}\n\nexport const ɵPROP_GETTER = new InjectionToken<(paths: string[]) => (x: any) => any>(\n typeof ngDevMode !== 'undefined' && ngDevMode ? 'PROP_GETTER' : '',\n {\n providedIn: 'root',\n factory: () =>\n inject(NgxsConfig).compatibility?.strictContentSecurityPolicy\n ? compliantPropGetter\n : fastPropGetter\n }\n);\n\n/**\n * Given an array of states, it will return a object graph. Example:\n * const states = [\n * Cart,\n * CartSaved,\n * CartSavedItems\n * ]\n *\n * would return:\n *\n * const graph = {\n * cart: ['saved'],\n * saved: ['items'],\n * items: []\n * };\n *\n * @ignore\n */\nexport function buildGraph(stateClasses: ɵStateClassInternal[]): StateKeyGraph {\n // Resolve a state's name from the class reference.\n const findName = (stateClass: ɵStateClassInternal): string => {\n const meta = stateClasses.find(s => s === stateClass);\n if (typeof ngDevMode !== 'undefined' && ngDevMode && !meta) {\n throw new Error(\n `Child state not found: ${stateClass}. \\r\\nYou may have forgotten to add states to module`\n );\n }\n return meta![ɵMETA_KEY]!.name!;\n };\n\n // Build the dependency graph.\n return stateClasses.reduce((graph: StateKeyGraph, stateClass) => {\n const meta = stateClass[ɵMETA_KEY]!;\n graph[meta.name!] = (meta.children || []).map(findName);\n return graph;\n }, {});\n}\n\n/**\n * Given a states array, returns object graph\n * returning the name and state metadata. Example:\n *\n * const graph = {\n * cart: { metadata }\n * };\n *\n * @ignore\n */\nexport function nameToState(\n states: ɵStateClassInternal[]\n): ɵPlainObjectOf<ɵStateClassInternal> {\n return states.reduce<ɵPlainObjectOf<ɵStateClassInternal>>(\n (result: ɵPlainObjectOf<ɵStateClassInternal>, stateClass: ɵStateClassInternal) => {\n const meta = stateClass[ɵMETA_KEY]!;\n result[meta.name!] = stateClass;\n return result;\n },\n {}\n );\n}\n\n/**\n * Given a object relationship graph will return the full path\n * for the child items. Example:\n *\n * const graph = {\n * cart: ['saved'],\n * saved: ['items'],\n * items: []\n * };\n *\n * would return:\n *\n * const r = {\n * cart: 'cart',\n * saved: 'cart.saved',\n * items: 'cart.saved.items'\n * };\n *\n * @ignore\n */\nexport function findFullParentPath(\n obj: StateKeyGraph,\n out: ɵPlainObjectOf<string> = {}\n): ɵPlainObjectOf<string> {\n // Recursively find the full dotted parent path for a given key.\n const find = (graph: StateKeyGraph, target: string): string | null => {\n for (const key in graph) {\n if (graph[key]?.includes(target)) {\n const parent = find(graph, key);\n return parent ? `${parent}.${key}` : key;\n }\n }\n return null;\n };\n\n // Build full path for each key\n for (const key in obj) {\n const parent = find(obj, key);\n out[key] = parent ? `${parent}.${key}` : key;\n }\n\n return out;\n}\n\n/**\n * Given a object graph, it will return the items topologically sorted Example:\n *\n * const graph = {\n * cart: ['saved'],\n * saved: ['items'],\n * items: []\n * };\n *\n * would return:\n *\n * const results = [\n * 'items',\n * 'saved',\n * 'cart'\n * ];\n *\n * @ignore\n */\nexport function topologicalSort(graph: StateKeyGraph): string[] {\n const sorted: string[] = [];\n const visited: ɵPlainObjectOf<boolean> = {};\n\n // DFS (Depth-First Search) to visit each node and its dependencies.\n const visit = (name: string, ancestors: string[] = []) => {\n visited[name] = true;\n ancestors.push(name);\n\n for (const dep of graph[name]) {\n if (typeof ngDevMode !== 'undefined' && ngDevMode && ancestors.includes(dep)) {\n throw new Error(\n `Circular dependency '${dep}' is required by '${name}': ${ancestors.join(' -> ')}`\n );\n }\n\n if (!visited[dep]) visit(dep, ancestors.slice());\n }\n\n // Add to sorted list if not already included.\n if (!sorted.includes(name)) sorted.push(name);\n };\n\n // Start DFS from each key\n for (const key in graph) visit(key);\n\n return sorted.reverse();\n}\n","import { ɵPlainObject } from '@ngxs/store/internals';\n\nexport function throwStateNameError(name: string): never {\n throw new Error(\n `${name} is not a valid state name. It needs to be a valid object property name.`\n );\n}\n\nexport function throwStateNamePropertyError(): never {\n throw new Error(`States must register a 'name' property.`);\n}\n\nexport function throwStateUniqueError(\n current: string,\n newName: string,\n oldName: string\n): never {\n throw new Error(`State name '${current}' from ${newName} already exists in ${oldName}.`);\n}\n\nexport function throwStateDecoratorError(name: string): never {\n throw new Error(`States must be decorated with @State() decorator, but \"${name}\" isn't.`);\n}\n\nexport function throwActionDecoratorError(): never {\n throw new Error('@Action() decorator cannot be used with static methods.');\n}\n\nexport function throwSelectorDecoratorError(): never {\n throw new Error('Selectors only work on methods.');\n}\n\nexport function getUndecoratedStateWithInjectableWarningMessage(name: string): string {\n return `'${name}' class should be decorated with @Injectable() right after the @State() decorator`;\n}\n\nexport function getInvalidInitializationOrderMessage(addedStates?: ɵPlainObject) {\n let message =\n 'You have an invalid state initialization order. This typically occurs when `NgxsModule.forFeature`\\n' +\n 'or `provideStates` is called before `NgxsModule.forRoot` or `provideStore`.\\n' +\n 'One example is when `NgxsRouterPluginModule.forRoot` is called before `NgxsModule.forRoot`.';\n\n if (addedStates) {\n const stateNames = Object.keys(addedStates).map(stateName => `\"${stateName}\"`);\n\n message +=\n '\\nFeature states added before the store initialization is complete: ' +\n `${stateNames.join(', ')}.`;\n }\n\n return message;\n}\n\nexport function throwPatchingArrayError(): never {\n throw new Error('Patching arrays is not supported.');\n}\n\nexport function throwPatchingPrimitiveError(): never {\n throw new Error('Patching primitives is not supported.');\n}\n","import { ɵStateClassInternal, ɵgetStoreMetadata } from '@ngxs/store/internals';\n\nimport { StatesByName } from '../internal/internals';\nimport {\n throwStateDecoratorError,\n throwStateNameError,\n throwStateNamePropertyError,\n throwStateUniqueError\n} from '../configs/messages.config';\n\nconst stateNameRegex = /* @__PURE__ */ new RegExp('^[a-zA-Z0-9_]+$');\n\nexport function ensureStateNameIsValid(name: string | null): void | never {\n if (!name) {\n throwStateNamePropertyError();\n } else if (!stateNameRegex.test(name)) {\n throwStateNameError(name);\n }\n}\n\nexport function ensureStateNameIsUnique(\n stateName: string,\n state: ɵStateClassInternal,\n statesByName: StatesByName\n): void | never {\n const existingState = statesByName[stateName];\n if (existingState && existingState !== state) {\n throwStateUniqueError(stateName, state.name, existingState.name);\n }\n}\n\nexport function ensureStatesAreDecorated(stateClasses: ɵStateClassInternal[]): void | never {\n stateClasses.forEach((stateClass: ɵStateClassInternal) => {\n if (!ɵgetStoreMetadata(stateClass)) {\n throwStateDecoratorError(stateClass.name);\n }\n });\n}\n","import { getUndecoratedStateWithInjectableWarningMessage } from '../configs/messages.config';\n\n/**\n * All provided or injected tokens must have `@Injectable` decorator\n * (previously, injected tokens without `@Injectable` were allowed\n * if another decorator was used, e.g. pipes).\n */\nexport function ensureStateClassIsInjectable(stateClass: any): void {\n if (jit_hasInjectableAnnotation(stateClass) || aot_hasNgInjectableDef(stateClass)) {\n return;\n }\n\n console.warn(getUndecoratedStateWithInjectableWarningMessage(stateClass.name));\n}\n\nfunction aot_hasNgInjectableDef(stateClass: any): boolean {\n // `ɵprov` is a static property added by the NGCC compiler. It always exists in\n // AOT mode because this property is added before runtime. If an application is running in\n // JIT mode then this property can be added by the `@Injectable()` decorator. The `@Injectable()`\n // decorator has to go after the `@State()` decorator, thus we prevent users from unwanted DI errors.\n return !!stateClass.ɵprov;\n}\n\nfunction jit_hasInjectableAnnotation(stateClass: any): boolean {\n // `ɵprov` doesn't exist in JIT mode (for instance when running unit tests with Jest).\n const annotations = stateClass.__annotations__ || [];\n return annotations.some((annotation: any) => annotation?.ngMetadataName === 'Injectable');\n}\n","import { InjectionToken } from '@angular/core';\n\nimport { ActionType } from '../actions/symbols';\n\nexport interface NgxsDevelopmentOptions {\n // This allows setting only `true` because there's no reason to set `false`.\n // Developers may just skip importing the development module at all.\n warnOnUnhandledActions:\n | true\n | {\n ignore: ActionType[];\n };\n}\n\nexport const NGXS_DEVELOPMENT_OPTIONS =\n /* @__PURE__ */ new InjectionToken<NgxsDevelopmentOptions>(\n typeof ngDevMode !== 'undefined' && ngDevMode ? 'NGXS_DEVELOPMENT_OPTIONS' : '',\n {\n providedIn: 'root',\n factory: () => ({ warnOnUnhandledActions: true })\n }\n );\n","import { inject, Injectable } from '@angular/core';\nimport { InitState, UpdateState, getActionTypeFromInstance } from '@ngxs/store/plugins';\n\nimport { ActionType } from '../actions/symbols';\nimport { NGXS_DEVELOPMENT_OPTIONS } from './symbols';\n\n@Injectable()\nexport class NgxsUnhandledActionsLogger {\n /**\n * These actions should be ignored by default; the user can increase this\n * list in the future via the `ignoreActions` method.\n */\n private _ignoredActions = new Set<string>([InitState.type, UpdateState.type]);\n\n constructor() {\n const options = inject(NGXS_DEVELOPMENT_OPTIONS);\n if (typeof options.warnOnUnhandledActions === 'object') {\n this.ignoreActions(...options.warnOnUnhandledActions.ignore);\n }\n }\n\n /**\n * Adds actions to the internal list of actions that should be ignored.\n */\n ignoreActions(...actions: ActionType[]): void {\n for (const action of actions) {\n this._ignoredActions.add(action.type);\n }\n }\n\n /** @internal */\n warn(action: any): void {\n const actionShouldBeIgnored = Array.from(this._ignoredActions).some(\n type => type === getActionTypeFromInstance(action)\n );\n\n if (actionShouldBeIgnored) {\n return;\n }\n\n action =\n action.constructor && action.constructor.name !== 'Object'\n ? action.constructor.name\n : action.type;\n\n console.warn(\n `The ${action} action has been dispatched but hasn't been handled. This may happen if the state with an action handler for this action is not registered.`\n );\n }\n}\n","import { ErrorHandler, Injectable, NgZone, inject } from '@angular/core';\n\nexport interface NgxsUnhandledErrorContext {\n action: any;\n}\n\n@Injectable({ providedIn: 'root' })\nexport class NgxsUnhandledErrorHandler {\n private _ngZone = inject(NgZone);\n private _errorHandler = inject(ErrorHandler);\n\n /**\n * The `_unhandledErrorContext` is left unused internally since we do not\n * require it for internal operations. However, developers who wish to provide\n * their own custom error handler may utilize this context information.\n */\n handleError(error: any, _unhandledErrorContext: NgxsUnhandledErrorContext): void {\n // In order to avoid duplicate error handling, it is necessary to leave\n // the Angular zone to ensure that errors are not caught twice. The `handleError`\n // method may contain a `throw error` statement, which is used to re-throw the error.\n // If the error is re-thrown within the Angular zone, it will be caught again by the\n // Angular zone. By default, `@angular/core` leaves the Angular zone when invoking\n // `handleError` (see `_callAndReportToErrorHandler`).\n this._ngZone.runOutsideAngular(() => this._errorHandler.handleError(error));\n }\n}\n","import { getActionTypeFromInstance } from '@ngxs/store/plugins';\nimport { type OperatorFunction, type Observable, map, filter } from 'rxjs';\n\nimport { ActionType } from '../actions/symbols';\nimport { ActionContext, ActionStatus } from '../actions-stream';\n\ntype TupleKeys<T extends any[]> = Exclude<keyof T, keyof []>;\n\n/**\n * Given a POJO, returns the POJO type, given a class constructor object, returns the type of the class.\n *\n * This utility type exists due to the complexity of ActionType being either an ActionDef class or the plain\n * `{ type: string }` type (or similar compatible POJO types).\n */\ntype Constructed<T> = T extends new (...args: any[]) => infer U ? U : T;\n\nexport interface ActionCompletion<T = any, E = Error> {\n action: T;\n result: {\n successful: boolean;\n canceled: boolean;\n error?: E;\n };\n}\n\n/**\n * RxJS operator for selecting out specific actions.\n *\n * This will grab actions that have just been dispatched as well as actions that have completed\n */\nexport function ofAction<T extends ActionType[]>(\n ...allowedTypes: T\n): OperatorFunction<\n ActionContext<Constructed<T[TupleKeys<T>]>>,\n Constructed<T[TupleKeys<T>]>\n> {\n return ofActionOperator(allowedTypes);\n}\n\n/**\n * RxJS operator for selecting out specific actions.\n *\n * This will ONLY grab actions that have just been dispatched\n */\nexport function ofActionDispatched<T extends ActionType[]>(\n ...allowedTypes: T\n): OperatorFunction<\n ActionContext<Constructed<T[TupleKeys<T>]>>,\n Constructed<T[TupleKeys<T>]>\n> {\n return ofActionOperator(allowedTypes, [ActionStatus.Dispatched]);\n}\n\n/**\n * RxJS operator for selecting out specific actions.\n *\n * This will ONLY grab actions that have just been successfully completed\n */\nexport function ofActionSuccessful<T extends ActionType[]>(\n ...allowedTypes: T\n): OperatorFunction<\n ActionContext<Constructed<T[TupleKeys<T>]>>,\n Constructed<T[TupleKeys<T>]>\n> {\n return ofActionOperator(allowedTypes, [ActionStatus.Successful]);\n}\n\n/**\n * RxJS operator for selecting out specific actions.\n *\n * This will ONLY grab actions that have just been canceled\n */\nexport function ofActionCanceled<T extends ActionType[]>(\n ...allowedTypes: T\n): OperatorFunction<\n ActionContext<Constructed<T[TupleKeys<T>]>>,\n Constructed<T[TupleKeys<T>]>\n> {\n return ofActionOperator(allowedTypes, [ActionStatus.Canceled]);\n}\n\n/**\n * RxJS operator for selecting out specific actions.\n *\n * This will ONLY grab actions that have just been completed\n */\nexport function ofActionCompleted<T extends ActionType[]>(\n ...allowedTypes: T\n): OperatorFunction<\n ActionContext<Constructed<T[TupleKeys<T>]>>,\n ActionCompletion<Constructed<T[TupleKeys<T>]>>\n> {\n const allowedStatuses = [\n ActionStatus.Successful,\n ActionStatus.Canceled,\n ActionStatus.Errored\n ];\n return ofActionOperator(allowedTypes, allowedStatuses, mapActionResult);\n}\n\n/**\n * RxJS operator for selecting out specific actions.\n *\n * This will ONLY grab actions that have just thrown an error\n */\nexport function ofActionErrored<T extends ActionType[]>(\n ...allowedTypes: T\n): OperatorFunction<\n ActionContext<Constructed<T[TupleKeys<T>]>>,\n ActionCompletion<Constructed<T[TupleKeys<T>]>>\n> {\n return ofActionOperator(allowedTypes, [ActionStatus.Errored], mapActionResult);\n}\n\nfunction ofActionOperator(\n allowedTypes: ActionType[],\n statuses?: ActionStatus[],\n // This could have been written as\n // `OperatorFunction<ActionContext, ActionCompletion | any>`, as it maps\n // either to `ctx.action` or to `ActionCompletion`. However,\n // `ActionCompletion | any` defaults to `any`, rendering the union\n // type meaningless.\n mapOperator: () => OperatorFunction<ActionContext, any> = mapAction\n): OperatorFunction<ActionContext, any> {\n const allowedMap = createAllowedActionTypesMap(allowedTypes);\n const allowedStatusMap = statuses && createAllowedStatusesMap(statuses);\n return function (o: Observable<ActionContext>) {\n return o.pipe(filterStatus(allowedMap, allowedStatusMap), mapOperator());\n };\n}\n\nfunction filterStatus(allowedTypes: FilterMap, allowedStatuses?: FilterMap) {\n return filter((ctx: ActionContext) => {\n const actionType = getActionTypeFromInstance(ctx.action)!;\n const typeMatch = allowedTypes[actionType];\n const statusMatch = allowedStatuses ? allowedStatuses[ctx.status] : true;\n return typeMatch && statusMatch;\n });\n}\n\nfunction mapActionResult(): OperatorFunction<ActionContext, ActionCompletion> {\n return map(({ action, status, error }: ActionContext) => {\n return <ActionCompletion>{\n action,\n result: {\n successful: ActionStatus.Successful === status,\n canceled: ActionStatus.Canceled === status,\n error\n }\n };\n });\n}\n\nfunction mapAction<T = any>(): OperatorFunction<ActionContext, T> {\n return map((ctx: ActionContext) => <T>ctx.action);\n}\n\ninterface FilterMap {\n [key: string]: boolean;\n}\n\nfunction createAllowedActionTypesMap(types: ActionType[]): FilterMap {\n return types.reduce(\n (filterMap: FilterMap, klass: any) => {\n filterMap[getActionTypeFromInstance(klass)!] = true;\n return filterMap;\n },\n <FilterMap>{}\n );\n}\n\nfunction createAllowedStatusesMap(statuses: ActionStatus[]): FilterMap {\n return statuses.reduce(\n (filterMap: FilterMap, status: ActionStatus) => {\n filterMap[status] = true;\n return filterMap;\n },\n <FilterMap>{}\n );\n}\n","import {\n throwPatchingArrayError,\n throwPatchingPrimitiveError\n} from '../configs/messages.config';\nimport { ExistingState, StateOperator } from '@ngxs/store/operators';\n\nexport function simplePatch<T>(value: Partial<T>): StateOperator<T> {\n return (existingState: ExistingState<T>) => {\n if (typeof ngDevMode !== 'undefined' && ngDevMode) {\n if (Array.isArray(value)) {\n throwPatchingArrayError();\n } else if (typeof value !== 'object') {\n throwPatchingPrimitiveError();\n }\n }\n\n const newState: any = { ...(existingState as any) };\n for (const key in value) {\n // deep clone for patch compatibility\n newState[key] = (value as any)[key];\n }\n\n return newState as T;\n };\n}\n","import { inject, Injectable } from '@angular/core';\nimport { getValue, setValue } from '@ngxs/store/plugins';\nimport { ExistingState, StateOperator, isStateOperator } from '@ngxs/store/operators';\nimport type { Observable } from 'rxjs';\n\nimport { StateContext } from '../symbols';\nimport { StateOperations } from '../internal/internals';\nimport { InternalStateOperations } from '../internal/state-operations';\nimport { simplePatch } from './state-operators';\n\n/**\n * State Context factory class\n * @ignore\n */\n@Injectable({ providedIn: 'root' })\nexport class StateContextFactory {\n private _internalStateOperations = inject(InternalStateOperations);\n\n /**\n * Create the state context\n */\n createStateContext<T>(path: string, abortSignal: AbortSignal): StateContext<T> {\n const root = this._internalStateOperations.getRootStateOperations();\n\n return {\n abortSignal,\n getState(): T {\n const currentAppState = root.getState();\n return getState(currentAppState, path);\n },\n patchState(val: Partial<T>): void {\n const currentAppState = root.getState();\n const patchOperator = simplePatch<T>(val);\n setStateFromOperator(root, currentAppState, patchOperator, path);\n },\n setState(val: T | StateOperator<T>): void {\n const currentAppState = root.getState();\n if (isStateOperator(val)) {\n setStateFromOperator(root, currentAppState, val, path);\n } else {\n setStateValue(root, currentAppState, val, path);\n }\n },\n dispatch(actions: any | any[]): Observable<void> {\n return root.dispatch(actions);\n }\n };\n }\n}\n\nfunction setStateValue<T>(\n root: StateOperations<any>,\n currentAppState: any,\n newValue: T,\n path: string\n): any {\n const newAppState = setValue(currentAppState, path, newValue);\n root.setState(newAppState);\n return newAppState;\n // In doing this refactoring I noticed that there is a 'bug' where the\n // application state is returned instead of this state slice.\n // This has worked this way since the beginning see:\n // https://github.com/ngxs/store/blame/324c667b4b7debd8eb979006c67ca0ae347d88cd/src/state-factory.ts\n // This needs to be fixed, but is a 'breaking' change.\n // I will do this fix in a subsequent PR and we can decide how to handle it.\n}\n\nfunction setStateFromOperator<T>(\n root: StateOperations<any>,\n currentAppState: any,\n stateOperator: StateOperator<T>,\n path: string\n) {\n const local = getState(currentAppState, path);\n const newValue = stateOperator(local as ExistingState<T>);\n return setStateValue(root, currentAppState, newValue, path);\n}\n\nfunction getState<T>(currentAppState: any, path: string): T {\n return getValue(currentAppState, path);\n}\n","import { inject, Injectable, ɵisPromise } from '@angular/core';\nimport {\n defaultIfEmpty,\n finalize,\n from,\n isObservable,\n mergeMap,\n Observable,\n of,\n takeUntil\n} from 'rxjs';\nimport type { ɵActionOptions } from '@ngxs/store/internals';\n\nimport { InternalActions } from '../actions-stream';\nimport { ofActionDispatched } from '../operators/of-action';\nimport { StateContextFactory } from './state-context-factory';\nimport type { StateContext } from '../symbols';\n\n@Injectable({ providedIn: 'root' })\nexport class InternalActionHandlerFactory {\n private readonly _actions = inject(InternalActions);\n private readonly _stateContextFactory = inject(StateContextFactory);\n\n createActionHandler(\n path: string,\n handlerFn: (ctx: StateContext<any>, action: any) => any,\n options: ɵActionOptions\n ): (action: any) => Observable<any> {\n const { dispatched$ } = this._actions;\n\n return (action: any) => {\n const abortController = new AbortController();\n const stateContext = this._stateContextFactory.createStateContext(\n path,\n abortController.signal\n );\n\n let result = handlerFn(stateContext, action);\n\n // We need to use `isPromise` instead of checking whether\n // `result instanceof Promise`. In zone.js patched environments, `global.Promise`\n // is the `ZoneAwarePromise`. Some APIs, which are likely not patched by zone.js\n // for certain reasons, might not work with `instanceof`. For instance, the dynamic\n // import returns a native promise (not a `ZoneAwarePromise`), causing this check to\n // be falsy.\n if (ɵisPromise(result)) {\n result = from(result);\n }\n\n if (isObservable(result)) {\n result = result.pipe(\n mergeMap(value => (ɵisPromise(value) || isObservable(value) ? value : of(value))),\n // If this observable has completed without emitting any values,\n // we wouldn't want to complete the entire chain of actions.\n // If any observable completes, then the action will be canceled.\n // For instance, if any action handler had a statement like\n // `handler(ctx) { return EMPTY; }`, then the action would be canceled.\n // See https://github.com/ngxs/store/issues/1568\n defaultIfEmpty(undefined)\n );\n\n if (options.cancelUncompleted) {\n const canceled = dispatched$.pipe(ofActionDispatched(action));\n result = result.pipe(\n takeUntil(\n new Observable<void>(subscriber => {\n return canceled.subscribe(() => {\n // Note that we shouldn't use `catchError` to catch abort errors\n // because the observable is canceled before the error is thrown,\n // so we don't need to handle it.\n abortController.abort();\n subscriber.next();\n });\n })\n )\n );\n }\n\n result = result.pipe(\n // Note that we use the `finalize` operator only when the action handler\n // explicitly returns an observable (or a promise) to wait for. This means\n // the action handler is written in a \"fire & wait\" style. If the handler’s\n // result is unsubscribed (either because the observable has completed or\n // it was unsubscribed by `takeUntil` due to a new action being dispatched),\n // we prevent writing to the state context.\n finalize(() => {\n if (typeof ngDevMode !== 'undefined' && ngDevMode) {\n function noopAndWarn() {\n console.warn(\n `\"${action}\" attempted to change the state, but the change was ignored because state updates are not allowed after the action handler has completed.`\n );\n }\n\n stateContext.setState = noopAndWarn;\n stateContext.patchState = noopAndWarn;\n } else {\n stateContext.setState = noop;\n stateContext.patchState = noop;\n }\n })\n );\n } else {\n // If the action handler is synchronous and returns nothing (`void`), we\n // still have to convert the result to a synchronous observable.\n result = of(undefined);\n }\n\n return result;\n };\n }\n}\n\n// This is used to replace `setState` and `patchState` once the action\n// handler has been unsubscribed or completed, to prevent writing\n// to the state context.\nfunction noop() {}\n","import { DestroyRef, Injectable, Injector, inject } from '@angular/core';\nimport {\n ɵmemoize,\n ɵMETA_KEY,\n ɵPlainObjectOf,\n ɵMetaDataModel,\n ɵgetStoreMetadata,\n ɵStateClassInternal,\n ɵINITIAL_STATE_TOKEN,\n ɵSharedSelectorOptions,\n ɵRuntimeSelectorContext,\n ɵNgxsActionRegistry\n} from '@ngxs/store/internals';\nimport { getActionTypeFromInstance, getValue, setValue } from '@ngxs/store/plugins';\nimport {\n forkJoin,\n Subscription,\n catchError,\n defaultIfEmpty,\n filter,\n map,\n mergeMap,\n Observable,\n of\n} from 'rxjs';\n\nimport { NgxsConfig, StateContext } from '../symbols';\nimport {\n buildGraph,\n findFullParentPath,\n MappedStore,\n nameToState,\n ɵPROP_GETTER,\n StateKeyGraph,\n StatesAndDefaults,\n StatesByName,\n topologicalSort\n} from './internals';\nimport { ActionContext, ActionStatus, InternalActions } from '../actions-stream';\nimport { InternalDispatchedActionResults } from '../internal/action-results';\nimport { ensureStateNameIsUnique, ensureStatesAreDecorated } from '../utils/store-validators';\nimport { ensureStateClassIsInjectable } from '../ivy/ivy-enabled-in-dev-mode';\nimport { NgxsUnhandledActionsLogger } from '../dev-features/ngxs-unhandled-actions-logger';\nimport { NgxsUnhandledErrorHandler } from '../ngxs-unhandled-error-handler';\nimport { assignUnhandledCallback } from './unhandled-rxjs-error-callback';\nimport { InternalActionHandlerFactory } from './action-handler-factory';\n\nfunction cloneDefaults(defaults: any): any {\n let value = defaults === undefined ? {} : defaults;\n\n if (defaults) {\n if (Array.isArray(defaults)) {\n value = defaults.slice();\n } else if (typeof defaults === 'object') {\n value = { ...defaults };\n }\n }\n\n return value;\n}\n\n/**\n * The `StateFactory` class adds root and feature states to the graph.\n * This extracts state names from state classes, checks if they already\n * exist in the global graph, throws errors if their names are invalid, etc.\n *\n * Root and feature initializers call `addAndReturnDefaults()` to add those states\n * to the global graph. Since `addAndReturnDefaults` runs within the injection\n * context (which might be the root injector or a feature injector), we can\n * retrieve an instance of the state class using `inject(StateClass)`.\n * @ignore\n */\n@Injectable({ providedIn: 'root' })\nexport class StateFactory {\n private readonly _injector = inject(Injector);\n private readonly _config = inject(NgxsConfig);\n private readonly _actionHandlerFactory = inject(InternalActionHandlerFactory);\n private readonly _actions = inject(InternalActions);\n private readonly _actionResults = inject(InternalDispatchedActionResults);\n private readonly _initialState = inject(ɵINITIAL_STATE_TOKEN, { optional: true });\n private readonly _actionRegistry = inject(ɵNgxsActionRegistry);\n private readonly _propGetter = inject(ɵPROP_GETTER);\n\n private _actionsSubscription: Subscription | null = null;\n\n private _ngxsUnhandledErrorHandler: NgxsUnhandledErrorHandler = null!;\n\n private _states: MappedStore[] = [];\n private _statesByName: StatesByName = {};\n private _statePaths: ɵPlainObjectOf<string> = {};\n\n getRuntimeSelectorContext = ɵmemoize(() => {\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const stateFactory = this;\n const propGetter = stateFactory._propGetter;\n\n function resolveGetter(key: string) {\n const path = stateFactory._statePaths[key];\n return path ? propGetter(path.split('.')) : null;\n }\n\n const context: ɵRuntimeSelectorContext = {\n getStateGetter(key: string) {\n // Use `@__INLINE__` annotation to forcely inline `resolveGetter`.\n // This is a Terser annotation, which will function only in the production mode.\n let getter = /*@__INLINE__*/ resolveGetter(key);\n if (getter) {\n return getter;\n }\n return (...args) => {\n // Late loaded getter\n if (!getter) {\n getter = /*@__INLINE__*/ resolveGetter(key);\n }\n return getter ? getter(...args) : undefined;\n };\n },\n getSelectorOptions(localOptions?: ɵSharedSelectorOptions) {\n const globalSelectorOptions = stateFactory._config.selectorOptions;\n return {\n ...globalSelectorOptions,\n ...(localOptions || {})\n };\n }\n };\n return context;\n });\n\n constructor() {\n inject(DestroyRef).onDestroy(() => {\n // Clear state references to help the garbage collector in SSR\n // environments under high load, preventing memory leaks.\n this._states = [];\n this._actionsSubscription?.unsubscribe();\n });\n }\n\n /**\n * Add a new state to the global defs.\n */\n private add(stateClasses: ɵStateClassInternal[]): MappedStore[] {\n if (typeof ngDevMode !== 'undefined' && ngDevMode) {\n ensureStatesAreDecorated(stateClasses);\n }\n\n const { newStates } = this.addToStatesMap(stateClasses);\n if (!newStates.length) return [];\n\n const stateGraph: StateKeyGraph = buildGraph(newStates);\n const sortedStates: string[] = topologicalSort(stateGraph);\n const paths: ɵPlainObjectOf<string> = findFullParentPath(stateGraph);\n const nameGraph: ɵPlainObjectOf<ɵStateClassInternal> = nameToState(newStates);\n const bootstrappedStores: MappedStore[] = [];\n\n for (const name of sortedStates) {\n const stateClass: ɵStateClassInternal = nameGraph[name];\n const path: string = paths[name];\n const meta: ɵMetaDataModel = stateClass[ɵMETA_KEY]!;\n\n this.addRuntimeInfoToMeta(meta, path);\n\n if (typeof ngDevMode !== 'undefined' && ngDevMode) {\n ensureStateClassIsInjectable(stateClass);\n }\n\n const stateMap: MappedStore = {\n name,\n path,\n isInitialised: false,\n actions: meta.actions,\n instance: inject(stateClass),\n defaults: cloneDefaults(meta.defaults)\n };\n\n // ensure our store hasn't already been added\n // but don't throw since it could be lazy\n // loaded from different paths\n if (!this.hasBeenMountedAndBootstrapped(name, path)) {\n bootstrappedStores.push(stateMap);\n }\n\n this._states.push(stateMap);\n this.hydrateActionMetasMap(stateMap);\n }\n\n return bootstrappedStores;\n }\n\n /**\n * Add a set of states to the store and return the defaults\n */\n addAndReturnDefaults(stateClasses: ɵStateClassInternal[]): StatesAndDefaults {\n const classes: ɵStateClassInternal[] = stateClasses || [];\n\n const mappedStores: MappedStore[] = this.add(classes);\n const defaults = mappedStores.reduce(\n (result: any, mappedStore: MappedStore) =>\n setValue(result, mappedStore.path, mappedStore.defaults),\n {}\n );\n return { defaults, states: mappedStores };\n }\n\n connectActionHandlers(): void {\n this._actionsSubscription = this._actions\n .pipe(\n filter((ctx: ActionContext) => ctx.status === ActionStatus.Dispatched),\n mergeMap(ctx => {\n const action: any = ctx.action;\n return this.invokeActions(action).pipe(\n map(() => <ActionContext>{ action, status: ActionStatus.Successful }),\n defaultIfEmpty(<ActionContext>{ action, status: ActionStatus.Canceled }),\n catchError(error => {\n const ngxsUnhandledErrorHandler = (this._ngxsUnhandledErrorHandler ||=\n this._injector.get(NgxsUnhandledErrorHandler));\n const handleableError = assignUnhandledCallback(error, () =>\n ngxsUnhandledErrorHandler.handleError(error, { action })\n );\n return of(<ActionContext>{\n action,\n status: ActionStatus.Errored,\n error: handleableError\n });\n })\n );\n })\n )\n .subscribe(ctx => this._actionResults.next(ctx));\n }\n\n /**\n * Invoke actions on the states.\n */\n private invokeActions(action: any): Observable<unknown[]> {\n const type = getActionTypeFromInstance(action)!;\n const results: Observable<unknown>[] = [];\n\n // Determines whether the dispatched action has been handled, this is assigned\n // to `true` within the below `for` loop if any `actionMetas` has been found.\n let actionHasBeenHandled = false;\n\n const actionHandlers = this._actionRegistry.get(type);\n\n if (actionHandlers) {\n for (const actionHandler of actionHandlers) {\n let result;\n\n try {\n result = actionHandler(action);\n } catch (e) {\n result = new Observable(subscriber => subscriber.error(e));\n }\n\n results.push(result);\n\n actionHasBeenHandled = true;\n }\n }\n\n // The `NgxsUnhandledActionsLogger` is a tree-shakable class which functions\n // only during development.\n if (typeof ngDevMode !== 'undefined' && ngDevMode && !actionHasBeenHandled) {\n const unhandledActionsLogger = this._injector.get(NgxsUnhandledActionsLogger, null);\n // The `NgxsUnhandledActionsLogger` will not be resolved by the injector if the\n // `NgxsDevelopmentModule` is not provided. It's enough to check whether the `injector.get`\n // didn't return `null` so we may ensure the module has been imported.\n unhandledActionsLogger?.warn(action);\n }\n\n if (!results.length) {\n results.push(of(undefined));\n }\n\n return forkJoin(results);\n }\n\n private addToStatesMap(stateClasses: ɵStateClassInternal[]): {\n newStates: ɵStateClassInternal[];\n } {\n const newStates: ɵStateClassInternal[] = [];\n const statesMap: StatesByName = this._statesByName;\n\n for (const stateClass of stateClasses) {\n const stateName = ɵgetStoreMetadata(stateClass).name!;\n if (typeof ngDevMode !== 'undefined' && ngDevMode) {\n ensureStateNameIsUnique(stateName, stateClass, statesMap);\n }\n const unmountedState = !statesMap[stateName];\n if (unmountedState) {\n newStates.push(stateClass);\n statesMap[stateName] = stateClass;\n }\n }\n\n return { newStates };\n }\n\n private addRuntimeInfoToMeta(meta: ɵMetaDataModel, path: string): void {\n this._statePaths[meta.name!] = path;\n // TODO: versions after v3 - we plan to get rid of the `path` property because it is non-deterministic\n // we can do this when we get rid of the incorrectly exposed getStoreMetadata\n // We will need to come up with an alternative to what was exposed in v3 because this is used by many plugins\n meta.path = path;\n }\n\n private hasBeenMountedAndBootstrapped(name: string, path: string): boolean {\n const valueIsBootstrappedInInitialState: boolean =\n getValue(this._initialState, path) !== undefined;\n // This checks whether a state has been already added to the global graph and\n // its lifecycle is in 'bootstrapped' state.\n return this._statesByName[name] && valueIsBootstrappedInInitialState;\n }\n\n private hydrateActionMetasMap({ path, actions, instance }: MappedStore): void {\n for (const actionType of Object.keys(actions)) {\n const actionHandlers = actions[actionType].map(actionMeta => {\n const handlerFn = (ctx: StateContext<any>, action: any) =>\n instance[actionMeta.fn](ctx, action);\n\n return this._actionHandlerFactory.createActionHandler(\n path,\n handlerFn,\n actionMeta.options\n );\n });\n\n for (const actionHandler of actionHandlers) {\n this._actionRegistry.register(actionType, actionHandler);\n }\n }\n }\n}\n","import { computed, inject, Injectable, Signal } from '@angular/core';\nimport {\n type Subscription,\n catchError,\n distinctUntilChanged,\n map,\n Observable,\n shareReplay,\n take,\n of\n} from 'rxjs';\nimport { ɵINITIAL_STATE_TOKEN, ɵStateStream } from '@ngxs/store/internals';\n\nimport { InternalStateOperations } from './internal/state-operations';\nimport { getRootSelectorFactory } from './selectors/selector-utils';\nimport { leaveNgxs } from './operators/leave-ngxs';\nimport { NgxsConfig } from './symbols';\nimport { StateFactory } from './internal/state-factory';\nimport { TypedSelector } from './selectors';\nimport { InternalNgxsExecutionStrategy } from './execution/execution-strategy';\n\n// We need to check whether the provided `T` type extends an array in order to\n// apply the `NonNullable[]` type to its elements. This is because, for\n// `const actions = [undefined]`, type inference would result in `NonNullable<unknown>`\n// rather than `NonNullable<unknown>[]`.\ntype ActionOrArrayOfActions<T> = T extends (infer U)[] ? NonNullable<U>[] : NonNullable<T>;\n\n@Injectable({ providedIn: 'root' })\nexport class Store {\n private _stateStream = inject(ɵStateStream);\n private _internalStateOperations = inject(InternalStateOperations);\n private _config = inject(NgxsConfig);\n private _internalExecutionStrategy = inject(InternalNgxsExecutionStrategy);\n private _stateFactory = inject(StateFactory);\n\n /**\n * This is a derived state stream that leaves NGXS execution strategy to emit state changes within the Angular zone,\n * because state is being changed actually within the `<root>` zone, see `InternalDispatcher#dispatchSingle`.\n * All selects would use this stream, and it would call leave only once for any state change across all active selectors.\n */\n private _selectableStateStream = this._stateStream.pipe(\n leaveNgxs(this._internalExecutionStrategy),\n shareReplay({ bufferSize: 1, refCount: true })\n );\n\n constructor() {\n this.initStateStream();\n }\n\n /**\n * Dispatches action(s).\n */\n dispatch<T>(actionOrActions: ActionOrArrayOfActions<T>): Observable<void> {\n if (typeof ngDevMode !== 'undefined' && ngDevMode) {\n if (\n // If a single action is dispatched and it's nullable.\n actionOrActions == null ||\n // If a list of actions is dispatched and any of the actions are nullable.\n (Array.isArray(actionOrActions) && actionOrActions.some(action => action == null))\n ) {\n const error = new Error('`dispatch()` was called without providing an action.');\n return new Observable(subscriber => subscriber.error(error));\n }\n }\n\n return this._internalStateOperations.getRootStateOperations().dispatch(actionOrActions);\n }\n\n /**\n * Selects a slice of data from the store.\n */\n select<T>(selector: TypedSelector<T>): Observable<T> {\n const selectorFn = this.getStoreBoundSelectorFn(selector);\n return this._selectableStateStream.pipe(\n map(selectorFn),\n catchError((error: Error): Observable<never> | Observable<undefined> => {\n // if error is TypeError we swallow it to prevent usual errors with property access\n if (this._config.selectorOptions.suppressErrors && error instanceof TypeError) {\n return of(undefined);\n }\n\n // rethrow other errors\n throw error;\n }),\n distinctUntilChanged(),\n leaveNgxs(this._internalExecutionStrategy)\n );\n }\n\n /**\n * Select one slice of data from the store.\n */\n selectOnce<T>(selector: TypedSelector<T>): Observable<T> {\n return this.select(selector).pipe(take(1));\n }\n\n /**\n * Select a snapshot from the state.\n */\n selectSnapshot<T>(selector: TypedSelector<T>): T {\n const selectorFn = this.getStoreBoundSelectorFn(selector);\n return selectorFn(this._stateStream.getValue());\n }\n\n /**\n * Select a signal from the state.\n */\n selectSignal<T>(selector: TypedSelector<T>): Signal<T> {\n const selectorFn = this.getStoreBoundSelectorFn(selector);\n if (typeof ngDevMode !== 'undefined' && ngDevMode) {\n return computed<T>(() => selectorFn(this._stateStream.state()), {\n debugName: 'NGXS selectSignal'\n });\n } else {\n return computed<T>(() => selectorFn(this._stateStream.state()));\n }\n }\n\n /**\n * Allow the user to subscribe to the root of the state\n */\n subscribe(fn?: (value: any) => void): Subscription {\n return this._selectableStateStream\n .pipe(leaveNgxs(this._internalExecutionStrategy))\n .subscribe(fn);\n }\n\n /**\n * Return the raw value of the state.\n */\n snapshot(): any {\n return this._internalStateOperations.getRootStateOperations().getState();\n }\n\n /**\n * Reset the state to a specific point in time. This method is useful\n * for plugin's who need to modify the state directly or unit testing.\n */\n reset(state: any) {\n this._internalStateOperations.getRootStateOperations().setState(state);\n }\n\n private getStoreBoundSelectorFn(selector: any) {\n const makeSelectorFn = getRootSelectorFactory(selector);\n const runtimeContext = this._stateFactory.getRuntimeSelectorContext();\n return makeSelectorFn(runtimeContext);\n }\n\n private initStateStream(): void {\n const initialStateValue: any = inject(ɵINITIAL_STATE_TOKEN);\n const value = this._stateStream.value;\n const storeIsEmpty = !value || Object.keys(value).length === 0;\n\n if (storeIsEmpty) {\n this._stateStream.next(initialStateValue);\n }\n }\n}\n","import { InjectionToken, makeEnvironmentProviders } from '@angular/core';\n\n/**\n * InjectionToken that registers preboot functions (called before the root initializer).\n */\nexport const NGXS_PREBOOT_FNS = new InjectionToken<VoidFunction[]>(\n typeof ngDevMode !== 'undefined' && ngDevMode ? 'NGXS_PREBOOT_FNS' : ''\n);\n\n/**\n * This function registers a preboot function which will be called before the root\n * store initializer is run, but after all of the NGXS features are provided and\n * available for injection. This is useful for registering action stream listeners\n * before any action is dispatched.\n *\n * ```ts\n * bootstrapApplication(AppComponent, {\n * providers: [\n * provideStore(\n * [CountriesState],\n * withNgxsPreboot(() => {\n * const actions$ = inject(Actions);\n * actions$.subscribe(ctx => console.log(ctx));\n * })\n * )\n * ]\n * });\n * ```\n */\nexport function withNgxsPreboot(prebootFn: VoidFunction) {\n return makeEnvironmentProviders([\n { provide: NGXS_PREBOOT_FNS, multi: true, useValue: prebootFn }\n ]);\n}\n","import { inject, InjectionToken } from '@angular/core';\n\nexport const ROOT_STORE_GUARD = /* @__PURE__ */ new InjectionToken('ROOT_STORE_GUARD', {\n providedIn: 'root',\n factory: () => ({ initialized: false })\n});\n\nexport function assertRootStoreNotInitialized(): void {\n const rootStoreGuard = inject(ROOT_STORE_GUARD);\n if (rootStoreGuard.initialized) {\n throw new Error('provideStore() should only be called once.');\n }\n rootStoreGuard.initialized = true;\n}\n","import { DestroyRef, inject, Injectable } from '@angular/core';\n\nimport { Store } from '../../store';\nimport { NgxsConfig } from '../../symbols';\n\n/**\n * Allows the select decorator to get access to the DI store, this is used internally\n * in `@Select` decorator.\n */\n@Injectable({ providedIn: 'root' })\nexport class SelectFactory {\n static store: Store | null = null;\n static config: NgxsConfig | null = null;\n\n constructor(store: Store, config: NgxsConfig) {\n SelectFactory.store = store;\n SelectFactory.config = config;\n\n inject(DestroyRef).onDestroy(() => {\n SelectFactory.store = null;\n SelectFactory.config = null;\n });\n }\n}\n","import { DestroyRef, inject, Injectable } from '@angular/core';\nimport { ɵNgxsAppBootstrappedState } from '@ngxs/store/internals';\nimport { getValue, InitState, UpdateState } from '@ngxs/store/plugins';\nimport { EMPTY, mergeMap, skip, startWith } from 'rxjs';\n\nimport { Store } from '../store';\nimport { StateContextFactory } from './state-context-factory';\nimport { InternalStateOperations } from './state-operations';\nimport { MappedStore, StatesAndDefaults } from './internals';\nimport { NgxsLifeCycle, NgxsSimpleChange, StateContext } from '../symbols';\nimport { getInvalidInitializationOrderMessage } from '../configs/messages.config';\n\n@Injectable({ providedIn: 'root' })\nexport class LifecycleStateManager {\n private _store = inject(Store);\n private _internalStateOperations = inject(InternalStateOperations);\n private _stateContextFactory = inject(StateContextFactory);\n private _appBootstrappedState = inject(ɵNgxsAppBootstrappedState);\n private _abortController = new AbortController();\n\n private _initStateHasBeenDispatched?: boolean;\n\n constructor() {\n inject(DestroyRef).onDestroy(() => this._abortController.abort());\n }\n\n ngxsBootstrap(\n action: InitState | UpdateState,\n results: StatesAndDefaults | undefined\n ): void {\n if (typeof ngDevMode !== 'undefined' && ngDevMode) {\n if (action instanceof InitState) {\n this._initStateHasBeenDispatched = true;\n } else if (\n // This is a dev mode-only check that ensures the correct order of\n // state initialization. The `NgxsModule.forRoot` or `provideStore` should\n // always come first, followed by `forFeature` and `provideStates`. If the\n // `UpdateState` is dispatched before the `InitState` is dispatched, it indicates\n // that modules or providers are in an invalid order.\n action instanceof UpdateState &&\n !this._initStateHasBeenDispatched\n ) {\n console.error(getInvalidInitializationOrderMessage(action.addedStates));\n }\n }\n\n // It does not need to unsubscribe because it is completed when the\n // root injector is destroyed.\n this._internalStateOperations\n .getRootStateOperations()\n .dispatch(action)\n .pipe(\n mergeMap(() => {\n // If no states are provided, we safely complete the stream\n // and do not proceed further.\n if (!results) {\n return EMPTY;\n }\n\n this._invokeInitOnStates(results!.states);\n return this._appBootstrappedState;\n })\n )\n .subscribe(appBootstrapped => {\n if (appBootstrapped) {\n this._invokeBootstrapOnStates(results!.states);\n }\n });\n }\n\n private _invokeInitOnStates(mappedStores: MappedStore[]): void {\n for (const mappedStore of mappedStores) {\n const instance: NgxsLifeCycle = mappedStore.instance;\n\n if (instance.ngxsOnChanges) {\n // We are manually keeping track of the previous value\n // within the subscribe block in order to drop the `pairwise()` operator.\n let previousValue: any;\n // It does not need to unsubscribe because it is completed when the\n // root injector is destroyed.\n this._store\n .select(state => getValue(state, mappedStore.path))\n .pipe(\n // Ensure initial state is captured\n startWith(undefined),\n // `skip` is using `filter` internally.\n skip(1)\n )\n .subscribe(currentValue => {\n const change = new NgxsSimpleChange(\n previousValue,\n currentValue,\n !mappedStore.isInitialised\n );\n previousValue = currentValue;\n instance.ngxsOnChanges!(change);\n });\n }\n\n instance.ngxsOnInit?.(this._getStateContext(mappedStore));\n\n mappedStore.isInitialised = true;\n }\n }\n\n private _invokeBootstrapOnStates(mappedStores: MappedStore[]) {\n for (const mappedStore of mappedStores) {\n const instance: NgxsLifeCycle = mappedStore.instance;\n instance.ngxsAfterBootstrap?.(this._getStateContext(mappedStore));\n }\n }\n\n private _getStateContext(mappedStore: MappedStore): StateContext<any> {\n return this._stateContextFactory.createStateContext(\n mappedStore.path,\n this._abortController.signal\n );\n }\n}\n","import {\n InjectionToken,\n Provider,\n inject,\n provideEnvironmentInitializer\n} from '@angular/core';\nimport { ɵStateClassInternal } from '@ngxs/store/internals';\n\nimport { Store } from '../store';\nimport { NGXS_PREBOOT_FNS } from './preboot';\nimport { InitState, UpdateState } from '../plugin_api';\nimport { FEATURE_STATE_TOKEN, ROOT_STATE_TOKEN } from '../symbols';\nimport { StateFactory } from '../internal/state-factory';\nimport { StatesAndDefaults } from '../internal/internals';\nimport { assertRootStoreNotInitialized } from './root-guard';\nimport { SelectFactory } from '../decorators/select/select-factory';\nimport { InternalStateOperations } from '../internal/state-operations';\nimport { LifecycleStateManager } from '../internal/lifecycle-state-manager';\nimport { installOnUnhandhedErrorHandler } from '../internal/unhandled-rxjs-error-callback';\n\n/**\n * This function is shared by both NgModule and standalone features.\n * When using `NgxsModule.forRoot` and `provideStore`, we can depend on the\n * same initialization functionality.\n */\nexport function rootStoreInitializer(): void {\n if (typeof ngDevMode !== 'undefined' && ngDevMode) {\n assertRootStoreNotInitialized();\n }\n\n // Override the RxJS `config.onUnhandledError` within the root store initializer,\n // but only after other code has already executed.\n // If users have a custom `config.onUnhandledError`, we might overwrite it too\n // early and capture the original `config.onUnhandledError` before it is properly set.\n installOnUnhandhedErrorHandler();\n\n const prebootFns = inject(NGXS_PREBOOT_FNS, { optional: true }) || [];\n prebootFns.forEach(prebootFn => prebootFn());\n\n const factory = inject(StateFactory);\n const internalStateOperations = inject(InternalStateOperations);\n\n inject(Store);\n inject(SelectFactory);\n\n const states = inject(ROOT_STATE_TOKEN, { optional: true }) || [];\n const lifecycleStateManager = inject(LifecycleStateManager);\n\n // Add stores to the state graph and return their defaults.\n const results: StatesAndDefaults = factory.addAndReturnDefaults(states);\n\n internalStateOperations.setStateToTheCurrentWithNew(results);\n\n // Connect our actions stream.\n factory.connectActionHandlers();\n\n // Dispatch the init action and invoke init and bootstrap functions after.\n lifecycleStateManager.ngxsBootstrap(new InitState(), results);\n}\n\n/**\n * This function is utilized by both NgModule and standalone features.\n * When using `NgxsModule.forFeature` and `provideStates`, we can depend on\n * the same initialization functionality.\n */\nexport function featureStatesInitializer(): void {\n inject(Store);\n\n const internalStateOperations = inject(InternalStateOperations);\n const factory = inject(StateFactory);\n const states = inject(FEATURE_STATE_TOKEN, { optional: true }) || [];\n const lifecycleStateManager = inject(LifecycleStateManager);\n\n // Since FEATURE_STATE_TOKEN is a multi token, we need to\n // flatten it [[Feature1State, Feature2State], [Feature3State]].\n const flattenedStates: ɵStateClassInternal[] = states.reduce(\n (total: ɵStateClassInternal[], values: ɵStateClassInternal[]) => total.concat(values),\n []\n );\n\n // add stores to the state graph and return their defaults.\n const results: StatesAndDefaults = factory.addAndReturnDefaults(flattenedStates);\n\n if (results.states.length) {\n internalStateOperations.setStateToTheCurrentWithNew(results);\n\n // Dispatch the update action and invoke init and bootstrap functions after.\n lifecycleStateManager.ngxsBootstrap(new UpdateState(results.defaults), results);\n }\n}\n\n/**\n * InjectionToken that registers the global Store.\n */\nexport const NGXS_ROOT_STORE_INITIALIZER = new InjectionToken<void>(\n typeof ngDevMode !== 'undefined' && ngDevMode ? 'NGXS_ROOT_STORE_INITIALIZER' : ''\n);\n\n/**\n * InjectionToken that registers feature states.\n */\nexport const NGXS_FEATURE_STORE_INITIALIZER = new InjectionToken<void>(\n typeof ngDevMode !== 'undefined' && ngDevMode ? 'NGXS_FEATURE_STORE_INITIALIZER' : ''\n);\n\nexport const NGXS_ROOT_ENVIRONMENT_INITIALIZER: Provider = [\n { provide: NGXS_ROOT_STORE_INITIALIZER, useFactory: rootStoreInitializer },\n provideEnvironmentInitializer(() => inject(NGXS_ROOT_STORE_INITIALIZER))\n];\n\n/**\n * The `NGXS_FEATURE_ENVIRONMENT_INITIALIZER` functions as an environment initializer\n * at the `Route` level. Angular Router creates an environment route injector for each\n * matched route where navigation occurs. The injector is created once, ensuring that\n * the feature states initialization only happens once as well.\n */\nexport const NGXS_FEATURE_ENVIRONMENT_INITIALIZER: Provider = [\n { provide: NGXS_FEATURE_STORE_INITIALIZER, useFactory: featureStatesInitializer },\n provideEnvironmentInitializer(() => inject(NGXS_FEATURE_STORE_INITIALIZER))\n];\n","import { NgModule } from '@angular/core';\n\nimport { rootStoreInitializer } from '../standalone-features/initializers';\n\n/**\n * @ignore\n */\n@NgModule()\nexport class NgxsRootModule {\n constructor() {\n rootStoreInitializer();\n }\n}\n","import { NgModule } from '@angular/core';\n\nimport { featureStatesInitializer } from '../standalone-features/initializers';\n\n/**\n * @ignore\n */\n@NgModule()\nexport class NgxsFeatureModule {\n constructor() {\n featureStatesInitializer();\n }\n}\n","import { APP_BOOTSTRAP_LISTENER, Provider, inject } from '@angular/core';\nimport { ɵStateClass, ɵNgxsAppBootstrappedState } from '@ngxs/store/internals';\n\nimport { NgxsModuleOptions, ROOT_STATE_TOKEN, NGXS_OPTIONS } from '../symbols';\n\n/**\n * This function provides the required providers when invoking `NgxsModule.forRoot`\n * or `provideStore`. It is shared between the NgModule and standalone APIs.\n */\nexport function getRootProviders(\n states: ɵStateClass[],\n options: NgxsModuleOptions\n): Provider[] {\n return [\n ...states,\n {\n provide: ROOT_STATE_TOKEN,\n useValue: states\n },\n {\n provide: APP_BOOTSTRAP_LISTENER,\n useFactory: () => {\n const appBootstrappedState = inject(ɵNgxsAppBootstrappedState);\n return () => appBootstrappedState.bootstrap();\n },\n multi: true\n },\n {\n provide: NGXS_OPTIONS,\n useValue: options\n }\n ];\n}\n","import { Provider } from '@angular/core';\nimport { ɵStateClass } from '@ngxs/store/internals';\n\nimport { FEATURE_STATE_TOKEN } from '../symbols';\nimport { PluginManager } from '../plugin-manager';\n\n/**\n * This function provides the required providers when calling `NgxsModule.forFeature`\n * or `provideStates`. It is shared between the NgModule and standalone APIs.\n */\nexport function getFeatureProviders(states: ɵStateClass[]): Provider[] {\n return [\n PluginManager,\n ...states,\n {\n provide: FEATURE_STATE_TOKEN,\n multi: true,\n useValue: states\n }\n ];\n}\n","import { ModuleWithProviders, NgModule } from '@angular/core';\nimport { ɵStateClass } from '@ngxs/store/internals';\n\nimport { NgxsModuleOptions } from './symbols';\nimport { NgxsRootModule } from './modules/ngxs-root.module';\nimport { NgxsFeatureModule } from './modules/ngxs-feature.module';\nimport { getRootProviders } from './standalone-features/root-providers';\nimport { getFeatureProviders } from './standalone-features/feature-providers';\n\n@NgModule()\nexport class NgxsModule {\n static forRoot(\n states: ɵStateClass[] = [],\n options: NgxsModuleOptions = {}\n ): ModuleWithProviders<NgxsRootModule> {\n return {\n ngModule: NgxsRootModule,\n providers: getRootProviders(states, options)\n };\n }\n\n static forFeature(states: ɵStateClass[] = []): ModuleWithProviders<NgxsFeatureModule> {\n return {\n ngModule: NgxsFeatureModule,\n providers: getFeatureProviders(states)\n };\n }\n}\n","import { ɵActionOptions, ɵensureStoreMetadata, ɵhasOwnProperty } from '@ngxs/store/internals';\n\nimport { ActionDef, ActionType } from '../actions/symbols';\nimport { throwActionDecoratorError } from '../configs/messages.config';\nimport { StateContext } from '../symbols';\n\n/**\n * Given an action class, returns its payload.\n */\ntype ActionToPayload<Action extends ActionType> =\n Action extends ActionDef<any, infer ActionPayload> ? ActionPayload : never;\n\n/**\n * Given a list of action classes, returns the union of their payloads.\n */\ntype ActionsToPayload<Actions extends readonly ActionType[]> = {\n [K in keyof Actions]: ActionToPayload<Actions[K]>;\n}[number];\n\n/**\n * Given an action class or a list of action classes, returns the union of their payloads.\n */\ntype ActionOrActionsToPayload<ActionOrActions> = ActionOrActions extends ActionType\n ? ActionToPayload<ActionOrActions>\n : ActionOrActions extends ActionType[]\n ? ActionsToPayload<ActionOrActions>\n : never;\n\n/**\n * Describes what methods can be decorated with an `@Action` decorator that has been passed the given action(s).\n */\ntype HandlerTypedPropertyDescriptor<ActionOrActions> =\n | TypedPropertyDescriptor<() => any>\n | TypedPropertyDescriptor<(stateContext: StateContext<any>) => any>\n | TypedPropertyDescriptor<\n (\n stateContext: StateContext<any>,\n action: ActionOrActionsToPayload<ActionOrActions>\n ) => any\n >;\n\n/**\n * The result of a call to the `@Action()` decorator with the given action(s) as its first argument.\n */\ntype ActionDecorator<ActionOrActions extends ActionType | ActionType[]> = (\n target: any,\n name: string | symbol,\n _descriptor: HandlerTypedPropertyDescriptor<ActionOrActions>\n) => void;\n\n/**\n * Decorates a method with action information.\n */\nexport function Action<ActionOrActions extends ActionType | ActionType[]>(\n actions: ActionOrActions,\n options?: ɵActionOptions\n): ActionDecorator<ActionOrActions> {\n return (\n target: any,\n name: string | symbol,\n // This parameter ensures that the decorated method has a call signature that could be passed an instance of the given action(s).\n _descriptor: HandlerTypedPropertyDescriptor<ActionOrActions>\n ): void => {\n if (typeof ngDevMode !== 'undefined' && ngDevMode) {\n const isStaticMethod = ɵhasOwnProperty(target, 'prototype');\n\n if (isStaticMethod) {\n throwActionDecoratorError();\n }\n }\n\n const meta = ɵensureStoreMetadata(target.constructor);\n\n const actionArray = Array.isArray(actions) ? actions : [actions];\n\n for (const action of actionArray) {\n const type = action.type;\n\n if (!meta.actions[type]) {\n meta.actions[type] = [];\n }\n\n meta.actions[type].push({\n fn: name,\n options: options || {},\n type\n });\n }\n };\n}\n","import {\n ɵStateClass,\n ɵMETA_KEY,\n ɵMETA_OPTIONS_KEY,\n ɵMetaDataModel,\n ɵStateClassInternal,\n ɵStoreOptions,\n ɵensureStoreMetadata,\n ɵhasOwnProperty\n} from '@ngxs/store/internals';\n\nimport { ensureStateNameIsValid } from '../utils/store-validators';\n\n/**\n * Decorates a class with ngxs state information.\n */\nexport function State<T>(options: ɵStoreOptions<T>) {\n return (target: ɵStateClass): void => {\n const stateClass: ɵStateClassInternal = target;\n const inherited = Object.getPrototypeOf(stateClass) as ɵStateClassInternal;\n const meta = ɵensureStoreMetadata(stateClass);\n const mergedOptions = { ...(inherited[ɵMETA_OPTIONS_KEY] || {}), ...options };\n\n // Apply merged options to metadata.\n mutateMetaData(meta, inherited, mergedOptions);\n stateClass[ɵMETA_OPTIONS_KEY] = mergedOptions;\n };\n}\n\n// Updates metadata using inherited and current options\nfunction mutateMetaData<T>(\n meta: ɵMetaDataModel,\n inherited: ɵStateClassInternal,\n options: ɵStoreOptions<T>\n): void {\n const { name, defaults, children } = options;\n const stateName = typeof name === 'string' ? name : name?.getName?.() || null;\n\n if (typeof ngDevMode !== 'undefined' && ngDevMode) {\n ensureStateNameIsValid(stateName);\n }\n\n if (ɵhasOwnProperty(inherited, ɵMETA_KEY)) {\n const inheritedMeta = inherited[ɵMETA_KEY] || <ɵMetaDataModel>{};\n meta.actions = { ...meta.actions, ...inheritedMeta.actions };\n }\n\n meta.name = stateName;\n meta.defaults = defaults;\n meta.children = children;\n}\n","import type { Observable } from 'rxjs';\nimport { ɵExtractTokenType, StateToken } from '@ngxs/store/internals';\n\nimport { SelectFactory } from './select-factory';\nimport type { NgxsConfig } from '../../symbols';\nimport { compliantPropGetter, fastPropGetter } from '../../internal/internals';\n\n/**\n * Get a deeply nested value. Example:\n *\n * getValue({ foo: bar: [] }, 'foo.bar') //=> []\n *\n * @ignore\n *\n * Marked for removal. It's only used within `createSelectorFn`.\n */\nexport function propGetter(paths: string[], config: NgxsConfig) {\n if (config?.compatibility?.strictContentSecurityPolicy) {\n return compliantPropGetter(paths);\n } else {\n return fastPropGetter(paths);\n }\n}\n\nfunction throwSelectFactoryNotConnectedError(): never {\n throw new Error('You have forgotten to import the NGXS module!');\n}\n\nconst DOLLAR_CHAR_CODE = 36;\n\nexport function createSelectObservable<T = any>(selector: any): Observable<T> {\n if (!SelectFactory.store) {\n throwSelectFactoryNotConnectedError();\n }\n return SelectFactory.store!.select(selector);\n}\n\nexport function createSelectorFn(name: string, rawSelector?: any, paths: string[] = []): any {\n rawSelector = !rawSelector ? removeDollarAtTheEnd(name) : rawSelector;\n\n if (typeof rawSelector === 'string') {\n const propsArray: string[] = paths.length\n ? [rawSelector, ...paths]\n : rawSelector.split('.');\n return propGetter(propsArray, SelectFactory.config!);\n }\n\n return rawSelector;\n}\n\n/**\n * @example If `foo$` => make it just `foo`\n */\nexport function removeDollarAtTheEnd(name: string): string {\n const lastCharIndex: number = name.length - 1;\n const dollarAtTheEnd: boolean = name.charCodeAt(lastCharIndex) === DOLLAR_CHAR_CODE;\n return dollarAtTheEnd ? name.slice(0, lastCharIndex) : name;\n}\n\nexport type PropertyType<T> =\n T extends StateToken<any>\n ? Observable<ɵExtractTokenType<T>>\n : T extends (...args: any[]) => any\n ? Observable<ReturnType<T>>\n : any;\n","import { createSelectObservable, createSelectorFn, PropertyType } from './symbols';\n\n/**\n * Decorator for selecting a slice of state from the store.\n *\n * @deprecated\n * Read the deprecation notice at this link: https://ngxs.io/deprecations/select-decorator-deprecation.\n */\nexport function Select<T>(rawSelector?: T, ...paths: string[]): PropertyDecorator {\n return function (target, key): void {\n const name: string = key.toString();\n const selectorId = `__${name}__selector`;\n const selector = createSelectorFn(name, rawSelector, paths);\n\n Object.defineProperties(target, {\n [selectorId]: {\n writable: true,\n enumerable: false,\n configurable: true\n },\n [name]: {\n enumerable: true,\n configurable: true,\n get(): PropertyType<T> {\n return this[selectorId] || (this[selectorId] = createSelectObservable(selector));\n }\n }\n });\n };\n}\n","import {\n ɵSelectorMetaDataModel,\n ɵSharedSelectorOptions,\n ɵensureSelectorMetadata\n} from '@ngxs/store/internals';\n\nimport { CreationMetadata } from './selector-models';\n\nconst SELECTOR_OPTIONS_META_KEY = 'NGXS_SELECTOR_OPTIONS_META';\n\nexport const selectorOptionsMetaAccessor = {\n getOptions: (target: any): ɵSharedSelectorOptions => {\n return (<any>target)?.[SELECTOR_OPTIONS_META_KEY] || {};\n },\n defineOptions: (target: any, options: ɵSharedSelectorOptions) => {\n if (!target) return;\n (<any>target)[SELECTOR_OPTIONS_META_KEY] = options;\n }\n};\n\nexport function setupSelectorMetadata<T extends (...args: any[]) => any>(\n originalFn: T,\n creationMetadata: Partial<CreationMetadata> | undefined\n) {\n const selectorMetaData = ɵensureSelectorMetadata(originalFn);\n selectorMetaData.originalFn = originalFn;\n let getExplicitSelectorOptions = () => ({});\n if (creationMetadata) {\n selectorMetaData.containerClass = creationMetadata.containerClass;\n selectorMetaData.selectorName = creationMetadata.selectorName || null;\n getExplicitSelectorOptions =\n creationMetadata.getSelectorOptions || getExplicitSelectorOptions;\n }\n const selectorMetaDataClone = { ...selectorMetaData };\n selectorMetaData.getSelectorOptions = () =>\n getLocalSelectorOptions(selectorMetaDataClone, getExplicitSelectorOptions());\n return selectorMetaData;\n}\n\nfunction getLocalSelectorOptions(\n selectorMetaData: ɵSelectorMetaDataModel,\n explicitOptions: ɵSharedSelectorOptions\n): ɵSharedSelectorOptions {\n return {\n ...(selectorOptionsMetaAccessor.getOptions(selectorMetaData.containerClass) || {}),\n ...(selectorOptionsMetaAccessor.getOptions(selectorMetaData.originalFn) || {}),\n ...(selectorMetaData.getSelectorOptions() || {}),\n ...explicitOptions\n };\n}\n","import { ɵSharedSelectorOptions } from '@ngxs/store/internals';\n\nimport { selectorOptionsMetaAccessor } from '../selectors/selector-metadata';\n\n/**\n * Decorator for setting selector options at a method or class level.\n */\nexport function SelectorOptions(options: ɵSharedSelectorOptions) {\n return <ClassDecorator & MethodDecorator>(\n function decorate<T>(\n target: any,\n methodName: string,\n descriptor: TypedPropertyDescriptor<T>\n ) {\n if (methodName) {\n descriptor ||= Object.getOwnPropertyDescriptor(target, methodName)!;\n // Method Decorator\n const originalFn = descriptor.value || (<any>descriptor).originalFn;\n if (originalFn) {\n selectorOptionsMetaAccessor.defineOptions(originalFn, options);\n }\n } else {\n // Class Decorator\n selectorOptionsMetaAccessor.defineOptions(target, options);\n }\n }\n );\n}\n","import { CreationMetadata } from './selector-models';\nimport { setupSelectorMetadata } from './selector-metadata';\nimport { createMemoizedSelectorFn, createRootSelectorFactory } from './selector-utils';\n\nimport { ɵSelectorDef, ɵSelectorReturnType } from './selector-types.util';\n\ntype SelectorArg = ɵSelectorDef<any>;\n\n/**\n * Function for creating a selector\n * @param selectors The selectors to use to create the arguments of this function\n * @param originalFn The original function being made into a selector\n * @param creationMetadata\n */\nexport function createSelector<\n S1 extends SelectorArg,\n TProjector extends (s1: ɵSelectorReturnType<S1>) => any\n>(\n selectors: [S1],\n projector: TProjector,\n creationMetadata?: Partial<CreationMetadata>\n): TProjector;\n\nexport function createSelector<\n S1 extends SelectorArg,\n S2 extends SelectorArg,\n TProjector extends (s1: ɵSelectorReturnType<S1>, s2: ɵSelectorReturnType<S2>) => any\n>(\n selectors: [S1, S2],\n projector: TProjector,\n creationMetadata?: Partial<CreationMetadata>\n): TProjector;\n\nexport function createSelector<\n S1 extends SelectorArg,\n S2 extends SelectorArg,\n S3 extends SelectorArg,\n TProjector extends (\n s1: ɵSelectorReturnType<S1>,\n s2: ɵSelectorReturnType<S2>,\n s3: ɵSelectorReturnType<S3>\n ) => any\n>(\n selectors: [S1, S2, S3],\n projector: TProjector,\n creationMetadata?: Partial<CreationMetadata>\n): TProjector;\n\nexport function createSelector<\n S1 extends SelectorArg,\n S2 extends SelectorArg,\n S3 extends SelectorArg,\n S4 extends SelectorArg,\n TProjector extends (\n s1: ɵSelectorReturnType<S1>,\n s2: ɵSelectorReturnType<S2>,\n s3: ɵSelectorReturnType<S3>,\n s4: ɵSelectorReturnType<S4>\n ) => any\n>(\n selectors: [S1, S2, S3, S4],\n projector: TProjector,\n creationMetadata?: Partial<CreationMetadata>\n): TProjector;\n\nexport function createSelector<\n S1 extends SelectorArg,\n S2 extends SelectorArg,\n S3 extends SelectorArg,\n S4 extends SelectorArg,\n S5 extends SelectorArg,\n TProjector extends (\n s1: ɵSelectorReturnType<S1>,\n s2: ɵSelectorReturnType<S2>,\n s3: ɵSelectorReturnType<S3>,\n s4: ɵSelectorReturnType<S4>,\n s5: ɵSelectorReturnType<S5>\n ) => any\n>(\n selectors: [S1, S2, S3, S4, S5],\n projector: TProjector,\n creationMetadata?: Partial<CreationMetadata>\n): TProjector;\n\nexport function createSelector<\n S1 extends SelectorArg,\n S2 extends SelectorArg,\n S3 extends SelectorArg,\n S4 extends SelectorArg,\n S5 extends SelectorArg,\n S6 extends SelectorArg,\n TProjector extends (\n s1: ɵSelectorReturnType<S1>,\n s2: ɵSelectorReturnType<S2>,\n s3: ɵSelectorReturnType<S3>,\n s4: ɵSelectorReturnType<S4>,\n s5: ɵSelectorReturnType<S5>,\n s6: ɵSelectorReturnType<S6>\n ) => any\n>(\n selectors: [S1, S2, S3, S4, S5, S6],\n projector: TProjector,\n creationMetadata?: Partial<CreationMetadata>\n): TProjector;\n\nexport function createSelector<\n S1 extends SelectorArg,\n S2 extends SelectorArg,\n S3 extends SelectorArg,\n S4 extends SelectorArg,\n S5 extends SelectorArg,\n S6 extends SelectorArg,\n S7 extends SelectorArg,\n TProjector extends (\n s1: ɵSelectorReturnType<S1>,\n s2: ɵSelectorReturnType<S2>,\n s3: ɵSelectorReturnType<S3>,\n s4: ɵSelectorReturnType<S4>,\n s5: ɵSelectorReturnType<S5>,\n s6: ɵSelectorReturnType<S6>,\n s7: ɵSelectorReturnType<S7>\n ) => any\n>(\n selectors: [S1, S2, S3, S4, S5, S6, S7],\n projector: TProjector,\n creationMetadata?: Partial<CreationMetadata>\n): TProjector;\n\nexport function createSelector<\n S1 extends SelectorArg,\n S2 extends SelectorArg,\n S3 extends SelectorArg,\n S4 extends SelectorArg,\n S5 extends SelectorArg,\n S6 extends SelectorArg,\n S7 extends SelectorArg,\n S8 extends SelectorArg,\n TProjector extends (\n s1: ɵSelectorReturnType<S1>,\n s2: ɵSelectorReturnType<S2>,\n s3: ɵSelectorReturnType<S3>,\n s4: ɵSelectorReturnType<S4>,\n s5: ɵSelectorReturnType<S5>,\n s6: ɵSelectorReturnType<S6>,\n s7: ɵSelectorReturnType<S7>,\n s8: ɵSelectorReturnType<S8>\n ) => any\n>(\n selectors: [S1, S2, S3, S4, S5, S6, S7, S8],\n projector: TProjector,\n creationMetadata?: Partial<CreationMetadata>\n): TProjector;\n\nexport function createSelector<T extends (...args: any[]) => any>(\n selectors: SelectorArg[] | undefined,\n projector: T,\n creationMetadata?: Partial<CreationMetadata>\n): T;\n\nexport function createSelector<T extends (...args: any[]) => any>(\n selectors: SelectorArg[] | undefined,\n projector: T,\n creationMetadata?: Partial<CreationMetadata>\n) {\n const memoizedFn = createMemoizedSelectorFn<T>(projector, creationMetadata);\n\n const selectorMetaData = setupSelectorMetadata<T>(projector, creationMetadata);\n\n selectorMetaData.makeRootSelector = createRootSelectorFactory<T>(\n selectorMetaData,\n selectors,\n memoizedFn\n );\n\n return memoizedFn;\n}\n","import { throwSelectorDecoratorError } from '../../configs/messages.config';\nimport { createSelector } from '../../selectors/create-selector';\nimport { SelectorDefTuple, SelectorType } from './symbols';\n\n/**\n * Decorator for creating a state selector for the current state.\n */\nexport function Selector(): SelectorType<unknown>;\n\n/**\n * Decorator for creating a state selector from the provided selectors (and optionally the container State, depending on the applicable Selector Options).\n */\nexport function Selector<T extends SelectorDefTuple>(selectors: T): SelectorType<T>;\n\nexport function Selector<T extends SelectorDefTuple = []>(\n selectors?: T\n): SelectorType<unknown> | SelectorType<T> {\n return <U>(\n target: any,\n key: string | symbol,\n descriptor?: TypedPropertyDescriptor<(...states: any[]) => U>\n ): TypedPropertyDescriptor<(...states: any[]) => U> | void => {\n descriptor ||= Object.getOwnPropertyDescriptor(target, key)!;\n\n const originalFn = descriptor?.value;\n\n if (typeof ngDevMode !== 'undefined' && ngDevMode) {\n if (typeof originalFn !== 'function') {\n throwSelectorDecoratorError();\n }\n }\n\n const memoizedFn = createSelector(selectors, originalFn as any, {\n containerClass: target,\n selectorName: key.toString(),\n getSelectorOptions() {\n return {};\n }\n });\n const newDescriptor = {\n configurable: true,\n get() {\n return memoizedFn;\n },\n originalFn\n };\n return newDescriptor;\n };\n}\n","import { inject, Injectable } from '@angular/core';\nimport {\n type StateToken,\n type ɵActionOptions,\n ɵNgxsActionRegistry\n} from '@ngxs/store/internals';\nimport type { Observable } from 'rxjs';\n\nimport type { ActionDef } from './symbols';\nimport type { StateContext } from '../symbols';\nimport { InternalActionHandlerFactory } from '../internal/action-handler-factory';\n\n@Injectable({ providedIn: 'root' })\nexport class ActionDirector {\n private _registry = inject(ɵNgxsActionRegistry);\n private _actionHandlerFactory = inject(InternalActionHandlerFactory);\n\n attachAction<TStateModel, TActionType extends ActionDef>(\n stateToken: StateToken<TStateModel>,\n Action: TActionType,\n handlerFn: (\n ctx: StateContext<TStateModel>,\n action: InstanceType<TActionType>\n ) => void | Observable<void> | Promise<void>,\n options: ɵActionOptions = {}\n ) {\n const actionHandler = this._actionHandlerFactory.createActionHandler(\n stateToken.getName(),\n handlerFn,\n options\n );\n const detach = this._registry.register(Action.type, actionHandler);\n return { detach };\n }\n}\n","import { ModuleWithProviders, NgModule, makeEnvironmentProviders } from '@angular/core';\n\nimport { NgxsDevelopmentOptions, NGXS_DEVELOPMENT_OPTIONS } from './symbols';\nimport { NgxsUnhandledActionsLogger } from './ngxs-unhandled-actions-logger';\n\n@NgModule()\nexport class NgxsDevelopmentModule {\n static forRoot(options: NgxsDevelopmentOptions): ModuleWithProviders<NgxsDevelopmentModule> {\n return {\n ngModule: NgxsDevelopmentModule,\n providers: [\n NgxsUnhandledActionsLogger,\n { provide: NGXS_DEVELOPMENT_OPTIONS, useValue: options }\n ]\n };\n }\n}\n\nexport function withNgxsDevelopmentOptions(options: NgxsDevelopmentOptions) {\n return makeEnvironmentProviders([\n NgxsUnhandledActionsLogger,\n { provide: NGXS_DEVELOPMENT_OPTIONS, useValue: options }\n ]);\n}\n","import { Injectable, makeEnvironmentProviders } from '@angular/core';\nimport { InternalNgxsExecutionStrategy } from './execution-strategy';\nimport type { NgxsExecutionStrategy } from './symbols';\n\n@Injectable({ providedIn: 'root' })\nexport class NoopNgxsExecutionStrategy implements NgxsExecutionStrategy {\n enter<T>(func: () => T): T {\n return func();\n }\n\n leave<T>(func: () => T): T {\n return func();\n }\n}\n\n/**\n * Determines the execution context to perform async operations inside. An implementation can be\n * provided to override the default behaviour where the async operations are run\n * outside Angular's zone but all observable behaviours of NGXS are run back inside Angular's zone.\n * These observable behaviours are from:\n * `store.selectSignal(...)`, `store.select(...)`, `actions.subscribe(...)` or `store.dispatch(...).subscribe(...)`\n * Every `zone.run` causes Angular to run change detection on the whole tree (`app.tick()`) so of your\n * application doesn't rely on zone.js running change detection then you can switch to the\n * `NoopNgxsExecutionStrategy` that doesn't interact with zones.\n */\nexport function withNgxsNoopExecutionStrategy() {\n return makeEnvironmentProviders([\n {\n provide: InternalNgxsExecutionStrategy,\n useExisting: NoopNgxsExecutionStrategy\n }\n ]);\n}\n","import { ɵgetSelectorMetadata, ɵgetStoreMetadata } from '@ngxs/store/internals';\nimport { ɵSelectorDef } from './selector-types.util';\nimport { NgZone } from '@angular/core';\n\nfunction getMissingMetaDataError(\n selector: ɵSelectorDef<any>,\n context: { prefix?: string; noun?: string } = {}\n) {\n const metadata = ɵgetSelectorMetadata(selector) || ɵgetStoreMetadata(selector as any);\n if (!metadata) {\n return new Error(\n `${context.prefix}The value provided as the ${context.noun} is not a valid selector.`\n );\n }\n return null;\n}\n\nexport function ensureValidSelector(\n selector: ɵSelectorDef<any>,\n context: { prefix?: string; noun?: string } = {}\n) {\n const noun = context.noun || 'selector';\n const prefix = context.prefix ? context.prefix + ': ' : '';\n ensureValueProvided(selector, { noun, prefix: context.prefix });\n const error = getMissingMetaDataError(selector, { noun, prefix });\n if (error) {\n // If we have used this utility within a state class, we may be\n // before the @State or @Selector decorators have been applied.\n // wait until the next microtask to verify.\n // Theoretically this situation is only encountered when the javascript\n // files are being loaded and we are outside the angular zone.\n if (!NgZone.isInAngularZone()) {\n Promise.resolve().then(() => {\n const errorAgain = getMissingMetaDataError(selector, { noun, prefix });\n if (errorAgain) {\n // Throw the originally captured error so that the stack trace shows the\n // original utility call site.\n console.error(error);\n }\n });\n } else {\n throw error;\n }\n }\n}\n\nexport function ensureValueProvided(\n value: any,\n context: { prefix?: string; noun?: string } = {}\n) {\n const noun = context.noun || 'value';\n const prefix = context.prefix ? context.prefix + ': ' : '';\n if (!value) {\n throw new Error(`${prefix}A ${noun} must be provided.`);\n }\n}\n","import { createSelector } from './create-selector';\nimport { ensureValidSelector, ensureValueProvided } from './selector-checks.util';\nimport { TypedSelector } from './selector-types.util';\n\ninterface SelectorMap {\n [key: string]: TypedSelector<any>;\n}\n\ntype ModelSelector<T extends SelectorMap> = (...args: any[]) => MappedResult<T>;\n\ntype MappedResult<TSelectorMap> = {\n [P in keyof TSelectorMap]: TSelectorMap[P] extends TypedSelector<infer R> ? R : never;\n};\n\nexport function createModelSelector<T extends SelectorMap>(selectorMap: T): ModelSelector<T> {\n const selectorKeys = Object.keys(selectorMap);\n const selectors = Object.values(selectorMap);\n\n if (typeof ngDevMode !== 'undefined' && ngDevMode) {\n ensureValidSelectorMap<T>({\n prefix: '[createModelSelector]',\n selectorMap,\n selectorKeys,\n selectors\n });\n }\n\n return createSelector(selectors, (...args) => {\n return selectorKeys.reduce((obj, key, index) => {\n (obj as any)[key] = args[index];\n return obj;\n }, {} as MappedResult<T>);\n }) as ModelSelector<T>;\n}\n\nfunction ensureValidSelectorMap<T extends SelectorMap>({\n prefix,\n selectorMap,\n selectorKeys,\n selectors\n}: {\n prefix: string;\n selectorMap: T;\n selectorKeys: string[];\n selectors: TypedSelector<any>[];\n}) {\n ensureValueProvided(selectorMap, { prefix, noun: 'selector map' });\n ensureValueProvided(typeof selectorMap === 'object', { prefix, noun: 'valid selector map' });\n ensureValueProvided(selectorKeys.length, { prefix, noun: 'non-empty selector map' });\n selectors.forEach((selector, index) =>\n ensureValidSelector(selector, {\n prefix,\n noun: `selector for the '${selectorKeys[index]}' property`\n })\n );\n}\n","import { createSelector } from './create-selector';\nimport { ensureValidSelector } from './selector-checks.util';\nimport { TypedSelector } from './selector-types.util';\n\ntype KeysToValues<T, Keys extends (keyof T)[]> = {\n [Index in keyof Keys]: Keys[Index] extends keyof T ? T[Keys[Index]] : never;\n};\n\nexport function createPickSelector<TModel, Keys extends (keyof TModel)[]>(\n selector: TypedSelector<TModel>,\n keys: [...Keys]\n) {\n if (typeof ngDevMode !== 'undefined' && ngDevMode) {\n ensureValidSelector(selector, { prefix: '[createPickSelector]' });\n }\n const validKeys = keys.filter(Boolean);\n const selectors = validKeys.map(key => createSelector([selector], (s: TModel) => s[key]));\n return createSelector([...selectors], (...props: KeysToValues<TModel, Keys>) => {\n return validKeys.reduce(\n (acc, key, index) => {\n acc[key] = props[index];\n return acc;\n },\n {} as Pick<TModel, Keys[number]>\n );\n });\n}\n","import { createSelector } from './create-selector';\nimport { ensureValidSelector } from './selector-checks.util';\nimport { ɵSelectorDef } from './selector-types.util';\n\nexport type PropertySelectors<TModel> = {\n [P in keyof NonNullable<TModel>]-?: (\n model: TModel\n ) => TModel extends null | undefined ? undefined : NonNullable<TModel>[P];\n};\n\nexport function createPropertySelectors<TModel>(\n parentSelector: ɵSelectorDef<TModel>\n): PropertySelectors<TModel> {\n if (typeof ngDevMode !== 'undefined' && ngDevMode) {\n ensureValidSelector(parentSelector, {\n prefix: '[createPropertySelectors]',\n noun: 'parent selector'\n });\n }\n const cache: Partial<PropertySelectors<TModel>> = {};\n return new Proxy<PropertySelectors<TModel>>(\n {} as unknown as PropertySelectors<TModel>,\n {\n get(_target: any, prop: keyof TModel) {\n const selector =\n cache[prop] ||\n (createSelector(\n [parentSelector],\n (s: TModel) => s?.[prop]\n ) as PropertySelectors<TModel>[typeof prop]);\n cache[prop] = selector;\n return selector;\n }\n } as ProxyHandler<PropertySelectors<TModel>>\n );\n}\n","import { ApplicationRef, inject, PendingTasks } from '@angular/core';\nimport { buffer, debounceTime, filter } from 'rxjs';\n\nimport { Actions, ActionStatus } from './actions-stream';\nimport { withNgxsPreboot } from './standalone-features/preboot';\n\n/**\n * This feature that contributes to app stability, which is required during\n * server-side rendering. With asynchronous actions being dispatched and handled,\n * Angular is unaware of them in zoneless mode and doesn't know whether the app is\n * still unstable. This may prematurely serialize the final HTML that is sent to the client.\n * Including `withNgxsPendingTasks` in your `provideStore` for your SSR\n * app will resolve the above issue.\n */\nexport function withNgxsPendingTasks() {\n return withNgxsPreboot(() => {\n const actions$ = inject(Actions);\n const appRef = inject(ApplicationRef);\n const pendingTasks = inject(PendingTasks);\n\n // Removing a pending task via the public API forces a scheduled tick, ensuring that\n // stability is async and delayed until there was at least an opportunity to run\n // app synchronization.\n // Adding a new task every time an action is dispatched drastically increases the\n // number of change detection cycles because removing a task schedules a new change\n // detection cycle.\n // If 10 actions are dispatched with synchronous action handlers, this would trigger\n // 10 change detection cycles in a row, potentially leading to an\n // `INFINITE_CHANGE_DETECTION` error.\n let removeTask: VoidFunction | null = null;\n\n const executedActions = new Set<unknown>();\n\n // If the app is forcely destroyed before all actions are completed,\n // we clean up the set of actions being executed to prevent memory leaks\n // and remove the pending task to stabilize the app.\n appRef.onDestroy(() => executedActions.clear());\n\n let isStable = false;\n appRef.whenStable().then(() => {\n isStable = true;\n });\n\n const subscription = actions$\n .pipe(\n filter(context => {\n if (context.status === ActionStatus.Dispatched) {\n executedActions.add(context.action);\n removeTask ||= pendingTasks.add();\n return false;\n } else {\n return true;\n }\n }),\n // Every time an action is completed, we debounce the stream to ensure only one\n // task is removed, even if multiple synchronous actions are completed in a row.\n // We use `buffer` to collect action contexts because, if we only use\n // `debounceTime(0)`, we may lose action contexts that are never removed from the set.\n buffer(actions$.pipe(debounceTime(0)))\n )\n .subscribe(contexts => {\n for (const context of contexts) {\n if (!executedActions.has(context.action)) {\n continue;\n }\n\n executedActions.delete(context.action);\n\n // Mark app as stable once all of the debounced actions have completed.\n if (executedActions.size === 0) {\n removeTask?.();\n removeTask = null;\n if (isStable) {\n // Stop contributing to stability once the application has become stable,\n // which may happen on the server before the platform is destroyed or in\n // the browser once hydration is complete.\n subscription.unsubscribe();\n }\n }\n }\n });\n });\n}\n","import { EnvironmentProviders, makeEnvironmentProviders } from '@angular/core';\nimport { ɵStateClass } from '@ngxs/store/internals';\n\nimport { NgxsModuleOptions } from '../symbols';\nimport { getRootProviders } from './root-providers';\nimport { NGXS_ROOT_ENVIRONMENT_INITIALIZER } from './initializers';\n\n/**\n * This function provides global store providers and initializes the store.\n *\n * ```ts\n * bootstrapApplication(AppComponent, {\n * providers: [provideStore([CountriesState])]\n * });\n * ```\n *\n * The `provideStore` may be optionally called with a config before the list of features:\n *\n * ```ts\n * provideStore([CountriesState], {\n * developmentMode: !environment.production\n * });\n * ```\n */\nexport function provideStore(\n states?: ɵStateClass[],\n ...features: EnvironmentProviders[]\n): EnvironmentProviders;\n\nexport function provideStore(\n states?: ɵStateClass[],\n options?: NgxsModuleOptions,\n ...features: EnvironmentProviders[]\n): EnvironmentProviders;\n\nexport function provideStore(\n states: ɵStateClass[] = [],\n ...optionsAndFeatures: any[]\n): EnvironmentProviders {\n const features: EnvironmentProviders[] = [];\n // Options are empty by default (see `forRoot`).\n let options: NgxsModuleOptions = {};\n\n if (optionsAndFeatures.length > 0) {\n if (isEnvironmentProvider(optionsAndFeatures[0])) {\n features.push(...optionsAndFeatures);\n } else {\n options = optionsAndFeatures[0];\n features.push(...optionsAndFeatures.slice(1));\n }\n }\n\n return makeEnvironmentProviders([\n ...getRootProviders(states, options),\n NGXS_ROOT_ENVIRONMENT_INITIALIZER,\n features\n ]);\n}\n\nfunction isEnvironmentProvider(target: any): target is EnvironmentProviders {\n return !!target.ɵproviders;\n}\n","import { EnvironmentProviders, makeEnvironmentProviders } from '@angular/core';\nimport { ɵStateClass } from '@ngxs/store/internals';\n\nimport { getFeatureProviders } from './feature-providers';\nimport { NGXS_FEATURE_ENVIRONMENT_INITIALIZER } from './initializers';\n\n/**\n * This version serves as a standalone alternative to `NgxsModule.forFeature`.\n * It can be used in a similar manner to register feature states, but at the\n * `Route` providers level:\n *\n * ```ts\n * const routes: Routes = [\n * {\n * path: 'products',\n * loadComponent: async () => {...},\n * providers: [provideStates([ProductsState])]\n * }\n * ];\n * ```\n *\n * To lazy-load feature states at the route level,\n * please refer to the `lazyProvider` utility function.\n */\nexport function provideStates(\n states: ɵStateClass[],\n ...features: EnvironmentProviders[]\n): EnvironmentProviders {\n return makeEnvironmentProviders([\n ...getFeatureProviders(states),\n features,\n NGXS_FEATURE_ENVIRONMENT_INITIALIZER\n ]);\n}\n","import {\n EnvironmentProviders,\n Type,\n inject,\n makeEnvironmentProviders,\n provideEnvironmentInitializer\n} from '@angular/core';\nimport { NGXS_PLUGINS, NgxsPlugin, NgxsPluginFn, ɵisPluginClass } from '@ngxs/store/plugins';\n\nimport { PluginManager } from '../plugin-manager';\n\n/**\n * This function registers a custom global plugin for the state.\n *\n * ```ts\n * bootstrapApplication(AppComponent, {\n * providers: [\n * provideStore(\n * [CountriesState],\n * withNgxsPlugin(LogoutPlugin)\n * )\n * ]\n * });\n * ```\n */\nexport function withNgxsPlugin(plugin: Type<NgxsPlugin> | NgxsPluginFn): EnvironmentProviders {\n return makeEnvironmentProviders([\n ɵisPluginClass(plugin)\n ? { provide: NGXS_PLUGINS, useClass: plugin, multi: true }\n : { provide: NGXS_PLUGINS, useValue: plugin, multi: true },\n // We should inject the `PluginManager` to retrieve `NGXS_PLUGINS` and\n // register those plugins. The plugin can be added from inside the child\n // route, so the plugin manager should be re-injected.\n provideEnvironmentInitializer(() => inject(PluginManager))\n ]);\n}\n","import { Signal, inject } from '@angular/core';\n\nimport { Store } from '../store';\nimport { TypedSelector } from '../selectors';\n\n/**\n * This function serves as a utility and has multiple purposes.\n * Firstly, it allows you to select properties from the state class\n * without having to inject the store class and use `this.store.selectSignal`,\n * resulting in a more concise implementation. Secondly, it can be used with\n * other solutions such as NgRx signal store with its `signalStoreFeature` or\n * `withComputed` functionalities.\n *\n * Please note that it's named `select` instead of `selectSignal` because\n * signals are evolving into first-class primitives in Angular, displacing other\n * primitives such as observables. Observables represent a stream of events,\n * whereas signals represent a single value changing over time.\n */\nexport function select<T>(selector: TypedSelector<T>): Signal<T> {\n return inject(Store).selectSignal(selector);\n}\n","import { inject } from '@angular/core';\n\nimport { Store } from '../store';\nimport { ActionDef } from '../actions/symbols';\n\nexport function dispatch<TArgs extends any[]>(ActionType: ActionDef<TArgs>) {\n const store = inject(Store);\n return (...args: TArgs) => store.dispatch(new ActionType(...args));\n}\n","import { Signal, inject } from '@angular/core';\n\nimport { Store } from '../store';\nimport { TypedSelector, ɵSelectorReturnType } from '../selectors';\n\nexport type SelectorMap = Record<string, TypedSelector<unknown>>;\n\nexport function createSelectMap<T extends SelectorMap>(selectorMap: T) {\n const store = inject(Store);\n\n return Object.entries(selectorMap).reduce((accumulator, [key, selector]) => {\n (accumulator as any)[key] = store.selectSignal(selector);\n return accumulator;\n }, {}) as {\n // This is inlined to enhance developer experience.\n // If we were to switch to another type, such as\n // `type SelectorMapReturnType<T extends SelectorMap> = { ... }`, code editors\n // would display the return type simply as `SelectorMapReturnType`, rather\n // than presenting it as an object with properties that correspond to\n // signals that keep store selected value.\n readonly [K in keyof T]: Signal<ɵSelectorReturnType<T[K]>>;\n };\n}\n","import type { Observable } from 'rxjs';\n\nimport { dispatch } from './dispatch';\n\nimport { ActionDef } from '../actions/symbols';\n\nexport type ActionMap = Record<string, ActionDef<any>>;\n\nexport function createDispatchMap<T extends ActionMap>(actionMap: T) {\n return Object.entries(actionMap).reduce((accumulator, [key, ActionType]) => {\n (accumulator as any)[key] = dispatch(ActionType);\n return accumulator;\n }, {}) as {\n // This is inlined to enhance developer experience.\n // If we were to switch to another type, such as\n // `type ActionMapReturnType<T extends ActionMap> = { ... }`, code editors\n // would display the return type simply as `ActionMapReturnType`, rather\n // than presenting it as an object with properties that correspond to\n // functions returning observables.\n readonly [K in keyof T]: (...args: ConstructorParameters<T[K]>) => Observable<void>;\n };\n}\n","import {\n ApplicationRef,\n assertInInjectionContext,\n createEnvironmentInjector,\n EnvironmentInjector,\n EnvironmentProviders,\n inject,\n InjectionToken\n} from '@angular/core';\n\ninterface DefaultExport<T> {\n default: T;\n}\n\nfunction isWrappedDefaultExport<T>(value: T | DefaultExport<T>): value is DefaultExport<T> {\n return value && typeof value === 'object' && 'default' in value;\n}\n\nfunction maybeUnwrapDefaultExport<T>(input: T | DefaultExport<T>): T {\n return isWrappedDefaultExport(input) ? input['default'] : input;\n}\n\nconst REGISTERED_PROVIDERS = new InjectionToken<Set<EnvironmentProviders>>('', {\n providedIn: 'root',\n factory: () => {\n const registeredProviders = new Set<EnvironmentProviders>();\n inject(ApplicationRef).onDestroy(() => registeredProviders.clear());\n return registeredProviders;\n }\n});\n\n/**\n * This function serves as a utility to lazy-load providers at the injection\n * context level — for example, at the route level. If the feature state needs\n * to be provided in more than one place, it might be indirectly included in\n * the main bundle, which we want to avoid. This function can be used at the\n * guard level to lazy-load the state provider before resolvers run and the\n * component is initialized:\n *\n * ```ts\n * const routes = [\n * {\n * path: 'home',\n * loadComponent: () => import(...),\n * canActivate: [\n * lazyProvider(async () => (await import('path-to-state-library')).invoicesStateProvider)\n * ]\n * }\n * ];\n * ```\n *\n * Where `invoicesStateProvider` is the following:\n *\n * ```ts\n * // path-to-state-library/index.ts\n *\n * export const invoicesStateProvider = provideStates([InvoicesState]);\n * ```\n */\nexport function lazyProvider(\n factory: () => Promise<EnvironmentProviders | DefaultExport<EnvironmentProviders>>\n) {\n return async () => {\n if (typeof ngDevMode !== 'undefined' && ngDevMode) {\n assertInInjectionContext(lazyProvider);\n }\n\n const appRef = inject(ApplicationRef);\n const parentInjector = inject(EnvironmentInjector);\n const registeredProviders = inject(REGISTERED_PROVIDERS);\n\n const provider = maybeUnwrapDefaultExport(await factory());\n\n if (registeredProviders.has(provider)) {\n return true;\n }\n\n registeredProviders.add(provider);\n const injector = createEnvironmentInjector([provider], parentInjector);\n appRef.onDestroy(() => injector.destroy());\n return true;\n };\n}\n","import { makeEnvironmentProviders } from '@angular/core';\nimport { ɵNGXS_STATE_CONTEXT_FACTORY, ɵNGXS_STATE_FACTORY } from '@ngxs/store/internals';\n\nimport { StateFactory } from './state-factory';\nimport { StateContextFactory } from './state-context-factory';\n\n// Backward compatibility is provided because these tokens are used by third-party\n// libraries. We expose a separate function to allow tree-shaking of these tokens\n// if they are not used in standard applications that do not rely on them.\nexport function ɵprovideNgxsInternalStateTokens() {\n return makeEnvironmentProviders([\n {\n provide: ɵNGXS_STATE_CONTEXT_FACTORY,\n useExisting: StateContextFactory\n },\n {\n provide: ɵNGXS_STATE_FACTORY,\n useExisting: StateFactory\n }\n ]);\n}\n","/**\n * The public api for consumers of @ngxs/store\n */\nexport * from './src/public_api';\n\n/**\n * The plugin api for the stuff that a plugins needs\n */\nexport * from './src/plugin_api';\n\n/**\n * Private exports required for the compilation.\n */\nexport * from './src/private_api';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["ɵOrderedSubject","ɵStateStream","ɵhasOwnProperty","ɵmemoize","ɵgetStoreMetadata","ɵgetSelectorMetadata","ɵMETA_KEY","ɵisPromise","ɵINITIAL_STATE_TOKEN","ɵNgxsActionRegistry","i1.Store","i2.NgxsConfig","ɵNgxsAppBootstrappedState","ɵensureStoreMetadata","ɵMETA_OPTIONS_KEY","ɵensureSelectorMetadata","ɵisPluginClass","ɵNGXS_STATE_CONTEXT_FACTORY","ɵNGXS_STATE_FACTORY"],"mappings":";;;;;;;;;MAIa,aAAa,CAAA;IACf,OAAO,GAAmB,EAAE;AAEpB,IAAA,cAAc,GAAG,MAAM,CAAC,aAAa,EAAE;AACtD,QAAA,QAAQ,EAAE,IAAI;AACd,QAAA,QAAQ,EAAE;AACX,KAAA,CAAC;AAEe,IAAA,eAAe,GAAG,MAAM,CAAe,YAAY,EAAE;AACpE,QAAA,QAAQ,EAAE;AACX,KAAA,CAAC;AAEF,IAAA,WAAA,GAAA;QACE,IAAI,CAAC,gBAAgB,EAAE;;AAGzB,IAAA,IAAY,YAAY,GAAA;QACtB,OAAO,IAAI,CAAC,cAAc,EAAE,OAAO,IAAI,IAAI,CAAC,OAAO;;IAG7C,gBAAgB,GAAA;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src/operators/leave-ngxs.ts","../../../packages/store/src/internal/unhandled-rxjs-error-callback.ts","../../../packages/store/src/internal/fallback-subscriber.ts","../../../packages/store/src/internal/action-results.ts","../../../packages/store/src/execution/execution-strategy.ts","../../../packages/store/src/actions-stream.ts","../../../packages/store/src/internal/dispatcher.ts","../../../packages/store/src/symbols.ts","../../../packages/store/src/utils/freeze.ts","../../../packages/store/src/internal/state-operations.ts","../../../packages/store/src/selectors/selector-utils.ts","../../../packages/store/src/internal/internals.ts","../../../packages/store/src/configs/messages.config.ts","../../../packages/store/src/utils/store-validators.ts","../../../packages/store/src/ivy/ivy-enabled-in-dev-mode.ts","../../../packages/store/src/dev-features/symbols.ts","../../../packages/store/src/dev-features/ngxs-unhandled-actions-logger.ts","../../../packages/store/src/ngxs-unhandled-error-handler.ts","../../../packages/store/src/operators/of-action.ts","../../../packages/store/src/internal/state-operators.ts","../../../packages/store/src/internal/state-context-factory.ts","../../../packages/store/src/internal/action-handler-factory.ts","../../../packages/store/src/internal/state-factory.ts","../../../packages/store/src/store.ts","../../../packages/store/src/standalone-features/preboot.ts","../../../packages/store/src/standalone-features/root-guard.ts","../../../packages/store/src/decorators/select/select-factory.ts","../../../packages/store/src/internal/lifecycle-state-manager.ts","../../../packages/store/src/standalone-features/initializers.ts","../../../packages/store/src/modules/ngxs-root.module.ts","../../../packages/store/src/modules/ngxs-feature.module.ts","../../../packages/store/src/standalone-features/root-providers.ts","../../../packages/store/src/standalone-features/feature-providers.ts","../../../packages/store/src/module.ts","../../../packages/store/src/decorators/action.ts","../../../packages/store/src/decorators/state.ts","../../../packages/store/src/decorators/select/symbols.ts","../../../packages/store/src/decorators/select/select.ts","../../../packages/store/src/selectors/selector-metadata.ts","../../../packages/store/src/decorators/selector-options.ts","../../../packages/store/src/selectors/create-selector.ts","../../../packages/store/src/decorators/selector/selector.ts","../../../packages/store/src/actions/action-director.ts","../../../packages/store/src/dev-features/ngxs-development.module.ts","../../../packages/store/src/execution/noop-execution-strategy.ts","../../../packages/store/src/selectors/selector-checks.util.ts","../../../packages/store/src/selectors/create-model-selector.ts","../../../packages/store/src/selectors/create-pick-selector.ts","../../../packages/store/src/selectors/create-property-selectors.ts","../../../packages/store/src/pending-tasks.ts","../../../packages/store/src/standalone-features/provide-store.ts","../../../packages/store/src/standalone-features/provide-states.ts","../../../packages/store/src/standalone-features/plugin.ts","../../../packages/store/src/utils/select.ts","../../../packages/store/src/utils/dispatch.ts","../../../packages/store/src/utils/create-select-map.ts","../../../packages/store/src/utils/create-dispatch-map.ts","../../../packages/store/src/utils/lazy-provider.ts","../../../packages/store/src/internal/provide-internal-tokens.ts","../../../packages/store/index.ts","../../../packages/store/ngxs-store.ts"],"sourcesContent":["import { inject, Injectable } from '@angular/core';\nimport { NGXS_PLUGINS, NgxsPlugin, NgxsPluginFn } from '@ngxs/store/plugins';\n\n@Injectable({ providedIn: 'root' })\nexport class PluginManager {\n readonly plugins: NgxsPluginFn[] = [];\n\n private readonly _parentManager = inject(PluginManager, {\n optional: true,\n skipSelf: true\n });\n\n private readonly _pluginHandlers = inject<NgxsPlugin[]>(NGXS_PLUGINS, {\n optional: true\n });\n\n constructor() {\n this.registerHandlers();\n }\n\n private get _rootPlugins(): NgxsPluginFn[] {\n return this._parentManager?.plugins || this.plugins;\n }\n\n private registerHandlers(): void {\n const pluginHandlers: NgxsPluginFn[] = this.getPluginHandlers();\n this._rootPlugins.push(...pluginHandlers);\n }\n\n private getPluginHandlers(): NgxsPluginFn[] {\n const handlers: NgxsPlugin[] = this._pluginHandlers || [];\n return handlers.map(\n (plugin: NgxsPlugin) =>\n (plugin.handle ? plugin.handle.bind(plugin) : plugin) as NgxsPluginFn\n );\n }\n}\n","import { Observable } from 'rxjs';\nimport { InternalNgxsExecutionStrategy } from '../execution/execution-strategy';\n\n/**\n * Returns operator that will run\n * `subscribe` outside of the ngxs execution context\n */\nexport function leaveNgxs<T>(ngxsExecutionStrategy: InternalNgxsExecutionStrategy) {\n return (source: Observable<T>) =>\n new Observable<T>(subscriber =>\n source.subscribe({\n next: value => ngxsExecutionStrategy.leave(() => subscriber.next(value)),\n error: error => ngxsExecutionStrategy.leave(() => subscriber.error(error)),\n complete: () => ngxsExecutionStrategy.leave(() => subscriber.complete())\n })\n );\n}\n","import { config } from 'rxjs';\n\nconst ɵɵunhandledRxjsErrorCallbacks = new WeakMap<object, VoidFunction>();\n\nlet installed = false;\nexport function installOnUnhandhedErrorHandler(): void {\n if (installed) {\n return;\n }\n\n const existingHandler = config.onUnhandledError;\n config.onUnhandledError = function (error: any) {\n const unhandledErrorCallback = ɵɵunhandledRxjsErrorCallbacks.get(error);\n if (unhandledErrorCallback) {\n unhandledErrorCallback();\n } else if (existingHandler) {\n existingHandler.call(this, error);\n } else {\n throw error;\n }\n };\n\n installed = true;\n}\n\nexport function executeUnhandledCallback(error: any) {\n const unhandledErrorCallback = ɵɵunhandledRxjsErrorCallbacks.get(error);\n if (unhandledErrorCallback) {\n unhandledErrorCallback();\n return true;\n }\n return false;\n}\n\nexport function assignUnhandledCallback(error: any, callback: VoidFunction) {\n // Since the error can be essentially anything, we must ensure that we only\n // handle objects, as weak maps do not allow any other key type besides objects.\n // The error can also be a string if thrown in the following manner: `throwError('My Error')`.\n if (error && typeof error === 'object') {\n let hasBeenCalled = false;\n ɵɵunhandledRxjsErrorCallbacks.set(error, () => {\n if (!hasBeenCalled) {\n hasBeenCalled = true;\n callback();\n }\n });\n }\n return error;\n}\n","import { NgZone } from '@angular/core';\nimport { Observable, type Subscription } from 'rxjs';\n\nimport { executeUnhandledCallback } from './unhandled-rxjs-error-callback';\n\nexport function fallbackSubscriber<T>(ngZone: NgZone) {\n return (source: Observable<T>) => {\n let subscription: Subscription | null = source.subscribe({\n error: error => {\n ngZone.runOutsideAngular(() => {\n // This is necessary to schedule a microtask to ensure that synchronous\n // errors are not reported before the real subscriber arrives. If an error\n // is thrown synchronously in any action, it will be reported to the error\n // handler regardless. Since RxJS reports unhandled errors asynchronously,\n // implementing a microtask ensures that we are also safe in this scenario.\n queueMicrotask(() => {\n if (subscription) {\n executeUnhandledCallback(error);\n }\n });\n });\n }\n });\n\n return new Observable<T>(subscriber => {\n // Now that there is a real subscriber, we can unsubscribe our pro-active subscription\n subscription?.unsubscribe();\n subscription = null;\n\n return source.subscribe(subscriber);\n });\n };\n}\n","import { DestroyRef, inject, Injectable } from '@angular/core';\nimport { Subject } from 'rxjs';\n\nimport type { ActionContext } from '../actions-stream';\n\n/**\n * Internal Action result stream that is emitted when an action is completed.\n * This is used as a method of returning the action result to the dispatcher\n * for the observable returned by the dispatch(...) call.\n * The dispatcher then asynchronously pushes the result from this stream onto the main action stream as a result.\n */\n@Injectable({ providedIn: 'root' })\nexport class InternalDispatchedActionResults extends Subject<ActionContext> {\n constructor() {\n super();\n // Complete the subject once the root injector is destroyed to ensure\n // there are no active subscribers that would receive events or perform\n // any actions after the application is destroyed.\n inject(DestroyRef).onDestroy(() => this.complete());\n }\n}\n","import { inject, Injectable, NgZone } from '@angular/core';\nimport { NgxsExecutionStrategy } from './symbols';\n\n@Injectable({ providedIn: 'root' })\nexport class InternalNgxsExecutionStrategy implements NgxsExecutionStrategy {\n private _ngZone = inject(NgZone);\n\n enter<T>(func: () => T): T {\n if (typeof ngServerMode !== 'undefined' && ngServerMode) {\n return this._runInsideAngular(func);\n }\n return this._runOutsideAngular(func);\n }\n\n leave<T>(func: () => T): T {\n return this._runInsideAngular(func);\n }\n\n private _runInsideAngular<T>(func: () => T): T {\n if (NgZone.isInAngularZone()) {\n return func();\n }\n return this._ngZone.run(func);\n }\n\n private _runOutsideAngular<T>(func: () => T): T {\n if (NgZone.isInAngularZone()) {\n return this._ngZone.runOutsideAngular(func);\n }\n return func();\n }\n}\n","import { DestroyRef, inject, Injectable } from '@angular/core';\nimport { ɵOrderedSubject } from '@ngxs/store/internals';\nimport { Observable, Subject } from 'rxjs';\n\nimport { leaveNgxs } from './operators/leave-ngxs';\nimport { InternalNgxsExecutionStrategy } from './execution/execution-strategy';\n\n/**\n * Status of a dispatched action\n */\nexport enum ActionStatus {\n Dispatched = 'DISPATCHED',\n Successful = 'SUCCESSFUL',\n Canceled = 'CANCELED',\n Errored = 'ERRORED'\n}\n\nexport interface ActionContext<T = any> {\n status: ActionStatus;\n action: T;\n error?: Error;\n}\n\n/**\n * Internal Action stream that is emitted anytime an action is dispatched.\n */\n@Injectable({ providedIn: 'root' })\nexport class InternalActions extends ɵOrderedSubject<ActionContext> {\n // This subject will be the first to know about the dispatched action, its purpose is for\n // any logic that must be executed before action handlers are invoked (i.e., cancelation).\n readonly dispatched$ = new Subject<ActionContext>();\n\n constructor() {\n super();\n\n this.subscribe(ctx => {\n if (ctx.status === ActionStatus.Dispatched) {\n this.dispatched$.next(ctx);\n }\n });\n\n const destroyRef = inject(DestroyRef);\n destroyRef.onDestroy(() => {\n // Complete the subject once the root injector is destroyed to ensure\n // there are no active subscribers that would receive events or perform\n // any actions after the application is destroyed.\n this.complete();\n this.dispatched$.complete();\n });\n }\n}\n\n/**\n * Action stream that is emitted anytime an action is dispatched.\n *\n * You can listen to this in services to react without stores.\n */\n@Injectable({ providedIn: 'root' })\nexport class Actions extends Observable<ActionContext> {\n constructor() {\n const internalActions$ = inject(InternalActions);\n const internalExecutionStrategy = inject(InternalNgxsExecutionStrategy);\n\n // The `InternalActions` subject emits outside of the Angular zone.\n // We have to re-enter the Angular zone for any incoming consumer.\n // The shared `Subject` reduces the number of change detections.\n // This would call leave only once for any stream emission across all active subscribers.\n const sharedInternalActions$ = new Subject<ActionContext>();\n\n internalActions$\n .pipe(leaveNgxs(internalExecutionStrategy))\n .subscribe(sharedInternalActions$);\n\n super(observer => {\n const childSubscription = sharedInternalActions$.subscribe({\n next: ctx => observer.next(ctx),\n error: error => observer.error(error),\n complete: () => observer.complete()\n });\n\n observer.add(childSubscription);\n });\n }\n}\n","import {\n DestroyRef,\n inject,\n Injectable,\n Injector,\n NgZone,\n runInInjectionContext\n} from '@angular/core';\nimport {\n EMPTY,\n forkJoin,\n Observable,\n filter,\n map,\n mergeMap,\n shareReplay,\n take,\n of\n} from 'rxjs';\n\nimport { getActionTypeFromInstance } from '@ngxs/store/plugins';\nimport { ɵPlainObject, ɵStateStream } from '@ngxs/store/internals';\n\nimport { PluginManager } from '../plugin-manager';\nimport { leaveNgxs } from '../operators/leave-ngxs';\nimport { fallbackSubscriber } from './fallback-subscriber';\nimport { InternalDispatchedActionResults } from './action-results';\nimport { ActionContext, ActionStatus, InternalActions } from '../actions-stream';\nimport { InternalNgxsExecutionStrategy } from '../execution/execution-strategy';\n\n@Injectable({ providedIn: 'root' })\nexport class InternalDispatcher {\n private _ngZone = inject(NgZone);\n private _actions = inject(InternalActions);\n private _actionResults = inject(InternalDispatchedActionResults);\n private _pluginManager = inject(PluginManager);\n private _stateStream = inject(ɵStateStream);\n private _ngxsExecutionStrategy = inject(InternalNgxsExecutionStrategy);\n private _injector = inject(Injector);\n private _destroyRef = inject(DestroyRef);\n\n /**\n * Dispatches event(s).\n */\n dispatch(actionOrActions: any | any[]): Observable<void> {\n const result = this._ngxsExecutionStrategy.enter(() =>\n this.dispatchByEvents(actionOrActions)\n );\n\n return result.pipe(\n fallbackSubscriber(this._ngZone),\n leaveNgxs(this._ngxsExecutionStrategy)\n );\n }\n\n private dispatchByEvents(actionOrActions: any | any[]): Observable<void> {\n if (Array.isArray(actionOrActions)) {\n if (actionOrActions.length === 0) return of(undefined);\n\n return forkJoin(actionOrActions.map(action => this.dispatchSingle(action))).pipe(\n map(() => undefined)\n );\n } else {\n return this.dispatchSingle(actionOrActions);\n }\n }\n\n private dispatchSingle(action: any): Observable<void> {\n if (typeof ngDevMode !== 'undefined' && ngDevMode) {\n const type: string | undefined = getActionTypeFromInstance(action);\n if (!type) {\n const error = new Error(\n `This action doesn't have a type property: ${action.constructor.name}`\n );\n return new Observable(subscriber => subscriber.error(error));\n }\n }\n\n const prevState = this._stateStream.getValue();\n const plugins = this._pluginManager.plugins;\n\n return compose(this._injector, this._destroyRef, [\n ...plugins,\n (nextState: any, nextAction: any) => {\n if (nextState !== prevState) {\n this._stateStream.next(nextState);\n }\n const actionResult$ = this.getActionResultStream(nextAction);\n actionResult$.subscribe(ctx => this._actions.next(ctx));\n this._actions.next({ action: nextAction, status: ActionStatus.Dispatched });\n return this.createDispatchObservable(actionResult$);\n }\n ])(prevState, action).pipe(shareReplay());\n }\n\n private getActionResultStream(action: any): Observable<ActionContext> {\n return this._actionResults.pipe(\n filter(\n (ctx: ActionContext) => ctx.action === action && ctx.status !== ActionStatus.Dispatched\n ),\n take(1),\n shareReplay()\n );\n }\n\n private createDispatchObservable(\n actionResult$: Observable<ActionContext>\n ): Observable<ɵPlainObject> {\n return actionResult$.pipe(\n mergeMap((ctx: ActionContext) => {\n switch (ctx.status) {\n case ActionStatus.Successful:\n // The `createDispatchObservable` function should return the\n // state, as its result is used by plugins.\n return of(this._stateStream.getValue());\n case ActionStatus.Errored:\n throw ctx.error;\n default:\n // Once dispatched or canceled, we complete it immediately because\n // `dispatch()` should emit (or error, or complete) as soon as it succeeds or fails.\n return EMPTY;\n }\n }),\n shareReplay()\n );\n }\n}\n\ntype StateFn = (...args: any[]) => Observable<void>;\n\n/**\n * Composes a array of functions from left to right. Example:\n *\n * compose([fn, final])(state, action);\n *\n * then the funcs have a signature like:\n *\n * function fn (state, action, next) {\n * console.log('here', state, action, next);\n * return next(state, action);\n * }\n *\n * function final (state, action) {\n * console.log('here', state, action);\n * return state;\n * }\n *\n * the last function should not call `next`.\n */\nconst compose =\n (injector: Injector, destroyRef: DestroyRef, fns: StateFn[]) =>\n (...args: any[]) => {\n const fn = fns.shift();\n\n if (destroyRef.destroyed || !fn) {\n // Injector was already destroyed → no-op\n return EMPTY;\n }\n\n return runInInjectionContext(injector, () =>\n fn(...args, (...nextArgs: any[]) => compose(injector, destroyRef, fns)(...nextArgs))\n );\n };\n","import { Injectable, InjectionToken, inject } from '@angular/core';\nimport type { Observable } from 'rxjs';\n\nimport { StateOperator } from '@ngxs/store/operators';\nimport { ɵSharedSelectorOptions, ɵStateClass } from '@ngxs/store/internals';\n\n// The injection token is used to resolve a list of states provided at\n// the root level through either `NgxsModule.forRoot` or `provideStore`.\nexport const ROOT_STATE_TOKEN = new InjectionToken<Array<ɵStateClass>>(\n typeof ngDevMode !== 'undefined' && ngDevMode ? 'ROOT_STATE_TOKEN' : ''\n);\n\n// The injection token is used to resolve a list of states provided at\n// the feature level through either `NgxsModule.forFeature` or `provideStates`.\n// The Array<Array> is used to overload the resolved value of the token because\n// it is a multi-provider token.\nexport const FEATURE_STATE_TOKEN = new InjectionToken<Array<Array<ɵStateClass>>>(\n typeof ngDevMode !== 'undefined' && ngDevMode ? 'FEATURE_STATE_TOKEN' : ''\n);\n\n// The injection token is used to resolve to options provided at the root\n// level through either `NgxsModule.forRoot` or `provideStore`.\nexport const NGXS_OPTIONS = new InjectionToken<NgxsModuleOptions>(\n typeof ngDevMode !== 'undefined' && ngDevMode ? 'NGXS_OPTIONS' : ''\n);\n\nexport type NgxsLifeCycle = Partial<NgxsOnChanges> &\n Partial<NgxsOnInit> &\n Partial<NgxsAfterBootstrap>;\n\n/**\n * The NGXS config settings.\n */\n@Injectable({\n providedIn: 'root',\n useFactory: (): NgxsConfig => {\n const defaultConfig = new NgxsConfig();\n const config = inject(NGXS_OPTIONS);\n return {\n ...defaultConfig,\n ...config,\n selectorOptions: {\n ...defaultConfig.selectorOptions,\n ...config.selectorOptions\n }\n };\n }\n})\nexport class NgxsConfig {\n /**\n * Run in development mode. This will add additional debugging features:\n * - Object.freeze on the state and actions to guarantee immutability\n * (default: false)\n *\n * Note: this property will be accounted only in development mode.\n * It makes sense to use it only during development to ensure there're no state mutations.\n * When building for production, the `Object.freeze` will be tree-shaken away.\n */\n developmentMode!: boolean;\n compatibility: {\n /**\n * Support a strict Content Security Policy.\n * This will circumvent some optimisations that violate a strict CSP through the use of `new Function(...)`.\n * (default: false)\n */\n strictContentSecurityPolicy: boolean;\n } = {\n strictContentSecurityPolicy: false\n };\n /**\n * Defining shared selector options\n */\n selectorOptions: ɵSharedSelectorOptions = {\n injectContainerState: false,\n suppressErrors: false\n };\n}\n\nexport type { StateOperator };\n\n/**\n * State context provided to the actions in the state.\n */\nexport interface StateContext<T> {\n /**\n * An AbortSignal tied to the current action's lifecycle.\n *\n * It gives you a handle to proactively cancel ongoing async work.\n * If you're using an observable, it will be unsubscribed automatically when cancellation occurs.\n * If you're using async/await, check `abortSignal.aborted` after `await` blocks to decide whether to continue.\n */\n abortSignal: AbortSignal;\n\n /**\n * Get the current state.\n */\n getState(): T;\n\n /**\n * Reset the state to a new value.\n */\n setState(val: T | StateOperator<T>): void;\n\n /**\n * Patch the existing state with the provided value.\n */\n patchState(val: Partial<T>): void;\n\n /**\n * Dispatch a new action and return the dispatched observable.\n */\n dispatch(actions: any | any[]): Observable<void>;\n}\n\n/**\n * Represents a basic change from a previous to a new value for a single state instance.\n * Passed as a value in a NgxsSimpleChanges object to the ngxsOnChanges hook.\n */\nexport class NgxsSimpleChange<T = any> {\n constructor(\n public readonly previousValue: T,\n public readonly currentValue: T,\n public readonly firstChange: boolean\n ) {}\n}\n\n/**\n * On init interface\n */\nexport interface NgxsOnInit {\n ngxsOnInit(ctx: StateContext<any>): void;\n}\n\n/**\n * On change interface\n */\nexport interface NgxsOnChanges {\n ngxsOnChanges(change: NgxsSimpleChange): void;\n}\n\n/**\n * After bootstrap interface\n */\nexport interface NgxsAfterBootstrap {\n ngxsAfterBootstrap(ctx: StateContext<any>): void;\n}\n\nexport type NgxsModuleOptions = Partial<NgxsConfig>;\n","import { ɵhasOwnProperty } from '@ngxs/store/internals';\n\n/**\n * Object freeze code\n * https://github.com/jsdf/deep-freeze\n */\nexport const deepFreeze = (o: any) => {\n Object.freeze(o);\n\n const oIsFunction = typeof o === 'function';\n\n Object.getOwnPropertyNames(o).forEach(function (prop) {\n if (\n ɵhasOwnProperty(o, prop) &&\n (oIsFunction ? prop !== 'caller' && prop !== 'callee' && prop !== 'arguments' : true) &&\n o[prop] !== null &&\n (typeof o[prop] === 'object' || typeof o[prop] === 'function') &&\n !Object.isFrozen(o[prop])\n ) {\n deepFreeze(o[prop]);\n }\n });\n\n return o;\n};\n","import { inject, Injectable } from '@angular/core';\nimport { ɵStateStream } from '@ngxs/store/internals';\n\nimport { StateOperations, StatesAndDefaults } from '../internal/internals';\nimport { InternalDispatcher } from '../internal/dispatcher';\nimport { NgxsConfig } from '../symbols';\nimport { deepFreeze } from '../utils/freeze';\n\n/**\n * @ignore\n */\n@Injectable({ providedIn: 'root' })\nexport class InternalStateOperations {\n private _stateStream = inject(ɵStateStream);\n private _dispatcher = inject(InternalDispatcher);\n private _config = inject(NgxsConfig);\n\n /**\n * Returns the root state operators.\n */\n getRootStateOperations(): StateOperations<any> {\n const rootStateOperations = {\n getState: () => this._stateStream.getValue(),\n setState: (newState: any) => this._stateStream.next(newState),\n dispatch: (actionOrActions: any | any[]) => this._dispatcher.dispatch(actionOrActions)\n };\n\n if (typeof ngDevMode !== 'undefined' && ngDevMode) {\n return this._config.developmentMode\n ? ensureStateAndActionsAreImmutable(rootStateOperations)\n : rootStateOperations;\n } else {\n return rootStateOperations;\n }\n }\n\n setStateToTheCurrentWithNew(results: StatesAndDefaults): void {\n const stateOperations: StateOperations<any> = this.getRootStateOperations();\n\n // Get our current stream\n const currentState = stateOperations.getState();\n // Set the state to the current + new\n stateOperations.setState({ ...currentState, ...results.defaults });\n }\n}\n\nfunction ensureStateAndActionsAreImmutable(root: StateOperations<any>): StateOperations<any> {\n return {\n getState: () => root.getState(),\n setState: value => {\n const frozenValue = deepFreeze(value);\n return root.setState(frozenValue);\n },\n dispatch: actions => {\n return root.dispatch(actions);\n }\n };\n}\n","import {\n ɵmemoize,\n ɵRuntimeSelectorContext,\n ɵSelectorFactory,\n ɵgetStoreMetadata,\n ɵgetSelectorMetadata,\n ɵSelectorMetaDataModel,\n ɵSharedSelectorOptions\n} from '@ngxs/store/internals';\n\nimport { CreationMetadata, RuntimeSelectorInfo } from './selector-models';\n\ndeclare const ngDevMode: boolean;\n\nexport function createRootSelectorFactory<T extends (...args: any[]) => any>(\n selectorMetaData: ɵSelectorMetaDataModel,\n selectors: any[] | undefined,\n memoizedSelectorFn: T\n): ɵSelectorFactory {\n return (context: ɵRuntimeSelectorContext) => {\n const { argumentSelectorFunctions, selectorOptions } = getRuntimeSelectorInfo(\n context,\n selectorMetaData,\n selectors\n );\n\n const { suppressErrors } = selectorOptions;\n\n return function selectFromRoot(rootState: any) {\n // Determine arguments from the app state using the selectors\n const results = argumentSelectorFunctions.map(argFn => argFn(rootState));\n\n // If the lambda attempts to access something in the state that doesn't exist,\n // it will throw a `TypeError`. Since this behavior is common, we simply return\n // `undefined` in such cases.\n try {\n return memoizedSelectorFn(...results);\n } catch (ex) {\n if (suppressErrors && ex instanceof TypeError) {\n return undefined;\n }\n\n // We're logging an error in this function because it may be used by `select`,\n // `selectSignal`, and `selectSnapshot`. Therefore, there's no need to catch\n // exceptions there to log errors.\n if (typeof ngDevMode !== 'undefined' && ngDevMode) {\n const message =\n 'The selector below has thrown an error upon invocation. ' +\n 'Please check for any unsafe property access that may result in null ' +\n 'or undefined values.';\n\n // Avoid concatenating the message with the original function, as this will\n // invoke `toString()` on the function. Instead, log it as the second argument.\n // This way, developers will be able to navigate to the actual code in the browser.\n console.error(message, selectorMetaData.originalFn);\n }\n\n throw ex;\n }\n };\n };\n}\n\nexport function createMemoizedSelectorFn<T extends (...args: any[]) => any>(\n originalFn: T,\n creationMetadata: Partial<CreationMetadata> | undefined\n) {\n const containerClass = creationMetadata?.containerClass;\n const wrappedFn = function wrappedSelectorFn() {\n // eslint-disable-next-line prefer-rest-params\n const returnValue = originalFn.apply(containerClass, <any>arguments);\n if (typeof returnValue === 'function') {\n const innerMemoizedFn = ɵmemoize.apply(null, [returnValue]);\n return innerMemoizedFn;\n }\n return returnValue;\n } as T;\n const memoizedFn = ɵmemoize(wrappedFn);\n Object.setPrototypeOf(memoizedFn, originalFn);\n return memoizedFn;\n}\n\nfunction getRuntimeSelectorInfo(\n context: ɵRuntimeSelectorContext,\n selectorMetaData: ɵSelectorMetaDataModel,\n selectors: any[] | undefined = []\n): RuntimeSelectorInfo {\n const localSelectorOptions = selectorMetaData.getSelectorOptions();\n const selectorOptions = context.getSelectorOptions(localSelectorOptions);\n const selectorsToApply = getSelectorsToApply(\n selectors,\n selectorOptions,\n selectorMetaData.containerClass\n );\n\n const argumentSelectorFunctions = selectorsToApply.map(selector => {\n const factory = getRootSelectorFactory(selector);\n return factory(context);\n });\n return {\n selectorOptions,\n argumentSelectorFunctions\n };\n}\n\nfunction getSelectorsToApply(\n selectors: any[] | undefined = [],\n selectorOptions: ɵSharedSelectorOptions,\n containerClass: any\n) {\n const selectorsToApply = [];\n // The container state refers to the state class that includes the\n // definition of the selector function, for example:\n // @State()\n // class AnimalsState {\n // @Selector()\n // static getAnimals(state: AnimalsStateModel) {}\n // }\n // The `AnimalsState` serves as the container state. Additionally, the\n // selector may reside within a namespace or another class lacking the\n // `@State` decorator, thus not being treated as the container state.\n const canInjectContainerState =\n selectorOptions.injectContainerState || selectors.length === 0;\n\n if (containerClass && canInjectContainerState) {\n // If we are on a state class, add it as the first selector parameter\n const metadata = ɵgetStoreMetadata(containerClass);\n if (metadata) {\n selectorsToApply.push(containerClass);\n }\n }\n selectorsToApply.push(...selectors);\n return selectorsToApply;\n}\n\n/**\n * This function gets the factory function to create the selector to get the selected slice from the app state\n * @ignore\n */\nexport function getRootSelectorFactory(selector: any): ɵSelectorFactory {\n const metadata = ɵgetSelectorMetadata(selector) || ɵgetStoreMetadata(selector);\n return metadata?.makeRootSelector || (() => selector);\n}\n","import { InjectionToken, inject } from '@angular/core';\nimport type { Observable } from 'rxjs';\n\nimport {\n ɵMETA_KEY,\n ɵPlainObjectOf,\n ɵStateClassInternal,\n ɵActionHandlerMetaData\n} from '@ngxs/store/internals';\n\nimport { NgxsConfig } from '../symbols';\n\ndeclare const ngDevMode: boolean;\n\nexport type StateKeyGraph = ɵPlainObjectOf<string[]>;\nexport type StatesByName = ɵPlainObjectOf<ɵStateClassInternal>;\n\nexport interface StateOperations<T> {\n getState(): T;\n\n setState(val: T): void;\n\n dispatch(actionOrActions: any | any[]): Observable<void>;\n}\n\nexport interface MappedStore {\n name: string;\n isInitialised: boolean;\n actions: ɵPlainObjectOf<ɵActionHandlerMetaData[]>;\n defaults: any;\n instance: any;\n path: string;\n}\n\nexport interface StatesAndDefaults {\n defaults: any;\n states: MappedStore[];\n}\n\n/**\n * Get a deeply nested value. Example:\n *\n * getValue({ foo: bar: [] }, 'foo.bar') //=> []\n *\n * Note: This is not as fast as the `fastPropGetter` but is strict Content Security Policy compliant.\n * See perf hit: https://jsperf.com/fast-value-getter-given-path/1\n *\n * @ignore\n */\nexport function compliantPropGetter(paths: string[]): (x: any) => any {\n return obj => {\n for (let i = 0; i < paths.length; i++) {\n if (!obj) return undefined;\n obj = obj[paths[i]];\n }\n return obj;\n };\n}\n\n/**\n * The generated function is faster than:\n * - pluck (Observable operator)\n * - memoize\n *\n * @ignore\n */\nexport function fastPropGetter(paths: string[]): (x: any) => any {\n const segments = paths;\n let seg = 'store.' + segments[0];\n let i = 0;\n const l = segments.length;\n\n let expr = seg;\n while (++i < l) {\n expr = expr + ' && ' + (seg = seg + '.' + segments[i]);\n }\n\n const fn = new Function('store', 'return ' + expr + ';');\n\n return <(x: any) => any>fn;\n}\n\nexport const ɵPROP_GETTER = new InjectionToken<(paths: string[]) => (x: any) => any>(\n typeof ngDevMode !== 'undefined' && ngDevMode ? 'PROP_GETTER' : '',\n {\n providedIn: 'root',\n factory: () =>\n inject(NgxsConfig).compatibility?.strictContentSecurityPolicy\n ? compliantPropGetter\n : fastPropGetter\n }\n);\n\n/**\n * Given an array of states, it will return a object graph. Example:\n * const states = [\n * Cart,\n * CartSaved,\n * CartSavedItems\n * ]\n *\n * would return:\n *\n * const graph = {\n * cart: ['saved'],\n * saved: ['items'],\n * items: []\n * };\n *\n * @ignore\n */\nexport function buildGraph(stateClasses: ɵStateClassInternal[]): StateKeyGraph {\n // Resolve a state's name from the class reference.\n const findName = (stateClass: ɵStateClassInternal): string => {\n const meta = stateClasses.find(s => s === stateClass);\n if (typeof ngDevMode !== 'undefined' && ngDevMode && !meta) {\n throw new Error(\n `Child state not found: ${stateClass}. \\r\\nYou may have forgotten to add states to module`\n );\n }\n return meta![ɵMETA_KEY]!.name!;\n };\n\n // Build the dependency graph.\n return stateClasses.reduce((graph: StateKeyGraph, stateClass) => {\n const meta = stateClass[ɵMETA_KEY]!;\n graph[meta.name!] = (meta.children || []).map(findName);\n return graph;\n }, {});\n}\n\n/**\n * Given a states array, returns object graph\n * returning the name and state metadata. Example:\n *\n * const graph = {\n * cart: { metadata }\n * };\n *\n * @ignore\n */\nexport function nameToState(\n states: ɵStateClassInternal[]\n): ɵPlainObjectOf<ɵStateClassInternal> {\n return states.reduce<ɵPlainObjectOf<ɵStateClassInternal>>(\n (result: ɵPlainObjectOf<ɵStateClassInternal>, stateClass: ɵStateClassInternal) => {\n const meta = stateClass[ɵMETA_KEY]!;\n result[meta.name!] = stateClass;\n return result;\n },\n {}\n );\n}\n\n/**\n * Given a object relationship graph will return the full path\n * for the child items. Example:\n *\n * const graph = {\n * cart: ['saved'],\n * saved: ['items'],\n * items: []\n * };\n *\n * would return:\n *\n * const r = {\n * cart: 'cart',\n * saved: 'cart.saved',\n * items: 'cart.saved.items'\n * };\n *\n * @ignore\n */\nexport function findFullParentPath(\n obj: StateKeyGraph,\n out: ɵPlainObjectOf<string> = {}\n): ɵPlainObjectOf<string> {\n // Recursively find the full dotted parent path for a given key.\n const find = (graph: StateKeyGraph, target: string): string | null => {\n for (const key in graph) {\n if (graph[key]?.includes(target)) {\n const parent = find(graph, key);\n return parent ? `${parent}.${key}` : key;\n }\n }\n return null;\n };\n\n // Build full path for each key\n for (const key in obj) {\n const parent = find(obj, key);\n out[key] = parent ? `${parent}.${key}` : key;\n }\n\n return out;\n}\n\n/**\n * Given a object graph, it will return the items topologically sorted Example:\n *\n * const graph = {\n * cart: ['saved'],\n * saved: ['items'],\n * items: []\n * };\n *\n * would return:\n *\n * const results = [\n * 'items',\n * 'saved',\n * 'cart'\n * ];\n *\n * @ignore\n */\nexport function topologicalSort(graph: StateKeyGraph): string[] {\n const sorted: string[] = [];\n const visited: ɵPlainObjectOf<boolean> = {};\n\n // DFS (Depth-First Search) to visit each node and its dependencies.\n const visit = (name: string, ancestors: string[] = []) => {\n visited[name] = true;\n ancestors.push(name);\n\n for (const dep of graph[name]) {\n if (typeof ngDevMode !== 'undefined' && ngDevMode && ancestors.includes(dep)) {\n throw new Error(\n `Circular dependency '${dep}' is required by '${name}': ${ancestors.join(' -> ')}`\n );\n }\n\n if (!visited[dep]) visit(dep, ancestors.slice());\n }\n\n // Add to sorted list if not already included.\n if (!sorted.includes(name)) sorted.push(name);\n };\n\n // Start DFS from each key\n for (const key in graph) visit(key);\n\n return sorted.reverse();\n}\n","import { ɵPlainObject } from '@ngxs/store/internals';\n\nexport function throwStateNameError(name: string): never {\n throw new Error(\n `${name} is not a valid state name. It needs to be a valid object property name.`\n );\n}\n\nexport function throwStateNamePropertyError(): never {\n throw new Error(`States must register a 'name' property.`);\n}\n\nexport function throwStateUniqueError(\n current: string,\n newName: string,\n oldName: string\n): never {\n throw new Error(`State name '${current}' from ${newName} already exists in ${oldName}.`);\n}\n\nexport function throwStateDecoratorError(name: string): never {\n throw new Error(`States must be decorated with @State() decorator, but \"${name}\" isn't.`);\n}\n\nexport function throwActionDecoratorError(): never {\n throw new Error('@Action() decorator cannot be used with static methods.');\n}\n\nexport function throwSelectorDecoratorError(): never {\n throw new Error('Selectors only work on methods.');\n}\n\nexport function getUndecoratedStateWithInjectableWarningMessage(name: string): string {\n return `'${name}' class should be decorated with @Injectable() right after the @State() decorator`;\n}\n\nexport function getInvalidInitializationOrderMessage(addedStates?: ɵPlainObject) {\n let message =\n 'You have an invalid state initialization order. This typically occurs when `NgxsModule.forFeature`\\n' +\n 'or `provideStates` is called before `NgxsModule.forRoot` or `provideStore`.\\n' +\n 'One example is when `NgxsRouterPluginModule.forRoot` is called before `NgxsModule.forRoot`.';\n\n if (addedStates) {\n const stateNames = Object.keys(addedStates).map(stateName => `\"${stateName}\"`);\n\n message +=\n '\\nFeature states added before the store initialization is complete: ' +\n `${stateNames.join(', ')}.`;\n }\n\n return message;\n}\n\nexport function throwPatchingArrayError(): never {\n throw new Error('Patching arrays is not supported.');\n}\n\nexport function throwPatchingPrimitiveError(): never {\n throw new Error('Patching primitives is not supported.');\n}\n","import { ɵStateClassInternal, ɵgetStoreMetadata } from '@ngxs/store/internals';\n\nimport { StatesByName } from '../internal/internals';\nimport {\n throwStateDecoratorError,\n throwStateNameError,\n throwStateNamePropertyError,\n throwStateUniqueError\n} from '../configs/messages.config';\n\nconst stateNameRegex = /* @__PURE__ */ new RegExp('^[a-zA-Z0-9_]+$');\n\nexport function ensureStateNameIsValid(name: string | null): void | never {\n if (!name) {\n throwStateNamePropertyError();\n } else if (!stateNameRegex.test(name)) {\n throwStateNameError(name);\n }\n}\n\nexport function ensureStateNameIsUnique(\n stateName: string,\n state: ɵStateClassInternal,\n statesByName: StatesByName\n): void | never {\n const existingState = statesByName[stateName];\n if (existingState && existingState !== state) {\n throwStateUniqueError(stateName, state.name, existingState.name);\n }\n}\n\nexport function ensureStatesAreDecorated(stateClasses: ɵStateClassInternal[]): void | never {\n stateClasses.forEach((stateClass: ɵStateClassInternal) => {\n if (!ɵgetStoreMetadata(stateClass)) {\n throwStateDecoratorError(stateClass.name);\n }\n });\n}\n","import { getUndecoratedStateWithInjectableWarningMessage } from '../configs/messages.config';\n\n/**\n * All provided or injected tokens must have `@Injectable` decorator\n * (previously, injected tokens without `@Injectable` were allowed\n * if another decorator was used, e.g. pipes).\n */\nexport function ensureStateClassIsInjectable(stateClass: any): void {\n if (jit_hasInjectableAnnotation(stateClass) || aot_hasNgInjectableDef(stateClass)) {\n return;\n }\n\n console.warn(getUndecoratedStateWithInjectableWarningMessage(stateClass.name));\n}\n\nfunction aot_hasNgInjectableDef(stateClass: any): boolean {\n // `ɵprov` is a static property added by the NGCC compiler. It always exists in\n // AOT mode because this property is added before runtime. If an application is running in\n // JIT mode then this property can be added by the `@Injectable()` decorator. The `@Injectable()`\n // decorator has to go after the `@State()` decorator, thus we prevent users from unwanted DI errors.\n return !!stateClass.ɵprov;\n}\n\nfunction jit_hasInjectableAnnotation(stateClass: any): boolean {\n // `ɵprov` doesn't exist in JIT mode (for instance when running unit tests with Jest).\n const annotations = stateClass.__annotations__ || [];\n return annotations.some((annotation: any) => annotation?.ngMetadataName === 'Injectable');\n}\n","import { InjectionToken } from '@angular/core';\n\nimport { ActionType } from '../actions/symbols';\n\nexport interface NgxsDevelopmentOptions {\n // This allows setting only `true` because there's no reason to set `false`.\n // Developers may just skip importing the development module at all.\n warnOnUnhandledActions:\n | true\n | {\n ignore: ActionType[];\n };\n}\n\nexport const NGXS_DEVELOPMENT_OPTIONS =\n /* @__PURE__ */ new InjectionToken<NgxsDevelopmentOptions>(\n typeof ngDevMode !== 'undefined' && ngDevMode ? 'NGXS_DEVELOPMENT_OPTIONS' : '',\n {\n providedIn: 'root',\n factory: () => ({ warnOnUnhandledActions: true })\n }\n );\n","import { inject, Injectable } from '@angular/core';\nimport { InitState, UpdateState, getActionTypeFromInstance } from '@ngxs/store/plugins';\n\nimport { ActionType } from '../actions/symbols';\nimport { NGXS_DEVELOPMENT_OPTIONS } from './symbols';\n\n@Injectable()\nexport class NgxsUnhandledActionsLogger {\n /**\n * These actions should be ignored by default; the user can increase this\n * list in the future via the `ignoreActions` method.\n */\n private _ignoredActions = new Set<string>([InitState.type, UpdateState.type]);\n\n constructor() {\n const options = inject(NGXS_DEVELOPMENT_OPTIONS);\n if (typeof options.warnOnUnhandledActions === 'object') {\n this.ignoreActions(...options.warnOnUnhandledActions.ignore);\n }\n }\n\n /**\n * Adds actions to the internal list of actions that should be ignored.\n */\n ignoreActions(...actions: ActionType[]): void {\n for (const action of actions) {\n this._ignoredActions.add(action.type);\n }\n }\n\n /** @internal */\n warn(action: any): void {\n const actionShouldBeIgnored = Array.from(this._ignoredActions).some(\n type => type === getActionTypeFromInstance(action)\n );\n\n if (actionShouldBeIgnored) {\n return;\n }\n\n action =\n action.constructor && action.constructor.name !== 'Object'\n ? action.constructor.name\n : action.type;\n\n console.warn(\n `The ${action} action has been dispatched but hasn't been handled. This may happen if the state with an action handler for this action is not registered.`\n );\n }\n}\n","import { ErrorHandler, Injectable, NgZone, inject } from '@angular/core';\n\nexport interface NgxsUnhandledErrorContext {\n action: any;\n}\n\n@Injectable({ providedIn: 'root' })\nexport class NgxsUnhandledErrorHandler {\n private _ngZone = inject(NgZone);\n private _errorHandler = inject(ErrorHandler);\n\n /**\n * The `_unhandledErrorContext` is left unused internally since we do not\n * require it for internal operations. However, developers who wish to provide\n * their own custom error handler may utilize this context information.\n */\n handleError(error: any, _unhandledErrorContext: NgxsUnhandledErrorContext): void {\n // In order to avoid duplicate error handling, it is necessary to leave\n // the Angular zone to ensure that errors are not caught twice. The `handleError`\n // method may contain a `throw error` statement, which is used to re-throw the error.\n // If the error is re-thrown within the Angular zone, it will be caught again by the\n // Angular zone. By default, `@angular/core` leaves the Angular zone when invoking\n // `handleError` (see `_callAndReportToErrorHandler`).\n this._ngZone.runOutsideAngular(() => this._errorHandler.handleError(error));\n }\n}\n","import { getActionTypeFromInstance } from '@ngxs/store/plugins';\nimport { type OperatorFunction, type Observable, map, filter } from 'rxjs';\n\nimport { ActionType } from '../actions/symbols';\nimport { ActionContext, ActionStatus } from '../actions-stream';\n\ntype TupleKeys<T extends any[]> = Exclude<keyof T, keyof []>;\n\n/**\n * Given a POJO, returns the POJO type, given a class constructor object, returns the type of the class.\n *\n * This utility type exists due to the complexity of ActionType being either an ActionDef class or the plain\n * `{ type: string }` type (or similar compatible POJO types).\n */\ntype Constructed<T> = T extends new (...args: any[]) => infer U ? U : T;\n\nexport interface ActionCompletion<T = any, E = Error> {\n action: T;\n result: {\n successful: boolean;\n canceled: boolean;\n error?: E;\n };\n}\n\n/**\n * RxJS operator for selecting out specific actions.\n *\n * This will grab actions that have just been dispatched as well as actions that have completed\n */\nexport function ofAction<T extends ActionType[]>(\n ...allowedTypes: T\n): OperatorFunction<\n ActionContext<Constructed<T[TupleKeys<T>]>>,\n Constructed<T[TupleKeys<T>]>\n> {\n return ofActionOperator(allowedTypes);\n}\n\n/**\n * RxJS operator for selecting out specific actions.\n *\n * This will ONLY grab actions that have just been dispatched\n */\nexport function ofActionDispatched<T extends ActionType[]>(\n ...allowedTypes: T\n): OperatorFunction<\n ActionContext<Constructed<T[TupleKeys<T>]>>,\n Constructed<T[TupleKeys<T>]>\n> {\n return ofActionOperator(allowedTypes, [ActionStatus.Dispatched]);\n}\n\n/**\n * RxJS operator for selecting out specific actions.\n *\n * This will ONLY grab actions that have just been successfully completed\n */\nexport function ofActionSuccessful<T extends ActionType[]>(\n ...allowedTypes: T\n): OperatorFunction<\n ActionContext<Constructed<T[TupleKeys<T>]>>,\n Constructed<T[TupleKeys<T>]>\n> {\n return ofActionOperator(allowedTypes, [ActionStatus.Successful]);\n}\n\n/**\n * RxJS operator for selecting out specific actions.\n *\n * This will ONLY grab actions that have just been canceled\n */\nexport function ofActionCanceled<T extends ActionType[]>(\n ...allowedTypes: T\n): OperatorFunction<\n ActionContext<Constructed<T[TupleKeys<T>]>>,\n Constructed<T[TupleKeys<T>]>\n> {\n return ofActionOperator(allowedTypes, [ActionStatus.Canceled]);\n}\n\n/**\n * RxJS operator for selecting out specific actions.\n *\n * This will ONLY grab actions that have just been completed\n */\nexport function ofActionCompleted<T extends ActionType[]>(\n ...allowedTypes: T\n): OperatorFunction<\n ActionContext<Constructed<T[TupleKeys<T>]>>,\n ActionCompletion<Constructed<T[TupleKeys<T>]>>\n> {\n const allowedStatuses = [\n ActionStatus.Successful,\n ActionStatus.Canceled,\n ActionStatus.Errored\n ];\n return ofActionOperator(allowedTypes, allowedStatuses, mapActionResult);\n}\n\n/**\n * RxJS operator for selecting out specific actions.\n *\n * This will ONLY grab actions that have just thrown an error\n */\nexport function ofActionErrored<T extends ActionType[]>(\n ...allowedTypes: T\n): OperatorFunction<\n ActionContext<Constructed<T[TupleKeys<T>]>>,\n ActionCompletion<Constructed<T[TupleKeys<T>]>>\n> {\n return ofActionOperator(allowedTypes, [ActionStatus.Errored], mapActionResult);\n}\n\nfunction ofActionOperator(\n allowedTypes: ActionType[],\n statuses?: ActionStatus[],\n // This could have been written as\n // `OperatorFunction<ActionContext, ActionCompletion | any>`, as it maps\n // either to `ctx.action` or to `ActionCompletion`. However,\n // `ActionCompletion | any` defaults to `any`, rendering the union\n // type meaningless.\n mapOperator: () => OperatorFunction<ActionContext, any> = mapAction\n): OperatorFunction<ActionContext, any> {\n const allowedMap = createAllowedActionTypesMap(allowedTypes);\n const allowedStatusMap = statuses && createAllowedStatusesMap(statuses);\n return function (o: Observable<ActionContext>) {\n return o.pipe(filterStatus(allowedMap, allowedStatusMap), mapOperator());\n };\n}\n\nfunction filterStatus(allowedTypes: FilterMap, allowedStatuses?: FilterMap) {\n return filter((ctx: ActionContext) => {\n const actionType = getActionTypeFromInstance(ctx.action)!;\n const typeMatch = allowedTypes[actionType];\n const statusMatch = allowedStatuses ? allowedStatuses[ctx.status] : true;\n return typeMatch && statusMatch;\n });\n}\n\nfunction mapActionResult(): OperatorFunction<ActionContext, ActionCompletion> {\n return map(({ action, status, error }: ActionContext) => {\n return <ActionCompletion>{\n action,\n result: {\n successful: ActionStatus.Successful === status,\n canceled: ActionStatus.Canceled === status,\n error\n }\n };\n });\n}\n\nfunction mapAction<T = any>(): OperatorFunction<ActionContext, T> {\n return map((ctx: ActionContext) => <T>ctx.action);\n}\n\ninterface FilterMap {\n [key: string]: boolean;\n}\n\nfunction createAllowedActionTypesMap(types: ActionType[]): FilterMap {\n return types.reduce(\n (filterMap: FilterMap, klass: any) => {\n filterMap[getActionTypeFromInstance(klass)!] = true;\n return filterMap;\n },\n <FilterMap>{}\n );\n}\n\nfunction createAllowedStatusesMap(statuses: ActionStatus[]): FilterMap {\n return statuses.reduce(\n (filterMap: FilterMap, status: ActionStatus) => {\n filterMap[status] = true;\n return filterMap;\n },\n <FilterMap>{}\n );\n}\n","import {\n throwPatchingArrayError,\n throwPatchingPrimitiveError\n} from '../configs/messages.config';\nimport { ExistingState, StateOperator } from '@ngxs/store/operators';\n\nexport function simplePatch<T>(value: Partial<T>): StateOperator<T> {\n return (existingState: ExistingState<T>) => {\n if (typeof ngDevMode !== 'undefined' && ngDevMode) {\n if (Array.isArray(value)) {\n throwPatchingArrayError();\n } else if (typeof value !== 'object') {\n throwPatchingPrimitiveError();\n }\n }\n\n const newState: any = { ...(existingState as any) };\n for (const key in value) {\n // deep clone for patch compatibility\n newState[key] = (value as any)[key];\n }\n\n return newState as T;\n };\n}\n","import { inject, Injectable } from '@angular/core';\nimport { getValue, setValue } from '@ngxs/store/plugins';\nimport { ExistingState, StateOperator, isStateOperator } from '@ngxs/store/operators';\nimport type { Observable } from 'rxjs';\n\nimport { StateContext } from '../symbols';\nimport { StateOperations } from '../internal/internals';\nimport { InternalStateOperations } from '../internal/state-operations';\nimport { simplePatch } from './state-operators';\n\n/**\n * State Context factory class\n * @ignore\n */\n@Injectable({ providedIn: 'root' })\nexport class StateContextFactory {\n private _internalStateOperations = inject(InternalStateOperations);\n\n /**\n * Create the state context\n */\n createStateContext<T>(path: string, abortSignal: AbortSignal): StateContext<T> {\n const root = this._internalStateOperations.getRootStateOperations();\n\n return {\n abortSignal,\n getState(): T {\n const currentAppState = root.getState();\n return getState(currentAppState, path);\n },\n patchState(val: Partial<T>): void {\n const currentAppState = root.getState();\n const patchOperator = simplePatch<T>(val);\n setStateFromOperator(root, currentAppState, patchOperator, path);\n },\n setState(val: T | StateOperator<T>): void {\n const currentAppState = root.getState();\n if (isStateOperator(val)) {\n setStateFromOperator(root, currentAppState, val, path);\n } else {\n setStateValue(root, currentAppState, val, path);\n }\n },\n dispatch(actions: any | any[]): Observable<void> {\n return root.dispatch(actions);\n }\n };\n }\n}\n\nfunction setStateValue<T>(\n root: StateOperations<any>,\n currentAppState: any,\n newValue: T,\n path: string\n): any {\n const newAppState = setValue(currentAppState, path, newValue);\n root.setState(newAppState);\n return newAppState;\n // In doing this refactoring I noticed that there is a 'bug' where the\n // application state is returned instead of this state slice.\n // This has worked this way since the beginning see:\n // https://github.com/ngxs/store/blame/324c667b4b7debd8eb979006c67ca0ae347d88cd/src/state-factory.ts\n // This needs to be fixed, but is a 'breaking' change.\n // I will do this fix in a subsequent PR and we can decide how to handle it.\n}\n\nfunction setStateFromOperator<T>(\n root: StateOperations<any>,\n currentAppState: any,\n stateOperator: StateOperator<T>,\n path: string\n) {\n const local = getState(currentAppState, path);\n const newValue = stateOperator(local as ExistingState<T>);\n return setStateValue(root, currentAppState, newValue, path);\n}\n\nfunction getState<T>(currentAppState: any, path: string): T {\n return getValue(currentAppState, path);\n}\n","import { inject, Injectable, ɵisPromise } from '@angular/core';\nimport {\n defaultIfEmpty,\n finalize,\n from,\n isObservable,\n mergeMap,\n Observable,\n of,\n takeUntil\n} from 'rxjs';\nimport type { ɵActionOptions } from '@ngxs/store/internals';\n\nimport { InternalActions } from '../actions-stream';\nimport { ofActionDispatched } from '../operators/of-action';\nimport { StateContextFactory } from './state-context-factory';\nimport type { StateContext } from '../symbols';\n\n@Injectable({ providedIn: 'root' })\nexport class InternalActionHandlerFactory {\n private readonly _actions = inject(InternalActions);\n private readonly _stateContextFactory = inject(StateContextFactory);\n\n createActionHandler(\n path: string,\n handlerFn: (ctx: StateContext<any>, action: any) => any,\n options: ɵActionOptions\n ): (action: any) => Observable<any> {\n const { dispatched$ } = this._actions;\n\n return (action: any) => {\n const abortController = new AbortController();\n const stateContext = this._stateContextFactory.createStateContext(\n path,\n abortController.signal\n );\n\n let result = handlerFn(stateContext, action);\n\n // We need to use `isPromise` instead of checking whether\n // `result instanceof Promise`. In zone.js patched environments, `global.Promise`\n // is the `ZoneAwarePromise`. Some APIs, which are likely not patched by zone.js\n // for certain reasons, might not work with `instanceof`. For instance, the dynamic\n // import returns a native promise (not a `ZoneAwarePromise`), causing this check to\n // be falsy.\n if (ɵisPromise(result)) {\n result = from(result);\n }\n\n if (isObservable(result)) {\n result = result.pipe(\n mergeMap(value => (ɵisPromise(value) || isObservable(value) ? value : of(value))),\n // If this observable has completed without emitting any values,\n // we wouldn't want to complete the entire chain of actions.\n // If any observable completes, then the action will be canceled.\n // For instance, if any action handler had a statement like\n // `handler(ctx) { return EMPTY; }`, then the action would be canceled.\n // See https://github.com/ngxs/store/issues/1568\n defaultIfEmpty(undefined)\n );\n\n if (options.cancelUncompleted) {\n const canceled = dispatched$.pipe(ofActionDispatched(action));\n result = result.pipe(\n takeUntil(\n new Observable<void>(subscriber => {\n return canceled.subscribe(() => {\n // Note that we shouldn't use `catchError` to catch abort errors\n // because the observable is canceled before the error is thrown,\n // so we don't need to handle it.\n abortController.abort();\n subscriber.next();\n });\n })\n )\n );\n }\n\n result = result.pipe(\n // Note that we use the `finalize` operator only when the action handler\n // explicitly returns an observable (or a promise) to wait for. This means\n // the action handler is written in a \"fire & wait\" style. If the handler’s\n // result is unsubscribed (either because the observable has completed or\n // it was unsubscribed by `takeUntil` due to a new action being dispatched),\n // we prevent writing to the state context.\n finalize(() => {\n if (typeof ngDevMode !== 'undefined' && ngDevMode) {\n function noopAndWarn() {\n console.warn(\n `\"${action}\" attempted to change the state, but the change was ignored because state updates are not allowed after the action handler has completed.`\n );\n }\n\n stateContext.setState = noopAndWarn;\n stateContext.patchState = noopAndWarn;\n } else {\n stateContext.setState = noop;\n stateContext.patchState = noop;\n }\n })\n );\n } else {\n // If the action handler is synchronous and returns nothing (`void`), we\n // still have to convert the result to a synchronous observable.\n result = of(undefined);\n }\n\n return result;\n };\n }\n}\n\n// This is used to replace `setState` and `patchState` once the action\n// handler has been unsubscribed or completed, to prevent writing\n// to the state context.\nfunction noop() {}\n","import { DestroyRef, Injectable, Injector, inject } from '@angular/core';\nimport {\n ɵmemoize,\n ɵMETA_KEY,\n ɵPlainObjectOf,\n ɵMetaDataModel,\n ɵgetStoreMetadata,\n ɵStateClassInternal,\n ɵINITIAL_STATE_TOKEN,\n ɵSharedSelectorOptions,\n ɵRuntimeSelectorContext,\n ɵNgxsActionRegistry\n} from '@ngxs/store/internals';\nimport { getActionTypeFromInstance, getValue, setValue } from '@ngxs/store/plugins';\nimport {\n forkJoin,\n Subscription,\n catchError,\n defaultIfEmpty,\n filter,\n map,\n mergeMap,\n Observable,\n of\n} from 'rxjs';\n\nimport { NgxsConfig, StateContext } from '../symbols';\nimport {\n buildGraph,\n findFullParentPath,\n MappedStore,\n nameToState,\n ɵPROP_GETTER,\n StateKeyGraph,\n StatesAndDefaults,\n StatesByName,\n topologicalSort\n} from './internals';\nimport { ActionContext, ActionStatus, InternalActions } from '../actions-stream';\nimport { InternalDispatchedActionResults } from '../internal/action-results';\nimport { ensureStateNameIsUnique, ensureStatesAreDecorated } from '../utils/store-validators';\nimport { ensureStateClassIsInjectable } from '../ivy/ivy-enabled-in-dev-mode';\nimport { NgxsUnhandledActionsLogger } from '../dev-features/ngxs-unhandled-actions-logger';\nimport { NgxsUnhandledErrorHandler } from '../ngxs-unhandled-error-handler';\nimport { assignUnhandledCallback } from './unhandled-rxjs-error-callback';\nimport { InternalActionHandlerFactory } from './action-handler-factory';\n\nfunction cloneDefaults(defaults: any): any {\n let value = defaults === undefined ? {} : defaults;\n\n if (defaults) {\n if (Array.isArray(defaults)) {\n value = defaults.slice();\n } else if (typeof defaults === 'object') {\n value = { ...defaults };\n }\n }\n\n return value;\n}\n\n/**\n * The `StateFactory` class adds root and feature states to the graph.\n * This extracts state names from state classes, checks if they already\n * exist in the global graph, throws errors if their names are invalid, etc.\n *\n * Root and feature initializers call `addAndReturnDefaults()` to add those states\n * to the global graph. Since `addAndReturnDefaults` runs within the injection\n * context (which might be the root injector or a feature injector), we can\n * retrieve an instance of the state class using `inject(StateClass)`.\n * @ignore\n */\n@Injectable({ providedIn: 'root' })\nexport class StateFactory {\n private readonly _injector = inject(Injector);\n private readonly _config = inject(NgxsConfig);\n private readonly _actionHandlerFactory = inject(InternalActionHandlerFactory);\n private readonly _actions = inject(InternalActions);\n private readonly _actionResults = inject(InternalDispatchedActionResults);\n private readonly _initialState = inject(ɵINITIAL_STATE_TOKEN, { optional: true });\n private readonly _actionRegistry = inject(ɵNgxsActionRegistry);\n private readonly _propGetter = inject(ɵPROP_GETTER);\n\n private _actionsSubscription: Subscription | null = null;\n\n private _ngxsUnhandledErrorHandler: NgxsUnhandledErrorHandler = null!;\n\n private _states: MappedStore[] = [];\n private _statesByName: StatesByName = {};\n private _statePaths: ɵPlainObjectOf<string> = {};\n\n getRuntimeSelectorContext = ɵmemoize(() => {\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const stateFactory = this;\n const propGetter = stateFactory._propGetter;\n\n function resolveGetter(key: string) {\n const path = stateFactory._statePaths[key];\n return path ? propGetter(path.split('.')) : null;\n }\n\n const context: ɵRuntimeSelectorContext = {\n getStateGetter(key: string) {\n // Use `@__INLINE__` annotation to forcely inline `resolveGetter`.\n // This is a Terser annotation, which will function only in the production mode.\n let getter = /*@__INLINE__*/ resolveGetter(key);\n if (getter) {\n return getter;\n }\n return (...args) => {\n // Late loaded getter\n if (!getter) {\n getter = /*@__INLINE__*/ resolveGetter(key);\n }\n return getter ? getter(...args) : undefined;\n };\n },\n getSelectorOptions(localOptions?: ɵSharedSelectorOptions) {\n const globalSelectorOptions = stateFactory._config.selectorOptions;\n return {\n ...globalSelectorOptions,\n ...(localOptions || {})\n };\n }\n };\n return context;\n });\n\n constructor() {\n inject(DestroyRef).onDestroy(() => {\n // Clear state references to help the garbage collector in SSR\n // environments under high load, preventing memory leaks.\n this._states = [];\n this._actionsSubscription?.unsubscribe();\n });\n }\n\n /**\n * Add a new state to the global defs.\n */\n private add(stateClasses: ɵStateClassInternal[]): MappedStore[] {\n if (typeof ngDevMode !== 'undefined' && ngDevMode) {\n ensureStatesAreDecorated(stateClasses);\n }\n\n const { newStates } = this.addToStatesMap(stateClasses);\n if (!newStates.length) return [];\n\n const stateGraph: StateKeyGraph = buildGraph(newStates);\n const sortedStates: string[] = topologicalSort(stateGraph);\n const paths: ɵPlainObjectOf<string> = findFullParentPath(stateGraph);\n const nameGraph: ɵPlainObjectOf<ɵStateClassInternal> = nameToState(newStates);\n const bootstrappedStores: MappedStore[] = [];\n\n for (const name of sortedStates) {\n const stateClass: ɵStateClassInternal = nameGraph[name];\n const path: string = paths[name];\n const meta: ɵMetaDataModel = stateClass[ɵMETA_KEY]!;\n\n this.addRuntimeInfoToMeta(meta, path);\n\n if (typeof ngDevMode !== 'undefined' && ngDevMode) {\n ensureStateClassIsInjectable(stateClass);\n }\n\n const stateMap: MappedStore = {\n name,\n path,\n isInitialised: false,\n actions: meta.actions,\n instance: inject(stateClass),\n defaults: cloneDefaults(meta.defaults)\n };\n\n // ensure our store hasn't already been added\n // but don't throw since it could be lazy\n // loaded from different paths\n if (!this.hasBeenMountedAndBootstrapped(name, path)) {\n bootstrappedStores.push(stateMap);\n }\n\n this._states.push(stateMap);\n this.hydrateActionMetasMap(stateMap);\n }\n\n return bootstrappedStores;\n }\n\n /**\n * Add a set of states to the store and return the defaults\n */\n addAndReturnDefaults(stateClasses: ɵStateClassInternal[]): StatesAndDefaults {\n const classes: ɵStateClassInternal[] = stateClasses || [];\n\n const mappedStores: MappedStore[] = this.add(classes);\n const defaults = mappedStores.reduce(\n (result: any, mappedStore: MappedStore) =>\n setValue(result, mappedStore.path, mappedStore.defaults),\n {}\n );\n return { defaults, states: mappedStores };\n }\n\n connectActionHandlers(): void {\n this._actionsSubscription = this._actions\n .pipe(\n filter((ctx: ActionContext) => ctx.status === ActionStatus.Dispatched),\n mergeMap(ctx => {\n const action: any = ctx.action;\n return this.invokeActions(action).pipe(\n map(() => <ActionContext>{ action, status: ActionStatus.Successful }),\n defaultIfEmpty(<ActionContext>{ action, status: ActionStatus.Canceled }),\n catchError(error => {\n const ngxsUnhandledErrorHandler = (this._ngxsUnhandledErrorHandler ||=\n this._injector.get(NgxsUnhandledErrorHandler));\n const handleableError = assignUnhandledCallback(error, () =>\n ngxsUnhandledErrorHandler.handleError(error, { action })\n );\n return of(<ActionContext>{\n action,\n status: ActionStatus.Errored,\n error: handleableError\n });\n })\n );\n })\n )\n .subscribe(ctx => this._actionResults.next(ctx));\n }\n\n /**\n * Invoke actions on the states.\n */\n private invokeActions(action: any): Observable<unknown[]> {\n const type = getActionTypeFromInstance(action)!;\n const results: Observable<unknown>[] = [];\n\n // Determines whether the dispatched action has been handled, this is assigned\n // to `true` within the below `for` loop if any `actionMetas` has been found.\n let actionHasBeenHandled = false;\n\n const actionHandlers = this._actionRegistry.get(type);\n\n if (actionHandlers) {\n for (const actionHandler of actionHandlers) {\n let result;\n\n try {\n result = actionHandler(action);\n } catch (e) {\n result = new Observable(subscriber => subscriber.error(e));\n }\n\n results.push(result);\n\n actionHasBeenHandled = true;\n }\n }\n\n // The `NgxsUnhandledActionsLogger` is a tree-shakable class which functions\n // only during development.\n if (typeof ngDevMode !== 'undefined' && ngDevMode && !actionHasBeenHandled) {\n const unhandledActionsLogger = this._injector.get(NgxsUnhandledActionsLogger, null);\n // The `NgxsUnhandledActionsLogger` will not be resolved by the injector if the\n // `NgxsDevelopmentModule` is not provided. It's enough to check whether the `injector.get`\n // didn't return `null` so we may ensure the module has been imported.\n unhandledActionsLogger?.warn(action);\n }\n\n if (!results.length) {\n results.push(of(undefined));\n }\n\n return forkJoin(results);\n }\n\n private addToStatesMap(stateClasses: ɵStateClassInternal[]): {\n newStates: ɵStateClassInternal[];\n } {\n const newStates: ɵStateClassInternal[] = [];\n const statesMap: StatesByName = this._statesByName;\n\n for (const stateClass of stateClasses) {\n const stateName = ɵgetStoreMetadata(stateClass).name!;\n if (typeof ngDevMode !== 'undefined' && ngDevMode) {\n ensureStateNameIsUnique(stateName, stateClass, statesMap);\n }\n const unmountedState = !statesMap[stateName];\n if (unmountedState) {\n newStates.push(stateClass);\n statesMap[stateName] = stateClass;\n }\n }\n\n return { newStates };\n }\n\n private addRuntimeInfoToMeta(meta: ɵMetaDataModel, path: string): void {\n this._statePaths[meta.name!] = path;\n // TODO: versions after v3 - we plan to get rid of the `path` property because it is non-deterministic\n // we can do this when we get rid of the incorrectly exposed getStoreMetadata\n // We will need to come up with an alternative to what was exposed in v3 because this is used by many plugins\n meta.path = path;\n }\n\n private hasBeenMountedAndBootstrapped(name: string, path: string): boolean {\n const valueIsBootstrappedInInitialState: boolean =\n getValue(this._initialState, path) !== undefined;\n // This checks whether a state has been already added to the global graph and\n // its lifecycle is in 'bootstrapped' state.\n return this._statesByName[name] && valueIsBootstrappedInInitialState;\n }\n\n private hydrateActionMetasMap({ path, actions, instance }: MappedStore): void {\n for (const actionType of Object.keys(actions)) {\n const actionHandlers = actions[actionType].map(actionMeta => {\n const handlerFn = (ctx: StateContext<any>, action: any) =>\n instance[actionMeta.fn](ctx, action);\n\n return this._actionHandlerFactory.createActionHandler(\n path,\n handlerFn,\n actionMeta.options\n );\n });\n\n for (const actionHandler of actionHandlers) {\n this._actionRegistry.register(actionType, actionHandler);\n }\n }\n }\n}\n","import { computed, inject, Injectable, Signal } from '@angular/core';\nimport {\n type Subscription,\n catchError,\n distinctUntilChanged,\n map,\n Observable,\n shareReplay,\n take,\n of\n} from 'rxjs';\nimport { ɵINITIAL_STATE_TOKEN, ɵStateStream } from '@ngxs/store/internals';\n\nimport { InternalStateOperations } from './internal/state-operations';\nimport { getRootSelectorFactory } from './selectors/selector-utils';\nimport { leaveNgxs } from './operators/leave-ngxs';\nimport { NgxsConfig } from './symbols';\nimport { StateFactory } from './internal/state-factory';\nimport { TypedSelector } from './selectors';\nimport { InternalNgxsExecutionStrategy } from './execution/execution-strategy';\n\n// We need to check whether the provided `T` type extends an array in order to\n// apply the `NonNullable[]` type to its elements. This is because, for\n// `const actions = [undefined]`, type inference would result in `NonNullable<unknown>`\n// rather than `NonNullable<unknown>[]`.\ntype ActionOrArrayOfActions<T> = T extends (infer U)[] ? NonNullable<U>[] : NonNullable<T>;\n\n@Injectable({ providedIn: 'root' })\nexport class Store {\n private _stateStream = inject(ɵStateStream);\n private _internalStateOperations = inject(InternalStateOperations);\n private _config = inject(NgxsConfig);\n private _internalExecutionStrategy = inject(InternalNgxsExecutionStrategy);\n private _stateFactory = inject(StateFactory);\n\n /**\n * This is a derived state stream that leaves NGXS execution strategy to emit state changes within the Angular zone,\n * because state is being changed actually within the `<root>` zone, see `InternalDispatcher#dispatchSingle`.\n * All selects would use this stream, and it would call leave only once for any state change across all active selectors.\n */\n private _selectableStateStream = this._stateStream.pipe(\n leaveNgxs(this._internalExecutionStrategy),\n shareReplay({ bufferSize: 1, refCount: true })\n );\n\n constructor() {\n this.initStateStream();\n }\n\n /**\n * Dispatches action(s).\n */\n dispatch<T>(actionOrActions: ActionOrArrayOfActions<T>): Observable<void> {\n if (typeof ngDevMode !== 'undefined' && ngDevMode) {\n if (\n // If a single action is dispatched and it's nullable.\n actionOrActions == null ||\n // If a list of actions is dispatched and any of the actions are nullable.\n (Array.isArray(actionOrActions) && actionOrActions.some(action => action == null))\n ) {\n const error = new Error('`dispatch()` was called without providing an action.');\n return new Observable(subscriber => subscriber.error(error));\n }\n }\n\n return this._internalStateOperations.getRootStateOperations().dispatch(actionOrActions);\n }\n\n /**\n * Selects a slice of data from the store.\n */\n select<T>(selector: TypedSelector<T>): Observable<T> {\n const selectorFn = this.getStoreBoundSelectorFn(selector);\n return this._selectableStateStream.pipe(\n map(selectorFn),\n catchError((error: Error): Observable<never> | Observable<undefined> => {\n // if error is TypeError we swallow it to prevent usual errors with property access\n if (this._config.selectorOptions.suppressErrors && error instanceof TypeError) {\n return of(undefined);\n }\n\n // rethrow other errors\n throw error;\n }),\n distinctUntilChanged(),\n leaveNgxs(this._internalExecutionStrategy)\n );\n }\n\n /**\n * Select one slice of data from the store.\n */\n selectOnce<T>(selector: TypedSelector<T>): Observable<T> {\n return this.select(selector).pipe(take(1));\n }\n\n /**\n * Select a snapshot from the state.\n */\n selectSnapshot<T>(selector: TypedSelector<T>): T {\n const selectorFn = this.getStoreBoundSelectorFn(selector);\n return selectorFn(this._stateStream.getValue());\n }\n\n /**\n * Select a signal from the state.\n */\n selectSignal<T>(selector: TypedSelector<T>): Signal<T> {\n const selectorFn = this.getStoreBoundSelectorFn(selector);\n if (typeof ngDevMode !== 'undefined' && ngDevMode) {\n return computed<T>(() => selectorFn(this._stateStream.state()), {\n debugName: 'NGXS selectSignal'\n });\n } else {\n return computed<T>(() => selectorFn(this._stateStream.state()));\n }\n }\n\n /**\n * Allow the user to subscribe to the root of the state\n */\n subscribe(fn?: (value: any) => void): Subscription {\n return this._selectableStateStream\n .pipe(leaveNgxs(this._internalExecutionStrategy))\n .subscribe(fn);\n }\n\n /**\n * Return the raw value of the state.\n */\n snapshot(): any {\n return this._internalStateOperations.getRootStateOperations().getState();\n }\n\n /**\n * Reset the state to a specific point in time. This method is useful\n * for plugin's who need to modify the state directly or unit testing.\n */\n reset(state: any) {\n this._internalStateOperations.getRootStateOperations().setState(state);\n }\n\n private getStoreBoundSelectorFn(selector: any) {\n const makeSelectorFn = getRootSelectorFactory(selector);\n const runtimeContext = this._stateFactory.getRuntimeSelectorContext();\n return makeSelectorFn(runtimeContext);\n }\n\n private initStateStream(): void {\n const initialStateValue: any = inject(ɵINITIAL_STATE_TOKEN);\n const value = this._stateStream.value;\n const storeIsEmpty = !value || Object.keys(value).length === 0;\n\n if (storeIsEmpty) {\n this._stateStream.next(initialStateValue);\n }\n }\n}\n","import { InjectionToken, makeEnvironmentProviders } from '@angular/core';\n\n/**\n * InjectionToken that registers preboot functions (called before the root initializer).\n */\nexport const NGXS_PREBOOT_FNS = new InjectionToken<VoidFunction[]>(\n typeof ngDevMode !== 'undefined' && ngDevMode ? 'NGXS_PREBOOT_FNS' : ''\n);\n\n/**\n * This function registers a preboot function which will be called before the root\n * store initializer is run, but after all of the NGXS features are provided and\n * available for injection. This is useful for registering action stream listeners\n * before any action is dispatched.\n *\n * ```ts\n * bootstrapApplication(AppComponent, {\n * providers: [\n * provideStore(\n * [CountriesState],\n * withNgxsPreboot(() => {\n * const actions$ = inject(Actions);\n * actions$.subscribe(ctx => console.log(ctx));\n * })\n * )\n * ]\n * });\n * ```\n */\nexport function withNgxsPreboot(prebootFn: VoidFunction) {\n return makeEnvironmentProviders([\n { provide: NGXS_PREBOOT_FNS, multi: true, useValue: prebootFn }\n ]);\n}\n","import { inject, InjectionToken } from '@angular/core';\n\nexport const ROOT_STORE_GUARD = /* @__PURE__ */ new InjectionToken('ROOT_STORE_GUARD', {\n providedIn: 'root',\n factory: () => ({ initialized: false })\n});\n\nexport function assertRootStoreNotInitialized(): void {\n const rootStoreGuard = inject(ROOT_STORE_GUARD);\n if (rootStoreGuard.initialized) {\n throw new Error('provideStore() should only be called once.');\n }\n rootStoreGuard.initialized = true;\n}\n","import { DestroyRef, inject, Injectable } from '@angular/core';\n\nimport { Store } from '../../store';\nimport { NgxsConfig } from '../../symbols';\n\n/**\n * Allows the select decorator to get access to the DI store, this is used internally\n * in `@Select` decorator.\n */\n@Injectable({ providedIn: 'root' })\nexport class SelectFactory {\n static store: Store | null = null;\n static config: NgxsConfig | null = null;\n\n constructor(store: Store, config: NgxsConfig) {\n SelectFactory.store = store;\n SelectFactory.config = config;\n\n inject(DestroyRef).onDestroy(() => {\n SelectFactory.store = null;\n SelectFactory.config = null;\n });\n }\n}\n","import { DestroyRef, inject, Injectable } from '@angular/core';\nimport { ɵNgxsAppBootstrappedState } from '@ngxs/store/internals';\nimport { getValue, InitState, UpdateState } from '@ngxs/store/plugins';\nimport { EMPTY, mergeMap, skip, startWith } from 'rxjs';\n\nimport { Store } from '../store';\nimport { StateContextFactory } from './state-context-factory';\nimport { InternalStateOperations } from './state-operations';\nimport { MappedStore, StatesAndDefaults } from './internals';\nimport { NgxsLifeCycle, NgxsSimpleChange, StateContext } from '../symbols';\nimport { getInvalidInitializationOrderMessage } from '../configs/messages.config';\n\n@Injectable({ providedIn: 'root' })\nexport class LifecycleStateManager {\n private _store = inject(Store);\n private _internalStateOperations = inject(InternalStateOperations);\n private _stateContextFactory = inject(StateContextFactory);\n private _appBootstrappedState = inject(ɵNgxsAppBootstrappedState);\n private _abortController = new AbortController();\n\n private _initStateHasBeenDispatched?: boolean;\n\n constructor() {\n inject(DestroyRef).onDestroy(() => this._abortController.abort());\n }\n\n ngxsBootstrap(\n action: InitState | UpdateState,\n results: StatesAndDefaults | undefined\n ): void {\n if (typeof ngDevMode !== 'undefined' && ngDevMode) {\n if (action instanceof InitState) {\n this._initStateHasBeenDispatched = true;\n } else if (\n // This is a dev mode-only check that ensures the correct order of\n // state initialization. The `NgxsModule.forRoot` or `provideStore` should\n // always come first, followed by `forFeature` and `provideStates`. If the\n // `UpdateState` is dispatched before the `InitState` is dispatched, it indicates\n // that modules or providers are in an invalid order.\n action instanceof UpdateState &&\n !this._initStateHasBeenDispatched\n ) {\n console.error(getInvalidInitializationOrderMessage(action.addedStates));\n }\n }\n\n // It does not need to unsubscribe because it is completed when the\n // root injector is destroyed.\n this._internalStateOperations\n .getRootStateOperations()\n .dispatch(action)\n .pipe(\n mergeMap(() => {\n // If no states are provided, we safely complete the stream\n // and do not proceed further.\n if (!results) {\n return EMPTY;\n }\n\n this._invokeInitOnStates(results!.states);\n return this._appBootstrappedState;\n })\n )\n .subscribe(appBootstrapped => {\n if (appBootstrapped) {\n this._invokeBootstrapOnStates(results!.states);\n }\n });\n }\n\n private _invokeInitOnStates(mappedStores: MappedStore[]): void {\n for (const mappedStore of mappedStores) {\n const instance: NgxsLifeCycle = mappedStore.instance;\n\n if (instance.ngxsOnChanges) {\n // We are manually keeping track of the previous value\n // within the subscribe block in order to drop the `pairwise()` operator.\n let previousValue: any;\n // It does not need to unsubscribe because it is completed when the\n // root injector is destroyed.\n this._store\n .select(state => getValue(state, mappedStore.path))\n .pipe(\n // Ensure initial state is captured\n startWith(undefined),\n // `skip` is using `filter` internally.\n skip(1)\n )\n .subscribe(currentValue => {\n const change = new NgxsSimpleChange(\n previousValue,\n currentValue,\n !mappedStore.isInitialised\n );\n previousValue = currentValue;\n instance.ngxsOnChanges!(change);\n });\n }\n\n instance.ngxsOnInit?.(this._getStateContext(mappedStore));\n\n mappedStore.isInitialised = true;\n }\n }\n\n private _invokeBootstrapOnStates(mappedStores: MappedStore[]) {\n for (const mappedStore of mappedStores) {\n const instance: NgxsLifeCycle = mappedStore.instance;\n instance.ngxsAfterBootstrap?.(this._getStateContext(mappedStore));\n }\n }\n\n private _getStateContext(mappedStore: MappedStore): StateContext<any> {\n return this._stateContextFactory.createStateContext(\n mappedStore.path,\n this._abortController.signal\n );\n }\n}\n","import {\n InjectionToken,\n Provider,\n inject,\n provideEnvironmentInitializer\n} from '@angular/core';\nimport { ɵStateClassInternal } from '@ngxs/store/internals';\n\nimport { Store } from '../store';\nimport { NGXS_PREBOOT_FNS } from './preboot';\nimport { InitState, UpdateState } from '../plugin_api';\nimport { FEATURE_STATE_TOKEN, ROOT_STATE_TOKEN } from '../symbols';\nimport { StateFactory } from '../internal/state-factory';\nimport { StatesAndDefaults } from '../internal/internals';\nimport { assertRootStoreNotInitialized } from './root-guard';\nimport { SelectFactory } from '../decorators/select/select-factory';\nimport { InternalStateOperations } from '../internal/state-operations';\nimport { LifecycleStateManager } from '../internal/lifecycle-state-manager';\nimport { installOnUnhandhedErrorHandler } from '../internal/unhandled-rxjs-error-callback';\n\n/**\n * This function is shared by both NgModule and standalone features.\n * When using `NgxsModule.forRoot` and `provideStore`, we can depend on the\n * same initialization functionality.\n */\nexport function rootStoreInitializer(): void {\n if (typeof ngDevMode !== 'undefined' && ngDevMode) {\n assertRootStoreNotInitialized();\n }\n\n // Override the RxJS `config.onUnhandledError` within the root store initializer,\n // but only after other code has already executed.\n // If users have a custom `config.onUnhandledError`, we might overwrite it too\n // early and capture the original `config.onUnhandledError` before it is properly set.\n installOnUnhandhedErrorHandler();\n\n const prebootFns = inject(NGXS_PREBOOT_FNS, { optional: true }) || [];\n prebootFns.forEach(prebootFn => prebootFn());\n\n const factory = inject(StateFactory);\n const internalStateOperations = inject(InternalStateOperations);\n\n inject(Store);\n inject(SelectFactory);\n\n const states = inject(ROOT_STATE_TOKEN, { optional: true }) || [];\n const lifecycleStateManager = inject(LifecycleStateManager);\n\n // Add stores to the state graph and return their defaults.\n const results: StatesAndDefaults = factory.addAndReturnDefaults(states);\n\n internalStateOperations.setStateToTheCurrentWithNew(results);\n\n // Connect our actions stream.\n factory.connectActionHandlers();\n\n // Dispatch the init action and invoke init and bootstrap functions after.\n lifecycleStateManager.ngxsBootstrap(new InitState(), results);\n}\n\n/**\n * This function is utilized by both NgModule and standalone features.\n * When using `NgxsModule.forFeature` and `provideStates`, we can depend on\n * the same initialization functionality.\n */\nexport function featureStatesInitializer(): void {\n inject(Store);\n\n const internalStateOperations = inject(InternalStateOperations);\n const factory = inject(StateFactory);\n const states = inject(FEATURE_STATE_TOKEN, { optional: true }) || [];\n const lifecycleStateManager = inject(LifecycleStateManager);\n\n // Since FEATURE_STATE_TOKEN is a multi token, we need to\n // flatten it [[Feature1State, Feature2State], [Feature3State]].\n const flattenedStates: ɵStateClassInternal[] = states.reduce(\n (total: ɵStateClassInternal[], values: ɵStateClassInternal[]) => total.concat(values),\n []\n );\n\n // add stores to the state graph and return their defaults.\n const results: StatesAndDefaults = factory.addAndReturnDefaults(flattenedStates);\n\n if (results.states.length) {\n internalStateOperations.setStateToTheCurrentWithNew(results);\n\n // Dispatch the update action and invoke init and bootstrap functions after.\n lifecycleStateManager.ngxsBootstrap(new UpdateState(results.defaults), results);\n }\n}\n\n/**\n * InjectionToken that registers the global Store.\n */\nexport const NGXS_ROOT_STORE_INITIALIZER = new InjectionToken<void>(\n typeof ngDevMode !== 'undefined' && ngDevMode ? 'NGXS_ROOT_STORE_INITIALIZER' : ''\n);\n\n/**\n * InjectionToken that registers feature states.\n */\nexport const NGXS_FEATURE_STORE_INITIALIZER = new InjectionToken<void>(\n typeof ngDevMode !== 'undefined' && ngDevMode ? 'NGXS_FEATURE_STORE_INITIALIZER' : ''\n);\n\nexport const NGXS_ROOT_ENVIRONMENT_INITIALIZER: Provider = [\n { provide: NGXS_ROOT_STORE_INITIALIZER, useFactory: rootStoreInitializer },\n provideEnvironmentInitializer(() => inject(NGXS_ROOT_STORE_INITIALIZER))\n];\n\n/**\n * The `NGXS_FEATURE_ENVIRONMENT_INITIALIZER` functions as an environment initializer\n * at the `Route` level. Angular Router creates an environment route injector for each\n * matched route where navigation occurs. The injector is created once, ensuring that\n * the feature states initialization only happens once as well.\n */\nexport const NGXS_FEATURE_ENVIRONMENT_INITIALIZER: Provider = [\n { provide: NGXS_FEATURE_STORE_INITIALIZER, useFactory: featureStatesInitializer },\n provideEnvironmentInitializer(() => inject(NGXS_FEATURE_STORE_INITIALIZER))\n];\n","import { NgModule } from '@angular/core';\n\nimport { rootStoreInitializer } from '../standalone-features/initializers';\n\n/**\n * @ignore\n */\n@NgModule()\nexport class NgxsRootModule {\n constructor() {\n rootStoreInitializer();\n }\n}\n","import { NgModule } from '@angular/core';\n\nimport { featureStatesInitializer } from '../standalone-features/initializers';\n\n/**\n * @ignore\n */\n@NgModule()\nexport class NgxsFeatureModule {\n constructor() {\n featureStatesInitializer();\n }\n}\n","import { APP_BOOTSTRAP_LISTENER, Provider, inject } from '@angular/core';\nimport { ɵStateClass, ɵNgxsAppBootstrappedState } from '@ngxs/store/internals';\n\nimport { NgxsModuleOptions, ROOT_STATE_TOKEN, NGXS_OPTIONS } from '../symbols';\n\n/**\n * This function provides the required providers when invoking `NgxsModule.forRoot`\n * or `provideStore`. It is shared between the NgModule and standalone APIs.\n */\nexport function getRootProviders(\n states: ɵStateClass[],\n options: NgxsModuleOptions\n): Provider[] {\n return [\n ...states,\n {\n provide: ROOT_STATE_TOKEN,\n useValue: states\n },\n {\n provide: APP_BOOTSTRAP_LISTENER,\n useFactory: () => {\n const appBootstrappedState = inject(ɵNgxsAppBootstrappedState);\n return () => appBootstrappedState.bootstrap();\n },\n multi: true\n },\n {\n provide: NGXS_OPTIONS,\n useValue: options\n }\n ];\n}\n","import { Provider } from '@angular/core';\nimport { ɵStateClass } from '@ngxs/store/internals';\n\nimport { FEATURE_STATE_TOKEN } from '../symbols';\nimport { PluginManager } from '../plugin-manager';\n\n/**\n * This function provides the required providers when calling `NgxsModule.forFeature`\n * or `provideStates`. It is shared between the NgModule and standalone APIs.\n */\nexport function getFeatureProviders(states: ɵStateClass[]): Provider[] {\n return [\n PluginManager,\n ...states,\n {\n provide: FEATURE_STATE_TOKEN,\n multi: true,\n useValue: states\n }\n ];\n}\n","import { ModuleWithProviders, NgModule } from '@angular/core';\nimport { ɵStateClass } from '@ngxs/store/internals';\n\nimport { NgxsModuleOptions } from './symbols';\nimport { NgxsRootModule } from './modules/ngxs-root.module';\nimport { NgxsFeatureModule } from './modules/ngxs-feature.module';\nimport { getRootProviders } from './standalone-features/root-providers';\nimport { getFeatureProviders } from './standalone-features/feature-providers';\n\n@NgModule()\nexport class NgxsModule {\n static forRoot(\n states: ɵStateClass[] = [],\n options: NgxsModuleOptions = {}\n ): ModuleWithProviders<NgxsRootModule> {\n return {\n ngModule: NgxsRootModule,\n providers: getRootProviders(states, options)\n };\n }\n\n static forFeature(states: ɵStateClass[] = []): ModuleWithProviders<NgxsFeatureModule> {\n return {\n ngModule: NgxsFeatureModule,\n providers: getFeatureProviders(states)\n };\n }\n}\n","import { ɵActionOptions, ɵensureStoreMetadata, ɵhasOwnProperty } from '@ngxs/store/internals';\n\nimport { ActionDef, ActionType } from '../actions/symbols';\nimport { throwActionDecoratorError } from '../configs/messages.config';\nimport { StateContext } from '../symbols';\n\n/**\n * Given an action class, returns its payload.\n */\ntype ActionToPayload<Action extends ActionType> =\n Action extends ActionDef<any, infer ActionPayload> ? ActionPayload : never;\n\n/**\n * Given a list of action classes, returns the union of their payloads.\n */\ntype ActionsToPayload<Actions extends readonly ActionType[]> = {\n [K in keyof Actions]: ActionToPayload<Actions[K]>;\n}[number];\n\n/**\n * Given an action class or a list of action classes, returns the union of their payloads.\n */\ntype ActionOrActionsToPayload<ActionOrActions> = ActionOrActions extends ActionType\n ? ActionToPayload<ActionOrActions>\n : ActionOrActions extends ActionType[]\n ? ActionsToPayload<ActionOrActions>\n : never;\n\n/**\n * Describes what methods can be decorated with an `@Action` decorator that has been passed the given action(s).\n */\ntype HandlerTypedPropertyDescriptor<ActionOrActions> =\n | TypedPropertyDescriptor<() => any>\n | TypedPropertyDescriptor<(stateContext: StateContext<any>) => any>\n | TypedPropertyDescriptor<\n (\n stateContext: StateContext<any>,\n action: ActionOrActionsToPayload<ActionOrActions>\n ) => any\n >;\n\n/**\n * The result of a call to the `@Action()` decorator with the given action(s) as its first argument.\n */\ntype ActionDecorator<ActionOrActions extends ActionType | ActionType[]> = (\n target: any,\n name: string | symbol,\n _descriptor: HandlerTypedPropertyDescriptor<ActionOrActions>\n) => void;\n\n/**\n * Decorates a method with action information.\n */\nexport function Action<ActionOrActions extends ActionType | ActionType[]>(\n actions: ActionOrActions,\n options?: ɵActionOptions\n): ActionDecorator<ActionOrActions> {\n return (\n target: any,\n name: string | symbol,\n // This parameter ensures that the decorated method has a call signature that could be passed an instance of the given action(s).\n _descriptor: HandlerTypedPropertyDescriptor<ActionOrActions>\n ): void => {\n if (typeof ngDevMode !== 'undefined' && ngDevMode) {\n const isStaticMethod = ɵhasOwnProperty(target, 'prototype');\n\n if (isStaticMethod) {\n throwActionDecoratorError();\n }\n }\n\n const meta = ɵensureStoreMetadata(target.constructor);\n\n const actionArray = Array.isArray(actions) ? actions : [actions];\n\n for (const action of actionArray) {\n const type = action.type;\n\n if (!meta.actions[type]) {\n meta.actions[type] = [];\n }\n\n meta.actions[type].push({\n fn: name,\n options: options || {},\n type\n });\n }\n };\n}\n","import {\n ɵStateClass,\n ɵMETA_KEY,\n ɵMETA_OPTIONS_KEY,\n ɵMetaDataModel,\n ɵStateClassInternal,\n ɵStoreOptions,\n ɵensureStoreMetadata,\n ɵhasOwnProperty\n} from '@ngxs/store/internals';\n\nimport { ensureStateNameIsValid } from '../utils/store-validators';\n\n/**\n * Decorates a class with ngxs state information.\n */\nexport function State<T>(options: ɵStoreOptions<T>) {\n return (target: ɵStateClass): void => {\n const stateClass: ɵStateClassInternal = target;\n const inherited = Object.getPrototypeOf(stateClass) as ɵStateClassInternal;\n const meta = ɵensureStoreMetadata(stateClass);\n const mergedOptions = { ...(inherited[ɵMETA_OPTIONS_KEY] || {}), ...options };\n\n // Apply merged options to metadata.\n mutateMetaData(meta, inherited, mergedOptions);\n stateClass[ɵMETA_OPTIONS_KEY] = mergedOptions;\n };\n}\n\n// Updates metadata using inherited and current options\nfunction mutateMetaData<T>(\n meta: ɵMetaDataModel,\n inherited: ɵStateClassInternal,\n options: ɵStoreOptions<T>\n): void {\n const { name, defaults, children } = options;\n const stateName = typeof name === 'string' ? name : name?.getName?.() || null;\n\n if (typeof ngDevMode !== 'undefined' && ngDevMode) {\n ensureStateNameIsValid(stateName);\n }\n\n if (ɵhasOwnProperty(inherited, ɵMETA_KEY)) {\n const inheritedMeta = inherited[ɵMETA_KEY] || <ɵMetaDataModel>{};\n meta.actions = { ...meta.actions, ...inheritedMeta.actions };\n }\n\n meta.name = stateName;\n meta.defaults = defaults;\n meta.children = children;\n}\n","import type { Observable } from 'rxjs';\nimport { ɵExtractTokenType, StateToken } from '@ngxs/store/internals';\n\nimport { SelectFactory } from './select-factory';\nimport type { NgxsConfig } from '../../symbols';\nimport { compliantPropGetter, fastPropGetter } from '../../internal/internals';\n\n/**\n * Get a deeply nested value. Example:\n *\n * getValue({ foo: bar: [] }, 'foo.bar') //=> []\n *\n * @ignore\n *\n * Marked for removal. It's only used within `createSelectorFn`.\n */\nexport function propGetter(paths: string[], config: NgxsConfig) {\n if (config?.compatibility?.strictContentSecurityPolicy) {\n return compliantPropGetter(paths);\n } else {\n return fastPropGetter(paths);\n }\n}\n\nfunction throwSelectFactoryNotConnectedError(): never {\n throw new Error('You have forgotten to import the NGXS module!');\n}\n\nconst DOLLAR_CHAR_CODE = 36;\n\nexport function createSelectObservable<T = any>(selector: any): Observable<T> {\n if (!SelectFactory.store) {\n throwSelectFactoryNotConnectedError();\n }\n return SelectFactory.store!.select(selector);\n}\n\nexport function createSelectorFn(name: string, rawSelector?: any, paths: string[] = []): any {\n rawSelector = !rawSelector ? removeDollarAtTheEnd(name) : rawSelector;\n\n if (typeof rawSelector === 'string') {\n const propsArray: string[] = paths.length\n ? [rawSelector, ...paths]\n : rawSelector.split('.');\n return propGetter(propsArray, SelectFactory.config!);\n }\n\n return rawSelector;\n}\n\n/**\n * @example If `foo$` => make it just `foo`\n */\nexport function removeDollarAtTheEnd(name: string): string {\n const lastCharIndex: number = name.length - 1;\n const dollarAtTheEnd: boolean = name.charCodeAt(lastCharIndex) === DOLLAR_CHAR_CODE;\n return dollarAtTheEnd ? name.slice(0, lastCharIndex) : name;\n}\n\nexport type PropertyType<T> =\n T extends StateToken<any>\n ? Observable<ɵExtractTokenType<T>>\n : T extends (...args: any[]) => any\n ? Observable<ReturnType<T>>\n : any;\n","import { createSelectObservable, createSelectorFn, PropertyType } from './symbols';\n\n/**\n * Decorator for selecting a slice of state from the store.\n *\n * @deprecated\n * Read the deprecation notice at this link: https://ngxs.io/deprecations/select-decorator-deprecation.\n */\nexport function Select<T>(rawSelector?: T, ...paths: string[]): PropertyDecorator {\n return function (target, key): void {\n const name: string = key.toString();\n const selectorId = `__${name}__selector`;\n const selector = createSelectorFn(name, rawSelector, paths);\n\n Object.defineProperties(target, {\n [selectorId]: {\n writable: true,\n enumerable: false,\n configurable: true\n },\n [name]: {\n enumerable: true,\n configurable: true,\n get(): PropertyType<T> {\n return this[selectorId] || (this[selectorId] = createSelectObservable(selector));\n }\n }\n });\n };\n}\n","import {\n ɵSelectorMetaDataModel,\n ɵSharedSelectorOptions,\n ɵensureSelectorMetadata\n} from '@ngxs/store/internals';\n\nimport { CreationMetadata } from './selector-models';\n\nconst SELECTOR_OPTIONS_META_KEY = 'NGXS_SELECTOR_OPTIONS_META';\n\nexport const selectorOptionsMetaAccessor = {\n getOptions: (target: any): ɵSharedSelectorOptions => {\n return (<any>target)?.[SELECTOR_OPTIONS_META_KEY] || {};\n },\n defineOptions: (target: any, options: ɵSharedSelectorOptions) => {\n if (!target) return;\n (<any>target)[SELECTOR_OPTIONS_META_KEY] = options;\n }\n};\n\nexport function setupSelectorMetadata<T extends (...args: any[]) => any>(\n originalFn: T,\n creationMetadata: Partial<CreationMetadata> | undefined\n) {\n const selectorMetaData = ɵensureSelectorMetadata(originalFn);\n selectorMetaData.originalFn = originalFn;\n let getExplicitSelectorOptions = () => ({});\n if (creationMetadata) {\n selectorMetaData.containerClass = creationMetadata.containerClass;\n selectorMetaData.selectorName = creationMetadata.selectorName || null;\n getExplicitSelectorOptions =\n creationMetadata.getSelectorOptions || getExplicitSelectorOptions;\n }\n const selectorMetaDataClone = { ...selectorMetaData };\n selectorMetaData.getSelectorOptions = () =>\n getLocalSelectorOptions(selectorMetaDataClone, getExplicitSelectorOptions());\n return selectorMetaData;\n}\n\nfunction getLocalSelectorOptions(\n selectorMetaData: ɵSelectorMetaDataModel,\n explicitOptions: ɵSharedSelectorOptions\n): ɵSharedSelectorOptions {\n return {\n ...(selectorOptionsMetaAccessor.getOptions(selectorMetaData.containerClass) || {}),\n ...(selectorOptionsMetaAccessor.getOptions(selectorMetaData.originalFn) || {}),\n ...(selectorMetaData.getSelectorOptions() || {}),\n ...explicitOptions\n };\n}\n","import { ɵSharedSelectorOptions } from '@ngxs/store/internals';\n\nimport { selectorOptionsMetaAccessor } from '../selectors/selector-metadata';\n\n/**\n * Decorator for setting selector options at a method or class level.\n */\nexport function SelectorOptions(options: ɵSharedSelectorOptions) {\n return <ClassDecorator & MethodDecorator>(\n function decorate<T>(\n target: any,\n methodName: string,\n descriptor: TypedPropertyDescriptor<T>\n ) {\n if (methodName) {\n descriptor ||= Object.getOwnPropertyDescriptor(target, methodName)!;\n // Method Decorator\n const originalFn = descriptor.value || (<any>descriptor).originalFn;\n if (originalFn) {\n selectorOptionsMetaAccessor.defineOptions(originalFn, options);\n }\n } else {\n // Class Decorator\n selectorOptionsMetaAccessor.defineOptions(target, options);\n }\n }\n );\n}\n","import { CreationMetadata } from './selector-models';\nimport { setupSelectorMetadata } from './selector-metadata';\nimport { createMemoizedSelectorFn, createRootSelectorFactory } from './selector-utils';\n\nimport { ɵSelectorDef, ɵSelectorReturnType } from './selector-types.util';\n\ntype SelectorArg = ɵSelectorDef<any>;\n\n/**\n * Function for creating a selector\n * @param selectors The selectors to use to create the arguments of this function\n * @param originalFn The original function being made into a selector\n * @param creationMetadata\n */\nexport function createSelector<\n S1 extends SelectorArg,\n TProjector extends (s1: ɵSelectorReturnType<S1>) => any\n>(\n selectors: [S1],\n projector: TProjector,\n creationMetadata?: Partial<CreationMetadata>\n): TProjector;\n\nexport function createSelector<\n S1 extends SelectorArg,\n S2 extends SelectorArg,\n TProjector extends (s1: ɵSelectorReturnType<S1>, s2: ɵSelectorReturnType<S2>) => any\n>(\n selectors: [S1, S2],\n projector: TProjector,\n creationMetadata?: Partial<CreationMetadata>\n): TProjector;\n\nexport function createSelector<\n S1 extends SelectorArg,\n S2 extends SelectorArg,\n S3 extends SelectorArg,\n TProjector extends (\n s1: ɵSelectorReturnType<S1>,\n s2: ɵSelectorReturnType<S2>,\n s3: ɵSelectorReturnType<S3>\n ) => any\n>(\n selectors: [S1, S2, S3],\n projector: TProjector,\n creationMetadata?: Partial<CreationMetadata>\n): TProjector;\n\nexport function createSelector<\n S1 extends SelectorArg,\n S2 extends SelectorArg,\n S3 extends SelectorArg,\n S4 extends SelectorArg,\n TProjector extends (\n s1: ɵSelectorReturnType<S1>,\n s2: ɵSelectorReturnType<S2>,\n s3: ɵSelectorReturnType<S3>,\n s4: ɵSelectorReturnType<S4>\n ) => any\n>(\n selectors: [S1, S2, S3, S4],\n projector: TProjector,\n creationMetadata?: Partial<CreationMetadata>\n): TProjector;\n\nexport function createSelector<\n S1 extends SelectorArg,\n S2 extends SelectorArg,\n S3 extends SelectorArg,\n S4 extends SelectorArg,\n S5 extends SelectorArg,\n TProjector extends (\n s1: ɵSelectorReturnType<S1>,\n s2: ɵSelectorReturnType<S2>,\n s3: ɵSelectorReturnType<S3>,\n s4: ɵSelectorReturnType<S4>,\n s5: ɵSelectorReturnType<S5>\n ) => any\n>(\n selectors: [S1, S2, S3, S4, S5],\n projector: TProjector,\n creationMetadata?: Partial<CreationMetadata>\n): TProjector;\n\nexport function createSelector<\n S1 extends SelectorArg,\n S2 extends SelectorArg,\n S3 extends SelectorArg,\n S4 extends SelectorArg,\n S5 extends SelectorArg,\n S6 extends SelectorArg,\n TProjector extends (\n s1: ɵSelectorReturnType<S1>,\n s2: ɵSelectorReturnType<S2>,\n s3: ɵSelectorReturnType<S3>,\n s4: ɵSelectorReturnType<S4>,\n s5: ɵSelectorReturnType<S5>,\n s6: ɵSelectorReturnType<S6>\n ) => any\n>(\n selectors: [S1, S2, S3, S4, S5, S6],\n projector: TProjector,\n creationMetadata?: Partial<CreationMetadata>\n): TProjector;\n\nexport function createSelector<\n S1 extends SelectorArg,\n S2 extends SelectorArg,\n S3 extends SelectorArg,\n S4 extends SelectorArg,\n S5 extends SelectorArg,\n S6 extends SelectorArg,\n S7 extends SelectorArg,\n TProjector extends (\n s1: ɵSelectorReturnType<S1>,\n s2: ɵSelectorReturnType<S2>,\n s3: ɵSelectorReturnType<S3>,\n s4: ɵSelectorReturnType<S4>,\n s5: ɵSelectorReturnType<S5>,\n s6: ɵSelectorReturnType<S6>,\n s7: ɵSelectorReturnType<S7>\n ) => any\n>(\n selectors: [S1, S2, S3, S4, S5, S6, S7],\n projector: TProjector,\n creationMetadata?: Partial<CreationMetadata>\n): TProjector;\n\nexport function createSelector<\n S1 extends SelectorArg,\n S2 extends SelectorArg,\n S3 extends SelectorArg,\n S4 extends SelectorArg,\n S5 extends SelectorArg,\n S6 extends SelectorArg,\n S7 extends SelectorArg,\n S8 extends SelectorArg,\n TProjector extends (\n s1: ɵSelectorReturnType<S1>,\n s2: ɵSelectorReturnType<S2>,\n s3: ɵSelectorReturnType<S3>,\n s4: ɵSelectorReturnType<S4>,\n s5: ɵSelectorReturnType<S5>,\n s6: ɵSelectorReturnType<S6>,\n s7: ɵSelectorReturnType<S7>,\n s8: ɵSelectorReturnType<S8>\n ) => any\n>(\n selectors: [S1, S2, S3, S4, S5, S6, S7, S8],\n projector: TProjector,\n creationMetadata?: Partial<CreationMetadata>\n): TProjector;\n\nexport function createSelector<T extends (...args: any[]) => any>(\n selectors: SelectorArg[] | undefined,\n projector: T,\n creationMetadata?: Partial<CreationMetadata>\n): T;\n\nexport function createSelector<T extends (...args: any[]) => any>(\n selectors: SelectorArg[] | undefined,\n projector: T,\n creationMetadata?: Partial<CreationMetadata>\n) {\n const memoizedFn = createMemoizedSelectorFn<T>(projector, creationMetadata);\n\n const selectorMetaData = setupSelectorMetadata<T>(projector, creationMetadata);\n\n selectorMetaData.makeRootSelector = createRootSelectorFactory<T>(\n selectorMetaData,\n selectors,\n memoizedFn\n );\n\n return memoizedFn;\n}\n","import { throwSelectorDecoratorError } from '../../configs/messages.config';\nimport { createSelector } from '../../selectors/create-selector';\nimport { SelectorDefTuple, SelectorType } from './symbols';\n\n/**\n * Decorator for creating a state selector for the current state.\n */\nexport function Selector(): SelectorType<unknown>;\n\n/**\n * Decorator for creating a state selector from the provided selectors (and optionally the container State, depending on the applicable Selector Options).\n */\nexport function Selector<T extends SelectorDefTuple>(selectors: T): SelectorType<T>;\n\nexport function Selector<T extends SelectorDefTuple = []>(\n selectors?: T\n): SelectorType<unknown> | SelectorType<T> {\n return <U>(\n target: any,\n key: string | symbol,\n descriptor?: TypedPropertyDescriptor<(...states: any[]) => U>\n ): TypedPropertyDescriptor<(...states: any[]) => U> | void => {\n descriptor ||= Object.getOwnPropertyDescriptor(target, key)!;\n\n const originalFn = descriptor?.value;\n\n if (typeof ngDevMode !== 'undefined' && ngDevMode) {\n if (typeof originalFn !== 'function') {\n throwSelectorDecoratorError();\n }\n }\n\n const memoizedFn = createSelector(selectors, originalFn as any, {\n containerClass: target,\n selectorName: key.toString(),\n getSelectorOptions() {\n return {};\n }\n });\n const newDescriptor = {\n configurable: true,\n get() {\n return memoizedFn;\n },\n originalFn\n };\n return newDescriptor;\n };\n}\n","import { inject, Injectable } from '@angular/core';\nimport {\n type StateToken,\n type ɵActionOptions,\n ɵNgxsActionRegistry\n} from '@ngxs/store/internals';\nimport type { Observable } from 'rxjs';\n\nimport type { ActionDef } from './symbols';\nimport type { StateContext } from '../symbols';\nimport { InternalActionHandlerFactory } from '../internal/action-handler-factory';\n\n@Injectable({ providedIn: 'root' })\nexport class ActionDirector {\n private _registry = inject(ɵNgxsActionRegistry);\n private _actionHandlerFactory = inject(InternalActionHandlerFactory);\n\n attachAction<TStateModel, TActionType extends ActionDef>(\n stateToken: StateToken<TStateModel>,\n Action: TActionType,\n handlerFn: (\n ctx: StateContext<TStateModel>,\n action: InstanceType<TActionType>\n ) => void | Observable<void> | Promise<void>,\n options: ɵActionOptions = {}\n ) {\n const actionHandler = this._actionHandlerFactory.createActionHandler(\n stateToken.getName(),\n handlerFn,\n options\n );\n const detach = this._registry.register(Action.type, actionHandler);\n return { detach };\n }\n}\n","import { ModuleWithProviders, NgModule, makeEnvironmentProviders } from '@angular/core';\n\nimport { NgxsDevelopmentOptions, NGXS_DEVELOPMENT_OPTIONS } from './symbols';\nimport { NgxsUnhandledActionsLogger } from './ngxs-unhandled-actions-logger';\n\n@NgModule()\nexport class NgxsDevelopmentModule {\n static forRoot(options: NgxsDevelopmentOptions): ModuleWithProviders<NgxsDevelopmentModule> {\n return {\n ngModule: NgxsDevelopmentModule,\n providers: [\n NgxsUnhandledActionsLogger,\n { provide: NGXS_DEVELOPMENT_OPTIONS, useValue: options }\n ]\n };\n }\n}\n\nexport function withNgxsDevelopmentOptions(options: NgxsDevelopmentOptions) {\n return makeEnvironmentProviders([\n NgxsUnhandledActionsLogger,\n { provide: NGXS_DEVELOPMENT_OPTIONS, useValue: options }\n ]);\n}\n","import { Injectable, makeEnvironmentProviders } from '@angular/core';\nimport { InternalNgxsExecutionStrategy } from './execution-strategy';\nimport type { NgxsExecutionStrategy } from './symbols';\n\n@Injectable({ providedIn: 'root' })\nexport class NoopNgxsExecutionStrategy implements NgxsExecutionStrategy {\n enter<T>(func: () => T): T {\n return func();\n }\n\n leave<T>(func: () => T): T {\n return func();\n }\n}\n\n/**\n * Determines the execution context to perform async operations inside. An implementation can be\n * provided to override the default behaviour where the async operations are run\n * outside Angular's zone but all observable behaviours of NGXS are run back inside Angular's zone.\n * These observable behaviours are from:\n * `store.selectSignal(...)`, `store.select(...)`, `actions.subscribe(...)` or `store.dispatch(...).subscribe(...)`\n * Every `zone.run` causes Angular to run change detection on the whole tree (`app.tick()`) so of your\n * application doesn't rely on zone.js running change detection then you can switch to the\n * `NoopNgxsExecutionStrategy` that doesn't interact with zones.\n */\nexport function withNgxsNoopExecutionStrategy() {\n return makeEnvironmentProviders([\n {\n provide: InternalNgxsExecutionStrategy,\n useExisting: NoopNgxsExecutionStrategy\n }\n ]);\n}\n","import { ɵgetSelectorMetadata, ɵgetStoreMetadata } from '@ngxs/store/internals';\nimport { ɵSelectorDef } from './selector-types.util';\nimport { NgZone } from '@angular/core';\n\nfunction getMissingMetaDataError(\n selector: ɵSelectorDef<any>,\n context: { prefix?: string; noun?: string } = {}\n) {\n const metadata = ɵgetSelectorMetadata(selector) || ɵgetStoreMetadata(selector as any);\n if (!metadata) {\n return new Error(\n `${context.prefix}The value provided as the ${context.noun} is not a valid selector.`\n );\n }\n return null;\n}\n\nexport function ensureValidSelector(\n selector: ɵSelectorDef<any>,\n context: { prefix?: string; noun?: string } = {}\n) {\n const noun = context.noun || 'selector';\n const prefix = context.prefix ? context.prefix + ': ' : '';\n ensureValueProvided(selector, { noun, prefix: context.prefix });\n const error = getMissingMetaDataError(selector, { noun, prefix });\n if (error) {\n // If we have used this utility within a state class, we may be\n // before the @State or @Selector decorators have been applied.\n // wait until the next microtask to verify.\n // Theoretically this situation is only encountered when the javascript\n // files are being loaded and we are outside the angular zone.\n if (!NgZone.isInAngularZone()) {\n Promise.resolve().then(() => {\n const errorAgain = getMissingMetaDataError(selector, { noun, prefix });\n if (errorAgain) {\n // Throw the originally captured error so that the stack trace shows the\n // original utility call site.\n console.error(error);\n }\n });\n } else {\n throw error;\n }\n }\n}\n\nexport function ensureValueProvided(\n value: any,\n context: { prefix?: string; noun?: string } = {}\n) {\n const noun = context.noun || 'value';\n const prefix = context.prefix ? context.prefix + ': ' : '';\n if (!value) {\n throw new Error(`${prefix}A ${noun} must be provided.`);\n }\n}\n","import { createSelector } from './create-selector';\nimport { ensureValidSelector, ensureValueProvided } from './selector-checks.util';\nimport { TypedSelector } from './selector-types.util';\n\ninterface SelectorMap {\n [key: string]: TypedSelector<any>;\n}\n\ntype ModelSelector<T extends SelectorMap> = (...args: any[]) => MappedResult<T>;\n\ntype MappedResult<TSelectorMap> = {\n [P in keyof TSelectorMap]: TSelectorMap[P] extends TypedSelector<infer R> ? R : never;\n};\n\nexport function createModelSelector<T extends SelectorMap>(selectorMap: T): ModelSelector<T> {\n const selectorKeys = Object.keys(selectorMap);\n const selectors = Object.values(selectorMap);\n\n if (typeof ngDevMode !== 'undefined' && ngDevMode) {\n ensureValidSelectorMap<T>({\n prefix: '[createModelSelector]',\n selectorMap,\n selectorKeys,\n selectors\n });\n }\n\n return createSelector(selectors, (...args) => {\n return selectorKeys.reduce((obj, key, index) => {\n (obj as any)[key] = args[index];\n return obj;\n }, {} as MappedResult<T>);\n }) as ModelSelector<T>;\n}\n\nfunction ensureValidSelectorMap<T extends SelectorMap>({\n prefix,\n selectorMap,\n selectorKeys,\n selectors\n}: {\n prefix: string;\n selectorMap: T;\n selectorKeys: string[];\n selectors: TypedSelector<any>[];\n}) {\n ensureValueProvided(selectorMap, { prefix, noun: 'selector map' });\n ensureValueProvided(typeof selectorMap === 'object', { prefix, noun: 'valid selector map' });\n ensureValueProvided(selectorKeys.length, { prefix, noun: 'non-empty selector map' });\n selectors.forEach((selector, index) =>\n ensureValidSelector(selector, {\n prefix,\n noun: `selector for the '${selectorKeys[index]}' property`\n })\n );\n}\n","import { createSelector } from './create-selector';\nimport { ensureValidSelector } from './selector-checks.util';\nimport { TypedSelector } from './selector-types.util';\n\ntype KeysToValues<T, Keys extends (keyof T)[]> = {\n [Index in keyof Keys]: Keys[Index] extends keyof T ? T[Keys[Index]] : never;\n};\n\nexport function createPickSelector<TModel, Keys extends (keyof TModel)[]>(\n selector: TypedSelector<TModel>,\n keys: [...Keys]\n) {\n if (typeof ngDevMode !== 'undefined' && ngDevMode) {\n ensureValidSelector(selector, { prefix: '[createPickSelector]' });\n }\n const validKeys = keys.filter(Boolean);\n const selectors = validKeys.map(key =>\n // Optional chaining is used because the state being selected may not be\n // registered yet — for example, if the selector is called before `provideStates()`.\n createSelector([selector], (state: TModel) => state?.[key])\n );\n return createSelector([...selectors], (...props: KeysToValues<TModel, Keys>) => {\n return validKeys.reduce(\n (acc, key, index) => {\n acc[key] = props[index];\n return acc;\n },\n {} as Pick<TModel, Keys[number]>\n );\n });\n}\n","import { createSelector } from './create-selector';\nimport { ensureValidSelector } from './selector-checks.util';\nimport { ɵSelectorDef } from './selector-types.util';\n\nexport type PropertySelectors<TModel> = {\n [P in keyof NonNullable<TModel>]-?: (\n model: TModel\n ) => TModel extends null | undefined ? undefined : NonNullable<TModel>[P];\n};\n\nexport function createPropertySelectors<TModel>(\n parentSelector: ɵSelectorDef<TModel>\n): PropertySelectors<TModel> {\n if (typeof ngDevMode !== 'undefined' && ngDevMode) {\n ensureValidSelector(parentSelector, {\n prefix: '[createPropertySelectors]',\n noun: 'parent selector'\n });\n }\n const cache: Partial<PropertySelectors<TModel>> = {};\n return new Proxy<PropertySelectors<TModel>>(\n {} as unknown as PropertySelectors<TModel>,\n {\n get(_target: any, prop: keyof TModel) {\n const selector =\n cache[prop] ||\n (createSelector(\n [parentSelector],\n // Optional chaining is used because the state being selected may not be\n // registered yet — for example, if the selector is called before `provideStates()`.\n (state: TModel) => state?.[prop]\n ) as PropertySelectors<TModel>[typeof prop]);\n cache[prop] = selector;\n return selector;\n }\n } as ProxyHandler<PropertySelectors<TModel>>\n );\n}\n","import { ApplicationRef, inject, PendingTasks } from '@angular/core';\nimport { buffer, debounceTime, filter } from 'rxjs';\n\nimport { Actions, ActionStatus } from './actions-stream';\nimport { withNgxsPreboot } from './standalone-features/preboot';\n\n/**\n * This feature that contributes to app stability, which is required during\n * server-side rendering. With asynchronous actions being dispatched and handled,\n * Angular is unaware of them in zoneless mode and doesn't know whether the app is\n * still unstable. This may prematurely serialize the final HTML that is sent to the client.\n * Including `withNgxsPendingTasks` in your `provideStore` for your SSR\n * app will resolve the above issue.\n */\nexport function withNgxsPendingTasks() {\n return withNgxsPreboot(() => {\n const actions$ = inject(Actions);\n const appRef = inject(ApplicationRef);\n const pendingTasks = inject(PendingTasks);\n\n // Removing a pending task via the public API forces a scheduled tick, ensuring that\n // stability is async and delayed until there was at least an opportunity to run\n // app synchronization.\n // Adding a new task every time an action is dispatched drastically increases the\n // number of change detection cycles because removing a task schedules a new change\n // detection cycle.\n // If 10 actions are dispatched with synchronous action handlers, this would trigger\n // 10 change detection cycles in a row, potentially leading to an\n // `INFINITE_CHANGE_DETECTION` error.\n let removeTask: VoidFunction | null = null;\n\n const executedActions = new Set<unknown>();\n\n // If the app is forcely destroyed before all actions are completed,\n // we clean up the set of actions being executed to prevent memory leaks\n // and remove the pending task to stabilize the app.\n appRef.onDestroy(() => executedActions.clear());\n\n let isStable = false;\n appRef.whenStable().then(() => {\n isStable = true;\n });\n\n const subscription = actions$\n .pipe(\n filter(context => {\n if (context.status === ActionStatus.Dispatched) {\n executedActions.add(context.action);\n removeTask ||= pendingTasks.add();\n return false;\n } else {\n return true;\n }\n }),\n // Every time an action is completed, we debounce the stream to ensure only one\n // task is removed, even if multiple synchronous actions are completed in a row.\n // We use `buffer` to collect action contexts because, if we only use\n // `debounceTime(0)`, we may lose action contexts that are never removed from the set.\n buffer(actions$.pipe(debounceTime(0)))\n )\n .subscribe(contexts => {\n for (const context of contexts) {\n if (!executedActions.has(context.action)) {\n continue;\n }\n\n executedActions.delete(context.action);\n\n // Mark app as stable once all of the debounced actions have completed.\n if (executedActions.size === 0) {\n removeTask?.();\n removeTask = null;\n if (isStable) {\n // Stop contributing to stability once the application has become stable,\n // which may happen on the server before the platform is destroyed or in\n // the browser once hydration is complete.\n subscription.unsubscribe();\n }\n }\n }\n });\n });\n}\n","import { EnvironmentProviders, makeEnvironmentProviders } from '@angular/core';\nimport { ɵStateClass } from '@ngxs/store/internals';\n\nimport { NgxsModuleOptions } from '../symbols';\nimport { getRootProviders } from './root-providers';\nimport { NGXS_ROOT_ENVIRONMENT_INITIALIZER } from './initializers';\n\n/**\n * This function provides global store providers and initializes the store.\n *\n * ```ts\n * bootstrapApplication(AppComponent, {\n * providers: [provideStore([CountriesState])]\n * });\n * ```\n *\n * The `provideStore` may be optionally called with a config before the list of features:\n *\n * ```ts\n * provideStore([CountriesState], {\n * developmentMode: !environment.production\n * });\n * ```\n */\nexport function provideStore(\n states?: ɵStateClass[],\n ...features: EnvironmentProviders[]\n): EnvironmentProviders;\n\nexport function provideStore(\n states?: ɵStateClass[],\n options?: NgxsModuleOptions,\n ...features: EnvironmentProviders[]\n): EnvironmentProviders;\n\nexport function provideStore(\n states: ɵStateClass[] = [],\n ...optionsAndFeatures: any[]\n): EnvironmentProviders {\n const features: EnvironmentProviders[] = [];\n // Options are empty by default (see `forRoot`).\n let options: NgxsModuleOptions = {};\n\n if (optionsAndFeatures.length > 0) {\n if (isEnvironmentProvider(optionsAndFeatures[0])) {\n features.push(...optionsAndFeatures);\n } else {\n options = optionsAndFeatures[0];\n features.push(...optionsAndFeatures.slice(1));\n }\n }\n\n return makeEnvironmentProviders([\n ...getRootProviders(states, options),\n NGXS_ROOT_ENVIRONMENT_INITIALIZER,\n features\n ]);\n}\n\nfunction isEnvironmentProvider(target: any): target is EnvironmentProviders {\n return !!target.ɵproviders;\n}\n","import { EnvironmentProviders, makeEnvironmentProviders } from '@angular/core';\nimport { ɵStateClass } from '@ngxs/store/internals';\n\nimport { getFeatureProviders } from './feature-providers';\nimport { NGXS_FEATURE_ENVIRONMENT_INITIALIZER } from './initializers';\n\n/**\n * This version serves as a standalone alternative to `NgxsModule.forFeature`.\n * It can be used in a similar manner to register feature states, but at the\n * `Route` providers level:\n *\n * ```ts\n * const routes: Routes = [\n * {\n * path: 'products',\n * loadComponent: async () => {...},\n * providers: [provideStates([ProductsState])]\n * }\n * ];\n * ```\n *\n * To lazy-load feature states at the route level,\n * please refer to the `lazyProvider` utility function.\n */\nexport function provideStates(\n states: ɵStateClass[],\n ...features: EnvironmentProviders[]\n): EnvironmentProviders {\n return makeEnvironmentProviders([\n ...getFeatureProviders(states),\n features,\n NGXS_FEATURE_ENVIRONMENT_INITIALIZER\n ]);\n}\n","import {\n EnvironmentProviders,\n Type,\n inject,\n makeEnvironmentProviders,\n provideEnvironmentInitializer\n} from '@angular/core';\nimport { NGXS_PLUGINS, NgxsPlugin, NgxsPluginFn, ɵisPluginClass } from '@ngxs/store/plugins';\n\nimport { PluginManager } from '../plugin-manager';\n\n/**\n * This function registers a custom global plugin for the state.\n *\n * ```ts\n * bootstrapApplication(AppComponent, {\n * providers: [\n * provideStore(\n * [CountriesState],\n * withNgxsPlugin(LogoutPlugin)\n * )\n * ]\n * });\n * ```\n */\nexport function withNgxsPlugin(plugin: Type<NgxsPlugin> | NgxsPluginFn): EnvironmentProviders {\n return makeEnvironmentProviders([\n ɵisPluginClass(plugin)\n ? { provide: NGXS_PLUGINS, useClass: plugin, multi: true }\n : { provide: NGXS_PLUGINS, useValue: plugin, multi: true },\n // We should inject the `PluginManager` to retrieve `NGXS_PLUGINS` and\n // register those plugins. The plugin can be added from inside the child\n // route, so the plugin manager should be re-injected.\n provideEnvironmentInitializer(() => inject(PluginManager))\n ]);\n}\n","import { Signal, inject } from '@angular/core';\n\nimport { Store } from '../store';\nimport { TypedSelector } from '../selectors';\n\n/**\n * This function serves as a utility and has multiple purposes.\n * Firstly, it allows you to select properties from the state class\n * without having to inject the store class and use `this.store.selectSignal`,\n * resulting in a more concise implementation. Secondly, it can be used with\n * other solutions such as NgRx signal store with its `signalStoreFeature` or\n * `withComputed` functionalities.\n *\n * Please note that it's named `select` instead of `selectSignal` because\n * signals are evolving into first-class primitives in Angular, displacing other\n * primitives such as observables. Observables represent a stream of events,\n * whereas signals represent a single value changing over time.\n */\nexport function select<T>(selector: TypedSelector<T>): Signal<T> {\n return inject(Store).selectSignal(selector);\n}\n","import { inject } from '@angular/core';\n\nimport { Store } from '../store';\nimport { ActionDef } from '../actions/symbols';\n\nexport function dispatch<TArgs extends any[]>(ActionType: ActionDef<TArgs>) {\n const store = inject(Store);\n return (...args: TArgs) => store.dispatch(new ActionType(...args));\n}\n","import { Signal, inject } from '@angular/core';\n\nimport { Store } from '../store';\nimport { TypedSelector, ɵSelectorReturnType } from '../selectors';\n\nexport type SelectorMap = Record<string, TypedSelector<unknown>>;\n\nexport function createSelectMap<T extends SelectorMap>(selectorMap: T) {\n const store = inject(Store);\n\n return Object.entries(selectorMap).reduce((accumulator, [key, selector]) => {\n (accumulator as any)[key] = store.selectSignal(selector);\n return accumulator;\n }, {}) as {\n // This is inlined to enhance developer experience.\n // If we were to switch to another type, such as\n // `type SelectorMapReturnType<T extends SelectorMap> = { ... }`, code editors\n // would display the return type simply as `SelectorMapReturnType`, rather\n // than presenting it as an object with properties that correspond to\n // signals that keep store selected value.\n readonly [K in keyof T]: Signal<ɵSelectorReturnType<T[K]>>;\n };\n}\n","import type { Observable } from 'rxjs';\n\nimport { dispatch } from './dispatch';\n\nimport { ActionDef } from '../actions/symbols';\n\nexport type ActionMap = Record<string, ActionDef<any>>;\n\nexport function createDispatchMap<T extends ActionMap>(actionMap: T) {\n return Object.entries(actionMap).reduce((accumulator, [key, ActionType]) => {\n (accumulator as any)[key] = dispatch(ActionType);\n return accumulator;\n }, {}) as {\n // This is inlined to enhance developer experience.\n // If we were to switch to another type, such as\n // `type ActionMapReturnType<T extends ActionMap> = { ... }`, code editors\n // would display the return type simply as `ActionMapReturnType`, rather\n // than presenting it as an object with properties that correspond to\n // functions returning observables.\n readonly [K in keyof T]: (...args: ConstructorParameters<T[K]>) => Observable<void>;\n };\n}\n","import {\n ApplicationRef,\n assertInInjectionContext,\n createEnvironmentInjector,\n EnvironmentInjector,\n EnvironmentProviders,\n inject,\n InjectionToken\n} from '@angular/core';\n\ninterface DefaultExport<T> {\n default: T;\n}\n\nfunction isWrappedDefaultExport<T>(value: T | DefaultExport<T>): value is DefaultExport<T> {\n return value && typeof value === 'object' && 'default' in value;\n}\n\nfunction maybeUnwrapDefaultExport<T>(input: T | DefaultExport<T>): T {\n return isWrappedDefaultExport(input) ? input['default'] : input;\n}\n\nconst REGISTERED_PROVIDERS = new InjectionToken<Set<EnvironmentProviders>>('', {\n providedIn: 'root',\n factory: () => {\n const registeredProviders = new Set<EnvironmentProviders>();\n inject(ApplicationRef).onDestroy(() => registeredProviders.clear());\n return registeredProviders;\n }\n});\n\n/**\n * This function serves as a utility to lazy-load providers at the injection\n * context level — for example, at the route level. If the feature state needs\n * to be provided in more than one place, it might be indirectly included in\n * the main bundle, which we want to avoid. This function can be used at the\n * guard level to lazy-load the state provider before resolvers run and the\n * component is initialized:\n *\n * ```ts\n * const routes = [\n * {\n * path: 'home',\n * loadComponent: () => import(...),\n * canActivate: [\n * lazyProvider(async () => (await import('path-to-state-library')).invoicesStateProvider)\n * ]\n * }\n * ];\n * ```\n *\n * Where `invoicesStateProvider` is the following:\n *\n * ```ts\n * // path-to-state-library/index.ts\n *\n * export const invoicesStateProvider = provideStates([InvoicesState]);\n * ```\n */\nexport function lazyProvider(\n factory: () => Promise<EnvironmentProviders | DefaultExport<EnvironmentProviders>>\n) {\n return async () => {\n if (typeof ngDevMode !== 'undefined' && ngDevMode) {\n assertInInjectionContext(lazyProvider);\n }\n\n const appRef = inject(ApplicationRef);\n const parentInjector = inject(EnvironmentInjector);\n const registeredProviders = inject(REGISTERED_PROVIDERS);\n\n const provider = maybeUnwrapDefaultExport(await factory());\n\n if (registeredProviders.has(provider)) {\n return true;\n }\n\n registeredProviders.add(provider);\n const injector = createEnvironmentInjector([provider], parentInjector);\n appRef.onDestroy(() => injector.destroy());\n return true;\n };\n}\n","import { makeEnvironmentProviders } from '@angular/core';\nimport { ɵNGXS_STATE_CONTEXT_FACTORY, ɵNGXS_STATE_FACTORY } from '@ngxs/store/internals';\n\nimport { StateFactory } from './state-factory';\nimport { StateContextFactory } from './state-context-factory';\n\n// Backward compatibility is provided because these tokens are used by third-party\n// libraries. We expose a separate function to allow tree-shaking of these tokens\n// if they are not used in standard applications that do not rely on them.\nexport function ɵprovideNgxsInternalStateTokens() {\n return makeEnvironmentProviders([\n {\n provide: ɵNGXS_STATE_CONTEXT_FACTORY,\n useExisting: StateContextFactory\n },\n {\n provide: ɵNGXS_STATE_FACTORY,\n useExisting: StateFactory\n }\n ]);\n}\n","/**\n * The public api for consumers of @ngxs/store\n */\nexport * from './src/public_api';\n\n/**\n * The plugin api for the stuff that a plugins needs\n */\nexport * from './src/plugin_api';\n\n/**\n * Private exports required for the compilation.\n */\nexport * from './src/private_api';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["ɵOrderedSubject","ɵStateStream","ɵhasOwnProperty","ɵmemoize","ɵgetStoreMetadata","ɵgetSelectorMetadata","ɵMETA_KEY","ɵisPromise","ɵINITIAL_STATE_TOKEN","ɵNgxsActionRegistry","i1.Store","i2.NgxsConfig","ɵNgxsAppBootstrappedState","ɵensureStoreMetadata","ɵMETA_OPTIONS_KEY","ɵensureSelectorMetadata","ɵisPluginClass","ɵNGXS_STATE_CONTEXT_FACTORY","ɵNGXS_STATE_FACTORY"],"mappings":";;;;;;;;;MAIa,aAAa,CAAA;IACf,OAAO,GAAmB,EAAE;AAEpB,IAAA,cAAc,GAAG,MAAM,CAAC,aAAa,EAAE;AACtD,QAAA,QAAQ,EAAE,IAAI;AACd,QAAA,Q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