@ngxs/store 3.7.5 → 3.7.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/ngxs-store.umd.js +605 -483
- package/bundles/ngxs-store.umd.js.map +1 -1
- package/bundles/ngxs-store.umd.min.js +1 -1
- package/bundles/ngxs-store.umd.min.js.map +1 -1
- package/esm2015/ngxs-store.js +6 -5
- package/esm2015/src/actions-stream.js +16 -4
- package/esm2015/src/internal/dispatcher.js +14 -36
- package/esm2015/src/internal/error-handler.js +118 -0
- package/esm2015/src/internal/internals.js +2 -27
- package/esm2015/src/internal/lifecycle-state-manager.js +85 -38
- package/esm2015/src/internal/state-context-factory.js +1 -12
- package/esm2015/src/internal/state-factory.js +4 -4
- package/esm5/ngxs-store.js +6 -5
- package/esm5/src/actions-stream.js +22 -5
- package/esm5/src/internal/dispatcher.js +13 -37
- package/esm5/src/internal/error-handler.js +125 -0
- package/esm5/src/internal/internals.js +2 -27
- package/esm5/src/internal/lifecycle-state-manager.js +97 -50
- package/esm5/src/internal/state-context-factory.js +1 -12
- package/esm5/src/internal/state-factory.js +4 -4
- package/fesm2015/ngxs-store.js +453 -341
- package/fesm2015/ngxs-store.js.map +1 -1
- package/fesm5/ngxs-store.js +602 -481
- package/fesm5/ngxs-store.js.map +1 -1
- package/ngxs-store.d.ts +6 -5
- package/ngxs-store.metadata.json +1 -1
- package/package.json +2 -2
- package/src/actions-stream.d.ts +3 -1
- package/src/internal/dispatcher.d.ts +3 -4
- package/src/internal/error-handler.d.ts +23 -0
- package/src/internal/internals.d.ts +1 -6
- package/src/internal/lifecycle-state-manager.d.ts +16 -15
|
@@ -12,5 +12,5 @@
|
|
|
12
12
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
13
13
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
14
14
|
PERFORMANCE OF THIS SOFTWARE.
|
|
15
|
-
***************************************************************************** */var a=function(t,e){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function u(t,e){function n(){this.constructor=t}a(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var c=function(){return(c=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};function s(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function p(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function f(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(p(arguments[e]));return t}var l=function(){function t(t,n){this._ngZone=t,this._platformId=n,("undefined"==typeof ngDevMode||ngDevMode)&&function(t){if(t instanceof e.NgZone)return;console.warn("Your application was bootstrapped with nooped zone and your execution strategy requires an actual NgZone!\nPlease set the value of the executionStrategy property to NoopNgxsExecutionStrategy.\nNgxsModule.forRoot(states, { executionStrategy: NoopNgxsExecutionStrategy })")}(t)}return t.prototype.enter=function(t){return r.isPlatformServer(this._platformId)?this.runInsideAngular(t):this.runOutsideAngular(t)},t.prototype.leave=function(t){return this.runInsideAngular(t)},t.prototype.runInsideAngular=function(t){return e.NgZone.isInAngularZone()?t():this._ngZone.run(t)},t.prototype.runOutsideAngular=function(t){return e.NgZone.isInAngularZone()?this._ngZone.runOutsideAngular(t):t()},t.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],t.ctorParameters=function(){return[{type:e.NgZone},{type:String,decorators:[{type:e.Inject,args:[e.PLATFORM_ID]}]}]},t.ngInjectableDef=e.defineInjectable({factory:function(){return new t(e.inject(e.NgZone),e.inject(e.PLATFORM_ID))},token:t,providedIn:"root"}),t}();var h=new e.InjectionToken("ROOT_STATE_TOKEN"),y=new e.InjectionToken("FEATURE_STATE_TOKEN"),d=new e.InjectionToken("NGXS_PLUGINS"),g="NGXS_META",v="NGXS_OPTIONS_META",S="NGXS_SELECTOR_META",m=function(){function t(){this.defaultsState={},this.selectorOptions={injectContainerState:!0,suppressErrors:!0},this.compatibility={strictContentSecurityPolicy:!1},this.executionStrategy=l}return t.decorators=[{type:e.Injectable}],t.ctorParameters=function(){return[]},t}();var _=function(t,e,n){this.previousValue=t,this.currentValue=e,this.firstChange=n};var O=function(){function t(){}return t.prototype.enter=function(t){return t()},t.prototype.leave=function(t){return t()},t.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],t.ngInjectableDef=e.defineInjectable({factory:function(){return new t},token:t,providedIn:"root"}),t}(),b=new e.InjectionToken("USER_PROVIDED_NGXS_EXECUTION_STRATEGY"),x=new e.InjectionToken("NGXS_EXECUTION_STRATEGY",{providedIn:"root",factory:function(){var t=e.inject(e.INJECTOR),n=t.get(b);return n?t.get(n):t.get(void 0!==e.ɵglobal.Zone?l:O)}});function E(t){return t.constructor&&t.constructor.type?t.constructor.type:t.type}var I=function(t,e,n){t=c({},t);var r=e.split("."),o=r.length-1;return r.reduce((function(t,e,r){return t[e]=r===o?n:Array.isArray(t[e])?t[e].slice():c({},t[e]),t&&t[e]}),t),t},T=function(t,e){return e.split(".").reduce((function(t,e){return t&&t[e]}),t)},A=function(t){return t&&"object"==typeof t&&!Array.isArray(t)},j=function(t){for(var e,n,r=[],o=1;o<arguments.length;o++)r[o-1]=arguments[o];if(!r.length)return t;var i=r.shift();if(A(t)&&A(i))for(var a in i)A(i[a])?(t[a]||Object.assign(t,((e={})[a]={},e)),j(t[a],i[a])):Object.assign(t,((n={})[a]=i[a],n));return j.apply(void 0,f([t],r))};function N(t){if(!t.hasOwnProperty(g)){var e={name:null,actions:{},defaults:{},path:null,makeRootSelector:function(t){return t.getStateGetter(e.name)},children:[]};Object.defineProperty(t,g,{value:e})}return w(t)}function w(t){return t[g]}function P(t){if(!t.hasOwnProperty(S)){Object.defineProperty(t,S,{value:{makeRootSelector:null,originalFn:null,containerClass:null,selectorName:null,getSelectorOptions:function(){return{}}}})}return C(t)}function C(t){return t[S]}function R(t,e){return e&&e.compatibility&&e.compatibility.strictContentSecurityPolicy?function(t){var e=t.slice();return(function(t){return e.reduce((function(t,e){return t&&t[e]}),t)})}(t):function(t){for(var e=t,n="store."+e[0],r=0,o=e.length,i=n;++r<o;)i=i+" && "+(n=n+"."+e[r]);return new Function("store","return "+i+";")}(t)}function M(t,e){var n=T(e.currentAppState,t.path),r=T(e.newAppState,t.path);return new _(n,r,!t.isInitialised)}function D(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return F(t,["DISPATCHED"])}function F(t,e,n){void 0===n&&(n=B);var r=t.reduce((function(t,e){return t[E(e)]=!0,t}),{}),o=e&&function(t){return t.reduce((function(t,e){return t[e]=!0,t}),{})}(e);return function(t){return t.pipe(function(t,e){return i.filter((function(n){var r=E(n.action),o=t[r],i=!e||e[n.status];return o&&i}))}(r,o),n())}}function k(){return i.map((function(t){var e=t.action,n=t.status;return({action:e,result:{successful:"SUCCESSFUL"===n,canceled:"CANCELED"===n,error:t.error}})}))}function B(){return i.map((function(t){return t.action}))}function U(t){return function(e){return new o.Observable((function(n){return e.subscribe({next:function(e){t.leave((function(){return n.next(e)}))},error:function(e){t.leave((function(){return n.error(e)}))},complete:function(){t.leave((function(){return n.complete()}))}})}))}}var L=function(){function t(t){this._executionStrategy=t}return t.prototype.enter=function(t){return this._executionStrategy.enter(t)},t.prototype.leave=function(t){return this._executionStrategy.leave(t)},t.decorators=[{type:e.Injectable}],t.ctorParameters=function(){return[{type:void 0,decorators:[{type:e.Inject,args:[x]}]}]},t}();var G=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._itemQueue=[],e._busyPushingNext=!1,e}return u(e,t),e.prototype.next=function(e){if(this._busyPushingNext)this._itemQueue.unshift(e);else{for(this._busyPushingNext=!0,t.prototype.next.call(this,e);this._itemQueue.length>0;){var n=this._itemQueue.pop();t.prototype.next.call(this,n)}this._busyPushingNext=!1}},e}(o.Subject);var H=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return u(n,t),n.decorators=[{type:e.Injectable}],n}(G),X=function(t){function n(e,n){return t.call(this,(function(t){var r=e.pipe(U(n)).subscribe({next:function(e){return t.next(e)},error:function(e){return t.error(e)},complete:function(){return t.complete()}});t.add(r)}))||this}return u(n,t),n.decorators=[{type:e.Injectable}],n.ctorParameters=function(){return[{type:H},{type:L}]},n}(o.Observable),V=function(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=t.shift();return r.apply(void 0,f(e,[function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return V(t).apply(void 0,f(e))}]))}},Z=function(t){function n(){return t.call(this,{})||this}return u(n,t),n.prototype.ngOnDestroy=function(){this.complete()},n.decorators=[{type:e.Injectable}],n.ctorParameters=function(){return[]},n}(o.BehaviorSubject),q=function(){function t(t,e){this._parentManager=t,this._pluginHandlers=e,this.plugins=[],this.registerHandlers()}return Object.defineProperty(t.prototype,"rootPlugins",{get:function(){return this._parentManager&&this._parentManager.plugins||this.plugins},enumerable:!0,configurable:!0}),t.prototype.registerHandlers=function(){var t,e=this.getPluginHandlers();(t=this.rootPlugins).push.apply(t,f(e))},t.prototype.getPluginHandlers=function(){return(this._pluginHandlers||[]).map((function(t){return t.handle?t.handle.bind(t):t}))},t.decorators=[{type:e.Injectable}],t.ctorParameters=function(){return[{type:t,decorators:[{type:e.Optional},{type:e.SkipSelf}]},{type:Array,decorators:[{type:e.Inject,args:[d]},{type:e.Optional}]}]},t}();var z=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return u(n,t),n.decorators=[{type:e.Injectable}],n}(o.Subject),Y=function(){function t(t,e,n,r,o,i){this._injector=t,this._actions=e,this._actionResults=n,this._pluginManager=r,this._stateStream=o,this._ngxsExecutionStrategy=i}return t.prototype.dispatch=function(t){var n=this,r=this._ngxsExecutionStrategy.enter((function(){return n.dispatchByEvents(t)}));return r.subscribe({error:function(t){return n._ngxsExecutionStrategy.leave((function(){try{n._errorHandler=n._errorHandler||n._injector.get(e.ErrorHandler),n._errorHandler.handleError(t)}catch(t){}}))}}),r.pipe(U(this._ngxsExecutionStrategy))},t.prototype.dispatchByEvents=function(t){var e=this;return Array.isArray(t)?0===t.length?o.of(this._stateStream.getValue()):o.forkJoin(t.map((function(t){return e.dispatchSingle(t)}))):this.dispatchSingle(t)},t.prototype.dispatchSingle=function(t){var e=this;if(("undefined"==typeof ngDevMode||ngDevMode)&&!E(t)){var n=new Error("This action doesn't have a type property: "+t.constructor.name);return o.throwError(n)}var r=this._stateStream.getValue(),a=this._pluginManager.plugins;return V(f(a,[function(t,n){t!==r&&e._stateStream.next(t);var o=e.getActionResultStream(n);return o.subscribe((function(t){return e._actions.next(t)})),e._actions.next({action:n,status:"DISPATCHED"}),e.createDispatchObservable(o)}]))(r,t).pipe(i.shareReplay())},t.prototype.getActionResultStream=function(t){return this._actionResults.pipe(i.filter((function(e){return e.action===t&&"DISPATCHED"!==e.status})),i.take(1),i.shareReplay())},t.prototype.createDispatchObservable=function(t){var e=this;return t.pipe(i.exhaustMap((function(t){switch(t.status){case"SUCCESSFUL":return o.of(e._stateStream.getValue());case"ERRORED":return o.throwError(t.error);default:return o.EMPTY}}))).pipe(i.shareReplay())},t.decorators=[{type:e.Injectable}],t.ctorParameters=function(){return[{type:e.Injector},{type:H},{type:z},{type:q},{type:Z},{type:L}]},t}();var K=function(t){Object.freeze(t);var e="function"==typeof t,n=Object.prototype.hasOwnProperty;return Object.getOwnPropertyNames(t).forEach((function(r){!n.call(t,r)||e&&("caller"===r||"callee"===r||"arguments"===r)||null===t[r]||"object"!=typeof t[r]&&"function"!=typeof t[r]||Object.isFrozen(t[r])||K(t[r])})),t},W=function(){function t(t,e,n){this._stateStream=t,this._dispatcher=e,this._config=n}return t.prototype.getRootStateOperations=function(){var t,e=this,n={getState:function(){return e._stateStream.getValue()},setState:function(t){return e._stateStream.next(t)},dispatch:function(t){return e._dispatcher.dispatch(t)}};return("undefined"==typeof ngDevMode||ngDevMode)&&this._config.developmentMode?(t=n,{getState:function(){return t.getState()},setState:function(e){var n=K(e);return t.setState(n)},dispatch:function(e){return t.dispatch(e)}}):n},t.prototype.setStateToTheCurrentWithNew=function(t){var e=this.getRootStateOperations(),n=e.getState();e.setState(c({},n,t.defaults))},t.decorators=[{type:e.Injectable}],t.ctorParameters=function(){return[{type:Z},{type:Y},{type:m}]},t}();function Q(t){return function(e){Array.isArray(t)?function(){throw new Error("Patching arrays is not supported.")}():"object"!=typeof t&&function(){throw new Error("Patching primitives is not supported.")}();var n=c({},e);for(var r in t)n[r]=t[r];return(n)}}var J=function(){function t(t){this._internalStateOperations=t}return t.prototype.createStateContext=function(t){var e=this._internalStateOperations.getRootStateOperations();function n(e){return T(e,t.path)}function r(n,r){var o=I(n,t.path,r),i=t.instance;if(i.ngxsOnChanges){var a=M(t,{currentAppState:n,newAppState:o});i.ngxsOnChanges(a)}return e.setState(o),o}function o(t,e){return r(t,e(n(t)))}return{getState:function(){return n(e.getState())},patchState:function(t){return o(e.getState(),Q(t))},setState:function(t){var n=e.getState();return"function"==typeof t?o(n,t):r(n,t)},dispatch:function(t){return e.dispatch(t)}}},t.decorators=[{type:e.Injectable}],t.ctorParameters=function(){return[{type:W}]},t}();var $=function(){function t(){}return t.checkThatStateIsNamedCorrectly=function(t){t?this.stateNameRegex.test(t)||function(t){throw new Error(t+" is not a valid state name. It needs to be a valid object property name.")}(t):function(){throw new Error("States must register a 'name' property.")}()},t.checkThatStateNameIsUnique=function(t,e,n){var r=n[t];r&&r!==e&&function(t,e,n){throw new Error("State name '"+t+"' from "+e+" already exists in "+n+".")}(t,e.name,r.name)},t.checkThatStateClassesHaveBeenDecorated=function(t){t.forEach((function(t){w(t)||function(t){throw new Error('States must be decorated with @State() decorator, but "'+t+"\" isn't.")}(t.name)}))},t.stateNameRegex=new RegExp("^[a-zA-Z0-9_]+$"),t}();function tt(t){e.ɵivyEnabled&&(t.ɵprov||console.warn("'"+t.name+"' class should be decorated with @Injectable() right after the @State() decorator"))}var et=function(){function t(t,e,r,o,i,a,u){var s=this;this._injector=t,this._config=e,this._parentFactory=r,this._actions=o,this._actionResults=i,this._stateContextFactory=a,this._initialState=u,this._actionsSubscription=null,this._states=[],this._statesByName={},this._statePaths={},this.getRuntimeSelectorContext=n.memoize((function(){var t=s;function e(e){var n=t.statePaths[e];return n?R(n.split("."),t._config):null}return s._parentFactory?s._parentFactory.getRuntimeSelectorContext():{getStateGetter:function(t){var n=e(t);return n||function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return n||(n=e(t)),n?n.apply(void 0,f(r)):void 0}},getSelectorOptions:function(e){var n=t._config.selectorOptions;return c({},n,e||{})}}}))}return Object.defineProperty(t.prototype,"states",{get:function(){return this._parentFactory?this._parentFactory.states:this._states},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"statesByName",{get:function(){return this._parentFactory?this._parentFactory.statesByName:this._statesByName},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"statePaths",{get:function(){return this._parentFactory?this._parentFactory.statePaths:this._statePaths},enumerable:!0,configurable:!0}),t.cloneDefaults=function(t){var e,n={};return Array.isArray(t)?n=t.slice():n="object"==typeof(e=t)&&null!==e||"function"==typeof e?c({},t):void 0===t?{}:t,n},t.prototype.ngOnDestroy=function(){this._actionsSubscription.unsubscribe()},t.prototype.add=function(e){var n,r;("undefined"==typeof ngDevMode||ngDevMode)&&$.checkThatStateClassesHaveBeenDecorated(e);var o=this.addToStatesMap(e).newStates;if(!o.length)return[];var i,a,u,c,p=function(t){var e=function(e){var n=t.find((function(t){return t===e}));if(("undefined"==typeof ngDevMode||ngDevMode)&&!n)throw new Error("Child state not found: "+e+". \r\nYou may have forgotten to add states to module");return(n[g].name)};return t.reduce((function(t,n){var r=n[g],o=r.name,i=r.children;return t[o]=(i||[]).map(e),t}),{})}(o),f=(i=p,a=[],u={},c=function(t,e){void 0===e&&(e=[]),Array.isArray(e)||(e=[]),e.push(t),u[t]=!0,i[t].forEach((function(n){if(("undefined"==typeof ngDevMode||ngDevMode)&&e.indexOf(n)>=0)throw new Error("Circular dependency '"+n+"' is required by '"+t+"': "+e.join(" -> "));u[n]||c(n,e.slice(0))})),a.indexOf(t)<0&&a.push(t)},Object.keys(i).forEach((function(t){return c(t)})),a.reverse()),l=function(t,e){void 0===e&&(e={});var n=function(t,e){for(var r in t)if(t.hasOwnProperty(r)&&t[r].indexOf(e)>=0){var o=n(t,r);return null!==o?o+"."+r:r}return null};for(var r in t)if(t.hasOwnProperty(r)){var o=n(t,r);e[r]=o?o+"."+r:r}return e}(p),h=o.reduce((function(t,e){return t[e[g].name]=e,t}),{}),y=[];try{for(var d=s(f),v=d.next();!v.done;v=d.next()){var S=v.value,m=h[S],_=l[S],O=m[g];this.addRuntimeInfoToMeta(O,_),("undefined"==typeof ngDevMode||ngDevMode)&&tt(m);var b={name:S,path:_,isInitialised:!1,actions:O.actions,instance:this._injector.get(m),defaults:t.cloneDefaults(O.defaults)};this.hasBeenMountedAndBootstrapped(S,_)||y.push(b),this.states.push(b)}}catch(t){n={error:t}}finally{try{v&&!v.done&&(r=d.return)&&r.call(d)}finally{if(n)throw n.error}}return y},t.prototype.addAndReturnDefaults=function(t){var e=t||[],n=this.add(e);return{defaults:n.reduce((function(t,e){return I(t,e.path,e.defaults)}),{}),states:n}},t.prototype.connectActionHandlers=function(){var t=this;if(null===this._actionsSubscription){var e=new o.Subject;this._actionsSubscription=this._actions.pipe(i.filter((function(t){return"DISPATCHED"===t.status})),i.mergeMap((function(n){e.next(n);var r=n.action;return t.invokeActions(e,r).pipe(i.map((function(){return{action:r,status:"SUCCESSFUL"}})),i.defaultIfEmpty({action:r,status:"CANCELED"}),i.catchError((function(t){return o.of({action:r,status:"ERRORED",error:t})})))}))).subscribe((function(e){return t._actionResults.next(e)}))}},t.prototype.invokeActions=function(t,e){var n,r,a,u,c=E(e),p=[];try{for(var f=s(this.states),l=f.next();!l.done;l=f.next()){var h=l.value,y=h.actions[c];if(y)try{for(var d=s(y),g=d.next();!g.done;g=d.next()){var v=g.value,S=this._stateContextFactory.createStateContext(h);try{var m=h.instance[v.fn](S,e);m instanceof Promise&&(m=o.from(m)),m instanceof o.Observable?(m=m.pipe(i.mergeMap((function(t){return t instanceof Promise?o.from(t):t instanceof o.Observable?t:o.of(t)})),i.defaultIfEmpty({})),v.options.cancelUncompleted&&(m=m.pipe(i.takeUntil(t.pipe(D(e)))))):m=o.of({}).pipe(i.shareReplay()),p.push(m)}catch(t){p.push(o.throwError(t))}}}catch(t){a={error:t}}finally{try{g&&!g.done&&(u=d.return)&&u.call(d)}finally{if(a)throw a.error}}}}catch(t){n={error:t}}finally{try{l&&!l.done&&(r=f.return)&&r.call(f)}finally{if(n)throw n.error}}return p.length||p.push(o.of({})),o.forkJoin(p)},t.prototype.addToStatesMap=function(t){var e,n,r=[],o=this.statesByName;try{for(var i=s(t),a=i.next();!a.done;a=i.next()){var u=a.value,c=w(u).name;("undefined"==typeof ngDevMode||ngDevMode)&&$.checkThatStateNameIsUnique(c,u,o),!o[c]&&(r.push(u),o[c]=u)}}catch(t){e={error:t}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return{newStates:r}},t.prototype.addRuntimeInfoToMeta=function(t,e){this.statePaths[t.name]=e,t.path=e},t.prototype.hasBeenMountedAndBootstrapped=function(t,e){var n=void 0!==T(this._initialState,e);return this.statesByName[t]&&n},t.decorators=[{type:e.Injectable}],t.ctorParameters=function(){return[{type:e.Injector},{type:m},{type:t,decorators:[{type:e.Optional},{type:e.SkipSelf}]},{type:H},{type:z},{type:J},{type:void 0,decorators:[{type:e.Optional},{type:e.Inject,args:[n.INITIAL_STATE_TOKEN]}]}]},t}();var nt=function(){function t(t,e,n){this.internalStateOperations=t,this.stateContextFactory=e,this.bootstrapper=n}return t.prototype.ngxsBootstrap=function(t,e){var n=this;this.internalStateOperations.getRootStateOperations().dispatch(t).pipe(i.filter((function(){return!!e})),i.tap((function(){return n.invokeInit(e.states)})),i.mergeMap((function(){return n.bootstrapper.appBootstrapped$})),i.filter((function(t){return!!t}))).subscribe((function(){return n.invokeBootstrap(e.states)}))},t.prototype.invokeInit=function(t){var e,n;try{for(var r=s(t),o=r.next();!o.done;o=r.next()){var i=o.value,a=i.instance;if(a.ngxsOnChanges){var u=M(i,{currentAppState:{},newAppState:this.internalStateOperations.getRootStateOperations().getState()});a.ngxsOnChanges(u)}a.ngxsOnInit&&a.ngxsOnInit(this.getStateContext(i)),i.isInitialised=!0}}catch(t){e={error:t}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}},t.prototype.invokeBootstrap=function(t){var e,n;try{for(var r=s(t),o=r.next();!o.done;o=r.next()){var i=o.value,a=i.instance;a.ngxsAfterBootstrap&&a.ngxsAfterBootstrap(this.getStateContext(i))}}catch(t){e={error:t}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}},t.prototype.getStateContext=function(t){return this.stateContextFactory.createStateContext(t)},t.decorators=[{type:e.Injectable}],t.ctorParameters=function(){return[{type:W},{type:J},{type:n.NgxsBootstrapper}]},t}();var rt={getOptions:function(t){return t&&t.NGXS_SELECTOR_OPTIONS_META||{}},defineOptions:function(t,e){t&&(t.NGXS_SELECTOR_OPTIONS_META=e)}};function ot(t,e,r){var o=r&&r.containerClass,i=n.memoize((function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var i=e.apply(o,t);if(i instanceof Function){var a=n.memoize.apply(null,[i]);return a}return i}));Object.setPrototypeOf(i,e);var a=function(t,e){var n=P(t);n.originalFn=t;var r=function(){return{}};e&&(n.containerClass=e.containerClass,n.selectorName=e.selectorName,r=e.getSelectorOptions||r);var o=c({},n);return n.getSelectorOptions=function(){return function(t,e){return c({},rt.getOptions(t.containerClass)||{},rt.getOptions(t.originalFn)||{},t.getSelectorOptions()||{},e)}(o,r())},n}(e,r);return a.makeRootSelector=function(e){var n=function(t,e,n){void 0===n&&(n=[]);var r=e.getSelectorOptions(),o=t.getSelectorOptions(r),i=function(t,e,n){void 0===t&&(t=[]);var r=[],o=0===t.length||e.injectContainerState;if(n&&o){w(n)&&r.push(n)}t&&r.push.apply(r,f(t));return r}(n,o,e.containerClass).map((function(e){return it(e)(t)}));return{selectorOptions:o,argumentSelectorFunctions:i}}(e,a,t),r=n.argumentSelectorFunctions,o=n.selectorOptions;return(function(t){var e=r.map((function(e){return e(t)}));try{return i.apply(void 0,f(e))}catch(t){if(t instanceof TypeError&&o.suppressErrors)return;throw t}})},i}function it(t){var e=C(t)||w(t);return e&&e.makeRootSelector||function(){return t}}var at=function(){function t(t,e,n,r,a,u){this._stateStream=t,this._internalStateOperations=e,this._config=n,this._internalExecutionStrategy=r,this._stateFactory=a,this._selectableStateStream=this._stateStream.pipe(i.observeOn(o.queueScheduler),U(this._internalExecutionStrategy),i.shareReplay({bufferSize:1,refCount:!0})),this.initStateStream(u)}return t.prototype.dispatch=function(t){return this._internalStateOperations.getRootStateOperations().dispatch(t)},t.prototype.select=function(t){var e=this,n=this.getStoreBoundSelectorFn(t);return this._selectableStateStream.pipe(i.map(n),i.catchError((function(t){var n=e._config.selectorOptions.suppressErrors;return t instanceof TypeError&&n?o.of(void 0):o.throwError(t)})),i.distinctUntilChanged(),U(this._internalExecutionStrategy))},t.prototype.selectOnce=function(t){return this.select(t).pipe(i.take(1))},t.prototype.selectSnapshot=function(t){return this.getStoreBoundSelectorFn(t)(this._stateStream.getValue())},t.prototype.subscribe=function(t){return this._selectableStateStream.pipe(U(this._internalExecutionStrategy)).subscribe(t)},t.prototype.snapshot=function(){return this._internalStateOperations.getRootStateOperations().getState()},t.prototype.reset=function(t){return this._internalStateOperations.getRootStateOperations().setState(t)},t.prototype.getStoreBoundSelectorFn=function(t){return it(t)(this._stateFactory.getRuntimeSelectorContext())},t.prototype.initStateStream=function(t){var e=this._stateStream.value;if(!e||0===Object.keys(e).length){var n=Object.keys(this._config.defaultsState).length>0?c({},this._config.defaultsState,t):t;this._stateStream.next(n)}},t.decorators=[{type:e.Injectable}],t.ctorParameters=function(){return[{type:Z},{type:W},{type:m},{type:L},{type:et},{type:void 0,decorators:[{type:e.Optional},{type:e.Inject,args:[n.INITIAL_STATE_TOKEN]}]}]},t}();var ut=function(){function t(e,n){t.store=e,t.config=n}return t.prototype.ngOnDestroy=function(){t.store=null,t.config=null},t.store=null,t.config=null,t.decorators=[{type:e.Injectable}],t.ctorParameters=function(){return[{type:at},{type:m}]},t}();var ct=function(){function t(){}return Object.defineProperty(t,"type",{get:function(){return"@@INIT"},enumerable:!0,configurable:!0}),t}(),st=function(){function t(t){this.addedStates=t}return Object.defineProperty(t,"type",{get:function(){return"@@UPDATE_STATE"},enumerable:!0,configurable:!0}),t}();var pt=function(){function t(t,e,n,r,o,i){void 0===o&&(o=[]);var a=t.addAndReturnDefaults(o);e.setStateToTheCurrentWithNew(a),t.connectActionHandlers(),i.ngxsBootstrap(new ct,a)}return t.decorators=[{type:e.NgModule}],t.ctorParameters=function(){return[{type:et},{type:W},{type:at},{type:ut},{type:Array,decorators:[{type:e.Optional},{type:e.Inject,args:[h]}]},{type:nt}]},t}(),ft=function(){function t(e,n,r,o,i){void 0===o&&(o=[]);var a=t.flattenStates(o),u=r.addAndReturnDefaults(a);u.states.length&&(n.setStateToTheCurrentWithNew(u),i.ngxsBootstrap(new st(u.defaults),u))}return t.flattenStates=function(t){return void 0===t&&(t=[]),t.reduce((function(t,e){return t.concat(e)}),[])},t.decorators=[{type:e.NgModule}],t.ctorParameters=function(){return[{type:at},{type:W},{type:et},{type:Array,decorators:[{type:e.Optional},{type:e.Inject,args:[y]}]},{type:nt}]},t}(),lt=function(){function t(){}return t.forRoot=function(e,r){return void 0===e&&(e=[]),void 0===r&&(r={}),{ngModule:pt,providers:f([et,J,X,H,n.NgxsBootstrapper,nt,Y,z,W,L,at,Z,ut,q],e,t.ngxsTokenProviders(e,r))}},t.forFeature=function(t){return void 0===t&&(t=[]),{ngModule:ft,providers:f([et,q],t,[{provide:y,multi:!0,useValue:t}])}},t.ngxsTokenProviders=function(r,o){return[{provide:b,useValue:o.executionStrategy},{provide:h,useValue:r},{provide:t.ROOT_OPTIONS,useValue:o},{provide:m,useFactory:t.ngxsConfigFactory,deps:[t.ROOT_OPTIONS]},{provide:e.APP_BOOTSTRAP_LISTENER,useFactory:t.appBootstrapListenerFactory,multi:!0,deps:[n.NgxsBootstrapper]},{provide:n.INITIAL_STATE_TOKEN,useFactory:t.getInitialState},{provide:n.NGXS_STATE_CONTEXT_FACTORY,useExisting:J},{provide:n.NGXS_STATE_FACTORY,useExisting:et}]},t.ngxsConfigFactory=function(t){return j(new m,t)},t.appBootstrapListenerFactory=function(t){return function(){return t.bootstrap()}},t.getInitialState=function(){return n.InitialState.pop()},t.ROOT_OPTIONS=new e.InjectionToken("ROOT_OPTIONS"),t.decorators=[{type:e.NgModule}],t}();var ht=36;function yt(t){return ut.store||function(){throw new Error("You have forgotten to import the NGXS module!")}(),ut.store.select(t)}function dt(t,e,n){return void 0===n&&(n=[]),"string"==typeof(e=e||function(t){var e=t.length-1;return t.charCodeAt(e)===ht?t.slice(0,e):t}(t))?R(n.length?f([e],n):e.split("."),ut.config):e}var gt=function(){function t(t){var e=this;this.name=t,P(this).makeRootSelector=function(t){return t.getStateGetter(e.name)}}return t.prototype.getName=function(){return this.name},t.prototype.toString=function(){return"StateToken["+this.name+"]"},t}();t.Action=function(t,e){return function(n,r){var o,i;("undefined"==typeof ngDevMode||ngDevMode)&&(n.hasOwnProperty("prototype")&&function(){throw new Error("@Action() decorator cannot be used with static methods.")}());var a=N(n.constructor);Array.isArray(t)||(t=[t]);try{for(var u=s(t),c=u.next();!c.done;c=u.next()){var p=c.value.type;a.actions[p]||(a.actions[p]=[]),a.actions[p].push({fn:r,options:e||{},type:p})}}catch(t){o={error:t}}finally{try{c&&!c.done&&(i=u.return)&&i.call(u)}finally{if(o)throw o.error}}}},t.Actions=X,t.InitState=ct,t.NGXS_PLUGINS=d,t.NgxsModule=lt,t.NgxsSimpleChange=_,t.NoopNgxsExecutionStrategy=O,t.Select=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return(function(n,r){var o,i=r.toString(),a="__"+i+"__selector",u=dt(i,t,e);Object.defineProperties(n,((o={})[a]={writable:!0,enumerable:!1,configurable:!0},o[i]={enumerable:!0,configurable:!0,get:function(){return this[a]||(this[a]=yt(u))}},o))})},t.Selector=function(t){return function(e,n,r){("undefined"==typeof ngDevMode||ngDevMode)&&(!(r&&null!==r.value)&&function(){throw new Error("Selectors only work on methods.")}());var o=r.value,i=ot(t,o,{containerClass:e,selectorName:n.toString(),getSelectorOptions:function(){return{}}}),a={configurable:!0,get:function(){return i}};return a.originalFn=o,a}},t.SelectorOptions=function(t){return function(e,n,r){if(n){var o=r.value||r.originalFn;o&&rt.defineOptions(o,t)}else rt.defineOptions(e,t)}},t.State=function(t){return function(e){var n=e,r=N(n),o=Object.getPrototypeOf(n),i=function(e){var n=e[v]||{};return(c({},n,t))}(o);!function(t){var e=t.meta,n=t.inheritedStateClass,r=t.optionsWithInheritance,o=r.children,i=r.defaults,a=r.name,u="string"==typeof a?a:a&&a.getName()||null;if(("undefined"==typeof ngDevMode||ngDevMode)&&$.checkThatStateIsNamedCorrectly(u),n.hasOwnProperty(g)){var s=n[g]||{};e.actions=c({},e.actions,s.actions)}e.children=o,e.defaults=i,e.name=u}({meta:r,inheritedStateClass:o,optionsWithInheritance:i}),n[v]=i}},t.StateStream=Z,t.StateToken=gt,t.Store=at,t.UpdateState=st,t.actionMatcher=function(t){var e=E(t);return(function(t){return e===E(t)})},t.createSelector=ot,t.ensureSelectorMetadata=function(t){return P(t)},t.ensureStoreMetadata=function(t){return N(t)},t.getActionTypeFromInstance=E,t.getSelectorMetadata=function(t){return C(t)},t.getStoreMetadata=function(t){return w(t)},t.getValue=T,t.ofAction=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return F(t)},t.ofActionCanceled=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return F(t,["CANCELED"])},t.ofActionCompleted=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return F(t,["SUCCESSFUL","CANCELED","ERRORED"],k)},t.ofActionDispatched=D,t.ofActionErrored=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return F(t,["ERRORED"])},t.ofActionSuccessful=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return F(t,["SUCCESSFUL"])},t.setValue=I,t.ɵa=G,t.ɵb=H,t.ɵc=h,t.ɵd=y,t.ɵe=S,t.ɵf=m,t.ɵg=j,t.ɵh=b,t.ɵi=x,t.ɵj=pt,t.ɵk=et,t.ɵl=z,t.ɵm=Y,t.ɵn=J,t.ɵo=W,t.ɵp=q,t.ɵq=L,t.ɵr=ut,t.ɵt=N,t.ɵu=w,t.ɵv=P,t.ɵw=C,t.ɵx=nt,t.ɵy=ft,Object.defineProperty(t,"__esModule",{value:!0})}));
|
|
15
|
+
***************************************************************************** */var a=function(t,e){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function u(t,e){function n(){this.constructor=t}a(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var c=function(){return(c=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};function s(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function p(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function f(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(p(arguments[e]));return t}var l=function(){function t(t,n){this._ngZone=t,this._platformId=n,("undefined"==typeof ngDevMode||ngDevMode)&&function(t){if(t instanceof e.NgZone)return;console.warn("Your application was bootstrapped with nooped zone and your execution strategy requires an actual NgZone!\nPlease set the value of the executionStrategy property to NoopNgxsExecutionStrategy.\nNgxsModule.forRoot(states, { executionStrategy: NoopNgxsExecutionStrategy })")}(t)}return t.prototype.enter=function(t){return r.isPlatformServer(this._platformId)?this.runInsideAngular(t):this.runOutsideAngular(t)},t.prototype.leave=function(t){return this.runInsideAngular(t)},t.prototype.runInsideAngular=function(t){return e.NgZone.isInAngularZone()?t():this._ngZone.run(t)},t.prototype.runOutsideAngular=function(t){return e.NgZone.isInAngularZone()?this._ngZone.runOutsideAngular(t):t()},t.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],t.ctorParameters=function(){return[{type:e.NgZone},{type:String,decorators:[{type:e.Inject,args:[e.PLATFORM_ID]}]}]},t.ngInjectableDef=e.defineInjectable({factory:function(){return new t(e.inject(e.NgZone),e.inject(e.PLATFORM_ID))},token:t,providedIn:"root"}),t}();var h=new e.InjectionToken("ROOT_STATE_TOKEN"),y=new e.InjectionToken("FEATURE_STATE_TOKEN"),d=new e.InjectionToken("NGXS_PLUGINS"),g="NGXS_META",v="NGXS_OPTIONS_META",S="NGXS_SELECTOR_META",_=function(){function t(){this.defaultsState={},this.selectorOptions={injectContainerState:!0,suppressErrors:!0},this.compatibility={strictContentSecurityPolicy:!1},this.executionStrategy=l}return t.decorators=[{type:e.Injectable}],t.ctorParameters=function(){return[]},t}();var m=function(t,e,n){this.previousValue=t,this.currentValue=e,this.firstChange=n};var O=function(){function t(){}return t.prototype.enter=function(t){return t()},t.prototype.leave=function(t){return t()},t.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],t.ngInjectableDef=e.defineInjectable({factory:function(){return new t},token:t,providedIn:"root"}),t}(),b=new e.InjectionToken("USER_PROVIDED_NGXS_EXECUTION_STRATEGY"),E=new e.InjectionToken("NGXS_EXECUTION_STRATEGY",{providedIn:"root",factory:function(){var t=e.inject(e.INJECTOR),n=t.get(b);return n?t.get(n):t.get(void 0!==e.ɵglobal.Zone?l:O)}});function x(t){if(!t.hasOwnProperty(g)){var e={name:null,actions:{},defaults:{},path:null,makeRootSelector:function(t){return t.getStateGetter(e.name)},children:[]};Object.defineProperty(t,g,{value:e})}return I(t)}function I(t){return t[g]}function T(t){if(!t.hasOwnProperty(S)){Object.defineProperty(t,S,{value:{makeRootSelector:null,originalFn:null,containerClass:null,selectorName:null,getSelectorOptions:function(){return{}}}})}return j(t)}function j(t){return t[S]}function N(t,e){return e&&e.compatibility&&e.compatibility.strictContentSecurityPolicy?function(t){var e=t.slice();return(function(t){return e.reduce((function(t,e){return t&&t[e]}),t)})}(t):function(t){for(var e=t,n="store."+e[0],r=0,o=e.length,i=n;++r<o;)i=i+" && "+(n=n+"."+e[r]);return new Function("store","return "+i+";")}(t)}function P(t){return t.constructor&&t.constructor.type?t.constructor.type:t.type}var w=function(t,e,n){t=c({},t);var r=e.split("."),o=r.length-1;return r.reduce((function(t,e,r){return t[e]=r===o?n:Array.isArray(t[e])?t[e].slice():c({},t[e]),t&&t[e]}),t),t},A=function(t,e){return e.split(".").reduce((function(t,e){return t&&t[e]}),t)},C=function(t){return t&&"object"==typeof t&&!Array.isArray(t)},R=function(t){for(var e,n,r=[],o=1;o<arguments.length;o++)r[o-1]=arguments[o];if(!r.length)return t;var i=r.shift();if(C(t)&&C(i))for(var a in i)C(i[a])?(t[a]||Object.assign(t,((e={})[a]={},e)),R(t[a],i[a])):Object.assign(t,((n={})[a]=i[a],n));return R.apply(void 0,f([t],r))};function D(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return M(t,["DISPATCHED"])}function M(t,e,n){void 0===n&&(n=k);var r=t.reduce((function(t,e){return t[P(e)]=!0,t}),{}),o=e&&function(t){return t.reduce((function(t,e){return t[e]=!0,t}),{})}(e);return function(t){return t.pipe(function(t,e){return i.filter((function(n){var r=P(n.action),o=t[r],i=!e||e[n.status];return o&&i}))}(r,o),n())}}function F(){return i.map((function(t){var e=t.action,n=t.status;return({action:e,result:{successful:"SUCCESSFUL"===n,canceled:"CANCELED"===n,error:t.error}})}))}function k(){return i.map((function(t){return t.action}))}function B(t){return function(e){return new o.Observable((function(n){return e.subscribe({next:function(e){t.leave((function(){return n.next(e)}))},error:function(e){t.leave((function(){return n.error(e)}))},complete:function(){t.leave((function(){return n.complete()}))}})}))}}var U=function(){function t(t){this._executionStrategy=t}return t.prototype.enter=function(t){return this._executionStrategy.enter(t)},t.prototype.leave=function(t){return this._executionStrategy.leave(t)},t.decorators=[{type:e.Injectable}],t.ctorParameters=function(){return[{type:void 0,decorators:[{type:e.Inject,args:[E]}]}]},t}();var L=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._itemQueue=[],e._busyPushingNext=!1,e}return u(e,t),e.prototype.next=function(e){if(this._busyPushingNext)this._itemQueue.unshift(e);else{for(this._busyPushingNext=!0,t.prototype.next.call(this,e);this._itemQueue.length>0;){var n=this._itemQueue.pop();t.prototype.next.call(this,n)}this._busyPushingNext=!1}},e}(o.Subject);var G=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return u(n,t),n.prototype.ngOnDestroy=function(){this.complete()},n.decorators=[{type:e.Injectable}],n}(L),H=function(t){function n(e,n){var r=e.pipe(B(n),i.share());return t.call(this,(function(t){var e=r.subscribe({next:function(e){return t.next(e)},error:function(e){return t.error(e)},complete:function(){return t.complete()}});t.add(e)}))||this}return u(n,t),n.decorators=[{type:e.Injectable}],n.ctorParameters=function(){return[{type:G},{type:U}]},n}(o.Observable),X=function(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=t.shift();return r.apply(void 0,f(e,[function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return X(t).apply(void 0,f(e))}]))}};var V=function(){function t(t){this._injector=t,this._errorHandler=null}return t.prototype.reportErrorSafely=function(t){null===this._errorHandler&&(this._errorHandler=this._injector.get(e.ErrorHandler));try{this._errorHandler.handleError(t)}catch(t){}},t.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],t.ctorParameters=function(){return[{type:e.Injector}]},t.ngInjectableDef=e.defineInjectable({factory:function(){return new t(e.inject(e.INJECTOR))},token:t,providedIn:"root"}),t}();var Z=function(t){function n(){return t.call(this,{})||this}return u(n,t),n.prototype.ngOnDestroy=function(){this.complete()},n.decorators=[{type:e.Injectable}],n.ctorParameters=function(){return[]},n}(o.BehaviorSubject),q=function(){function t(t,e){this._parentManager=t,this._pluginHandlers=e,this.plugins=[],this.registerHandlers()}return Object.defineProperty(t.prototype,"rootPlugins",{get:function(){return this._parentManager&&this._parentManager.plugins||this.plugins},enumerable:!0,configurable:!0}),t.prototype.registerHandlers=function(){var t,e=this.getPluginHandlers();(t=this.rootPlugins).push.apply(t,f(e))},t.prototype.getPluginHandlers=function(){return(this._pluginHandlers||[]).map((function(t){return t.handle?t.handle.bind(t):t}))},t.decorators=[{type:e.Injectable}],t.ctorParameters=function(){return[{type:t,decorators:[{type:e.Optional},{type:e.SkipSelf}]},{type:Array,decorators:[{type:e.Inject,args:[d]},{type:e.Optional}]}]},t}();var z=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return u(n,t),n.decorators=[{type:e.Injectable}],n}(o.Subject),Y=function(){function t(t,e,n,r,o,i){this._actions=t,this._actionResults=e,this._pluginManager=n,this._stateStream=r,this._ngxsExecutionStrategy=o,this._internalErrorReporter=i}return t.prototype.dispatch=function(t){var e,n,r=this;return this._ngxsExecutionStrategy.enter((function(){return r.dispatchByEvents(t)})).pipe((e=this._internalErrorReporter,n=this._ngxsExecutionStrategy,function(t){var r=!1;return t.subscribe({error:function(t){n.enter((function(){return Promise.resolve().then((function(){r||n.leave((function(){return e.reportErrorSafely(t)}))}))}))}}),new o.Observable((function(e){return r=!0,t.pipe(B(n)).subscribe(e)}))}))},t.prototype.dispatchByEvents=function(t){var e=this;return Array.isArray(t)?0===t.length?o.of(this._stateStream.getValue()):o.forkJoin(t.map((function(t){return e.dispatchSingle(t)}))):this.dispatchSingle(t)},t.prototype.dispatchSingle=function(t){var e=this;if(("undefined"==typeof ngDevMode||ngDevMode)&&!P(t)){var n=new Error("This action doesn't have a type property: "+t.constructor.name);return o.throwError(n)}var r=this._stateStream.getValue(),a=this._pluginManager.plugins;return X(f(a,[function(t,n){t!==r&&e._stateStream.next(t);var o=e.getActionResultStream(n);return o.subscribe((function(t){return e._actions.next(t)})),e._actions.next({action:n,status:"DISPATCHED"}),e.createDispatchObservable(o)}]))(r,t).pipe(i.shareReplay())},t.prototype.getActionResultStream=function(t){return this._actionResults.pipe(i.filter((function(e){return e.action===t&&"DISPATCHED"!==e.status})),i.take(1),i.shareReplay())},t.prototype.createDispatchObservable=function(t){var e=this;return t.pipe(i.exhaustMap((function(t){switch(t.status){case"SUCCESSFUL":return o.of(e._stateStream.getValue());case"ERRORED":return o.throwError(t.error);default:return o.EMPTY}}))).pipe(i.shareReplay())},t.decorators=[{type:e.Injectable}],t.ctorParameters=function(){return[{type:G},{type:z},{type:q},{type:Z},{type:U},{type:V}]},t}();var W=function(t){Object.freeze(t);var e="function"==typeof t,n=Object.prototype.hasOwnProperty;return Object.getOwnPropertyNames(t).forEach((function(r){!n.call(t,r)||e&&("caller"===r||"callee"===r||"arguments"===r)||null===t[r]||"object"!=typeof t[r]&&"function"!=typeof t[r]||Object.isFrozen(t[r])||W(t[r])})),t},$=function(){function t(t,e,n){this._stateStream=t,this._dispatcher=e,this._config=n}return t.prototype.getRootStateOperations=function(){var t,e=this,n={getState:function(){return e._stateStream.getValue()},setState:function(t){return e._stateStream.next(t)},dispatch:function(t){return e._dispatcher.dispatch(t)}};return("undefined"==typeof ngDevMode||ngDevMode)&&this._config.developmentMode?(t=n,{getState:function(){return t.getState()},setState:function(e){var n=W(e);return t.setState(n)},dispatch:function(e){return t.dispatch(e)}}):n},t.prototype.setStateToTheCurrentWithNew=function(t){var e=this.getRootStateOperations(),n=e.getState();e.setState(c({},n,t.defaults))},t.decorators=[{type:e.Injectable}],t.ctorParameters=function(){return[{type:Z},{type:Y},{type:_}]},t}();function K(t){return function(e){Array.isArray(t)?function(){throw new Error("Patching arrays is not supported.")}():"object"!=typeof t&&function(){throw new Error("Patching primitives is not supported.")}();var n=c({},e);for(var r in t)n[r]=t[r];return(n)}}var J=function(){function t(t){this._internalStateOperations=t}return t.prototype.createStateContext=function(t){var e=this._internalStateOperations.getRootStateOperations();function n(e){return A(e,t.path)}function r(n,r){var o=w(n,t.path,r);return e.setState(o),o}function o(t,e){return r(t,e(n(t)))}return{getState:function(){return n(e.getState())},patchState:function(t){return o(e.getState(),K(t))},setState:function(t){var n=e.getState();return"function"==typeof t?o(n,t):r(n,t)},dispatch:function(t){return e.dispatch(t)}}},t.decorators=[{type:e.Injectable}],t.ctorParameters=function(){return[{type:$}]},t}();var Q=function(){function t(){}return t.checkThatStateIsNamedCorrectly=function(t){t?this.stateNameRegex.test(t)||function(t){throw new Error(t+" is not a valid state name. It needs to be a valid object property name.")}(t):function(){throw new Error("States must register a 'name' property.")}()},t.checkThatStateNameIsUnique=function(t,e,n){var r=n[t];r&&r!==e&&function(t,e,n){throw new Error("State name '"+t+"' from "+e+" already exists in "+n+".")}(t,e.name,r.name)},t.checkThatStateClassesHaveBeenDecorated=function(t){t.forEach((function(t){I(t)||function(t){throw new Error('States must be decorated with @State() decorator, but "'+t+"\" isn't.")}(t.name)}))},t.stateNameRegex=new RegExp("^[a-zA-Z0-9_]+$"),t}();function tt(t){e.ɵivyEnabled&&(t.ɵprov||console.warn("'"+t.name+"' class should be decorated with @Injectable() right after the @State() decorator"))}var et=function(){function t(t,e,r,o,i,a,u){var s=this;this._injector=t,this._config=e,this._parentFactory=r,this._actions=o,this._actionResults=i,this._stateContextFactory=a,this._initialState=u,this._actionsSubscription=null,this._states=[],this._statesByName={},this._statePaths={},this.getRuntimeSelectorContext=n.memoize((function(){var t=s;function e(e){var n=t.statePaths[e];return n?N(n.split("."),t._config):null}return s._parentFactory?s._parentFactory.getRuntimeSelectorContext():{getStateGetter:function(t){var n=e(t);return n||function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return n||(n=e(t)),n?n.apply(void 0,f(r)):void 0}},getSelectorOptions:function(e){var n=t._config.selectorOptions;return c({},n,e||{})}}}))}return Object.defineProperty(t.prototype,"states",{get:function(){return this._parentFactory?this._parentFactory.states:this._states},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"statesByName",{get:function(){return this._parentFactory?this._parentFactory.statesByName:this._statesByName},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"statePaths",{get:function(){return this._parentFactory?this._parentFactory.statePaths:this._statePaths},enumerable:!0,configurable:!0}),t.cloneDefaults=function(t){var e,n={};return Array.isArray(t)?n=t.slice():n="object"==typeof(e=t)&&null!==e||"function"==typeof e?c({},t):void 0===t?{}:t,n},t.prototype.ngOnDestroy=function(){this._actionsSubscription.unsubscribe()},t.prototype.add=function(e){var n,r;("undefined"==typeof ngDevMode||ngDevMode)&&Q.checkThatStateClassesHaveBeenDecorated(e);var o=this.addToStatesMap(e).newStates;if(!o.length)return[];var i,a,u,c,p=function(t){var e=function(e){var n=t.find((function(t){return t===e}));if(("undefined"==typeof ngDevMode||ngDevMode)&&!n)throw new Error("Child state not found: "+e+". \r\nYou may have forgotten to add states to module");return(n[g].name)};return t.reduce((function(t,n){var r=n[g],o=r.name,i=r.children;return t[o]=(i||[]).map(e),t}),{})}(o),f=(i=p,a=[],u={},c=function(t,e){void 0===e&&(e=[]),Array.isArray(e)||(e=[]),e.push(t),u[t]=!0,i[t].forEach((function(n){if(("undefined"==typeof ngDevMode||ngDevMode)&&e.indexOf(n)>=0)throw new Error("Circular dependency '"+n+"' is required by '"+t+"': "+e.join(" -> "));u[n]||c(n,e.slice(0))})),a.indexOf(t)<0&&a.push(t)},Object.keys(i).forEach((function(t){return c(t)})),a.reverse()),l=function(t,e){void 0===e&&(e={});var n=function(t,e){for(var r in t)if(t.hasOwnProperty(r)&&t[r].indexOf(e)>=0){var o=n(t,r);return null!==o?o+"."+r:r}return null};for(var r in t)if(t.hasOwnProperty(r)){var o=n(t,r);e[r]=o?o+"."+r:r}return e}(p),h=o.reduce((function(t,e){return t[e[g].name]=e,t}),{}),y=[];try{for(var d=s(f),v=d.next();!v.done;v=d.next()){var S=v.value,_=h[S],m=l[S],O=_[g];this.addRuntimeInfoToMeta(O,m),("undefined"==typeof ngDevMode||ngDevMode)&&tt(_);var b={name:S,path:m,isInitialised:!1,actions:O.actions,instance:this._injector.get(_),defaults:t.cloneDefaults(O.defaults)};this.hasBeenMountedAndBootstrapped(S,m)||y.push(b),this.states.push(b)}}catch(t){n={error:t}}finally{try{v&&!v.done&&(r=d.return)&&r.call(d)}finally{if(n)throw n.error}}return y},t.prototype.addAndReturnDefaults=function(t){var e=t||[],n=this.add(e);return{defaults:n.reduce((function(t,e){return w(t,e.path,e.defaults)}),{}),states:n}},t.prototype.connectActionHandlers=function(){var t=this;if(null===this._actionsSubscription){var e=new o.Subject;this._actionsSubscription=this._actions.pipe(i.filter((function(t){return"DISPATCHED"===t.status})),i.mergeMap((function(n){e.next(n);var r=n.action;return t.invokeActions(e,r).pipe(i.map((function(){return{action:r,status:"SUCCESSFUL"}})),i.defaultIfEmpty({action:r,status:"CANCELED"}),i.catchError((function(t){return o.of({action:r,status:"ERRORED",error:t})})))}))).subscribe((function(e){return t._actionResults.next(e)}))}},t.prototype.invokeActions=function(t,e){var n,r,a,u,c=P(e),p=[];try{for(var f=s(this.states),l=f.next();!l.done;l=f.next()){var h=l.value,y=h.actions[c];if(y)try{for(var d=s(y),g=d.next();!g.done;g=d.next()){var v=g.value,S=this._stateContextFactory.createStateContext(h);try{var _=h.instance[v.fn](S,e);_ instanceof Promise&&(_=o.from(_)),o.isObservable(_)?(_=_.pipe(i.mergeMap((function(t){return t instanceof Promise?o.from(t):o.isObservable(t)?t:o.of(t)})),i.defaultIfEmpty({})),v.options.cancelUncompleted&&(_=_.pipe(i.takeUntil(t.pipe(D(e)))))):_=o.of({}).pipe(i.shareReplay()),p.push(_)}catch(t){p.push(o.throwError(t))}}}catch(t){a={error:t}}finally{try{g&&!g.done&&(u=d.return)&&u.call(d)}finally{if(a)throw a.error}}}}catch(t){n={error:t}}finally{try{l&&!l.done&&(r=f.return)&&r.call(f)}finally{if(n)throw n.error}}return p.length||p.push(o.of({})),o.forkJoin(p)},t.prototype.addToStatesMap=function(t){var e,n,r=[],o=this.statesByName;try{for(var i=s(t),a=i.next();!a.done;a=i.next()){var u=a.value,c=I(u).name;("undefined"==typeof ngDevMode||ngDevMode)&&Q.checkThatStateNameIsUnique(c,u,o),!o[c]&&(r.push(u),o[c]=u)}}catch(t){e={error:t}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return{newStates:r}},t.prototype.addRuntimeInfoToMeta=function(t,e){this.statePaths[t.name]=e,t.path=e},t.prototype.hasBeenMountedAndBootstrapped=function(t,e){var n=void 0!==A(this._initialState,e);return this.statesByName[t]&&n},t.decorators=[{type:e.Injectable}],t.ctorParameters=function(){return[{type:e.Injector},{type:_},{type:t,decorators:[{type:e.Optional},{type:e.SkipSelf}]},{type:G},{type:z},{type:J},{type:void 0,decorators:[{type:e.Optional},{type:e.Inject,args:[n.INITIAL_STATE_TOKEN]}]}]},t}();var nt={getOptions:function(t){return t&&t.NGXS_SELECTOR_OPTIONS_META||{}},defineOptions:function(t,e){t&&(t.NGXS_SELECTOR_OPTIONS_META=e)}};function rt(t,e,r){var o=r&&r.containerClass,i=n.memoize((function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var i=e.apply(o,t);if(i instanceof Function){var a=n.memoize.apply(null,[i]);return a}return i}));Object.setPrototypeOf(i,e);var a=function(t,e){var n=T(t);n.originalFn=t;var r=function(){return{}};e&&(n.containerClass=e.containerClass,n.selectorName=e.selectorName,r=e.getSelectorOptions||r);var o=c({},n);return n.getSelectorOptions=function(){return function(t,e){return c({},nt.getOptions(t.containerClass)||{},nt.getOptions(t.originalFn)||{},t.getSelectorOptions()||{},e)}(o,r())},n}(e,r);return a.makeRootSelector=function(e){var n=function(t,e,n){void 0===n&&(n=[]);var r=e.getSelectorOptions(),o=t.getSelectorOptions(r),i=function(t,e,n){void 0===t&&(t=[]);var r=[],o=0===t.length||e.injectContainerState;if(n&&o){I(n)&&r.push(n)}t&&r.push.apply(r,f(t));return r}(n,o,e.containerClass).map((function(e){return ot(e)(t)}));return{selectorOptions:o,argumentSelectorFunctions:i}}(e,a,t),r=n.argumentSelectorFunctions,o=n.selectorOptions;return(function(t){var e=r.map((function(e){return e(t)}));try{return i.apply(void 0,f(e))}catch(t){if(t instanceof TypeError&&o.suppressErrors)return;throw t}})},i}function ot(t){var e=j(t)||I(t);return e&&e.makeRootSelector||function(){return t}}var it=function(){function t(t,e,n,r,a,u){this._stateStream=t,this._internalStateOperations=e,this._config=n,this._internalExecutionStrategy=r,this._stateFactory=a,this._selectableStateStream=this._stateStream.pipe(i.observeOn(o.queueScheduler),B(this._internalExecutionStrategy),i.shareReplay({bufferSize:1,refCount:!0})),this.initStateStream(u)}return t.prototype.dispatch=function(t){return this._internalStateOperations.getRootStateOperations().dispatch(t)},t.prototype.select=function(t){var e=this,n=this.getStoreBoundSelectorFn(t);return this._selectableStateStream.pipe(i.map(n),i.catchError((function(t){var n=e._config.selectorOptions.suppressErrors;return t instanceof TypeError&&n?o.of(void 0):o.throwError(t)})),i.distinctUntilChanged(),B(this._internalExecutionStrategy))},t.prototype.selectOnce=function(t){return this.select(t).pipe(i.take(1))},t.prototype.selectSnapshot=function(t){return this.getStoreBoundSelectorFn(t)(this._stateStream.getValue())},t.prototype.subscribe=function(t){return this._selectableStateStream.pipe(B(this._internalExecutionStrategy)).subscribe(t)},t.prototype.snapshot=function(){return this._internalStateOperations.getRootStateOperations().getState()},t.prototype.reset=function(t){return this._internalStateOperations.getRootStateOperations().setState(t)},t.prototype.getStoreBoundSelectorFn=function(t){return ot(t)(this._stateFactory.getRuntimeSelectorContext())},t.prototype.initStateStream=function(t){var e=this._stateStream.value;if(!e||0===Object.keys(e).length){var n=Object.keys(this._config.defaultsState).length>0?c({},this._config.defaultsState,t):t;this._stateStream.next(n)}},t.decorators=[{type:e.Injectable}],t.ctorParameters=function(){return[{type:Z},{type:$},{type:_},{type:U},{type:et},{type:void 0,decorators:[{type:e.Optional},{type:e.Inject,args:[n.INITIAL_STATE_TOKEN]}]}]},t}();var at=function(){function t(t,e,n,r,i){this._store=t,this._internalErrorReporter=e,this._internalStateOperations=n,this._stateContextFactory=r,this._bootstrapper=i,this._destroy$=new o.Subject}return t.prototype.ngOnDestroy=function(){this._destroy$.next()},t.prototype.ngxsBootstrap=function(t,e){var n=this;this._internalStateOperations.getRootStateOperations().dispatch(t).pipe(i.filter((function(){return!!e})),i.tap((function(){return n._invokeInitOnStates(e.states)})),i.mergeMap((function(){return n._bootstrapper.appBootstrapped$})),i.filter((function(t){return!!t})),i.catchError((function(t){return n._internalErrorReporter.reportErrorSafely(t),o.EMPTY})),i.takeUntil(this._destroy$)).subscribe((function(){return n._invokeBootstrapOnStates(e.states)}))},t.prototype._invokeInitOnStates=function(t){var e,n,r=function(t){var e=t.instance;e.ngxsOnChanges&&o._store.select((function(e){return A(e,t.path)})).pipe(i.startWith(void 0),i.pairwise(),i.takeUntil(o._destroy$)).subscribe((function(n){var r=p(n,2),o=r[0],i=r[1],a=new m(o,i,!t.isInitialised);e.ngxsOnChanges(a)})),e.ngxsOnInit&&e.ngxsOnInit(o._getStateContext(t)),t.isInitialised=!0},o=this;try{for(var a=s(t),u=a.next();!u.done;u=a.next()){r(u.value)}}catch(t){e={error:t}}finally{try{u&&!u.done&&(n=a.return)&&n.call(a)}finally{if(e)throw e.error}}},t.prototype._invokeBootstrapOnStates=function(t){var e,n;try{for(var r=s(t),o=r.next();!o.done;o=r.next()){var i=o.value,a=i.instance;a.ngxsAfterBootstrap&&a.ngxsAfterBootstrap(this._getStateContext(i))}}catch(t){e={error:t}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}},t.prototype._getStateContext=function(t){return this._stateContextFactory.createStateContext(t)},t.decorators=[{type:e.Injectable}],t.ctorParameters=function(){return[{type:it},{type:V},{type:$},{type:J},{type:n.NgxsBootstrapper}]},t}();var ut=function(){function t(e,n){t.store=e,t.config=n}return t.prototype.ngOnDestroy=function(){t.store=null,t.config=null},t.store=null,t.config=null,t.decorators=[{type:e.Injectable}],t.ctorParameters=function(){return[{type:it},{type:_}]},t}();var ct=function(){function t(){}return Object.defineProperty(t,"type",{get:function(){return"@@INIT"},enumerable:!0,configurable:!0}),t}(),st=function(){function t(t){this.addedStates=t}return Object.defineProperty(t,"type",{get:function(){return"@@UPDATE_STATE"},enumerable:!0,configurable:!0}),t}();var pt=function(){function t(t,e,n,r,o,i){void 0===o&&(o=[]);var a=t.addAndReturnDefaults(o);e.setStateToTheCurrentWithNew(a),t.connectActionHandlers(),i.ngxsBootstrap(new ct,a)}return t.decorators=[{type:e.NgModule}],t.ctorParameters=function(){return[{type:et},{type:$},{type:it},{type:ut},{type:Array,decorators:[{type:e.Optional},{type:e.Inject,args:[h]}]},{type:at}]},t}(),ft=function(){function t(e,n,r,o,i){void 0===o&&(o=[]);var a=t.flattenStates(o),u=r.addAndReturnDefaults(a);u.states.length&&(n.setStateToTheCurrentWithNew(u),i.ngxsBootstrap(new st(u.defaults),u))}return t.flattenStates=function(t){return void 0===t&&(t=[]),t.reduce((function(t,e){return t.concat(e)}),[])},t.decorators=[{type:e.NgModule}],t.ctorParameters=function(){return[{type:it},{type:$},{type:et},{type:Array,decorators:[{type:e.Optional},{type:e.Inject,args:[y]}]},{type:at}]},t}(),lt=function(){function t(){}return t.forRoot=function(e,r){return void 0===e&&(e=[]),void 0===r&&(r={}),{ngModule:pt,providers:f([et,J,H,G,n.NgxsBootstrapper,at,Y,z,$,U,it,Z,ut,q],e,t.ngxsTokenProviders(e,r))}},t.forFeature=function(t){return void 0===t&&(t=[]),{ngModule:ft,providers:f([et,q],t,[{provide:y,multi:!0,useValue:t}])}},t.ngxsTokenProviders=function(r,o){return[{provide:b,useValue:o.executionStrategy},{provide:h,useValue:r},{provide:t.ROOT_OPTIONS,useValue:o},{provide:_,useFactory:t.ngxsConfigFactory,deps:[t.ROOT_OPTIONS]},{provide:e.APP_BOOTSTRAP_LISTENER,useFactory:t.appBootstrapListenerFactory,multi:!0,deps:[n.NgxsBootstrapper]},{provide:n.INITIAL_STATE_TOKEN,useFactory:t.getInitialState},{provide:n.NGXS_STATE_CONTEXT_FACTORY,useExisting:J},{provide:n.NGXS_STATE_FACTORY,useExisting:et}]},t.ngxsConfigFactory=function(t){return R(new _,t)},t.appBootstrapListenerFactory=function(t){return function(){return t.bootstrap()}},t.getInitialState=function(){return n.InitialState.pop()},t.ROOT_OPTIONS=new e.InjectionToken("ROOT_OPTIONS"),t.decorators=[{type:e.NgModule}],t}();var ht=36;function yt(t){return ut.store||function(){throw new Error("You have forgotten to import the NGXS module!")}(),ut.store.select(t)}function dt(t,e,n){return void 0===n&&(n=[]),"string"==typeof(e=e||function(t){var e=t.length-1;return t.charCodeAt(e)===ht?t.slice(0,e):t}(t))?N(n.length?f([e],n):e.split("."),ut.config):e}var gt=function(){function t(t){var e=this;this.name=t,T(this).makeRootSelector=function(t){return t.getStateGetter(e.name)}}return t.prototype.getName=function(){return this.name},t.prototype.toString=function(){return"StateToken["+this.name+"]"},t}();t.Action=function(t,e){return function(n,r){var o,i;("undefined"==typeof ngDevMode||ngDevMode)&&(n.hasOwnProperty("prototype")&&function(){throw new Error("@Action() decorator cannot be used with static methods.")}());var a=x(n.constructor);Array.isArray(t)||(t=[t]);try{for(var u=s(t),c=u.next();!c.done;c=u.next()){var p=c.value.type;a.actions[p]||(a.actions[p]=[]),a.actions[p].push({fn:r,options:e||{},type:p})}}catch(t){o={error:t}}finally{try{c&&!c.done&&(i=u.return)&&i.call(u)}finally{if(o)throw o.error}}}},t.Actions=H,t.InitState=ct,t.NGXS_PLUGINS=d,t.NgxsModule=lt,t.NgxsSimpleChange=m,t.NoopNgxsExecutionStrategy=O,t.Select=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return(function(n,r){var o,i=r.toString(),a="__"+i+"__selector",u=dt(i,t,e);Object.defineProperties(n,((o={})[a]={writable:!0,enumerable:!1,configurable:!0},o[i]={enumerable:!0,configurable:!0,get:function(){return this[a]||(this[a]=yt(u))}},o))})},t.Selector=function(t){return function(e,n,r){("undefined"==typeof ngDevMode||ngDevMode)&&(!(r&&null!==r.value)&&function(){throw new Error("Selectors only work on methods.")}());var o=r.value,i=rt(t,o,{containerClass:e,selectorName:n.toString(),getSelectorOptions:function(){return{}}}),a={configurable:!0,get:function(){return i}};return a.originalFn=o,a}},t.SelectorOptions=function(t){return function(e,n,r){if(n){var o=r.value||r.originalFn;o&&nt.defineOptions(o,t)}else nt.defineOptions(e,t)}},t.State=function(t){return function(e){var n=e,r=x(n),o=Object.getPrototypeOf(n),i=function(e){var n=e[v]||{};return(c({},n,t))}(o);!function(t){var e=t.meta,n=t.inheritedStateClass,r=t.optionsWithInheritance,o=r.children,i=r.defaults,a=r.name,u="string"==typeof a?a:a&&a.getName()||null;if(("undefined"==typeof ngDevMode||ngDevMode)&&Q.checkThatStateIsNamedCorrectly(u),n.hasOwnProperty(g)){var s=n[g]||{};e.actions=c({},e.actions,s.actions)}e.children=o,e.defaults=i,e.name=u}({meta:r,inheritedStateClass:o,optionsWithInheritance:i}),n[v]=i}},t.StateStream=Z,t.StateToken=gt,t.Store=it,t.UpdateState=st,t.actionMatcher=function(t){var e=P(t);return(function(t){return e===P(t)})},t.createSelector=rt,t.ensureSelectorMetadata=function(t){return T(t)},t.ensureStoreMetadata=function(t){return x(t)},t.getActionTypeFromInstance=P,t.getSelectorMetadata=function(t){return j(t)},t.getStoreMetadata=function(t){return I(t)},t.getValue=A,t.ofAction=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return M(t)},t.ofActionCanceled=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return M(t,["CANCELED"])},t.ofActionCompleted=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return M(t,["SUCCESSFUL","CANCELED","ERRORED"],F)},t.ofActionDispatched=D,t.ofActionErrored=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return M(t,["ERRORED"])},t.ofActionSuccessful=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return M(t,["SUCCESSFUL"])},t.setValue=w,t.ɵa=L,t.ɵb=G,t.ɵc=h,t.ɵd=y,t.ɵe=S,t.ɵf=_,t.ɵg=R,t.ɵh=b,t.ɵi=E,t.ɵj=pt,t.ɵk=et,t.ɵl=z,t.ɵm=Y,t.ɵn=J,t.ɵo=$,t.ɵp=q,t.ɵq=U,t.ɵr=V,t.ɵs=ut,t.ɵu=x,t.ɵv=I,t.ɵw=T,t.ɵx=j,t.ɵy=at,t.ɵz=ft,Object.defineProperty(t,"__esModule",{value:!0})}));
|
|
16
16
|
//# sourceMappingURL=ngxs-store.umd.min.js.map
|