Enter an industry and generate a report. The finished report will use the gold, black, and white report format and will print without the website footer.
Industry Risk Intelligence for Business Brokers
Discover hidden liabilities, deal traps, lawsuit patterns, regulatory issues, buyer regrets, and due diligence blind spots before listing, selling, valuing, financing, or buying a business.
Build Risk Report
Important: This report is for business risk awareness only. It is not legal, tax, accounting, lending, valuation, or licensing advice. Review findings with appropriate attorneys, CPAs, lenders, insurance advisors, franchisors, landlords, and licensing professionals before relying on them in a transaction.
WordPress endpoint expected:
/wp-json/iri/v1/report. Install and configure the included plugin with your OpenAI API key.Industry Risk Intelligence Report
Generating. This may take a moment depending on report depth and web research.
';
try {
const res = await fetch(endpoint, { method: 'POST', headers: Object.assign({ 'Content-Type': 'application/json' }, nonce ? { 'X-WP-Nonce': nonce } : {}), body: JSON.stringify(payload) });
const text = await res.text();
let data = {};
try { data = text ? JSON.parse(text) : {}; }
catch(parseErr) { throw new Error('The server did not return JSON. HTTP ' + res.status + '. This often means the REST endpoint was blocked, redirected, or protected by a security/membership plugin.'); }
if(!res.ok || data.error || data.message){ throw new Error(data.error || data.message || ('The report could not be generated. HTTP ' + res.status)); }
const bodyHtml = mdToHtml(data.report || 'No report was returned.');
lastReportText = data.report || '';
lastReportHtml = buildReportShell(bodyHtml, payload);
report.innerHTML = lastReportHtml;
setStatus('Report complete. Review with qualified professionals before using in a transaction.');
} catch(err){
lastReportHtml = '';
lastReportText = '';
report.innerHTML = 'Connection issue:
' + escapeHtml(err.message) + '
Confirm the Industry Risk Intelligence AI plugin is installed, activated, and configured with your OpenAI API key.
';
setStatus('Report generation failed.');
} finally { btn.disabled = false; }
});
copyBtn.addEventListener('click', async function(){
const text = lastReportText || report.innerText || '';
try { await navigator.clipboard.writeText(text); setStatus('Report copied to clipboard.'); }
catch(e){ setStatus('Copy failed. Select the report text and copy manually.'); }
});
printBtn.addEventListener('click', printOnlyReport);
clearBtn.addEventListener('click', function(){ form.reset(); lastReportHtml = ''; lastReportText = ''; report.innerHTML = '' + escapeHtml(err.message) + '
Confirm the Industry Risk Intelligence AI plugin is installed, activated, and configured with your OpenAI API key.
Enter an industry and generate a report.
'; setStatus(''); });
})();