${image}${badge}
${maker}
${esc(p.name)}
${rating}${CH.money(p.price)}${compare}
${huid}
/* Chandrahasa — live catalogue card renderer. Values are escaped before insertion. */
'use strict';
CH.escapeHTML = CH.escapeHTML || function escapeHTML(value) {
return String(value ?? '').replace(/[&<>"']/g, ch => ({'&':'&','<':'<','>':'>','"':'"',"'":'''}[ch]));
};
CH.productCardHTML = function productCardHTML(p) {
const esc = CH.escapeHTML;
const img = p.images && p.images[0] ? p.images[0] : '';
const image = img
? ``
: `