{"ast":null,"code":"import * as i0 from '@angular/core';\nimport { Injectable, InjectionToken, Inject, isDevMode, NgModule, Optional, SkipSelf, Injector } from '@angular/core';\nimport { BehaviorSubject, Observable, Subject, queueScheduler } from 'rxjs';\nimport { observeOn, withLatestFrom, scan, pluck, map, distinctUntilChanged } from 'rxjs/operators';\nconst REGISTERED_ACTION_TYPES = {};\n\nfunction resetRegisteredActionTypes() {\n  for (const key of Object.keys(REGISTERED_ACTION_TYPES)) {\n    delete REGISTERED_ACTION_TYPES[key];\n  }\n}\n/**\n * @description\n * Creates a configured `Creator` function that, when called, returns an object in the shape of the `Action` interface.\n *\n * Action creators reduce the explicitness of class-based action creators.\n *\n * @param type Describes the action that will be dispatched\n * @param config Additional metadata needed for the handling of the action.  See {@link createAction#usage-notes Usage Notes}.\n *\n * @usageNotes\n *\n * **Declaring an action creator**\n *\n * Without additional metadata:\n * ```ts\n * export const increment = createAction('[Counter] Increment');\n * ```\n * With additional metadata:\n * ```ts\n * export const loginSuccess = createAction(\n *   '[Auth/API] Login Success',\n *   props<{ user: User }>()\n * );\n * ```\n * With a function:\n * ```ts\n * export const loginSuccess = createAction(\n *   '[Auth/API] Login Success',\n *   (response: Response) => response.user\n * );\n * ```\n *\n * **Dispatching an action**\n *\n * Without additional metadata:\n * ```ts\n * store.dispatch(increment());\n * ```\n * With additional metadata:\n * ```ts\n * store.dispatch(loginSuccess({ user: newUser }));\n * ```\n *\n * **Referencing an action in a reducer**\n *\n * Using a switch statement:\n * ```ts\n * switch (action.type) {\n *   // ...\n *   case AuthApiActions.loginSuccess.type: {\n *     return {\n *       ...state,\n *       user: action.user\n *     };\n *   }\n * }\n * ```\n * Using a reducer creator:\n * ```ts\n * on(AuthApiActions.loginSuccess, (state, { user }) => ({ ...state, user }))\n * ```\n *\n *  **Referencing an action in an effect**\n * ```ts\n * effectName$ = createEffect(\n *   () => this.actions$.pipe(\n *     ofType(AuthApiActions.loginSuccess),\n *     // ...\n *   )\n * );\n * ```\n */\n\n\nfunction createAction(type, config) {\n  REGISTERED_ACTION_TYPES[type] = (REGISTERED_ACTION_TYPES[type] || 0) + 1;\n\n  if (typeof config === 'function') {\n    return defineType(type, (...args) => Object.assign(Object.assign({}, config(...args)), {\n      type\n    }));\n  }\n\n  const as = config ? config._as : 'empty';\n\n  switch (as) {\n    case 'empty':\n      return defineType(type, () => ({\n        type\n      }));\n\n    case 'props':\n      return defineType(type, props => Object.assign(Object.assign({}, props), {\n        type\n      }));\n\n    default:\n      throw new Error('Unexpected config.');\n  }\n}\n\nfunction props() {\n  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/naming-convention\n  return {\n    _as: 'props',\n    _p: undefined\n  };\n}\n\nfunction union(creators) {\n  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n  return undefined;\n}\n\nfunction defineType(type, creator) {\n  return Object.defineProperty(creator, 'type', {\n    value: type,\n    writable: false\n  });\n}\n\nconst INIT = '@ngrx/store/init';\n\nclass ActionsSubject extends BehaviorSubject {\n  constructor() {\n    super({\n      type: INIT\n    });\n  }\n\n  next(action) {\n    if (typeof action === 'function') {\n      throw new TypeError(`\n        Dispatch expected an object, instead it received a function.\n        If you're using the createAction function, make sure to invoke the function\n        before dispatching the action. For example, someAction should be someAction().`);\n    } else if (typeof action === 'undefined') {\n      throw new TypeError(`Actions must be objects`);\n    } else if (typeof action.type === 'undefined') {\n      throw new TypeError(`Actions must have a type property`);\n    }\n\n    super.next(action);\n  }\n\n  complete() {\n    /* noop */\n  }\n\n  ngOnDestroy() {\n    super.complete();\n  }\n\n}\n/** @nocollapse */\n\n/** @nocollapse */\n\n\nActionsSubject.ɵfac = function ActionsSubject_Factory(t) {\n  return new (t || ActionsSubject)();\n};\n/** @nocollapse */\n\n/** @nocollapse */\n\n\nActionsSubject.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n  token: ActionsSubject,\n  factory: ActionsSubject.ɵfac\n});\n\n(function () {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && i0.ɵsetClassMetadata(ActionsSubject, [{\n    type: Injectable\n  }], function () {\n    return [];\n  }, null);\n})();\n\nconst ACTIONS_SUBJECT_PROVIDERS = [ActionsSubject];\n\nconst _ROOT_STORE_GUARD = new InjectionToken('@ngrx/store Internal Root Guard');\n\nconst _INITIAL_STATE = new InjectionToken('@ngrx/store Internal Initial State');\n\nconst INITIAL_STATE = new InjectionToken('@ngrx/store Initial State');\nconst REDUCER_FACTORY = new InjectionToken('@ngrx/store Reducer Factory');\n\nconst _REDUCER_FACTORY = new InjectionToken('@ngrx/store Internal Reducer Factory Provider');\n\nconst INITIAL_REDUCERS = new InjectionToken('@ngrx/store Initial Reducers');\n\nconst _INITIAL_REDUCERS = new InjectionToken('@ngrx/store Internal Initial Reducers');\n\nconst STORE_FEATURES = new InjectionToken('@ngrx/store Store Features');\n\nconst _STORE_REDUCERS = new InjectionToken('@ngrx/store Internal Store Reducers');\n\nconst _FEATURE_REDUCERS = new InjectionToken('@ngrx/store Internal Feature Reducers');\n\nconst _FEATURE_CONFIGS = new InjectionToken('@ngrx/store Internal Feature Configs');\n\nconst _STORE_FEATURES = new InjectionToken('@ngrx/store Internal Store Features');\n\nconst _FEATURE_REDUCERS_TOKEN = new InjectionToken('@ngrx/store Internal Feature Reducers Token');\n\nconst FEATURE_REDUCERS = new InjectionToken('@ngrx/store Feature Reducers');\n/**\n * User-defined meta reducers from StoreModule.forRoot()\n */\n\nconst USER_PROVIDED_META_REDUCERS = new InjectionToken('@ngrx/store User Provided Meta Reducers');\n/**\n * Meta reducers defined either internally by @ngrx/store or by library authors\n */\n\nconst META_REDUCERS = new InjectionToken('@ngrx/store Meta Reducers');\n/**\n * Concats the user provided meta reducers and the meta reducers provided on the multi\n * injection token\n */\n\nconst _RESOLVED_META_REDUCERS = new InjectionToken('@ngrx/store Internal Resolved Meta Reducers');\n/**\n * Runtime checks defined by the user via an InjectionToken\n * Defaults to `_USER_RUNTIME_CHECKS`\n */\n\n\nconst USER_RUNTIME_CHECKS = new InjectionToken('@ngrx/store User Runtime Checks Config');\n/**\n * Runtime checks defined by the user via forRoot()\n */\n\nconst _USER_RUNTIME_CHECKS = new InjectionToken('@ngrx/store Internal User Runtime Checks Config');\n/**\n * Runtime checks currently in use\n */\n\n\nconst ACTIVE_RUNTIME_CHECKS = new InjectionToken('@ngrx/store Internal Runtime Checks');\n\nconst _ACTION_TYPE_UNIQUENESS_CHECK = new InjectionToken('@ngrx/store Check if Action types are unique');\n/**\n * @description\n * Combines reducers for individual features into a single reducer.\n *\n * You can use this function to delegate handling of state transitions to multiple reducers, each acting on their\n * own sub-state within the root state.\n *\n * @param reducers An object mapping keys of the root state to their corresponding feature reducer.\n * @param initialState Provides a state value if the current state is `undefined`, as it is initially.\n * @returns A reducer function.\n *\n * @usageNotes\n *\n * **Example combining two feature reducers into one \"root\" reducer**\n *\n * ```ts\n * export const reducer = combineReducers({\n *   featureA: featureAReducer,\n *   featureB: featureBReducer\n * });\n * ```\n *\n * You can also override the initial states of the sub-features:\n * ```ts\n * export const reducer = combineReducers({\n *   featureA: featureAReducer,\n *   featureB: featureBReducer\n * }, {\n *   featureA: { counterA: 13 },\n *   featureB: { counterB: 37 }\n * });\n * ```\n */\n\n\nfunction combineReducers(reducers, initialState = {}) {\n  const reducerKeys = Object.keys(reducers);\n  const finalReducers = {};\n\n  for (let i = 0; i < reducerKeys.length; i++) {\n    const key = reducerKeys[i];\n\n    if (typeof reducers[key] === 'function') {\n      finalReducers[key] = reducers[key];\n    }\n  }\n\n  const finalReducerKeys = Object.keys(finalReducers);\n  return function combination(state, action) {\n    state = state === undefined ? initialState : state;\n    let hasChanged = false;\n    const nextState = {};\n\n    for (let i = 0; i < finalReducerKeys.length; i++) {\n      const key = finalReducerKeys[i];\n      const reducer = finalReducers[key];\n      const previousStateForKey = state[key];\n      const nextStateForKey = reducer(previousStateForKey, action);\n      nextState[key] = nextStateForKey;\n      hasChanged = hasChanged || nextStateForKey !== previousStateForKey;\n    }\n\n    return hasChanged ? nextState : state;\n  };\n}\n\nfunction omit(object, keyToRemove) {\n  return Object.keys(object).filter(key => key !== keyToRemove).reduce((result, key) => Object.assign(result, {\n    [key]: object[key]\n  }), {});\n}\n\nfunction compose(...functions) {\n  return function (arg) {\n    if (functions.length === 0) {\n      return arg;\n    }\n\n    const last = functions[functions.length - 1];\n    const rest = functions.slice(0, -1);\n    return rest.reduceRight((composed, fn) => fn(composed), last(arg));\n  };\n}\n\nfunction createReducerFactory(reducerFactory, metaReducers) {\n  if (Array.isArray(metaReducers) && metaReducers.length > 0) {\n    reducerFactory = compose.apply(null, [...metaReducers, reducerFactory]);\n  }\n\n  return (reducers, initialState) => {\n    const reducer = reducerFactory(reducers);\n    return (state, action) => {\n      state = state === undefined ? initialState : state;\n      return reducer(state, action);\n    };\n  };\n}\n\nfunction createFeatureReducerFactory(metaReducers) {\n  const reducerFactory = Array.isArray(metaReducers) && metaReducers.length > 0 ? compose(...metaReducers) : r => r;\n  return (reducer, initialState) => {\n    reducer = reducerFactory(reducer);\n    return (state, action) => {\n      state = state === undefined ? initialState : state;\n      return reducer(state, action);\n    };\n  };\n}\n\nclass ReducerObservable extends Observable {}\n\nclass ReducerManagerDispatcher extends ActionsSubject {}\n\nconst UPDATE = '@ngrx/store/update-reducers';\n\nclass ReducerManager extends BehaviorSubject {\n  constructor(dispatcher, initialState, reducers, reducerFactory) {\n    super(reducerFactory(reducers, initialState));\n    this.dispatcher = dispatcher;\n    this.initialState = initialState;\n    this.reducers = reducers;\n    this.reducerFactory = reducerFactory;\n  }\n\n  get currentReducers() {\n    return this.reducers;\n  }\n\n  addFeature(feature) {\n    this.addFeatures([feature]);\n  }\n\n  addFeatures(features) {\n    const reducers = features.reduce((reducerDict, {\n      reducers,\n      reducerFactory,\n      metaReducers,\n      initialState,\n      key\n    }) => {\n      const reducer = typeof reducers === 'function' ? createFeatureReducerFactory(metaReducers)(reducers, initialState) : createReducerFactory(reducerFactory, metaReducers)(reducers, initialState);\n      reducerDict[key] = reducer;\n      return reducerDict;\n    }, {});\n    this.addReducers(reducers);\n  }\n\n  removeFeature(feature) {\n    this.removeFeatures([feature]);\n  }\n\n  removeFeatures(features) {\n    this.removeReducers(features.map(p => p.key));\n  }\n\n  addReducer(key, reducer) {\n    this.addReducers({\n      [key]: reducer\n    });\n  }\n\n  addReducers(reducers) {\n    this.reducers = Object.assign(Object.assign({}, this.reducers), reducers);\n    this.updateReducers(Object.keys(reducers));\n  }\n\n  removeReducer(featureKey) {\n    this.removeReducers([featureKey]);\n  }\n\n  removeReducers(featureKeys) {\n    featureKeys.forEach(key => {\n      this.reducers = omit(this.reducers, key)\n      /*TODO(#823)*/\n      ;\n    });\n    this.updateReducers(featureKeys);\n  }\n\n  updateReducers(featureKeys) {\n    this.next(this.reducerFactory(this.reducers, this.initialState));\n    this.dispatcher.next({\n      type: UPDATE,\n      features: featureKeys\n    });\n  }\n\n  ngOnDestroy() {\n    this.complete();\n  }\n\n}\n/** @nocollapse */\n\n/** @nocollapse */\n\n\nReducerManager.ɵfac = function ReducerManager_Factory(t) {\n  return new (t || ReducerManager)(i0.ɵɵinject(ReducerManagerDispatcher), i0.ɵɵinject(INITIAL_STATE), i0.ɵɵinject(INITIAL_REDUCERS), i0.ɵɵinject(REDUCER_FACTORY));\n};\n/** @nocollapse */\n\n/** @nocollapse */\n\n\nReducerManager.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n  token: ReducerManager,\n  factory: ReducerManager.ɵfac\n});\n\n(function () {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && i0.ɵsetClassMetadata(ReducerManager, [{\n    type: Injectable\n  }], function () {\n    return [{\n      type: ReducerManagerDispatcher\n    }, {\n      type: undefined,\n      decorators: [{\n        type: Inject,\n        args: [INITIAL_STATE]\n      }]\n    }, {\n      type: undefined,\n      decorators: [{\n        type: Inject,\n        args: [INITIAL_REDUCERS]\n      }]\n    }, {\n      type: undefined,\n      decorators: [{\n        type: Inject,\n        args: [REDUCER_FACTORY]\n      }]\n    }];\n  }, null);\n})();\n\nconst REDUCER_MANAGER_PROVIDERS = [ReducerManager, {\n  provide: ReducerObservable,\n  useExisting: ReducerManager\n}, {\n  provide: ReducerManagerDispatcher,\n  useExisting: ActionsSubject\n}];\n\nclass ScannedActionsSubject extends Subject {\n  ngOnDestroy() {\n    this.complete();\n  }\n\n}\n/** @nocollapse */\n\n/** @nocollapse */\n\n\nScannedActionsSubject.ɵfac = /* @__PURE__ */function () {\n  let ɵScannedActionsSubject_BaseFactory;\n  return function ScannedActionsSubject_Factory(t) {\n    return (ɵScannedActionsSubject_BaseFactory || (ɵScannedActionsSubject_BaseFactory = i0.ɵɵgetInheritedFactory(ScannedActionsSubject)))(t || ScannedActionsSubject);\n  };\n}();\n/** @nocollapse */\n\n/** @nocollapse */\n\n\nScannedActionsSubject.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n  token: ScannedActionsSubject,\n  factory: ScannedActionsSubject.ɵfac\n});\n\n(function () {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && i0.ɵsetClassMetadata(ScannedActionsSubject, [{\n    type: Injectable\n  }], null, null);\n})();\n\nconst SCANNED_ACTIONS_SUBJECT_PROVIDERS = [ScannedActionsSubject];\n\nclass StateObservable extends Observable {}\n\nclass State extends BehaviorSubject {\n  constructor(actions$, reducer$, scannedActions, initialState) {\n    super(initialState);\n    const actionsOnQueue$ = actions$.pipe(observeOn(queueScheduler));\n    const withLatestReducer$ = actionsOnQueue$.pipe(withLatestFrom(reducer$));\n    const seed = {\n      state: initialState\n    };\n    const stateAndAction$ = withLatestReducer$.pipe(scan(reduceState, seed));\n    this.stateSubscription = stateAndAction$.subscribe(({\n      state,\n      action\n    }) => {\n      this.next(state);\n      scannedActions.next(action);\n    });\n  }\n\n  ngOnDestroy() {\n    this.stateSubscription.unsubscribe();\n    this.complete();\n  }\n\n}\n\nState.INIT = INIT;\n/** @nocollapse */\n\n/** @nocollapse */\n\nState.ɵfac = function State_Factory(t) {\n  return new (t || State)(i0.ɵɵinject(ActionsSubject), i0.ɵɵinject(ReducerObservable), i0.ɵɵinject(ScannedActionsSubject), i0.ɵɵinject(INITIAL_STATE));\n};\n/** @nocollapse */\n\n/** @nocollapse */\n\n\nState.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n  token: State,\n  factory: State.ɵfac\n});\n\n(function () {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && i0.ɵsetClassMetadata(State, [{\n    type: Injectable\n  }], function () {\n    return [{\n      type: ActionsSubject\n    }, {\n      type: ReducerObservable\n    }, {\n      type: ScannedActionsSubject\n    }, {\n      type: undefined,\n      decorators: [{\n        type: Inject,\n        args: [INITIAL_STATE]\n      }]\n    }];\n  }, null);\n})();\n\nfunction reduceState(stateActionPair = {\n  state: undefined\n}, [action, reducer]) {\n  const {\n    state\n  } = stateActionPair;\n  return {\n    state: reducer(state, action),\n    action\n  };\n}\n\nconst STATE_PROVIDERS = [State, {\n  provide: StateObservable,\n  useExisting: State\n}];\n/* eslint-disable @typescript-eslint/naming-convention */\n\nclass Store extends Observable {\n  constructor(state$, actionsObserver, reducerManager) {\n    super();\n    this.actionsObserver = actionsObserver;\n    this.reducerManager = reducerManager;\n    this.source = state$;\n  }\n\n  select(pathOrMapFn, ...paths) {\n    return select.call(null, pathOrMapFn, ...paths)(this);\n  }\n\n  lift(operator) {\n    const store = new Store(this, this.actionsObserver, this.reducerManager);\n    store.operator = operator;\n    return store;\n  }\n\n  dispatch(action) {\n    this.actionsObserver.next(action);\n  }\n\n  next(action) {\n    this.actionsObserver.next(action);\n  }\n\n  error(err) {\n    this.actionsObserver.error(err);\n  }\n\n  complete() {\n    this.actionsObserver.complete();\n  }\n\n  addReducer(key, reducer) {\n    this.reducerManager.addReducer(key, reducer);\n  }\n\n  removeReducer(key) {\n    this.reducerManager.removeReducer(key);\n  }\n\n}\n/** @nocollapse */\n\n/** @nocollapse */\n\n\nStore.ɵfac = function Store_Factory(t) {\n  return new (t || Store)(i0.ɵɵinject(StateObservable), i0.ɵɵinject(ActionsSubject), i0.ɵɵinject(ReducerManager));\n};\n/** @nocollapse */\n\n/** @nocollapse */\n\n\nStore.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n  token: Store,\n  factory: Store.ɵfac\n});\n\n(function () {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && i0.ɵsetClassMetadata(Store, [{\n    type: Injectable\n  }], function () {\n    return [{\n      type: StateObservable\n    }, {\n      type: ActionsSubject\n    }, {\n      type: ReducerManager\n    }];\n  }, null);\n})();\n\nconst STORE_PROVIDERS = [Store];\n\nfunction select(pathOrMapFn, propsOrPath, ...paths) {\n  return function selectOperator(source$) {\n    let mapped$;\n\n    if (typeof pathOrMapFn === 'string') {\n      const pathSlices = [propsOrPath, ...paths].filter(Boolean);\n      mapped$ = source$.pipe(pluck(pathOrMapFn, ...pathSlices));\n    } else if (typeof pathOrMapFn === 'function') {\n      mapped$ = source$.pipe(map(source => pathOrMapFn(source, propsOrPath)));\n    } else {\n      throw new TypeError(`Unexpected type '${typeof pathOrMapFn}' in select operator,` + ` expected 'string' or 'function'`);\n    }\n\n    return mapped$.pipe(distinctUntilChanged());\n  };\n}\n\nfunction capitalize(text) {\n  return text.charAt(0).toUpperCase() + text.substr(1);\n}\n\nconst RUNTIME_CHECK_URL = 'https://ngrx.io/guide/store/configuration/runtime-checks';\n\nfunction isUndefined(target) {\n  return target === undefined;\n}\n\nfunction isNull(target) {\n  return target === null;\n}\n\nfunction isArray(target) {\n  return Array.isArray(target);\n}\n\nfunction isString(target) {\n  return typeof target === 'string';\n}\n\nfunction isBoolean(target) {\n  return typeof target === 'boolean';\n}\n\nfunction isNumber(target) {\n  return typeof target === 'number';\n}\n\nfunction isObjectLike(target) {\n  return typeof target === 'object' && target !== null;\n}\n\nfunction isObject(target) {\n  return isObjectLike(target) && !isArray(target);\n}\n\nfunction isPlainObject(target) {\n  if (!isObject(target)) {\n    return false;\n  }\n\n  const targetPrototype = Object.getPrototypeOf(target);\n  return targetPrototype === Object.prototype || targetPrototype === null;\n}\n\nfunction isFunction(target) {\n  return typeof target === 'function';\n}\n\nfunction isComponent(target) {\n  return isFunction(target) && target.hasOwnProperty('ɵcmp');\n}\n\nfunction hasOwnProperty(target, propertyName) {\n  return Object.prototype.hasOwnProperty.call(target, propertyName);\n}\n\nlet _ngrxMockEnvironment = false;\n\nfunction setNgrxMockEnvironment(value) {\n  _ngrxMockEnvironment = value;\n}\n\nfunction isNgrxMockEnvironment() {\n  return _ngrxMockEnvironment;\n}\n\nfunction isEqualCheck(a, b) {\n  return a === b;\n}\n\nfunction isArgumentsChanged(args, lastArguments, comparator) {\n  for (let i = 0; i < args.length; i++) {\n    if (!comparator(args[i], lastArguments[i])) {\n      return true;\n    }\n  }\n\n  return false;\n}\n\nfunction resultMemoize(projectionFn, isResultEqual) {\n  return defaultMemoize(projectionFn, isEqualCheck, isResultEqual);\n}\n\nfunction defaultMemoize(projectionFn, isArgumentsEqual = isEqualCheck, isResultEqual = isEqualCheck) {\n  let lastArguments = null; // eslint-disable-next-line @typescript-eslint/no-explicit-any, , , , ,\n\n  let lastResult = null;\n  let overrideResult;\n\n  function reset() {\n    lastArguments = null;\n    lastResult = null;\n  }\n\n  function setResult(result = undefined) {\n    overrideResult = {\n      result\n    };\n  }\n\n  function clearResult() {\n    overrideResult = undefined;\n  }\n  /* eslint-disable prefer-rest-params, prefer-spread */\n  // disabled because of the use of `arguments`\n\n\n  function memoized() {\n    if (overrideResult !== undefined) {\n      return overrideResult.result;\n    }\n\n    if (!lastArguments) {\n      lastResult = projectionFn.apply(null, arguments);\n      lastArguments = arguments;\n      return lastResult;\n    }\n\n    if (!isArgumentsChanged(arguments, lastArguments, isArgumentsEqual)) {\n      return lastResult;\n    }\n\n    const newResult = projectionFn.apply(null, arguments);\n    lastArguments = arguments;\n\n    if (isResultEqual(lastResult, newResult)) {\n      return lastResult;\n    }\n\n    lastResult = newResult;\n    return newResult;\n  }\n\n  return {\n    memoized,\n    reset,\n    setResult,\n    clearResult\n  };\n}\n\nfunction createSelector(...input) {\n  return createSelectorFactory(defaultMemoize)(...input);\n}\n\nfunction defaultStateFn(state, selectors, props, memoizedProjector) {\n  if (props === undefined) {\n    const args = selectors.map(fn => fn(state));\n    return memoizedProjector.memoized.apply(null, args);\n  }\n\n  const args = selectors.map(fn => fn(state, props));\n  return memoizedProjector.memoized.apply(null, [...args, props]);\n}\n/**\n *\n * @param memoize The function used to memoize selectors\n * @param options Config Object that may include a `stateFn` function defining how to return the selector's value, given the entire `Store`'s state, parent `Selector`s, `Props`, and a `MemoizedProjection`\n *\n * @usageNotes\n *\n * **Creating a Selector Factory Where Array Order Does Not Matter**\n *\n * ```ts\n * function removeMatch(arr: string[], target: string): string[] {\n *   const matchIndex = arr.indexOf(target);\n *   return [...arr.slice(0, matchIndex), ...arr.slice(matchIndex + 1)];\n * }\n *\n * function orderDoesNotMatterComparer(a: any, b: any): boolean {\n *   if (!Array.isArray(a) || !Array.isArray(b)) {\n *     return a === b;\n *   }\n *   if (a.length !== b.length) {\n *     return false;\n *   }\n *   let tempB = [...b];\n *   function reduceToDetermineIfArraysContainSameContents(\n *     previousCallResult: boolean,\n *     arrayMember: any\n *   ): boolean {\n *     if (previousCallResult === false) {\n *       return false;\n *     }\n *     if (tempB.includes(arrayMember)) {\n *       tempB = removeMatch(tempB, arrayMember);\n *       return true;\n *     }\n *     return false;\n *   }\n *   return a.reduce(reduceToDetermineIfArraysContainSameContents, true);\n * }\n *\n * export const creactOrderDoesNotMatterSelector = createSelectorFactory(\n *   (projectionFun) => defaultMemoize(\n *     projectionFun,\n *     orderDoesNotMatterComparer,\n *     orderDoesNotMatterComparer\n *   )\n * );\n * ```\n *\n * **Creating an Alternative Memoization Strategy**\n *\n * ```ts\n * function serialize(x: any): string {\n *   return JSON.stringify(x);\n * }\n *\n * export const createFullHistorySelector = createSelectorFactory(\n *  (projectionFunction) => {\n *    const cache = {};\n *\n *    function memoized() {\n *      const serializedArguments = serialize(...arguments);\n *       if (cache[serializedArguments] != null) {\n *         cache[serializedArguments] = projectionFunction.apply(null, arguments);\n *       }\n *       return cache[serializedArguments];\n *     }\n *     return {\n *       memoized,\n *       reset: () => {},\n *       setResult: () => {},\n *       clearResult: () => {},\n *     };\n *   }\n * );\n * ```\n *\n *\n */\n\n\nfunction createSelectorFactory(memoize, options = {\n  stateFn: defaultStateFn\n}) {\n  return function (...input) {\n    let args = input;\n\n    if (Array.isArray(args[0])) {\n      const [head, ...tail] = args;\n      args = [...head, ...tail];\n    }\n\n    const selectors = args.slice(0, args.length - 1);\n    const projector = args[args.length - 1];\n    const memoizedSelectors = selectors.filter(selector => selector.release && typeof selector.release === 'function');\n    const memoizedProjector = memoize(function (...selectors) {\n      return projector.apply(null, selectors);\n    });\n    const memoizedState = defaultMemoize(function (state, props) {\n      return options.stateFn.apply(null, [state, selectors, props, memoizedProjector]);\n    });\n\n    function release() {\n      memoizedState.reset();\n      memoizedProjector.reset();\n      memoizedSelectors.forEach(selector => selector.release());\n    }\n\n    return Object.assign(memoizedState.memoized, {\n      release,\n      projector: memoizedProjector.memoized,\n      setResult: memoizedState.setResult,\n      clearResult: memoizedState.clearResult\n    });\n  };\n}\n\nfunction createFeatureSelector(featureName) {\n  return createSelector(state => {\n    const featureState = state[featureName];\n\n    if (!isNgrxMockEnvironment() && isDevMode() && !(featureName in state)) {\n      console.warn(`@ngrx/store: The feature name \"${featureName}\" does ` + 'not exist in the state, therefore createFeatureSelector ' + 'cannot access it.  Be sure it is imported in a loaded module ' + `using StoreModule.forRoot('${featureName}', ...) or ` + `StoreModule.forFeature('${featureName}', ...).  If the default ` + 'state is intended to be undefined, as is the case with router ' + 'state, this development-only warning message can be ignored.');\n    }\n\n    return featureState;\n  }, featureState => featureState);\n}\n/**\n * @description\n * A function that accepts a feature name and a feature reducer, and creates\n * a feature selector and a selector for each feature state property.\n *\n * @param featureConfig An object that contains a feature name and a feature reducer.\n * @returns An object that contains a feature name, a feature reducer,\n * a feature selector, and a selector for each feature state property.\n *\n * @usageNotes\n *\n * **With Application State**\n *\n * ```ts\n * interface AppState {\n *   products: ProductsState;\n * }\n *\n * interface ProductsState {\n *   products: Product[];\n *   selectedId: string | null;\n * }\n *\n * const initialState: ProductsState = {\n *   products: [],\n *   selectedId: null,\n * };\n *\n * // AppState is passed as a generic argument\n * const productsFeature = createFeature<AppState>({\n *   name: 'products',\n *   reducer: createReducer(\n *     initialState,\n *     on(ProductsApiActions.loadSuccess(state, { products }) => ({\n *       ...state,\n *       products,\n *     }),\n *   ),\n * });\n *\n * const {\n *   selectProductsState, // type: MemoizedSelector<AppState, ProductsState>\n *   selectProducts, // type: MemoizedSelector<AppState, Product[]>\n *   selectSelectedId, // type: MemoizedSelector<AppState, string | null>\n * } = productsFeature;\n * ```\n *\n * **Without Application State**\n *\n * ```ts\n * const productsFeature = createFeature({\n *   name: 'products',\n *   reducer: createReducer(initialState),\n * });\n *\n * const {\n *   selectProductsState, // type: MemoizedSelector<Record<string, any>, ProductsState>\n *   selectProducts, // type: MemoizedSelector<Record<string, any>, Product[]>\n *   selectSelectedId, // type: MemoizedSelector<Record<string, any, string | null>\n * } = productsFeature;\n * ```\n */\n\n\nfunction createFeature(featureConfig) {\n  const {\n    name,\n    reducer\n  } = featureConfig;\n  const featureSelector = createFeatureSelector(name);\n  const nestedSelectors = createNestedSelectors(featureSelector, reducer);\n  return Object.assign({\n    name,\n    reducer,\n    [`select${capitalize(name)}State`]: featureSelector\n  }, nestedSelectors);\n}\n\nfunction createNestedSelectors(featureSelector, reducer) {\n  const initialState = getInitialState(reducer);\n  const nestedKeys = isPlainObject(initialState) ? Object.keys(initialState) : [];\n  return nestedKeys.reduce((nestedSelectors, nestedKey) => Object.assign(Object.assign({}, nestedSelectors), {\n    [`select${capitalize(nestedKey)}`]: createSelector(featureSelector, parentState => parentState === null || parentState === void 0 ? void 0 : parentState[nestedKey])\n  }), {});\n}\n\nfunction getInitialState(reducer) {\n  return reducer(undefined, {\n    type: '@ngrx/feature/init'\n  });\n}\n\nfunction immutabilityCheckMetaReducer(reducer, checks) {\n  return function (state, action) {\n    const act = checks.action(action) ? freeze(action) : action;\n    const nextState = reducer(state, act);\n    return checks.state() ? freeze(nextState) : nextState;\n  };\n}\n\nfunction freeze(target) {\n  Object.freeze(target);\n  const targetIsFunction = isFunction(target);\n  Object.getOwnPropertyNames(target).forEach(prop => {\n    // Ignore Ivy properties, ref: https://github.com/ngrx/platform/issues/2109#issuecomment-582689060\n    if (prop.startsWith('ɵ')) {\n      return;\n    }\n\n    if (hasOwnProperty(target, prop) && (targetIsFunction ? prop !== 'caller' && prop !== 'callee' && prop !== 'arguments' : true)) {\n      const propValue = target[prop];\n\n      if ((isObjectLike(propValue) || isFunction(propValue)) && !Object.isFrozen(propValue)) {\n        freeze(propValue);\n      }\n    }\n  });\n  return target;\n}\n\nfunction serializationCheckMetaReducer(reducer, checks) {\n  return function (state, action) {\n    if (checks.action(action)) {\n      const unserializableAction = getUnserializable(action);\n      throwIfUnserializable(unserializableAction, 'action');\n    }\n\n    const nextState = reducer(state, action);\n\n    if (checks.state()) {\n      const unserializableState = getUnserializable(nextState);\n      throwIfUnserializable(unserializableState, 'state');\n    }\n\n    return nextState;\n  };\n}\n\nfunction getUnserializable(target, path = []) {\n  // Guard against undefined and null, e.g. a reducer that returns undefined\n  if ((isUndefined(target) || isNull(target)) && path.length === 0) {\n    return {\n      path: ['root'],\n      value: target\n    };\n  }\n\n  const keys = Object.keys(target);\n  return keys.reduce((result, key) => {\n    if (result) {\n      return result;\n    }\n\n    const value = target[key]; // Ignore Ivy components\n\n    if (isComponent(value)) {\n      return result;\n    }\n\n    if (isUndefined(value) || isNull(value) || isNumber(value) || isBoolean(value) || isString(value) || isArray(value)) {\n      return false;\n    }\n\n    if (isPlainObject(value)) {\n      return getUnserializable(value, [...path, key]);\n    }\n\n    return {\n      path: [...path, key],\n      value\n    };\n  }, false);\n}\n\nfunction throwIfUnserializable(unserializable, context) {\n  if (unserializable === false) {\n    return;\n  }\n\n  const unserializablePath = unserializable.path.join('.');\n  const error = new Error(`Detected unserializable ${context} at \"${unserializablePath}\". ${RUNTIME_CHECK_URL}#strict${context}serializability`);\n  error.value = unserializable.value;\n  error.unserializablePath = unserializablePath;\n  throw error;\n}\n\nfunction inNgZoneAssertMetaReducer(reducer, checks) {\n  return function (state, action) {\n    if (checks.action(action) && !i0.NgZone.isInAngularZone()) {\n      throw new Error(`Action '${action.type}' running outside NgZone. ${RUNTIME_CHECK_URL}#strictactionwithinngzone`);\n    }\n\n    return reducer(state, action);\n  };\n}\n\nfunction createActiveRuntimeChecks(runtimeChecks) {\n  if (isDevMode()) {\n    return Object.assign({\n      strictStateSerializability: false,\n      strictActionSerializability: false,\n      strictStateImmutability: true,\n      strictActionImmutability: true,\n      strictActionWithinNgZone: false,\n      strictActionTypeUniqueness: false\n    }, runtimeChecks);\n  }\n\n  return {\n    strictStateSerializability: false,\n    strictActionSerializability: false,\n    strictStateImmutability: false,\n    strictActionImmutability: false,\n    strictActionWithinNgZone: false,\n    strictActionTypeUniqueness: false\n  };\n}\n\nfunction createSerializationCheckMetaReducer({\n  strictActionSerializability,\n  strictStateSerializability\n}) {\n  return reducer => strictActionSerializability || strictStateSerializability ? serializationCheckMetaReducer(reducer, {\n    action: action => strictActionSerializability && !ignoreNgrxAction(action),\n    state: () => strictStateSerializability\n  }) : reducer;\n}\n\nfunction createImmutabilityCheckMetaReducer({\n  strictActionImmutability,\n  strictStateImmutability\n}) {\n  return reducer => strictActionImmutability || strictStateImmutability ? immutabilityCheckMetaReducer(reducer, {\n    action: action => strictActionImmutability && !ignoreNgrxAction(action),\n    state: () => strictStateImmutability\n  }) : reducer;\n}\n\nfunction ignoreNgrxAction(action) {\n  return action.type.startsWith('@ngrx');\n}\n\nfunction createInNgZoneCheckMetaReducer({\n  strictActionWithinNgZone\n}) {\n  return reducer => strictActionWithinNgZone ? inNgZoneAssertMetaReducer(reducer, {\n    action: action => strictActionWithinNgZone && !ignoreNgrxAction(action)\n  }) : reducer;\n}\n\nfunction provideRuntimeChecks(runtimeChecks) {\n  return [{\n    provide: _USER_RUNTIME_CHECKS,\n    useValue: runtimeChecks\n  }, {\n    provide: USER_RUNTIME_CHECKS,\n    useFactory: _runtimeChecksFactory,\n    deps: [_USER_RUNTIME_CHECKS]\n  }, {\n    provide: ACTIVE_RUNTIME_CHECKS,\n    deps: [USER_RUNTIME_CHECKS],\n    useFactory: createActiveRuntimeChecks\n  }, {\n    provide: META_REDUCERS,\n    multi: true,\n    deps: [ACTIVE_RUNTIME_CHECKS],\n    useFactory: createImmutabilityCheckMetaReducer\n  }, {\n    provide: META_REDUCERS,\n    multi: true,\n    deps: [ACTIVE_RUNTIME_CHECKS],\n    useFactory: createSerializationCheckMetaReducer\n  }, {\n    provide: META_REDUCERS,\n    multi: true,\n    deps: [ACTIVE_RUNTIME_CHECKS],\n    useFactory: createInNgZoneCheckMetaReducer\n  }];\n}\n\nfunction checkForActionTypeUniqueness() {\n  return [{\n    provide: _ACTION_TYPE_UNIQUENESS_CHECK,\n    multi: true,\n    deps: [ACTIVE_RUNTIME_CHECKS],\n    useFactory: _actionTypeUniquenessCheck\n  }];\n}\n\nfunction _runtimeChecksFactory(runtimeChecks) {\n  return runtimeChecks;\n}\n\nfunction _actionTypeUniquenessCheck(config) {\n  if (!config.strictActionTypeUniqueness) {\n    return;\n  }\n\n  const duplicates = Object.entries(REGISTERED_ACTION_TYPES).filter(([, registrations]) => registrations > 1).map(([type]) => type);\n\n  if (duplicates.length) {\n    throw new Error(`Action types are registered more than once, ${duplicates.map(type => `\"${type}\"`).join(', ')}. ${RUNTIME_CHECK_URL}#strictactiontypeuniqueness`);\n  }\n}\n\nclass StoreRootModule {\n  constructor(actions$, reducer$, scannedActions$, store, guard, actionCheck) {}\n\n}\n/** @nocollapse */\n\n/** @nocollapse */\n\n\nStoreRootModule.ɵfac = function StoreRootModule_Factory(t) {\n  return new (t || StoreRootModule)(i0.ɵɵinject(ActionsSubject), i0.ɵɵinject(ReducerObservable), i0.ɵɵinject(ScannedActionsSubject), i0.ɵɵinject(Store), i0.ɵɵinject(_ROOT_STORE_GUARD, 8), i0.ɵɵinject(_ACTION_TYPE_UNIQUENESS_CHECK, 8));\n};\n/** @nocollapse */\n\n/** @nocollapse */\n\n\nStoreRootModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n  type: StoreRootModule\n});\n/** @nocollapse */\n\n/** @nocollapse */\n\nStoreRootModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({});\n\n(function () {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && i0.ɵsetClassMetadata(StoreRootModule, [{\n    type: NgModule,\n    args: [{}]\n  }], function () {\n    return [{\n      type: ActionsSubject\n    }, {\n      type: ReducerObservable\n    }, {\n      type: ScannedActionsSubject\n    }, {\n      type: Store\n    }, {\n      type: undefined,\n      decorators: [{\n        type: Optional\n      }, {\n        type: Inject,\n        args: [_ROOT_STORE_GUARD]\n      }]\n    }, {\n      type: undefined,\n      decorators: [{\n        type: Optional\n      }, {\n        type: Inject,\n        args: [_ACTION_TYPE_UNIQUENESS_CHECK]\n      }]\n    }];\n  }, null);\n})();\n\nclass StoreFeatureModule {\n  constructor(features, featureReducers, reducerManager, root, actionCheck) {\n    this.features = features;\n    this.featureReducers = featureReducers;\n    this.reducerManager = reducerManager;\n    const feats = features.map((feature, index) => {\n      const featureReducerCollection = featureReducers.shift(); // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n\n      const reducers = featureReducerCollection\n      /*TODO(#823)*/\n      [index];\n      return Object.assign(Object.assign({}, feature), {\n        reducers,\n        initialState: _initialStateFactory(feature.initialState)\n      });\n    });\n    reducerManager.addFeatures(feats);\n  } // eslint-disable-next-line @angular-eslint/contextual-lifecycle\n\n\n  ngOnDestroy() {\n    this.reducerManager.removeFeatures(this.features);\n  }\n\n}\n/** @nocollapse */\n\n/** @nocollapse */\n\n\nStoreFeatureModule.ɵfac = function StoreFeatureModule_Factory(t) {\n  return new (t || StoreFeatureModule)(i0.ɵɵinject(_STORE_FEATURES), i0.ɵɵinject(FEATURE_REDUCERS), i0.ɵɵinject(ReducerManager), i0.ɵɵinject(StoreRootModule), i0.ɵɵinject(_ACTION_TYPE_UNIQUENESS_CHECK, 8));\n};\n/** @nocollapse */\n\n/** @nocollapse */\n\n\nStoreFeatureModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n  type: StoreFeatureModule\n});\n/** @nocollapse */\n\n/** @nocollapse */\n\nStoreFeatureModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({});\n\n(function () {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && i0.ɵsetClassMetadata(StoreFeatureModule, [{\n    type: NgModule,\n    args: [{}]\n  }], function () {\n    return [{\n      type: undefined,\n      decorators: [{\n        type: Inject,\n        args: [_STORE_FEATURES]\n      }]\n    }, {\n      type: undefined,\n      decorators: [{\n        type: Inject,\n        args: [FEATURE_REDUCERS]\n      }]\n    }, {\n      type: ReducerManager\n    }, {\n      type: StoreRootModule\n    }, {\n      type: undefined,\n      decorators: [{\n        type: Optional\n      }, {\n        type: Inject,\n        args: [_ACTION_TYPE_UNIQUENESS_CHECK]\n      }]\n    }];\n  }, null);\n})();\n\nclass StoreModule {\n  static forRoot(reducers, config = {}) {\n    return {\n      ngModule: StoreRootModule,\n      providers: [{\n        provide: _ROOT_STORE_GUARD,\n        useFactory: _provideForRootGuard,\n        deps: [[Store, new Optional(), new SkipSelf()]]\n      }, {\n        provide: _INITIAL_STATE,\n        useValue: config.initialState\n      }, {\n        provide: INITIAL_STATE,\n        useFactory: _initialStateFactory,\n        deps: [_INITIAL_STATE]\n      }, {\n        provide: _INITIAL_REDUCERS,\n        useValue: reducers\n      }, {\n        provide: _STORE_REDUCERS,\n        useExisting: reducers instanceof InjectionToken ? reducers : _INITIAL_REDUCERS\n      }, {\n        provide: INITIAL_REDUCERS,\n        deps: [Injector, _INITIAL_REDUCERS, [new Inject(_STORE_REDUCERS)]],\n        useFactory: _createStoreReducers\n      }, {\n        provide: USER_PROVIDED_META_REDUCERS,\n        useValue: config.metaReducers ? config.metaReducers : []\n      }, {\n        provide: _RESOLVED_META_REDUCERS,\n        deps: [META_REDUCERS, USER_PROVIDED_META_REDUCERS],\n        useFactory: _concatMetaReducers\n      }, {\n        provide: _REDUCER_FACTORY,\n        useValue: config.reducerFactory ? config.reducerFactory : combineReducers\n      }, {\n        provide: REDUCER_FACTORY,\n        deps: [_REDUCER_FACTORY, _RESOLVED_META_REDUCERS],\n        useFactory: createReducerFactory\n      }, ACTIONS_SUBJECT_PROVIDERS, REDUCER_MANAGER_PROVIDERS, SCANNED_ACTIONS_SUBJECT_PROVIDERS, STATE_PROVIDERS, STORE_PROVIDERS, provideRuntimeChecks(config.runtimeChecks), checkForActionTypeUniqueness()]\n    };\n  }\n\n  static forFeature(featureNameOrSlice, reducers, config = {}) {\n    return {\n      ngModule: StoreFeatureModule,\n      providers: [{\n        provide: _FEATURE_CONFIGS,\n        multi: true,\n        useValue: featureNameOrSlice instanceof Object ? {} : config\n      }, {\n        provide: STORE_FEATURES,\n        multi: true,\n        useValue: {\n          key: featureNameOrSlice instanceof Object ? featureNameOrSlice.name : featureNameOrSlice,\n          reducerFactory: !(config instanceof InjectionToken) && config.reducerFactory ? config.reducerFactory : combineReducers,\n          metaReducers: !(config instanceof InjectionToken) && config.metaReducers ? config.metaReducers : [],\n          initialState: !(config instanceof InjectionToken) && config.initialState ? config.initialState : undefined\n        }\n      }, {\n        provide: _STORE_FEATURES,\n        deps: [Injector, _FEATURE_CONFIGS, STORE_FEATURES],\n        useFactory: _createFeatureStore\n      }, {\n        provide: _FEATURE_REDUCERS,\n        multi: true,\n        useValue: featureNameOrSlice instanceof Object ? featureNameOrSlice.reducer : reducers\n      }, {\n        provide: _FEATURE_REDUCERS_TOKEN,\n        multi: true,\n        useExisting: reducers instanceof InjectionToken ? reducers : _FEATURE_REDUCERS\n      }, {\n        provide: FEATURE_REDUCERS,\n        multi: true,\n        deps: [Injector, _FEATURE_REDUCERS, [new Inject(_FEATURE_REDUCERS_TOKEN)]],\n        useFactory: _createFeatureReducers\n      }, checkForActionTypeUniqueness()]\n    };\n  }\n\n}\n/** @nocollapse */\n\n/** @nocollapse */\n\n\nStoreModule.ɵfac = function StoreModule_Factory(t) {\n  return new (t || StoreModule)();\n};\n/** @nocollapse */\n\n/** @nocollapse */\n\n\nStoreModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n  type: StoreModule\n});\n/** @nocollapse */\n\n/** @nocollapse */\n\nStoreModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({});\n\n(function () {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && i0.ɵsetClassMetadata(StoreModule, [{\n    type: NgModule,\n    args: [{}]\n  }], null, null);\n})();\n\nfunction _createStoreReducers(injector, reducers) {\n  return reducers instanceof InjectionToken ? injector.get(reducers) : reducers;\n}\n\nfunction _createFeatureStore(injector, configs, featureStores) {\n  return featureStores.map((feat, index) => {\n    if (configs[index] instanceof InjectionToken) {\n      const conf = injector.get(configs[index]);\n      return {\n        key: feat.key,\n        reducerFactory: conf.reducerFactory ? conf.reducerFactory : combineReducers,\n        metaReducers: conf.metaReducers ? conf.metaReducers : [],\n        initialState: conf.initialState\n      };\n    }\n\n    return feat;\n  });\n}\n\nfunction _createFeatureReducers(injector, reducerCollection) {\n  const reducers = reducerCollection.map(reducer => {\n    return reducer instanceof InjectionToken ? injector.get(reducer) : reducer;\n  });\n  return reducers;\n}\n\nfunction _initialStateFactory(initialState) {\n  if (typeof initialState === 'function') {\n    return initialState();\n  }\n\n  return initialState;\n}\n\nfunction _concatMetaReducers(metaReducers, userProvidedMetaReducers) {\n  return metaReducers.concat(userProvidedMetaReducers);\n}\n\nfunction _provideForRootGuard(store) {\n  if (store) {\n    throw new TypeError(`StoreModule.forRoot() called twice. Feature modules should use StoreModule.forFeature() instead.`);\n  }\n\n  return 'guarded';\n}\n/**\n * @description\n * Associates actions with a given state change function.\n * A state change function must be provided as the last parameter.\n *\n * @param args `ActionCreator`'s followed by a state change function.\n *\n * @returns an association of action types with a state change function.\n *\n * @usageNotes\n * ```ts\n * on(AuthApiActions.loginSuccess, (state, { user }) => ({ ...state, user }))\n * ```\n */\n\n\nfunction on(...args) {\n  // This could be refactored when TS releases the version with this fix:\n  // https://github.com/microsoft/TypeScript/pull/41544\n  const reducer = args.pop();\n  const types = args.map(creator => creator.type);\n  return {\n    reducer,\n    types\n  };\n}\n/**\n * @description\n * Creates a reducer function to handle state transitions.\n *\n * Reducer creators reduce the explicitness of reducer functions with switch statements.\n *\n * @param initialState Provides a state value if the current state is `undefined`, as it is initially.\n * @param ons Associations between actions and state changes.\n * @returns A reducer function.\n *\n * @usageNotes\n *\n * - Must be used with `ActionCreator`'s (returned by `createAction`). Cannot be used with class-based action creators.\n * - The returned `ActionReducer` should additionally be wrapped with another function, if you are using View Engine AOT.\n * In case you are using Ivy (or only JIT View Engine) the extra wrapper function is not required.\n *\n * **Declaring a reducer creator**\n *\n * ```ts\n * export const reducer = createReducer(\n *   initialState,\n *   on(\n *     featureActions.actionOne,\n *     featureActions.actionTwo,\n *     (state, { updatedValue }) => ({ ...state, prop: updatedValue })\n *   ),\n *   on(featureActions.actionThree, () => initialState);\n * );\n * ```\n *\n * **Declaring a reducer creator using a wrapper function (Only needed if using View Engine AOT)**\n *\n * ```ts\n * const featureReducer = createReducer(\n *   initialState,\n *   on(\n *     featureActions.actionOne,\n *     featureActions.actionTwo,\n *     (state, { updatedValue }) => ({ ...state, prop: updatedValue })\n *   ),\n *   on(featureActions.actionThree, () => initialState);\n * );\n *\n * export function reducer(state: State | undefined, action: Action) {\n *   return featureReducer(state, action);\n * }\n * ```\n */\n\n\nfunction createReducer(initialState, ...ons) {\n  const map = new Map();\n\n  for (const on of ons) {\n    for (const type of on.types) {\n      const existingReducer = map.get(type);\n\n      if (existingReducer) {\n        const newReducer = (state, action) => on.reducer(existingReducer(state, action), action);\n\n        map.set(type, newReducer);\n      } else {\n        map.set(type, on.reducer);\n      }\n    }\n  }\n\n  return function (state = initialState, action) {\n    const reducer = map.get(action.type);\n    return reducer ? reducer(state, action) : state;\n  };\n}\n/**\n * DO NOT EDIT\n *\n * This file is automatically generated at build\n */\n\n/**\n * Generated bundle index. Do not edit.\n */\n\n\nexport { ACTIVE_RUNTIME_CHECKS, ActionsSubject, FEATURE_REDUCERS, INIT, INITIAL_REDUCERS, INITIAL_STATE, META_REDUCERS, REDUCER_FACTORY, ReducerManager, ReducerManagerDispatcher, ReducerObservable, STORE_FEATURES, ScannedActionsSubject, State, StateObservable, Store, StoreFeatureModule, StoreModule, StoreRootModule, UPDATE, USER_PROVIDED_META_REDUCERS, USER_RUNTIME_CHECKS, combineReducers, compose, createAction, createFeature, createFeatureSelector, createReducer, createReducerFactory, createSelector, createSelectorFactory, defaultMemoize, defaultStateFn, isNgrxMockEnvironment, on, props, reduceState, resultMemoize, select, setNgrxMockEnvironment, union };","map":{"version":3,"sources":["D:/Development/Work/CENOS/cenos-ui/node_modules/@ngrx/store/fesm2015/ngrx-store.mjs"],"names":["i0","Injectable","InjectionToken","Inject","isDevMode","NgModule","Optional","SkipSelf","Injector","BehaviorSubject","Observable","Subject","queueScheduler","observeOn","withLatestFrom","scan","pluck","map","distinctUntilChanged","REGISTERED_ACTION_TYPES","resetRegisteredActionTypes","key","Object","keys","createAction","type","config","defineType","args","assign","as","_as","props","Error","_p","undefined","union","creators","creator","defineProperty","value","writable","INIT","ActionsSubject","constructor","next","action","TypeError","complete","ngOnDestroy","ɵfac","ɵprov","ACTIONS_SUBJECT_PROVIDERS","_ROOT_STORE_GUARD","_INITIAL_STATE","INITIAL_STATE","REDUCER_FACTORY","_REDUCER_FACTORY","INITIAL_REDUCERS","_INITIAL_REDUCERS","STORE_FEATURES","_STORE_REDUCERS","_FEATURE_REDUCERS","_FEATURE_CONFIGS","_STORE_FEATURES","_FEATURE_REDUCERS_TOKEN","FEATURE_REDUCERS","USER_PROVIDED_META_REDUCERS","META_REDUCERS","_RESOLVED_META_REDUCERS","USER_RUNTIME_CHECKS","_USER_RUNTIME_CHECKS","ACTIVE_RUNTIME_CHECKS","_ACTION_TYPE_UNIQUENESS_CHECK","combineReducers","reducers","initialState","reducerKeys","finalReducers","i","length","finalReducerKeys","combination","state","hasChanged","nextState","reducer","previousStateForKey","nextStateForKey","omit","object","keyToRemove","filter","reduce","result","compose","functions","arg","last","rest","slice","reduceRight","composed","fn","createReducerFactory","reducerFactory","metaReducers","Array","isArray","apply","createFeatureReducerFactory","r","ReducerObservable","ReducerManagerDispatcher","UPDATE","ReducerManager","dispatcher","currentReducers","addFeature","feature","addFeatures","features","reducerDict","addReducers","removeFeature","removeFeatures","removeReducers","p","addReducer","updateReducers","removeReducer","featureKey","featureKeys","forEach","decorators","REDUCER_MANAGER_PROVIDERS","provide","useExisting","ScannedActionsSubject","SCANNED_ACTIONS_SUBJECT_PROVIDERS","StateObservable","State","actions$","reducer$","scannedActions","actionsOnQueue$","pipe","withLatestReducer$","seed","stateAndAction$","reduceState","stateSubscription","subscribe","unsubscribe","stateActionPair","STATE_PROVIDERS","Store","state$","actionsObserver","reducerManager","source","select","pathOrMapFn","paths","call","lift","operator","store","dispatch","error","err","STORE_PROVIDERS","propsOrPath","selectOperator","source$","mapped$","pathSlices","Boolean","capitalize","text","charAt","toUpperCase","substr","RUNTIME_CHECK_URL","isUndefined","target","isNull","isString","isBoolean","isNumber","isObjectLike","isObject","isPlainObject","targetPrototype","getPrototypeOf","prototype","isFunction","isComponent","hasOwnProperty","propertyName","_ngrxMockEnvironment","setNgrxMockEnvironment","isNgrxMockEnvironment","isEqualCheck","a","b","isArgumentsChanged","lastArguments","comparator","resultMemoize","projectionFn","isResultEqual","defaultMemoize","isArgumentsEqual","lastResult","overrideResult","reset","setResult","clearResult","memoized","arguments","newResult","createSelector","input","createSelectorFactory","defaultStateFn","selectors","memoizedProjector","memoize","options","stateFn","head","tail","projector","memoizedSelectors","selector","release","memoizedState","createFeatureSelector","featureName","featureState","console","warn","createFeature","featureConfig","name","featureSelector","nestedSelectors","createNestedSelectors","getInitialState","nestedKeys","nestedKey","parentState","immutabilityCheckMetaReducer","checks","act","freeze","targetIsFunction","getOwnPropertyNames","prop","startsWith","propValue","isFrozen","serializationCheckMetaReducer","unserializableAction","getUnserializable","throwIfUnserializable","unserializableState","path","unserializable","context","unserializablePath","join","inNgZoneAssertMetaReducer","NgZone","isInAngularZone","createActiveRuntimeChecks","runtimeChecks","strictStateSerializability","strictActionSerializability","strictStateImmutability","strictActionImmutability","strictActionWithinNgZone","strictActionTypeUniqueness","createSerializationCheckMetaReducer","ignoreNgrxAction","createImmutabilityCheckMetaReducer","createInNgZoneCheckMetaReducer","provideRuntimeChecks","useValue","useFactory","_runtimeChecksFactory","deps","multi","checkForActionTypeUniqueness","_actionTypeUniquenessCheck","duplicates","entries","registrations","StoreRootModule","scannedActions$","guard","actionCheck","ɵmod","ɵinj","StoreFeatureModule","featureReducers","root","feats","index","featureReducerCollection","shift","_initialStateFactory","StoreModule","forRoot","ngModule","providers","_provideForRootGuard","_createStoreReducers","_concatMetaReducers","forFeature","featureNameOrSlice","_createFeatureStore","_createFeatureReducers","injector","get","configs","featureStores","feat","conf","reducerCollection","userProvidedMetaReducers","concat","on","pop","types","createReducer","ons","Map","existingReducer","newReducer","set"],"mappings":"AAAA,OAAO,KAAKA,EAAZ,MAAoB,eAApB;AACA,SAASC,UAAT,EAAqBC,cAArB,EAAqCC,MAArC,EAA6CC,SAA7C,EAAwDC,QAAxD,EAAkEC,QAAlE,EAA4EC,QAA5E,EAAsFC,QAAtF,QAAsG,eAAtG;AACA,SAASC,eAAT,EAA0BC,UAA1B,EAAsCC,OAAtC,EAA+CC,cAA/C,QAAqE,MAArE;AACA,SAASC,SAAT,EAAoBC,cAApB,EAAoCC,IAApC,EAA0CC,KAA1C,EAAiDC,GAAjD,EAAsDC,oBAAtD,QAAkF,gBAAlF;AAEA,MAAMC,uBAAuB,GAAG,EAAhC;;AACA,SAASC,0BAAT,GAA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eAApP,EAAqQgB,KAArQ,EAA4QqJ,kBAA5Q,EAAgSQ,WAAhS,EAA6Sd,eAA7S,EAA8TzL,MAA9T,EAAsU/C,2BAAtU,EAAmWG,mBAAnW,EAAwXI,eAAxX,EAAyYqB,OAAzY,EAAkZvE,YAAlZ,EAAga2N,aAAha,EAA+aL,qBAA/a,EAAsckG,aAAtc,EAAqdxO,oBAArd,EAA2esH,cAA3e,EAA2fE,qBAA3f,EAAkhBZ,cAAlhB,EAAkiBa,cAAliB,EAAkjBvB,qBAAljB,EAAykBmI,EAAzkB,EAA6kB7S,KAA7kB,EAAolBsH,WAAplB,EAAimB2D,aAAjmB,EAAgnBhD,MAAhnB,EAAwnBwC,sBAAxnB,EAAgpBrK,KAAhpB","sourcesContent":["import * as i0 from '@angular/core';\nimport { Injectable, InjectionToken, Inject, isDevMode, NgModule, Optional, SkipSelf, Injector } from '@angular/core';\nimport { BehaviorSubject, Observable, Subject, queueScheduler } from 'rxjs';\nimport { observeOn, withLatestFrom, scan, pluck, map, distinctUntilChanged } from 'rxjs/operators';\n\nconst REGISTERED_ACTION_TYPES = {};\nfunction resetRegisteredActionTypes() {\n    for (const key of Object.keys(REGISTERED_ACTION_TYPES)) {\n        delete REGISTERED_ACTION_TYPES[key];\n    }\n}\n\n/**\n * @description\n * Creates a configured `Creator` function that, when called, returns an object in the shape of the `Action` interface.\n *\n * Action creators reduce the explicitness of class-based action creators.\n *\n * @param type Describes the action that will be dispatched\n * @param config Additional metadata needed for the handling of the action.  See {@link createAction#usage-notes Usage Notes}.\n *\n * @usageNotes\n *\n * **Declaring an action creator**\n *\n * Without additional metadata:\n * ```ts\n * export const increment = createAction('[Counter] Increment');\n * ```\n * With additional metadata:\n * ```ts\n * export const loginSuccess = createAction(\n *   '[Auth/API] Login Success',\n *   props<{ user: User }>()\n * );\n * ```\n * With a function:\n * ```ts\n * export const loginSuccess = createAction(\n *   '[Auth/API] Login Success',\n *   (response: Response) => response.user\n * );\n * ```\n *\n * **Dispatching an action**\n *\n * Without additional metadata:\n * ```ts\n * store.dispatch(increment());\n * ```\n * With additional metadata:\n * ```ts\n * store.dispatch(loginSuccess({ user: newUser }));\n * ```\n *\n * **Referencing an action in a reducer**\n *\n * Using a switch statement:\n * ```ts\n * switch (action.type) {\n *   // ...\n *   case AuthApiActions.loginSuccess.type: {\n *     return {\n *       ...state,\n *       user: action.user\n *     };\n *   }\n * }\n * ```\n * Using a reducer creator:\n * ```ts\n * on(AuthApiActions.loginSuccess, (state, { user }) => ({ ...state, user }))\n * ```\n *\n *  **Referencing an action in an effect**\n * ```ts\n * effectName$ = createEffect(\n *   () => this.actions$.pipe(\n *     ofType(AuthApiActions.loginSuccess),\n *     // ...\n *   )\n * );\n * ```\n */\nfunction createAction(type, config) {\n    REGISTERED_ACTION_TYPES[type] = (REGISTERED_ACTION_TYPES[type] || 0) + 1;\n    if (typeof config === 'function') {\n        return defineType(type, (...args) => (Object.assign(Object.assign({}, config(...args)), { type })));\n    }\n    const as = config ? config._as : 'empty';\n    switch (as) {\n        case 'empty':\n            return defineType(type, () => ({ type }));\n        case 'props':\n            return defineType(type, (props) => (Object.assign(Object.assign({}, props), { type })));\n        default:\n            throw new Error('Unexpected config.');\n    }\n}\nfunction props() {\n    // eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/naming-convention\n    return { _as: 'props', _p: undefined };\n}\nfunction union(creators) {\n    // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n    return undefined;\n}\nfunction defineType(type, creator) {\n    return Object.defineProperty(creator, 'type', {\n        value: type,\n        writable: false,\n    });\n}\n\nconst INIT = '@ngrx/store/init';\nclass ActionsSubject extends BehaviorSubject {\n    constructor() {\n        super({ type: INIT });\n    }\n    next(action) {\n        if (typeof action === 'function') {\n            throw new TypeError(`\n        Dispatch expected an object, instead it received a function.\n        If you're using the createAction function, make sure to invoke the function\n        before dispatching the action. For example, someAction should be someAction().`);\n        }\n        else if (typeof action === 'undefined') {\n            throw new TypeError(`Actions must be objects`);\n        }\n        else if (typeof action.type === 'undefined') {\n            throw new TypeError(`Actions must have a type property`);\n        }\n        super.next(action);\n    }\n    complete() {\n        /* noop */\n    }\n    ngOnDestroy() {\n        super.complete();\n    }\n}\n/** @nocollapse */ /** @nocollapse */ ActionsSubject.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.0.0\", ngImport: i0, type: ActionsSubject, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\n/** @nocollapse */ /** @nocollapse */ ActionsSubject.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"13.0.0\", ngImport: i0, type: ActionsSubject });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.0.0\", ngImport: i0, type: ActionsSubject, decorators: [{\n            type: Injectable\n        }], ctorParameters: function () { return []; } });\nconst ACTIONS_SUBJECT_PROVIDERS = [ActionsSubject];\n\nconst _ROOT_STORE_GUARD = new InjectionToken('@ngrx/store Internal Root Guard');\nconst _INITIAL_STATE = new InjectionToken('@ngrx/store Internal Initial State');\nconst INITIAL_STATE = new InjectionToken('@ngrx/store Initial State');\nconst REDUCER_FACTORY = new InjectionToken('@ngrx/store Reducer Factory');\nconst _REDUCER_FACTORY = new InjectionToken('@ngrx/store Internal Reducer Factory Provider');\nconst INITIAL_REDUCERS = new InjectionToken('@ngrx/store Initial Reducers');\nconst _INITIAL_REDUCERS = new InjectionToken('@ngrx/store Internal Initial Reducers');\nconst STORE_FEATURES = new InjectionToken('@ngrx/store Store Features');\nconst _STORE_REDUCERS = new InjectionToken('@ngrx/store Internal Store Reducers');\nconst _FEATURE_REDUCERS = new InjectionToken('@ngrx/store Internal Feature Reducers');\nconst _FEATURE_CONFIGS = new InjectionToken('@ngrx/store Internal Feature Configs');\nconst _STORE_FEATURES = new InjectionToken('@ngrx/store Internal Store Features');\nconst _FEATURE_REDUCERS_TOKEN = new InjectionToken('@ngrx/store Internal Feature Reducers Token');\nconst FEATURE_REDUCERS = new InjectionToken('@ngrx/store Feature Reducers');\n/**\n * User-defined meta reducers from StoreModule.forRoot()\n */\nconst USER_PROVIDED_META_REDUCERS = new InjectionToken('@ngrx/store User Provided Meta Reducers');\n/**\n * Meta reducers defined either internally by @ngrx/store or by library authors\n */\nconst META_REDUCERS = new InjectionToken('@ngrx/store Meta Reducers');\n/**\n * Concats the user provided meta reducers and the meta reducers provided on the multi\n * injection token\n */\nconst _RESOLVED_META_REDUCERS = new InjectionToken('@ngrx/store Internal Resolved Meta Reducers');\n/**\n * Runtime checks defined by the user via an InjectionToken\n * Defaults to `_USER_RUNTIME_CHECKS`\n */\nconst USER_RUNTIME_CHECKS = new InjectionToken('@ngrx/store User Runtime Checks Config');\n/**\n * Runtime checks defined by the user via forRoot()\n */\nconst _USER_RUNTIME_CHECKS = new InjectionToken('@ngrx/store Internal User Runtime Checks Config');\n/**\n * Runtime checks currently in use\n */\nconst ACTIVE_RUNTIME_CHECKS = new InjectionToken('@ngrx/store Internal Runtime Checks');\nconst _ACTION_TYPE_UNIQUENESS_CHECK = new InjectionToken('@ngrx/store Check if Action types are unique');\n\n/**\n * @description\n * Combines reducers for individual features into a single reducer.\n *\n * You can use this function to delegate handling of state transitions to multiple reducers, each acting on their\n * own sub-state within the root state.\n *\n * @param reducers An object mapping keys of the root state to their corresponding feature reducer.\n * @param initialState Provides a state value if the current state is `undefined`, as it is initially.\n * @returns A reducer function.\n *\n * @usageNotes\n *\n * **Example combining two feature reducers into one \"root\" reducer**\n *\n * ```ts\n * export const reducer = combineReducers({\n *   featureA: featureAReducer,\n *   featureB: featureBReducer\n * });\n * ```\n *\n * You can also override the initial states of the sub-features:\n * ```ts\n * export const reducer = combineReducers({\n *   featureA: featureAReducer,\n *   featureB: featureBReducer\n * }, {\n *   featureA: { counterA: 13 },\n *   featureB: { counterB: 37 }\n * });\n * ```\n */\nfunction combineReducers(reducers, initialState = {}) {\n    const reducerKeys = Object.keys(reducers);\n    const finalReducers = {};\n    for (let i = 0; i < reducerKeys.length; i++) {\n        const key = reducerKeys[i];\n        if (typeof reducers[key] === 'function') {\n            finalReducers[key] = reducers[key];\n        }\n    }\n    const finalReducerKeys = Object.keys(finalReducers);\n    return function combination(state, action) {\n        state = state === undefined ? initialState : state;\n        let hasChanged = false;\n        const nextState = {};\n        for (let i = 0; i < finalReducerKeys.length; i++) {\n            const key = finalReducerKeys[i];\n            const reducer = finalReducers[key];\n            const previousStateForKey = state[key];\n            const nextStateForKey = reducer(previousStateForKey, action);\n            nextState[key] = nextStateForKey;\n            hasChanged = hasChanged || nextStateForKey !== previousStateForKey;\n        }\n        return hasChanged ? nextState : state;\n    };\n}\nfunction omit(object, keyToRemove) {\n    return Object.keys(object)\n        .filter((key) => key !== keyToRemove)\n        .reduce((result, key) => Object.assign(result, { [key]: object[key] }), {});\n}\nfunction compose(...functions) {\n    return function (arg) {\n        if (functions.length === 0) {\n            return arg;\n        }\n        const last = functions[functions.length - 1];\n        const rest = functions.slice(0, -1);\n        return rest.reduceRight((composed, fn) => fn(composed), last(arg));\n    };\n}\nfunction createReducerFactory(reducerFactory, metaReducers) {\n    if (Array.isArray(metaReducers) && metaReducers.length > 0) {\n        reducerFactory = compose.apply(null, [\n            ...metaReducers,\n            reducerFactory,\n        ]);\n    }\n    return (reducers, initialState) => {\n        const reducer = reducerFactory(reducers);\n        return (state, action) => {\n            state = state === undefined ? initialState : state;\n            return reducer(state, action);\n        };\n    };\n}\nfunction createFeatureReducerFactory(metaReducers) {\n    const reducerFactory = Array.isArray(metaReducers) && metaReducers.length > 0\n        ? compose(...metaReducers)\n        : (r) => r;\n    return (reducer, initialState) => {\n        reducer = reducerFactory(reducer);\n        return (state, action) => {\n            state = state === undefined ? initialState : state;\n            return reducer(state, action);\n        };\n    };\n}\n\nclass ReducerObservable extends Observable {\n}\nclass ReducerManagerDispatcher extends ActionsSubject {\n}\nconst UPDATE = '@ngrx/store/update-reducers';\nclass ReducerManager extends BehaviorSubject {\n    constructor(dispatcher, initialState, reducers, reducerFactory) {\n        super(reducerFactory(reducers, initialState));\n        this.dispatcher = dispatcher;\n        this.initialState = initialState;\n        this.reducers = reducers;\n        this.reducerFactory = reducerFactory;\n    }\n    get currentReducers() {\n        return this.reducers;\n    }\n    addFeature(feature) {\n        this.addFeatures([feature]);\n    }\n    addFeatures(features) {\n        const reducers = features.reduce((reducerDict, { reducers, reducerFactory, metaReducers, initialState, key }) => {\n            const reducer = typeof reducers === 'function'\n                ? createFeatureReducerFactory(metaReducers)(reducers, initialState)\n                : createReducerFactory(reducerFactory, metaReducers)(reducers, initialState);\n            reducerDict[key] = reducer;\n            return reducerDict;\n        }, {});\n        this.addReducers(reducers);\n    }\n    removeFeature(feature) {\n        this.removeFeatures([feature]);\n    }\n    removeFeatures(features) {\n        this.removeReducers(features.map((p) => p.key));\n    }\n    addReducer(key, reducer) {\n        this.addReducers({ [key]: reducer });\n    }\n    addReducers(reducers) {\n        this.reducers = Object.assign(Object.assign({}, this.reducers), reducers);\n        this.updateReducers(Object.keys(reducers));\n    }\n    removeReducer(featureKey) {\n        this.removeReducers([featureKey]);\n    }\n    removeReducers(featureKeys) {\n        featureKeys.forEach((key) => {\n            this.reducers = omit(this.reducers, key) /*TODO(#823)*/;\n        });\n        this.updateReducers(featureKeys);\n    }\n    updateReducers(featureKeys) {\n        this.next(this.reducerFactory(this.reducers, this.initialState));\n        this.dispatcher.next({\n            type: UPDATE,\n            features: featureKeys,\n        });\n    }\n    ngOnDestroy() {\n        this.complete();\n    }\n}\n/** @nocollapse */ /** @nocollapse */ ReducerManager.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.0.0\", ngImport: i0, type: ReducerManager, deps: [{ token: ReducerManagerDispatcher }, { token: INITIAL_STATE }, { token: INITIAL_REDUCERS }, { token: REDUCER_FACTORY }], target: i0.ɵɵFactoryTarget.Injectable });\n/** @nocollapse */ /** @nocollapse */ ReducerManager.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"13.0.0\", ngImport: i0, type: ReducerManager });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.0.0\", ngImport: i0, type: ReducerManager, decorators: [{\n            type: Injectable\n        }], ctorParameters: function () {\n        return [{ type: ReducerManagerDispatcher }, { type: undefined, decorators: [{\n                        type: Inject,\n                        args: [INITIAL_STATE]\n                    }] }, { type: undefined, decorators: [{\n                        type: Inject,\n                        args: [INITIAL_REDUCERS]\n                    }] }, { type: undefined, decorators: [{\n                        type: Inject,\n                        args: [REDUCER_FACTORY]\n                    }] }];\n    } });\nconst REDUCER_MANAGER_PROVIDERS = [\n    ReducerManager,\n    { provide: ReducerObservable, useExisting: ReducerManager },\n    { provide: ReducerManagerDispatcher, useExisting: ActionsSubject },\n];\n\nclass ScannedActionsSubject extends Subject {\n    ngOnDestroy() {\n        this.complete();\n    }\n}\n/** @nocollapse */ /** @nocollapse */ ScannedActionsSubject.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.0.0\", ngImport: i0, type: ScannedActionsSubject, deps: null, target: i0.ɵɵFactoryTarget.Injectable });\n/** @nocollapse */ /** @nocollapse */ ScannedActionsSubject.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"13.0.0\", ngImport: i0, type: ScannedActionsSubject });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.0.0\", ngImport: i0, type: ScannedActionsSubject, decorators: [{\n            type: Injectable\n        }] });\nconst SCANNED_ACTIONS_SUBJECT_PROVIDERS = [\n    ScannedActionsSubject,\n];\n\nclass StateObservable extends Observable {\n}\nclass State extends BehaviorSubject {\n    constructor(actions$, reducer$, scannedActions, initialState) {\n        super(initialState);\n        const actionsOnQueue$ = actions$.pipe(observeOn(queueScheduler));\n        const withLatestReducer$ = actionsOnQueue$.pipe(withLatestFrom(reducer$));\n        const seed = { state: initialState };\n        const stateAndAction$ = withLatestReducer$.pipe(scan(reduceState, seed));\n        this.stateSubscription = stateAndAction$.subscribe(({ state, action }) => {\n            this.next(state);\n            scannedActions.next(action);\n        });\n    }\n    ngOnDestroy() {\n        this.stateSubscription.unsubscribe();\n        this.complete();\n    }\n}\nState.INIT = INIT;\n/** @nocollapse */ /** @nocollapse */ State.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.0.0\", ngImport: i0, type: State, deps: [{ token: ActionsSubject }, { token: ReducerObservable }, { token: ScannedActionsSubject }, { token: INITIAL_STATE }], target: i0.ɵɵFactoryTarget.Injectable });\n/** @nocollapse */ /** @nocollapse */ State.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"13.0.0\", ngImport: i0, type: State });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.0.0\", ngImport: i0, type: State, decorators: [{\n            type: Injectable\n        }], ctorParameters: function () {\n        return [{ type: ActionsSubject }, { type: ReducerObservable }, { type: ScannedActionsSubject }, { type: undefined, decorators: [{\n                        type: Inject,\n                        args: [INITIAL_STATE]\n                    }] }];\n    } });\nfunction reduceState(stateActionPair = { state: undefined }, [action, reducer]) {\n    const { state } = stateActionPair;\n    return { state: reducer(state, action), action };\n}\nconst STATE_PROVIDERS = [\n    State,\n    { provide: StateObservable, useExisting: State },\n];\n\n/* eslint-disable @typescript-eslint/naming-convention */\nclass Store extends Observable {\n    constructor(state$, actionsObserver, reducerManager) {\n        super();\n        this.actionsObserver = actionsObserver;\n        this.reducerManager = reducerManager;\n        this.source = state$;\n    }\n    select(pathOrMapFn, ...paths) {\n        return select.call(null, pathOrMapFn, ...paths)(this);\n    }\n    lift(operator) {\n        const store = new Store(this, this.actionsObserver, this.reducerManager);\n        store.operator = operator;\n        return store;\n    }\n    dispatch(action) {\n        this.actionsObserver.next(action);\n    }\n    next(action) {\n        this.actionsObserver.next(action);\n    }\n    error(err) {\n        this.actionsObserver.error(err);\n    }\n    complete() {\n        this.actionsObserver.complete();\n    }\n    addReducer(key, reducer) {\n        this.reducerManager.addReducer(key, reducer);\n    }\n    removeReducer(key) {\n        this.reducerManager.removeReducer(key);\n    }\n}\n/** @nocollapse */ /** @nocollapse */ Store.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.0.0\", ngImport: i0, type: Store, deps: [{ token: StateObservable }, { token: ActionsSubject }, { token: ReducerManager }], target: i0.ɵɵFactoryTarget.Injectable });\n/** @nocollapse */ /** @nocollapse */ Store.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"13.0.0\", ngImport: i0, type: Store });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.0.0\", ngImport: i0, type: Store, decorators: [{\n            type: Injectable\n        }], ctorParameters: function () { return [{ type: StateObservable }, { type: ActionsSubject }, { type: ReducerManager }]; } });\nconst STORE_PROVIDERS = [Store];\nfunction select(pathOrMapFn, propsOrPath, ...paths) {\n    return function selectOperator(source$) {\n        let mapped$;\n        if (typeof pathOrMapFn === 'string') {\n            const pathSlices = [propsOrPath, ...paths].filter(Boolean);\n            mapped$ = source$.pipe(pluck(pathOrMapFn, ...pathSlices));\n        }\n        else if (typeof pathOrMapFn === 'function') {\n            mapped$ = source$.pipe(map((source) => pathOrMapFn(source, propsOrPath)));\n        }\n        else {\n            throw new TypeError(`Unexpected type '${typeof pathOrMapFn}' in select operator,` +\n                ` expected 'string' or 'function'`);\n        }\n        return mapped$.pipe(distinctUntilChanged());\n    };\n}\n\nfunction capitalize(text) {\n    return (text.charAt(0).toUpperCase() + text.substr(1));\n}\n\nconst RUNTIME_CHECK_URL = 'https://ngrx.io/guide/store/configuration/runtime-checks';\nfunction isUndefined(target) {\n    return target === undefined;\n}\nfunction isNull(target) {\n    return target === null;\n}\nfunction isArray(target) {\n    return Array.isArray(target);\n}\nfunction isString(target) {\n    return typeof target === 'string';\n}\nfunction isBoolean(target) {\n    return typeof target === 'boolean';\n}\nfunction isNumber(target) {\n    return typeof target === 'number';\n}\nfunction isObjectLike(target) {\n    return typeof target === 'object' && target !== null;\n}\nfunction isObject(target) {\n    return isObjectLike(target) && !isArray(target);\n}\nfunction isPlainObject(target) {\n    if (!isObject(target)) {\n        return false;\n    }\n    const targetPrototype = Object.getPrototypeOf(target);\n    return targetPrototype === Object.prototype || targetPrototype === null;\n}\nfunction isFunction(target) {\n    return typeof target === 'function';\n}\nfunction isComponent(target) {\n    return isFunction(target) && target.hasOwnProperty('ɵcmp');\n}\nfunction hasOwnProperty(target, propertyName) {\n    return Object.prototype.hasOwnProperty.call(target, propertyName);\n}\n\nlet _ngrxMockEnvironment = false;\nfunction setNgrxMockEnvironment(value) {\n    _ngrxMockEnvironment = value;\n}\nfunction isNgrxMockEnvironment() {\n    return _ngrxMockEnvironment;\n}\n\nfunction isEqualCheck(a, b) {\n    return a === b;\n}\nfunction isArgumentsChanged(args, lastArguments, comparator) {\n    for (let i = 0; i < args.length; i++) {\n        if (!comparator(args[i], lastArguments[i])) {\n            return true;\n        }\n    }\n    return false;\n}\nfunction resultMemoize(projectionFn, isResultEqual) {\n    return defaultMemoize(projectionFn, isEqualCheck, isResultEqual);\n}\nfunction defaultMemoize(projectionFn, isArgumentsEqual = isEqualCheck, isResultEqual = isEqualCheck) {\n    let lastArguments = null;\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any, , , , ,\n    let lastResult = null;\n    let overrideResult;\n    function reset() {\n        lastArguments = null;\n        lastResult = null;\n    }\n    function setResult(result = undefined) {\n        overrideResult = { result };\n    }\n    function clearResult() {\n        overrideResult = undefined;\n    }\n    /* eslint-disable prefer-rest-params, prefer-spread */\n    // disabled because of the use of `arguments`\n    function memoized() {\n        if (overrideResult !== undefined) {\n            return overrideResult.result;\n        }\n        if (!lastArguments) {\n            lastResult = projectionFn.apply(null, arguments);\n            lastArguments = arguments;\n            return lastResult;\n        }\n        if (!isArgumentsChanged(arguments, lastArguments, isArgumentsEqual)) {\n            return lastResult;\n        }\n        const newResult = projectionFn.apply(null, arguments);\n        lastArguments = arguments;\n        if (isResultEqual(lastResult, newResult)) {\n            return lastResult;\n        }\n        lastResult = newResult;\n        return newResult;\n    }\n    return { memoized, reset, setResult, clearResult };\n}\nfunction createSelector(...input) {\n    return createSelectorFactory(defaultMemoize)(...input);\n}\nfunction defaultStateFn(state, selectors, props, memoizedProjector) {\n    if (props === undefined) {\n        const args = selectors.map((fn) => fn(state));\n        return memoizedProjector.memoized.apply(null, args);\n    }\n    const args = selectors.map((fn) => fn(state, props));\n    return memoizedProjector.memoized.apply(null, [...args, props]);\n}\n/**\n *\n * @param memoize The function used to memoize selectors\n * @param options Config Object that may include a `stateFn` function defining how to return the selector's value, given the entire `Store`'s state, parent `Selector`s, `Props`, and a `MemoizedProjection`\n *\n * @usageNotes\n *\n * **Creating a Selector Factory Where Array Order Does Not Matter**\n *\n * ```ts\n * function removeMatch(arr: string[], target: string): string[] {\n *   const matchIndex = arr.indexOf(target);\n *   return [...arr.slice(0, matchIndex), ...arr.slice(matchIndex + 1)];\n * }\n *\n * function orderDoesNotMatterComparer(a: any, b: any): boolean {\n *   if (!Array.isArray(a) || !Array.isArray(b)) {\n *     return a === b;\n *   }\n *   if (a.length !== b.length) {\n *     return false;\n *   }\n *   let tempB = [...b];\n *   function reduceToDetermineIfArraysContainSameContents(\n *     previousCallResult: boolean,\n *     arrayMember: any\n *   ): boolean {\n *     if (previousCallResult === false) {\n *       return false;\n *     }\n *     if (tempB.includes(arrayMember)) {\n *       tempB = removeMatch(tempB, arrayMember);\n *       return true;\n *     }\n *     return false;\n *   }\n *   return a.reduce(reduceToDetermineIfArraysContainSameContents, true);\n * }\n *\n * export const creactOrderDoesNotMatterSelector = createSelectorFactory(\n *   (projectionFun) => defaultMemoize(\n *     projectionFun,\n *     orderDoesNotMatterComparer,\n *     orderDoesNotMatterComparer\n *   )\n * );\n * ```\n *\n * **Creating an Alternative Memoization Strategy**\n *\n * ```ts\n * function serialize(x: any): string {\n *   return JSON.stringify(x);\n * }\n *\n * export const createFullHistorySelector = createSelectorFactory(\n *  (projectionFunction) => {\n *    const cache = {};\n *\n *    function memoized() {\n *      const serializedArguments = serialize(...arguments);\n *       if (cache[serializedArguments] != null) {\n *         cache[serializedArguments] = projectionFunction.apply(null, arguments);\n *       }\n *       return cache[serializedArguments];\n *     }\n *     return {\n *       memoized,\n *       reset: () => {},\n *       setResult: () => {},\n *       clearResult: () => {},\n *     };\n *   }\n * );\n * ```\n *\n *\n */\nfunction createSelectorFactory(memoize, options = {\n    stateFn: defaultStateFn,\n}) {\n    return function (...input) {\n        let args = input;\n        if (Array.isArray(args[0])) {\n            const [head, ...tail] = args;\n            args = [...head, ...tail];\n        }\n        const selectors = args.slice(0, args.length - 1);\n        const projector = args[args.length - 1];\n        const memoizedSelectors = selectors.filter((selector) => selector.release && typeof selector.release === 'function');\n        const memoizedProjector = memoize(function (...selectors) {\n            return projector.apply(null, selectors);\n        });\n        const memoizedState = defaultMemoize(function (state, props) {\n            return options.stateFn.apply(null, [\n                state,\n                selectors,\n                props,\n                memoizedProjector,\n            ]);\n        });\n        function release() {\n            memoizedState.reset();\n            memoizedProjector.reset();\n            memoizedSelectors.forEach((selector) => selector.release());\n        }\n        return Object.assign(memoizedState.memoized, {\n            release,\n            projector: memoizedProjector.memoized,\n            setResult: memoizedState.setResult,\n            clearResult: memoizedState.clearResult,\n        });\n    };\n}\nfunction createFeatureSelector(featureName) {\n    return createSelector((state) => {\n        const featureState = state[featureName];\n        if (!isNgrxMockEnvironment() && isDevMode() && !(featureName in state)) {\n            console.warn(`@ngrx/store: The feature name \"${featureName}\" does ` +\n                'not exist in the state, therefore createFeatureSelector ' +\n                'cannot access it.  Be sure it is imported in a loaded module ' +\n                `using StoreModule.forRoot('${featureName}', ...) or ` +\n                `StoreModule.forFeature('${featureName}', ...).  If the default ` +\n                'state is intended to be undefined, as is the case with router ' +\n                'state, this development-only warning message can be ignored.');\n        }\n        return featureState;\n    }, (featureState) => featureState);\n}\n\n/**\n * @description\n * A function that accepts a feature name and a feature reducer, and creates\n * a feature selector and a selector for each feature state property.\n *\n * @param featureConfig An object that contains a feature name and a feature reducer.\n * @returns An object that contains a feature name, a feature reducer,\n * a feature selector, and a selector for each feature state property.\n *\n * @usageNotes\n *\n * **With Application State**\n *\n * ```ts\n * interface AppState {\n *   products: ProductsState;\n * }\n *\n * interface ProductsState {\n *   products: Product[];\n *   selectedId: string | null;\n * }\n *\n * const initialState: ProductsState = {\n *   products: [],\n *   selectedId: null,\n * };\n *\n * // AppState is passed as a generic argument\n * const productsFeature = createFeature<AppState>({\n *   name: 'products',\n *   reducer: createReducer(\n *     initialState,\n *     on(ProductsApiActions.loadSuccess(state, { products }) => ({\n *       ...state,\n *       products,\n *     }),\n *   ),\n * });\n *\n * const {\n *   selectProductsState, // type: MemoizedSelector<AppState, ProductsState>\n *   selectProducts, // type: MemoizedSelector<AppState, Product[]>\n *   selectSelectedId, // type: MemoizedSelector<AppState, string | null>\n * } = productsFeature;\n * ```\n *\n * **Without Application State**\n *\n * ```ts\n * const productsFeature = createFeature({\n *   name: 'products',\n *   reducer: createReducer(initialState),\n * });\n *\n * const {\n *   selectProductsState, // type: MemoizedSelector<Record<string, any>, ProductsState>\n *   selectProducts, // type: MemoizedSelector<Record<string, any>, Product[]>\n *   selectSelectedId, // type: MemoizedSelector<Record<string, any, string | null>\n * } = productsFeature;\n * ```\n */\nfunction createFeature(featureConfig) {\n    const { name, reducer } = featureConfig;\n    const featureSelector = createFeatureSelector(name);\n    const nestedSelectors = createNestedSelectors(featureSelector, reducer);\n    return Object.assign({ name,\n        reducer, [`select${capitalize(name)}State`]: featureSelector }, nestedSelectors);\n}\nfunction createNestedSelectors(featureSelector, reducer) {\n    const initialState = getInitialState(reducer);\n    const nestedKeys = (isPlainObject(initialState)\n        ? Object.keys(initialState)\n        : []);\n    return nestedKeys.reduce((nestedSelectors, nestedKey) => (Object.assign(Object.assign({}, nestedSelectors), { [`select${capitalize(nestedKey)}`]: createSelector(featureSelector, (parentState) => parentState === null || parentState === void 0 ? void 0 : parentState[nestedKey]) })), {});\n}\nfunction getInitialState(reducer) {\n    return reducer(undefined, { type: '@ngrx/feature/init' });\n}\n\nfunction immutabilityCheckMetaReducer(reducer, checks) {\n    return function (state, action) {\n        const act = checks.action(action) ? freeze(action) : action;\n        const nextState = reducer(state, act);\n        return checks.state() ? freeze(nextState) : nextState;\n    };\n}\nfunction freeze(target) {\n    Object.freeze(target);\n    const targetIsFunction = isFunction(target);\n    Object.getOwnPropertyNames(target).forEach((prop) => {\n        // Ignore Ivy properties, ref: https://github.com/ngrx/platform/issues/2109#issuecomment-582689060\n        if (prop.startsWith('ɵ')) {\n            return;\n        }\n        if (hasOwnProperty(target, prop) &&\n            (targetIsFunction\n                ? prop !== 'caller' && prop !== 'callee' && prop !== 'arguments'\n                : true)) {\n            const propValue = target[prop];\n            if ((isObjectLike(propValue) || isFunction(propValue)) &&\n                !Object.isFrozen(propValue)) {\n                freeze(propValue);\n            }\n        }\n    });\n    return target;\n}\n\nfunction serializationCheckMetaReducer(reducer, checks) {\n    return function (state, action) {\n        if (checks.action(action)) {\n            const unserializableAction = getUnserializable(action);\n            throwIfUnserializable(unserializableAction, 'action');\n        }\n        const nextState = reducer(state, action);\n        if (checks.state()) {\n            const unserializableState = getUnserializable(nextState);\n            throwIfUnserializable(unserializableState, 'state');\n        }\n        return nextState;\n    };\n}\nfunction getUnserializable(target, path = []) {\n    // Guard against undefined and null, e.g. a reducer that returns undefined\n    if ((isUndefined(target) || isNull(target)) && path.length === 0) {\n        return {\n            path: ['root'],\n            value: target,\n        };\n    }\n    const keys = Object.keys(target);\n    return keys.reduce((result, key) => {\n        if (result) {\n            return result;\n        }\n        const value = target[key];\n        // Ignore Ivy components\n        if (isComponent(value)) {\n            return result;\n        }\n        if (isUndefined(value) ||\n            isNull(value) ||\n            isNumber(value) ||\n            isBoolean(value) ||\n            isString(value) ||\n            isArray(value)) {\n            return false;\n        }\n        if (isPlainObject(value)) {\n            return getUnserializable(value, [...path, key]);\n        }\n        return {\n            path: [...path, key],\n            value,\n        };\n    }, false);\n}\nfunction throwIfUnserializable(unserializable, context) {\n    if (unserializable === false) {\n        return;\n    }\n    const unserializablePath = unserializable.path.join('.');\n    const error = new Error(`Detected unserializable ${context} at \"${unserializablePath}\". ${RUNTIME_CHECK_URL}#strict${context}serializability`);\n    error.value = unserializable.value;\n    error.unserializablePath = unserializablePath;\n    throw error;\n}\n\nfunction inNgZoneAssertMetaReducer(reducer, checks) {\n    return function (state, action) {\n        if (checks.action(action) && !i0.NgZone.isInAngularZone()) {\n            throw new Error(`Action '${action.type}' running outside NgZone. ${RUNTIME_CHECK_URL}#strictactionwithinngzone`);\n        }\n        return reducer(state, action);\n    };\n}\n\nfunction createActiveRuntimeChecks(runtimeChecks) {\n    if (isDevMode()) {\n        return Object.assign({ strictStateSerializability: false, strictActionSerializability: false, strictStateImmutability: true, strictActionImmutability: true, strictActionWithinNgZone: false, strictActionTypeUniqueness: false }, runtimeChecks);\n    }\n    return {\n        strictStateSerializability: false,\n        strictActionSerializability: false,\n        strictStateImmutability: false,\n        strictActionImmutability: false,\n        strictActionWithinNgZone: false,\n        strictActionTypeUniqueness: false,\n    };\n}\nfunction createSerializationCheckMetaReducer({ strictActionSerializability, strictStateSerializability, }) {\n    return (reducer) => strictActionSerializability || strictStateSerializability\n        ? serializationCheckMetaReducer(reducer, {\n            action: (action) => strictActionSerializability && !ignoreNgrxAction(action),\n            state: () => strictStateSerializability,\n        })\n        : reducer;\n}\nfunction createImmutabilityCheckMetaReducer({ strictActionImmutability, strictStateImmutability, }) {\n    return (reducer) => strictActionImmutability || strictStateImmutability\n        ? immutabilityCheckMetaReducer(reducer, {\n            action: (action) => strictActionImmutability && !ignoreNgrxAction(action),\n            state: () => strictStateImmutability,\n        })\n        : reducer;\n}\nfunction ignoreNgrxAction(action) {\n    return action.type.startsWith('@ngrx');\n}\nfunction createInNgZoneCheckMetaReducer({ strictActionWithinNgZone, }) {\n    return (reducer) => strictActionWithinNgZone\n        ? inNgZoneAssertMetaReducer(reducer, {\n            action: (action) => strictActionWithinNgZone && !ignoreNgrxAction(action),\n        })\n        : reducer;\n}\nfunction provideRuntimeChecks(runtimeChecks) {\n    return [\n        {\n            provide: _USER_RUNTIME_CHECKS,\n            useValue: runtimeChecks,\n        },\n        {\n            provide: USER_RUNTIME_CHECKS,\n            useFactory: _runtimeChecksFactory,\n            deps: [_USER_RUNTIME_CHECKS],\n        },\n        {\n            provide: ACTIVE_RUNTIME_CHECKS,\n            deps: [USER_RUNTIME_CHECKS],\n            useFactory: createActiveRuntimeChecks,\n        },\n        {\n            provide: META_REDUCERS,\n            multi: true,\n            deps: [ACTIVE_RUNTIME_CHECKS],\n            useFactory: createImmutabilityCheckMetaReducer,\n        },\n        {\n            provide: META_REDUCERS,\n            multi: true,\n            deps: [ACTIVE_RUNTIME_CHECKS],\n            useFactory: createSerializationCheckMetaReducer,\n        },\n        {\n            provide: META_REDUCERS,\n            multi: true,\n            deps: [ACTIVE_RUNTIME_CHECKS],\n            useFactory: createInNgZoneCheckMetaReducer,\n        },\n    ];\n}\nfunction checkForActionTypeUniqueness() {\n    return [\n        {\n            provide: _ACTION_TYPE_UNIQUENESS_CHECK,\n            multi: true,\n            deps: [ACTIVE_RUNTIME_CHECKS],\n            useFactory: _actionTypeUniquenessCheck,\n        },\n    ];\n}\nfunction _runtimeChecksFactory(runtimeChecks) {\n    return runtimeChecks;\n}\nfunction _actionTypeUniquenessCheck(config) {\n    if (!config.strictActionTypeUniqueness) {\n        return;\n    }\n    const duplicates = Object.entries(REGISTERED_ACTION_TYPES)\n        .filter(([, registrations]) => registrations > 1)\n        .map(([type]) => type);\n    if (duplicates.length) {\n        throw new Error(`Action types are registered more than once, ${duplicates\n            .map((type) => `\"${type}\"`)\n            .join(', ')}. ${RUNTIME_CHECK_URL}#strictactiontypeuniqueness`);\n    }\n}\n\nclass StoreRootModule {\n    constructor(actions$, reducer$, scannedActions$, store, guard, actionCheck) { }\n}\n/** @nocollapse */ /** @nocollapse */ StoreRootModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.0.0\", ngImport: i0, type: StoreRootModule, deps: [{ token: ActionsSubject }, { token: ReducerObservable }, { token: ScannedActionsSubject }, { token: Store }, { token: _ROOT_STORE_GUARD, optional: true }, { token: _ACTION_TYPE_UNIQUENESS_CHECK, optional: true }], target: i0.ɵɵFactoryTarget.NgModule });\n/** @nocollapse */ /** @nocollapse */ StoreRootModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"12.0.0\", version: \"13.0.0\", ngImport: i0, type: StoreRootModule });\n/** @nocollapse */ /** @nocollapse */ StoreRootModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"13.0.0\", ngImport: i0, type: StoreRootModule });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.0.0\", ngImport: i0, type: StoreRootModule, decorators: [{\n            type: NgModule,\n            args: [{}]\n        }], ctorParameters: function () {\n        return [{ type: ActionsSubject }, { type: ReducerObservable }, { type: ScannedActionsSubject }, { type: Store }, { type: undefined, decorators: [{\n                        type: Optional\n                    }, {\n                        type: Inject,\n                        args: [_ROOT_STORE_GUARD]\n                    }] }, { type: undefined, decorators: [{\n                        type: Optional\n                    }, {\n                        type: Inject,\n                        args: [_ACTION_TYPE_UNIQUENESS_CHECK]\n                    }] }];\n    } });\nclass StoreFeatureModule {\n    constructor(features, featureReducers, reducerManager, root, actionCheck) {\n        this.features = features;\n        this.featureReducers = featureReducers;\n        this.reducerManager = reducerManager;\n        const feats = features.map((feature, index) => {\n            const featureReducerCollection = featureReducers.shift();\n            // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n            const reducers = featureReducerCollection /*TODO(#823)*/[index];\n            return Object.assign(Object.assign({}, feature), { reducers, initialState: _initialStateFactory(feature.initialState) });\n        });\n        reducerManager.addFeatures(feats);\n    }\n    // eslint-disable-next-line @angular-eslint/contextual-lifecycle\n    ngOnDestroy() {\n        this.reducerManager.removeFeatures(this.features);\n    }\n}\n/** @nocollapse */ /** @nocollapse */ StoreFeatureModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.0.0\", ngImport: i0, type: StoreFeatureModule, deps: [{ token: _STORE_FEATURES }, { token: FEATURE_REDUCERS }, { token: ReducerManager }, { token: StoreRootModule }, { token: _ACTION_TYPE_UNIQUENESS_CHECK, optional: true }], target: i0.ɵɵFactoryTarget.NgModule });\n/** @nocollapse */ /** @nocollapse */ StoreFeatureModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"12.0.0\", version: \"13.0.0\", ngImport: i0, type: StoreFeatureModule });\n/** @nocollapse */ /** @nocollapse */ StoreFeatureModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"13.0.0\", ngImport: i0, type: StoreFeatureModule });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.0.0\", ngImport: i0, type: StoreFeatureModule, decorators: [{\n            type: NgModule,\n            args: [{}]\n        }], ctorParameters: function () {\n        return [{ type: undefined, decorators: [{\n                        type: Inject,\n                        args: [_STORE_FEATURES]\n                    }] }, { type: undefined, decorators: [{\n                        type: Inject,\n                        args: [FEATURE_REDUCERS]\n                    }] }, { type: ReducerManager }, { type: StoreRootModule }, { type: undefined, decorators: [{\n                        type: Optional\n                    }, {\n                        type: Inject,\n                        args: [_ACTION_TYPE_UNIQUENESS_CHECK]\n                    }] }];\n    } });\nclass StoreModule {\n    static forRoot(reducers, config = {}) {\n        return {\n            ngModule: StoreRootModule,\n            providers: [\n                {\n                    provide: _ROOT_STORE_GUARD,\n                    useFactory: _provideForRootGuard,\n                    deps: [[Store, new Optional(), new SkipSelf()]],\n                },\n                { provide: _INITIAL_STATE, useValue: config.initialState },\n                {\n                    provide: INITIAL_STATE,\n                    useFactory: _initialStateFactory,\n                    deps: [_INITIAL_STATE],\n                },\n                { provide: _INITIAL_REDUCERS, useValue: reducers },\n                {\n                    provide: _STORE_REDUCERS,\n                    useExisting: reducers instanceof InjectionToken ? reducers : _INITIAL_REDUCERS,\n                },\n                {\n                    provide: INITIAL_REDUCERS,\n                    deps: [Injector, _INITIAL_REDUCERS, [new Inject(_STORE_REDUCERS)]],\n                    useFactory: _createStoreReducers,\n                },\n                {\n                    provide: USER_PROVIDED_META_REDUCERS,\n                    useValue: config.metaReducers ? config.metaReducers : [],\n                },\n                {\n                    provide: _RESOLVED_META_REDUCERS,\n                    deps: [META_REDUCERS, USER_PROVIDED_META_REDUCERS],\n                    useFactory: _concatMetaReducers,\n                },\n                {\n                    provide: _REDUCER_FACTORY,\n                    useValue: config.reducerFactory\n                        ? config.reducerFactory\n                        : combineReducers,\n                },\n                {\n                    provide: REDUCER_FACTORY,\n                    deps: [_REDUCER_FACTORY, _RESOLVED_META_REDUCERS],\n                    useFactory: createReducerFactory,\n                },\n                ACTIONS_SUBJECT_PROVIDERS,\n                REDUCER_MANAGER_PROVIDERS,\n                SCANNED_ACTIONS_SUBJECT_PROVIDERS,\n                STATE_PROVIDERS,\n                STORE_PROVIDERS,\n                provideRuntimeChecks(config.runtimeChecks),\n                checkForActionTypeUniqueness(),\n            ],\n        };\n    }\n    static forFeature(featureNameOrSlice, reducers, config = {}) {\n        return {\n            ngModule: StoreFeatureModule,\n            providers: [\n                {\n                    provide: _FEATURE_CONFIGS,\n                    multi: true,\n                    useValue: featureNameOrSlice instanceof Object ? {} : config,\n                },\n                {\n                    provide: STORE_FEATURES,\n                    multi: true,\n                    useValue: {\n                        key: featureNameOrSlice instanceof Object\n                            ? featureNameOrSlice.name\n                            : featureNameOrSlice,\n                        reducerFactory: !(config instanceof InjectionToken) && config.reducerFactory\n                            ? config.reducerFactory\n                            : combineReducers,\n                        metaReducers: !(config instanceof InjectionToken) && config.metaReducers\n                            ? config.metaReducers\n                            : [],\n                        initialState: !(config instanceof InjectionToken) && config.initialState\n                            ? config.initialState\n                            : undefined,\n                    },\n                },\n                {\n                    provide: _STORE_FEATURES,\n                    deps: [Injector, _FEATURE_CONFIGS, STORE_FEATURES],\n                    useFactory: _createFeatureStore,\n                },\n                {\n                    provide: _FEATURE_REDUCERS,\n                    multi: true,\n                    useValue: featureNameOrSlice instanceof Object\n                        ? featureNameOrSlice.reducer\n                        : reducers,\n                },\n                {\n                    provide: _FEATURE_REDUCERS_TOKEN,\n                    multi: true,\n                    useExisting: reducers instanceof InjectionToken ? reducers : _FEATURE_REDUCERS,\n                },\n                {\n                    provide: FEATURE_REDUCERS,\n                    multi: true,\n                    deps: [\n                        Injector,\n                        _FEATURE_REDUCERS,\n                        [new Inject(_FEATURE_REDUCERS_TOKEN)],\n                    ],\n                    useFactory: _createFeatureReducers,\n                },\n                checkForActionTypeUniqueness(),\n            ],\n        };\n    }\n}\n/** @nocollapse */ /** @nocollapse */ StoreModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.0.0\", ngImport: i0, type: StoreModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\n/** @nocollapse */ /** @nocollapse */ StoreModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"12.0.0\", version: \"13.0.0\", ngImport: i0, type: StoreModule });\n/** @nocollapse */ /** @nocollapse */ StoreModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"13.0.0\", ngImport: i0, type: StoreModule });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.0.0\", ngImport: i0, type: StoreModule, decorators: [{\n            type: NgModule,\n            args: [{}]\n        }] });\nfunction _createStoreReducers(injector, reducers) {\n    return reducers instanceof InjectionToken ? injector.get(reducers) : reducers;\n}\nfunction _createFeatureStore(injector, configs, featureStores) {\n    return featureStores.map((feat, index) => {\n        if (configs[index] instanceof InjectionToken) {\n            const conf = injector.get(configs[index]);\n            return {\n                key: feat.key,\n                reducerFactory: conf.reducerFactory\n                    ? conf.reducerFactory\n                    : combineReducers,\n                metaReducers: conf.metaReducers ? conf.metaReducers : [],\n                initialState: conf.initialState,\n            };\n        }\n        return feat;\n    });\n}\nfunction _createFeatureReducers(injector, reducerCollection) {\n    const reducers = reducerCollection.map((reducer) => {\n        return reducer instanceof InjectionToken ? injector.get(reducer) : reducer;\n    });\n    return reducers;\n}\nfunction _initialStateFactory(initialState) {\n    if (typeof initialState === 'function') {\n        return initialState();\n    }\n    return initialState;\n}\nfunction _concatMetaReducers(metaReducers, userProvidedMetaReducers) {\n    return metaReducers.concat(userProvidedMetaReducers);\n}\nfunction _provideForRootGuard(store) {\n    if (store) {\n        throw new TypeError(`StoreModule.forRoot() called twice. Feature modules should use StoreModule.forFeature() instead.`);\n    }\n    return 'guarded';\n}\n\n/**\n * @description\n * Associates actions with a given state change function.\n * A state change function must be provided as the last parameter.\n *\n * @param args `ActionCreator`'s followed by a state change function.\n *\n * @returns an association of action types with a state change function.\n *\n * @usageNotes\n * ```ts\n * on(AuthApiActions.loginSuccess, (state, { user }) => ({ ...state, user }))\n * ```\n */\nfunction on(...args) {\n    // This could be refactored when TS releases the version with this fix:\n    // https://github.com/microsoft/TypeScript/pull/41544\n    const reducer = args.pop();\n    const types = args.map((creator) => creator.type);\n    return { reducer, types };\n}\n/**\n * @description\n * Creates a reducer function to handle state transitions.\n *\n * Reducer creators reduce the explicitness of reducer functions with switch statements.\n *\n * @param initialState Provides a state value if the current state is `undefined`, as it is initially.\n * @param ons Associations between actions and state changes.\n * @returns A reducer function.\n *\n * @usageNotes\n *\n * - Must be used with `ActionCreator`'s (returned by `createAction`). Cannot be used with class-based action creators.\n * - The returned `ActionReducer` should additionally be wrapped with another function, if you are using View Engine AOT.\n * In case you are using Ivy (or only JIT View Engine) the extra wrapper function is not required.\n *\n * **Declaring a reducer creator**\n *\n * ```ts\n * export const reducer = createReducer(\n *   initialState,\n *   on(\n *     featureActions.actionOne,\n *     featureActions.actionTwo,\n *     (state, { updatedValue }) => ({ ...state, prop: updatedValue })\n *   ),\n *   on(featureActions.actionThree, () => initialState);\n * );\n * ```\n *\n * **Declaring a reducer creator using a wrapper function (Only needed if using View Engine AOT)**\n *\n * ```ts\n * const featureReducer = createReducer(\n *   initialState,\n *   on(\n *     featureActions.actionOne,\n *     featureActions.actionTwo,\n *     (state, { updatedValue }) => ({ ...state, prop: updatedValue })\n *   ),\n *   on(featureActions.actionThree, () => initialState);\n * );\n *\n * export function reducer(state: State | undefined, action: Action) {\n *   return featureReducer(state, action);\n * }\n * ```\n */\nfunction createReducer(initialState, ...ons) {\n    const map = new Map();\n    for (const on of ons) {\n        for (const type of on.types) {\n            const existingReducer = map.get(type);\n            if (existingReducer) {\n                const newReducer = (state, action) => on.reducer(existingReducer(state, action), action);\n                map.set(type, newReducer);\n            }\n            else {\n                map.set(type, on.reducer);\n            }\n        }\n    }\n    return function (state = initialState, action) {\n        const reducer = map.get(action.type);\n        return reducer ? reducer(state, action) : state;\n    };\n}\n\n/**\n * DO NOT EDIT\n *\n * This file is automatically generated at build\n */\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { ACTIVE_RUNTIME_CHECKS, ActionsSubject, FEATURE_REDUCERS, INIT, INITIAL_REDUCERS, INITIAL_STATE, META_REDUCERS, REDUCER_FACTORY, ReducerManager, ReducerManagerDispatcher, ReducerObservable, STORE_FEATURES, ScannedActionsSubject, State, StateObservable, Store, StoreFeatureModule, StoreModule, StoreRootModule, UPDATE, USER_PROVIDED_META_REDUCERS, USER_RUNTIME_CHECKS, combineReducers, compose, createAction, createFeature, createFeatureSelector, createReducer, createReducerFactory, createSelector, createSelectorFactory, defaultMemoize, defaultStateFn, isNgrxMockEnvironment, on, props, reduceState, resultMemoize, select, setNgrxMockEnvironment, union };\n"]},"metadata":{},"sourceType":"module"}