28b7b9f86b
QR scanning: - Run BarcodeDetector and jsQR in parallel — jsQR starts after JSQR_DELAY_MS (1.5 s) so both decode simultaneously. BarcodeDetector silently returns empty arrays for some QR variants; running jsQR in parallel via a separate rAF loop (rafId2) and its own off-screen canvas catches those cases. First decoder to find anything calls handleQrResult and sets qrFound = true; the other stops. Price extraction (two bugs): - ScanLabel: unitPrice was catalogMatch?.UnitPrice ?? 0m, ignoring aiResult .UnitCostPerLb entirely when no catalog match — changed to fall through to AI result - AppendOffer: only read JSON-LD "price" field; Shopify AggregateOffer uses "lowPrice" instead — now checked as fallback so Prismatic Powders prices are found Camera pre-warm: - Reverted localStorage approach (caused getUserMedia to fire on every page load, showing Chrome's "Ask" prompt immediately before user clicked anything) - Restored Permissions API gate: preWarmCamera only calls getUserMedia when navigator.permissions.query returns 'granted', never risks a page-load prompt Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>