/** * The single decision every EDR document makes about its round seal: draw the * one uploaded company stamp when one is configured (StampSettingsService), or * fall back to the plain text rings the document styles itself. * * Only the image-vs-text branch and the image overrides live here — each * document keeps its own `.seal` geometry (the invoice's seal is absolutely * positioned top-right, the warehouse papers' sit inline above the signature * lines), so centralizing the source of the stamp does not relayout anything. * * These helpers are for the HTML/Chromium render path. The hand-built vector * fallbacks in styled-pdf.util.ts cannot embed a raster image and continue to * draw their vector seal — see InvoiceDocumentService for that caveat. */ /** Escape a value for interpolation into HTML text or a quoted attribute. */ function escapeHtml(value: unknown): string { return String(value ?? "") .replace(/&/g, "&") .replace(//g, ">") .replace(/"/g, """) .replace(/'/g, "'"); } /** * CSS overrides that neutralize a document's own ring/rotation styling when the * seal is a real stamp image. Append inside a document's