@ngxs/store 3.7.4 → 3.7.5
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/README.md +16 -16
- package/bundles/ngxs-store-internals-testing.umd.js +315 -315
- package/bundles/ngxs-store-internals-testing.umd.js.map +1 -1
- package/bundles/ngxs-store-internals-testing.umd.min.js.map +1 -1
- package/bundles/ngxs-store-internals.umd.js +192 -397
- package/bundles/ngxs-store-internals.umd.js.map +1 -1
- package/bundles/ngxs-store-internals.umd.min.js +1 -1
- package/bundles/ngxs-store-internals.umd.min.js.map +1 -1
- package/bundles/ngxs-store-operators.umd.js +310 -310
- package/bundles/ngxs-store-operators.umd.js.map +1 -1
- package/bundles/ngxs-store-operators.umd.min.js.map +1 -1
- package/bundles/ngxs-store.umd.js +4401 -4481
- 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/index.js +13 -13
- package/esm2015/internals/angular.js +20 -20
- package/esm2015/internals/index.js +10 -11
- package/esm2015/internals/initial-state.js +34 -34
- package/esm2015/internals/internal-tokens.js +16 -16
- package/esm2015/internals/memoize.js +70 -70
- package/esm2015/internals/ngxs-bootstrapper.js +41 -41
- package/esm2015/internals/ngxs-store-internals.js +9 -9
- package/esm2015/internals/src/symbols.js +14 -14
- package/esm2015/internals/symbols.js +14 -14
- package/esm2015/internals/testing/fresh-platform.js +110 -110
- package/esm2015/internals/testing/helpers/ngxs-test.component.js +22 -22
- package/esm2015/internals/testing/helpers/ngxs-test.module.js +24 -24
- package/esm2015/internals/testing/index.js +8 -8
- package/esm2015/internals/testing/ngxs-store-internals-testing.js +8 -8
- package/esm2015/internals/testing/ngxs.setup.js +76 -76
- package/esm2015/internals/testing/skip-console-logging.js +62 -62
- package/esm2015/internals/testing/symbol.js +29 -29
- package/esm2015/ngxs-store.js +24 -23
- package/esm2015/operators/append.js +31 -31
- package/esm2015/operators/compose.js +24 -24
- package/esm2015/operators/iif.js +56 -56
- package/esm2015/operators/index.js +18 -18
- package/esm2015/operators/insert-item.js +41 -41
- package/esm2015/operators/internals.js +5 -5
- package/esm2015/operators/ngxs-store-operators.js +8 -8
- package/esm2015/operators/patch.js +39 -39
- package/esm2015/operators/remove-item.js +34 -34
- package/esm2015/operators/update-item.js +52 -52
- package/esm2015/operators/utils.js +50 -50
- package/esm2015/src/actions/actions.js +39 -39
- package/esm2015/src/actions/symbols.js +39 -39
- package/esm2015/src/actions-stream.js +140 -140
- package/esm2015/src/configs/messages.config.js +79 -79
- package/esm2015/src/decorators/action.js +48 -48
- package/esm2015/src/decorators/select/select-factory.js +45 -49
- package/esm2015/src/decorators/select/select.js +45 -81
- package/esm2015/src/decorators/select/symbols.js +50 -94
- package/esm2015/src/decorators/selector/selector.js +59 -59
- package/esm2015/src/decorators/selector/symbols.js +5 -5
- package/esm2015/src/decorators/selector-options.js +34 -34
- package/esm2015/src/decorators/state.js +77 -83
- package/esm2015/src/execution/dispatch-outside-zone-ngxs-execution-strategy.js +103 -103
- package/esm2015/src/execution/internal-ngxs-execution-strategy.js +45 -45
- package/esm2015/src/execution/noop-ngxs-execution-strategy.js +29 -29
- package/esm2015/src/execution/symbols.js +52 -52
- package/esm2015/src/internal/dispatcher.js +219 -217
- package/esm2015/src/internal/internals.js +493 -493
- package/esm2015/src/internal/lifecycle-state-manager.js +129 -129
- package/esm2015/src/internal/state-context-factory.js +138 -138
- package/esm2015/src/internal/state-factory.js +457 -449
- package/esm2015/src/internal/state-operations.js +124 -133
- package/esm2015/src/internal/state-operators.js +33 -33
- package/esm2015/src/internal/state-stream.js +30 -30
- package/esm2015/src/ivy/ivy-enabled-in-dev-mode.js +28 -28
- package/esm2015/src/module.js +159 -157
- package/esm2015/src/modules/ngxs-feature.module.js +63 -63
- package/esm2015/src/modules/ngxs-root.module.js +49 -52
- package/esm2015/src/operators/leave-ngxs.js +58 -58
- package/esm2015/src/operators/of-action.js +191 -191
- package/esm2015/src/plugin-manager.js +70 -70
- package/esm2015/src/plugin_api.js +10 -10
- package/esm2015/src/public_api.js +29 -29
- package/esm2015/src/public_to_deprecate.js +64 -64
- package/esm2015/src/state-token/state-token.js +45 -45
- package/esm2015/src/state-token/symbols.js +5 -5
- package/esm2015/src/store.js +190 -190
- package/esm2015/src/symbols.js +221 -220
- package/esm2015/src/utils/compose.js +44 -44
- package/esm2015/src/utils/freeze.js +35 -35
- package/esm2015/src/utils/selector-utils.js +221 -221
- package/esm2015/src/utils/store-validators.js +60 -60
- package/esm2015/src/utils/utils.js +143 -143
- package/esm5/index.js +13 -13
- package/esm5/internals/angular.js +20 -20
- package/esm5/internals/index.js +10 -11
- package/esm5/internals/initial-state.js +45 -45
- package/esm5/internals/internal-tokens.js +16 -16
- package/esm5/internals/memoize.js +71 -71
- package/esm5/internals/ngxs-bootstrapper.js +56 -56
- package/esm5/internals/ngxs-store-internals.js +9 -9
- package/esm5/internals/src/symbols.js +14 -14
- package/esm5/internals/symbols.js +14 -14
- package/esm5/internals/testing/fresh-platform.js +121 -121
- package/esm5/internals/testing/helpers/ngxs-test.component.js +32 -32
- package/esm5/internals/testing/helpers/ngxs-test.module.js +32 -32
- package/esm5/internals/testing/index.js +8 -8
- package/esm5/internals/testing/ngxs-store-internals-testing.js +8 -8
- package/esm5/internals/testing/ngxs.setup.js +98 -98
- package/esm5/internals/testing/skip-console-logging.js +62 -62
- package/esm5/internals/testing/symbol.js +29 -29
- package/esm5/ngxs-store.js +24 -23
- package/esm5/operators/append.js +31 -31
- package/esm5/operators/compose.js +28 -28
- package/esm5/operators/iif.js +56 -56
- package/esm5/operators/index.js +18 -18
- package/esm5/operators/insert-item.js +41 -41
- package/esm5/operators/internals.js +5 -5
- package/esm5/operators/ngxs-store-operators.js +8 -8
- package/esm5/operators/patch.js +40 -40
- package/esm5/operators/remove-item.js +34 -34
- package/esm5/operators/update-item.js +52 -52
- package/esm5/operators/utils.js +50 -50
- package/esm5/src/actions/actions.js +62 -62
- package/esm5/src/actions/symbols.js +39 -39
- package/esm5/src/actions-stream.js +186 -186
- package/esm5/src/configs/messages.config.js +79 -79
- package/esm5/src/decorators/action.js +60 -60
- package/esm5/src/decorators/select/select-factory.js +46 -50
- package/esm5/src/decorators/select/select.js +50 -87
- package/esm5/src/decorators/select/symbols.js +51 -95
- package/esm5/src/decorators/selector/selector.js +59 -59
- package/esm5/src/decorators/selector/symbols.js +5 -5
- package/esm5/src/decorators/selector-options.js +34 -34
- package/esm5/src/decorators/state.js +78 -84
- package/esm5/src/execution/dispatch-outside-zone-ngxs-execution-strategy.js +123 -123
- package/esm5/src/execution/internal-ngxs-execution-strategy.js +54 -54
- package/esm5/src/execution/noop-ngxs-execution-strategy.js +43 -43
- package/esm5/src/execution/symbols.js +52 -52
- package/esm5/src/internal/dispatcher.js +255 -253
- package/esm5/src/internal/internals.js +495 -495
- package/esm5/src/internal/lifecycle-state-manager.js +177 -177
- package/esm5/src/internal/state-context-factory.js +146 -146
- package/esm5/src/internal/state-factory.js +583 -575
- package/esm5/src/internal/state-operations.js +134 -143
- package/esm5/src/internal/state-operators.js +34 -34
- package/esm5/src/internal/state-stream.js +37 -37
- package/esm5/src/ivy/ivy-enabled-in-dev-mode.js +28 -28
- package/esm5/src/module.js +202 -200
- package/esm5/src/modules/ngxs-feature.module.js +65 -65
- package/esm5/src/modules/ngxs-root.module.js +44 -47
- package/esm5/src/operators/leave-ngxs.js +58 -58
- package/esm5/src/operators/of-action.js +217 -217
- package/esm5/src/plugin-manager.js +82 -82
- package/esm5/src/plugin_api.js +10 -10
- package/esm5/src/public_api.js +29 -29
- package/esm5/src/public_to_deprecate.js +64 -64
- package/esm5/src/state-token/state-token.js +57 -57
- package/esm5/src/state-token/symbols.js +5 -5
- package/esm5/src/store.js +241 -241
- package/esm5/src/symbols.js +230 -229
- package/esm5/src/utils/compose.js +55 -55
- package/esm5/src/utils/freeze.js +35 -35
- package/esm5/src/utils/selector-utils.js +230 -230
- package/esm5/src/utils/store-validators.js +78 -78
- package/esm5/src/utils/utils.js +151 -151
- package/fesm2015/ngxs-store-internals-testing.js +274 -274
- package/fesm2015/ngxs-store-internals-testing.js.map +1 -1
- package/fesm2015/ngxs-store-internals.js +175 -377
- package/fesm2015/ngxs-store-internals.js.map +1 -1
- package/fesm2015/ngxs-store-operators.js +312 -312
- package/fesm2015/ngxs-store-operators.js.map +1 -1
- package/fesm2015/ngxs-store.js +3915 -3995
- package/fesm2015/ngxs-store.js.map +1 -1
- package/fesm5/ngxs-store-internals-testing.js +321 -321
- package/fesm5/ngxs-store-internals-testing.js.map +1 -1
- package/fesm5/ngxs-store-internals.js +200 -402
- package/fesm5/ngxs-store-internals.js.map +1 -1
- package/fesm5/ngxs-store-operators.js +316 -316
- package/fesm5/ngxs-store-operators.js.map +1 -1
- package/fesm5/ngxs-store.js +4410 -4491
- package/fesm5/ngxs-store.js.map +1 -1
- package/index.d.ts +8 -8
- package/internals/angular.d.ts +1 -1
- package/internals/index.d.ts +6 -7
- package/internals/initial-state.d.ts +8 -8
- package/internals/internal-tokens.d.ts +9 -9
- package/internals/memoize.d.ts +9 -9
- package/internals/ngxs-bootstrapper.d.ts +13 -13
- package/internals/ngxs-store-internals.d.ts +4 -4
- package/internals/ngxs-store-internals.metadata.json +1 -1
- package/internals/src/symbols.d.ts +7 -7
- package/internals/symbols.d.ts +7 -7
- package/internals/testing/fresh-platform.d.ts +1 -1
- package/internals/testing/helpers/ngxs-test.component.d.ts +5 -5
- package/internals/testing/helpers/ngxs-test.module.d.ts +4 -4
- package/internals/testing/index.d.ts +4 -4
- package/internals/testing/ngxs-store-internals-testing.d.ts +4 -4
- package/internals/testing/ngxs.setup.d.ts +7 -7
- package/internals/testing/skip-console-logging.d.ts +1 -1
- package/internals/testing/symbol.d.ts +14 -14
- package/ngxs-store.d.ts +20 -19
- package/ngxs-store.metadata.json +1 -1
- package/operators/append.d.ts +6 -6
- package/operators/compose.d.ts +2 -2
- package/operators/iif.d.ts +11 -11
- package/operators/index.d.ts +13 -13
- package/operators/insert-item.d.ts +7 -7
- package/operators/internals.d.ts +2 -2
- package/operators/ngxs-store-operators.d.ts +4 -4
- package/operators/patch.d.ts +10 -10
- package/operators/remove-item.d.ts +7 -7
- package/operators/update-item.d.ts +10 -10
- package/operators/utils.d.ts +9 -9
- package/package.json +1 -1
- package/src/actions/actions.d.ts +15 -15
- package/src/actions/symbols.d.ts +21 -21
- package/src/actions-stream.d.ts +49 -49
- package/src/configs/messages.config.d.ts +11 -11
- package/src/decorators/action.d.ts +5 -5
- package/src/decorators/select/select-factory.d.ts +13 -13
- package/src/decorators/select/select.d.ts +4 -4
- package/src/decorators/select/symbols.d.ts +10 -14
- package/src/decorators/selector/selector.d.ts +5 -5
- package/src/decorators/selector/symbols.d.ts +4 -4
- package/src/decorators/selector-options.d.ts +5 -5
- package/src/decorators/state.d.ts +6 -6
- package/src/execution/dispatch-outside-zone-ngxs-execution-strategy.d.ts +11 -11
- package/src/execution/internal-ngxs-execution-strategy.d.ts +7 -7
- package/src/execution/noop-ngxs-execution-strategy.d.ts +5 -5
- package/src/execution/symbols.d.ts +10 -10
- package/src/internal/dispatcher.d.ts +32 -32
- package/src/internal/internals.d.ts +166 -166
- package/src/internal/lifecycle-state-manager.d.ts +20 -20
- package/src/internal/state-context-factory.d.ts +15 -15
- package/src/internal/state-factory.d.ts +57 -57
- package/src/internal/state-operations.d.ts +19 -19
- package/src/internal/state-operators.d.ts +2 -2
- package/src/internal/state-stream.d.ts +11 -11
- package/src/ivy/ivy-enabled-in-dev-mode.d.ts +6 -6
- package/src/module.d.ts +23 -23
- package/src/modules/ngxs-feature.module.d.ts +13 -13
- package/src/modules/ngxs-root.module.d.ts +13 -13
- package/src/operators/leave-ngxs.d.ts +7 -7
- package/src/operators/of-action.d.ts +43 -43
- package/src/plugin-manager.d.ts +10 -10
- package/src/plugin_api.d.ts +5 -5
- package/src/public_api.d.ts +17 -17
- package/src/public_to_deprecate.d.ts +21 -21
- package/src/state-token/state-token.d.ts +7 -7
- package/src/state-token/symbols.d.ts +5 -5
- package/src/store.d.ts +59 -59
- package/src/symbols.d.ts +139 -138
- package/src/utils/compose.d.ts +23 -23
- package/src/utils/freeze.d.ts +5 -5
- package/src/utils/selector-utils.d.ts +23 -23
- package/src/utils/store-validators.d.ts +7 -7
- package/src/utils/utils.d.ts +46 -46
- package/types/index.d.ts +2 -2
- package/esm2015/internals/decorator-injector-adapter.js +0 -204
- package/esm5/internals/decorator-injector-adapter.js +0 -204
- package/internals/decorator-injector-adapter.d.ts +0 -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}function l(){throw new Error("You have forgotten to import the NGXS module!")}var h=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 y=new e.InjectionToken("ROOT_STATE_TOKEN"),d=new e.InjectionToken("FEATURE_STATE_TOKEN"),g=new e.InjectionToken("NGXS_PLUGINS"),v="NGXS_META",S="NGXS_OPTIONS_META",m="NGXS_SELECTOR_META",_=function(){function t(){this.defaultsState={},this.selectorOptions={injectContainerState:!0,suppressErrors:!0},this.compatibility={strictContentSecurityPolicy:!1},this.executionStrategy=h}return t.decorators=[{type:e.Injectable}],t.ctorParameters=function(){return[]},t}();var O=function(t,e,n){this.previousValue=t,this.currentValue=e,this.firstChange=n};var b=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}(),x=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(x);return n?t.get(n):t.get(void 0!==e.ɵglobal.Zone?h:b)}});function I(t){return t.constructor&&t.constructor.type?t.constructor.type:t.type}var T=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},j=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)},N=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)),N(t[a],i[a])):Object.assign(t,((n={})[a]=i[a],n));return N.apply(void 0,f([t],r))};function w(t){if(!t.hasOwnProperty(v)){var e={name:null,actions:{},defaults:{},path:null,makeRootSelector:function(t){return t.getStateGetter(e.name)},children:[]};Object.defineProperty(t,v,{value:e})}return P(t)}function P(t){return t[v]}function C(t){if(!t.hasOwnProperty(m)){Object.defineProperty(t,m,{value:{makeRootSelector:null,originalFn:null,containerClass:null,selectorName:null,getSelectorOptions:function(){return{}}}})}return R(t)}function R(t){return t[m]}function M(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 D(t,e){var n=j(e.currentAppState,t.path),r=j(e.newAppState,t.path);return new O(n,r,!t.isInitialised)}function F(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return k(t,["DISPATCHED"])}function k(t,e,n){void 0===n&&(n=L);var r=t.reduce((function(t,e){return t[I(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=I(n.action),o=t[r],i=!e||e[n.status];return o&&i}))}(r,o),n())}}function B(){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 L(){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 G=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 H=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 X=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return u(n,t),n.decorators=[{type:e.Injectable}],n}(H),V=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:X},{type:G}]},n}(o.Observable),Z=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 Z(t).apply(void 0,f(e))}]))}},q=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),Y=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:[g]},{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),K=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(!I(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 Z(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:X},{type:z},{type:Y},{type:q},{type:G}]},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},Q=function(){function t(t,e,n){this._stateStream=t,this._dispatcher=e,this._config=n}return t.prototype.getRootStateOperations=function(){var t=this,e={getState:function(){return t._stateStream.getValue()},setState:function(e){return t._stateStream.next(e)},dispatch:function(e){return t._dispatcher.dispatch(e)}};return"undefined"==typeof ngDevMode||ngDevMode&&n.isAngularInTestMode()?this._config.developmentMode?J(e):e:ngDevMode?J(e):e},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:q},{type:K},{type:_}]},t}();function J(t){return{getState:function(){return t.getState()},setState:function(e){var n=W(e);return t.setState(n)},dispatch:function(e){return t.dispatch(e)}}}function $(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 tt=function(){function t(t){this._internalStateOperations=t}return t.prototype.createStateContext=function(t){var e=this._internalStateOperations.getRootStateOperations();function n(e){return j(e,t.path)}function r(n,r){var o=T(n,t.path,r),i=t.instance;if(i.ngxsOnChanges){var a=D(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(),$(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:Q}]},t}();var et=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){P(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}();var nt=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?M(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)&&et.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[v].name)};return t.reduce((function(t,n){var r=n[v],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[v].name]=e,t}),{}),y=[];try{for(var d=s(f),g=d.next();!g.done;g=d.next()){var S=g.value,m=h[S],_=l[S],O=m[v];this.addRuntimeInfoToMeta(O,_);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{g&&!g.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 T(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=I(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(F(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=P(u).name;("undefined"==typeof ngDevMode||ngDevMode)&&et.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!==j(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:X},{type:z},{type:tt},{type:void 0,decorators:[{type:e.Optional},{type:e.Inject,args:[n.INITIAL_STATE_TOKEN]}]}]},t}();var rt=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=D(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:Q},{type:tt},{type:n.NgxsBootstrapper}]},t}();var ot={getOptions:function(t){return t&&t.NGXS_SELECTOR_OPTIONS_META||{}},defineOptions:function(t,e){t&&(t.NGXS_SELECTOR_OPTIONS_META=e)}};function it(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=C(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({},ot.getOptions(t.containerClass)||{},ot.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){P(n)&&r.push(n)}t&&r.push.apply(r,f(t));return r}(n,o,e.containerClass).map((function(e){return at(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 at(t){var e=R(t)||P(t);return e&&e.makeRootSelector||function(){return t}}var ut=function(){function t(t,e,n,r,o,a){this._stateStream=t,this._internalStateOperations=e,this._config=n,this._internalExecutionStrategy=r,this._stateFactory=o,this._selectableStateStream=this._stateStream.pipe(U(this._internalExecutionStrategy),i.publishReplay(1),i.refCount()),this.initStateStream(a)}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 at(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:q},{type:Q},{type:_},{type:G},{type:nt},{type:void 0,decorators:[{type:e.Optional},{type:e.Inject,args:[n.INITIAL_STATE_TOKEN]}]}]},t}();var ct=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,args:[{providedIn:"root"}]}],t.ctorParameters=function(){return[{type:ut},{type:_}]},t.ngInjectableDef=e.defineInjectable({factory:function(){return new t(e.inject(ut),e.inject(_))},token:t,providedIn:"root"}),t}();var st=function(){function t(){}return Object.defineProperty(t,"type",{get:function(){return"@@INIT"},enumerable:!0,configurable:!0}),t}(),pt=function(){function t(t){this.addedStates=t}return Object.defineProperty(t,"type",{get:function(){return"@@UPDATE_STATE"},enumerable:!0,configurable:!0}),t}();var ft=function(){function t(t,n,r,o,i,a){void 0===i&&(i=[]),!e.ɵivyEnabled&&o.get(ct);var u=t.addAndReturnDefaults(i);n.setStateToTheCurrentWithNew(u),t.connectActionHandlers(),a.ngxsBootstrap(new st,u)}return t.decorators=[{type:e.NgModule}],t.ctorParameters=function(){return[{type:nt},{type:Q},{type:ut},{type:e.Injector},{type:Array,decorators:[{type:e.Optional},{type:e.Inject,args:[y]}]},{type:rt}]},t}(),lt=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 pt(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:ut},{type:Q},{type:nt},{type:Array,decorators:[{type:e.Optional},{type:e.Inject,args:[d]}]},{type:rt}]},t}(),ht=function(){function t(){}return t.forRoot=function(e,r){return void 0===e&&(e=[]),void 0===r&&(r={}),{ngModule:ft,providers:f([nt,tt,V,X,n.NgxsBootstrapper,rt,K,z,Q,G,ut,q,Y],e,t.ngxsTokenProviders(e,r))}},t.forFeature=function(t){return void 0===t&&(t=[]),{ngModule:lt,providers:f([nt,Y],t,[{provide:d,multi:!0,useValue:t}])}},t.ngxsTokenProviders=function(r,o){return[{provide:x,useValue:o.executionStrategy},{provide:y,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:tt},{provide:n.NGXS_STATE_FACTORY,useExisting:nt}]},t.ngxsConfigFactory=function(t){return N(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 yt=36;function dt(t,n){return e.ɵivyEnabled?function(t,e){return ngDevMode&&!e?l():e.select(t)}(t,n):function(t){return ct.store?ct.store.select(t):l()}(t)}function gt(t,n,r,o){if(void 0===o&&(o=[]),"string"!=typeof(r=r||function(t){var e=t.length-1;return t.charCodeAt(e)===yt?t.slice(0,e):t}(n)))return r;var i=o.length?f([r],o):r.split(".");return e.ɵivyEnabled?function(t,e){return ngDevMode&&!e?l():M(t,e)}(i,t):function(t){return M(t,ct.config)}(i)}var vt=function(){function t(t){var e=this;this.name=t,C(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=w(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=V,t.InitState=st,t.NGXS_PLUGINS=g,t.NgxsModule=ht,t.NgxsSimpleChange=O,t.NoopNgxsExecutionStrategy=b,t.Select=function(t){for(var r=[],o=1;o<arguments.length;o++)r[o-1]=arguments[o];return(function(o,a){var u,c=a.toString(),s="__"+c+"__selector",p=null,f=null;e.ɵivyEnabled&&(f=n.ensureInjectorNotifierIsCaptured(o)),Object.defineProperties(o,((u={})[s]={writable:!0,enumerable:!1,configurable:!0},u[c]={enumerable:!0,configurable:!0,get:function(){var o=this;return this[s]?this[s]:(e.ɵivyEnabled?this[s]=f.pipe(i.mergeMap((function(){var e=n.localInject(o,ut),i=n.localInject(o,_);return dt(p=p||gt(i,c,t,r),e)}))):(p=p||gt(null,c,t,r),this[s]=dt(p,null)),this[s])}},u)),e.ɵivyEnabled&&n.ensureLocalInjectorCaptured(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=it(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&&ot.defineOptions(o,t)}else ot.defineOptions(e,t)}},t.State=function(t){return function(n){("undefined"==typeof ngDevMode||ngDevMode)&&function(t){e.ɵivyEnabled&&(t.ɵprov||console.warn("'"+t.name+"' class should be decorated with @Injectable() right after the @State() decorator"))}(n);var r=n,o=w(r),i=Object.getPrototypeOf(r),a=function(e){var n=e[S]||{};return(c({},n,t))}(i);!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)&&et.checkThatStateIsNamedCorrectly(u),n.hasOwnProperty(v)){var s=n[v]||{};e.actions=c({},e.actions,s.actions)}e.children=o,e.defaults=i,e.name=u}({meta:o,inheritedStateClass:i,optionsWithInheritance:a}),r[S]=a}},t.StateStream=q,t.StateToken=vt,t.Store=ut,t.UpdateState=pt,t.actionMatcher=function(t){var e=I(t);return(function(t){return e===I(t)})},t.createSelector=it,t.ensureSelectorMetadata=function(t){return C(t)},t.ensureStoreMetadata=function(t){return w(t)},t.getActionTypeFromInstance=I,t.getSelectorMetadata=function(t){return R(t)},t.getStoreMetadata=function(t){return P(t)},t.getValue=j,t.ofAction=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return k(t)},t.ofActionCanceled=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return k(t,["CANCELED"])},t.ofActionCompleted=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return k(t,["SUCCESSFUL","CANCELED","ERRORED"],B)},t.ofActionDispatched=F,t.ofActionErrored=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return k(t,["ERRORED"])},t.ofActionSuccessful=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return k(t,["SUCCESSFUL"])},t.setValue=T,t.ɵa=H,t.ɵb=X,t.ɵc=y,t.ɵd=d,t.ɵe=m,t.ɵf=_,t.ɵg=N,t.ɵh=x,t.ɵi=E,t.ɵj=ft,t.ɵk=nt,t.ɵl=z,t.ɵm=K,t.ɵn=tt,t.ɵo=Q,t.ɵp=Y,t.ɵq=G,t.ɵs=w,t.ɵt=P,t.ɵu=C,t.ɵv=R,t.ɵw=rt,t.ɵx=lt,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",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})}));
|
|
16
16
|
//# sourceMappingURL=ngxs-store.umd.min.js.map
|