import{w as D,q as A,v as L,E as U,H as Y,I as x,J as B,K as M,L as y,x as C,y as N,z as $,U as q,A as w,M as F,C as Z,B as z,N as H,O,P as G,Q as J,R as K,g as T,T as p,V as Q,W as V,X as W,Y as X,Z as j,_ as k,$ as ee,a0 as ae,a1 as re,a2 as ne,a3 as te,a4 as se,S as ie,a5 as ue,b as fe,f as _e,a6 as le,a7 as de}from"./CiiADubH.js";function ve(e,n,s=!1){A&&L();var a=e,i=null,u=null,_=q,c=s?U:0,v=!1;const m=(l,t=!0)=>{v=!0,o(t,l)};var f=null;function I(){f!==null&&(f.lastChild.remove(),a.before(f),f=null);var l=_?i:u,t=_?u:i;l&&F(l),t&&Z(t,()=>{_?u=null:i=null})}const o=(l,t)=>{if(_===(_=l))return;let E=!1;if(A){const h=Y(a)===x;!!_===h&&(a=B(),M(a),y(!1),E=!0)}var S=w(),d=a;if(S&&(f=document.createDocumentFragment(),f.append(d=C())),_?i??=t&&N(()=>t(d)):u??=t&&N(()=>t(d)),S){var g=$,r=_?i:u,b=_?u:i;r&&g.skipped_effects.delete(r),b&&g.skipped_effects.add(b),g.add_callback(I)}else I();E&&y(!0)};D(()=>{v=!1,n(m),v||o(null,null)},c),A&&(a=z)}let P=!1,R=Symbol();function be(e,n,s){const a=s[n]??={store:null,source:G(void 0),unsubscribe:O};if(a.store!==e&&!(R in s))if(a.unsubscribe(),a.store=e??null,e==null)a.source.v=void 0,a.unsubscribe=O;else{var i=!0;a.unsubscribe=J(e,u=>{i?a.source.v=u:p(a.source,u)}),i=!1}return e&&R in s?K(e):T(a.source)}function Se(){const e={};function n(){H(()=>{for(var s in e)e[s].unsubscribe();Q(e,R,{enumerable:!1,value:!0})})}return[e,n]}function ge(e,n,s){return e.set(s),n}function ce(e){var n=P;try{return P=!1,[e(),P]}finally{P=n}}function me(e,n,s,a){var i=!re||(s&ne)!==0,u=(s&te)!==0,_=(s&de)!==0,c=a,v=!0,m=()=>(v&&(v=!1,c=_?fe(a):a),c),f;if(u){var I=ie in e||ue in e;f=V(e,n)?.set??(I&&n in e?r=>e[n]=r:void 0)}var o,l=!1;u?[o,l]=ce(()=>e[n]):o=e[n],o===void 0&&a!==void 0&&(o=m(),f&&(i&&W(),f(o)));var t;if(i?t=()=>{var r=e[n];return r===void 0?m():(v=!0,r)}:t=()=>{var r=e[n];return r!==void 0&&(c=void 0),r===void 0?c:r},i&&(s&X)===0)return t;if(f){var E=e.$$legacy;return(function(r,b){return arguments.length>0?((!i||!b||E||l)&&f(b?t():r),r):t()})}var S=!1,d=((s&le)!==0?_e:ae)(()=>(S=!1,t()));u&&T(d);var g=k;return(function(r,b){if(arguments.length>0){const h=b?T(d):i&&u?j(r):r;return p(d,h),S=!0,c!==void 0&&(c=h),r}return se&&S||(g.f&ee)!==0?d.v:T(d)})}export{Se as a,ge as b,ve as i,me as p,be as s};
