diff --git a/js/emojiLibrary.js b/js/emojiLibrary.js index 15dd38c..00ba9b2 100644 --- a/js/emojiLibrary.js +++ b/js/emojiLibrary.js @@ -1,12 +1,14 @@ // Emoji Library for P4RS3LT0NGV3 +// Create namespace for emoji library window.emojiLibrary = {}; -// Polyfill for Intl.Segmenter +// Polyfill for Intl.Segmenter if not available if (!Intl.Segmenter) { console.warn('Intl.Segmenter not available, falling back to basic character splitting'); } +// Helper function to properly split text into grapheme clusters (emojis) window.emojiLibrary.splitEmojis = function(text) { if (Intl.Segmenter) { const segmenter = new Intl.Segmenter('en', { granularity: 'grapheme' }); @@ -15,240 +17,592 @@ window.emojiLibrary.splitEmojis = function(text) { return Array.from(text); }; +// Helper function to properly join emojis window.emojiLibrary.joinEmojis = function(emojis) { return emojis.join(''); }; -// Complete Emoji Categories -window.emojiLibrary.EMOJIS = { - smileys_emotions: [ - "๐", "๐", "๐", "๐คฃ", "๐", "๐", "๐ ", "๐", "๐", "๐", "๐", "๐", "๐", "๐", "๐ฅฐ", - "๐", "๐", "๐", "๐", "๐ค", "๐คฉ", "๐ค", "๐คจ", "๐", "๐", "๐ถ", "๐", "๐", "๐ฃ", "๐ฅ", - "๐ฎ", "๐ค", "๐ฏ", "๐ช", "๐ซ", "๐ด", "๐", "๐", "๐", "๐", "๐คค", "๐", "๐", "๐", "๐", - "๐", "๐ค", "๐ฒ", "๐", "๐", "๐", "๐", "๐ค", "๐ข", "๐ญ", "๐ง", "๐จ", "๐ฉ", "๐คฏ", "๐ฑ", - "๐ณ", "๐ฅต", "๐ฅถ", "๐ก", "๐ ", "๐คฌ", "๐ท", "๐ค", "๐ค", "๐คข", "๐คฎ", "๐คง", "๐", "๐ฅณ", "๐ฅด", - "๐ฅบ", "๐ง", "๐ฅฑ", "๐ค", "๐ค ", "๐คก", "๐คฅ", "๐คซ", "๐คญ", "๐ซ ", "๐ซก", "๐ซข", "๐ซฃ", "๐ซค", "๐ซฅ" - ], +// Additional emojis for expanded library +window.emojiLibrary.ADDITIONAL_EMOJIS = [ + // Animals & Nature + "๐ฆ", "๐ฆ", "๐ฏ", "๐ฎ", "๐ท", "๐ธ", "๐ต", "๐", "๐ง", "๐ฆ", "๐ค", "๐ฆ", "๐ฆ ", "๐ฆ", "๐ฆ", "๐บ", "๐", "๐ด", "๐ฆ", "๐", "๐", "๐ฆ", "๐", "๐", "๐", "๐ท๏ธ", "๐ฆ", "๐ฆ", "๐ฆ ", "๐ฆจ", "๐ฆฉ", "๐ฆซ", "๐ฆฌ", "๐ปโโ๏ธ", "๐ผ", "๐จ", "๐", "๐ถ", "๐ฉ", "๐", "๐ฑ", "๐ชฑ", - people_body: [ - "๐ถ", "๐ง", "๐ฆ", "๐ง", "๐ง", "๐จ", "๐ฉ", "๐ง", "๐ด", "๐ต", "๐จโโ๏ธ", "๐ฉโโ๏ธ", "๐จโ๐", "๐ฉโ๐", - "๐จโ๐ซ", "๐ฉโ๐ซ", "๐จโโ๏ธ", "๐ฉโโ๏ธ", "๐จโ๐พ", "๐ฉโ๐พ", "๐จโ๐ณ", "๐ฉโ๐ณ", "๐จโ๐ง", "๐ฉโ๐ง", "๐จโ๐ญ", - "๐ฉโ๐ญ", "๐จโ๐ผ", "๐ฉโ๐ผ", "๐จโ๐ฌ", "๐ฉโ๐ฌ", "๐จโ๐ป", "๐ฉโ๐ป", "๐จโ๐ค", "๐ฉโ๐ค", "๐จโ๐จ", "๐ฉโ๐จ", - "๐จโโ๏ธ", "๐ฉโโ๏ธ", "๐จโ๐", "๐ฉโ๐", "๐จโ๐", "๐ฉโ๐", "๐ต๏ธโโ๏ธ", "๐ต๏ธโโ๏ธ", "๐โโ๏ธ", "๐โโ๏ธ", "๐ฎโโ๏ธ", - "๐ฎโโ๏ธ", "๐คด", "๐ธ", "๐ณโโ๏ธ", "๐ณโโ๏ธ", "๐ฒ", "๐ง", "๐ง", "๐ฑโโ๏ธ", "๐ฑโโ๏ธ", "๐โโ๏ธ", "๐โโ๏ธ", - "๐โโ๏ธ", "๐โโ๏ธ", "๐ โโ๏ธ", "๐ โโ๏ธ", "๐โโ๏ธ", "๐โโ๏ธ", "๐โโ๏ธ", "๐โโ๏ธ", "๐โโ๏ธ", "๐โโ๏ธ", - "๐งโโ๏ธ", "๐งโโ๏ธ", "๐โโ๏ธ", "๐โโ๏ธ", "๐คฆโโ๏ธ", "๐คฆโโ๏ธ", "๐คทโโ๏ธ", "๐คทโโ๏ธ", "๐โโ๏ธ", "๐โโ๏ธ", - "๐โโ๏ธ", "๐โโ๏ธ", "๐ถโโ๏ธ", "๐ถโโ๏ธ", "๐โโ๏ธ", "๐โโ๏ธ", "๐", "๐บ", "๐ฏโโ๏ธ", "๐ฏโโ๏ธ", "๐งโ๐คโ๐ง", - "๐จโ๐คโ๐จ", "๐ฉโ๐คโ๐ฉ", "๐ช", "๐จโ๐ฉโ๐ฆ", "๐จโ๐ฉโ๐ง", "๐จโ๐ฉโ๐งโ๐ฆ", "๐จโ๐จโ๐ฆ", "๐จโ๐จโ๐ง", "๐ฉโ๐ฉโ๐ฆ", - "๐ฉโ๐ฉโ๐ง", "๐ฃ๏ธ", "๐ค", "๐ฅ", "๐ซ", "๐ฃ" - ], + // Food & Drink + "๐", "๐", "๐", "๐", "๐", "๐", "๐", "๐", "๐", "๐", "๐", "๐", "๐ฅญ", "๐", "๐ฅฅ", "๐ฅ", "๐ ", "๐", "๐ฅ", "๐ฅฆ", "๐ฅฌ", "๐ฅ", "๐ถ๏ธ", "๐ฝ", "๐ฅ", "๐ง", "๐ง ", "๐ฅ", "๐ ", "๐ฅ", "๐", "๐", "๐", "๐", "๐ค", "๐ฃ", "๐ฑ", "๐", "๐ฒ", "๐ฅ", - gestures: [ - "๐", "๐ค", "๐๏ธ", "โ", "๐", "๐", "๐ค", "๐ค", "โ๏ธ", "๐ค", "๐ค", "๐ค", "๐ค", "๐", "๐", - "๐", "๐", "๐", "โ๏ธ", "๐", "๐", "โ", "๐", "๐ค", "๐ค", "๐", "๐", "๐", "๐คฒ", "๐ค", - "๐", "โ๏ธ", "๐ ", "๐คณ", "๐ช", "๐ฆพ", "๐ฆฟ", "๐ฆต", "๐ฆถ", "๐", "๐ฆป", "๐", "๐ง ", "๐ซ", - "๐ซ", "๐ฆท", "๐ฆด", "๐", "๐๏ธ", "๐ ", "๐", "๐ซฆ" - ], + // Travel & Places + "๐", "๐", "๐", "๐", "๐", "๐", "๐", "๐", "๐", "๐", "๐ฒ", "๐", "๐", "๐ก", "๐", "๐ธ", "๐ฅ๏ธ", "๐๏ธ", "๐๏ธ", "๐ค", "๐ข", "๐", "๐", "๐", "๐", "๐", "๐", "๐", "๐๏ธ", "๐๏ธ", - animals_nature: [ - "๐ต", "๐", "๐ฆ", "๐ฆง", "๐ถ", "๐", "๐ฆฎ", "๐โ๐ฆบ", "๐ฉ", "๐บ", "๐ฆ", "๐ฆ", "๐ฑ", "๐", - "๐โโฌ", "๐ฆ", "๐ฏ", "๐ ", "๐", "๐ด", "๐", "๐ฆ", "๐ฆ", "๐ฆ", "๐ฆฌ", "๐ฎ", "๐", "๐", - "๐", "๐ท", "๐", "๐", "๐ฝ", "๐", "๐", "๐", "๐ช", "๐ซ", "๐ฆ", "๐ฆ", "๐", "๐ฆฃ", - "๐ฆ", "๐ฆ", "๐ญ", "๐", "๐", "๐ฆซ", "๐ฆ", "๐ฐ", "๐", "๐ฟ๏ธ", "๐ฆจ", "๐ฆก", "๐ฆฆ", "๐ฆฅ", - "๐ป", "๐ปโโ๏ธ", "๐จ", "๐ผ", "๐ฆ", "๐ฆ", "๐", "๐", "๐ฃ", "๐ค", "๐ฅ", "๐ฆ", "๐ง", "๐๏ธ", - "๐ฆ ", "๐ฆ", "๐ฆข", "๐ฆ", "๐ฆค", "๐ชถ", "๐ฆฉ", "๐ฆ", "๐ฆ", "๐ธ", "๐", "๐ข", "๐ฆ", "๐", - "๐ฒ", "๐", "๐ฆ", "๐ฆ", "๐ณ", "๐", "๐ฌ", "๐ฆญ", "๐", "๐ ", "๐ก", "๐ฆ", "๐", "๐ฆ", - "๐ฆช", "๐ฆ", "๐ฆ", "๐ฆ", "๐ฆ", "๐ชณ", "๐ท๏ธ", "๐ธ๏ธ", "๐ฆ", "๐", "๐ชฐ", "๐ฆ", "๐", "๐ฆ", - "๐", "๐ชฒ", "๐", "๐ชด", "๐ฒ", "๐ณ", "๐ด", "๐ต", "๐พ", "๐ฟ", "โ๏ธ", "๐", "๐", "๐", - "๐", "๐ชธ", "๐ชน", "๐ชบ" - ], + // Activities & Sports + "โฝ", "๐", "๐", "๐", "๐", "๐พ", "๐ณ", "๐", "๐", "๐", "๐ธ", "๐ฅ", "๐ฅ", "๐ฅ ", "๐คพ", "๐ฟ", "๐", "๐", "๐", "๐๏ธ", "๐คผ", "๐คธ", "๐คบ", "๐คฝ", "๐คน", "๐ฏ", "๐ฑ", "๐ฝ", "๐ด", "๐ต", - food_drink: [ - "๐", "๐", "๐", "๐", "๐", "๐", "๐", "๐ฅญ", "๐", "๐", "๐", "๐", "๐", "๐", - "๐ซ", "๐ฅ", "๐ ", "๐ซ", "๐ฅฅ", "๐ฅ", "๐", "๐ฅ", "๐ฅ", "๐ฝ", "๐ถ๏ธ", "๐ซ", "๐ฅ", "๐ฅฌ", - "๐ฅฆ", "๐ง", "๐ง ", "๐", "๐ฅ", "๐ซ", "๐ฐ", "๐ซ", "๐ซ", "๐", "๐ฅ", "๐ฅ", "๐ซ", "๐ฅจ", - "๐ฅฏ", "๐ฅ", "๐ง", "๐ง", "๐", "๐", "๐ฅฉ", "๐ฅ", "๐", "๐", "๐", "๐ญ", "๐ฅช", "๐ฎ", - "๐ฏ", "๐ซ", "๐ฅ", "๐ง", "๐ฅ", "๐ณ", "๐ฅ", "๐ฒ", "๐ซ", "๐ฅฃ", "๐ฅ", "๐ฟ", "๐ง", "๐ง", - "๐ฅซ", "๐ฑ", "๐", "๐", "๐", "๐", "๐", "๐", "๐ ", "๐ข", "๐ฃ", "๐ค", "๐ฅ", "๐ฅฎ", - "๐ก", "๐ฅ", "๐ฅ ", "๐ฅก", "๐ฆช", "๐ฆ", "๐ฆ", "๐ฆ", "๐ฆ", "๐ฆ", "๐ง", "๐จ", "๐ฉ", "๐ช", - "๐", "๐ฐ", "๐ง", "๐ฅง", "๐ซ", "๐ฌ", "๐ญ", "๐ฎ", "๐ฏ", "๐ผ", "๐ฅ", "โ", "๐ซ", "๐ต", - "๐ถ", "๐พ", "๐ท", "๐ธ", "๐น", "๐บ", "๐ป", "๐ฅ", "๐ฅ", "๐ง", "๐ง" - ], + // Tech & Objects + "๐ป", "โจ๏ธ", "๐ฅ๏ธ", "๐ฑ๏ธ", "๐จ๏ธ", "๐ฑ", "โ๏ธ", "๐", "๐", "๐ ", "๐บ", "๐ป", "๐๏ธ", "๐๏ธ", "๐๏ธ", "๐งญ", "โฑ๏ธ", "โฒ๏ธ", "โฐ", "๐ฐ๏ธ", "๐ก", "๐", "๐", "๐ก", "๐ฎ", "๐ช", "๐งฏ", "๐ข๏ธ", "๐ธ", "๐ต", "๐ณ", "๐ด", "๐ถ", "๐ท", "๐ฐ", "๐ฑ", "๐ฒ", "๐ผ", "๐ฝ", "๐พ", "๐ฟ", - travel_places: [ - "๐", "๐", "๐", "๐", "๐บ๏ธ", "๐พ", "๐งญ", "๐๏ธ", "โฐ๏ธ", "๐", "๐ป", "๐๏ธ", "๐๏ธ", "๐๏ธ", - "๐๏ธ", "๐๏ธ", "๐๏ธ", "๐๏ธ", "๐๏ธ", "๐ชจ", "๐ชต", "๐", "๐๏ธ", "๐๏ธ", "๐ ", "๐ก", "๐ข", "๐ฃ", - "๐ค", "๐ฅ", "๐ฆ", "๐จ", "๐ฉ", "๐ช", "๐ซ", "๐ฌ", "๐ญ", "๐ฏ", "๐ฐ", "๐", "๐ผ", "๐ฝ", "โช", - "๐", "๐", "๐", "โฉ๏ธ", "๐", "โฒ", "โบ", "๐", "๐", "๐๏ธ", "๐", "๐ ", "๐", "๐", - "๐", "โจ๏ธ", "๐ ", "๐", "๐ก", "๐ข", "๐", "๐ช", "๐", "๐", "๐", "๐ ", "๐", "๐", - "๐", "๐", "๐", "๐", "๐", "๐", "๐", "๐", "๐", "๐", "๐", "๐", "๐", "๐", - "๐", "๐", "๐", "๐", "๐", "๐ป", "๐", "๐", "๐", "๐๏ธ", "๐๏ธ", "๐ต", "๐ฆฝ", "๐ฆผ", - "๐บ", "๐ฒ", "๐ด", "๐น", "๐ผ", "๐", "๐ฃ๏ธ", "๐ค๏ธ", "๐ข๏ธ", "โฝ", "๐", "๐จ", "๐ฅ", "๐ฆ", - "๐", "๐ง", "โ", "๐", "โต", "๐ถ", "๐ค", "๐ณ๏ธ", "โด๏ธ", "๐ฅ๏ธ", "๐ข", "โ๏ธ", "๐ฉ๏ธ", "๐ซ", - "๐ฌ", "๐ช", "๐บ", "๐", "๐", "๐ ", "๐ก", "๐ฐ๏ธ", "๐", "๐ธ", "๐ช" - ], + // Symbols + "โค๏ธ", "๐", "๐", "๐", "๐", "๐", "๐", "๐", "๐", "๐", "๐", "๐", "๐", "๐", "๐ค", "๐ข", "๐ฃ", "๐ฅ", "๐ฆ", "๐จ", "๐ฉ", "๐ซ", "๐ฌ", "๐ฅ", "๐ ", "๐พ", "๐ป", "๐", "๐ฝ", "๐ฟ", "๐ฉธ", - activities: [ - "โฝ", "๐", "๐", "โพ", "๐ฅ", "๐พ", "๐", "๐", "๐ฅ", "๐ณ", "๐", "๐", "๐", "๐ฅ", "๐", - "๐ธ", "๐ฅ", "๐ฅ", "๐ฅ ", "โณ", "โธ๏ธ", "๐ฃ", "๐คฟ", "๐ฝ", "๐ฟ", "๐ท", "๐ฅ", "๐ฏ", "๐ช", - "๐ช", "๐ฑ", "๐ฎ", "๐ช", "๐ฒ", "๐งฉ", "๐ช ", "๐ช", "๐ฐ", "๐ฎ", "๐ณ", "๐ญ", "๐จ", "๐ฌ", - "๐ค", "๐ง", "๐ผ", "๐น", "๐ฅ", "๐ช", "๐ท", "๐บ", "๐ช", "๐ธ", "๐ช", "๐ป", "๐ชฉ", "๐ช", - "๐๏ธ", "๐ซ", "๐ ", "๐ฅ", "๐ฅ", "๐ฅ", "๐", "๐", "๐ธ" - ], + // Mystical & Fantasy + "๐ง", "๐งโโ๏ธ", "๐งโโ๏ธ", "๐ง", "๐งโโ๏ธ", "๐งโโ๏ธ", "๐ง", "๐งโโ๏ธ", "๐งโโ๏ธ", "๐ง", "๐งโโ๏ธ", "๐งโโ๏ธ", "๐น", "๐บ", "๐ป", "๐ฝ", "๐พ", "๐ฒ", "๐ฎ", "๐", "๐", "๐ฆ", "๐ธ", "๐ฅท", "๐ฐ", "๐ง", "โ๏ธ", "๐ฏ", "๐ฑ", "โ๏ธ", "โจ", "๐ ", "๐", "๐", "๐", "๐", "๐บ", "๐น", "๐ญ", "๐", "๐", "๐ข", "๐", "๐ฐ", "๐ฅ", "๐ฅ", "๐", "๐", "๐ช๏ธ", "๐ฉธ", "๐ชฑ", "๐", "๐", "๐", "๐", "๐", "๐", "๐", "๐", - objects: [ - "โ", "๐ฑ", "๐ฒ", "๐ป", "๐ฅ๏ธ", "๐จ๏ธ", "โจ๏ธ", "๐ฑ๏ธ", "๐ฒ๏ธ", "๐ฝ", "๐พ", "๐ฟ", "๐", "๐งฎ", - "๐", "โ๏ธ", "๐", "๐ ", "๐ก", "๐บ", "๐ป", "๐๏ธ", "๐๏ธ", "๐๏ธ", "๐ค", "๐ง", "๐ฃ", "๐ข", - "๐", "๐", "๐ต", "๐ถ", "๐ผ", "๐น", "๐ฅ", "๐ท", "๐บ", "๐ธ", "๐ป", "๐ช", "๐ฌ", "๐ฎ", - "๐น๏ธ", "๐ฒ", "๐งฉ", "๐", "๐", "๐ด", "๐จ", "๐งต", "๐ชก", "๐งถ", "๐ชข", "๐", "๐ถ๏ธ", "๐ฅฝ", - "๐ฅผ", "๐ฆบ", "๐", "๐", "๐", "๐งฃ", "๐งค", "๐งฅ", "๐งฆ", "๐", "๐", "๐ฅป", "๐ฉฑ", "๐ฉฒ", - "๐ฉณ", "๐", "๐", "๐", "๐", "๐", "๐๏ธ", "๐", "๐ฉด", "๐", "๐", "๐ฅพ", "๐ฅฟ", "๐ ", - "๐ก", "๐ฉฐ", "๐ข", "๐", "๐", "๐ฉ", "๐", "๐งข", "๐ช", "โ๏ธ", "๐ฟ", "๐", "๐", "๐", - "๐", "๐", "๐", "๐", "๐ค", "๐ฅ", "๐ฆ", "๐ซ", "๐ช", "๐ฌ", "๐ญ", "๐ฎ", "๐ณ๏ธ", "โ๏ธ", - "โ๏ธ", "๐๏ธ", "๐๏ธ", "๐๏ธ", "๐", "๐ผ", "๐", "๐", "๐๏ธ", "๐ ", "๐", "๐๏ธ", "๐๏ธ", - "๐", "๐", "๐", "๐", "๐", "๐", "๐", "๐", "๐๏ธ", "๐", "๐", "โ๏ธ", "๐๏ธ", "๐๏ธ", - "๐๏ธ", "๐", "๐", "๐", "๐", "๐", "๐๏ธ", "๐จ", "๐ช", "โ๏ธ", "โ๏ธ", "๐ ๏ธ", "๐ก๏ธ", "โ๏ธ", - "๐ซ", "๐ช", "๐น", "๐ก๏ธ", "๐ช", "๐ง", "๐ช", "๐ฉ", "โ๏ธ", "๐ชค", "๐งฑ", "โ๏ธ", "๐งฒ", "๐ฃ", - "๐งจ", "๐ช", "๐ฅ", "๐งฐ", "๐งช", "๐งซ", "๐งฌ", "๐ฌ", "๐ญ", "๐ก", "๐", "๐ฉบ", "๐", "๐ฉน", - "๐ฉผ", "๐ช", "๐", "๐ช", "๐ช", "๐๏ธ", "๐๏ธ", "๐ช", "๐ฝ", "๐ช ", "๐ฟ", "๐", "๐ชค", "๐ช", - "๐งด", "๐งท", "๐งน", "๐งบ", "๐งป", "๐ชฃ", "๐งผ", "๐ซง", "๐ชฅ", "๐งฝ", "๐งฏ", "๐", "๐ฌ", "โฐ๏ธ", - "๐ชฆ", "โฑ๏ธ", "๐ฟ", "๐ชง", "๐ชช" - ], - - symbols: [ - "โค๏ธ", "๐ฉท", "๐งก", "๐", "๐", "๐", "๐ฉต", "๐", "๐ค", "๐ค", "๐ค", "๐", "โฃ๏ธ", "๐", - "๐", "๐", "๐", "๐", "๐", "๐", "๐", "โฎ๏ธ", "โ๏ธ", "โฏ๏ธ", "๐๏ธ", "โธ๏ธ", "โก๏ธ", "๐ฏ", - "๐", "โช๏ธ", "โ", "โ", "โ", "โ", "โ", "โ", "โ", "โ", "โ", "โ", "โ", "โ", "โ", - "๐", "๐", "๐", "โถ๏ธ", "โธ๏ธ", "โน๏ธ", "โบ๏ธ", "โญ๏ธ", "โฎ๏ธ", "โซ", "โฌ", "โฏ๏ธ", "๐ ", "๐", - "๐", "๐", "๐", "๐", "๐ถ", "๐", "๐", "๐ก", "๐ฆ", "๐ฏ๏ธ", "๐ชซ", "๐ชฌ", "๐ฒ", "ยฉ๏ธ", - "ยฎ๏ธ", "โข๏ธ", "โ ", "โ", "โ", "โ", "โ", "โ", "โ๏ธ", "๐ฏ", "๐ข", "๐ฅ", "๐ซ", "๐ฆ", - "๐จ", "๐ณ๏ธ", "๐ฌ", "๐๏ธโ๐จ๏ธ", "๐จ๏ธ", "๐ฏ๏ธ", "๐ญ", "๐", "๐ก๏ธ", "โ๏ธ", "๐ค๏ธ", "โ ", "๐ฅ๏ธ", - "โ๏ธ", "๐ฆ๏ธ", "๐ง๏ธ", "โ๏ธ", "๐ฉ๏ธ", "๐จ๏ธ", "โ๏ธ", "โ๏ธ", "โ", "๐ฌ๏ธ", "๐ง", "๐", "๐ซ๏ธ", - "๐ช๏ธ", "๐", "โ๏ธ", "โ", "โฑ๏ธ", "โก", "๐ฎ", "โจ", "๐", "โญ", "๐ซ", "๐ ", "โ ๏ธ", "โฅ๏ธ", - "โฆ๏ธ", "โฃ๏ธ", "๐ฉถ", "๐ช", "๐ชจ" - ], - - flags: [ - "๐ดโโ ๏ธ", "๐ณ๏ธโ๐", "๐ณ๏ธโโง๏ธ", "๐ฆ๐จ", "๐ฆ๐ฉ", "๐ฆ๐ช", "๐ฆ๐ซ", "๐ฆ๐ฌ", "๐ฆ๐ฎ", "๐ฆ๐ฑ", "๐ฆ๐ฒ", "๐ฆ๐ด", - "๐ฆ๐ถ", "๐ฆ๐ท", "๐ฆ๐ธ", "๐ฆ๐น", "๐ฆ๐บ", "๐ฆ๐ผ", "๐ฆ๐ฝ", "๐ฆ๐ฟ", "๐ง๐ฆ", "๐ง๐ง", "๐ง๐ฉ", "๐ง๐ช", "๐ง๐ซ", - "๐ง๐ฌ", "๐ง๐ญ", "๐ง๐ฎ", "๐ง๐ฏ", "๐ง๐ฑ", "๐ง๐ฒ", "๐ง๐ณ", "๐ง๐ด", "๐ง๐ถ", "๐ง๐ท", "๐ง๐ธ", "๐ง๐น", "๐ง๐ป", - "๐ง๐ผ", "๐ง๐พ", "๐ง๐ฟ", "๐จ๐ฆ", "๐จ๐จ", "๐จ๐ฉ", "๐จ๐ซ", "๐จ๐ฌ", "๐จ๐ญ", "๐จ๐ฎ", "๐จ๐ฐ", "๐จ๐ฑ", "๐จ๐ฒ", - "๐จ๐ณ", "๐จ๐ด", "๐จ๐ต", "๐จ๐ท", "๐จ๐บ", "๐จ๐ป", "๐จ๐ผ", "๐จ๐ฝ", "๐จ๐พ", "๐จ๐ฟ", "๐ฉ๐ช", "๐ฉ๐ฌ", "๐ฉ๐ฏ", - "๐ฉ๐ฐ", "๐ฉ๐ฒ", "๐ฉ๐ด", "๐ฉ๐ฟ", "๐ช๐ฆ", "๐ช๐จ", "๐ช๐ช", "๐ช๐ฌ", "๐ช๐ญ", "๐ช๐ท", "๐ช๐ธ", "๐ช๐น", "๐ช๐บ", - "๐ซ๐ฎ", "๐ซ๐ฏ", "๐ซ๐ฐ", "๐ซ๐ฒ", "๐ซ๐ด", "๐ซ๐ท", "๐ฌ๐ฆ", "๐ฌ๐ง", "๐ฌ๐ฉ", "๐ฌ๐ช", "๐ฌ๐ซ", "๐ฌ๐ฌ", "๐ฌ๐ญ", - "๐ฌ๐ฎ", "๐ฌ๐ฑ", "๐ฌ๐ฒ", "๐ฌ๐ณ", "๐ฌ๐ต", "๐ฌ๐ถ", "๐ฌ๐ท", "๐ฌ๐ธ", "๐ฌ๐น", "๐ฌ๐บ", "๐ฌ๐ผ", "๐ฌ๐พ", "๐ญ๐ฐ", - "๐ญ๐ฒ", "๐ญ๐ณ", "๐ญ๐ท", "๐ญ๐น", "๐ญ๐บ", "๐ฎ๐จ", "๐ฎ๐ฉ", "๐ฎ๐ช", "๐ฎ๐ฑ", "๐ฎ๐ฒ", "๐ฎ๐ณ", "๐ฎ๐ด", "๐ฎ๐ถ", - "๐ฎ๐ท", "๐ฎ๐ธ", "๐ฎ๐น", "๐ฏ๐ช", "๐ฏ๐ฒ", "๐ฏ๐ด", "๐ฏ๐ต", "๐ฐ๐ช", "๐ฐ๐ฌ", "๐ฐ๐ญ", "๐ฐ๐ฎ", "๐ฐ๐ฒ", "๐ฐ๐ณ", - "๐ฐ๐ต", "๐ฐ๐ท", "๐ฐ๐ผ", "๐ฐ๐พ", "๐ฐ๐ฟ", "๐ฑ๐ฆ", "๐ฑ๐ง", "๐ฑ๐จ", "๐ฑ๐ฎ", "๐ฑ๐ฐ", "๐ฑ๐ท", "๐ฑ๐ธ", "๐ฑ๐น", - "๐ฑ๐บ", "๐ฑ๐ป", "๐ฑ๐พ", "๐ฒ๐ฆ", "๐ฒ๐จ", "๐ฒ๐ฉ", "๐ฒ๐ช", "๐ฒ๐ซ", "๐ฒ๐ฌ", "๐ฒ๐ญ", "๐ฒ๐ฐ", "๐ฒ๐ฑ", "๐ฒ๐ฒ", - "๐ฒ๐ณ", "๐ฒ๐ด", "๐ฒ๐ต", "๐ฒ๐ถ", "๐ฒ๐ท", "๐ฒ๐ธ", "๐ฒ๐น", "๐ฒ๐บ", "๐ฒ๐ป", "๐ฒ๐ผ", "๐ฒ๐ฝ", "๐ฒ๐พ", "๐ฒ๐ฟ", - "๐ณ๐ฆ", "๐ณ๐จ", "๐ณ๐ช", "๐ณ๐ซ", "๐ณ๐ฌ", "๐ณ๐ฎ", "๐ณ๐ฑ", "๐ณ๐ด", "๐ณ๐ต", "๐ณ๐ท", "๐ณ๐บ", "๐ณ๐ฟ", "๐ด๐ฒ", - "๐ต๐ฆ", "๐ต๐ช", "๐ต๐ซ", "๐ต๐ฌ", "๐ต๐ญ", "๐ต๐ฐ", "๐ต๐ฑ", "๐ต๐ฒ", "๐ต๐ณ", "๐ต๐ท", "๐ต๐ธ", "๐ต๐น", "๐ต๐ผ", - "๐ต๐พ", "๐ถ๐ฆ", "๐ท๐ช", "๐ท๐ด", "๐ท๐ธ", "๐ท๐บ", "๐ท๐ผ", "๐ธ๐ฆ", "๐ธ๐ง", "๐ธ๐จ", "๐ธ๐ฉ", "๐ธ๐ช", "๐ธ๐ฌ", - "๐ธ๐ญ", "๐ธ๐ฎ", "๐ธ๐ฏ", "๐ธ๐ฐ", "๐ธ๐ฑ", "๐ธ๐ฒ", "๐ธ๐ณ", "๐ธ๐ด", "๐ธ๐ท", "๐ธ๐ธ", "๐ธ๐น", "๐ธ๐ป", "๐ธ๐ฝ", - "๐ธ๐พ", "๐ธ๐ฟ", "๐น๐ฆ", "๐น๐จ", "๐น๐ฉ", "๐น๐ซ", "๐น๐ฌ", "๐น๐ญ", "๐น๐ฏ", "๐น๐ฐ", "๐น๐ฑ", "๐น๐ฒ", "๐น๐ณ", - "๐น๐ด", "๐น๐ท", "๐น๐น", "๐น๐ป", "๐น๐ผ", "๐น๐ฟ", "๐บ๐ฆ", "๐บ๐ฌ", "๐บ๐ฒ", "๐บ๐ณ", "๐บ๐ธ", "๐บ๐พ", "๐บ๐ฟ", - "๐ป๐ฆ", "๐ป๐จ", "๐ป๐ช", "๐ป๐ฌ", "๐ป๐ฎ", "๐ป๐ณ", "๐ป๐บ", "๐ผ๐ซ", "๐ผ๐ธ", "๐ฝ๐ฐ", "๐พ๐ช", "๐พ๐น", "๐ฟ๐ฆ", - "๐ฟ๐ฒ", "๐ฟ๐ผ" - ] -}; - -// Categories Definition -window.emojiLibrary.CATEGORIES = [ - { id: 'all', name: 'All Emojis', icon: '๐' }, - { id: 'smileys_emotions', name: 'Smileys & Emotions', icon: '๐' }, - { id: 'people_body', name: 'People & Body', icon: '๐ง' }, - { id: 'gestures', name: 'Gestures', icon: '๐' }, - { id: 'animals_nature', name: 'Animals & Nature', icon: '๐ถ' }, - { id: 'food_drink', name: 'Food & Drink', icon: '๐' }, - { id: 'travel_places', name: 'Travel & Places', icon: 'โ๏ธ' }, - { id: 'activities', name: 'Activities', icon: 'โฝ' }, - { id: 'objects', name: 'Objects', icon: '๐ฑ' }, - { id: 'symbols', name: 'Symbols', icon: 'โค๏ธ' }, - { id: 'flags', name: 'Flags', icon: '๐ณ๏ธ' } + // Flags + "๐", "๐ฉ", "๐", "๐ด", "๐ณ๏ธ", "๐ณ๏ธโ๐", "๐ณ๏ธโโง๏ธ", "๐ดโโ ๏ธ", "๐บ๐ธ", "๐จ๐ฆ", "๐ฌ๐ง", "๐ฉ๐ช", "๐ซ๐ท", "๐ฎ๐น", "๐ฏ๐ต", "๐ฐ๐ท", "๐ท๐บ", "๐จ๐ณ", "๐ฎ๐ณ", "๐ฆ๐บ", "๐ง๐ท", "๐ช๐ธ", "๐ณ๐ฑ", "๐ต๐น", "๐ธ๐ช", "๐ฆ๐ท", "๐ฆ๐บ", "๐ฆ๐น", "๐ง๐ช", "๐ง๐ด" ]; -// Render Emoji Grid Function +// Make emoji list globally available +window.emojiLibrary.EMOJI_LIST = [ + // Faces and People + "๐", // Grinning Face + "๐", // Beaming Face with Smiling Eyes + "๐", // Face with Tears of Joy + "๐คฃ", // Rolling on the Floor Laughing + "๐", // Grinning Face with Big Eyes + "๐", // Grinning Face with Smiling Eyes + "๐ ", // Grinning Face with Sweat + "๐", // Grinning Squinting Face + "๐", // Winking Face + "๐", // Smiling Face with Smiling Eyes + "๐", // Face Savoring Food + "๐", // Smiling Face with Sunglasses + "๐", // Smiling Face with Heart-Eyes + "๐", // Face Blowing a Kiss + "๐ฅฐ", // Smiling Face with Hearts + "๐", // Kissing Face + "๐", // Kissing Face with Smiling Eyes + "๐", // Kissing Face with Closed Eyes + "๐", // Slightly Smiling Face + "๐ค", // Hugging Face + "๐คฉ", // Star-Struck + "๐ค", // Thinking Face + "๐คจ", // Face with Raised Eyebrow + "๐", // Neutral Face + "๐", // Expressionless Face + "๐ถ", // Face Without Mouth + "๐", // Face with Rolling Eyes + "๐", // Smirking Face + "๐ฃ", // Persevering Face + "๐ฅ", // Sad but Relieved Face + "๐ฎ", // Face with Open Mouth + "๐ค", // Zipper-Mouth Face + "๐ฏ", // Hushed Face + "๐ช", // Sleepy Face + "๐ซ", // Tired Face + "๐ด", // Sleeping Face + "๐", // Relieved Face + "๐", // Face with Tongue + "๐", // Winking Face with Tongue + "๐", // Squinting Face with Tongue + "๐คค", // Drooling Face + "๐", // Unamused Face + "๐", // Downcast Face with Sweat + "๐", // Pensive Face + "๐", // Confused Face + "๐", // Upside-Down Face + "๐ค", // Money-Mouth Face + "๐ฒ", // Astonished Face + "๐", // Slightly Frowning Face + "๐", // Confounded Face + "๐", // Disappointed Face + "๐", // Worried Face + "๐ค", // Face with Steam From Nose + "๐ข", // Crying Face + "๐ญ", // Loudly Crying Face + "๐ง", // Anguished Face + "๐จ", // Fearful Face + "๐ฉ", // Weary Face + "๐คฏ", // Exploding Head + "๐ฑ", // Face Screaming in Fear + "๐ณ", // Flushed Face + "๐ฅต", // Hot Face + "๐ฅถ", // Cold Face + "๐ก", // Pouting Face + "๐ ", // Angry Face + "๐คฌ", // Face with Symbols on Mouth + "๐ท", // Face with Medical Mask + "๐ค", // Face with Thermometer + "๐ค", // Face with Head-Bandage + "๐คข", // Nauseated Face + "๐คฎ", // Face Vomiting + "๐คง", // Sneezing Face + "๐", // Smiling Face with Halo + "๐ฅณ", // Partying Face + "๐ฅด", // Woozy Face + "๐ฅบ", // Pleading Face + "๐ง", // Face with Monocle + "๐ฅฑ", // Yawning Face + "๐ง ", // Brain + + // Gestures and Body Parts + "๐", // Thumbs Up + "๐", // Thumbs Down + "๐", // Clapping Hands + "๐", // Raising Hands + "๐ค", // Handshake + "๐", // Waving Hand + "โ๏ธ", // Victory Hand + "๐ค", // Love-You Gesture + "๐ค", // Sign of the Horns + "๐", // Oncoming Fist + "โ", // Raised Fist + "๐", // Backhand Index Pointing Up + "๐", // Backhand Index Pointing Down + "๐", // Backhand Index Pointing Left + "๐", // Backhand Index Pointing Right + "๐", // OK Hand + "๐ค", // Pinched Fingers + "๐ค", // Pinching Hand + "โ", // Raised Hand + "๐ค", // Raised Back of Hand + "๐๏ธ", // Hand with Fingers Splayed + "๐", // Vulcan Salute + "๐", // Eyes + "๐๏ธ", // Eye + "๐", // Mouth + "๐งฟ", // Nazar Amulet + + // Celebration & Objects + "๐", // Party Popper + "๐", // Confetti Ball + "๐", // Birthday Cake + "๐", // Wrapped Gift + "๐", // Balloon + "๐", // Christmas Tree + "๐", // Jack-O-Lantern + "๐", // Trophy + "๐ ", // Sports Medal + "๐ฅ", // 1st Place Medal + "๐ฅ", // 2nd Place Medal + "๐ฅ", // 3rd Place Medal + "๐ฐ", // Money Bag + "๐ธ", // Money with Wings + "๐ต", // Dollar Banknote + "๐ด", // Yen Banknote + "๐ถ", // Euro Banknote + "๐ท", // Pound Banknote + "๐ฏ", // Hundred Points + "๐ฑ", // Mobile Phone + "๐ป", // Laptop + "โจ๏ธ", // Keyboard + "๐ฅ๏ธ", // Desktop Computer + "๐", // Locked + "๐", // Unlocked + + // Food & Drink + "๐", // Pizza + "๐", // Hamburger + "๐ฆ", // Ice Cream + "๐ฉ", // Doughnut + "๐บ", // Beer Mug + "๐ท", // Wine Glass + "โ", // Hot Beverage + + // Nature & Weather + "๐", // Rainbow + "๐", // Sun with Face + "๐", // New Moon + "๐", // Waxing Crescent Moon + "๐", // First Quarter Moon + "๐", // Waxing Gibbous Moon + "๐", // Full Moon + "๐", // Waning Gibbous Moon + "๐", // Last Quarter Moon + "๐", // Waning Crescent Moon + "๐", // Crescent Moon + "โญ", // Star + "๐", // Glowing Star + "โก", // High Voltage + "โ๏ธ", // Snowflake + "๐ฅ", // Fire + "๐ง", // Droplet + "๐", // Water Wave + + // Animals + "๐ฑ", // Cat Face + "๐ถ", // Dog Face + "๐ฆ", // Fox + "๐ผ", // Panda + "๐ฆ", // Lion + "๐ฌ", // Dolphin + "๐ฆ", // Unicorn + + // Symbols & Special + "โค๏ธ", // Red Heart + "๐งก", // Orange Heart + "๐", // Green Heart + "๐", // Blue Heart + "๐", // Purple Heart + "๐", // Rocket + "๐", // Eyes + "๐", // Skull + "๐ฅน", // Face Holding Back Tears + "๐", // Snake + "๐", // Dragon + "๐ฒ", // Dragon Face + "๐งโโ๏ธ", // Wizard + "๐ช", // Magic Wand + "๐ดโโ ๏ธ", // Pirate Flag + "๐ฆ ", // Eagle (often associated with pirates) + "๐ฆ", // Parrot (pirate symbol) + "๐ป", // Laptop (hacker symbol) + "๐ถ๏ธ", // Sunglasses (cool guy symbol) + "๐งโ๐ป", // Technologist + "๐จโ๐ป", // Man Technologist + "๐ฉโ๐ป", // Woman Technologist + "๐ต๏ธ", // Detective + "๐ต๏ธโโ๏ธ", // Man Detective + "๐ต๏ธโโ๏ธ", // Woman Detective + "๐ฅ๏ธ", // Desktop Computer + "โจ๏ธ", // Keyboard + "๐ฑ๏ธ", // Computer Mouse + "๐น๏ธ", // Joystick + "๐ฑ", // Mobile Phone + "๐ฒ", // Mobile Phone with Arrow + "๐", // Unlocked (hacker symbol) + "๐", // Key (hacker symbol) + "๐๏ธ", // Old Key (hacker symbol) + "๐ก๏ธ", // Shield (hacker symbol) + "โ๏ธ", // Crossed Swords (hacker symbol) + "๐งฌ", // DNA (hacker symbol) + "๐งซ", // Petri Dish (hacker symbol) + "๐งช", // Test Tube (hacker symbol) + "๐ ๏ธ", // Hammer and Wrench (hacker symbol) + "โ๏ธ", // Gear (hacker symbol) + "๐งฐ", // Toolbox (hacker symbol) + "๐งฒ", // Magnet (hacker symbol) + "๐ฃ", // Bomb (hacker symbol) + "๐ณ๏ธ", // Hole (hacker symbol) + "๐ก", // Satellite Antenna (hacker symbol) + "๐ฐ๏ธ", // Satellite (hacker symbol) + "๐", // Telephone Receiver (hacker symbol) + "โ๏ธ", // Telephone (hacker symbol) + "๐", // Pager (hacker symbol) + "๐ ", // Fax Machine (hacker symbol) + "๐", // Electric Plug (hacker symbol) + "๐ก", // Light Bulb (hacker symbol) + "๐ฆ", // Flashlight (hacker symbol) + "๐ฏ๏ธ", // Candle (hacker symbol) + "๐๏ธ", // Rolled-Up Newspaper (hacker symbol) + "๐", // Scroll (hacker symbol) + "๐", // Page with Curl (hacker symbol) + "๐", // Page Facing Up (hacker symbol) + "๐", // Bookmark Tabs (hacker symbol) + "๐", // Bar Chart (hacker symbol) + "๐", // Chart Increasing (hacker symbol) + "๐", // Chart Decreasing (hacker symbol) + "๐๏ธ", // Card Index Dividers (hacker symbol) + "๐๏ธ", // Card File Box (hacker symbol) + "๐๏ธ", // File Cabinet (hacker symbol) + "๐๏ธ", // Wastebasket (hacker symbol) + "๐ข๏ธ", // Oil Drum (hacker symbol) + "๐๏ธ", // Bellhop Bell (hacker symbol) + "๐งณ", // Luggage (hacker symbol) + "๐", // Person in Bed (hacker symbol) + "๐๏ธ", // Bed (hacker symbol) + "๐๏ธ", // Couch and Lamp (hacker symbol) + "๐ช", // Chair (hacker symbol) + "๐ช", // Door (hacker symbol) + "๐งด", // Lotion Bottle (hacker symbol) + "๐งท", // Safety Pin (hacker symbol) + "๐งน", // Broom (hacker symbol) + "๐งบ", // Basket (hacker symbol) + "๐งป", // Roll of Paper (hacker symbol) + "๐งผ", // Soap (hacker symbol) + "๐งฝ", // Sponge (hacker symbol) + "๐งฏ", // Fire Extinguisher (hacker symbol) + "๐", // Shopping Cart (hacker symbol) + "๐ฌ", // Cigarette (hacker symbol) + "โฐ๏ธ", // Coffin (hacker symbol) + "โฑ๏ธ", // Funeral Urn (hacker symbol) + "๐ฟ", // Moai (hacker symbol) + "๐", // Passport Control (hacker symbol) + "๐", // Customs (hacker symbol) + "๐", // Baggage Claim (hacker symbol) + "๐ ", // Left Luggage (hacker symbol) + "๐น", // Men's Room (hacker symbol) + "๐บ", // Women's Room (hacker symbol) + "๐ผ", // Baby Symbol (hacker symbol) + "๐ป", // Restroom (hacker symbol) + "๐ฎ", // Litter in Bin Sign (hacker symbol) + "๐ฐ", // Potable Water (hacker symbol) + "๐พ", // Water Closet (hacker symbol) + "๐ญ", // No Smoking (hacker symbol) + "๐ฏ", // No Littering (hacker symbol) + "๐ฑ", // Non-Potable Water (hacker symbol) + + // Additional Smileys & Emotion + "๐", // Smiling Face with Smiling Eyes + "๐", // Smiling Face with Halo + "๐", // Slightly Smiling Face + "๐", // Upside-Down Face + "๐", // Winking Face + "๐", // Relieved Face + "๐", // Smiling Face with Heart-Eyes + "๐ฅฐ", // Smiling Face with Hearts + "๐", // Face Blowing a Kiss + "๐", // Kissing Face + "๐", // Kissing Face with Smiling Eyes + "๐", // Kissing Face with Closed Eyes + "๐", // Face Savoring Food + "๐", // Face with Tongue + "๐", // Squinting Face with Tongue + "๐", // Winking Face with Tongue + "๐คช", // Zany Face + + // Additional People & Body + "๐งโ๐", // Astronaut + "๐จโ๐", // Man Astronaut + "๐ฉโ๐", // Woman Astronaut + "๐งโ๐ฌ", // Scientist + "๐จโ๐ฌ", // Man Scientist + "๐ฉโ๐ฌ", // Woman Scientist + "๐งโโ๏ธ", // Health Worker + "๐จโโ๏ธ", // Man Health Worker + "๐ฉโโ๏ธ", // Woman Health Worker + "๐งโ๐ง", // Mechanic + "๐จโ๐ง", // Man Mechanic + "๐ฉโ๐ง", // Woman Mechanic + "๐งโ๐", // Firefighter + "๐จโ๐", // Man Firefighter + "๐ฉโ๐", // Woman Firefighter + + // Additional Animals & Nature + "๐ฆ", // Giraffe + "๐ฆ", // Zebra + "๐ฆฌ", // Bison + "๐ฆ", // Llama + "๐ฆ", // Kangaroo + "๐ฆฅ", // Sloth + "๐ฆฆ", // Otter + "๐ฆก", // Badger + "๐ฆ", // Hedgehog + "๐ฆ", // Raccoon + "๐ฟ๏ธ", // Chipmunk + "๐ฆซ", // Beaver + "๐ฆ", // Lizard + "๐", // Crocodile + "๐ข", // Turtle + "๐ฆ", // Sauropod + "๐ฆ", // T-Rex + "๐", // Whale + "๐ฌ", // Dolphin + "๐ฆญ", // Seal + + // Additional Food & Drink + "๐ฅ", // Pancakes + "๐ง", // Waffle + "๐ง", // Cheese Wedge + "๐", // Meat on Bone + "๐", // Poultry Leg + "๐ฅฉ", // Cut of Meat + "๐ฅ", // Bacon + "๐", // Hamburger + "๐", // French Fries + "๐", // Pizza + "๐ญ", // Hot Dog + "๐ฅช", // Sandwich + "๐ฎ", // Taco + "๐ฏ", // Burrito + "๐ฅ", // Stuffed Flatbread + "๐ง", // Falafel + "๐ฅ", // Egg + "๐ณ", // Cooking + "๐ฅ", // Shallow Pan of Food + "๐ฒ", // Pot of Food + + // Additional Travel & Places + "๐๏ธ", // Cityscape + "๐", // Cityscape at Dusk + "๐", // Sunset + "๐", // Night with Stars + "๐", // Bridge at Night + "๐๏ธ", // National Park + "๐๏ธ", // Desert + "๐๏ธ", // Desert Island + "๐๏ธ", // Beach with Umbrella + "โฐ๏ธ", // Mountain + "๐๏ธ", // Snow-Capped Mountain + "๐", // Volcano + "๐ป", // Mount Fuji + "๐ ", // House + "๐ก", // House with Garden + "๐ข", // Office Building + "๐ฃ", // Japanese Post Office + "๐ค", // Post Office + "๐ฅ", // Hospital + "๐ฆ", // Bank + + // Additional Flags + "๐บ๐ธ", // United States + "๐ฌ๐ง", // United Kingdom + "๐จ๐ฆ", // Canada + "๐ฏ๐ต", // Japan + "๐ฉ๐ช", // Germany + "๐ซ๐ท", // France + "๐ฎ๐น", // Italy + "๐ช๐ธ", // Spain + "๐ท๐บ", // Russia + "๐จ๐ณ", // China + "๐ฎ๐ณ", // India + "๐ง๐ท", // Brazil + "๐ฆ๐บ", // Australia + "๐ฒ๐ฝ", // Mexico + "๐ฐ๐ท", // South Korea + "๐ฟ๐ฆ", // South Africa + "๐ธ๐ช", // Sweden + "๐ณ๐ด", // Norway + "๐ณ๐ฟ", // New Zealand + "๐ฎ๐ช", // Ireland +]; + +// Define emoji categories with specific emojis for each category +window.emojiLibrary.EMOJIS = { + nature: ["๐", "๐", "๐", "๐", "๐", "๐", "๐", "๐", "๐", "๐", "๐ฆ", "๐ฆ", "๐ฏ", "๐ฎ", "๐ท", "๐ธ", "๐ต", "๐", "๐ง", "๐ฆ", "๐ค", "๐ฆ", "๐ฆ ", "๐ฆ", "๐ฆ", "๐บ", "๐", "๐ด", "๐ฆ", "๐", "๐", "๐ฆ", "๐", "๐", "๐", "๐ท๏ธ", "๐ฆ", "๐ฆ", "๐ฆ ", "๐ชฑ"], + mystical: ["๐ง", "๐งโโ๏ธ", "๐งโโ๏ธ", "๐ง", "๐งโโ๏ธ", "๐งโโ๏ธ", "๐ง", "๐งโโ๏ธ", "๐งโโ๏ธ", "๐ง", "๐งโโ๏ธ", "๐งโโ๏ธ", "๐น", "๐บ", "๐ป", "๐ฝ", "๐พ", "๐ฒ", "๐ฎ", "๐", "๐", "๐ฆ", "โ๏ธ", "๐ฏ", "๐ฑ", "โ๏ธ", "โจ", "๐ ", "๐", "๐", "๐ฉธ"], + faces_people: ["๐", "๐", "๐", "๐คฃ", "๐", "๐", "๐ ", "๐", "๐", "๐", "๐", "๐", "๐", "๐", "๐ฅฐ", "๐", "๐", "๐", "๐", "๐ค", "๐คฉ", "๐ค", "๐คจ", "๐", "๐", "๐ถ", "๐", "๐", "๐ฃ", "๐ฅ", "๐ฎ", "๐ค", "๐ฏ", "๐ช", "๐ซ", "๐ด", "๐", "๐", "๐", "๐", "๐คค", "๐", "๐", "๐", "๐", "๐", "๐ค", "๐ฒ", "๐", "๐", "๐", "๐", "๐ค", "๐ข", "๐ญ", "๐ง", "๐จ", "๐ฉ", "๐คฏ", "๐ฑ", "๐ณ", "๐ฅต", "๐ฅถ", "๐ก", "๐ ", "๐คฌ", "๐ท", "๐ค", "๐ค", "๐คข", "๐คฎ", "๐คง", "๐", "๐ฅณ", "๐ฅด", "๐ฅบ", "๐ง", "๐ฅฑ", "๐ง "], + + gestures: ["๐", "๐", "๐", "โ๏ธ", "๐ค", "๐ค", "๐ค", "๐ค", "๐", "๐", "๐", "๐", "๐", "โ๏ธ", "โ", "๐ค", "๐๏ธ", "๐", "๐", "๐ค", "๐", "๐", "๐", "๐ค", "๐"], + + animals_nature: ["๐ฆ", "๐ฆ", "๐ฏ", "๐ฎ", "๐ท", "๐ธ", "๐ต", "๐", "๐ง", "๐ฆ", "๐ค", "๐ฆ", "๐ฆ ", "๐ฆ", "๐ฆ", "๐บ", "๐", "๐ด", "๐", "๐", "๐ฆ", "๐", "๐", "๐", "๐ท๏ธ", "๐ฆ", "๐", "๐ฆจ", "๐ฆฉ", "๐ฆซ", "๐ฆฌ", "๐ปโโ๏ธ", "๐ผ", "๐จ", "๐", "๐ถ", "๐ฉ", "๐", "๐ฑ"], + + activities_sports: ["โฝ", "๐", "๐", "๐", "๐", "๐พ", "๐ณ", "๐", "๐", "๐", "๐ธ", "๐ฅ", "๐ฅ", "๐ฅ ", "๐คพ", "๐ฟ", "๐", "๐", "๐", "๐๏ธ", "๐คผ", "๐คธ", "๐คบ", "๐คฝ", "๐คน", "๐ฏ", "๐ฑ", "๐ฝ", "๐ด", "๐ต"], + + technology_objects: ["๐ป", "โจ๏ธ", "๐ฅ๏ธ", "๐ฑ๏ธ", "๐จ๏ธ", "๐ฑ", "โ๏ธ", "๐", "๐", "๐ ", "๐บ", "๐ป", "๐๏ธ", "๐๏ธ", "๐๏ธ", "๐งญ", "๐ก", "๐", "๐", "๐ก", "๐ข๏ธ", "๐ธ", "๐ต", "๐ณ", "๐", "๐", "๐"], + + mystical_fantasy: ["๐ง", "๐ง", "๐ง", "๐ง", "๐น", "๐บ", "๐ป", "๐ฝ", "๐พ", "๐ฎ", "๐ช", "๐", "๐ฒ", "๐ฆ"], + + nature_weather: ["๐", "๐", "๐", "โญ", "๐", "โก", "โ๏ธ", "๐ฅ", "๐ง", "๐", "๐ช๏ธ", "๐"], + + symbols: ["โค๏ธ", "๐", "๐", "๐", "๐", "๐", "๐", "๐", "๐", "๐", "๐", "๐", "๐", "๐", "๐ข", "๐ฃ", "๐ฅ", "๐ฆ", "๐จ", "๐ฉ", "๐ซ", "๐ฌ", "๐ ", "๐ฎ"], + + flags: ["๐", "๐ฉ", "๐", "๐ด", "๐ณ๏ธ", "๐ณ๏ธโ๐", "๐ณ๏ธโโง๏ธ", "๐ดโโ ๏ธ", "๐บ๐ธ", "๐จ๐ฆ", "๐ฌ๐ง", "๐ฉ๐ช", "๐ซ๐ท", "๐ฎ๐น", "๐ฏ๐ต", "๐ฐ๐ท", "๐ท๐บ", "๐จ๐ณ", "๐ฎ๐ณ", "๐ง๐ท", "๐ฆ๐บ", "๐ช๐ธ", "๐ณ๐ฑ", "๐ธ๐ช"] +}; + +// Define standard emoji categories +window.emojiLibrary.CATEGORIES = [ + { id: 'all', name: 'All Emojis', icon: '๐' }, + { id: 'faces_people', name: 'Faces & People', icon: '๐' }, + { id: 'gestures', name: 'Gestures', icon: '๐' }, + { id: 'animals_nature', name: 'Animals & Nature', icon: '๐ฆ' }, + { id: 'activities_sports', name: 'Activities & Sports', icon: 'โฝ' }, + { id: 'technology_objects', name: 'Tech & Objects', icon: '๐ป' }, + { id: 'mystical_fantasy', name: 'Mystical & Fantasy', icon: '๐ง' }, + { id: 'nature_weather', name: 'Nature & Weather', icon: '๐' }, + { id: 'symbols', name: 'Symbols', icon: 'โค๏ธ' }, + { id: 'flags', name: 'Flags', icon: '๐' } +]; + +// Function to render emoji grid with categories window.emojiLibrary.renderEmojiGrid = function(containerId, onEmojiSelect, filteredList) { + console.log('Rendering emoji grid to:', containerId); + + // Get container by ID const container = document.getElementById(containerId); if (!container) { console.error('Container not found:', containerId); return; } - + + // Clear container container.innerHTML = ''; - - // Header + + // Add header with instruction message const emojiHeader = document.createElement('div'); emojiHeader.className = 'emoji-header'; emojiHeader.innerHTML = '
Click any emoji to copy your hidden message
'; container.appendChild(emojiHeader); - - // Category Tabs + + // Create category tabs const categoryTabs = document.createElement('div'); categoryTabs.className = 'emoji-category-tabs'; + + // Add category tabs window.emojiLibrary.CATEGORIES.forEach(category => { const tab = document.createElement('button'); tab.className = 'emoji-category-tab'; - tab.classList.toggle('active', category.id === 'all'); + if (category.id === 'all') { + tab.classList.add('active'); + } tab.setAttribute('data-category', category.id); tab.innerHTML = `${category.icon} ${category.name}`; categoryTabs.appendChild(tab); }); + container.appendChild(categoryTabs); - - // Emoji Grid + + // Create emoji grid with enforced styling const gridContainer = document.createElement('div'); gridContainer.className = 'emoji-grid'; - const getActiveCategory = () => { - const activeTab = container.querySelector('.emoji-category-tab.active'); - return activeTab ? activeTab.getAttribute('data-category') : 'all'; - }; - - const renderGrid = () => { - gridContainer.innerHTML = ''; - const activeCategory = getActiveCategory(); - let emojisToShow = []; - - if (filteredList?.length > 0) { - emojisToShow = filteredList; - } else if (activeCategory === 'all') { - emojisToShow = Object.values(window.emojiLibrary.EMOJIS).flat(); - } else { - emojisToShow = window.emojiLibrary.EMOJIS[activeCategory] || []; - } - - emojisToShow.forEach(emoji => { - const emojiButton = document.createElement('button'); - emojiButton.className = 'emoji-button'; - emojiButton.textContent = emoji; - emojiButton.title = 'Click to encode with this emoji'; - emojiButton.addEventListener('click', () => { - if (typeof onEmojiSelect === 'function') { - onEmojiSelect(emoji); - emojiButton.style.backgroundColor = '#e6f7ff'; - setTimeout(() => emojiButton.style.backgroundColor = '', 300); - } - }); - gridContainer.appendChild(emojiButton); + // Get the active category + let activeCategory = 'all'; + const activeCategoryTab = container.querySelector('.emoji-category-tab.active'); + if (activeCategoryTab) { + activeCategory = activeCategoryTab.getAttribute('data-category'); + } + + // Determine which emojis to show based on category and filter + let emojisToShow = []; + + if (filteredList && filteredList.length > 0) { + // If we have a filtered list (from search), use that + emojisToShow = filteredList; + } else if (activeCategory === 'all') { + // For 'all' category, combine all emojis from the categories + Object.values(window.emojiLibrary.EMOJIS).forEach(categoryEmojis => { + emojisToShow = [...emojisToShow, ...categoryEmojis]; }); - - const countDisplay = container.querySelector('.emoji-count') || document.createElement('div'); - countDisplay.className = 'emoji-count'; - countDisplay.textContent = `${emojisToShow.length} emojis available`; - container.appendChild(countDisplay); - }; - + } else if (window.emojiLibrary.EMOJIS[activeCategory]) { + // For specific category, use emojis from that category + emojisToShow = window.emojiLibrary.EMOJIS[activeCategory]; + } + + console.log(`Adding ${emojisToShow.length} emojis to grid for category: ${activeCategory}`); + + // Add emojis to grid with enforced styling + emojisToShow.forEach(emoji => { + const emojiButton = document.createElement('button'); + emojiButton.className = 'emoji-button'; + emojiButton.textContent = emoji; // Use textContent for better emoji handling + emojiButton.title = 'Click to encode with this emoji'; + + emojiButton.addEventListener('click', () => { + if (typeof onEmojiSelect === 'function') { + onEmojiSelect(emoji); + // Add visual feedback when clicked + emojiButton.style.backgroundColor = '#e6f7ff'; + setTimeout(() => { + emojiButton.style.backgroundColor = ''; + }, 300); + } + }); + + gridContainer.appendChild(emojiButton); + }); + container.appendChild(gridContainer); - renderGrid(); - - // Category Tab Event Listeners - container.querySelectorAll('.emoji-category-tab').forEach(tab => { + console.log('Emoji grid rendering complete'); + + // Add event listeners to category tabs + const categoryTabButtons = container.querySelectorAll('.emoji-category-tab'); + categoryTabButtons.forEach(tab => { tab.addEventListener('click', () => { - container.querySelectorAll('.emoji-category-tab').forEach(t => t.classList.remove('active')); + // Update active tab + categoryTabButtons.forEach(t => t.classList.remove('active')); tab.classList.add('active'); - renderGrid(); + + // Re-render the emoji grid with the selected category + const selectedCategory = tab.getAttribute('data-category'); + console.log('Category selected:', selectedCategory); + + // Clear and recreate the grid + container.removeChild(gridContainer); + window.emojiLibrary.renderEmojiGrid(containerId, onEmojiSelect); }); }); + + // Debug info - add count display + const countDisplay = document.createElement('div'); + countDisplay.className = 'emoji-count'; + countDisplay.textContent = `${emojisToShow.length} emojis available`; + container.appendChild(countDisplay); };