import{R as p,r as y,y as h,a2 as k,b7 as m,aN as f,b8 as v,b9 as g,ba as _,aP as T,bb as j,al as O}from"./C0u2Lk3h.js";const $=Symbol.for("nuxt:client-only"),N=p({name:"ClientOnly",inheritAttrs:!1,props:["fallback","placeholder","placeholderTag","fallbackTag"],setup(r,{slots:t,attrs:d}){const o=y(!1);return h(()=>{o.value=!0}),O($,!0),a=>{var u;if(o.value)return(u=t.default)==null?void 0:u.call(t);const l=t.fallback||t.placeholder;if(l)return l();const n=a.fallback||a.placeholder||"",i=a.fallbackTag||a.placeholderTag||"span";return k(i,d,n)}}}),b=new WeakMap;function A(r){if(b.has(r))return b.get(r);const t={...r};return t.render?t.render=(d,o,a,l,n,i)=>{var u;if(l.mounted$??d.mounted$){const e=(u=r.render)==null?void 0:u.bind(d)(d,o,a,l,n,i);return e.children===null||typeof e.children=="string"?m(e):f(e)}else{const e=v(d._.vnode.el??null)??["<div></div>"];return g(e.join(""),e.length)}}:t.template&&(t.template=`
      <template v-if="mounted$">${r.template}</template>
      <template v-else><div></div></template>
    `),t.setup=(d,o)=>{var u;const a=_(),l=y(a.isHydrating===!1),n=T();if(a.isHydrating){const e={...n.attrs},c=C(n);for(const s in e)delete n.attrs[s];h(()=>{Object.assign(n.attrs,e),n.vnode.dirs=c})}h(()=>{l.value=!0});const i=((u=r.setup)==null?void 0:u.call(r,d,o))||{};return j(i)?Promise.resolve(i).then(e=>typeof e!="function"?(e=e||{},e.mounted$=l,e):(...c)=>{if(l.value||!a.isHydrating){const s=e(...c);return s.children===null||typeof s.children=="string"?m(s):f(s)}else{const s=v((n==null?void 0:n.vnode.el)??null)??["<div></div>"];return g(s.join(""),s.length)}}):typeof i=="function"?(...e)=>{if(l.value)return f(i(...e),o.attrs);const c=v((n==null?void 0:n.vnode.el)??null)??["<div></div>"];return g(c.join(""),c.length)}:Object.assign(i,{mounted$:l})},b.set(r,t),t}function C(r){if(!r||!r.vnode.dirs)return null;const t=r.vnode.dirs;return r.vnode.dirs=null,t}export{N as _,A as c};
