class PaperCard extends HTMLElement { constructor() { super(); this.attachShadow({ mode: 'open' }); } connectedCallback() { this.render(); } render() { const title = this.getAttribute('title') || ''; const authors = this.getAttribute('authors') || ''; const abstract = this.getAttribute('abstract') || ''; const year = this.getAttribute('year') || ''; const venue = this.getAttribute('venue') || ''; const citations = this.getAttribute('citations') || '0'; const references = this.getAttribute('references') || '0'; const categories = this.getAttribute('categories') || ''; const keywords = this.getAttribute('keywords') || ''; const pdfUrl = this.getAttribute('pdf-url') || ''; const url = this.getAttribute('url') || ''; const categoryTags = categories ? categories.split(',').filter(cat => cat).map(cat => this.getCategoryTag(cat)).join('') : ''; const keywordTags = keywords ? keywords.split(',').filter(kw => kw).map(kw => `${this.escapeHtml(kw)}`).join('') : ''; this.shadowRoot.innerHTML = `