import{g as A,P as L,a as P,p as D,s as T,b,D as B,d as Y,l as h,c as M,f as N,i as U,S as x,L as $,h as j,u as q,j as w,k as z,m as C}from"./CYSP8FLW.js";import{c as G}from"./Djx0iHty.js";function F(r,a,t,s){var f=!h||(t&M)!==0,v=(t&N)!==0,E=(t&C)!==0,n=s,S=!0,g=()=>(S&&(S=!1,n=E?q(s):s),n),u;if(v){var O=x in r||$ in r;u=A(r,a)?.set??(O&&a in r?e=>r[a]=e:void 0)}var _,I=!1;v?[_,I]=G(()=>r[a]):_=r[a],_===void 0&&s!==void 0&&(_=g(),u&&(f&&w(),u(_)));var i;if(f?i=()=>{var e=r[a];return e===void 0?g():(S=!0,e)}:i=()=>{var e=r[a];return e!==void 0&&(n=void 0),e===void 0?n:e},f&&(t&L)===0)return i;if(u){var R=r.$$legacy;return(function(e,l){return arguments.length>0?((!f||!l||R||I)&&u(l?i():e),e):i()})}var c=!1,d=((t&z)!==0?j:Y)(()=>(c=!1,i()));v&&P(d);var m=b;return(function(e,l){if(arguments.length>0){const o=l?P(d):f&&v?D(e):e;return T(d,o),c=!0,n!==void 0&&(n=o),e}return U&&c||(m.f&B)!==0?d.v:P(d)})}export{F as p};
