import{b as jt}from"./chunk-TC77UMTS.js";import{$ as x,Ac as tt,Ca as Q,Cc as Ft,D as q,Ea as Dt,G as A,I as P,Ia as O,Ja as wt,K as vt,L as J,M as C,O as Et,P as Ot,Ra as bt,U as _t,X as M,Z as It,a as l,aa as Mt,b as St,cd as Rt,da as d,f as H,ga as p,i as z,ia as u,ja as h,ka as Tt,l as D,la as At,m as gt,n as F,o as yt,p as mt,ra as Nt,s as K,t as I,u as R,v as W,x as T,z as j}from"./chunk-6JO2G5DD.js";var v="NGXS_META",rt="NGXS_OPTIONS_META",et="NGXS_SELECTOR_META";function ot(e){if(!e.hasOwnProperty(v)){let t={name:null,actions:{},defaults:{},path:null,makeRootSelector(o){return o.getStateGetter(t.name)},children:[]};Object.defineProperty(e,v,{value:t})}return N(e)}function N(e){return e[v]}function Pt(e){return e.hasOwnProperty(et)||Object.defineProperty(e,et,{value:{makeRootSelector:null,originalFn:null,containerClass:null,selectorName:null,getSelectorOptions:()=>({})}}),it(e)}function it(e){return e[et]}function ce(e,t){return e===t}function ue(e,t,o){if(t===null||o===null||t.length!==o.length)return!1;let n=t.length;for(let r=0;r<n;r++)if(!e(t[r],o[r]))return!1;return!0}function k(e,t=ce){let o=null,n=null;function r(){return ue(t,o,arguments)||(n=e.apply(null,arguments)),o=arguments,n}return r.reset=function(){o=null,n=null},r}var le=!1,de=(()=>{let t=class t{static set(n){this._value=n}static pop(){let n=this._value;return this._value={},n}};t._value={};let e=t;return e})(),st=new p(le?"INITIAL_STATE_TOKEN":"",{providedIn:"root",factory:()=>de.pop()}),V=(()=>{let t=class t extends F{constructor(){super(1)}bootstrap(){this.next(!0),this.complete()}};t.\u0275fac=function(r){return new(r||t)},t.\u0275prov=d({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})(),Ct=!1,xt=new p(Ct?"\u0275NGXS_STATE_FACTORY":""),Gt=new p(Ct?"\u0275NGXS_STATE_CONTEXT_FACTORY":"");function kt(e){let t=[],o=!1;return function(...r){if(o){t.unshift(r);return}for(o=!0,e(...r);t.length>0;){let i=t.pop();i&&e(...i)}o=!1}}var G=class extends D{constructor(){super(...arguments),this._orderedNext=kt(t=>super.next(t))}next(t){this._orderedNext(t)}},nt=class extends gt{constructor(t){super(t),this._orderedNext=kt(o=>super.next(o)),this._currentValue=t}getValue(){return this._currentValue}next(t){this._currentValue=t,this._orderedNext(t)}},$=(()=>{let t=class t extends nt{constructor(){super({})}ngOnDestroy(){this.complete()}};t.\u0275fac=function(r){return new(r||t)},t.\u0275prov=d({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})();var B=(()=>{let t=class t{};t.type="@@INIT";let e=t;return e})(),at=(()=>{let t=class t{constructor(n){this.addedStates=n}};t.type="@@UPDATE_STATE";let e=t;return e})(),pe=!1,Vt=new p(pe?"NGXS_PLUGINS":"");function w(e){return e.constructor?.type||e.type}var ct=(e,t,o)=>{e=l({},e);let n=t.split("."),r=n.length-1;return n.reduce((i,s,a)=>(a===r?i[s]=o:i[s]=Array.isArray(i[s])?i[s].slice():l({},i[s]),i&&i[s]),e),e},U=(e,t)=>t.split(".").reduce((o,n)=>o&&o[n],e);function $t(e){return typeof e=="function"}var he=(()=>{let t=class t{enter(n){return n()}leave(n){return n()}};t.\u0275fac=function(r){return new(r||t)},t.\u0275prov=d({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})();function Se(e,t,o){throw new Error(`State name '${e}' from ${t} already exists in ${o}.`)}function ge(e){throw new Error(`States must be decorated with @State() decorator, but "${e}" isn't.`)}function ye(e){return`'${e}' class should be decorated with @Injectable() right after the @State() decorator`}function me(e){let t="You have an invalid state initialization order. This typically occurs when `NgxsModule.forFeature`\nor `provideStates` is called before `NgxsModule.forRoot` or `provideStore`.\nOne example is when `NgxsRouterPluginModule.forRoot` is called before `NgxsModule.forRoot`.";if(e){let o=Object.keys(e).map(n=>`"${n}"`);t+=`
Feature states added before the store initialization is complete: ${o.join(", ")}.`}return t}var Yt=(()=>{let t=class t{constructor(n,r){this._ngZone=n,this._platformId=r}enter(n){return Rt(this._platformId)?this.runInsideAngular(n):this.runOutsideAngular(n)}leave(n){return this.runInsideAngular(n)}runInsideAngular(n){return O.isInAngularZone()?n():this._ngZone.run(n)}runOutsideAngular(n){return O.isInAngularZone()?this._ngZone.runOutsideAngular(n):n()}};t.\u0275fac=function(r){return new(r||t)(u(O),u(bt))},t.\u0275prov=d({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})();var Ht=!1,zt=new p(Ht?"CUSTOM_NGXS_EXECUTION_STRATEGY":""),ve=new p(Ht?"NGXS_EXECUTION_STRATEGY":"",{providedIn:"root",factory:()=>{let e=h(O),t=h(At),o=t.get(zt),n=e instanceof O;return o?t.get(o):t.get(n?Yt:he)}}),Kt=(()=>{let t=class t{constructor(n){this._executionStrategy=n}enter(n){return this._executionStrategy.enter(n)}leave(n){return this._executionStrategy.leave(n)}};t.\u0275fac=function(r){return new(r||t)(u(ve))},t.\u0275prov=d({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})(),Wt=e=>(...t)=>e.shift()(...t,(...n)=>Wt(e)(...n));function L(e){return t=>new z(o=>t.subscribe({next(n){e.leave(()=>o.next(n))},error(n){e.leave(()=>o.error(n))},complete(){e.leave(()=>o.complete())}}))}var qt=(()=>{let t=class t extends G{ngOnDestroy(){this.complete()}};t.\u0275fac=(()=>{let n;return function(i){return(n||(n=Q(t)))(i||t)}})(),t.\u0275prov=d({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})();var Jt=(()=>{let t=class t{constructor(n,r){this._parentManager=n,this._pluginHandlers=r,this.plugins=[],this.registerHandlers()}get rootPlugins(){return this._parentManager&&this._parentManager.plugins||this.plugins}registerHandlers(){let n=this.getPluginHandlers();this.rootPlugins.push(...n)}getPluginHandlers(){return(this._pluginHandlers||[]).map(r=>r.handle?r.handle.bind(r):r)}};t.\u0275fac=function(r){return new(r||t)(u(t,12),u(Vt,8))},t.\u0275prov=d({token:t,factory:t.\u0275fac});let e=t;return e})(),lt=new WeakMap,Bt=H.onUnhandledError;H.onUnhandledError=function(e){let t=lt.get(e);if(t)t();else if(Bt)Bt.call(this,e);else throw e};function Ee(e){let t=lt.get(e);return t?(t(),!0):!1}function Oe(e,t){if(e!==null&&typeof e=="object"){let o=!1;lt.set(e,()=>{o||(o=!0,t())})}return e}function _e(e){return t=>{let o=t.subscribe({error:n=>{e.runOutsideAngular(()=>{queueMicrotask(()=>{o&&Ee(n)})})}});return new z(n=>(o?.unsubscribe(),o=null,t.subscribe(n)))}}var Qt=(()=>{let t=class t extends D{};t.\u0275fac=(()=>{let n;return function(i){return(n||(n=Q(t)))(i||t)}})(),t.\u0275prov=d({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})(),Ie=(()=>{let t=class t{constructor(n,r,i,s,a,c){this._ngZone=n,this._actions=r,this._actionResults=i,this._pluginManager=s,this._stateStream=a,this._ngxsExecutionStrategy=c}dispatch(n){return this._ngxsExecutionStrategy.enter(()=>this.dispatchByEvents(n)).pipe(_e(this._ngZone),L(this._ngxsExecutionStrategy))}dispatchByEvents(n){return Array.isArray(n)?n.length===0?I(void 0):q(n.map(r=>this.dispatchSingle(r))).pipe(T(()=>{})):this.dispatchSingle(n)}dispatchSingle(n){let r=this._stateStream.getValue(),i=this._pluginManager.plugins;return Wt([...i,(s,a)=>{s!==r&&this._stateStream.next(s);let c=this.getActionResultStream(a);return c.subscribe(g=>this._actions.next(g)),this._actions.next({action:a,status:"DISPATCHED"}),this.createDispatchObservable(c)}])(r,n).pipe(M())}getActionResultStream(n){return this._actionResults.pipe(A(r=>r.action===n&&r.status!=="DISPATCHED"),C(1),M())}createDispatchObservable(n){return n.pipe(Ot(r=>{switch(r.status){case"SUCCESSFUL":return I(this._stateStream.getValue());case"ERRORED":return R(()=>r.error);default:return mt}})).pipe(M())}};t.\u0275fac=function(r){return new(r||t)(u(O),u(qt),u(Qt),u(Jt),u($),u(Kt))},t.\u0275prov=d({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})(),dt=!1,te=new p(dt?"ROOT_STATE_TOKEN":""),kn=new p(dt?"FEATURE_STATE_TOKEN":""),ee=new p(dt?"NGXS_OPTIONS":""),b=(()=>{let t=class t{constructor(){this.compatibility={strictContentSecurityPolicy:!1},this.executionStrategy=Yt,this.selectorOptions={injectContainerState:!1,suppressErrors:!1}}};t.\u0275fac=function(r){return new(r||t)},t.\u0275prov=d({token:t,factory:()=>(()=>{let n=new t,r=h(ee);return St(l(l({},n),r),{selectorOptions:l(l({},n.selectorOptions),r.selectorOptions)})})(),providedIn:"root"});let e=t;return e})(),ut=class{constructor(t,o,n){this.previousValue=t,this.currentValue=o,this.firstChange=n}};var Y=(()=>{let t=class t{constructor(n,r,i){this._stateStream=n,this._dispatcher=r,this._config=i}getRootStateOperations(){return{getState:()=>this._stateStream.getValue(),setState:r=>this._stateStream.next(r),dispatch:r=>this._dispatcher.dispatch(r)}}setStateToTheCurrentWithNew(n){let r=this.getRootStateOperations(),i=r.getState();r.setState(l(l({},i),n.defaults))}};t.\u0275fac=function(r){return new(r||t)(u($),u(Ie),u(b))},t.\u0275prov=d({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})();var Me=!1;function Te(e,t,o){return n=>{let{argumentSelectorFunctions:r,selectorOptions:i}=Ne(n,e,t),{suppressErrors:s}=i;return function(c){let g=r.map(S=>S(c));try{return o(...g)}catch(S){if(s&&S instanceof TypeError)return;throw Me&&console.error("The selector below has thrown an error upon invocation. Please check for any unsafe property access that may result in null or undefined values.",e.originalFn),S}}}}function Ae(e,t){let o=t&&t.containerClass,r=k(function(...s){let a=e.apply(o,s);return a instanceof Function?k.apply(null,[a]):a});return Object.setPrototypeOf(r,e),r}function Ne(e,t,o=[]){let n=t.getSelectorOptions(),r=e.getSelectorOptions(n),s=De(o,r,t.containerClass).map(a=>ne(a)(e));return{selectorOptions:r,argumentSelectorFunctions:s}}function De(e=[],t,o){let n=[],r=t.injectContainerState||e.length===0;return o&&r&&N(o)&&n.push(o),n.push(...e),n}function ne(e){let t=it(e)||N(e);return t&&t.makeRootSelector||(()=>e)}var ft=!1;function we(e){return t=>{for(let o=0;o<e.length;o++){if(!t)return;t=t[e[o]]}return t}}function be(e){let t=e,o="store."+t[0],n=0,r=t.length,i=o;for(;++n<r;)i=i+" && "+(o=o+"."+t[n]);return new Function("store","return "+i+";")}var Fe=new p(ft?"PROP_GETTER":"",{providedIn:"root",factory:()=>h(b).compatibility?.strictContentSecurityPolicy?we:be});function Re(e){let t=o=>{let n=e.find(r=>r===o);if(ft&&!n)throw new Error(`Child state not found: ${o}. \r
You may have forgotten to add states to module`);return n[v].name};return e.reduce((o,n)=>{let{name:r,children:i}=n[v];return o[r]=(i||[]).map(t),o},{})}function je(e){return e.reduce((t,o)=>{let n=o[v];return t[n.name]=o,t},{})}function Pe(e,t={}){let o=(n,r)=>{for(let i in n)if(n.hasOwnProperty(i)&&n[i].indexOf(r)>=0){let s=o(n,i);return s!==null?`${s}.${i}`:i}return null};for(let n in e)if(e.hasOwnProperty(n)){let r=o(e,n);t[n]=r?`${r}.${n}`:n}return t}function Ce(e){let t=[],o={},n=(r,i=[])=>{Array.isArray(i)||(i=[]),i.push(r),o[r]=!0,e[r].forEach(s=>{if(ft&&i.indexOf(s)>=0)throw new Error(`Circular dependency '${s}' is required by '${r}': ${i.join(" -> ")}`);o[s]||n(s,i.slice(0))}),t.indexOf(r)<0&&t.push(r)};return Object.keys(e).forEach(r=>n(r)),t.reverse()}function xe(...e){return Ge(e,["DISPATCHED"])}function Ge(e,t,o=Ve){let n=$e(e),r=t&&Be(t);return function(i){return i.pipe(ke(n,r),o())}}function ke(e,t){return A(o=>{let n=w(o.action),r=e[n],i=t?t[o.status]:!0;return r&&i})}function Ve(){return T(e=>e.action)}function $e(e){return e.reduce((t,o)=>(t[w(o)]=!0,t),{})}function Be(e){return e.reduce((t,o)=>(t[o]=!0,t),{})}function Ue(e){return t=>{let o=l({},t);for(let n in e)o[n]=e[n];return o}}var pt=(()=>{let t=class t{constructor(n){this._internalStateOperations=n}createStateContext(n){let r=this._internalStateOperations.getRootStateOperations();return{getState(){let i=r.getState();return oe(i,n.path)},patchState(i){let s=r.getState(),a=Ue(i);Ut(r,s,a,n.path)},setState(i){let s=r.getState();$t(i)?Ut(r,s,i,n.path):re(r,s,i,n.path)},dispatch(i){return r.dispatch(i)}}}};t.\u0275fac=function(r){return new(r||t)(u(Y))},t.\u0275prov=d({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})();function re(e,t,o,n){let r=ct(t,n,o);return e.setState(r),r}function Ut(e,t,o,n){let r=oe(t,n),i=o(r);return re(e,t,i,n)}function oe(e,t){return U(e,t)}var Vn=new RegExp("^[a-zA-Z0-9_]+$");function Xe(e,t,o){let n=o[e];n&&n!==t&&Se(e,t.name,n.name)}function Le(e){e.forEach(t=>{N(t)||ge(t.name)})}function Ze(e){He(e)||Ye(e)||console.warn(ye(e.name))}function Ye(e){return!!e.\u0275prov}function He(e){return(e.__annotations__||[]).some(o=>o?.ngMetadataName==="Injectable")}var ze=!1,Ke=new p(ze?"NGXS_DEVELOPMENT_OPTIONS":"",{providedIn:"root",factory:()=>({warnOnUnhandledActions:!0})}),We=(()=>{let t=class t{constructor(n){this._ignoredActions=new Set([B.type,at.type]),typeof n.warnOnUnhandledActions=="object"&&this.ignoreActions(...n.warnOnUnhandledActions.ignore)}ignoreActions(...n){for(let r of n)this._ignoredActions.add(r.type)}warn(n){Array.from(this._ignoredActions).some(i=>i===w(n))||(n=n.constructor&&n.constructor.name!=="Object"?n.constructor.name:n.type,console.warn(`The ${n} action has been dispatched but hasn't been handled. This may happen if the state with an action handler for this action is not registered.`))}};t.\u0275fac=function(r){return new(r||t)(u(Ke))},t.\u0275prov=d({token:t,factory:t.\u0275fac});let e=t;return e})(),qe=(()=>{let t=class t{constructor(){this._ngZone=h(O),this._errorHandler=h(wt)}handleError(n,r){this._ngZone.runOutsideAngular(()=>this._errorHandler.handleError(n))}};t.\u0275fac=function(r){return new(r||t)},t.\u0275prov=d({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})(),X=!1;function Je(e){let t=e===void 0?{}:e;return e&&(Array.isArray(e)?t=e.slice():typeof e=="object"&&(t=l({},e))),t}var Z=(()=>{let t=class t{constructor(n,r,i,s,a,c,g){this._injector=n,this._config=r,this._parentFactory=i,this._actions=s,this._actionResults=a,this._stateContextFactory=c,this._initialState=g,this._actionsSubscription=null,this._propGetter=h(Fe),this._ngxsUnhandledErrorHandler=null,this._states=[],this._statesByName={},this._statePaths={},this.getRuntimeSelectorContext=k(()=>{let S=this,_=S._propGetter;function f(E){let y=S.statePaths[E];return y?_(y.split(".")):null}return this._parentFactory?this._parentFactory.getRuntimeSelectorContext():{getStateGetter(E){let y=f(E);return y||((...se)=>(y||(y=f(E)),y?y(...se):void 0))},getSelectorOptions(E){let y=S._config.selectorOptions;return l(l({},y),E||{})}}})}get states(){return this._parentFactory?this._parentFactory.states:this._states}get statesByName(){return this._parentFactory?this._parentFactory.statesByName:this._statesByName}get statePaths(){return this._parentFactory?this._parentFactory.statePaths:this._statePaths}ngOnDestroy(){this._actionsSubscription?.unsubscribe()}add(n){X&&Le(n);let{newStates:r}=this.addToStatesMap(n);if(!r.length)return[];let i=Re(r),s=Ce(i),a=Pe(i),c=je(r),g=[];for(let S of s){let _=c[S],f=a[S],m=_[v];this.addRuntimeInfoToMeta(m,f),X&&Ze(_);let E={name:S,path:f,isInitialised:!1,actions:m.actions,instance:this._injector.get(_),defaults:Je(m.defaults)};this.hasBeenMountedAndBootstrapped(S,f)||g.push(E),this.states.push(E)}return g}addAndReturnDefaults(n){let r=n||[],i=this.add(r);return{defaults:i.reduce((a,c)=>ct(a,c.path,c.defaults),{}),states:i}}connectActionHandlers(){if(this._parentFactory||this._actionsSubscription!==null)return;let n=new D;this._actionsSubscription=this._actions.pipe(A(r=>r.status==="DISPATCHED"),j(r=>{n.next(r);let i=r.action;return this.invokeActions(n,i).pipe(T(()=>({action:i,status:"SUCCESSFUL"})),J({action:i,status:"CANCELED"}),P(s=>{let a=this._ngxsUnhandledErrorHandler||=this._injector.get(qe),c=Oe(s,()=>a.handleError(s,{action:i}));return I({action:i,status:"ERRORED",error:c})}))})).subscribe(r=>this._actionResults.next(r))}invokeActions(n,r){let i=w(r),s=[],a=!1;for(let c of this.states){let g=c.actions[i];if(g)for(let S of g){let _=this._stateContextFactory.createStateContext(c);try{let f=c.instance[S.fn](_,r);tt(f)&&(f=K(f)),W(f)?(f=f.pipe(j(m=>tt(m)?K(m):W(m)?m:I(m)),J({})),S.options.cancelUncompleted&&(f=f.pipe(x(n.pipe(xe(r)))))):f=I({}).pipe(M()),s.push(f)}catch(f){s.push(R(f))}a=!0}}if(X&&!a){let c=this._injector.get(We,null);c&&c.warn(r)}return s.length||s.push(I({})),q(s)}addToStatesMap(n){let r=[],i=this.statesByName;for(let s of n){let a=N(s).name;X&&Xe(a,s,i),!i[a]&&(r.push(s),i[a]=s)}return{newStates:r}}addRuntimeInfoToMeta(n,r){this.statePaths[n.name]=r,n.path=r}hasBeenMountedAndBootstrapped(n,r){let i=U(this._initialState,r)!==void 0;return this.statesByName[n]&&i}};t.\u0275fac=function(r){return new(r||t)(u(Dt),u(b),u(t,12),u(qt),u(Qt),u(pt),u(st,8))},t.\u0275prov=d({token:t,factory:t.\u0275fac});let e=t;return e})(),ht=(()=>{let t=class t{constructor(n,r,i,s,a,c){this._stateStream=n,this._internalStateOperations=r,this._config=i,this._internalExecutionStrategy=s,this._stateFactory=a,this._selectableStateStream=this._stateStream.pipe(L(this._internalExecutionStrategy),M({bufferSize:1,refCount:!0})),this.initStateStream(c)}dispatch(n){return this._internalStateOperations.getRootStateOperations().dispatch(n)}select(n){let r=this.getStoreBoundSelectorFn(n);return this.selectFromStateStream(this._selectableStateStream,r)}selectOnce(n){return this.select(n).pipe(C(1))}selectSnapshot(n){return this.getStoreBoundSelectorFn(n)(this._stateStream.getValue())}selectSignal(n){let r=this.getStoreBoundSelectorFn(n),i=r(this._stateStream.value),s=this.selectFromStateStream(this._selectableStateStream.pipe(vt(0,yt)),r);return jt(s,{initialValue:i})}selectFromStateStream(n,r){return n.pipe(T(r),P(i=>this._config.selectorOptions.suppressErrors&&i instanceof TypeError?I(void 0):R(i)),Et(),L(this._internalExecutionStrategy))}subscribe(n){return this._selectableStateStream.pipe(L(this._internalExecutionStrategy)).subscribe(n)}snapshot(){return this._internalStateOperations.getRootStateOperations().getState()}reset(n){this._internalStateOperations.getRootStateOperations().setState(n)}getStoreBoundSelectorFn(n){let r=ne(n),i=this._stateFactory.getRuntimeSelectorContext();return r(i)}initStateStream(n){let r=this._stateStream.value;(!r||Object.keys(r).length===0)&&this._stateStream.next(n)}};t.\u0275fac=function(r){return new(r||t)(u($),u(Y),u(b),u(Kt),u(Z),u(st,8))},t.\u0275prov=d({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})(),Qe=!1,tn=new p(Qe?"NGXS_PREBOOT_FNS":"");var en=(()=>{let t=class t{constructor(n,r){t.store=n,t.config=r}ngOnDestroy(){t.store=null,t.config=null}};t.store=null,t.config=null,t.\u0275fac=function(r){return new(r||t)(u(ht),u(b))},t.\u0275prov=d({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})(),nn=!1,rn=(()=>{let t=class t{constructor(n,r,i,s){this._store=n,this._internalStateOperations=r,this._stateContextFactory=i,this._appBootstrappedState=s,this._destroy$=new F(1)}ngOnDestroy(){this._destroy$.next()}ngxsBootstrap(n,r){nn&&(n instanceof B?this._initStateHasBeenDispatched=!0:n instanceof at&&!this._initStateHasBeenDispatched&&console.error(me(n.addedStates))),this._internalStateOperations.getRootStateOperations().dispatch(n).pipe(A(()=>!!r),Mt(()=>this._invokeInitOnStates(r.states)),j(()=>this._appBootstrappedState),A(i=>!!i),x(this._destroy$)).subscribe(()=>this._invokeBootstrapOnStates(r.states))}_invokeInitOnStates(n){for(let r of n){let i=r.instance;i.ngxsOnChanges&&this._store.select(s=>U(s,r.path)).pipe(It(void 0),_t(),x(this._destroy$)).subscribe(([s,a])=>{let c=new ut(s,a,!r.isInitialised);i.ngxsOnChanges(c)}),i.ngxsOnInit&&i.ngxsOnInit(this._getStateContext(r)),r.isInitialised=!0}}_invokeBootstrapOnStates(n){for(let r of n){let i=r.instance;i.ngxsAfterBootstrap&&i.ngxsAfterBootstrap(this._getStateContext(r))}}_getStateContext(n){return this._stateContextFactory.createStateContext(n)}};t.\u0275fac=function(r){return new(r||t)(u(ht),u(Y),u(pt),u(V))},t.\u0275prov=d({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})(),ie=!1;function on(){(h(tn,{optional:!0})||[]).forEach(s=>s());let t=h(Z),o=h(Y);h(ht),h(en);let n=h(te,{optional:!0})||[],r=h(rn),i=t.addAndReturnDefaults(n);o.setStateToTheCurrentWithNew(i),t.connectActionHandlers(),r.ngxsBootstrap(new B,i)}var Xt=new p(ie?"NGXS_ROOT_STORE_INITIALIZER":""),$n=new p(ie?"NGXS_FEATURE_STORE_INITIALIZER":""),sn=[{provide:Xt,useFactory:on},{provide:Tt,multi:!0,useFactory(){return()=>h(Xt)}}];function an(e,t){return[Z,Jt,...e,{provide:te,useValue:e},{provide:Ft,useFactory:()=>{let o=h(V);return()=>o.bootstrap()},multi:!0},{provide:ee,useValue:t},{provide:zt,useValue:t.executionStrategy},{provide:Gt,useExisting:pt},{provide:xt,useExisting:Z}]}function Bn(e,t){return(o,n,r)=>{let i=ot(o.constructor),s=Array.isArray(e)?e:[e];for(let a of s){let c=a.type;i.actions[c]||(i.actions[c]=[]),i.actions[c].push({fn:n,options:t||{},type:c})}}}function Un(e){return t=>{let o=t,n=ot(o),r=Object.getPrototypeOf(o),i=cn(r,e);un({meta:n,inheritedStateClass:r,optionsWithInheritance:i}),o[rt]=i}}function cn(e,t){let o=e[rt]||{};return l(l({},o),t)}function un(e){let{meta:t,inheritedStateClass:o,optionsWithInheritance:n}=e,{children:r,defaults:i,name:s}=n,a=typeof s=="string"?s:s&&s.getName()||null;if(o.hasOwnProperty(v)){let c=o[v]||{};t.actions=l(l({},t.actions),c.actions)}t.children=r,t.defaults=i,t.name=a}var Lt="NGXS_SELECTOR_OPTIONS_META",Zt={getOptions:e=>e&&e[Lt]||{},defineOptions:(e,t)=>{e&&(e[Lt]=t)}};function ln(e,t){let o=Pt(e);o.originalFn=e;let n=()=>({});t&&(o.containerClass=t.containerClass,o.selectorName=t.selectorName||null,n=t.getSelectorOptions||n);let r=l({},o);return o.getSelectorOptions=()=>dn(r,n()),o}function dn(e,t){return l(l(l(l({},Zt.getOptions(e.containerClass)||{}),Zt.getOptions(e.originalFn)||{}),e.getSelectorOptions()||{}),t)}function fn(e,t,o){let n=Ae(t,o),r=ln(t,o);return r.makeRootSelector=Te(r,e,n),n}function Xn(e){return(t,o,n)=>{n||=Object.getOwnPropertyDescriptor(t,o);let r=n?.value,i=fn(e,r,{containerClass:t,selectorName:o.toString(),getSelectorOptions(){return{}}});return{configurable:!0,get(){return i},originalFn:r}}}function Ln(e=[],...t){let o=[],n={};return t.length>0&&(pn(t[0])?o.push(...t):(n=t[0],o.push(...t.slice(1)))),Nt([...an(e,n),sn,o])}function pn(e){return!!e.\u0275providers}export{ht as a,Bn as b,Un as c,Xn as d,Ln as e};
