PageSourceSearch

https://scripod.com/assets/button-CUnEcMYq.js

js scripod.com collected 2026-10-09 00:23:52 UTC 4,119 bytes, 1 lines download raw bytes

1import{a as e,t}from"./jsx-runtime-D_MnEzuy.js";import{t as n}from"./react-DBEjWt7A.js";import{a as r,i,r as a}from"./dist-DT2jQ2P_.js";var o=e(n(),1);function s(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function c(...e){return t=>{let n=!1,r=e.map(e=>{let r=s(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():s(e[t],null)}}}}function l(...e){return o.useCallback(c(...e),e)}var u=t();function d(e){let t=p(e),n=o.forwardRef((e,n)=>{let{children:r,...i}=e,a=o.Children.toArray(r),s=a.find(g);if(s){let e=s.props.children,r=a.map(t=>t===s?o.Children.count(e)>1?o.Children.only(null):o.isValidElement(e)?e.props.children:null:t);return(0,u.jsx)(t,{...i,ref:n,children:o.isValidElement(e)?o.cloneElement(e,void 0,r):null})}return(0,u.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}var f=d(`Slot`);function p(e){let t=o.forwardRef((e,t)=>{let{children:n,...r}=e;if(o.isValidElement(n)){let e=v(n),i=_(r,n.props);return n.type!==o.Fragment&&(i.ref=t?c(t,e):e),o.cloneElement(n,i)}return o.Children.count(n)>1?o.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var m=Symbol(`radix.slottable`);function h(e){let t=({children:e})=>(0,u.jsx)(u.Fragment,{children:e});return t.displayName=`${e}.Slottable`,t.__radixId=m,t}function g(e){return o.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===m}function _(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}}function v(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)}var y=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,b=r,x=((e,t)=>n=>{if(t?.variants==null)return b(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 o=y(t)||y(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return b(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,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)})(`inline-flex cursor-pointer gap-1 width-[calc-size(auto)] items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50`,{variants:{variant:{default:`bg-primary text-primary-foreground shadow hover-active:bg-primary/90`,destructive:`bg-destructive text-destructive-foreground shadow-sm hover-active:bg-destructive/90`,outline:`bg-foreground
1/5 text-foreground shadow hover-active:bg-foreground/15`,secondary:`bg-secondary text-secondary-foreground shadow-sm hover-active:bg-secondary/80`,ghost:`hover:bg-accent active:bg-accent hover:text-accent-foreground active:text-accent-foreground`,link:`text-primary underline-offset-4 hover:underline active:underline`},size:{default:`h-9 px-4 py-2`,sm:`h-8 rounded-md px-3 text-xs`,lg:`h-10 rounded-md px-8`,icon:`h-9 w-9`}},defaultVariants:{variant:`default`,size:`default`}}),S=o.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,onClick:s,children:c,loading:l,...d},p)=>{let m=r?f:`button`,[h,g]=o.useOptimistic(!1,(e,t)=>!0),_=e=>{let t=s?.(e);t instanceof Promise&&o.startTransition(async()=>{g(!0),await t})},v=o.useMemo(()=>h||d.disabled,[h,d.disabled]);return(0,u.jsx)(m,{className:i(x({variant:t,size:n,className:e}),v&&`cursor-not-allowed`),ref:p,...d,onClick:_,disabled:v,children:l??h?(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(a,{className:`size-4`,tickWidth:2}),c]}):c})});S.displayName=`Button`;export{c as a,h as i,x as n,l as o,d as r,S 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.