1import { 2 require_jsx_runtime 3} from "/@fs/home/runner/workspace/node_modules/.vite/deps/chunk-S77I6LSE.js?v=9ce4103e"; 4import { 5 require_react 6} from "/@fs/home/runner/workspace/node_modules/.vite/deps/chunk-3TFVT2CW.js?v=9ce4103e"; 7import { 8 __toESM 9} from "/@fs/home/runner/workspace/node_modules/.vite/deps/chunk-4MBMRILA.js?v=9ce4103e"; 10
vendor: 95 bytes, lines 11-13
11// node_modules/@radix-ui/react-slot/dist/index.mjs 12var React2 = __toESM(require_react(), 1); 13
vendor: 450 bytes, lines 14-29
14// node_modules/@radix-ui/react-compose-refs/dist/index.mjs 15var React = __toESM(require_react(), 1); 16function setRef(ref, value) { 17 if (typeof ref === "function") { 18 ref(value); 19 } else if (ref !== null && ref !== void 0) { 20 ref.current = value; 21 } 22} 23function composeRefs(...refs) { 24 return (node) => refs.forEach((ref) => setRef(ref, node)); 25} 26function useComposedRefs(...refs) { 27 return React.useCallback(composeRefs(...refs), refs); 28} 29
vendor: 3,289 bytes, lines 30-115
30// node_modules/@radix-ui/react-slot/dist/index.mjs 31var import_jsx_runtime = __toESM(require_jsx_runtime(), 1); 32var Slot = React2.forwardRef((props, forwardedRef) => { 33 const { children, ...slotProps } = props; 34 const childrenArray = React2.Children.toArray(children); 35 const slottable = childrenArray.find(isSlottable); 36 if (slottable) { 37 const newElement = slottable.props.children; 38 const newChildren = childrenArray.map((child) => { 39 if (child === slottable) { 40 if (React2.Children.count(newElement) > 1) return React2.Children.only(null); 41 return React2.isValidElement(newElement) ? newElement.props.children : null; 42 } else { 43 return child; 44 } 45 }); 46 return (0, import_jsx_runtime.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children: React2.isValidElement(newElement) ? React2.cloneElement(newElement, void 0, newChildren) : null }); 47 } 48 return (0, import_jsx_runtime.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children }); 49}); 50Slot.displayName = "Slot"; 51var SlotClone = React2.forwardRef((props, forwardedRef) => { 52 const { children, ...slotProps } = props; 53 if (React2.isValidElement(children)) { 54 const childrenRef = getElementRef(children); 55 return React2.cloneElement(children, { 56 ...mergeProps(slotProps, children.props), 57 // @ts-ignore 58 ref: forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef 59 }); 60 } 61 return React2.Children.count(children) > 1 ? React2.Children.only(null) : null; 62}); 63SlotClone.displayName = "SlotClone"; 64var Slottable = ({ children }) => { 65 return (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children }); 66}; 67function isSlottable(child) { 68 return React2.isValidElement(child) && child.type === Slottable; 69} 70function mergeProps(slotProps, childProps) { 71 const overrideProps = { ...childProps }; 72 for (const propName in childProps) { 73 const slotPropValue = slotProps[propName]; 74 const childPropValue = childProps[propName]; 75 const isHandler = /^on[A-Z]/.test(propName); 76 if (isHandler) { 77 if (slotPropValue && childPropValue) { 78 overrideProps[propName] = (...args) => { 79 childPropValue(...args); 80 slotPropValue(...args); 81 }; 82 } else if (slotPropValue) { 83 overrideProps[propName] = slotPropValue; 84 } 85 } else if (propName === "style") { 86 overrideProps[propName] = { ...slotPropValue, ...childPropValue }; 87 } else if (propName === "className") { 88 overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" "); 89 } 90 } 91 return { ...slotProps, ...overrideProps }; 92} 93function getElementRef(element) { 94 var _a, _b; 95 let getter = (_a = Object.getOwnPropertyDescriptor(element.props, "ref")) == null ? void 0 : _a.get; 96 let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning; 97 if (mayWarn) { 98 return element.ref; 99 } 100 getter = (_b = Object.getOwnPropertyDescriptor(element, "ref")) == null ? void 0 : _b.get; 101 mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning; 102 if (mayWarn) { 103 return element.props.ref; 104 } 105 return element.props.ref || element.ref; 106} 107var Root = Slot; 108 109export { 110 useComposedRefs, 111 Slot, 112 Slottable, 113 Root 114}; 115//# sourceMappingURL=chunk-TQG5UYZM.js.map
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.