import{F as L,x as Y,G as x,I as R,J as E,K as N,S as w,L as g,M as B,P as M,z as h,q as U,y as j,N as G,O as q,Q as z,R as K,T as Z,U as $,V as C,W as F,X as J,Y as T,Z as p}from"./CZHsSL_X.js";import{e as Q}from"./r0JawsZc.js";function I(e,r){return e===r||e?.[w]===r}function H(e={},r,n,t){var i=L.r,u=E;return Y(()=>{var o,f;return x(()=>{o=f,f=[],R(()=>{e!==n(...f)&&(r(e,...f),o&&I(n(...o),e)&&r(null,...o))})}),()=>{let a=u;for(;a!==i&&a.parent!==null&&a.parent.f&N;)a=a.parent;const v=()=>{f&&I(n(...f),e)&&r(null,...f)},l=a.teardown;a.teardown=()=>{v(),l?.()}}}),e}const V={get(e,r){let n=e.props.length;for(;n--;){let t=e.props[n];if(p(t)&&(t=t()),typeof t=="object"&&t!==null&&r in t)return t[r]}},set(e,r,n){let t=e.props.length;for(;t--;){let i=e.props[t];p(i)&&(i=i());const u=g(i,r);if(u&&u.set)return u.set(n),!0}return!1},getOwnPropertyDescriptor(e,r){let n=e.props.length;for(;n--;){let t=e.props[n];if(p(t)&&(t=t()),typeof t=="object"&&t!==null&&r in t){const i=g(t,r);return i&&!i.configurable&&(i.configurable=!0),i}}},has(e,r){if(r===w||r===T)return!1;for(let n of e.props)if(p(n)&&(n=n()),n!=null&&r in n)return!0;return!1},ownKeys(e){const r=[];for(let n of e.props)if(p(n)&&(n=n()),!!n){for(const t in n)r.includes(t)||r.push(t);for(const t of Object.getOwnPropertySymbols(n))r.includes(t)||r.push(t)}return r}};function m(...e){return new Proxy({props:e},V)}function k(e,r,n,t){var i=!K||(n&Z)!==0,u=(n&z)!==0,o=(n&J)!==0,f=t,a=!0,v=()=>(a&&(a=!1,f=o?R(t):t),f);let l;if(u){var y=w in e||T in e;l=g(e,r)?.set??(y&&r in e?s=>e[r]=s:void 0)}var c,O=!1;u?[c,O]=Q(()=>e[r]):c=e[r],c===void 0&&t!==void 0&&(c=v(),l&&(i&&B(),l(c)));var d;if(i?d=()=>{var s=e[r];return s===void 0?v():(a=!0,s)}:d=()=>{var s=e[r];return s!==void 0&&(f=void 0),s===void 0?f:s},i&&(n&M)===0)return d;if(l){var A=e.$$legacy;return(function(s,S){return arguments.length>0?((!i||!S||A||O)&&l(S?d():s),s):d()})}var P=!1,_=((n&$)!==0?C:F)(()=>(P=!1,d()));u&&h(_);var D=E;return(function(s,S){if(arguments.length>0){const b=S?h(_):i&&u?U(s):s;return j(_,b),P=!0,f!==void 0&&(f=b),s}return G&&P||(D.f&q)!==0?_.v:h(_)})}export{H as b,k as p,m as s};
