import{b as H,h as L,d as M,E as w,r as z,H as Z,e as $,f as j,s as V,g as q,i as Y,j as m,p as B,U as k,k as J,m as K,n as Q,a as O,q as W,S as F,o as X,t as p,L as x,v as U,w as aa,P as ra,x as A,y as ea,z as sa,A as ia,B as fa,C as na,D as ta,l as ua,F as la,G as _a,I as ca}from"./DnREidt8.js";function Ia(a,r,[f,i]=[0,0]){L&&f===0&&M();var n=a,e=null,t=null,I=k,E=f>0?w:0,l=!1;const T=(u,_=!0)=>{l=!0,d(_,u)},d=(u,_)=>{if(I===(I=u))return;let S=!1;if(L&&i!==-1){if(f===0){const c=z(n);c===Z?i=0:c===$?i=1/0:(i=parseInt(c.substring(1)),i!==i&&(i=I?1/0:-1))}const b=i>f;!!I===b&&(n=j(),V(n),q(!1),S=!0,i=-1)}I?(e?Y(e):_&&(e=m(()=>_(n))),t&&B(t,()=>{t=null})):(t?Y(t):_&&(t=m(()=>_(n,[f+1,i]))),e&&B(e,()=>{e=null})),S&&q(!0)};H(()=>{l=!1,r(T),l||d(null,null)},E),L&&(n=J)}function C(a,r){return a===r||(a==null?void 0:a[F])===r}function Sa(a={},r,f,i){return K(()=>{var n,e;return Q(()=>{n=e,e=[],O(()=>{a!==f(...e)&&(r(a,...e),n&&C(f(...n),a)&&r(null,...n))})}),()=>{W(()=>{e&&C(f(...e),a)&&r(null,...e)})}}),a}let R=!1;function va(a){var r=R;try{return R=!1,[a(),R]}finally{R=r}}function y(a){var r;return((r=a.ctx)==null?void 0:r.d)??!1}function Pa(a,r,f,i){var N;var n=(f&_a)!==0,e=!ua||(f&la)!==0,t=(f&na)!==0,I=(f&ca)!==0,E=!1,l;t?[l,E]=va(()=>a[r]):l=a[r];var T=F in a||ta in a,d=t&&(((N=X(a,r))==null?void 0:N.set)??(T&&r in a&&(s=>a[r]=s)))||void 0,u=i,_=!0,S=!1,b=()=>(S=!0,_&&(_=!1,I?u=O(i):u=i),u);l===void 0&&i!==void 0&&(d&&e&&p(),l=b(),d&&d(l));var c;if(e)c=()=>{var s=a[r];return s===void 0?b():(_=!0,S=!1,s)};else{var D=(n?U:aa)(()=>a[r]);D.f|=x,c=()=>{var s=A(D);return s!==void 0&&(u=void 0),s===void 0?u:s}}if((f&ra)===0&&e)return c;if(d){var G=a.$$legacy;return function(s,P){return arguments.length>0?((!e||!P||G||E)&&d(P?c():s),s):c()}}var g=!1,h=fa(l),v=U(()=>{var s=c(),P=A(h);return g?(g=!1,P):h.v=s});return t&&A(v),n||(v.equals=ea),function(s,P){if(arguments.length>0){const o=P?A(v):e&&t?sa(s):s;if(!v.equals(o)){if(g=!0,ia(h,o),S&&u!==void 0&&(u=o),y(v))return s;O(()=>A(v))}return s}return y(v)?v.v:A(v)}}export{Sa as b,Ia as i,Pa as p};
