// Transcendental Content Library for Emotional Healing and Transformation class TranscendentalContentLibrary { constructor() { this.poems = this.initializePoems(); this.songs = this.initializeSongs(); this.instrumentals = this.initializeInstrumentals(); this.wisdomMessages = this.initializeWisdomMessages(); } initializePoems() { return { healing: { title: "The Wound Becomes the Light", content: [ "There is a crack in everything,", "That's how the light gets in.", "Your wounds are not your weakness—", "They are where your strength begins.", "", "Every scar tells a story", "Of a battle you survived,", "Every tear that you have cried", "Kept your tender heart alive.", "", "What broke you also opened you", "To depths you'd never known,", "And in your deepest suffering", "You found you're not alone.", "", "The darkness taught you gratitude", "For even smallest light,", "Your pain became compassion", "For others in their fight.", "", "So wear your wounds like wisdom,", "Let your scars be works of art—", "For the most beautiful people", "Have the most resilient hearts." ], instrumental: "ambient_healing", emotions: ["pain", "healing", "shame", "processing"] }, self_worth: { title: "You Are Enough", content: [ "Before the world told you who to be,", "You were already complete.", "Before you learned to dim your light", "To make others feel bright,", "You were radiant, whole, divine.", "", "You are not too much.", "You are not too little.", "You are not too sensitive,", "Too loud, too quiet, too anything.", "", "You are the ocean pretending to be a drop,", "The sun hiding behind clouds,", "The symphony playing softly", "When you could fill the world with music.", "", "Your worth is not earned.", "It cannot be taken away.", "It was written into your DNA,", "Breathed into your lungs,", "Carved into your bones.", "", "You are enough.", "You have always been enough.", "You will always be enough.", "", "Now stop shrinking yourself", "And take up the space", "You were born to fill." ], instrumental: "uplifting_piano", emotions: ["insecurity", "self_worth", "doubt"] }, hope: { title: "This Too Shall Pass", content: [ "When the night is at its darkest,", "And you cannot see the dawn,", "Remember: storms are temporary,", "But your strength will carry on.", "", "Every winter melts to spring,", "Every tide returns to shore,", "What feels like an ending now", "Is just life preparing more.", "", "You have survived 100%", "Of your worst days so far.", "That's a perfect record", "For someone so strong you are.", "", "The sun is still there", "Behind the clouds you see.", "Your joy is still there", "Waiting patiently for thee.", "", "This too shall pass,", "Like everything before.", "And when it does,", "You'll be stronger than before.", "", "Hold on, dear heart.", "Your breakthrough is coming.", "The dawn is always darkest", "Before the new day's running." ], instrumental: "hopeful_strings", emotions: ["despair", "depression", "uncertainty", "grief"] }, purpose: { title: "Your Calling", content: [ "The world is waiting", "For what only you can give—", "Not perfection, not performance,", "But the truth of how you live.", "", "Your purpose isn't hidden", "In some distant, grand design.", "It's woven in your story,", "In each choice that makes you shine.", "", "Every time you choose love", "Over fear and judgment's voice,", "Every time you lift another", "With your presence and your choice,", "", "You are living your purpose,", "You are answering the call", "To be beautifully human", "And to rise each time you fall.", "", "Your calling is not perfect.", "It's authentic, it's true.", "It's the gift of being fully,", "Completely, always you.", "", "So stop searching for purpose", "In places far away.", "Start living it right now,", "In how you love today." ], instrumental: "inspiring_orchestral", emotions: ["confusion", "searching", "lost"] } }; } initializeSongs() { return { connection: { title: "You're Not Alone", artist: "Original", lyrics: [ "🎵 When the weight of the world", "Sits heavy on your chest,", "And you feel like giving up", "Is what would be best,", "", "Remember that somewhere", "Someone else can't sleep,", "Someone else is fighting tears", "They're trying hard to keep.", "", "You're not alone in this darkness,", "You're not alone in this fight,", "Millions of hearts are beating", "The same rhythm tonight.", "", "🎵 We're all just walking each other home,", "Through the shadows and the light,", "No one has to face this world", "Alone in the night.", "", "Your story matters, your voice counts,", "Your presence is a gift,", "And every time you choose to stay", "Another soul, you lift.", "", "You're not alone in this darkness,", "You're not alone in this fight,", "Millions of hearts are beating", "The same rhythm tonight. 🎵" ], audioFile: "connection_song.mp3", timing: [3000, 6000, 9000, 12000, 15000, 18000, 21000, 24000, 27000, 30000, 33000, 36000, 39000, 42000, 45000, 48000, 51000, 54000, 57000, 60000], emotions: ["isolation", "loneliness", "despair"] }, growth: { title: "Becoming", artist: "Original", lyrics: [ "🎵 I am not who I was yesterday,", "And I'm not who I'll be tomorrow,", "I'm learning to love the in-between,", "The joy mixed with the sorrow.", "", "Every mistake is teaching me", "How to be more kind,", "Every challenge shows me strength", "I never thought I'd find.", "", "I'm becoming, I'm becoming,", "More myself each day,", "Learning to trust the process", "And trust I'll find my way.", "", "🎵 The butterfly was once a caterpillar", "Who thought the world had ended,", "But what felt like destruction", "Was how she was transcended.", "", "So I'll embrace the changing,", "Though it scares me to my core,", "Because who I'm becoming", "Is who I was meant for.", "", "I'm becoming, I'm becoming,", "More myself each day,", "Learning to trust the process", "And trust I'll find my way. 🎵" ], audioFile: "growth_song.mp3", timing: [3000, 6000, 9000, 12000, 15000, 18000, 21000, 24000, 27000, 30000, 33000, 36000, 39000, 42000, 45000, 48000, 51000, 54000, 57000, 60000], emotions: ["growth", "transformation", "change"] } }; } initializeInstrumentals() { return { ambient_healing: { title: "Gentle Rain", description: "Soft ambient sounds with gentle rain and piano", audioFile: "ambient_healing.mp3", duration: 180000, // 3 minutes mood: "healing" }, uplifting_piano: { title: "Morning Light", description: "Uplifting piano melody with soft strings", audioFile: "uplifting_piano.mp3", duration: 240000, // 4 minutes mood: "hopeful" }, hopeful_strings: { title: "Dawn's Promise", description: "Orchestral strings building to hopeful crescendo", audioFile: "hopeful_strings.mp3", duration: 300000, // 5 minutes mood: "inspiring" }, inspiring_orchestral: { title: "Rise", description: "Full orchestral piece evoking strength and purpose", audioFile: "inspiring_orchestral.mp3", duration: 360000, // 6 minutes mood: "empowering" } }; } initializeWisdomMessages() { return { comfort: [ "Take a deep breath. You are safe in this moment.", "Your feelings are valid, and it's okay to feel them.", "This difficult chapter is not your entire story.", "You have survived every storm so far. You will survive this one too.", "Rest is not weakness. It's wisdom." ], encouragement: [ "You are braver than you believe, stronger than you seem, and more loved than you know.", "Your presence in this world makes a difference.", "Progress, not perfection, is the goal.", "You are allowed to be both a masterpiece and a work in progress.", "Every expert was once a beginner. Every pro was once an amateur." ], perspective: [ "What if the thing you're most afraid of losing was meant to transform you?", "Sometimes the most important thing in a whole day is the rest we take between two deep breaths.", "You are not behind in life. There is no schedule you need to keep up with.", "The flower that blooms in adversity is the rarest and most beautiful of all.", "Your current situation is not your final destination." ] }; } getPersonalizedContent(emotionalProfile) { // Analyze the user's responses to determine their emotional state and needs const primaryEmotion = this.analyzePrimaryEmotion(emotionalProfile); const contentType = this.determineContentType(emotionalProfile); if (contentType === 'song') { return this.selectSong(primaryEmotion); } else { return this.selectPoem(primaryEmotion); } } analyzePrimaryEmotion(profile) { const emotionWeights = {}; profile.answers.forEach(answer => { if (answer.option.emotion) { const emotion = answer.option.emotion; const weight = answer.option.intensity || 1; emotionWeights[emotion] = (emotionWeights[emotion] || 0) + weight; } }); // Find the dominant emotion let primaryEmotion = 'uncertainty'; let maxWeight = 0; Object.entries(emotionWeights).forEach(([emotion, weight]) => { if (weight > maxWeight) { maxWeight = weight; primaryEmotion = emotion; } }); return primaryEmotion; } determineContentType(profile) { // Determine if user needs song (for connection/energy) or poem (for reflection) const connectionScore = profile.answers.reduce((score, answer) => { return answer.option.trait === 'connection' ? score + answer.option.intensity : score; }, 0); const reflectionScore = profile.answers.reduce((score, answer) => { return ['healing', 'wisdom', 'self_love'].includes(answer.option.trait) ? score + answer.option.intensity : score; }, 0); return connectionScore > reflectionScore ? 'song' : 'poem'; } selectPoem(emotion) { // Match emotion to appropriate poem const emotionToPoem = { 'pain': 'healing', 'shame': 'healing', 'healing': 'healing', 'processing': 'healing', 'insecurity': 'self_worth', 'doubt': 'self_worth', 'despair': 'hope', 'depression': 'hope', 'uncertainty': 'hope', 'grief': 'hope', 'confusion': 'purpose', 'searching': 'purpose', 'lost': 'purpose' }; const poemKey = emotionToPoem[emotion] || 'hope'; return { type: 'poem', content: this.poems[poemKey], instrumental: this.instrumentals[this.poems[poemKey].instrumental] }; } selectSong(emotion) { // Match emotion to appropriate song const emotionToSong = { 'isolation': 'connection', 'loneliness': 'connection', 'despair': 'connection', 'growth': 'growth', 'transformation': 'growth', 'change': 'growth' }; const songKey = emotionToSong[emotion] || 'connection'; return { type: 'song', content: this.songs[songKey] }; } }