@ngxs/store 19.0.0-dev.master-7f34db4 → 19.0.0-dev.master-287dcb1
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.
|
@@ -321,9 +321,39 @@ function ɵof(value) {
|
|
|
321
321
|
});
|
|
322
322
|
}
|
|
323
323
|
|
|
324
|
+
class ɵNgxsActionRegistry {
|
|
325
|
+
constructor() {
|
|
326
|
+
// Instead of going over the states list every time an action is dispatched,
|
|
327
|
+
// we are constructing a map of action types to lists of action metadata.
|
|
328
|
+
// If the `@@Init` action is handled in two different states, the action
|
|
329
|
+
// metadata list will contain two objects that have the state `instance` and
|
|
330
|
+
// method names to be used as action handlers (decorated with `@Action(InitState)`).
|
|
331
|
+
this._actionTypeToHandlersMap = new Map();
|
|
332
|
+
inject(DestroyRef).onDestroy(() => this._actionTypeToHandlersMap.clear());
|
|
333
|
+
}
|
|
334
|
+
get(type) {
|
|
335
|
+
return this._actionTypeToHandlersMap.get(type);
|
|
336
|
+
}
|
|
337
|
+
register(type, handler) {
|
|
338
|
+
const handlers = this._actionTypeToHandlersMap.get(type) ?? new Set();
|
|
339
|
+
handlers.add(handler);
|
|
340
|
+
this._actionTypeToHandlersMap.set(type, handlers);
|
|
341
|
+
return () => {
|
|
342
|
+
const handlers = this._actionTypeToHandlersMap.get(type);
|
|
343
|
+
handlers.delete(handler);
|
|
344
|
+
};
|
|
345
|
+
}
|
|
346
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: ɵNgxsActionRegistry, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
347
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: ɵNgxsActionRegistry, providedIn: 'root' }); }
|
|
348
|
+
}
|
|
349
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: ɵNgxsActionRegistry, decorators: [{
|
|
350
|
+
type: Injectable,
|
|
351
|
+
args: [{ providedIn: 'root' }]
|
|
352
|
+
}], ctorParameters: () => [] });
|
|
353
|
+
|
|
324
354
|
/**
|
|
325
355
|
* Generated bundle index. Do not edit.
|
|
326
356
|
*/
|
|
327
357
|
|
|
328
|
-
export { StateToken, ɵINITIAL_STATE_TOKEN, ɵInitialState, ɵMETA_KEY, ɵMETA_OPTIONS_KEY, ɵNGXS_STATE_CONTEXT_FACTORY, ɵNGXS_STATE_FACTORY, ɵNgxsAppBootstrappedState, ɵOrderedBehaviorSubject, ɵOrderedSubject, ɵSELECTOR_META_KEY, ɵStateStream, ɵdefineProperty, ɵensureSelectorMetadata, ɵensureStoreMetadata, ɵgetSelectorMetadata, ɵgetStoreMetadata, ɵhasOwnProperty, ɵmemoize, ɵof, ɵwrapObserverCalls };
|
|
358
|
+
export { StateToken, ɵINITIAL_STATE_TOKEN, ɵInitialState, ɵMETA_KEY, ɵMETA_OPTIONS_KEY, ɵNGXS_STATE_CONTEXT_FACTORY, ɵNGXS_STATE_FACTORY, ɵNgxsActionRegistry, ɵNgxsAppBootstrappedState, ɵOrderedBehaviorSubject, ɵOrderedSubject, ɵSELECTOR_META_KEY, ɵStateStream, ɵdefineProperty, ɵensureSelectorMetadata, ɵensureStoreMetadata, ɵgetSelectorMetadata, ɵgetStoreMetadata, ɵhasOwnProperty, ɵmemoize, ɵof, ɵwrapObserverCalls };
|
|
329
359
|
//# sourceMappingURL=ngxs-store-internals.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngxs-store-internals.mjs","sources":["../../../packages/store/internals/src/symbols.ts","../../../packages/store/internals/src/object-utils.ts","../../../packages/store/internals/src/metadata.ts","../../../packages/store/internals/src/memoize.ts","../../../packages/store/internals/src/state-token.ts","../../../packages/store/internals/src/initial-state.ts","../../../packages/store/internals/src/ngxs-app-bootstrapped-state.ts","../../../packages/store/internals/src/internal-tokens.ts","../../../packages/store/internals/src/custom-rxjs-subjects.ts","../../../packages/store/internals/src/custom-rxjs-operators.ts","../../../packages/store/internals/src/state-stream.ts","../../../packages/store/internals/src/rxjs.ts","../../../packages/store/internals/src/ngxs-store-internals.ts"],"sourcesContent":["import type { StateToken } from './state-token';\n\nexport interface ɵPlainObject {\n [key: string]: any;\n}\n\nexport interface ɵPlainObjectOf<T> {\n [key: string]: T;\n}\n\nexport type ɵStateClass<T = any> = new (...args: any[]) => T;\n\n// This key is used to store metadata on state classes,\n// such as actions and other related information.\nexport const ɵMETA_KEY = 'NGXS_META';\n// This key is used to store options on state classes\n// provided through the `@State` decorator.\nexport const ɵMETA_OPTIONS_KEY = 'NGXS_OPTIONS_META';\n// This key is used to store selector metadata on selector functions,\n// such as decorated with the `@Selector` or provided through the\n// `createSelector` function.\nexport const ɵSELECTOR_META_KEY = 'NGXS_SELECTOR_META';\n\nexport interface ɵStateToken<T, U> {\n new (name: ɵTokenName<T>): U;\n getName(): string;\n toString(): string;\n}\n\ntype RequireGeneric<T, U> = T extends void ? 'You must provide a type parameter' : U;\n\nexport type ɵTokenName<T> = string & RequireGeneric<T, string>;\n\nexport type ɵExtractTokenType<P> = P extends StateToken<infer T> ? T : never;\n\n/**\n * Options that can be provided to the store.\n */\nexport interface ɵStoreOptions<T> {\n /**\n * Name of the state. Required.\n */\n name: string | StateToken<T>;\n\n /**\n * Default values for the state. If not provided, uses empty object.\n */\n defaults?: T;\n\n /**\n * Sub states for the given state.\n *\n * @deprecated\n * Read the deprecation notice at this link: https://ngxs.io/deprecations/sub-states-deprecation.\n */\n children?: ɵStateClass[];\n}\n\n// inspired from https://stackoverflow.com/a/43674389\nexport interface ɵStateClassInternal<T = any, U = any> extends ɵStateClass<T> {\n [ɵMETA_KEY]?: ɵMetaDataModel;\n [ɵMETA_OPTIONS_KEY]?: ɵStoreOptions<U>;\n}\n\nexport interface ɵMetaDataModel {\n name: string | null;\n actions: ɵPlainObjectOf<ɵActionHandlerMetaData[]>;\n defaults: any;\n path: string | null;\n makeRootSelector: ɵSelectorFactory | null;\n /** @deprecated */\n children?: ɵStateClassInternal[];\n}\n\nexport interface ɵSelectorMetaDataModel {\n makeRootSelector: ɵSelectorFactory | null;\n originalFn: Function | null;\n containerClass: any;\n selectorName: string | null;\n getSelectorOptions: () => ɵSharedSelectorOptions;\n}\n\nexport interface ɵSharedSelectorOptions {\n /**\n * @deprecated\n * Read the deprecation notice at this link: https://ngxs.io/deprecations/inject-container-state-deprecation.md.\n */\n injectContainerState?: boolean;\n suppressErrors?: boolean;\n}\n\nexport interface ɵRuntimeSelectorContext {\n getStateGetter(key: any): (state: any) => any;\n getSelectorOptions(localOptions?: ɵSharedSelectorOptions): ɵSharedSelectorOptions;\n}\n\nexport type ɵSelectFromRootState = (rootState: any) => any;\nexport type ɵSelectorFactory = (\n runtimeContext: ɵRuntimeSelectorContext\n) => ɵSelectFromRootState;\n\n/**\n * Actions that can be provided in a action decorator.\n */\nexport interface ɵActionOptions {\n /**\n * Cancel the previous uncompleted observable(s).\n */\n cancelUncompleted?: boolean;\n}\n\nexport interface ɵActionHandlerMetaData {\n fn: string | symbol;\n options: ɵActionOptions;\n type: string;\n}\n","// Property reads are not minified.\n// It's smaller to read it once and use a function.\nconst _hasOwnProperty = Object.prototype.hasOwnProperty;\nexport const ɵhasOwnProperty = (target: any, key: PropertyKey) =>\n _hasOwnProperty.call(target, key);\n\nexport const ɵdefineProperty = Object.defineProperty;\n","import { ɵdefineProperty, ɵhasOwnProperty } from './object-utils';\nimport {\n ɵMETA_KEY,\n ɵSELECTOR_META_KEY,\n ɵMetaDataModel,\n ɵStateClassInternal,\n ɵSelectorMetaDataModel,\n ɵRuntimeSelectorContext\n} from './symbols';\n\n/**\n * Ensures metadata is attached to the class and returns it.\n *\n * @ignore\n */\nexport function ɵensureStoreMetadata(target: ɵStateClassInternal): ɵMetaDataModel {\n if (!ɵhasOwnProperty(target, ɵMETA_KEY)) {\n const defaultMetadata: ɵMetaDataModel = {\n name: null,\n actions: {},\n defaults: {},\n path: null,\n makeRootSelector(context: ɵRuntimeSelectorContext) {\n return context.getStateGetter(defaultMetadata.name);\n },\n children: []\n };\n\n ɵdefineProperty(target, ɵMETA_KEY, { value: defaultMetadata });\n }\n return ɵgetStoreMetadata(target);\n}\n\n/**\n * Get the metadata attached to the state class if it exists.\n *\n * @ignore\n */\nexport function ɵgetStoreMetadata(target: ɵStateClassInternal): ɵMetaDataModel {\n return target[ɵMETA_KEY]!;\n}\n\n/**\n * Ensures metadata is attached to the selector and returns it.\n *\n * @ignore\n */\nexport function ɵensureSelectorMetadata(target: Function): ɵSelectorMetaDataModel {\n if (!ɵhasOwnProperty(target, ɵSELECTOR_META_KEY)) {\n const defaultMetadata: ɵSelectorMetaDataModel = {\n makeRootSelector: null,\n originalFn: null,\n containerClass: null,\n selectorName: null,\n getSelectorOptions: () => ({})\n };\n\n ɵdefineProperty(target, ɵSELECTOR_META_KEY, { value: defaultMetadata });\n }\n\n return ɵgetSelectorMetadata(target);\n}\n\n/**\n * Get the metadata attached to the selector if it exists.\n *\n * @ignore\n */\nexport function ɵgetSelectorMetadata(target: any): ɵSelectorMetaDataModel {\n return target[ɵSELECTOR_META_KEY];\n}\n","function areArgumentsShallowlyEqual(\n equalityCheck: (a: any, b: any) => boolean,\n prev: IArguments | null,\n next: IArguments | null\n) {\n if (prev === null || next === null || prev.length !== next.length) {\n return false;\n }\n\n // Do this in a for loop (and not a `forEach` or an `every`) so we can\n // determine equality as fast as possible.\n const length = prev.length;\n for (let i = 0; i < length; i++) {\n if (!equalityCheck(prev[i], next[i])) {\n return false;\n }\n }\n\n return true;\n}\n\n/**\n * Memoize a function on its last inputs only.\n * Originally from: https://github.com/reduxjs/reselect/blob/master/src/index.js\n *\n * @ignore\n */\nexport function ɵmemoize<T extends (...args: any[]) => any>(\n func: T,\n equalityCheck = Object.is\n): T {\n let lastArgs: IArguments | null = null;\n let lastResult: any = null;\n // we reference arguments instead of spreading them for performance reasons\n function memoized() {\n // eslint-disable-next-line prefer-rest-params\n if (!areArgumentsShallowlyEqual(equalityCheck, lastArgs, arguments)) {\n // apply arguments instead of spreading for performance.\n // eslint-disable-next-line prefer-rest-params, prefer-spread\n lastResult = (<Function>func).apply(null, arguments);\n }\n // eslint-disable-next-line prefer-rest-params\n lastArgs = arguments;\n return lastResult;\n }\n (<any>memoized).reset = function () {\n // The hidden (for now) ability to reset the memoization\n lastArgs = null;\n lastResult = null;\n };\n return memoized as T;\n}\n","import { ɵensureSelectorMetadata } from './metadata';\nimport type { ɵTokenName, ɵSelectFromRootState, ɵRuntimeSelectorContext } from './symbols';\n\nexport class StateToken<T = void> {\n constructor(private readonly _name: ɵTokenName<T>) {\n const selectorMetadata = ɵensureSelectorMetadata(<any>this);\n selectorMetadata.makeRootSelector = (\n runtimeContext: ɵRuntimeSelectorContext\n ): ɵSelectFromRootState => {\n return runtimeContext.getStateGetter(this._name);\n };\n }\n\n getName(): string {\n return this._name;\n }\n\n toString(): string {\n return `StateToken[${this._name}]`;\n }\n}\n","import { InjectionToken } from '@angular/core';\n\nimport { ɵPlainObject } from './symbols';\n\ndeclare const ngDevMode: boolean;\n\nexport class ɵInitialState {\n private static _value: ɵPlainObject = {};\n\n static set(state: ɵPlainObject) {\n this._value = state;\n }\n\n static pop(): ɵPlainObject {\n const state = this._value;\n this._value = {};\n return state;\n }\n}\n\nexport const ɵINITIAL_STATE_TOKEN = new InjectionToken<ɵPlainObject>(\n typeof ngDevMode !== 'undefined' && ngDevMode ? 'INITIAL_STATE_TOKEN' : '',\n {\n providedIn: 'root',\n factory: () => ɵInitialState.pop()\n }\n);\n","import { DestroyRef, inject, Injectable } from '@angular/core';\nimport { BehaviorSubject } from 'rxjs';\n\n@Injectable({ providedIn: 'root' })\nexport class ɵNgxsAppBootstrappedState extends BehaviorSubject<boolean> {\n constructor() {\n super(false);\n\n const destroyRef = inject(DestroyRef);\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 destroyRef.onDestroy(() => this.complete());\n }\n\n bootstrap(): void {\n this.next(true);\n }\n}\n","import { InjectionToken } from '@angular/core';\n\ndeclare const ngDevMode: boolean;\n\n// These tokens are internal and can change at any point.\n\nexport const ɵNGXS_STATE_FACTORY = /* @__PURE__ */ new InjectionToken<any>(\n typeof ngDevMode !== 'undefined' && ngDevMode ? 'ɵNGXS_STATE_FACTORY' : ''\n);\n\nexport const ɵNGXS_STATE_CONTEXT_FACTORY = /* @__PURE__ */ new InjectionToken<any>(\n typeof ngDevMode !== 'undefined' && ngDevMode ? 'ɵNGXS_STATE_CONTEXT_FACTORY' : ''\n);\n","import { BehaviorSubject, Subject } from 'rxjs';\n\n/**\n * This wraps the provided function, and will enforce the following:\n * - The calls will execute in the order that they are made\n * - A call will only be initiated when the previous call has completed\n * - If there is a call currently executing then the new call will be added\n * to the queue and the function will return immediately\n *\n * NOTE: The following assumptions about the operation must hold true:\n * - The operation is synchronous in nature\n * - If any asynchronous side effects of the call exist, it should not\n * have any bearing on the correctness of the next call in the queue\n * - The operation has a void return\n * - The caller should not assume that the call has completed upon\n * return of the function\n * - The caller can assume that all the queued calls will complete\n * within the current microtask\n * - The only way that a call will encounter another call in the queue\n * would be if the call at the front of the queue initiated this call\n * as part of its synchronous execution\n */\nfunction orderedQueueOperation<TArgs extends any[]>(operation: (...args: TArgs) => void) {\n const callsQueue: TArgs[] = [];\n let busyPushingNext = false;\n return function callOperation(...args: TArgs) {\n if (busyPushingNext) {\n callsQueue.unshift(args);\n return;\n }\n busyPushingNext = true;\n operation(...args);\n while (callsQueue.length > 0) {\n const nextCallArgs = callsQueue.pop();\n nextCallArgs && operation(...nextCallArgs);\n }\n busyPushingNext = false;\n };\n}\n\n/**\n * Custom Subject that ensures that subscribers are notified of values in the order that they arrived.\n * A standard Subject does not have this guarantee.\n * For example, given the following code:\n * ```typescript\n * const subject = new Subject<string>();\n subject.subscribe(value => {\n if (value === 'start') subject.next('end');\n });\n subject.subscribe(value => { });\n subject.next('start');\n * ```\n * When `subject` is a standard `Subject<T>` the second subscriber would recieve `end` and then `start`.\n * When `subject` is a `OrderedSubject<T>` the second subscriber would recieve `start` and then `end`.\n */\nexport class ɵOrderedSubject<T> extends Subject<T> {\n private _orderedNext = orderedQueueOperation((value?: T) => super.next(<T>value));\n\n next(value?: T): void {\n this._orderedNext(value);\n }\n}\n\n/**\n * Custom BehaviorSubject that ensures that subscribers are notified of values in the order that they arrived.\n * A standard BehaviorSubject does not have this guarantee.\n * For example, given the following code:\n * ```typescript\n * const subject = new BehaviorSubject<string>();\n subject.subscribe(value => {\n if (value === 'start') subject.next('end');\n });\n subject.subscribe(value => { });\n subject.next('start');\n * ```\n * When `subject` is a standard `BehaviorSubject<T>` the second subscriber would recieve `end` and then `start`.\n * When `subject` is a `OrderedBehaviorSubject<T>` the second subscriber would recieve `start` and then `end`.\n */\nexport class ɵOrderedBehaviorSubject<T> extends BehaviorSubject<T> {\n private _orderedNext = orderedQueueOperation((value: T) => super.next(value));\n private _currentValue: T;\n\n constructor(value: T) {\n super(value);\n this._currentValue = value;\n }\n\n getValue(): T {\n return this._currentValue;\n }\n\n next(value: T): void {\n this._currentValue = value;\n this._orderedNext(value);\n }\n}\n","import { MonoTypeOperatorFunction, Observable } from 'rxjs';\n\nexport function ɵwrapObserverCalls<TValue>(\n invokeFn: (fn: () => void) => void\n): MonoTypeOperatorFunction<TValue> {\n return (source: Observable<TValue>) => {\n return new Observable<TValue>(subscriber => {\n return source.subscribe({\n next(value) {\n invokeFn(() => subscriber.next(value));\n },\n error(error) {\n invokeFn(() => subscriber.error(error));\n },\n complete() {\n invokeFn(() => subscriber.complete());\n }\n });\n });\n };\n}\n","import { DestroyRef, inject, Injectable, Signal, untracked } from '@angular/core';\nimport { toSignal } from '@angular/core/rxjs-interop';\n\nimport { ɵwrapObserverCalls } from './custom-rxjs-operators';\nimport { ɵOrderedBehaviorSubject } from './custom-rxjs-subjects';\nimport { ɵPlainObject } from './symbols';\n\n/**\n * BehaviorSubject of the entire state.\n * @ignore\n */\n@Injectable({ providedIn: 'root' })\nexport class ɵStateStream extends ɵOrderedBehaviorSubject<ɵPlainObject> {\n readonly state: Signal<ɵPlainObject> = toSignal(this.pipe(ɵwrapObserverCalls(untracked)), {\n manualCleanup: true,\n requireSync: true\n });\n\n constructor() {\n super({});\n\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 // The `StateStream` should never emit values once the root view is removed,\n // such as when the `ApplicationRef.destroy()` method is called. This is crucial\n // for preventing memory leaks in server-side rendered apps, where a new `StateStream`\n // is created for each HTTP request. If users forget to unsubscribe from `store.select`\n // or `store.subscribe`, it can result in significant memory leaks in SSR apps.\n inject(DestroyRef).onDestroy(() => this.complete());\n }\n}\n","import { Observable } from 'rxjs';\n\nexport function ɵof<T>(value: T) {\n // Manually creating the observable pulls less symbols from RxJS than `of(value)`.\n return new Observable<T>(subscriber => {\n subscriber.next(value);\n subscriber.complete();\n });\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAYA;AACA;AACO,MAAM,SAAS,GAAG;AACzB;AACA;AACO,MAAM,iBAAiB,GAAG;AACjC;AACA;AACA;AACO,MAAM,kBAAkB,GAAG;;ACrBlC;AACA;AACA,MAAM,eAAe,GAAG,MAAM,CAAC,SAAS,CAAC,cAAc;AAC1C,MAAA,eAAe,GAAG,CAAC,MAAW,EAAE,GAAgB,KAC3D,eAAe,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG;AAErB,MAAA,eAAe,GAAG,MAAM,CAAC;;ACItC;;;;AAIG;AACG,SAAU,oBAAoB,CAAC,MAA2B,EAAA;IAC9D,IAAI,CAAC,eAAe,CAAC,MAAM,EAAE,SAAS,CAAC,EAAE;AACvC,QAAA,MAAM,eAAe,GAAmB;AACtC,YAAA,IAAI,EAAE,IAAI;AACV,YAAA,OAAO,EAAE,EAAE;AACX,YAA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AAA;AAAZ,uBAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,YAAY,cADC,MAAM,EAAA,CAAA,CAAA;;2FACnB,YAAY,EAAA,UAAA,EAAA,CAAA;kBADxB,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;ACT5B,SAAU,GAAG,CAAI,KAAQ,EAAA;;AAE7B,IAAA,OAAO,IAAI,UAAU,CAAI,UAAU,IAAG;AACpC,QAAA,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC;QACtB,UAAU,CAAC,QAAQ,EAAE;AACvB,KAAC,CAAC;AACJ;;ACRA;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ngxs-store-internals.mjs","sources":["../../../packages/store/internals/src/symbols.ts","../../../packages/store/internals/src/object-utils.ts","../../../packages/store/internals/src/metadata.ts","../../../packages/store/internals/src/memoize.ts","../../../packages/store/internals/src/state-token.ts","../../../packages/store/internals/src/initial-state.ts","../../../packages/store/internals/src/ngxs-app-bootstrapped-state.ts","../../../packages/store/internals/src/internal-tokens.ts","../../../packages/store/internals/src/custom-rxjs-subjects.ts","../../../packages/store/internals/src/custom-rxjs-operators.ts","../../../packages/store/internals/src/state-stream.ts","../../../packages/store/internals/src/rxjs.ts","../../../packages/store/internals/src/action-registry.ts","../../../packages/store/internals/src/ngxs-store-internals.ts"],"sourcesContent":["import type { StateToken } from './state-token';\n\nexport interface ɵPlainObject {\n [key: string]: any;\n}\n\nexport interface ɵPlainObjectOf<T> {\n [key: string]: T;\n}\n\nexport type ɵStateClass<T = any> = new (...args: any[]) => T;\n\n// This key is used to store metadata on state classes,\n// such as actions and other related information.\nexport const ɵMETA_KEY = 'NGXS_META';\n// This key is used to store options on state classes\n// provided through the `@State` decorator.\nexport const ɵMETA_OPTIONS_KEY = 'NGXS_OPTIONS_META';\n// This key is used to store selector metadata on selector functions,\n// such as decorated with the `@Selector` or provided through the\n// `createSelector` function.\nexport const ɵSELECTOR_META_KEY = 'NGXS_SELECTOR_META';\n\nexport interface ɵStateToken<T, U> {\n new (name: ɵTokenName<T>): U;\n getName(): string;\n toString(): string;\n}\n\ntype RequireGeneric<T, U> = T extends void ? 'You must provide a type parameter' : U;\n\nexport type ɵTokenName<T> = string & RequireGeneric<T, string>;\n\nexport type ɵExtractTokenType<P> = P extends StateToken<infer T> ? T : never;\n\n/**\n * Options that can be provided to the store.\n */\nexport interface ɵStoreOptions<T> {\n /**\n * Name of the state. Required.\n */\n name: string | StateToken<T>;\n\n /**\n * Default values for the state. If not provided, uses empty object.\n */\n defaults?: T;\n\n /**\n * Sub states for the given state.\n *\n * @deprecated\n * Read the deprecation notice at this link: https://ngxs.io/deprecations/sub-states-deprecation.\n */\n children?: ɵStateClass[];\n}\n\n// inspired from https://stackoverflow.com/a/43674389\nexport interface ɵStateClassInternal<T = any, U = any> extends ɵStateClass<T> {\n [ɵMETA_KEY]?: ɵMetaDataModel;\n [ɵMETA_OPTIONS_KEY]?: ɵStoreOptions<U>;\n}\n\nexport interface ɵMetaDataModel {\n name: string | null;\n actions: ɵPlainObjectOf<ɵActionHandlerMetaData[]>;\n defaults: any;\n path: string | null;\n makeRootSelector: ɵSelectorFactory | null;\n /** @deprecated */\n children?: ɵStateClassInternal[];\n}\n\nexport interface ɵSelectorMetaDataModel {\n makeRootSelector: ɵSelectorFactory | null;\n originalFn: Function | null;\n containerClass: any;\n selectorName: string | null;\n getSelectorOptions: () => ɵSharedSelectorOptions;\n}\n\nexport interface ɵSharedSelectorOptions {\n /**\n * @deprecated\n * Read the deprecation notice at this link: https://ngxs.io/deprecations/inject-container-state-deprecation.md.\n */\n injectContainerState?: boolean;\n suppressErrors?: boolean;\n}\n\nexport interface ɵRuntimeSelectorContext {\n getStateGetter(key: any): (state: any) => any;\n getSelectorOptions(localOptions?: ɵSharedSelectorOptions): ɵSharedSelectorOptions;\n}\n\nexport type ɵSelectFromRootState = (rootState: any) => any;\nexport type ɵSelectorFactory = (\n runtimeContext: ɵRuntimeSelectorContext\n) => ɵSelectFromRootState;\n\n/**\n * Actions that can be provided in a action decorator.\n */\nexport interface ɵActionOptions {\n /**\n * Cancel the previous uncompleted observable(s).\n */\n cancelUncompleted?: boolean;\n}\n\nexport interface ɵActionHandlerMetaData {\n fn: string | symbol;\n options: ɵActionOptions;\n type: string;\n}\n","// Property reads are not minified.\n// It's smaller to read it once and use a function.\nconst _hasOwnProperty = Object.prototype.hasOwnProperty;\nexport const ɵhasOwnProperty = (target: any, key: PropertyKey) =>\n _hasOwnProperty.call(target, key);\n\nexport const ɵdefineProperty = Object.defineProperty;\n","import { ɵdefineProperty, ɵhasOwnProperty } from './object-utils';\nimport {\n ɵMETA_KEY,\n ɵSELECTOR_META_KEY,\n ɵMetaDataModel,\n ɵStateClassInternal,\n ɵSelectorMetaDataModel,\n ɵRuntimeSelectorContext\n} from './symbols';\n\n/**\n * Ensures metadata is attached to the class and returns it.\n *\n * @ignore\n */\nexport function ɵensureStoreMetadata(target: ɵStateClassInternal): ɵMetaDataModel {\n if (!ɵhasOwnProperty(target, ɵMETA_KEY)) {\n const defaultMetadata: ɵMetaDataModel = {\n name: null,\n actions: {},\n defaults: {},\n path: null,\n makeRootSelector(context: ɵRuntimeSelectorContext) {\n return context.getStateGetter(defaultMetadata.name);\n },\n children: []\n };\n\n ɵdefineProperty(target, ɵMETA_KEY, { value: defaultMetadata });\n }\n return ɵgetStoreMetadata(target);\n}\n\n/**\n * Get the metadata attached to the state class if it exists.\n *\n * @ignore\n */\nexport function ɵgetStoreMetadata(target: ɵStateClassInternal): ɵMetaDataModel {\n return target[ɵMETA_KEY]!;\n}\n\n/**\n * Ensures metadata is attached to the selector and returns it.\n *\n * @ignore\n */\nexport function ɵensureSelectorMetadata(target: Function): ɵSelectorMetaDataModel {\n if (!ɵhasOwnProperty(target, ɵSELECTOR_META_KEY)) {\n const defaultMetadata: ɵSelectorMetaDataModel = {\n makeRootSelector: null,\n originalFn: null,\n containerClass: null,\n selectorName: null,\n getSelectorOptions: () => ({})\n };\n\n ɵdefineProperty(target, ɵSELECTOR_META_KEY, { value: defaultMetadata });\n }\n\n return ɵgetSelectorMetadata(target);\n}\n\n/**\n * Get the metadata attached to the selector if it exists.\n *\n * @ignore\n */\nexport function ɵgetSelectorMetadata(target: any): ɵSelectorMetaDataModel {\n return target[ɵSELECTOR_META_KEY];\n}\n","function areArgumentsShallowlyEqual(\n equalityCheck: (a: any, b: any) => boolean,\n prev: IArguments | null,\n next: IArguments | null\n) {\n if (prev === null || next === null || prev.length !== next.length) {\n return false;\n }\n\n // Do this in a for loop (and not a `forEach` or an `every`) so we can\n // determine equality as fast as possible.\n const length = prev.length;\n for (let i = 0; i < length; i++) {\n if (!equalityCheck(prev[i], next[i])) {\n return false;\n }\n }\n\n return true;\n}\n\n/**\n * Memoize a function on its last inputs only.\n * Originally from: https://github.com/reduxjs/reselect/blob/master/src/index.js\n *\n * @ignore\n */\nexport function ɵmemoize<T extends (...args: any[]) => any>(\n func: T,\n equalityCheck = Object.is\n): T {\n let lastArgs: IArguments | null = null;\n let lastResult: any = null;\n // we reference arguments instead of spreading them for performance reasons\n function memoized() {\n // eslint-disable-next-line prefer-rest-params\n if (!areArgumentsShallowlyEqual(equalityCheck, lastArgs, arguments)) {\n // apply arguments instead of spreading for performance.\n // eslint-disable-next-line prefer-rest-params, prefer-spread\n lastResult = (<Function>func).apply(null, arguments);\n }\n // eslint-disable-next-line prefer-rest-params\n lastArgs = arguments;\n return lastResult;\n }\n (<any>memoized).reset = function () {\n // The hidden (for now) ability to reset the memoization\n lastArgs = null;\n lastResult = null;\n };\n return memoized as T;\n}\n","import { ɵensureSelectorMetadata } from './metadata';\nimport type { ɵTokenName, ɵSelectFromRootState, ɵRuntimeSelectorContext } from './symbols';\n\nexport class StateToken<T = void> {\n constructor(private readonly _name: ɵTokenName<T>) {\n const selectorMetadata = ɵensureSelectorMetadata(<any>this);\n selectorMetadata.makeRootSelector = (\n runtimeContext: ɵRuntimeSelectorContext\n ): ɵSelectFromRootState => {\n return runtimeContext.getStateGetter(this._name);\n };\n }\n\n getName(): string {\n return this._name;\n }\n\n toString(): string {\n return `StateToken[${this._name}]`;\n }\n}\n","import { InjectionToken } from '@angular/core';\n\nimport { ɵPlainObject } from './symbols';\n\ndeclare const ngDevMode: boolean;\n\nexport class ɵInitialState {\n private static _value: ɵPlainObject = {};\n\n static set(state: ɵPlainObject) {\n this._value = state;\n }\n\n static pop(): ɵPlainObject {\n const state = this._value;\n this._value = {};\n return state;\n }\n}\n\nexport const ɵINITIAL_STATE_TOKEN = new InjectionToken<ɵPlainObject>(\n typeof ngDevMode !== 'undefined' && ngDevMode ? 'INITIAL_STATE_TOKEN' : '',\n {\n providedIn: 'root',\n factory: () => ɵInitialState.pop()\n }\n);\n","import { DestroyRef, inject, Injectable } from '@angular/core';\nimport { BehaviorSubject } from 'rxjs';\n\n@Injectable({ providedIn: 'root' })\nexport class ɵNgxsAppBootstrappedState extends BehaviorSubject<boolean> {\n constructor() {\n super(false);\n\n const destroyRef = inject(DestroyRef);\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 destroyRef.onDestroy(() => this.complete());\n }\n\n bootstrap(): void {\n this.next(true);\n }\n}\n","import { InjectionToken } from '@angular/core';\n\ndeclare const ngDevMode: boolean;\n\n// These tokens are internal and can change at any point.\n\nexport const ɵNGXS_STATE_FACTORY = /* @__PURE__ */ new InjectionToken<any>(\n typeof ngDevMode !== 'undefined' && ngDevMode ? 'ɵNGXS_STATE_FACTORY' : ''\n);\n\nexport const ɵNGXS_STATE_CONTEXT_FACTORY = /* @__PURE__ */ new InjectionToken<any>(\n typeof ngDevMode !== 'undefined' && ngDevMode ? 'ɵNGXS_STATE_CONTEXT_FACTORY' : ''\n);\n","import { BehaviorSubject, Subject } from 'rxjs';\n\n/**\n * This wraps the provided function, and will enforce the following:\n * - The calls will execute in the order that they are made\n * - A call will only be initiated when the previous call has completed\n * - If there is a call currently executing then the new call will be added\n * to the queue and the function will return immediately\n *\n * NOTE: The following assumptions about the operation must hold true:\n * - The operation is synchronous in nature\n * - If any asynchronous side effects of the call exist, it should not\n * have any bearing on the correctness of the next call in the queue\n * - The operation has a void return\n * - The caller should not assume that the call has completed upon\n * return of the function\n * - The caller can assume that all the queued calls will complete\n * within the current microtask\n * - The only way that a call will encounter another call in the queue\n * would be if the call at the front of the queue initiated this call\n * as part of its synchronous execution\n */\nfunction orderedQueueOperation<TArgs extends any[]>(operation: (...args: TArgs) => void) {\n const callsQueue: TArgs[] = [];\n let busyPushingNext = false;\n return function callOperation(...args: TArgs) {\n if (busyPushingNext) {\n callsQueue.unshift(args);\n return;\n }\n busyPushingNext = true;\n operation(...args);\n while (callsQueue.length > 0) {\n const nextCallArgs = callsQueue.pop();\n nextCallArgs && operation(...nextCallArgs);\n }\n busyPushingNext = false;\n };\n}\n\n/**\n * Custom Subject that ensures that subscribers are notified of values in the order that they arrived.\n * A standard Subject does not have this guarantee.\n * For example, given the following code:\n * ```typescript\n * const subject = new Subject<string>();\n subject.subscribe(value => {\n if (value === 'start') subject.next('end');\n });\n subject.subscribe(value => { });\n subject.next('start');\n * ```\n * When `subject` is a standard `Subject<T>` the second subscriber would recieve `end` and then `start`.\n * When `subject` is a `OrderedSubject<T>` the second subscriber would recieve `start` and then `end`.\n */\nexport class ɵOrderedSubject<T> extends Subject<T> {\n private _orderedNext = orderedQueueOperation((value?: T) => super.next(<T>value));\n\n next(value?: T): void {\n this._orderedNext(value);\n }\n}\n\n/**\n * Custom BehaviorSubject that ensures that subscribers are notified of values in the order that they arrived.\n * A standard BehaviorSubject does not have this guarantee.\n * For example, given the following code:\n * ```typescript\n * const subject = new BehaviorSubject<string>();\n subject.subscribe(value => {\n if (value === 'start') subject.next('end');\n });\n subject.subscribe(value => { });\n subject.next('start');\n * ```\n * When `subject` is a standard `BehaviorSubject<T>` the second subscriber would recieve `end` and then `start`.\n * When `subject` is a `OrderedBehaviorSubject<T>` the second subscriber would recieve `start` and then `end`.\n */\nexport class ɵOrderedBehaviorSubject<T> extends BehaviorSubject<T> {\n private _orderedNext = orderedQueueOperation((value: T) => super.next(value));\n private _currentValue: T;\n\n constructor(value: T) {\n super(value);\n this._currentValue = value;\n }\n\n getValue(): T {\n return this._currentValue;\n }\n\n next(value: T): void {\n this._currentValue = value;\n this._orderedNext(value);\n }\n}\n","import { MonoTypeOperatorFunction, Observable } from 'rxjs';\n\nexport function ɵwrapObserverCalls<TValue>(\n invokeFn: (fn: () => void) => void\n): MonoTypeOperatorFunction<TValue> {\n return (source: Observable<TValue>) => {\n return new Observable<TValue>(subscriber => {\n return source.subscribe({\n next(value) {\n invokeFn(() => subscriber.next(value));\n },\n error(error) {\n invokeFn(() => subscriber.error(error));\n },\n complete() {\n invokeFn(() => subscriber.complete());\n }\n });\n });\n };\n}\n","import { DestroyRef, inject, Injectable, Signal, untracked } from '@angular/core';\nimport { toSignal } from '@angular/core/rxjs-interop';\n\nimport { ɵwrapObserverCalls } from './custom-rxjs-operators';\nimport { ɵOrderedBehaviorSubject } from './custom-rxjs-subjects';\nimport { ɵPlainObject } from './symbols';\n\n/**\n * BehaviorSubject of the entire state.\n * @ignore\n */\n@Injectable({ providedIn: 'root' })\nexport class ɵStateStream extends ɵOrderedBehaviorSubject<ɵPlainObject> {\n readonly state: Signal<ɵPlainObject> = toSignal(this.pipe(ɵwrapObserverCalls(untracked)), {\n manualCleanup: true,\n requireSync: true\n });\n\n constructor() {\n super({});\n\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 // The `StateStream` should never emit values once the root view is removed,\n // such as when the `ApplicationRef.destroy()` method is called. This is crucial\n // for preventing memory leaks in server-side rendered apps, where a new `StateStream`\n // is created for each HTTP request. If users forget to unsubscribe from `store.select`\n // or `store.subscribe`, it can result in significant memory leaks in SSR apps.\n inject(DestroyRef).onDestroy(() => this.complete());\n }\n}\n","import { Observable } from 'rxjs';\n\nexport function ɵof<T>(value: T) {\n // Manually creating the observable pulls less symbols from RxJS than `of(value)`.\n return new Observable<T>(subscriber => {\n subscriber.next(value);\n subscriber.complete();\n });\n}\n","import { DestroyRef, inject, Injectable } from '@angular/core';\nimport type { Observable } from 'rxjs';\n\nexport type ActionHandlerFn = (action: any) => Observable<unknown>;\n\n@Injectable({ providedIn: 'root' })\nexport class ɵNgxsActionRegistry {\n // Instead of going over the states list every time an action is dispatched,\n // we are constructing a map of action types to lists of action metadata.\n // If the `@@Init` action is handled in two different states, the action\n // metadata list will contain two objects that have the state `instance` and\n // method names to be used as action handlers (decorated with `@Action(InitState)`).\n private readonly _actionTypeToHandlersMap = new Map<string, Set<ActionHandlerFn>>();\n\n constructor() {\n inject(DestroyRef).onDestroy(() => this._actionTypeToHandlersMap.clear());\n }\n\n get(type: string) {\n return this._actionTypeToHandlersMap.get(type);\n }\n\n register(type: string, handler: ActionHandlerFn) {\n const handlers = this._actionTypeToHandlersMap.get(type) ?? new Set();\n handlers.add(handler);\n this._actionTypeToHandlersMap.set(type, handlers);\n\n return () => {\n const handlers = this._actionTypeToHandlersMap.get(type)!;\n handlers.delete(handler);\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAYA;AACA;AACO,MAAM,SAAS,GAAG;AACzB;AACA;AACO,MAAM,iBAAiB,GAAG;AACjC;AACA;AACA;AACO,MAAM,kBAAkB,GAAG;;ACrBlC;AACA;AACA,MAAM,eAAe,GAAG,MAAM,CAAC,SAAS,CAAC,cAAc;AAC1C,MAAA,eAAe,GAAG,CAAC,MAAW,EAAE,GAAgB,KAC3D,eAAe,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG;AAErB,MAAA,eAAe,GAAG,MAAM,CAAC;;ACItC;;;;AAIG;AACG,SAAU,oBAAoB,CAAC,MAA2B,EAAA;IAC9D,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jD,QAAA,OAAO,MAAK;YACV,MAAM,QAAQ,GAAG,IAAI,CAAC,wBAAwB,CAAC,GAAG,CAAC,IAAI,CAAE;AACzD,YAAA,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC;AAC1B,SAAC;;iIAxBQ,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAnB,uBAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,mBAAmB,cADN,MAAM,EAAA,CAAA,CAAA;;2FACnB,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAD/B,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;ACLlC;;AAEG;;;;"}
|
package/fesm2022/ngxs-store.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { inject, Injectable, DestroyRef, NgZone, Injector, runInInjectionContext, InjectionToken, ErrorHandler, ɵisPromise as _isPromise, computed, makeEnvironmentProviders, provideEnvironmentInitializer, NgModule, APP_BOOTSTRAP_LISTENER, ApplicationRef, PendingTasks } from '@angular/core';
|
|
3
3
|
import { config, Observable, Subject, share, forkJoin, map, throwError, shareReplay, filter, take, mergeMap, EMPTY, defaultIfEmpty, catchError, from, isObservable, takeUntil, finalize, distinctUntilChanged, startWith, skip, buffer, debounceTime } from 'rxjs';
|
|
4
|
-
import { ɵwrapObserverCalls as _wrapObserverCalls, ɵOrderedSubject as _OrderedSubject, ɵStateStream as _StateStream, ɵof as _of, ɵhasOwnProperty as _hasOwnProperty, ɵmemoize as _memoize, ɵgetStoreMetadata as _getStoreMetadata, ɵgetSelectorMetadata as _getSelectorMetadata, ɵMETA_KEY as _META_KEY, ɵINITIAL_STATE_TOKEN as _INITIAL_STATE_TOKEN, ɵNgxsAppBootstrappedState as _NgxsAppBootstrappedState, ɵensureStoreMetadata as _ensureStoreMetadata, ɵMETA_OPTIONS_KEY as _META_OPTIONS_KEY, ɵensureSelectorMetadata as _ensureSelectorMetadata, ɵdefineProperty as _defineProperty, ɵNGXS_STATE_CONTEXT_FACTORY as _NGXS_STATE_CONTEXT_FACTORY, ɵNGXS_STATE_FACTORY as _NGXS_STATE_FACTORY } from '@ngxs/store/internals';
|
|
4
|
+
import { ɵwrapObserverCalls as _wrapObserverCalls, ɵOrderedSubject as _OrderedSubject, ɵStateStream as _StateStream, ɵof as _of, ɵhasOwnProperty as _hasOwnProperty, ɵmemoize as _memoize, ɵgetStoreMetadata as _getStoreMetadata, ɵgetSelectorMetadata as _getSelectorMetadata, ɵMETA_KEY as _META_KEY, ɵINITIAL_STATE_TOKEN as _INITIAL_STATE_TOKEN, ɵNgxsActionRegistry as _NgxsActionRegistry, ɵNgxsAppBootstrappedState as _NgxsAppBootstrappedState, ɵensureStoreMetadata as _ensureStoreMetadata, ɵMETA_OPTIONS_KEY as _META_OPTIONS_KEY, ɵensureSelectorMetadata as _ensureSelectorMetadata, ɵdefineProperty as _defineProperty, ɵNGXS_STATE_CONTEXT_FACTORY as _NGXS_STATE_CONTEXT_FACTORY, ɵNGXS_STATE_FACTORY as _NGXS_STATE_FACTORY } from '@ngxs/store/internals';
|
|
5
5
|
export { StateToken } from '@ngxs/store/internals';
|
|
6
6
|
import { NGXS_PLUGINS, getActionTypeFromInstance, InitState, UpdateState, setValue, getValue, ɵisPluginClass as _isPluginClass } from '@ngxs/store/plugins';
|
|
7
7
|
export { InitState, NGXS_PLUGINS, UpdateState, actionMatcher, getActionTypeFromInstance, getValue, setValue } from '@ngxs/store/plugins';
|
|
@@ -775,36 +775,6 @@ function topologicalSort(graph) {
|
|
|
775
775
|
return sorted.reverse();
|
|
776
776
|
}
|
|
777
777
|
|
|
778
|
-
class NgxsActionRegistry {
|
|
779
|
-
constructor() {
|
|
780
|
-
// Instead of going over the states list every time an action is dispatched,
|
|
781
|
-
// we are constructing a map of action types to lists of action metadata.
|
|
782
|
-
// If the `@@Init` action is handled in two different states, the action
|
|
783
|
-
// metadata list will contain two objects that have the state `instance` and
|
|
784
|
-
// method names to be used as action handlers (decorated with `@Action(InitState)`).
|
|
785
|
-
this._actionTypeToHandlersMap = new Map();
|
|
786
|
-
inject(DestroyRef).onDestroy(() => this._actionTypeToHandlersMap.clear());
|
|
787
|
-
}
|
|
788
|
-
get(type) {
|
|
789
|
-
return this._actionTypeToHandlersMap.get(type);
|
|
790
|
-
}
|
|
791
|
-
register(type, handler) {
|
|
792
|
-
const handlers = this._actionTypeToHandlersMap.get(type) ?? new Set();
|
|
793
|
-
handlers.add(handler);
|
|
794
|
-
this._actionTypeToHandlersMap.set(type, handlers);
|
|
795
|
-
return () => {
|
|
796
|
-
const handlers = this._actionTypeToHandlersMap.get(type);
|
|
797
|
-
handlers.delete(handler);
|
|
798
|
-
};
|
|
799
|
-
}
|
|
800
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: NgxsActionRegistry, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
801
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: NgxsActionRegistry, providedIn: 'root' }); }
|
|
802
|
-
}
|
|
803
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: NgxsActionRegistry, decorators: [{
|
|
804
|
-
type: Injectable,
|
|
805
|
-
args: [{ providedIn: 'root' }]
|
|
806
|
-
}], ctorParameters: () => [] });
|
|
807
|
-
|
|
808
778
|
function throwStateNameError(name) {
|
|
809
779
|
throw new Error(`${name} is not a valid state name. It needs to be a valid object property name.`);
|
|
810
780
|
}
|
|
@@ -1183,7 +1153,7 @@ class StateFactory {
|
|
|
1183
1153
|
this._actions = inject(InternalActions);
|
|
1184
1154
|
this._actionResults = inject(InternalDispatchedActionResults);
|
|
1185
1155
|
this._initialState = inject(_INITIAL_STATE_TOKEN, { optional: true });
|
|
1186
|
-
this._actionRegistry = inject(
|
|
1156
|
+
this._actionRegistry = inject(_NgxsActionRegistry);
|
|
1187
1157
|
this._propGetter = inject(ɵPROP_GETTER);
|
|
1188
1158
|
this._actionsSubscription = null;
|
|
1189
1159
|
this._ngxsUnhandledErrorHandler = null;
|
|
@@ -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/actions/action-registry.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/internal/state-operators.ts","../../../packages/store/src/internal/state-context-factory.ts","../../../packages/store/src/operators/of-action.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/dev-features/ngxs-development.module.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/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 { ɵwrapObserverCalls } from '@ngxs/store/internals';\n\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 ɵwrapObserverCalls<T>(fn => ngxsExecutionStrategy.leave(fn));\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, 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';\n\n@Injectable({ providedIn: 'root' })\nexport class InternalNgxsExecutionStrategy {\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, share } 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 const 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 const sharedInternalActions$ = internalActions$.pipe(\n leaveNgxs(internalExecutionStrategy),\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 `share()` operator reduces the number of change detections.\n // This would call leave only once for any stream emission across all active subscribers.\n share()\n );\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 { inject, Injectable, Injector, NgZone, runInInjectionContext } from '@angular/core';\nimport {\n EMPTY,\n forkJoin,\n Observable,\n throwError,\n filter,\n map,\n mergeMap,\n shareReplay,\n take\n} from 'rxjs';\n\nimport { getActionTypeFromInstance } from '@ngxs/store/plugins';\nimport { ɵPlainObject, ɵStateStream, ɵof } 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\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 throwError(() => error);\n }\n }\n\n const prevState = this._stateStream.getValue();\n const plugins = this._pluginManager.plugins;\n\n return compose(this._injector, [\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[]) => any;\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, funcs: StateFn[]) =>\n (...args: any[]) => {\n const curr = funcs.shift()!;\n return runInInjectionContext(injector, () =>\n curr(...args, (...nextArgs: any[]) => compose(injector, funcs)(...nextArgs))\n );\n };\n","import { Injectable, InjectionToken, inject } from '@angular/core';\nimport { 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 { StateOperator };\n\n/**\n * State context provided to the actions in the state.\n */\nexport interface StateContext<T> {\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\n/** @internal */\ndeclare global {\n const ngDevMode: boolean;\n // Indicates whether the application is operating in server-rendering mode.\n // `ngServerMode` is a global flag set by Angular CLI.\n // https://github.com/angular/angular-cli/blob/b4e9a2af9e50e7b65167d0fdbd4012023135e875/packages/angular/build/src/tools/vite/utils.ts#L102\n const ngServerMode: boolean;\n}\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 && 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 && metadata.makeRootSelector) || (() => selector);\n}\n","import { InjectionToken, inject } from '@angular/core';\nimport { 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 */\nfunction 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 */\nfunction 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\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\n// This injection token selects the prop getter implementation once the app is\n// bootstrapped, as the `propGetter` function's behavior determines the implementation\n// each time it's called. It accepts the config as the second argument. We no longer\n// need to check for the `strictContentSecurityPolicy` every time the prop getter\n// implementation is selected. Now, the `propGetter` function is only used within\n// `createSelectorFn`, which, in turn, is solely used by the `Select` decorator.\n// We've been trying to deprecate the `Select` decorator because it's unstable with\n// server-side rendering and micro-frontend applications.\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 { DestroyRef, inject, Injectable } from '@angular/core';\nimport type { Observable } from 'rxjs';\n\nexport type ActionHandlerFn = (action: any) => Observable<unknown>;\n\n@Injectable({ providedIn: 'root' })\nexport class NgxsActionRegistry {\n // Instead of going over the states list every time an action is dispatched,\n // we are constructing a map of action types to lists of action metadata.\n // If the `@@Init` action is handled in two different states, the action\n // metadata list will contain two objects that have the state `instance` and\n // method names to be used as action handlers (decorated with `@Action(InitState)`).\n private readonly _actionTypeToHandlersMap = new Map<string, Set<ActionHandlerFn>>();\n\n constructor() {\n inject(DestroyRef).onDestroy(() => this._actionTypeToHandlersMap.clear());\n }\n\n get(type: string) {\n return this._actionTypeToHandlersMap.get(type);\n }\n\n register(type: string, handler: ActionHandlerFn) {\n const handlers = this._actionTypeToHandlersMap.get(type) ?? new Set();\n handlers.add(handler);\n this._actionTypeToHandlersMap.set(type, handlers);\n\n return () => {\n const handlers = this._actionTypeToHandlersMap.get(type)!;\n handlers.delete(handler);\n };\n }\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 throwSelectFactoryNotConnectedError(): never {\n throw new Error('You have forgotten to import the NGXS module!');\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 {\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 { 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): StateContext<T> {\n const root = this._internalStateOperations.getRootStateOperations();\n\n return {\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 { 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 { DestroyRef, Injectable, Injector, inject, ɵisPromise } 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} from '@ngxs/store/internals';\nimport { getActionTypeFromInstance, getValue, setValue } from '@ngxs/store/plugins';\nimport { ɵof } from '@ngxs/store/internals';\nimport {\n forkJoin,\n from,\n isObservable,\n Subscription,\n throwError,\n catchError,\n defaultIfEmpty,\n filter,\n map,\n mergeMap,\n takeUntil,\n finalize,\n Observable\n} from 'rxjs';\n\nimport { NgxsConfig } 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 { NgxsActionRegistry } from '../actions/action-registry';\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 { StateContextFactory } from './state-context-factory';\nimport { ofActionDispatched } from '../operators/of-action';\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 _stateContextFactory = inject(StateContextFactory);\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(() => this._actionsSubscription?.unsubscribe());\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 = throwError(() => 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 const { dispatched$ } = this._actions;\n for (const actionType of Object.keys(actions)) {\n const actionHandlers = actions[actionType].map(actionMeta => {\n const cancelable = !!actionMeta.options.cancelUncompleted;\n\n return (action: any) => {\n const stateContext = this._stateContextFactory.createStateContext(path);\n\n let result = instance[actionMeta.fn](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: any) => {\n if (ɵisPromise(value) || isObservable(value)) {\n return value;\n } else {\n return ɵof(value);\n }\n }),\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 // Note that we actually don't care about the return type; we only care\n // about emission, and thus `undefined` is applicable by the framework.\n defaultIfEmpty(undefined)\n );\n\n if (cancelable) {\n const canceled = dispatched$.pipe(ofActionDispatched(action));\n result = result.pipe(takeUntil(canceled));\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 stateContext.setState = noop;\n stateContext.patchState = noop;\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 for (const actionHandler of actionHandlers) {\n this._actionRegistry.register(actionType, actionHandler);\n }\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 { computed, inject, Injectable, Signal } from '@angular/core';\nimport {\n type Observable,\n type Subscription,\n throwError,\n catchError,\n distinctUntilChanged,\n map,\n shareReplay,\n take\n} from 'rxjs';\nimport { ɵINITIAL_STATE_TOKEN, ɵStateStream, ɵof } 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 throwError(() => 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 return computed<T>(() => selectorFn(this._stateStream.state()));\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 { 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\n private _initStateHasBeenDispatched?: boolean;\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 if (instance.ngxsOnInit) {\n instance.ngxsOnInit(this._getStateContext(mappedStore));\n }\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 if (instance.ngxsAfterBootstrap) {\n instance.ngxsAfterBootstrap(this._getStateContext(mappedStore));\n }\n }\n }\n\n private _getStateContext(mappedStore: MappedStore): StateContext<any> {\n return this._stateContextFactory.createStateContext(mappedStore.path);\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 { Observable } from 'rxjs';\nimport { ɵExtractTokenType, StateToken } from '@ngxs/store/internals';\n\nimport { propGetter } from '../../internal/internals';\nimport { SelectFactory } from './select-factory';\nimport { throwSelectFactoryNotConnectedError } from '../../configs/messages.config';\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 (target && (<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 (originalFn && 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 { 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 { ɵ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 */\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';\nimport { ɵdefineProperty } from '@ngxs/store/internals';\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 ɵdefineProperty(accumulator, key, {\n enumerable: true,\n value: store.selectSignal(selector)\n });\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 { Observable } from 'rxjs';\nimport { ɵdefineProperty } from '@ngxs/store/internals';\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 ɵdefineProperty(accumulator, key, {\n enumerable: true,\n value: dispatch(ActionType)\n });\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 { 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":["ɵwrapObserverCalls","ɵOrderedSubject","ɵStateStream","ɵof","ɵhasOwnProperty","ɵmemoize","ɵgetStoreMetadata","ɵgetSelectorMetadata","ɵMETA_KEY","ɵINITIAL_STATE_TOKEN","ɵisPromise","i1.Store","i2.NgxsConfig","ɵNgxsAppBootstrappedState","ɵensureStoreMetadata","ɵMETA_OPTIONS_KEY","ɵensureSelectorMetadata","ɵisPluginClass","ɵdefineProperty","ɵNGXS_STATE_CONTEXT_FACTORY","ɵNGXS_STATE_FACTORY"],"mappings":";;;;;;;;;MAIa,aAAa,CAAA;AAYxB,IAAA,WAAA,GAAA;QAXS,IAAO,CAAA,OAAA,GAAmB,EAAE;AAEpB,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,aAAa,EAAE;AACtD,YAAA,QAAQ,EAAE,IAAI;AACd,YAAA,QAAQ,EAAE;AACX,SAAA,CAAC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SAAA,CAAC;AACF,QAAA,OAAO,WAAW;KACnB,EAAE,EAAE,CAQJ;AACH;;ACjBM,SAAU,iBAAiB,CAAsB,SAAY,EAAA;AACjE,IAAA,OAAO,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC,WAAW,EAAE,CAAC,GAAG,EAAE,UAAU,CAAC,KAAI;AACzE,QAAAA,eAAe,CAAC,WAAW,EAAE,GAAG,EAAE;AAChC,YAAA,UAAU,EAAE,IAAI;AAChB,YAAA,KAAK,EAAE,QAAQ,CAAC,UAAU;AAC3B,SAAA,CAAC;AACF,QAAA,OAAO,WAAW;KACnB,EAAE,EAAE,CAQJ;AACH;;ACnBA;AACA;AACA;SACgB,+BAA+B,GAAA;AAC7C,IAAA,OAAO,wBAAwB,CAAC;AAC9B,QAAA;AACE,YAAA,OAAO,EAAEC,2BAA2B;AACpC,YAAA,WAAW,EAAE;AACd,SAAA;AACD,QAAA;AACE,YAAA,OAAO,EAAEC,mBAAmB;AAC5B,YAAA,WAAW,EAAE;AACd;AACF,KAAA,CAAC;AACJ;;ACpBA;;AAEG;;ACFH;;AAEG;;;;"}
|
|
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/internal/state-operators.ts","../../../packages/store/src/internal/state-context-factory.ts","../../../packages/store/src/operators/of-action.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/dev-features/ngxs-development.module.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/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 { ɵwrapObserverCalls } from '@ngxs/store/internals';\n\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 ɵwrapObserverCalls<T>(fn => ngxsExecutionStrategy.leave(fn));\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, 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';\n\n@Injectable({ providedIn: 'root' })\nexport class InternalNgxsExecutionStrategy {\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, share } 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 const 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 const sharedInternalActions$ = internalActions$.pipe(\n leaveNgxs(internalExecutionStrategy),\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 `share()` operator reduces the number of change detections.\n // This would call leave only once for any stream emission across all active subscribers.\n share()\n );\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 { inject, Injectable, Injector, NgZone, runInInjectionContext } from '@angular/core';\nimport {\n EMPTY,\n forkJoin,\n Observable,\n throwError,\n filter,\n map,\n mergeMap,\n shareReplay,\n take\n} from 'rxjs';\n\nimport { getActionTypeFromInstance } from '@ngxs/store/plugins';\nimport { ɵPlainObject, ɵStateStream, ɵof } 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\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 throwError(() => error);\n }\n }\n\n const prevState = this._stateStream.getValue();\n const plugins = this._pluginManager.plugins;\n\n return compose(this._injector, [\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[]) => any;\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, funcs: StateFn[]) =>\n (...args: any[]) => {\n const curr = funcs.shift()!;\n return runInInjectionContext(injector, () =>\n curr(...args, (...nextArgs: any[]) => compose(injector, funcs)(...nextArgs))\n );\n };\n","import { Injectable, InjectionToken, inject } from '@angular/core';\nimport { 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 { StateOperator };\n\n/**\n * State context provided to the actions in the state.\n */\nexport interface StateContext<T> {\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\n/** @internal */\ndeclare global {\n const ngDevMode: boolean;\n // Indicates whether the application is operating in server-rendering mode.\n // `ngServerMode` is a global flag set by Angular CLI.\n // https://github.com/angular/angular-cli/blob/b4e9a2af9e50e7b65167d0fdbd4012023135e875/packages/angular/build/src/tools/vite/utils.ts#L102\n const ngServerMode: boolean;\n}\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 && 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 && metadata.makeRootSelector) || (() => selector);\n}\n","import { InjectionToken, inject } from '@angular/core';\nimport { 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 */\nfunction 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 */\nfunction 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\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\n// This injection token selects the prop getter implementation once the app is\n// bootstrapped, as the `propGetter` function's behavior determines the implementation\n// each time it's called. It accepts the config as the second argument. We no longer\n// need to check for the `strictContentSecurityPolicy` every time the prop getter\n// implementation is selected. Now, the `propGetter` function is only used within\n// `createSelectorFn`, which, in turn, is solely used by the `Select` decorator.\n// We've been trying to deprecate the `Select` decorator because it's unstable with\n// server-side rendering and micro-frontend applications.\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 throwSelectFactoryNotConnectedError(): never {\n throw new Error('You have forgotten to import the NGXS module!');\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 {\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 { 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): StateContext<T> {\n const root = this._internalStateOperations.getRootStateOperations();\n\n return {\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 { 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 { DestroyRef, Injectable, Injector, inject, ɵisPromise } 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 { ɵof } from '@ngxs/store/internals';\nimport {\n forkJoin,\n from,\n isObservable,\n Subscription,\n throwError,\n catchError,\n defaultIfEmpty,\n filter,\n map,\n mergeMap,\n takeUntil,\n finalize,\n Observable\n} from 'rxjs';\n\nimport { NgxsConfig } 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 { StateContextFactory } from './state-context-factory';\nimport { ofActionDispatched } from '../operators/of-action';\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 _stateContextFactory = inject(StateContextFactory);\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(() => this._actionsSubscription?.unsubscribe());\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 = throwError(() => 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 const { dispatched$ } = this._actions;\n for (const actionType of Object.keys(actions)) {\n const actionHandlers = actions[actionType].map(actionMeta => {\n const cancelable = !!actionMeta.options.cancelUncompleted;\n\n return (action: any) => {\n const stateContext = this._stateContextFactory.createStateContext(path);\n\n let result = instance[actionMeta.fn](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: any) => {\n if (ɵisPromise(value) || isObservable(value)) {\n return value;\n } else {\n return ɵof(value);\n }\n }),\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 // Note that we actually don't care about the return type; we only care\n // about emission, and thus `undefined` is applicable by the framework.\n defaultIfEmpty(undefined)\n );\n\n if (cancelable) {\n const canceled = dispatched$.pipe(ofActionDispatched(action));\n result = result.pipe(takeUntil(canceled));\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 stateContext.setState = noop;\n stateContext.patchState = noop;\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 for (const actionHandler of actionHandlers) {\n this._actionRegistry.register(actionType, actionHandler);\n }\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 { computed, inject, Injectable, Signal } from '@angular/core';\nimport {\n type Observable,\n type Subscription,\n throwError,\n catchError,\n distinctUntilChanged,\n map,\n shareReplay,\n take\n} from 'rxjs';\nimport { ɵINITIAL_STATE_TOKEN, ɵStateStream, ɵof } 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 throwError(() => 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 return computed<T>(() => selectorFn(this._stateStream.state()));\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 { 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\n private _initStateHasBeenDispatched?: boolean;\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 if (instance.ngxsOnInit) {\n instance.ngxsOnInit(this._getStateContext(mappedStore));\n }\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 if (instance.ngxsAfterBootstrap) {\n instance.ngxsAfterBootstrap(this._getStateContext(mappedStore));\n }\n }\n }\n\n private _getStateContext(mappedStore: MappedStore): StateContext<any> {\n return this._stateContextFactory.createStateContext(mappedStore.path);\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 { Observable } from 'rxjs';\nimport { ɵExtractTokenType, StateToken } from '@ngxs/store/internals';\n\nimport { propGetter } from '../../internal/internals';\nimport { SelectFactory } from './select-factory';\nimport { throwSelectFactoryNotConnectedError } from '../../configs/messages.config';\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 (target && (<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 (originalFn && 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 { 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 { ɵ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 */\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';\nimport { ɵdefineProperty } from '@ngxs/store/internals';\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 ɵdefineProperty(accumulator, key, {\n enumerable: true,\n value: store.selectSignal(selector)\n });\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 { Observable } from 'rxjs';\nimport { ɵdefineProperty } from '@ngxs/store/internals';\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 ɵdefineProperty(accumulator, key, {\n enumerable: true,\n value: dispatch(ActionType)\n });\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 { 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":["ɵwrapObserverCalls","ɵOrderedSubject","ɵStateStream","ɵof","ɵhasOwnProperty","ɵmemoize","ɵgetStoreMetadata","ɵgetSelectorMetadata","ɵMETA_KEY","ɵINITIAL_STATE_TOKEN","ɵNgxsActionRegistry","ɵisPromise","i1.Store","i2.NgxsConfig","ɵNgxsAppBootstrappedState","ɵensureStoreMetadata","ɵMETA_OPTIONS_KEY","ɵensureSelectorMetadata","ɵisPluginClass","ɵdefineProperty","ɵNGXS_STATE_CONTEXT_FACTORY","ɵNGXS_STATE_FACTORY"],"mappings":";;;;;;;;;MAIa,aAAa,CAAA;AAYxB,IAAA,WAAA,GAAA;QAXS,IAAO,CAAA,OAAA,GAAmB,EAAE;AAEpB,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,aAAa,EAAE;AACtD,YAAA,QAAQ,EAAE,IAAI;AACd,YAAA,QAAQ,EAAE;AACX,SAAA,CAAC;AAEe,QAAA,IAAA,CAAA,eAAe,GAAG,MAAM,CAAe,YAAY,EAAE;AACpE,YAAA,QAAQ,EAAE;AACX,SAAA,CAAC;QAGA,IAAI,CAAC,gBAAgB,EAAE;;AAGzB,IAAA,IAAY,YAAY,GAAA;QACtB,OAAO,IAAI,CAAC,cAAc,EAAE,OAAO,IAAI,IAAI,CAAC,OAAO;;IAG7C,gBAAgB,GAAA;AACtB,Q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W,EAAE,CAAC,GAAG,EAAE,UAAU,CAAC,KAAI;AACzE,QAAAA,eAAe,CAAC,WAAW,EAAE,GAAG,EAAE;AAChC,YAAA,UAAU,EAAE,IAAI;AAChB,YAAA,KAAK,EAAE,QAAQ,CAAC,UAAU;AAC3B,SAAA,CAAC;AACF,QAAA,OAAO,WAAW;KACnB,EAAE,EAAE,CAQJ;AACH;;ACnBA;AACA;AACA;SACgB,+BAA+B,GAAA;AAC7C,IAAA,OAAO,wBAAwB,CAAC;AAC9B,QAAA;AACE,YAAA,OAAO,EAAEC,2BAA2B;AACpC,YAAA,WAAW,EAAE;AACd,SAAA;AACD,QAAA;AACE,YAAA,OAAO,EAAEC,mBAAmB;AAC5B,YAAA,WAAW,EAAE;AACd;AACF,KAAA,CAAC;AACJ;;ACpBA;;AAEG;;ACFH;;AAEG;;;;"}
|
package/internals/index.d.ts
CHANGED
|
@@ -206,4 +206,14 @@ declare function ɵof<T>(value: T): Observable<T>;
|
|
|
206
206
|
declare const ɵhasOwnProperty: (target: any, key: PropertyKey) => boolean;
|
|
207
207
|
declare const ɵdefineProperty: <T>(o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType<any>) => T;
|
|
208
208
|
|
|
209
|
-
|
|
209
|
+
type ActionHandlerFn = (action: any) => Observable<unknown>;
|
|
210
|
+
declare class ɵNgxsActionRegistry {
|
|
211
|
+
private readonly _actionTypeToHandlersMap;
|
|
212
|
+
constructor();
|
|
213
|
+
get(type: string): Set<ActionHandlerFn> | undefined;
|
|
214
|
+
register(type: string, handler: ActionHandlerFn): () => void;
|
|
215
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ɵNgxsActionRegistry, never>;
|
|
216
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ɵNgxsActionRegistry>;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
export { StateToken, type ɵActionHandlerMetaData, type ɵActionOptions, type ɵExtractTokenType, ɵINITIAL_STATE_TOKEN, ɵInitialState, ɵMETA_KEY, ɵMETA_OPTIONS_KEY, type ɵMetaDataModel, ɵNGXS_STATE_CONTEXT_FACTORY, ɵNGXS_STATE_FACTORY, ɵNgxsActionRegistry, ɵNgxsAppBootstrappedState, ɵOrderedBehaviorSubject, ɵOrderedSubject, type ɵPlainObject, type ɵPlainObjectOf, type ɵRuntimeSelectorContext, ɵSELECTOR_META_KEY, type ɵSelectFromRootState, type ɵSelectorFactory, type ɵSelectorMetaDataModel, type ɵSharedSelectorOptions, type ɵStateClass, type ɵStateClassInternal, ɵStateStream, type ɵStateToken, type ɵStoreOptions, type ɵTokenName, ɵdefineProperty, ɵensureSelectorMetadata, ɵensureStoreMetadata, ɵgetSelectorMetadata, ɵgetStoreMetadata, ɵhasOwnProperty, ɵmemoize, ɵof, ɵwrapObserverCalls };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ngxs/store",
|
|
3
|
-
"version": "19.0.0-dev.master-
|
|
3
|
+
"version": "19.0.0-dev.master-287dcb1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"peerDependencies": {
|
|
@@ -26,14 +26,14 @@
|
|
|
26
26
|
"types": "./internals/index.d.ts",
|
|
27
27
|
"default": "./fesm2022/ngxs-store-internals.mjs"
|
|
28
28
|
},
|
|
29
|
-
"./plugins": {
|
|
30
|
-
"types": "./plugins/index.d.ts",
|
|
31
|
-
"default": "./fesm2022/ngxs-store-plugins.mjs"
|
|
32
|
-
},
|
|
33
29
|
"./operators": {
|
|
34
30
|
"types": "./operators/index.d.ts",
|
|
35
31
|
"default": "./fesm2022/ngxs-store-operators.mjs"
|
|
36
32
|
},
|
|
33
|
+
"./plugins": {
|
|
34
|
+
"types": "./plugins/index.d.ts",
|
|
35
|
+
"default": "./fesm2022/ngxs-store-plugins.mjs"
|
|
36
|
+
},
|
|
37
37
|
"./internals/testing": {
|
|
38
38
|
"types": "./internals/testing/index.d.ts",
|
|
39
39
|
"default": "./fesm2022/ngxs-store-internals-testing.mjs"
|