import{Ma as I,Sa as b,Vd as m,Wd as w,a as e,b as f,ec as j,fc as D,h as y,qb as v}from"./chunk-NRAZ4AKM.js";var r=Symbol("STATE_SIGNAL");function L(s,...n){s[r].update(o=>n.reduce((t,i)=>e(e({},t),typeof i=="function"?i(t):i),o))}function A(s){let n=w(()=>s());return M(n)?new Proxy(s,{get(o,t){return t in n?(j(o[t])||Object.defineProperty(o,t,{value:m(()=>o()[t]),configurable:!0}),A(o[t])):o[t]}}):s}function M(s){return s?.constructor===Object}function N(...s){let n=[...s],o="providedIn"in n[0]?n.shift():{},t=n;return(()=>{let u=class u{constructor(){let d=t.reduce((g,H)=>H(g),R()),{slices:h,signals:K,methods:P,hooks:T}=d,S=e(e(e({},h),K),P);this[r]=d[r];for(let g in S)this[g]=S[g];let{onInit:p,onDestroy:k}=T;p&&p(),k&&b(v).onDestroy(k)}};y(u,"\u0275fac",function(h){return new(h||u)}),y(u,"\u0275prov",I({token:u,factory:u.\u0275fac,providedIn:o.providedIn||null}));let c=u;return c})()}function R(){return{[r]:D({}),slices:{},signals:{},methods:{},hooks:{}}}function O(s,...n){let o=typeof s=="function"?[s,...n]:n;return t=>o.reduce((i,c)=>c(i),t)}function a(s,n){return Object.keys(s).reduce((o,t)=>n.includes(t)?o:f(e({},o),{[t]:s[t]}),{})}function C(s){return n=>{let o=s(e(e({},n.slices),n.signals)),t=Object.keys(o),i=a(n.slices,t),c=a(n.methods,t);return f(e({},n),{slices:i,signals:e(e({},n.signals),o),methods:c})}}function q(s){return n=>{let o=e(e(e({[r]:n[r]},n.slices),n.signals),n.methods),t=typeof s=="function"?s(o):s,i=c=>{let u=t[c],l=n.hooks[c];return u?()=>{l&&l(),u(o)}:l};return f(e({},n),{hooks:{onInit:i("onInit"),onDestroy:i("onDestroy")}})}}function z(s){return n=>{let o=s(e(e(e({[r]:n[r]},n.slices),n.signals),n.methods)),t=Object.keys(o),i=a(n.slices,t),c=a(n.signals,t);return f(e({},n),{slices:i,signals:c,methods:e(e({},n.methods),o)})}}function B(s){return n=>{let o=typeof s=="function"?s():s,t=Object.keys(o);n[r].update(l=>e(e({},l),o));let i=t.reduce((l,d)=>{let h=m(()=>n[r]()[d]);return f(e({},l),{[d]:A(h)})},{}),c=a(n.signals,t),u=a(n.methods,t);return f(e({},n),{slices:e(e({},n.slices),i),signals:c,methods:u})}}export{L as a,N as b,O as c,C as d,q as e,z as f,B as g};