1import{a as e,n as t,t as n}from"./jsx-runtime-D3jfb0Ew.js";import{t as r}from"./clsx-DB0hHKMi.js";import{t as i}from"./utils-Cl78mqKH.js";var a=e(t(),1),o=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,s=r,c=(e,t)=>n=>{if(t?.variants==null)return s(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let s=o(t)||o(a);return r[e][s]}),c=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return s(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...c}[t]):{...i,...c}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)},l=Object.defineProperty,u=(e,t)=>l(e,`name`,{value:t,configurable:!0});function d(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}u(d,`setRef`);function f(...e){return t=>{let n=!1,r=e.map(e=>{let r=d(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():d(e[t],null)}}}}u(f,`composeRefs`);function p(...e){return a.useCallback(f(...e),e)}u(p,`useComposedRefs`);var m=Object.defineProperty,h=(e,t)=>m(e,`name`,{value:t,configurable:!0});function g(e){let t=a.forwardRef((t,n)=>{let{children:r,...i}=t,o=null,s=!1,c=[];T(r)&&typeof k==`function`&&(r=k(r._payload)),a.Children.forEach(r,e=>{if(C(e)){s=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;T(n)&&typeof k==`function`&&(n=k(n._payload)),o=b(t,n),c.push(o?.props?.children)}else c.push(e)}),o?o=a.cloneElement(o,void 0,c):!s&&a.Children.count(r)===1&&a.isValidElement(r)&&(o=r);let l=o?S(o):void 0,u=p(n,l);if(!o){if(r||r===0)throw Error(s?O(e):D(e));return r}let d=x(i,o.props??{});return o.type!==a.Fragment&&(d.ref=n?u:l),a.cloneElement(o,d)});return t.displayName=`${e}.Slot`,t}h(g,`createSlot`);var _=g(`Slot`),v=Symbol.for(`radix.slottable`);function y(e){let t=h(e=>`child`in e?e.children(e.child):e.children,`Slottable`);return t.displayName=`${e}.Slottable`,t.__radixId=v,t}h(y,`createSlottable`);var b=h((e,t)=>{if(`child`in e.props){let t=e.props.child;return a.isValidElement(t)?a.cloneElement(t,void 0,e.props.children(t.props.children)):null}return a.isValidElement(t)?t:null},`getSlottableElementFromSlottable`);function x(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}h(x,`mergeProps`);function S(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)}h(S,`getElementRef`);function C(e){return a.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===v}h(C,`isSlottable`);var w=Symbol.for(`react.lazy`);function T(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===w&&`_payload`in e&&E(e._payload)}h(T,`isLazyComponent`);function E(e){return typeof e==`object`&&!!e&&`then`in e}h(E,`isPromiseLike`);var D=h(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,`createSlotError`),O=h(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,`createSlottableError`),k=a.use,A=n(),j=c(`inline-flex shrink-0 items-center justify-center whitespace-nowrap rounded-full font-semibold outline-none transition-all focus-visible:ring-[3px] focus-visible:ring-ring/30 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,{variants:{variant:{default:`bg-primary-fixed text-primary-foreground hover:bg-primary-fixed-hover`,secondary:`bg-secondary text-secondary-foreground hover:bg-secondary-hover`,destructive:`border border-destructive text-destructive hover:bg-destructive hover:text-destructive-foreground`,outline:`border border-border text-primary hover:bg-accent hover:text-accent-foreground`,ghost:`text-foreground hover:bg-accent hover:text-accent-foreground`,link:`text-primary`},size:{default:`gap-1 px-3 py-[6px] text-xs leading-5 [&_svg:not([class*='size-'])]:size-5`,lg:`gap-1 px-4 py-2 text-base leading-[1.5] [&_svg:not([class*='size-'])]:size-6`,icon:`size-9 p-2 [&_svg:not([class*='size-'])]:size-6`,"icon-lg":`size-10 p-2 [&_svg:not([class*='size-'])]:size-6`}},defaultVariants:{variant:`default`,size:`default`}}),M={default:`px-1`,lg:`px-2`},N={default:`px-4`,lg:`px-6`};function P({className:e,variant:t=`default`,size:n=`default`,asChild:r=!1,children:o,...s}){let c=n??`default`,l=c==="default"||c===`lg`?c:null;if(r)return(0,A.jsx)(_,{"data-slot":`button`,className:i(j({variant:t,size:c}),l&&N[l],e),...s,children:o});let u=[],d=[],f=()=>{if(d.length===0)return;let e=d;d=[],u.push((0,A.jsx)(`span`,{"data-slot":`button-label`,className:i(`inline-flex items-center`,l&&M[l]),children:e},`label-${u.length}`))};
1return a.Children.forEach(o,e=>{if(typeof e==`string`||typeof e==`number`){d.push(e);return}f(),u.push((0,A.jsx)(a.Fragment,{children:e},`node-${u.length}`))}),f(),(0,A.jsx)(`button`,{"data-slot":`button`,className:i(j({variant:t,size:c}),e),...s,children:u})}export{p as a,y as i,_ as n,c as o,g as r,P as t};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.