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