Emotional Resilience & Stress Coping Guide
What are your primary sources of stress?
Choose Your Coping Mechanisms
Select the strategies that you find most helpful or would like to try. These will be added to your personal plan.
Your Personalized Resilience Plan
This is a summary of your selections. Download it as a PDF for easy reference.
Go to the previous tabs to select your stressors and strategies to generate your plan.
Go to the previous tabs to select your stressors and strategies to generate your plan.
'; downloadPdfBtn.disabled = true; return; } downloadPdfBtn.disabled = false; let stressorsHtml = `Identified Stressors
-
${selectedStressors.length > 0 ? selectedStressors.map(s => `
- ${s} `).join('') : '
- No specific stressors identified. '}
Your Coping Toolkit
${selectedStrategies.length > 0 ? selectedStrategies.map(s => `
${s.title}: ${s.desc}
`).join('') : 'No strategies selected.
'}' + strategiesHtml + '
';
}
// --- PDF Generation ---
async function generatePDF() {
const { jsPDF } = window.jspdf;
const originalButtonText = downloadPdfBtn.textContent;
downloadPdfBtn.textContent = 'Generating...';
downloadPdfBtn.disabled = true;
const pdfWrapper = document.createElement('div');
pdfWrapper.style.position = 'absolute';
pdfWrapper.style.left = '-9999px';
pdfWrapper.style.top = '0';
pdfWrapper.style.width = '800px';
pdfWrapper.style.backgroundColor = 'white';
pdfWrapper.className = 'p-8';
pdfWrapper.innerHTML = `
Emotional Resilience Plan
${new Date().toLocaleDateString()}
