function Component(props) { const items = props.items; const maxItems = props.maxItems; const renderedItems = []; const seen = new Set(); const max = Math.max(0, maxItems); for (let i = 0; i < items.length; i += 1) { const item = items.at(i); if (item == null || seen.has(item)) { continue; } seen.add(item); renderedItems.push(