"use strict";const g=require("react"),f=require("react/jsx-runtime");function C(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const i=C(g);function d(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function y(...e){return t=>{let n=!1;const o=e.map(r=>{const l=d(r,t);return!n&&typeof l=="function"&&(n=!0),l});if(n)return()=>{for(let r=0;r<o.length;r++){const l=o[r];typeof l=="function"?l():d(e[r],null)}}}}function R(...e){return i.useCallback(y(...e),e)}function m(e){const t=E(e),n=i.forwardRef((o,r)=>{const{children:l,...c}=o,s=i.Children.toArray(l),a=s.find(_);if(a){const u=a.props.children,b=s.map(p=>p===a?i.Children.count(u)>1?i.Children.only(null):i.isValidElement(u)?u.props.children:null:p);return f.jsx(t,{...c,ref:r,children:i.isValidElement(u)?i.cloneElement(u,void 0,b):null})}return f.jsx(t,{...c,ref:r,children:l})});return n.displayName=`${e}.Slot`,n}var j=m("Slot");function E(e){const t=i.forwardRef((n,o)=>{const{children:r,...l}=n;if(i.isValidElement(r)){const c=P(r),s=x(l,r.props);return r.type!==i.Fragment&&(s.ref=o?y(o,c):c),i.cloneElement(r,s)}return i.Children.count(r)>1?i.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var S=Symbol("radix.slottable");function h(e){const t=({children:n})=>f.jsx(f.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=S,t}var O=h("Slottable");function _(e){return i.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===S}function x(e,t){const n={...t};for(const o in t){const r=e[o],l=t[o];/^on[A-Z]/.test(o)?r&&l?n[o]=(...s)=>{const a=l(...s);return r(...s),a}:r&&(n[o]=r):o==="style"?n[o]={...r,...l}:o==="className"&&(n[o]=[r,l].filter(Boolean).join(" "))}return{...e,...n}}function P(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}exports.Slot=j;exports.Slottable=O;exports.createSlot=m;exports.useComposedRefs=R;
//# sourceMappingURL=index-1WIgmEZh.js.map
