// ==UserScript==
// @name KG_Chat_Application
// @namespace klavogonki
// @version 1.0.0
// @description Enhance the chat abilities
// @author Patcher
// @match *://klavogonki.ru/*
// @exclude https://klavogonki.ru/g/?gmid=*
// @icon https://www.google.com/s2/favicons?sz=64&domain=klavogonki.ru
// @grant none
// ==/UserScript==
(()=>{"use strict";var e={21:(e,t,n)=>{n.d(t,{A:()=>s});var r=n(601),i=n.n(r),a=n(314),o=n.n(a)()(i());o.push([e.id,".help-panel {\n opacity: 0;\n transition: opacity 0.3s ease;\n position: fixed;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n height: fit-content;\n max-height: 70vh !important;\n width: fit-content;\n overflow-y: auto;\n scrollbar-width: none;\n /* Existing styles */\n background: #1e1e1e;\n border: 1px solid #333 !important;\n padding: 1em;\n border-radius: 0.4em !important;\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;\n color: #deb887 !important;\n font-family:'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;\n z-index: 1100;\n}\n\n/* Header styling */\n.help-header {\n margin-top: 0;\n font-size: 1.5em;\n text-align: center;\n color: #ffa500 !important;\n}\n\n/* Subheader styling – now further differentiated */\n.help-subheader {\n margin: 0.8em 0 0.3em 1em;\n /* Added left margin of 1em */\n font-size: 1.1em;\n /* Smaller than header */\n color: #ffcc00 !important;\n font-weight: normal;\n text-align: left;\n}\n\n/* Header for a specific section */\n.help-section-header {\n margin-top: 0 !important;\n margin-bottom: 1.5em !important;\n font-size: 1.5em !important;\n text-align: center;\n color: #ffa500 !important;\n}\n\n/* Subheader for a specific section (different type) */\n.help-section-subheader {\n margin: 0.8em 0 1.2em 1em;\n /* left margin added */\n font-size: 0.9em;\n color: #ffcc00 !important;\n font-weight: normal;\n text-align: left;\n}\n\n/* List styling */\n.help-list {\n list-style-type: none;\n padding-left: 0;\n}\n\n/* List item styling */\n.help-list-item {\n display: flex;\n align-items: center;\n flex-direction: row;\n padding: 0.3em;\n border-bottom: 1px dashed #444 !important;\n}\n\n.help-list-item:last-child {\n border-bottom: none;\n}\n\n/* Hotkey text styling – updated to force command description wrap */\n.help-hotkey {\n width: fit-content;\n display: flex;\n color: #7ed4ff !important;\n font-family: monospace;\n background-color: rgba(126, 212, 255, 0.1) !important;\n border: 1px solid rgba(126, 212, 255, 0.4) !important;\n border-left: 3px solid rgba(126, 212, 255, 0.4) !important;\n border-radius: 0 0.2em 0.2em 0 !important;\n padding: 2px 4px;\n margin-right: 1em;\n}",""]);const s=o},56:(e,t,n)=>{e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},72:e=>{var t=[];function n(e){for(var n=-1,r=0;r<t.length;r++)if(t[r].identifier===e){n=r;break}return n}function r(e,r){for(var a={},o=[],s=0;s<e.length;s++){var c=e[s],l=r.base?c[0]+r.base:c[0],d=a[l]||0,u="".concat(l," ").concat(d);a[l]=d+1;var p=n(u),m={css:c[1],media:c[2],sourceMap:c[3],supports:c[4],layer:c[5]};if(-1!==p)t[p].references++,t[p].updater(m);else{var h=i(m,r);r.byIndex=s,t.splice(s,0,{identifier:u,updater:h,references:1})}o.push(u)}return o}function i(e,t){var n=t.domAPI(t);n.update(e);return function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;n.update(e=t)}else n.remove()}}e.exports=function(e,i){var a=r(e=e||[],i=i||{});return function(e){e=e||[];for(var o=0;o<a.length;o++){var s=n(a[o]);t[s].references--}for(var c=r(e,i),l=0;l<a.length;l++){var d=n(a[l]);0===t[d].references&&(t[d].updater(),t.splice(d,1))}a=c}}},113:e=>{e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},314:e=>{e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,r,i,a){"string"==typeof e&&(e=[[null,e,void 0]]);var o={};if(r)for(var s=0;s<this.length;s++){var c=this[s][0];null!=c&&(o[c]=!0)}for(var l=0;l<e.length;l++){var d=[].concat(e[l]);r&&o[d[0]]||(void 0!==a&&(void 0===d[5]||(d[1]="@layer".concat(d[5].length>0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=a),n&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=n):d[2]=n),i&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=i):d[4]="".concat(i)),t.push(d))}},t}},498:(e,t,n)=>{n.d(t,{A:()=>s});var r=n(601),i=n.n(r),a=n(314),o=n.n(a)()(i());o.push([e.id,"@import url(https://fonts.googleapis.com/css2?family=Noto+Color+Emoji&display=swap);"]),o.push([e.id,':root {\n --emoji-font: "Noto Color Emoji";\n}\n\n.emoji-panel {\n opacity: 0;\n transition: opacity 0.3s ease;\n position: absolute !important;\n top: 45% !important;\n left: 50% !important;\n transform: translate(-50%, -50%) !important;\n background: #1e1e1e !important;\n border: 1px solid #333 !important;\n border-radius: 0.4em !important;\n width: 380px;\n height: 600px;\n display: flex;\n flex-direction: column;\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;\n z-index: 1000;\n}\n\n.emoji-search-container {\n padding: 1em !important;\n border: none !important;\n}\n\n.emoji-search {\n width: 100%;\n padding: 8px;\n border-radius: 4px;\n background: #2a2a2a !important;\n border: none !important;\n border-radius: 0.2em !important;\n color: #deb887 !important;\n caret-color: #deb887 !important;\n font-size: 0.9em !important;\n}\n\n.emoji-search:focus {\n outline: none;\n border-color: #666;\n}\n\n.emoji-categories {\n position: sticky !important;\n top: 0 !important;\n display: grid !important;\n grid-template-columns: repeat(auto-fill, minmax(32px, 1fr)) !important;\n padding: 8px !important;\n border-bottom: 1px solid #333 !important;\n gap: 8px !important;\n justify-content: center !important;\n align-items: center !important;\n overflow-x: auto !important;\n scrollbar-width: thin !important;\n}\n\n.emoji-category-btn {\n font-family: var(--emoji-font) !important;\n position: relative !important;\n background: none !important;\n border: none !important;\n padding: 4px !important;\n cursor: pointer !important;\n font-size: 1.5em !important;\n transition: background-color 0.2s;\n width: 100% !important;\n height: 100% !important;\n display: flex !important;\n align-items: center !important;\n justify-content: center !important;\n aspect-ratio: 1 !important;\n border-bottom: 3px solid transparent !important;\n}\n\n/* Active category button gets a 3px {color} border */\n.emoji-category-btn.active {\n opacity: 1;\n border-bottom: 3px solid goldenrod !important;\n}\n\n.emoji-category-btn:hover {\n background-color: #333;\n}\n\n.emoji-container {\n flex: 1;\n overflow-y: auto;\n overflow-x: hidden !important;\n display: grid !important;\n gap: 8px !important;\n width: 100% !important;\n max-width: 100% !important;\n scrollbar-width: none !important;\n}\n\n.emoji-category-section {\n margin-bottom: 10px;\n}\n\n.emoji-category-header {\n padding: 8px !important;\n color: #deb887 !important;\n font-size: 0.9em !important;\n position: sticky !important;\n top: 0px !important;\n background: #1e1e1e !important;\n z-index: 1 !important;\n border-bottom: 1px solid #333 !important;\n width: 100% !important;\n box-sizing: border-box !important;\n margin: 0 !important;\n}\n\n.emoji-list {\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(32px, 1fr)) !important;\n padding: 8px !important;\n gap: 8px;\n align-content: start;\n}\n\n.emoji-btn {\n font-family: var(--emoji-font), sans-serif !important;\n background: none;\n border: none;\n padding: 4px !important;\n cursor: pointer;\n font-size: 1.5em !important;\n transition: background-color 0.2s;\n width: 100% !important;\n height: 100% !important;\n display: flex !important;\n align-items: center !important;\n justify-content: center !important;\n aspect-ratio: 1 !important;\n}\n\n.emoji-btn:hover {\n background-color: #333;\n}\n\n.emoji-footer {\n border-top: 1px solid #333 !important;\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n padding: 5px;\n}\n\n/* Info panel fixed at bottom with a 50px height */\n.emoji-info-panel {\n height: 40px !important;\n padding: 8px !important;\n display: flex !important;\n align-items: center !important;\n gap: 8px !important;\n color: #deb887 !important;\n font-size: 0.9em !important;\n background: #1e1e1e !important;\n}\n\n.emoji-language-select {\n border-radius: 0.4em !important;\n /* Rounded corners */\n padding: 5px 10px;\n /* Space inside the select */\n font-size: 14px;\n /* Font size for readability */\n background-color: #2a2a2a !important;\n /* Dark background to match search input */\n border: 1px solid #444 !important;\n /* Subtle dark border */\n color: #deb887 !important;\n /* Text color to match headers and info panel */\n cursor: pointer;\n /* Pointer cursor to indicate it\'s clickable */\n transition: border-color 0.3s ease;\n /* Smooth transition for border color */\n}\n\n/* Focus state */\n.emoji-language-select:focus {\n outline: none;\n /* Remove default outline */\n border-color: goldenrod !important;\n /* Match active category button */\n}\n\n/* Hover state */\n.emoji-language-select:hover {\n border-color: #666 !important;\n /* Lighten border on hover */\n}\n\n/* Optional: Style for options (limited control) */\n.emoji-language-select option {\n font-size: 14px;\n /* Match font size */\n background-color: #2a2a2a !important;\n /* Dark background for options */\n color: #deb887 !important;\n /* Text color for options */\n}\n\n.emoji-info-icon {\n font-family: var(--emoji-font) !important;\n font-size: 1.5em !important;\n}\n\n.emoji-info-keywords {\n color: #888 !important;\n font-style: italic !important;\n}\n\n/* Scrollbar styling */\n.emoji-container::-webkit-scrollbar,\n.emoji-categories::-webkit-scrollbar {\n width: 6px;\n height: 6px;\n}\n\n.emoji-container::-webkit-scrollbar-track,\n.emoji-categories::-webkit-scrollbar-track {\n background: #1e1e1e;\n}\n\n.emoji-container::-webkit-scrollbar-thumb,\n.emoji-categories::-webkit-scrollbar-thumb {\n background: #444;\n border-radius: 3px;\n}\n\n.emoji-container::-webkit-scrollbar-thumb:hover,\n.emoji-categories::-webkit-scrollbar-thumb:hover {\n background: #555;\n}',""]);const s=o},540:e=>{e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},601:e=>{e.exports=function(e){return e[1]}},659:e=>{var t={};e.exports=function(e,n){var r=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},825:e=>{e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var r="";n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var i=void 0!==n.layer;i&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,i&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}");var a=n.sourceMap;a&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(a))))," */")),t.styleTagTransform(r,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},919:(e,t,n)=>{n.d(t,{A:()=>s});var r=n(601),i=n.n(r),a=n(314),o=n.n(a)()(i());o.push([e.id,'/* Variables */\n:root {\n --border-radius: 0.2em;\n --min-chat-width: 420px;\n --min-chat-height: 200px;\n --user-list-width: fit-content;\n --emoji-font: "Twemoji Mozilla", "Twemoji", "Segoe UI Emoji", "NotoColorEmoji", "Apple Color Emoji", "Android Emoji", "EmojiSymbols", "EmojiOne", "Segoe UI Symbol", "Symbola", "Quivira", "BabelStone Han", "Noto Sans Symbols", "Noto Sans CJK JP", "Noto Sans CJK KR", "Noto Sans CJK SC", "Noto Sans CJK TC", "Noto Sans CJK HK", "Noto Sans CJK TW", "Noto Sans CJK VN", "Noto Sans CJK", "Noto Sans", "sans-serif";\n}\n\n/* Main chat container */\n#app-chat-container {\n border-radius: 0.4em 0.4em 0 0 !important;\n position: fixed;\n bottom: 0;\n left: 0;\n height: 300px;\n background: #1e1e1e !important;\n border: 1px solid #333 !important;\n display: flex;\n font-family: sans-serif;\n color: #deb887 !important;\n z-index: 999;\n min-width: var(--min-chat-width) !important;\n min-height: var(--min-chat-height) !important;\n box-sizing: border-box;\n max-width: 100vw;\n overflow: hidden;\n transition: opacity 0.3s ease, transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);\n}\n\n#app-chat-container a {\n color: #82B32A !important;\n transition: color 0.15s !important;\n}\n\n#app-chat-container a:hover {\n color: #95cc30 !important;\n}\n\n/* Chat container states */\n#app-chat-container.maximized {\n position: fixed;\n z-index: 1010;\n}\n\n#app-chat-container:not(.visible-chat):not(.hidden-chat):not(.maximized):not(.floating-chat) {\n display: none;\n opacity: 0;\n}\n\n#app-chat-container.visible-chat {\n transform: translateY(0) !important;\n}\n\n#app-chat-container.hidden-chat {\n opacity: 1;\n transform: translateY(calc(100% - 25px)) !important;\n}\n\n#app-chat-container.floating-chat {\n border-radius: 0.4em !important;\n}\n\n/* Responsive styles */\n@media (max-width: 780px) {\n #app-chat-container .user-list-container {\n display: none !important;\n }\n\n #app-chat-container .chat-wrapper {\n width: 100% !important;\n border-right: none !important;\n }\n}\n\n@media (max-width: 550px) {\n #app-chat-container .message {\n flex-direction: column !important;\n margin-bottom: 1em !important;\n }\n}\n\n/* Font size control */\n#app-chat-container .font-size-control {\n position: absolute !important;\n top: 0 !important;\n left: 0 !important;\n display: flex !important;\n align-items: center !important;\n justify-content: center !important;\n height: 25px !important;\n padding: 0 10px !important;\n gap: 5px !important;\n z-index: 6 !important;\n}\n\n#app-chat-container .font-size-label {\n color: #deb887 !important;\n cursor: default !important;\n user-select: none !important;\n}\n\n#app-chat-container .font-size-label.small {\n font-size: 0.8em !important;\n}\n\n#app-chat-container .font-size-label.large {\n font-size: 1.2em !important;\n}\n\n#app-chat-container .font-size-slider {\n width: 80px !important;\n height: 4px !important;\n -webkit-appearance: none !important;\n appearance: none !important;\n background: #333 !important;\n outline: none !important;\n border-radius: 2px !important;\n transition: opacity 0.2s !important;\n}\n\n#app-chat-container .font-size-slider::-webkit-slider-thumb {\n -webkit-appearance: none !important;\n appearance: none !important;\n width: 10px !important;\n height: 10px !important;\n border-radius: 50% !important;\n background: #deb887 !important;\n cursor: pointer !important;\n}\n\n#app-chat-container .font-size-slider::-moz-range-thumb {\n width: 10px !important;\n height: 10px !important;\n border-radius: 50% !important;\n background: #deb887 !important;\n cursor: pointer !important;\n border: none !important;\n}\n\n/* Resize handles */\n#app-chat-container .resize-handle {\n position: absolute !important;\n background: transparent !important;\n z-index: 1000 !important;\n}\n\n#app-chat-container .resize-handle.top {\n top: -3px !important;\n left: 0 !important;\n right: 0 !important;\n height: 6px !important;\n cursor: ns-resize !important;\n}\n\n#app-chat-container .resize-handle.left {\n left: -3px !important;\n top: 0 !important;\n bottom: 0 !important;\n width: 6px !important;\n cursor: ew-resize !important;\n}\n\n#app-chat-container .resize-handle.right {\n right: -3px !important;\n top: 0 !important;\n bottom: 0 !important;\n width: 6px !important;\n cursor: ew-resize !important;\n}\n\n/* Chat wrapper: two-column layout */\n#app-chat-container .chat-wrapper {\n display: flex !important;\n flex-direction: row !important;\n flex: 1 !important;\n min-width: var(--min-chat-width) !important;\n overflow: hidden !important;\n}\n\n/* Left column: messages & input */\n#app-chat-container .chat-content {\n margin-top: 25px !important;\n background: #1e1e1e !important;\n display: flex !important;\n flex-direction: column !important;\n flex: 1 !important;\n overflow: hidden !important;\n}\n\n/* Scrollable container settings */\n#app-chat-container .messages-panel {\n flex: 1 !important;\n overflow-y: auto !important;\n overflow-x: hidden !important;\n padding: 1em !important;\n display: flex !important;\n flex-direction: column !important;\n gap: 0.2em !important;\n scrollbar-width: thin !important;\n scrollbar-color: #333 #1e1e1e !important;\n}\n\n/* Custom scrollbar styling for WebKit browsers */\n#app-chat-container .messages-panel::-webkit-scrollbar {\n width: 8px !important;\n}\n\n#app-chat-container .messages-panel::-webkit-scrollbar-thumb {\n background-color: #333 !important;\n}\n\n#app-chat-container .messages-panel::-webkit-scrollbar-thumb:hover {\n background-color: #444 !important;\n}\n\n#app-chat-container .messages-panel::-webkit-scrollbar-track {\n background-color: #1e1e1e !important;\n}\n\n/* Input container at bottom */\n#app-chat-container .input-container {\n display: flex !important;\n align-items: center !important;\n padding: 1em !important;\n gap: 0.5em !important;\n border-top: 1px solid #333 !important;\n}\n\n#app-chat-container #message-input {\n outline: none !important;\n flex: 1 !important;\n background: #2a2a2a !important;\n color: #deb887 !important;\n padding: 0.5em !important;\n border-radius: var(--border-radius) !important;\n min-width: 0 !important;\n border: none !important;\n position: relative;\n font-family: inherit !important;\n /* Remove any fixed font-size to properly inherit from container */\n line-height: normal !important;\n transition: font-size 0.2s ease !important;\n}\n\n#app-chat-container #message-input.private-mode {\n background-color: #ff6b6b38 !important;\n color: #ff6b6b !important;\n caret-color: #ff6b6b !important;\n}\n\n#app-chat-container #message-input.private-mode::placeholder {\n color: #ff6b6b99;\n}\n\n#app-chat-container #messages-panel.private-mode::after {\n content: "🔒";\n position: absolute;\n right: 5px;\n top: 5px;\n font-size: 10px;\n opacity: 0.5;\n}\n\n/* Right column: user list container */\n#app-chat-container .user-list-container {\n margin-top: 25px;\n width: var(--user-list-width) !important;\n min-width: 180px !important;\n max-width: var(--user-list-width) !important;\n overflow-y: auto !important;\n overflow-x: hidden !important;\n padding: 1em !important;\n background: #1e1e1e !important;\n border-left: 1px solid #333 !important;\n}\n\n/* Message styles */\n#app-chat-container .message {\n padding: 0.2em 0.4em !important;\n display: flex;\n flex-direction: row;\n border-radius: var(--border-radius) !important;\n width: fit-content !important;\n max-width: 100% !important;\n word-break: break-word !important;\n}\n\n#app-chat-container .message-text .emoji-adjuster {\n font-family: var(--emoji-font) !important;\n font-size: 1.5em !important;\n margin: 0 0.1em !important;\n display: inline-flex !important;\n}\n\n#app-chat-container .message-text .mention {\n display: inline-flex !important;\n font-family: Roboto Mono !important;\n font-weight: bold !important;\n}\n\n#app-chat-container .message.system {\n background-color: #ffa50020 !important;\n border: 1px solid #ffa60030 !important;\n border-left: 3px solid #ffa500 !important;\n}\n\n#app-chat-container .message.system .time {\n margin-right: unset !important;\n color: #ffa50060 !important;\n}\n\n#app-chat-container .message.system .username {\n display: none !important;\n}\n\n#app-chat-container .message.system .message-text {\n color: #ffa500 !important;\n}\n\n#app-chat-container .message.sent {\n background: #00ff0020 !important;\n border: 1px solid #00ff0030 !important;\n border-left: 3px solid #00ff00 !important;\n}\n\n#app-chat-container .message.sent .time {\n color: #00ff0060 !important;\n}\n\n#app-chat-container .message.sent .username,\n#app-chat-container .message.sent .message-text {\n color: #00ff00 !important;\n}\n\n#app-chat-container .message.received {\n background-color: #ff4d4d20 !important;\n border: 1px solid #ff4d4d30 !important;\n border-left: 3px solid #ff4d4d !important;\n}\n\n#app-chat-container .message.received .time {\n color: #ff4d4d60 !important;\n}\n\n#app-chat-container .message.received .username,\n#app-chat-container .message.received .message-text {\n color: #ff4d4d !important;\n}\n\n/* Private message styling */\n.message.private-message {\n background-color: #ffdcdc20;\n border-left: 3px solid #ff6b6b50;\n}\n\n.message.private-message .message-text {\n color: #ff6b6b !important;\n}\n\n.message.private-message:not(.sent) {\n animation: privateMessagePulse 2s ease-in-out 1;\n}\n\n/* Sent private message styling */\n.message.private-message.sent {\n background: #293e2938 !important;\n border: 1px solid #293e2959 !important;\n}\n\n/* Received private message styling */\n.message.private-message.received {\n background-color: #1e1e1e26 !important;\n border: 1px solid #33333359 !important;\n}\n\n/* Add a subtle animation for received private messages */\n@keyframes privateMessagePulse {\n 0% {\n background-color: #ffdcdc26;\n }\n\n 50% {\n background-color: #ffdcdc4d;\n }\n\n 100% {\n background-color: #ffdcdc26;\n }\n}\n\n#app-chat-container .message-info {\n margin-right: 1em !important;\n white-space: nowrap !important;\n}\n\n/* Ensure time and username elements maintain their relative sizes */\n#app-chat-container .message-info .time {\n font-size: 0.9em !important;\n margin-right: 1em !important;\n color: #666 !important;\n}\n\n#app-chat-container .username {\n font-size: 1em !important;\n}\n\n/* Add to existing style.css content */\n#app-chat-container .message-info .username,\n#app-chat-container .user-info .username {\n cursor: pointer !important;\n transition: opacity 0.2s ease !important;\n}\n\n#app-chat-container .message-info .username:hover,\n#app-chat-container .user-info .username:hover {\n opacity: 0.7 !important;\n}\n\n#app-chat-container .message-info .time {\n margin-right: 1em !important;\n font-size: 0.9em !important;\n color: #666 !important;\n}\n\n/* User list item styles */\n#app-chat-container .user-item {\n display: flex !important;\n align-items: center !important;\n padding: 0.2em !important;\n margin-bottom: 0.2em !important;\n border-radius: var(--border-radius) !important;\n max-width: 100% !important;\n text-overflow: ellipsis !important;\n}\n\n#app-chat-container .user-avatar {\n display: flex !important;\n justify-content: center !important;\n align-items: center !important;\n width: 24px !important;\n height: 24px !important;\n font-size: 18px !important;\n border-radius: 0.1em !important;\n margin-right: 1em !important;\n text-align: center !important;\n line-height: 24px !important;\n flex-shrink: 0 !important;\n}\n\n#app-chat-container .user-avatar.image-avatar {\n cursor: pointer !important;\n transform-origin: left !important;\n transition: transform 0.15s ease-out !important;\n}\n\n#app-chat-container .user-avatar.image-avatar:hover {\n transform: scale(2) !important;\n}\n\n#app-chat-container .user-avatar.svg-avatar {\n font-family: var(--emoji-font), sans-serif !important;\n}\n\n#app-chat-container .user-info {\n flex: 1 !important;\n min-width: 0 !important;\n overflow: hidden !important;\n text-overflow: ellipsis !important;\n white-space: nowrap !important;\n}\n\n#app-chat-container .user-meta {\n cursor: default;\n font-size: 0.8em !important;\n color: #b0b0b0 !important;\n overflow: hidden !important;\n text-overflow: ellipsis !important;\n white-space: nowrap !important;\n}\n\n#app-chat-container .game-link {\n color: #deb887 !important;\n text-decoration: none !important;\n transition: color 0.15s !important;\n}\n\n#app-chat-container .role-moderator {\n color: #ff7e7e !important;\n}\n\n#app-chat-container .role-participant {\n color: #7ed4ff !important;\n}\n\n#app-chat-container .role-visitor {\n color: #b0b0b0 !important;\n}\n\n#app-chat-container .role {\n font-family: var(--emoji-font), sans-serif !important;\n}\n\n#app-chat-container .role.participant {\n filter: brightness(0.6) !important;\n}\n\n#app-chat-container .role.visitor {\n filter: brightness(0.8) !important;\n}\n\n#app-chat-container .traffic-icon {\n /* Set font-family to var(--emoji-font) or fallback to system emoji */\n font-family: var(--emoji-font), sans-serif !important;\n}\n\n/* Header toggle button */\n#app-chat-container .header-button {\n cursor: pointer !important;\n position: absolute !important;\n top: 0 !important;\n width: 25px !important;\n height: 25px !important;\n z-index: 5 !important;\n}\n\n#app-chat-container .filled-button {\n border: none !important;\n outline: none !important;\n background-color: transparent !important;\n transition: all 0.15s ease-out;\n}\n\n#app-chat-container .filled-button:hover {\n filter: brightness(1.2) !important;\n}\n\n#app-chat-container .emoji-trigger,\n#app-chat-container .private-mode-exit,\n#app-chat-container .send-button {\n font-family: var(--emoji-font), sans-serif !important;\n height: 28px !important;\n width: 28px !important;\n font-size: 1.5em !important;\n display: flex !important;\n align-items: center !important;\n justify-content: center !important;\n line-height: 1 !important;\n cursor: pointer !important;\n background: transparent !important;\n border: none !important;\n outline: none !important;\n margin: 0 !important;\n padding: 0 !important;\n}\n\n.chat-toggle-button {\n right: 0 !important;\n}\n\n.chat-maximize-button {\n right: 25px !important;\n}\n\n.chat-help-button {\n color: #82B32A !important;\n right: 50px !important;\n}\n\n/* Drag area for floating the chat */\n#app-chat-container .chat-drag-area {\n border-radius: 0.4em 0.4em 0 0 !important;\n position: absolute !important;\n top: 0 !important;\n left: 0 !important;\n right: 0 !important;\n height: 25px !important;\n cursor: move !important;\n background-color: #161616cc !important;\n}\n\n/* Dimming background style */\n.dimming-element {\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background-color: #00000080;\n z-index: 1010 !important;\n opacity: 0;\n transition: opacity 0.3s ease;\n}\n\n/* convertImageLinksToImage */\n.clickable-thumbnail {\n opacity: 1;\n transition: opacity 0.15s ease-in-out;\n border: none;\n max-width: 150px !important;\n max-height: 150px !important;\n cursor: pointer;\n background-color: transparent;\n padding: 2px;\n margin: 6px;\n overflow-y: auto;\n}\n\n.clickable-thumbnail img {\n border-radius: var(--border-radius) !important;\n object-fit: contain;\n height: 100%;\n width: 100%;\n}\n\n.clickable-thumbnail:hover {\n opacity: 0.8;\n}\n\n.scaled-thumbnail {\n top: 50%;\n left: 50%;\n transform-origin: center center;\n transform: translate(-50%, -50%) scale(1);\n position: fixed;\n opacity: 0;\n z-index: 1015 !important;\n transform-origin: center center;\n max-height: 90vh;\n max-width: 90vw;\n cursor: pointer;\n border-radius: 0.6em !important;\n box-shadow: 0 4px 6px #0000004d, 0 1px 3px #00000047 !important;\n}\n\n/* convertVideoLinksToPlayer */\n.video-wrapper {\n display: flex;\n flex-direction: column;\n}\n\n.video-wrapper .processed-video {\n margin-bottom: 0.6em !important;\n}\n\n.video-container {\n border-radius: 0.4em !important;\n display: flex;\n border: none;\n height: 200px !important;\n width: 356px !important;\n}',""]);const s=o}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var a=t[r]={id:r,exports:{}};return e[r](a,a.exports,n),a.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.nc=void 0;var r=n(72),i=n.n(r),a=n(825),o=n.n(a),s=n(659),c=n.n(s),l=n(56),d=n.n(l),u=n(540),p=n.n(u),m=n(113),h=n.n(m),g=n(919),f={};f.styleTagTransform=h(),f.setAttributes=d(),f.insert=c().bind(null,"head"),f.domAPI=o(),f.insertStyleElement=p();i()(g.A,f);g.A&&g.A.locals&&g.A.locals;const y="https://klavogonki.ru",b=`${y}/xmpp-httpbind/`,v=5e3,w={get username(){const e=localStorage.getItem("klavoauth");return e?JSON.parse(e).username:""},get password(){const e=localStorage.getItem("klavoauth");return e?JSON.parse(e).password:""}},k=["😀","😁","😂","🤣","😃","😄","😅","😆","😉","😊","😋","😎","😏","😐","😑","😒","😓","😔","😕","😖","😗","😘","😙","😚","😜","😝","😛","🤑","🤗","🤔","🤐","🤨","😣","😥","😮","🤯","😳","😱","😨","😰","😢","🤪","😵","😲","🤤","😷","🤒","🤕","🤢","🤧","😇","🥳","🥺","😬","😴","😌","🤥","🥴","🥵","🥶","🤧","🤭","🤫","😠","😡","😳","😞","😟","😕","🐱","😺","😸","😹","😻","😼","😽","🙀","😿","😾","🐶","🐭","🐹","🐰","🦊","🐻","🐼","🐨","🐯","🦁","🐮","🐷","🐸","🐵","🙈","🙉","🙊","🐔","🦄"];let x={bigImageEvents:{}};const E=["klavogonki.ru","youtube.com","youtu.be","imgur.com","pikabu.ru","userapi.com","ibb.co","yaplakal.com","freepik.com"];class C{constructor({username:e,password:t,bindUrl:n,delay:r=1e3}){this.username=e,this.password=t,this.bindUrl=n,this.delay=r,this.sid=null,this.rid=Math.floor(Date.now()/1e3)}nextRid(){return++this.rid}async sendRequest(e){const t=await fetch(this.bindUrl,{method:"POST",headers:{"Content-Type":"text/xml; charset=UTF-8","User-Agent":"Mozilla/5.0"},body:e});if(!t.ok)throw new Error(`HTTP error! status: ${t.status}`);return await t.text()}async sendRequestWithRetry(e,t=5){let n,r=this.delay;for(let i=1;i<=t;i++)try{return await this.sendRequest(e)}catch(e){if(n=e,!e.message.includes("429"))throw e;{const e=r*Math.pow(2,i);console.log(`⏱️ Rate limited (attempt ${i}/${t}). Waiting ${e}ms...`),await this.sleep(e)}}throw new Error(`Max retries reached. Last error: ${n.message}`)}sleep(e){return new Promise((t=>setTimeout(t,e)))}base64Encode(e){const t=(new TextEncoder).encode(e);return btoa(String.fromCharCode(...t))}async connect(){console.log("🌐 Step 1: Connecting to XMPP server...");const e=`<body xmlns='http://jabber.org/protocol/httpbind'\n rid='${this.nextRid()}'\n to='jabber.klavogonki.ru'\n xml:lang='en'\n wait='60'\n hold='1'\n ver='1.6'\n xmpp:version='1.0'\n xmlns:xmpp='urn:xmpp:xbosh'/>`,t=await this.sendRequestWithRetry(e);this.sid=t.match(/sid=['"]([^'"]+)['"]/)[1],console.log(`🔑 Step 2: Session ID received: ${this.sid}`),await this.sleep(this.delay/8),console.log("🔐 Step 3: Authenticating...");const n=this.base64Encode("\0"+this.username+"\0"+this.password),r=`<body rid='${this.nextRid()}' sid='${this.sid}'\n xmlns='http://jabber.org/protocol/httpbind'>\n <auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>${n}</auth>\n </body>`;if(!(await this.sendRequestWithRetry(r)).includes("<success"))throw new Error("❌ Authentication failed");console.log("✅ Step 4: Authentication successful!"),await this.sleep(this.delay/8),console.log("🔄 Step 5: Restarting stream...");const i=`<body rid='${this.nextRid()}' sid='${this.sid}'\n xmlns='http://jabber.org/protocol/httpbind'\n to='jabber.klavogonki.ru'\n xmpp:restart='true'\n xmlns:xmpp='urn:xmpp:xbosh'/>`;await this.sendRequestWithRetry(i),await this.sleep(this.delay/8),console.log("📦 Step 6: Binding resource...");const a=`<body rid='${this.nextRid()}' sid='${this.sid}'\n xmlns='http://jabber.org/protocol/httpbind'>\n <iq type='set' id='bind_1' xmlns='jabber:client'>\n <bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>\n <resource>web</resource>\n </bind>\n </iq>\n </body>`;await this.sendRequestWithRetry(a),await this.sleep(this.delay/8),console.log("🔌 Step 7: Establishing session...");const o=`<body rid='${this.nextRid()}' sid='${this.sid}'\n xmlns='http://jabber.org/protocol/httpbind'>\n <iq type='set' id='session_1' xmlns='jabber:client'>\n <session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>\n </iq>\n </body>`;return await this.sendRequestWithRetry(o),await this.sleep(this.delay/8),{sid:this.sid,rid:this.rid}}}const j=["jpg","jpeg","png","gif","webp"],S="📸",L="🖥️",I="💀️️",M=.2,$=10,z=.1;let A=0,P=!1,T=[],N=null;const H=e=>{const t=(e=>{try{return e.match(/\.([^?#.]+)(?:[?#]|$)/i)?.[1]?.toLowerCase()||""}catch(e){return console.error("Error extracting extension:",e.message),""}})(e);return{allowed:j.includes(t),extension:t}},R=(e,t)=>{const n=document.createElement("img");n.src=e,n.classList.add("scaled-thumbnail"),document.body.appendChild(n),A=t;let r=1,i=!1,a=0,o=0,s=0,c=0;let l=document.querySelector(".dimming-element");l||(l=document.createElement("div"),l.classList.add("dimming-element"),document.body.appendChild(l));const d=e=>{ve(e,"hide","0"),!document.querySelector(".popup-panel")&&l&&ve(l,"hide","0"),be()};return x.bigImageEvents.click=e=>{n.contains(e.target)||(n.remove(),be())},x.bigImageEvents.keydown=e=>{"Escape"===e.code||"Space"===e.code?(e.preventDefault(),d(n)):"ArrowLeft"===e.code?B(-1):"ArrowRight"===e.code&&B(1)},x.bigImageEvents.wheel=e=>{const t=e.deltaY<0?1:-1;r+=t*z*r,r=Math.max(M,Math.min(r,$)),n.style.transform=`translate(-50%, -50%) translate(${s}px, ${c}px) scale(${r})`},x.bigImageEvents.mousemove=e=>{if(i){if(e.ctrlKey){const t=e.clientY-o,n=t<0?1:-1,i=Math.abs(t)*z*.05;r+=n*i*r,r=Math.max(M,Math.min(r,$))}else{const t=(e.clientX-a)/r*5,n=(e.clientY-o)/r*5;s+=t,c+=n}n.style.transform=`translate(-50%, -50%) translate(${s}px, ${c}px) scale(${r})`,a=e.clientX,o=e.clientY}},x.bigImageEvents.mousedown=e=>{const{button:t,clientX:r,clientY:s,target:c,ctrlKey:l}=e;(0!==t&&2!==t||c===n)&&(0===t?B(-1):2===t?(e.preventDefault(),l?(navigator.clipboard.writeText(c.src).catch(console.error),d(n)):B(1)):1===t&&(i=!0,a=r,o=s,e.preventDefault()))},x.bigImageEvents.mouseup=e=>{1===e.button&&(i=!1)},x.bigImageEvents.contextmenu=e=>e.preventDefault(),Object.entries(x.bigImageEvents).forEach((([e,t])=>{document.addEventListener(e,t)})),ve(l,"show","1"),l.addEventListener("click",(()=>{d(n)})),n},B=e=>{const t=A+e;t>=0&&t<T.length&&!P&&(P=!0,N&&(N.src=T[t].imgSrc),setTimeout((()=>P=!1),50),A=t)};function q(e){const t=document.getElementById("messages-panel");if(!t)return;const n=t.querySelectorAll("a:not(.skipped):not(.processed-image)");function r(e,n){const r=document.createElement("div");r.classList.add("clickable-thumbnail"),r.dataset.sourceLink=e.href;const i=document.createElement("img");i.src=e.href,i.onload=()=>{r.appendChild(i),e.parentNode.insertBefore(r,e.nextSibling)},i.onerror=()=>{console.error("Failed to load image:",e.href),e.classList.add("skipped")},n?e.querySelector(".clickable-thumbnail")||e.addEventListener("click",(t=>{e.querySelector(".clickable-thumbnail")||(r.appendChild(i),e.parentNode.insertBefore(r,e.nextSibling))})):(r.appendChild(i),e.parentNode.insertBefore(r,e.nextSibling)),r.addEventListener("click",(n=>{n.stopPropagation(),T=[],t.querySelectorAll(".clickable-thumbnail").forEach(((e,t)=>{const n=e.querySelector("img");n&&e.dataset.sourceLink&&T.push({link:e.dataset.sourceLink,imgSrc:n.src,index:t})}));const r=T.findIndex((t=>t.link===e.href||t.imgSrc===i.src));N=R(i.src,r>=0?r:0),ve(N,"show","1");const a=document.querySelector(".dimming-element");a&&ve(a,"show","1")}))}n.length&&n.forEach((e=>{if(!e.href||!e.href.startsWith("http"))return;const{allowed:t,extension:n}=H(e.href);if(!t)return;e.classList.add("media");const{isTrusted:i,domain:a}=we(e.href);e.title=ke(e.href)?xe(e.href):e.href,i?function(e,t,n){e.textContent=`${S} Image (${t.toUpperCase()}) ${L} Hostname (${n})`,e.classList.add("processed-image"),r(e,!1)}(e,n,a):function(e,t,n){e.classList.add("skipped"),e.textContent=`${S} Image (${t.toUpperCase()}) ${L} Hostname (${n}) ${I} Untrusted`,e.addEventListener("click",(t=>{e.classList.contains("processed-image")||(t.preventDefault(),e.classList.remove("skipped"),e.classList.add("processed-image"),r(e,!0))}))}(e,n,a)}))}const D="🎥",U="🖥️",_="💀️️",F=["mp4","webm","ogg","mov","avi"];function K(e){const t=document.getElementById("messages-panel");if(!t)return;const n=t.querySelectorAll("a:not(.skipped):not(.processed-video)");function r(e,t,n,r){const{youtubeMatch:i,videoType:a,videoId:o}=r,s=(e=>{const t=e.match(/\.([^?#.]+)(?:[?#]|$)/i)?.[1]?.toLowerCase()||"";return{allowed:F.includes(t),extension:t}})(t);if(!i&&!s.allowed)return;e.classList.add("processed-video");const c=document.createElement("div");c.classList.add("video-wrapper");const l=document.createElement(i?"iframe":"video");l.classList.add("video-container"),e.textContent=`${D} ${a} ${U} Hostname (${n})`,i?(l.src=`https://www.youtube.com/embed/${o}`,l.allowFullscreen=!0):(l.src=t,l.controls=!0),e.title=ke(t)?xe(t):t,e.style.display="inline-flex",e.parentNode.insertBefore(c,e),c.append(e,l)}n.length&&n.forEach((e=>{const t=e.href;if(!t)return;const n=function(e){const t=e.match(/(?:shorts\/|live\/|watch\?v=|youtu\.be\/)([a-zA-Z0-9_-]{11})/i);if(t){return{youtubeMatch:!0,videoId:t[1],videoType:e.includes("shorts/")?"Shorts":e.includes("live/")?"Live":e.includes("watch?v=")?"Watch":e.includes("youtu.be/")?"Share":"YouTube"}}const n=e.split(".").pop().toLowerCase();if(F.includes(n))return{youtubeMatch:!1,videoType:`Video (${n.toUpperCase()})`};return!1}(t);if(!n)return;e.classList.add("media");const{isTrusted:i,domain:a}=we(t);if(!i)return e.classList.add("skipped"),e.textContent=`${D} ${n.videoType} ${U} Hostname (${a}) ${_} Untrusted`,void e.addEventListener("click",(i=>{e.classList.contains("processed-video")||(i.preventDefault(),e.classList.remove("skipped"),r(e,t,a,n))}));r(e,t,a,n)}))}const O="http://www.w3.org/2000/svg",J="#82B32A",W="#B34A2A",V=`\n <svg xmlns="${O}" \n width="24" \n height="24" \n viewBox="0 0 250 250">\n <path fill="#096AD9" d="M22.32 98.04l-19.04 -87.15c-0.75,-3.46 0.48,-6.84 3.29,-9 2.81,-2.17 6.39,-2.49 9.55,-0.87l225.95 116.02c3.07,1.57 4.87,4.52 4.87,7.96 0,3.44 -1.8,6.39 -4.87,7.96l-225.95 116.02c-3.16,1.62 -6.74,1.3 -9.55,-0.87 -2.81,-2.16 -4.04,-5.54 -3.29,-9l19.04 -87.15c0.79,-3.62 3.53,-6.26 7.18,-6.91l102.6 -18.19c0.91,-0.16 1.56,-0.94 1.56,-1.86 0,-0.92 -0.65,-1.7 -1.56,-1.86l-102.6 -18.19c-3.65,-0.65 -6.39,-3.29 -7.18,-6.91z"/>\n </svg>\n`,Y=`\n <svg xmlns="${O}" \n width="15" \n height="15" \n viewBox="0 0 250 250" \n style="shape-rendering:geometricPrecision; text-rendering:geometricPrecision; image-rendering:optimizeQuality; fill-rule:evenodd; clip-rule:evenodd">\n <path fill="${J}" d="M46.62 0l156.76 0c25.64,0 46.62,20.98 46.62,46.62l0 156.75c0,25.65 -20.98,46.63 -46.62,46.63l-156.76 0c-25.64,0 -46.62,-20.98 -46.62,-46.63l0 -156.75c0,-25.64 20.98,-46.62 46.62,-46.62zm45.71 70.24l32.67 32.67 32.67 -32.67c2.73,-2.73 7.18,-2.73 9.91,0l12.18 12.18c2.73,2.73 2.73,7.18 0,9.91l-32.67 32.67 32.67 32.66c2.73,2.74 2.73,7.19 0,9.92l-12.18 12.18c-2.73,2.73 -7.18,2.73 -9.91,0l-32.67 -32.67 -32.67 32.67c-2.73,2.73 -7.18,2.73 -9.91,0l-12.18 -12.18c-2.73,-2.73 -2.73,-7.18 0,-9.92l32.67 -32.66 -32.67 -32.67c-2.73,-2.73 -2.73,-7.18 0,-9.91l12.18 -12.18c2.73,-2.73 7.18,-2.73 9.91,0z"/>\n </svg>\n`,Q=`\n <svg xmlns="${O}" \n width="15" \n height="15" \n viewBox="0 0 250 250" \n style="shape-rendering:geometricPrecision; text-rendering:geometricPrecision; image-rendering:optimizeQuality; fill-rule:evenodd; clip-rule:evenodd">\n <path fill="${W}" d="M46.62 0l156.76 0c25.64,0 46.62,20.98 46.62,46.62l0 156.75c0,25.65 -20.98,46.63 -46.62,46.63l-156.76 0c-25.64,0 -46.62,-20.98 -46.62,-46.63l0 -156.75c0,-25.64 20.98,-46.62 46.62,-46.62zm15.5 135.79l57.92 -57.93c2.73,-2.73 7.19,-2.72 9.92,0.01l57.92 57.92c2.73,2.73 2.73,7.18 0,9.91l-12.18 12.18c-2.73,2.73 -7.18,2.73 -9.92,0l-35.82 -35.83c-2.73,-2.73 -7.19,-2.73 -9.92,0l-35.82 35.83c-2.74,2.73 -7.19,2.73 -9.92,0l-12.18 -12.18c-2.73,-2.73 -2.73,-7.18 0,-9.91z"/>\n </svg>\n`,X=`\n <svg xmlns="${O}" \n width="15" \n height="15" \n viewBox="0 0 250 250"\n style="shape-rendering:geometricPrecision; text-rendering:geometricPrecision; image-rendering:optimizeQuality; fill-rule:evenodd; clip-rule:evenodd">\n <path fill="${J}" d="M46.62 0l156.76 0c25.64,0 46.62,20.98 46.62,46.62l0 156.75c0,25.65 -20.98,46.63 -46.62,46.63l-156.76 0c-25.64,0 -46.62,-20.98 -46.62,-46.63l0 -156.75c0,-25.64 20.98,-46.62 46.62,-46.62zm109.99 181.69l-75.07 0c-7.3,0 -13.23,-5.92 -13.23,-13.22l0 -75.08c0,-2.35 1.92,-4.28 4.28,-4.28l17.9 0c2.35,0 4.27,1.93 4.27,4.28l0 32.81c0,1.77 1.01,3.28 2.64,3.96 1.63,0.67 3.42,0.33 4.66,-0.93l59.68 -59.68c1.67,-1.65 4.38,-1.65 6.05,0l12.66 12.66c1.66,1.67 1.66,4.38 0,6.05l-59.68 59.68c-1.26,1.24 -1.6,3.03 -0.93,4.66 0.68,1.63 2.19,2.64 3.96,2.64l32.81 0c2.35,0 4.28,1.92 4.28,4.28l0 17.9c0,2.36 -1.93,4.28 -4.28,4.28z"/>\n </svg>\n`,G=`\n <svg xmlns="${O}" \n width="15" \n height="15" \n viewBox="0 0 250 250"\n style="shape-rendering:geometricPrecision; text-rendering:geometricPrecision; image-rendering:optimizeQuality; fill-rule:evenodd; clip-rule:evenodd">\n <path fill="${W}" d="M46.62 0l156.76 0c25.64,0 46.62,20.98 46.62,46.62l0 156.75c0,25.65 -20.98,46.63 -46.62,46.63l-156.76 0c-25.64,0 -46.62,-20.98 -46.62,-46.63l0 -156.75c0,-25.64 20.98,-46.62 46.62,-46.62zm46.77 68.31l75.07 0c7.3,0 13.23,5.92 13.23,13.22l0 75.08c0,2.35 -1.92,4.28 -4.28,4.28l-17.9 0c-2.35,0 -4.27,-1.93 -4.27,-4.28l0 -32.81c0,-1.77 -1.01,-3.28 -2.64,-3.96 -1.63,-0.67 -3.42,-0.33 -4.66,0.93l-59.68 59.68c-1.67,1.65 -4.38,1.65 -6.05,0l-12.66 -12.66c-1.66,-1.67 -1.66,-4.38 0,-6.05l59.68 -59.68c1.26,-1.24 1.6,-3.03 0.93,-4.66 -0.68,-1.63 -2.19,-2.64 -3.96,-2.64l-32.81 0c-2.35,0 -4.28,-1.92 -4.28,-4.27l0 -17.9c0,-2.36 1.93,-4.28 4.28,-4.28z"/>\n </svg>\n`,Z=`\n <svg xmlns="${O}" \n width="15" \n height="15" \n viewBox="0 0 250 250"\n style="shape-rendering:geometricPrecision; text-rendering:geometricPrecision; image-rendering:optimizeQuality; fill-rule:evenodd; clip-rule:evenodd">\n <path fill="${J}" d="M46.59 0l156.82 0c25.65,0 46.59,20.94 46.59,46.59l0 156.82c0,25.65 -20.94,46.59 -46.59,46.59l-156.82 0c-25.65,0 -46.59,-20.94 -46.59,-46.59l0 -156.82c0,-25.65 20.94,-46.59 46.59,-46.59zm130.96 87.85c0,6.57 -1.03,12.72 -3.08,18.06 -2.05,5.34 -4.93,9.85 -8.42,13.75 -3.69,3.9 -8,7.39 -13.13,10.47 -4.11,2.46 -8.83,4.93 -13.96,6.98 -1.64,0.82 -2.87,2.46 -2.87,4.51l0 15.19c0,2.67 -2.06,4.72 -4.73,4.72l-25.04 0c-2.66,0 -4.92,-2.05 -4.92,-4.72l0 -25.65c0,-2.26 1.44,-3.9 3.49,-4.52 2.87,-1.02 5.95,-2.05 9.23,-3.28 4.52,-1.85 8.62,-3.9 12.11,-6.57 3.9,-2.67 6.78,-5.75 9.24,-9.24 2.46,-3.49 3.49,-7.59 3.49,-12.31 0,-6.78 -2.05,-11.7 -6.36,-14.78 -4.31,-2.88 -10.06,-4.52 -17.65,-4.52 -5.75,0 -11.7,1.24 -18.07,3.7 -5.33,2.05 -9.85,4.31 -13.13,6.36 -1.03,0.62 -2.26,0.62 -3.29,0 -1.02,-0.62 -1.64,-1.64 -1.64,-2.87l0 -23.2c0,-2.05 1.23,-3.9 3.08,-4.51 4.1,-1.44 9.44,-3.08 15.8,-4.52 8.42,-2.05 17.24,-3.07 26.89,-3.07 8.42,0 16.01,1.02 22.58,3.07 6.36,2.06 12.11,4.72 16.62,8.42 4.52,3.49 7.8,7.8 10.27,12.72 2.26,4.73 3.49,10.06 3.49,15.81l0 0zm-46.19 114.12l-25.04 0c-2.67,0 -4.92,-2.05 -4.92,-4.72l0 -17.24c0,-2.67 2.25,-4.72 4.92,-4.72l25.04 0c2.67,0 4.72,2.05 4.72,4.72l0 17.24c0,2.67 -2.05,4.72 -4.72,4.72z"/>\n </svg>\n`;function ee(e){e.classList.add("shake-effect"),setTimeout((()=>{e.classList.remove("shake-effect")}),500)}const te={smileys:["😀","😃","😄","😆","😁","😅","😂","🤣","🥲","☺️","😊","😇","🙂","🙃","😉","😌","😍","🥰","😙","😚","😗","😘","😋","🥸","😵💫","😛","😝","😜","🤪","😎","🤓","🧐","🤨","🤩","🥳","😏","😒","😞","😔","😟","😕","🙁","☹️","😣","😖","😫","😩","🥺","😢","😭","😤","😠","😡","🤬","🤯","😳","🥵","🥶","😱","😨","😰","😥","😓","🤗","🤔","🤭","🤫","🤥","😶","😐","😑","😬","🙄","😯","😦","😧","😮","😲","🥱","😴","🤤","😪","😵","🤐","🥴","🤢","🤮","🤧","😷","🤒","🤕","🤑","🤠","😈","👿","👹","👺","🤡","💩","👻","💀","☠️","👽","👾","🤖","🎃","😺","😸","😹","😻","😼","😽","🙀","😿","😾","👋","🤚","🖐️","✋","🖖","👌","🤌","🤏","✌️","🤞","🤟","🤘","🤙","👈","👉","👆","🖕","👇","☝️","👍","👎","✊","👊","🤛","🤜","👏","🙌","👐","🤲","🤝","🙏","✍️","💅","🤳","💪","🦾","🦿","🦵","🦶","👂","🦻","👃","🧠","🫀","🫁","🦷","🦴","👀","👁️","👅","👄","👶","🧒","👦","👧","🧑","👱","👨","🧔","👩","🧓","👴","👵","🙍","🙎","🙅","🙆","💁","🙋","🧏","🙇","🤦","🤷","👮","🕵️","💂","🥷","👷","🤴","👸","👳","👲","🧕","🤵","👰","🤰","🤱","👼","🎅","🤶","🦸","🦹","🧙","🧚","🧛","🧜"],nature:["🐵","🐒","🦍","🦧","🐶","🐕","🦮","🐕🦺","🐩","🐺","🦊","🦝","🐱","🐈","🐈⬛","🦁","🐯","🐅","🐆","🐴","🐎","🦄","🦓","🦌","🦬","🐮","🐂","🐃","🐄","🐷","🐖","🐗","🐽","🐏","🐑","🐐","🐪","🐫","🦙","🦒","🐘","🦏","🦛","🐭","🐁","🐀","🐹","🐰","🐇","🦫","🦘","🦡","🐿️","🦔","🦦","🦥","🐼","🦨","🦘","🦡","🦃","🐔","🐓","🐣","🐤","🐥","🐦","🐧","🕊️","🦅","🦆","🦢","🦉","🦤","🪶","🦩","🦚","🦜","🐸","🐊","🐢","🦎","🐍","🐲","🐉","🦕","🦖","🐳","🐋","🐬","🦭","🐟","🐠","🐡","🦈","🐙","🐚","🪸","🐌","🦋","🐛","🐜","🐝","🪲","🐞","🦗","🪳","🕷️","🕸️","🦂","🦟","🪰","🪱","🌸","💮","🏵️","🌹","🥀","🌺","🌻","🌼","🌷","🌱","🪴","🌲","🌳","🌴","🌵","🌾","🌿","☘️","🍀","🍁","🍂","🍃"],food:["🍎","🍐","🍊","🍋","🍌","🍉","🍇","🍓","🫐","🍈","🍒","🍑","🥭","🍍","🥥","🥝","🍅","🍆","🥑","🥦","🥬","🥒","🌶️","🫑","🥕","🧄","🧅","🥔","🍠","🥐","🥯","🍞","🥖","🥨","🧀","🥚","🍳","🥓","🥩","🍗","🍖","🦴","🌭","🍔","🍟","🍕","🫓","🥪","🥙","🧆","🌮","🌯","🫔","🥗","🥘","🫕","🥫","🍝","🍜","🍲","🍛","🍣","🍱","🥟","🦪","🍤","🍙","🍚","🍘","🍥","🥠","🥮","🍢","🍡","🍧","🍨","🍦","🥧","🧁","🍰","🎂","🍮","🍭","🍬","🍫","🍿","🍩","🍪","🫖","☕","🍵","🧃","🥤","🧋","🍶","🍺","🍻","🥂","🍷","🥃","🍸","🍹","🧉","🍾"],activities:["⚽","🏀","🏈","⚾","🥎","🎾","🏐","🏉","🥏","🎱","🪀","🏓","🏸","🏒","🏑","🥍","🏏","⛳","🪁","🎣","🤿","🎽","🛹","🛼","🛷","⛸️","🥌","⛷️","🏂","🪂","🏋️","🤼","🤸","⛹️","🤾","🏌️","🏇","🧘","🏄","🏊","🤽","🚣","🧗","🚴","🚵","🎪","🎭","🎨","🎬","🎤","🎧","🎼","🎹","🥁","🎷","🎺","🎸","🎻","🎲","🎯","🎳","🎮","🎰","🧩","🎪","🎫","🎟️"],travel:["🚗","🚕","🚙","🚌","🚎","🏎️","🚓","🚑","🚒","🚐","🛻","🚚","🚛","🚜","🛵","🏍️","🛺","🚲","🛴","✈️","🛩️","🛫","🛬","🚁","🚀","🛸","🛶","⛵","🚤","🛥️","🛳️","⛴️","🚢","🏰","🏯","🏟️","🏖️","🏝️","🏜️","🌋","⛰️","🏔️","🗻","🏕️","🏭","🏢","🏬","🏣","🏤","🏥","🏦","🏨","🏪","🏫","🏩","💒","⛪","🕌","🕍","🛕","⛩️","🏛️"],objects:["⌚","📱","💻","⌨️","🖥️","🖨️","🖱️","🖲️","🕹️","🗜️","💽","💾","💿","📀","📼","📷","📸","📹","🎥","📞","☎️","📟","📠","📺","📻","🎙️","🎚️","🎛️","📡","🔋","🔌","💡","🔦","🕯️","🧯","🛢️","💸","💵","💴","💶","💷","🪙","💰","💳","💎","⚖️","🪜","🧰","🔧","🔨","⚒️","🛠️","⛏️","✏️","🖊️","🖋️","✒️","🖌️","🖍️","📝","📚","📖","🔖","📑","🗒️","📄","📰","🗞️","📁","📂","🗂️"],symbols:["❤️","🧡","💛","💚","💙","💜","🤎","🖤","🤍","💔","❣️","💕","💞","💓","💗","💖","💘","💝","💟","☮️","✝️","☪️","🕉️","☸️","✡️","🔯","🕎","☯️","☦️","🛐","⛎","⚠️","🚸","⛔","🚫","☢️","☣️","➕","➖","➗","✖️","♾️","💲","💱","⬆️","↗️","➡️","↘️","⬇️","↙️","⬅️","↖️","↕️","↔️","↩️","↪️","⤴️","⤵️","🔃","🔄","🔆","📶","🎦","🔅","♻️","✅","❌","❎","➰","➿","〽️","✳️","✴️","❇️","©️","®️","™️"],flags:["🏁","🚩","🎌","🏴","🏳️","🏳️🌈","🏳️⚧️","🏴☠️","🇺🇸","🇬🇧","🇯🇵","🇰🇷","🇩🇪","🇨🇳","🇧🇷","🇮🇳","🇫🇷","🇪🇸","🇮🇹","🇷🇺","🇨🇦","🇦🇺","🇳🇿","🇲🇽","🇦🇷","🇵🇰","🇪🇬","🇸🇪","🇳🇴","🇳🇱","🇨🇭","🇹🇷","🇮🇩","🇸🇬","🇮🇱","🇵🇹","🇵🇱","🇹🇭"]},ne={"😀":{en:["grinning","face","smile","happy","joy"],ru:["улыбающийся","лицо","улыбка","счастливый","радость"]},"😃":{en:["smiley","face","happy","joy","laugh"],ru:["улыбчивый","лицо","счастливый","радость","смех"]},"😄":{en:["laughing","face","happy","joy","grin"],ru:["смеющийся","лицо","счастливый","радость","ухмылка"]},"😆":{en:["grinning face","laugh"],ru:["улыбка","смех"]},"😁":{en:["beaming","face","grin","smile","happy"],ru:["сияющий","лицо","улыбка","счастье","радость"]},"😅":{en:["sweat","nervous","face","laugh","relief"],ru:["пот","нервный","лицо","смех","облегчение"]},"😂":{en:["tears","joy","face","laugh","happy"],ru:["слёзы","радость","лицо","смех","счастье"]},"🤣":{en:["rolling","floor","laugh","funny","amused"],ru:["катающийся","пол","смех","смешной","развлечённый"]},"🥲":{en:["smiling","tear","bittersweet","nostalgic","happy"],ru:["улыбающийся","слеза","горько-сладкий","ностальгический","счастливый"]},"☺️":{en:["smile","blush","content","peaceful"],ru:["улыбка","румянец","довольный","спокойный"]},"😊":{en:["smiling","happy","blushing","content"],ru:["улыбающийся","счастливый","румянец","довольный"]},"😇":{en:["angel","halo","innocent","saint","pure"],ru:["ангел","ореол","невинный","святой","чистый"]},"🙂":{en:["slight","smile","face","mild"],ru:["слегка","улыбка","лицо","умеренный"]},"🙃":{en:["upside-down","silly","quirky","funny"],ru:["перевернутый","глупый","странный","смешной"]},"😉":{en:["wink","flirt","playful","smile"],ru:["подмигивание","флирт","игривый","улыбка"]},"😌":{en:["relieved","calm","content","satisfied"],ru:["облегчённый","спокойный","довольный","удовлетворённый"]},"😍":{en:["heart","love","smiling","eyes","adore"],ru:["сердце","любовь","улыбающийся","глаза","обожать"]},"🥰":{en:["love","hearts","affection","adoration","cuddle"],ru:["любовь","сердца","нежность","обожание","обниматься"]},"😙":{en:["kiss","love","affection","flirt"],ru:["поцелуй","любовь","нежность","флирт"]},"😗":{en:["kiss","face","smile","affection"],ru:["поцелуй","лицо","улыбка","нежность"]},"😚":{en:["kiss","closed eyes","affection","love"],ru:["поцелуй","закрытые глаза","нежность","любовь"]},"😘":{en:["kiss","love","affection","flirt"],ru:["поцелуй","любовь","нежность","флирт"]},"😋":{en:["yum","delicious","tasty","savor","lick"],ru:["ням","вкусно","аппетитно","наслаждаться","лизать"]},"🥸":{en:["disguise","glasses","funny","sneaky","face"],ru:["маскировка","очки","смешной","хитрый","лицо"]},"😵💫":{en:["dizzy","spiral eyes","confused","hypnotized","disoriented"],ru:["головокружение","спиральные глаза","запутанный","загипнотизированный","дезориентированный"]},"😛":{en:["tongue","playful","cheeky","silly"],ru:["язык","игривый","нахальный","глупый"]},"😝":{en:["tongue","silly","wacky","fun"],ru:["язык","глупый","безумный","весёлый"]},"😜":{en:["tongue","wink","playful","fun"],ru:["язык","подмигивание","игривый","весёлый"]},"🤪":{en:["crazy","wacky","zany","quirky"],ru:["сумасшедший","безумный","чудаковатый","странный"]},"😎":{en:["cool","sunglasses","confident","chill"],ru:["крутой","очки","уверенный","расслабленный"]},"🤓":{en:["nerd","geek","glasses","studious"],ru:["ботан","задрот","очки","учёный"]},"🧐":{en:["monocle","investigative","curious","thoughtful"],ru:["одноглазый","расследовательский","любопытный","задумчивый"]},"🤨":{en:["skeptical","doubtful","uncertain","raised eyebrow"],ru:["скептический","сомневающийся","неуверенный","поднятая бровь"]},"🤩":{en:["starstruck","amazed","excited","admire"],ru:["восхищённый","поражённый","взволнованный","обожать"]},"🥳":{en:["party","celebrate","birthday","festive"],ru:["вечеринка","праздновать","день рождения","праздничный"]},"😏":{en:["smirk","sly","mischievous","confident"],ru:["ухмылка","хитрый","озорной","уверенный"]},"😒":{en:["unamused","displeased","bored","sigh"],ru:["неудовлетворённый","недовольный","скучный","вздох"]},"😞":{en:["disappointed","sad","down","somber"],ru:["разочарованный","грустный","унылый","мрачный"]},"😔":{en:["pensive","sad","reflective","mournful"],ru:["задумчивый","грустный","рефлексивный","скорбный"]},"😟":{en:["worried","concerned","anxious","upset"],ru:["обеспокоенный","тревожный","беспокойный","расстроенный"]},"😕":{en:["confused","perplexed","uncertain","baffled"],ru:["смущённый","озадаченный","неуверенный","в замешательстве"]},"🙁":{en:["frowning","sad","disappointed","downcast"],ru:["хмурый","грустный","разочарованный","угнетённый"]},"☹️":{en:["frowning","sad","unhappy","mournful"],ru:["хмурый","грустный","несчастный","скорбный"]},"😣":{en:["strained","persevering","tired","discomfort"],ru:["напряжённый","терпеливый","уставший","дискомфорт"]},"😖":{en:["confounded","annoyed","distressed","exasperated"],ru:["озадаченный","раздражённый","огорчённый","изнурённый"]},"😫":{en:["tired","exhausted","weary","worn out"],ru:["усталый","измученный","изнурённый","измотанный"]},"😩":{en:["weary","tired","exhausted","overwhelmed"],ru:["изнурённый","уставший","измученный","перегруженный"]},"🥺":{en:["pleading","begging","cute","vulnerable"],ru:["умоляющий","просьба","милый","уязвимый"]},"😢":{en:["cry","sad","tear","sorrow"],ru:["плакать","грустный","слеза","печаль"]},"😭":{en:["crying","tearful","sad","heartbroken"],ru:["плачущий","со слезами","грустный","с разбитым сердцем"]},"😤":{en:["triumphant","exasperated","proud","angry"],ru:["триумфальный","раздражённый","гордый","сердитый"]},"😠":{en:["angry","mad","annoyed","irate"],ru:["сердитый","злой","раздражённый","яростный"]},"😡":{en:["pouting","mad","furious","irate"],ru:["надувшийся","злой","яростный","взбешённый"]},"🤬":{en:["cursing","swearing","angry","foul language"],ru:["ругательства","мат","сердитый","неприличный"]},"🤯":{en:["mind blown","shocked","amazed","stunned"],ru:["взрыв мозга","шокированный","поражённый","ошеломлённый"]},"😳":{en:["flushed","embarrassed","shocked","awkward"],ru:["покрасневший","смущённый","шокированный","неловкий"]},"🥵":{en:["hot","overheated","sweaty","exhausted"],ru:["горячий","перегретый","потный","изнурённый"]},"🥶":{en:["cold","freezing","chilly","frozen"],ru:["холодный","замерзающий","прохладный","замороженный"]},"😱":{en:["screaming","horror","shock","fear"],ru:["кричащий","ужас","шок","страх"]},"😨":{en:["fearful","scared","anxious","nervous"],ru:["боязливый","испуганный","тревожный","нервный"]},"😰":{en:["anxious","nervous","sweating","scared"],ru:["тревожный","нервный","потеющий","испуганный"]},"😥":{en:["disappointed","sad","pensive","teary"],ru:["разочарованный","грустный","задумчивый","со слезами"]},"😓":{en:["cold sweat","nervous","anxious","tired"],ru:["холодный пот","нервный","тревожный","усталый"]},"🤗":{en:["hug","embrace","caring","love"],ru:["объятие","принимать","заботливый","любовь"]},"🤔":{en:["thinking","pondering","curious","confused"],ru:["думающий","размышляющий","любопытный","смущённый"]},"🤭":{en:["guilty","shy","embarrassed","oops"],ru:["виноватый","застенчивый","смущённый","упс"]},"🤫":{en:["quiet","secret","hush","shh"],ru:["тихий","секрет","тишина","ш-ш"]},"🤥":{en:["lying","fib","deceitful","dishonest"],ru:["врущий","ложь","обманчивый","нечестный"]},"😶":{en:["speechless","mute","quiet","blank"],ru:["безмолвный","немой","тихий","пустой"]},"😐":{en:["neutral","expressionless","indifferent","flat"],ru:["нейтральный","без выражения","безразличный","плоский"]},"😑":{en:["deadpan","expressionless","blank","unemotional"],ru:["без эмоций","без выражения","пустой","неэмоциональный"]},"😬":{en:["grimace","awkward","nervous","tense"],ru:["гримаса","неловко","нервный","напряжённый"]},"🙄":{en:["eye roll","sarcastic","disdain","bored"],ru:["закатывание глаз","саркастичный","пренебрежительный","скучный"]},"😯":{en:["hushed","surprised","shocked","amazed"],ru:["тихий","удивлённый","шокированный","поражённый"]},"😦":{en:["frowning","dismayed","shocked","surprised"],ru:["хмурый","огорчённый","шокированный","удивлённый"]},"😧":{en:["astonished","stunned","surprised","speechless"],ru:["изумлённый","ошеломлённый","удивлённый","безмолвный"]},"😮":{en:["open mouth","surprised","shocked","amazed"],ru:["открытый рот","удивлённый","шокированный","поражённый"]},"😲":{en:["astonished","stunned","shocked","in awe"],ru:["изумлённый","ошеломлённый","шокированный","в благоговении"]},"🥱":{en:["yawning","sleepy","tired","bored"],ru:["зевота","сонный","усталый","скучный"]},"😴":{en:["sleeping","tired","napping","dozing"],ru:["спящий","усталый","дремлющий","засыпающий"]},"🤤":{en:["drooling","desire","craving","hungry"],ru:["слюнявый","желание","тяга","голодный"]},"😪":{en:["sleepy","drowsy","tired","nodding"],ru:["сонный","вялый","усталый","кивающий"]},"😵":{en:["dizzy","knocked out","stunned","confused"],ru:["головокружительный","вырубленный","ошеломлённый","сбитый с толку"]},"🤐":{en:["zipper-mouth","secretive","quiet","mute"],ru:["закрытый рот","секретный","тихий","немой"]},"🥴":{en:["woozy","tipsy","dizzy","unsteady"],ru:["ошеломлённый","подошедший","головокружительный","неустойчивый"]},"🤢":{en:["nauseated","sick","disgusted","vomit"],ru:["тошнотворный","больной","отвратительный","рвота"]},"🤮":{en:["vomiting","nauseous","sick","disgust"],ru:["рвота","тошнотворный","больной","отвратительный"]},"🤧":{en:["sneezing","ill","sick","allergy"],ru:["чихание","болен","больной","аллергия"]},"😷":{en:["mask","sick","ill","health"],ru:["маска","больной","нездоровый","здоровье"]},"🤒":{en:["fever","sick","ill","unwell"],ru:["лихорадка","больной","нездоровый","неважно"]},"🤕":{en:["injured","hurt","bandaged","pain"],ru:["раненый","повреждённый","забинтованный","боль"]},"🤑":{en:["money","rich","greedy","cash"],ru:["деньги","богатый","жадный","наличные"]},"🤠":{en:["cowboy","hat","western","fun"],ru:["ковбой","шляпа","вестерн","веселье"]},"😈":{en:["devil","mischievous","naughty","sinister"],ru:["дьявол","озорной","непослушный","зловещий"]},"👿":{en:["angry","devil","evil","fiendish"],ru:["сердитый","дьявол","злой","зловещий"]},"👹":{en:["ogre","demon","monster","scary"],ru:["огр","демон","монстр","страшный"]},"👺":{en:["goblin","troll","spooky","creepy"],ru:["гоблин","тролль","жуткий","страшный"]},"🤡":{en:["clown","silly","funny","circus"],ru:["клоун","глупый","смешной","цирк"]},"💩":{en:["poop","crap","feces","funny"],ru:["какашка","дерьмо","фекалии","смешной"]},"👻":{en:["ghost","spirit","haunted","scary"],ru:["призрак","дух","обитающий","страшный"]},"💀":{en:["skull","death","creepy","spooky"],ru:["череп","смерть","жуткий","страшный"]},"☠️":{en:["skull","danger","death","poison"],ru:["череп","опасность","смерть","яд"]},"👽":{en:["alien","extraterrestrial","space","ufo"],ru:["инопланетянин","внеземной","космос","НЛО"]},"👾":{en:["alien","monster","video game","retro"],ru:["инопланетянин","монстр","видеоигра","ретро"]},"🤖":{en:["robot","machine","tech","android"],ru:["робот","машина","технология","андроид"]},"🎃":{en:["pumpkin","halloween","spooky","festive"],ru:["тыква","Хэллоуин","жуткий","праздничный"]},"😺":{en:["smiling","cat","happy","playful"],ru:["улыбающийся","кот","счастливый","игривый"]},"😸":{en:["grinning","cat","joyful","cheerful"],ru:["широко улыбающийся","кот","радостный","весёлый"]},"😹":{en:["tearful","joy","cat","laughing"],ru:["со слезами","радость","кот","смеющийся"]},"😻":{en:["heart","cat","love","adorable"],ru:["сердце","кот","любовь","милый"]},"😼":{en:["smirking","cat","mischievous","sly"],ru:["ухмыляющийся","кот","озорной","хитрый"]},"😽":{en:["kissing","cat","affection","cute"],ru:["целующий","кот","нежность","милый"]},"🙀":{en:["surprised","cat","scared","shocked"],ru:["испуганный","кот","испуганный","шокированный"]},"😿":{en:["crying","cat","sad","tearful"],ru:["плачущий","кот","грустный","со слезами"]},"😾":{en:["angry","cat","annoyed","displeased"],ru:["сердитый","кот","раздражённый","недовольный"]},"👋":{en:["wave","hello","goodbye","greeting"],ru:["махание","привет","прощание","приветствие"]},"🤚":{en:["raised hand","stop","palm"],ru:["поднятая рука","стой","ладонь"]},"🖐️":{en:["hand","high five","greeting"],ru:["рука","дай пять","приветствие"]},"✋":{en:["stop","palm","high five"],ru:["стой","ладонь","дай пять"]},"🖖":{en:["vulcan salute","live long","sci-fi"],ru:["салют Вулканцев","живи долго","научная фантастика"]},"👌":{en:["okay","perfect","good"],ru:["ок","идеально","хорошо"]},"🤌":{en:["pinched","precise","delicious"],ru:["сжатый","точный","вкусный"]},"🤏":{en:["small","tiny","minuscule"],ru:["маленький","крошечный","микроскопический"]},"✌️":{en:["peace","victory","v sign"],ru:["мир","победа","знак победы"]},"🤞":{en:["fingers crossed","hope","luck"],ru:["скрещенные пальцы","надежда","удача"]},"🤟":{en:["I love you","rock on","sign language"],ru:["я тебя люблю","рок он","язык жестов"]},"🤘":{en:["rock","metal","horns"],ru:["рок","металл","рога"]},"🤙":{en:["call me","hang loose","shaka"],ru:["позвони мне","расслабься","шак"]},"👈":{en:["point left","direction","arrow"],ru:["указание влево","направление","стрелка"]},"👉":{en:["point right","direction","arrow"],ru:["указание вправо","направление","стрелка"]},"👆":{en:["point up","direction","up"],ru:["указание вверх","направление","вверх"]},"🖕":{en:["middle finger","offensive","rude"],ru:["средний палец","оскорбительный","грубый"]},"👇":{en:["point down","direction","down"],ru:["указание вниз","направление","вниз"]},"☝️":{en:["point up","number one","important"],ru:["указание вверх","номер один","важный"]},"👍":{en:["thumbs up","good","approve"],ru:["палец вверх","хорошо","одобрить"]},"👎":{en:["thumbs down","bad","disapprove"],ru:["палец вниз","плохо","не одобрять"]},"✊":{en:["fist","power","solidarity"],ru:["кулак","сила","солидарность"]},"👊":{en:["punch","fist bump","hit"],ru:["удар","кулачок","ударить"]},"🤛":{en:["left fist","punch","strike"],ru:["левая рука","удар","нанести удар"]},"🤜":{en:["right fist","punch","strike"],ru:["правая рука","удар","нанести удар"]},"👏":{en:["clap","applause","bravo"],ru:["хлопки","аплодисменты","браво"]},"🙌":{en:["celebrate","praise","hooray"],ru:["торжествовать","хвалить","ура"]},"👐":{en:["open hands","embrace","welcome"],ru:["раскрытые руки","объятие","добро пожаловать"]},"🤲":{en:["palms","offering","receive"],ru:["ладони","предложение","получать"]},"🤝":{en:["handshake","agreement","cooperation"],ru:["рукопожатие","соглашение","сотрудничество"]},"🙏":{en:["pray","thanks","please"],ru:["молиться","спасибо","пожалуйста"]},"✍️":{en:["writing","pen","signature"],ru:["письмо","ручка","подпись"]},"💅":{en:["nail polish","beauty","manicure"],ru:["лак для ногтей","красота","маникюр"]},"🤳":{en:["selfie","photo","camera"],ru:["селфи","фото","камера"]},"💪":{en:["flex","strong","muscle"],ru:["сгибать","сильный","мышцы"]},"🦾":{en:["mechanical arm","robotic","cyborg"],ru:["механическая рука","роботизированный","киборг"]},"🦿":{en:["mechanical leg","prosthetic","robotic"],ru:["механическая нога","протез","роботизированный"]},"🦵":{en:["leg","limb","lower body"],ru:["нога","конечность","нижняя часть тела"]},"🦶":{en:["foot","toes","step"],ru:["нога","пальцы ноги","шаг"]},"👂":{en:["ear","listening","sound"],ru:["ухо","слушание","звук"]},"🦻":{en:["hearing aid","listening","assistive"],ru:["слуховой аппарат","слушание","помощь"]},"👃":{en:["nose","smell","scent"],ru:["нос","запах","аромат"]},"🧠":{en:["brain","intelligence","mind"],ru:["мозг","интеллект","ум"]},"🫀":{en:["heart (organ)","anatomy","biology"],ru:["сердце (орган)","анатомия","биология"]},"🫁":{en:["lungs","breath","organ"],ru:["легкие","дыхание","орган"]},"🦷":{en:["tooth","dental","smile"],ru:["зуб","стоматология","улыбка"]},"🦴":{en:["bone","skeleton","hard"],ru:["кость","скелет","твердый"]},"👀":{en:["eyes","look","see"],ru:["глаза","смотреть","видеть"]},"👁️":{en:["eye","vision","watch"],ru:["глаз","зрение","наблюдать"]},"👅":{en:["tongue","taste","lick"],ru:["язык","вкус","лизать"]},"👄":{en:["lips","kiss","mouth"],ru:["губы","поцелуй","рот"]},"👶":{en:["baby","infant","cute"],ru:["младенец","ребенок","милый"]},"🧒":{en:["child","kid","youth"],ru:["ребенок","малыш","юный"]},"👦":{en:["boy","child","kid"],ru:["мальчик","ребенок","малыш"]},"👧":{en:["girl","child","kid"],ru:["девочка","ребенок","малышка"]},"🧑":{en:["person","human","individual"],ru:["человек","личность","индивид"]},"👱":{en:["blonde","person","light hair"],ru:["блондин","человек","светлые волосы"]},"👨":{en:["man","male","guy"],ru:["мужчина","мужской","парень"]},"🧔":{en:["bearded","man","facial hair"],ru:["бородатый","мужчина","борода"]},"👩":{en:["woman","female","lady"],ru:["женщина","женский","дама"]},"🧓":{en:["elderly","senior","aged"],ru:["пожилой","старший","в преклонном возрасте"]},"👴":{en:["old man","elderly","senior"],ru:["старик","пожилой","старший"]},"👵":{en:["old woman","elderly","senior"],ru:["старуха","пожилая","старшая"]},"🙍":{en:["frowning","sad","displeased"],ru:["хмурый","грустный","недовольный"]},"🙎":{en:["pouting","angry","displeased"],ru:["надувшийся","сердитый","недовольный"]},"🙅":{en:["no","prohibited","refusal"],ru:["нет","запрещено","отказ"]},"🙆":{en:["ok","acceptable","okay"],ru:["ок","приемлемо","хорошо"]},"💁":{en:["information","help","assistance"],ru:["информация","помощь","поддержка"]},"🙋":{en:["raising hand","question","volunteer"],ru:["поднимающая руку","вопрос","доброволец"]},"🧏":{en:["deaf","listening","silent"],ru:["глухой","слушающий","безмолвный"]},"🙇":{en:["bowing","apologetic","respect"],ru:["наклон","извиняющийся","уважение"]},"🤦":{en:["facepalm","disbelief","oops"],ru:["лицо ладонь","недоверие","упс"]},"🤷":{en:["shrug","uncertain","indifferent"],ru:["пожимание плечами","неуверенный","безразличный"]},"👮":{en:["police","officer","law"],ru:["полицейский","офицер","закон"]},"🕵️":{en:["detective","spy","investigate"],ru:["детектив","шпион","расследование"]},"💂":{en:["guard","soldier","military"],ru:["страж","солдат","военный"]},"🥷":{en:["ninja","stealth","assassin"],ru:["ниндзя","скрытность","ассассин"]},"👷":{en:["construction","worker","helmet"],ru:["строитель","рабочий","шлем"]},"🤴":{en:["prince","royalty","king"],ru:["принц","королевская семья","король"]},"👸":{en:["princess","royalty","queen"],ru:["принцесса","королевская семья","королева"]},"👳":{en:["turban","cultural","tradition"],ru:["тюрбан","культура","традиция"]},"👲":{en:["man with cap","cultural","traditional"],ru:["мужчина в кепке","культура","традиционный"]},"🧕":{en:["woman with headscarf","cultural","modest"],ru:["женщина в платке","культурная","скромная"]},"🤵":{en:["tuxedo","groom","formal"],ru:["смокинг","жених","официальный"]},"👰":{en:["bride","wedding","formal"],ru:["невеста","свадьба","официальный"]},"🤰":{en:["pregnant","expecting","mother"],ru:["беременная","ожидающая","мать"]},"🤱":{en:["nursing","mother","baby"],ru:["кормящая","мать","ребенок"]},"👼":{en:["angel","cherub","divine"],ru:["ангел","херувим","божественный"]},"🎅":{en:["santa","christmas","jolly"],ru:["Санта","Рождество","радостный"]},"🤶":{en:["mrs claus","christmas","holiday"],ru:["миссис Клаус","Рождество","праздник"]},"🦸":{en:["superhero","power","hero"],ru:["супергерой","сила","герой"]},"🦹":{en:["villain","bad","criminal"],ru:["злодей","плохой","преступник"]},"🧙":{en:["wizard","magic","sorcery"],ru:["волшебник","магия","колдовство"]},"🧚":{en:["fairy","magic","mystical"],ru:["фея","магия","мистический"]},"🧛":{en:["vampire","dracula","undead"],ru:["вампир","Дракула","нежить"]},"🧜":{en:["mermaid","mythical","ocean"],ru:["русалка","мифическая","океан"]},"🐵":{en:["monkey","ape","funny","mammal"],ru:["обезьяна","примат","смешной","млекопитающее"]},"🐒":{en:["monkey","primate","curious"],ru:["обезьяна","примат","любопытный"]},"🦍":{en:["gorilla","ape","strong","wild"],ru:["горилла","обезьяна","сильный","дикий"]},"🦧":{en:["orangutan","ape","wild","mammal"],ru:["орангутан","обезьяна","дикий","млекопитающее"]},"🐶":{en:["dog","puppy","pet","mammal"],ru:["собака","щенок","домашний питомец","млекопитающее"]},"🐕":{en:["dog","canine","pet"],ru:["собака","псовой","домашний питомец"]},"🦮":{en:["guide dog","service","assistance"],ru:["собака-поводырь","служебная","помощь"]},"🐕🦺":{en:["service dog","working","assistance"],ru:["служебная собака","рабочая","помощь"]},"🐩":{en:["poodle","dog","pet","fancy"],ru:["пудель","собака","домашний питомец","элегантный"]},"🐺":{en:["wolf","wild","howl"],ru:["волк","дикий","воет"]},"🦊":{en:["fox","cunning","wild"],ru:["лиса","хитрая","дикая"]},"🦝":{en:["raccoon","mischievous","wild"],ru:["енот","озорной","дикий"]},"🐱":{en:["cat","pet","feline"],ru:["кот","домашний питомец","кошачий"]},"🐈":{en:["cat","feline","pet"],ru:["кот","кошачий","домашний питомец"]},"🐈⬛":{en:["black cat","mysterious","feline"],ru:["чёрный кот","загадочный","кошачий"]},"🦁":{en:["lion","king","wild","courage"],ru:["лев","король","дикий","отвага"]},"🐯":{en:["tiger","wild","stripes","fierce"],ru:["тигр","дикий","полосатый","свирепый"]},"🐅":{en:["tiger","stripes","wild"],ru:["тигр","полосатый","дикий"]},"🐆":{en:["leopard","spots","wild","fast"],ru:["леопард","пятна","дикий","быстрый"]},"🐴":{en:["horse","ride","equine"],ru:["лошадь","езда","конный"]},"🐎":{en:["horse","racing","equine"],ru:["лошадь","гонки","конный"]},"🦄":{en:["unicorn","magical","fantasy"],ru:["единорог","волшебный","фэнтези"]},"🦓":{en:["zebra","stripes","wild"],ru:["зебра","полосатая","дикая"]},"🦌":{en:["deer","antlers","forest"],ru:["олень","рога","лес"]},"🦬":{en:["bison","buffalo","wild"],ru:["бизон","буйвол","дикий"]},"🐮":{en:["cow","farm","bovine"],ru:["корова","ферма","коровий"]},"🐂":{en:["ox","bull","bovine"],ru:["вол","бык","коровий"]},"🐃":{en:["water buffalo","bovine","farm"],ru:["водный буйвол","коровий","ферма"]},"🐄":{en:["cow","bovine","farm"],ru:["корова","коровий","ферма"]},"🐷":{en:["pig","farm","oink"],ru:["свинья","ферма","хрюк"]},"🐖":{en:["pig","swine","farm"],ru:["свинья","свинное животное","ферма"]},"🐗":{en:["boar","wild","pig"],ru:["кабан","дикий","свинья"]},"🐽":{en:["pig nose","snout"],ru:["свинной нос","хоботок"]},"🐏":{en:["ram","sheep","male"],ru:["баран","овца","самец"]},"🐑":{en:["sheep","wool","farm"],ru:["овца","шерсть","ферма"]},"🐐":{en:["goat","farm","bleat"],ru:["коза","ферма","блеет"]},"🐪":{en:["camel","desert","hump"],ru:["верблюд","пустыня","горб"]},"🐫":{en:["camel","two-hump","desert"],ru:["двугорбый верблюд","двугорбый","пустыня"]},"🦙":{en:["llama","alpaca","cute"],ru:["лама","альпака","милый"]},"🦒":{en:["giraffe","tall","spots"],ru:["жираф","высокий","пятна"]},"🐘":{en:["elephant","trunk","large"],ru:["слон","хобот","большой"]},"🦏":{en:["rhinoceros","horn","tough"],ru:["носорог","рог","жесткий"]},"🦛":{en:["hippopotamus","water","large"],ru:["бегемот","вода","большой"]},"🦃":{en:["turkey","bird","thanksgiving"],ru:["индейка","птица","День благодарения"]},"🐔":{en:["chicken","rooster","hen"],ru:["курица","петух","курица (самка)"]},"🐓":{en:["rooster","chicken","bird"],ru:["петух","курица","птица"]},"🐣":{en:["hatching chick","baby","bird"],ru:["вылупляющийся цыплёнок","малыш","птица"]},"🐤":{en:["chick","small","bird"],ru:["цыплёнок","маленький","птица"]},"🐥":{en:["baby chicken","cute","bird"],ru:["цыплёнок","милый","птица"]},"🐦":{en:["bird","tweet","wing"],ru:["птица","чирик","крыло"]},"🐧":{en:["penguin","cold","bird"],ru:["пингвин","холодный","птица"]},"🕊️":{en:["dove","peace","bird"],ru:["голубь","мир","птица"]},"🦅":{en:["eagle","wild","bird"],ru:["орёл","дикий","птица"]},"🦆":{en:["duck","water","bird"],ru:["утка","вода","птица"]},"🦢":{en:["swan","graceful","bird"],ru:["лебедь","грациозный","птица"]},"🦉":{en:["owl","wise","night","bird"],ru:["сова","мудрая","ночная","птица"]},"🦤":{en:["dodo","extinct","bird"],ru:["додо","вымершая","птица"]},"🪶":{en:["feather","light","bird"],ru:["перо","лёгкое","птица"]},"🦩":{en:["flamingo","pink","bird"],ru:["фламинго","розовый","птица"]},"🦚":{en:["peacock","colorful","bird"],ru:["павлин","яркий","птица"]},"🦜":{en:["parrot","talkative","colorful"],ru:["попугай","болтливый","яркий"]},"🐸":{en:["frog","amphibian","green"],ru:["лягушка","амфибия","зелёная"]},"🐊":{en:["crocodile","reptile","danger"],ru:["крокодил","рептилия","опасность"]},"🐢":{en:["turtle","slow","reptile"],ru:["черепаха","медленная","рептилия"]},"🦎":{en:["lizard","reptile","scaly"],ru:["ящерица","рептилия","чешуйчатая"]},"🐍":{en:["snake","reptile","slither"],ru:["змея","рептилия","ползать"]},"🐲":{en:["dragon face","mythical","dragon"],ru:["лицо дракона","мифический","дракон"]},"🐉":{en:["dragon","mythical","fire"],ru:["дракон","мифический","огонь"]},"🦕":{en:["dinosaur","sauropod","prehistoric"],ru:["динозавр","зауропод","доисторический"]},"🦖":{en:["dinosaur","T-Rex","prehistoric"],ru:["динозавр","Ти-Рекс","доисторический"]},"🐳":{en:["whale","ocean","large"],ru:["кит","океан","большой"]},"🐋":{en:["whale","ocean","big"],ru:["кит","океан","огромный"]},"🐬":{en:["dolphin","ocean","friendly"],ru:["дельфин","океан","дружелюбный"]},"🦭":{en:["seal","marine","cute"],ru:["тюлень","морской","милый"]},"🐟":{en:["fish","ocean","swim"],ru:["рыба","океан","плавать"]},"🐠":{en:["tropical fish","ocean","colorful"],ru:["тропическая рыба","океан","яркая"]},"🐡":{en:["blowfish","puffer","ocean"],ru:["рыба-иглобрюх","фугу","океан"]},"🦈":{en:["shark","ocean","dangerous"],ru:["акула","океан","опасная"]},"🐙":{en:["octopus","marine","tentacles"],ru:["осьминог","морской","щупальца"]},"🐚":{en:["shell","beach","ocean"],ru:["ракушка","пляж","океан"]},"🪸":{en:["coral","reef","ocean"],ru:["коралл","риф","океан"]},"🐌":{en:["snail","slow","mollusk"],ru:["улитка","медленная","моллюск"]},"🦋":{en:["butterfly","insect","colorful"],ru:["бабочка","насекомое","яркая"]},"🐛":{en:["caterpillar","insect","larva"],ru:["гусеница","насекомое","личинка"]},"🐜":{en:["ant","small","insect"],ru:["муравей","маленький","насекомое"]},"🐝":{en:["bee","insect","honey"],ru:["пчела","насекомое","мёд"]},"🪲":{en:["beetle","insect","bug"],ru:["жук","насекомое","баг"]},"🐞":{en:["ladybug","insect","lucky"],ru:["божья коровка","насекомое","счастливая"]},"🦗":{en:["cricket","insect","chirp"],ru:["сверчок","насекомое","щебет"]},"🪳":{en:["cockroach","insect","pest"],ru:["таракан","насекомое","вредитель"]},"🕷️":{en:["spider","arachnid","insect"],ru:["паук","паукообразное","насекомое"]},"🕸️":{en:["web","spider","trap"],ru:["паутина","паук","ловушка"]},"🦂":{en:["scorpion","insect","venom"],ru:["скорпион","насекомое","яд"]},"🦟":{en:["mosquito","insect","bite"],ru:["комар","насекомое","укус"]},"🪰":{en:["fly","insect","buzz"],ru:["муха","насекомое","жужжание"]},"🪱":{en:["worm","earth","invertebrate"],ru:["червь","земля","беспозвоночное"]},"🌸":{en:["cherry blossom","flower","spring"],ru:["сакура","цветок","весна"]},"💮":{en:["white flower","flower","symbol"],ru:["белый цветок","цветок","символ"]},"🏵️":{en:["rosette","flower","decorative"],ru:["розетка","цветок","декоративный"]},"🌹":{en:["rose","flower","love","romance"],ru:["роза","цветок","любовь","романтика"]},"🥀":{en:["wilted flower","sad","decay"],ru:["увядший цветок","грусть","разложение"]},"🌺":{en:["hibiscus","flower","tropical"],ru:["гибискус","цветок","тропический"]},"🌻":{en:["sunflower","flower","summer"],ru:["подсолнух","цветок","лето"]},"🌼":{en:["blossom","flower","spring"],ru:["цветение","цветок","весна"]},"🌷":{en:["tulip","flower","spring"],ru:["тюльпан","цветок","весна"]},"🌱":{en:["seedling","plant","growth"],ru:["сеянец","растение","рост"]},"🪴":{en:["potted plant","indoor","green"],ru:["растение в горшке","в помещении","зелёное"]},"🌲":{en:["evergreen","tree","forest"],ru:["вечнозелёное","дерево","лес"]},"🌳":{en:["tree","nature","shade"],ru:["дерево","природа","тень"]},"🌴":{en:["palm tree","tropical","beach"],ru:["пальма","тропический","пляж"]},"🌵":{en:["cactus","desert","succulent"],ru:["кактус","пустыня","суккулент"]},"🌾":{en:["sheaf","grain","farm"],ru:["сноп","зерно","ферма"]},"🌿":{en:["herb","plant","leaf"],ru:["трава","растение","лист"]},"☘️":{en:["shamrock","luck","clover"],ru:["клевер","удача","трилистник"]},"🍀":{en:["four-leaf clover","luck","green"],ru:["клевер с четырьмя листьями","удача","зелёный"]},"🍁":{en:["maple leaf","autumn","fall"],ru:["кленовый лист","осень","осенний"]},"🍂":{en:["fallen leaf","autumn","nature"],ru:["опавший лист","осень","природа"]},"🍃":{en:["leaf","wind","nature"],ru:["лист","ветер","природа"]},"🍎":{en:["apple","red","fruit","healthy"],ru:["яблоко","красное","фрукт","полезное"]},"🍐":{en:["pear","fruit","green","juicy"],ru:["груша","фрукт","зелёная","сочная"]},"🍊":{en:["orange","fruit","citrus","vitamin C"],ru:["апельсин","фрукт","цитрус","витамин C"]},"🍋":{en:["lemon","citrus","sour","yellow"],ru:["лимон","цитрус","кислый","жёлтый"]},"🍌":{en:["banana","fruit","yellow","tropical"],ru:["банан","фрукт","жёлтый","тропический"]},"🍉":{en:["watermelon","fruit","summer","refreshing"],ru:["арбуз","фрукт","лето","освежающий"]},"🍇":{en:["grapes","fruit","purple","vine"],ru:["виноград","фрукт","фиолетовый","виноградная лоза"]},"🍓":{en:["strawberry","fruit","red","sweet"],ru:["клубника","фрукт","красная","сладкая"]},"🫐":{en:["blueberry","fruit","blue","healthy"],ru:["черника","фрукт","синяя","полезная"]},"🍈":{en:["melon","fruit","sweet","green"],ru:["дыня","фрукт","сладкая","зелёная"]},"🍒":{en:["cherry","fruit","red","sweet"],ru:["вишня","фрукт","красная","сладкая"]},"🍑":{en:["peach","fruit","fuzzy","sweet"],ru:["персик","фрукт","шероховатый","сладкий"]},"🥭":{en:["mango","fruit","tropical","yellow"],ru:["манго","фрукт","тропический","жёлтый"]},"🍍":{en:["pineapple","fruit","tropical","spiky"],ru:["ананас","фрукт","тропический","колючий"]},"🥥":{en:["coconut","tropical","fruit","white"],ru:["кокос","тропический","фрукт","белый"]},"🥝":{en:["kiwi","fruit","green","tart"],ru:["киви","фрукт","зелёный","кисловатый"]},"🍅":{en:["tomato","vegetable","red","juicy"],ru:["помидор","овощ","красный","сочный"]},"🍆":{en:["eggplant","vegetable","purple","aubergine"],ru:["баклажан","овощ","фиолетовый","баклажан"]},"🥑":{en:["avocado","vegetable","green","healthy"],ru:["авокадо","овощ","зелёный","полезный"]},"🥦":{en:["broccoli","vegetable","green","healthy"],ru:["брокколи","овощ","зелёный","полезный"]},"🥬":{en:["leafy greens","vegetable","lettuce","healthy"],ru:["листья салата","овощ","салат","полезный"]},"🥒":{en:["cucumber","vegetable","green","fresh"],ru:["огурец","овощ","зелёный","свежий"]},"🌶️":{en:["chili pepper","spicy","red","hot"],ru:["чили","острый","красный","горячий"]},"🫑":{en:["bell pepper","vegetable","colorful","sweet"],ru:["болгарский перец","овощ","разноцветный","сладкий"]},"🥕":{en:["carrot","vegetable","orange","crunchy"],ru:["морковь","овощ","оранжевая","хрустящая"]},"🧄":{en:["garlic","vegetable","aromatic","flavorful"],ru:["чеснок","овощ","ароматный","вкусный"]},"🧅":{en:["onion","vegetable","strong","flavor"],ru:["лук","овощ","сильный","вкус"]},"🥔":{en:["potato","vegetable","starchy","brown"],ru:["картофель","овощ","крахмалистый","коричневый"]},"🍠":{en:["sweet potato","vegetable","orange","starchy"],ru:["батат","овощ","оранжевый","крахмалистый"]},"🥐":{en:["croissant","bread","pastry","flaky"],ru:["круассан","хлеб","выпечка","слоёный"]},"🥯":{en:["bagel","bread","round","chewy"],ru:["бейгл","хлеб","круглый","жевательный"]},"🍞":{en:["bread","baked","loaf","toast"],ru:["хлеб","выпеченный","буханка","тост"]},"🥖":{en:["baguette","bread","French","long"],ru:["багет","хлеб","французский","длинный"]},"🥨":{en:["pretzel","snack","salted","twisted"],ru:["претцель","закуска","солёный","скрученный"]},"🧀":{en:["cheese","dairy","yellow","savory"],ru:["сыр","молочный продукт","жёлтый","пикантный"]},"🥚":{en:["egg","protein","breakfast"],ru:["яйцо","белок","завтрак"]},"🍳":{en:["fried egg","breakfast","cooked"],ru:["жареное яйцо","завтрак","приготовленное"]},"🥓":{en:["bacon","meat","crispy","breakfast"],ru:["бекон","мясо","хрустящий","завтрак"]},"🥩":{en:["steak","meat","protein","beef"],ru:["стейк","мясо","белок","говядина"]},"🍗":{en:["chicken leg","meat","drumstick","grilled"],ru:["куриная ножка","мясо","барабанная палочка","гриль"]},"🍖":{en:["meat on bone","barbecue","protein"],ru:["мясо на кости","барбекю","белок"]},"🦴":{en:["bone","meat","dog","skeleton"],ru:["кость","мясо","собака","скелет"]},"🌭":{en:["hot dog","fast food","sausage"],ru:["хот-дог","фастфуд","колбаска"]},"🍔":{en:["burger","fast food","beef","cheese"],ru:["бургер","фастфуд","говядина","сыр"]},"🍟":{en:["french fries","fast food","crispy","potato"],ru:["картофель фри","фастфуд","хрустящий","картофель"]},"🍕":{en:["pizza","cheese","fast food","Italian"],ru:["пицца","сыр","фастфуд","итальянская"]},"🫓":{en:["flatbread","bread","soft"],ru:["лепёшка","хлеб","мягкая"]},"🥪":{en:["sandwich","bread","meal"],ru:["бутерброд","хлеб","приём пищи"]},"🥙":{en:["pita","bread","stuffed","Greek"],ru:["пита","хлеб","фаршированная","греческая"]},"🧆":{en:["falafel","vegetarian","fried"],ru:["фалафель","вегетарианский","жареный"]},"🌮":{en:["taco","Mexican","spicy"],ru:["тако","мексиканская","острая"]},"🌯":{en:["burrito","Mexican","stuffed"],ru:["буррито","мексиканская","фаршированная"]},"🫔":{en:["tamale","Mexican","corn"],ru:["тамале","мексиканская","кукурузная"]},"🥗":{en:["salad","healthy","vegetable"],ru:["салат","здоровый","овощной"]},"🥘":{en:["paella","stew","seafood"],ru:["паэлья","тушёное блюдо","морепродукты"]},"🫕":{en:["fondue","melted","cheese"],ru:["фондю","расплавленный","сыр"]},"🥫":{en:["canned food","storage","preserved"],ru:["консервы","хранение","сохранённое"]},"🍝":{en:["spaghetti","pasta","Italian"],ru:["спагетти","паста","итальянская"]},"🍜":{en:["ramen","noodles","Asian"],ru:["рамен","лапша","азиатская"]},"🍲":{en:["hotpot","stew","broth"],ru:["хотпот","тушёное блюдо","бульон"]},"🍛":{en:["curry","spicy","rice"],ru:["карри","острая","рис"]},"🍣":{en:["sushi","Japanese","fish"],ru:["суши","японская","рыба"]},"🍱":{en:["bento box","Japanese","meal"],ru:["бенто","японская","еда"]},"🥟":{en:["dumpling","Asian","stuffed"],ru:["пельмени","азиатские","фаршированные"]},"🦪":{en:["oyster","seafood","shellfish"],ru:["устрица","морепродукт","раковина"]},"🍤":{en:["shrimp tempura","fried","seafood"],ru:["креветка темпура","жареная","морепродукт"]},"🍙":{en:["rice ball","Japanese","onigiri"],ru:["рисовый шар","японская","онигири"]},"🍚":{en:["cooked rice","staple","Asian"],ru:["варёный рис","основа","азиатская"]},"🍘":{en:["rice cracker","snack","Japanese"],ru:["рисовый крекер","закуска","японская"]},"🍥":{en:["fish cake","Japanese","swirl"],ru:["рыбный пирожок","японская","спираль"]},"🥠":{en:["fortune cookie","Chinese","paper"],ru:["печенье с предсказанием","китайское","бумажное"]},"🥮":{en:["mooncake","Chinese","festival"],ru:["лунное печенье","китайское","фестиваль"]},"🍢":{en:["skewered snack","street food"],ru:["шампур","уличная еда"]},"🍡":{en:["dango","Japanese","mochi"],ru:["данго","японское","мочи"]},"🍧":{en:["shaved ice","dessert","cold"],ru:["измельчённый лёд","десерт","холодный"]},"🍨":{en:["ice cream","cold","sweet"],ru:["мороженое","холодное","сладкое"]},"🍦":{en:["soft serve","dessert","cold"],ru:["мягкое мороженое","десерт","холодное"]},"🥧":{en:["pie","dessert","baked"],ru:["пирог","десерт","выпеченный"]},"🧁":{en:["cupcake","sweet","frosting"],ru:["капкейк","сладкий","с глазурью"]},"🍰":{en:["cake","dessert","slice"],ru:["торт","десерт","кусок"]},"🎂":{en:["birthday cake","celebration","sweet"],ru:["торт ко дню рождения","празднование","сладкий"]},"🍮":{en:["flan","custard","dessert"],ru:["флан","кастард","десерт"]},"🍭":{en:["lollipop","candy","sweet"],ru:["леденец","конфета","сладкий"]},"🍬":{en:["candy","sweet","sugar"],ru:["конфета","сладость","сахар"]},"🍫":{en:["chocolate","sweet","cocoa"],ru:["шоколад","сладкий","какао"]},"🍿":{en:["popcorn","snack","buttery"],ru:["попкорн","закуска","масляный"]},"🍩":{en:["doughnut","sweet","fried"],ru:["пончик","сладкий","жареный"]},"🍪":{en:["cookie","sweet","baked"],ru:["печенье","сладкое","выпеченное"]},"🫖":{en:["teapot","tea","hot"],ru:["чайник","чай","горячий"]},"☕":{en:["coffee","hot drink","caffeine"],ru:["кофе","горячий напиток","кофеин"]},"🍵":{en:["green tea","hot","Japanese"],ru:["зелёный чай","горячий","японский"]},"🧃":{en:["juice","drink","fruit"],ru:["сок","напиток","фруктовый"]},"🥤":{en:["soft drink","straw","fast food"],ru:["безалкогольный напиток","с трубочкой","фастфуд"]},"🧋":{en:["bubble tea","milk tea","boba"],ru:["бабл-ти","молочный чай","боба"]},"🍶":{en:["sake","Japanese","rice wine"],ru:["саке","японский","рисовое вино"]},"🍺":{en:["beer","drink","alcohol"],ru:["пиво","напиток","алкоголь"]},"🍻":{en:["cheers","beer","drinking"],ru:["ура","пиво","выпивка"]},"🥂":{en:["champagne","celebration","toast"],ru:["шампанское","празднование","тост"]},"🍷":{en:["wine","drink","red"],ru:["вино","напиток","красное"]},"🥃":{en:["whiskey","liquor","alcohol"],ru:["виски","ликёр","алкоголь"]},"🍸":{en:["cocktail","martini","drink"],ru:["коктейль","мартини","напиток"]},"🍹":{en:["tropical drink","cocktail","summer"],ru:["тропический напиток","коктейль","лето"]},"🧉":{en:["mate","South American","tea"],ru:["мате","южноамериканский","чай"]},"🍾":{en:["champagne bottle","celebration","party"],ru:["бутылка шампанского","празднование","вечеринка"]},"⚽":{en:["soccer","football","sports","ball"],ru:["футбол","футбол","спорт","мяч"]},"🏀":{en:["basketball","sports","hoop","dunk"],ru:["баскетбол","спорт","кольцо","данк"]},"🏈":{en:["American football","sports","rugby"],ru:["американский футбол","спорт","регби"]},"⚾":{en:["baseball","sports","bat"],ru:["бейсбол","спорт","бита"]},"🥎":{en:["softball","sports","ball"],ru:["софтбол","спорт","мяч"]},"🎾":{en:["tennis","sports","racket"],ru:["теннис","спорт","ракетка"]},"🏐":{en:["volleyball","sports","beach"],ru:["волейбол","спорт","пляж"]},"🏉":{en:["rugby","sports","oval ball"],ru:["регби","спорт","овальный мяч"]},"🥏":{en:["frisbee","throw","flying disc"],ru:["фрисби","бросок","летающий диск"]},"🎱":{en:["billiards","8 ball","pool"],ru:["бильярд","восьмёрка","пул"]},"🪀":{en:["yo-yo","toy","string"],ru:["йо-йо","игрушка","верёвка"]},"🏓":{en:["ping pong","table tennis","sports"],ru:["пинг-понг","настольный теннис","спорт"]},"🏸":{en:["badminton","racket","sports"],ru:["бадминтон","ракетка","спорт"]},"🏒":{en:["hockey","ice hockey","sports"],ru:["хоккей","хоккей на льду","спорт"]},"🏑":{en:["field hockey","sports","stick"],ru:["хоккей на траве","спорт","клюшка"]},"🥍":{en:["lacrosse","sports","net"],ru:["лакросс","спорт","сеть"]},"🏏":{en:["cricket","bat","sports"],ru:["крикет","бита","спорт"]},"⛳":{en:["golf","sports","hole in one"],ru:["гольф","спорт","луночка"]},"🪁":{en:["kite","flying","wind"],ru:["змей","летать","ветер"]},"🎣":{en:["fishing","hook","water"],ru:["рыбалка","крючок","вода"]},"🤿":{en:["diving","underwater","snorkel"],ru:["дайвинг","под водой","снорклинг"]},"🎽":{en:["running","jersey","athlete"],ru:["бег","майка","спортсмен"]},"🛹":{en:["skateboard","sports","extreme"],ru:["скейтборд","спорт","экстрим"]},"🛼":{en:["roller skate","sports","wheels"],ru:["роликовые коньки","спорт","колёса"]},"🛷":{en:["sled","winter","snow"],ru:["санки","зима","снег"]},"⛸️":{en:["ice skate","winter","sports"],ru:["коньки","зима","спорт"]},"🥌":{en:["curling","winter","stone"],ru:["керлинг","зима","камень"]},"⛷️":{en:["skiing","winter","snow"],ru:["лыжи","зима","снег"]},"🏂":{en:["snowboarding","sports","snow"],ru:["сноуборд","спорт","снег"]},"🪂":{en:["parachute","skydiving","air"],ru:["парашют","скайдайвинг","воздух"]},"🏋️":{en:["weightlifting","gym","strong"],ru:["тяжёлая атлетика","спортзал","сильный"]},"🤼":{en:["wrestling","fight","grapple"],ru:["борьба","драка","схватка"]},"🤸":{en:["gymnastics","acrobatics","flip"],ru:["гимнастика","акробатика","сальто"]},"⛹️":{en:["basketball","dribbling","sports"],ru:["баскетбол","дриблинг","спорт"]},"🤾":{en:["handball","sports","throw"],ru:["гандбол","спорт","бросок"]},"🏌️":{en:["golf","swing","sports"],ru:["гольф","мах","спорт"]},"🏇":{en:["horse racing","sports","jockey"],ru:["конные скачки","спорт","жокей"]},"🧘":{en:["meditation","yoga","zen"],ru:["медитация","йога","дзен"]},"🏄":{en:["surfing","wave","water"],ru:["серфинг","волна","вода"]},"🏊":{en:["swimming","water","pool"],ru:["плавание","вода","бассейн"]},"🤽":{en:["water polo","sports","swimming"],ru:["водное поло","спорт","плавание"]},"🚣":{en:["rowing","boat","water"],ru:["гребля","лодка","вода"]},"🧗":{en:["rock climbing","sports","mountain"],ru:["скалолазание","спорт","гора"]},"🚴":{en:["cycling","bike","sports"],ru:["велоспорт","велосипед","спорт"]},"🚵":{en:["mountain biking","sports","outdoor"],ru:["маунтинбайк","спорт","на свежем воздухе"]},"🎪":{en:["circus","tent","performance"],ru:["цирк","палатка","выступление"]},"🎭":{en:["theater","drama","acting"],ru:["театр","драма","актерство"]},"🎨":{en:["painting","art","colors"],ru:["живопись","искусство","цвета"]},"🎬":{en:["film","clapperboard","movie"],ru:["фильм","хлопушка","кино"]},"🎤":{en:["microphone","singing","music"],ru:["микрофон","пение","музыка"]},"🎧":{en:["headphones","music","listening"],ru:["наушники","музыка","прослушивание"]},"🎼":{en:["music","sheet","notes"],ru:["музыка","ноты","сценарий"]},"🎹":{en:["piano","keyboard","music"],ru:["пианино","клавиатура","музыка"]},"🥁":{en:["drums","music","percussion"],ru:["барабаны","музыка","ударные"]},"🎷":{en:["saxophone","jazz","music"],ru:["саксофон","джаз","музыка"]},"🎺":{en:["trumpet","brass","music"],ru:["труба","латунь","музыка"]},"🎸":{en:["guitar","music","rock"],ru:["гитара","музыка","рок"]},"🎻":{en:["violin","music","strings"],ru:["скрипка","музыка","струны"]},"🎲":{en:["dice","game","board game"],ru:["кубики","игра","настольная игра"]},"🎯":{en:["dart","target","game"],ru:["дротик","цель","игра"]},"🎳":{en:["bowling","sports","pins"],ru:["боулинг","спорт","кегли"]},"🎮":{en:["video game","console","gaming"],ru:["видеоигра","консоль","игры"]},"🎰":{en:["slot machine","casino","gambling"],ru:["игровой автомат","казино","азартные игры"]},"🧩":{en:["puzzle","pieces","brain teaser"],ru:["головоломка","кусочки","разминка для мозга"]},"🎫":{en:["ticket","event","entry"],ru:["билет","событие","вход"]},"🎟️":{en:["admission","ticket","event"],ru:["входной билет","билет","событие"]},"🚗":{en:["car","automobile","vehicle","transport"],ru:["автомобиль","машина","транспортное средство","транспорт"]},"🚕":{en:["taxi","cab","transport","vehicle"],ru:["такси","маршрутка","транспорт","транспортное средство"]},"🚙":{en:["suv","vehicle","transport"],ru:["внедорожник","транспортное средство","транспорт"]},"🚌":{en:["bus","public transport","commute"],ru:["автобус","общественный транспорт","коммьют"]},"🚎":{en:["trolleybus","public transport","electric"],ru:["троллейбус","общественный транспорт","электрический"]},"🏎️":{en:["race car","sports car","fast","speed"],ru:["гоночный автомобиль","спортивный автомобиль","быстрый","скорость"]},"🚓":{en:["police car","law enforcement","vehicle"],ru:["полицейская машина","правоохранительные органы","транспортное средство"]},"🚑":{en:["ambulance","emergency","hospital"],ru:["скорая помощь","чрезвычайная ситуация","больница"]},"🚒":{en:["fire truck","firefighter","emergency"],ru:["пожарная машина","пожарный","чрезвычайная ситуация"]},"🚐":{en:["van","minibus","transport"],ru:["фургон","маршрутка","транспорт"]},"🛻":{en:["pickup truck","off-road","vehicle"],ru:["пикап","для бездорожья","транспортное средство"]},"🚚":{en:["delivery truck","freight","cargo"],ru:["грузовик","доставка","груз"]},"🚛":{en:["truck","semi-trailer","transport"],ru:["грузовик","самосвал","транспорт"]},"🚜":{en:["tractor","farming","agriculture"],ru:["трактор","сельское хозяйство","агрономия"]},"🛵":{en:["scooter","motorbike","moped"],ru:["скутер","мотоцикл","мопед"]},"🏍️":{en:["motorcycle","bike","racing"],ru:["мотоцикл","байк","гоночный"]},"🛺":{en:["rickshaw","auto rickshaw","transport"],ru:["рикша","авто-рикша","транспорт"]},"🚲":{en:["bicycle","bike","pedal","cycling"],ru:["велосипед","байк","педаль","велоспорт"]},"🛴":{en:["kick scooter","scooter","ride"],ru:["самокат","скутер","поездка"]},"✈️":{en:["airplane","flight","travel","sky"],ru:["самолёт","рейс","путешествие","небо"]},"🛩️":{en:["small airplane","aviation","sky"],ru:["малый самолёт","авиация","небо"]},"🛫":{en:["departure","takeoff","airport"],ru:["вылет","взлёт","аэропорт"]},"🛬":{en:["landing","arrival","airport"],ru:["посадка","прибытие","аэропорт"]},"🚁":{en:["helicopter","aviation","air"],ru:["вертолёт","авиация","воздух"]},"🚀":{en:["rocket","space","launch","NASA"],ru:["ракета","космос","запуск","НАСА"]},"🛸":{en:["UFO","alien","spaceship","extraterrestrial"],ru:["НЛО","инопланетянин","космический корабль","внеземной"]},"🛶":{en:["canoe","boat","paddle","water"],ru:["каноэ","лодка","весло","вода"]},"⛵":{en:["sailboat","yacht","sea"],ru:["парусник","яхта","море"]},"🚤":{en:["motorboat","speedboat","ocean"],ru:["моторная лодка","скоростной катер","океан"]},"🛥️":{en:["yacht","luxury","boat"],ru:["яхта","роскошь","лодка"]},"🛳️":{en:["cruise ship","ocean","voyage"],ru:["круизный лайнер","океан","путешествие"]},"⛴️":{en:["ferry","boat","transport"],ru:["паром","лодка","транспорт"]},"🚢":{en:["ship","ocean","voyage"],ru:["корабль","океан","путешествие"]},"🏰":{en:["castle","fortress","history"],ru:["замок","крепость","история"]},"🏯":{en:["Japanese castle","Asia","samurai"],ru:["японский замок","Азия","самурай"]},"🏟️":{en:["stadium","sports","arena"],ru:["стадион","спорт","арена"]},"🏖️":{en:["beach","sun","vacation"],ru:["пляж","солнце","отпуск"]},"🏝️":{en:["island","tropical","vacation"],ru:["остров","тропический","отпуск"]},"🏜️":{en:["desert","sand","dry"],ru:["пустыня","песок","сухой"]},"🌋":{en:["volcano","eruption","lava"],ru:["вулкан","извержение","лава"]},"⛰️":{en:["mountain","hiking","nature"],ru:["гора","поход","природа"]},"🏔️":{en:["snowy mountain","climbing","cold"],ru:["снежная гора","скалолазание","холод"]},"🗻":{en:["Mount Fuji","Japan","scenic"],ru:["гора Фудзи","Япония","живописный"]},"🏕️":{en:["camping","tent","outdoors"],ru:["кемпинг","палатка","на природе"]},"🏭":{en:["factory","industry","building"],ru:["фабрика","индустрия","здание"]},"🏢":{en:["office building","corporate","city"],ru:["офисное здание","корпоративный","город"]},"🏬":{en:["shopping mall","retail","stores"],ru:["торговый центр","розничная торговля","магазины"]},"🏣":{en:["post office","mail","building"],ru:["почтовое отделение","почта","здание"]},"🏤":{en:["post office","mail","postal service"],ru:["почтовое отделение","почта","почтовая служба"]},"🏥":{en:["hospital","healthcare","emergency"],ru:["больница","здравоохранение","чрезвычайная ситуация"]},"🏦":{en:["bank","money","finance"],ru:["банк","деньги","финансы"]},"🏨":{en:["hotel","accommodation","stay"],ru:["отель","размещение","проживание"]},"🏪":{en:["convenience store","shopping","24/7"],ru:["магазин","шоппинг","круглосуточно"]},"🏫":{en:["school","education","learning"],ru:["школа","образование","обучение"]},"🏩":{en:["love hotel","romantic","Japan"],ru:["любовный отель","романтический","Япония"]},"💒":{en:["wedding","church","marriage"],ru:["свадьба","церковь","брак"]},"⛪":{en:["church","Christianity","religion"],ru:["церковь","христианство","религия"]},"🕌":{en:["mosque","Islam","prayer"],ru:["мечеть","ислам","молитва"]},"🕍":{en:["synagogue","Judaism","religion"],ru:["синагога","иудаизм","религия"]},"🛕":{en:["hindu temple","spiritual","India"],ru:["индуистский храм","духовный","Индия"]},"⛩️":{en:["shrine","torii","Japan"],ru:["святилище","тории","Япония"]},"🏛️":{en:["government building","politics","history"],ru:["правительственное здание","политика","история"]},"⌚":{en:["watch","smartwatch","time"],ru:["часы","умные часы","время"]},"📱":{en:["smartphone","mobile","phone"],ru:["смартфон","мобильный","телефон"]},"💻":{en:["laptop","computer","technology"],ru:["ноутбук","компьютер","технология"]},"⌨️":{en:["keyboard","typing","computer"],ru:["клавиатура","набор текста","компьютер"]},"🖥️":{en:["desktop","monitor","screen"],ru:["настольный компьютер","монитор","экран"]},"🖨️":{en:["printer","print","office"],ru:["принтер","печать","офис"]},"🖱️":{en:["mouse","computer","click"],ru:["мышь","компьютер","клик"]},"🖲️":{en:["trackball","navigation","input"],ru:["трекбол","навигация","ввод"]},"🕹️":{en:["joystick","gaming","console"],ru:["джойстик","игры","консоль"]},"🗜️":{en:["clamp","tool","hardware"],ru:["зажим","инструмент","аппаратное обеспечение"]},"💽":{en:["mini disc","storage","media"],ru:["мини-диск","хранение","медиа"]},"💾":{en:["floppy disk","save","data"],ru:["флоппи-диск","сохранить","данные"]},"💿":{en:["CD","compact disc","music"],ru:["CD","компакт-диск","музыка"]},"📀":{en:["DVD","video","disc"],ru:["DVD","видео","диск"]},"📼":{en:["VHS","video cassette","retro"],ru:["VHS","видеокассета","ретро"]},"📷":{en:["camera","photo","photography"],ru:["камера","фото","фотография"]},"📸":{en:["camera flash","photography","snapshot"],ru:["вспышка камеры","фотография","снимок"]},"📹":{en:["video camera","recording","film"],ru:["видеокамера","запись","фильм"]},"🎥":{en:["movie camera","film","cinema"],ru:["кино-камера","фильм","кино"]},"📞":{en:["telephone","call","communication"],ru:["телефон","звонок","коммуникация"]},"☎️":{en:["phone","landline","call"],ru:["телефон","стационарный","звонок"]},"📟":{en:["pager","message","communication"],ru:["пейджер","сообщение","коммуникация"]},"📠":{en:["fax machine","office","document"],ru:["факс","офис","документ"]},"📺":{en:["TV","television","screen"],ru:["телевизор","теле","экран"]},"📻":{en:["radio","broadcast","audio"],ru:["радио","трансляция","аудио"]},"🎙️":{en:["microphone","recording","podcast"],ru:["микрофон","запись","подкаст"]},"🎚️":{en:["control knob","audio","volume"],ru:["ручка управления","аудио","громкость"]},"🎛️":{en:["sliders","equalizer","settings"],ru:["ползунки","эквалайзер","настройки"]},"📡":{en:["satellite dish","broadcast","signal"],ru:["спутниковая антенна","трансляция","сигнал"]},"🔋":{en:["battery","power","energy"],ru:["батарея","мощность","энергия"]},"🔌":{en:["plug","electricity","charging"],ru:["штекер","электричество","зарядка"]},"💡":{en:["light bulb","idea","illumination"],ru:["лампочка","идея","освещение"]},"🔦":{en:["flashlight","torch","light"],ru:["фонарик","фонарь","свет"]},"🕯️":{en:["candle","light","fire"],ru:["свеча","свет","огонь"]},"🧯":{en:["fire extinguisher","safety","fire"],ru:["огнетушитель","безопасность","огонь"]},"🛢️":{en:["barrel","oil","fuel"],ru:["бочка","масло","топливо"]},"💸":{en:["money with wings","cash","spending"],ru:["деньги с крыльями","наличные","расходы"]},"💵":{en:["dollar bills","money","USD"],ru:["долларовые банкноты","деньги","USD"]},"💴":{en:["yen","money","Japan"],ru:["иена","деньги","Япония"]},"💶":{en:["euro","money","currency"],ru:["евро","деньги","валюта"]},"💷":{en:["pound","money","UK"],ru:["фунт","деньги","Великобритания"]},"🪙":{en:["coin","currency","money"],ru:["монета","валюта","деньги"]},"💰":{en:["money bag","wealth","rich"],ru:["мешок с деньгами","богатство","богатый"]},"💳":{en:["credit card","banking","payment"],ru:["кредитная карта","банковское дело","оплата"]},"💎":{en:["gem","diamond","valuable"],ru:["драгоценный камень","бриллиант","ценный"]},"⚖️":{en:["balance scale","justice","law"],ru:["весы","справедливость","закон"]},"🪜":{en:["ladder","climb","height"],ru:["лестница","лазить","высота"]},"🧰":{en:["toolbox","tools","repair"],ru:["ящик с инструментами","инструменты","ремонт"]},"🔧":{en:["wrench","repair","tools"],ru:["гаечный ключ","ремонт","инструменты"]},"🔨":{en:["hammer","build","fix"],ru:["молоток","строить","чинить"]},"⚒️":{en:["hammer and pick","construction","work"],ru:["молот и кирка","строительство","работа"]},"🛠️":{en:["tools","fix","maintenance"],ru:["инструменты","чинить","обслуживание"]},"⛏️":{en:["pickaxe","mining","digging"],ru:["кирка","горное дело","копать"]},"✏️":{en:["pencil","writing","notes"],ru:["карандаш","написание","заметки"]},"🖊️":{en:["pen","writing","signature"],ru:["ручка","написание","подпись"]},"🖋️":{en:["fountain pen","calligraphy","writing"],ru:["перьевая ручка","каллиграфия","написание"]},"✒️":{en:["nib","ink","writing"],ru:["остриё","чернила","написание"]},"🖌️":{en:["paintbrush","art","painting"],ru:["кисть","искусство","живопись"]},"🖍️":{en:["crayon","drawing","color"],ru:["мелки","рисование","цвет"]},"📝":{en:["memo","notes","document"],ru:["заметка","записи","документ"]},"📚":{en:["books","reading","library"],ru:["книги","чтение","библиотека"]},"📖":{en:["open book","reading","story"],ru:["открытая книга","чтение","история"]},"🔖":{en:["bookmark","reading","save"],ru:["закладка","чтение","сохранить"]},"📑":{en:["bookmark tabs","pages","notes"],ru:["закладки","страницы","заметки"]},"🗒️":{en:["spiral notepad","notes","journal"],ru:["спиральный блокнот","записи","журнал"]},"📄":{en:["document","paper","page"],ru:["документ","бумага","страница"]},"📰":{en:["newspaper","news","journalism"],ru:["газета","новости","журналистика"]},"🗞️":{en:["rolled newspaper","press","print"],ru:["свернутая газета","пресса","печатное издание"]},"📁":{en:["file folder","documents","storage"],ru:["папка","документы","хранение"]},"📂":{en:["open folder","organization","files"],ru:["открытая папка","организация","файлы"]},"🗂️":{en:["card index","catalog","records"],ru:["карточный индекс","каталог","записи"]},"❤️":{en:["heart","love","affection"],ru:["сердце","любовь","нежность"]},"🧡":{en:["orange heart","warmth","care"],ru:["оранжевое сердце","теплота","забота"]},"💛":{en:["yellow heart","friendship","happiness"],ru:["жёлтое сердце","дружба","счастье"]},"💚":{en:["green heart","envy","nature","eco"],ru:["зелёное сердце","зависть","природа","эко"]},"💙":{en:["blue heart","loyalty","trust"],ru:["синее сердце","верность","доверие"]},"💜":{en:["purple heart","compassion","admiration"],ru:["фиолетовое сердце","сострадание","восхищение"]},"🤎":{en:["brown heart","earth","stability"],ru:["коричневое сердце","земля","устойчивость"]},"🖤":{en:["black heart","mourning","dark"],ru:["чёрное сердце","скорбь","тёмный"]},"🤍":{en:["white heart","pure","peace"],ru:["белое сердце","чистый","мир"]},"💔":{en:["broken heart","sad","heartbreak"],ru:["разбитое сердце","грусть","сердечная боль"]},"❣️":{en:["heart exclamation","love","emotion"],ru:["сердечный восклицательный знак","любовь","эмоция"]},"💕":{en:["two hearts","romance","affection"],ru:["два сердца","романтика","нежность"]},"💞":{en:["revolving hearts","love","relationship"],ru:["вращающиеся сердца","любовь","отношения"]},"💓":{en:["beating heart","emotion","passion"],ru:["бьющееся сердце","эмоция","страсть"]},"💗":{en:["growing heart","love","expanding"],ru:["растущее сердце","любовь","расширяющееся"]},"💖":{en:["sparkling heart","admiration","shine"],ru:["блестящее сердце","восхищение","сияние"]},"💘":{en:["heart with arrow","love","romance"],ru:["сердце со стрелой","любовь","романтика"]},"💝":{en:["heart with ribbon","gift","affection"],ru:["сердце с лентой","подарок","нежность"]},"💟":{en:["heart decoration","symbol","love"],ru:["украшение сердца","символ","любовь"]},"☮️":{en:["peace","pacifism","symbol"],ru:["мир","пацифизм","символ"]},"✝️":{en:["cross","christianity","religion"],ru:["крест","христианство","религия"]},"☪️":{en:["star and crescent","islam","faith"],ru:["звезда и полумесяц","ислам","вера"]},"🕉️":{en:["om","hinduism","spiritual"],ru:["ом","индуизм","духовный"]},"☸️":{en:["dharma wheel","buddhism","karma"],ru:["колесо дхармы","буддизм","карма"]},"✡️":{en:["star of david","judaism","faith"],ru:["звезда Давида","иудаизм","вера"]},"🔯":{en:["hexagram","mystic","spiritual"],ru:["шестиконечная звезда","мистический","духовный"]},"🕎":{en:["menorah","hanukkah","jewish"],ru:["менора","Ханука","еврейский"]},"☯️":{en:["yin yang","balance","harmony"],ru:["инь-ян","баланс","гармония"]},"☦️":{en:["orthodox cross","christianity","faith"],ru:["православный крест","христианство","вера"]},"🛐":{en:["place of worship","religion","faith"],ru:["место поклонения","религия","вера"]},"⛎":{en:["ophiuchus","zodiac","astrology"],ru:["змееносец","зодиак","астрология"]},"⚠️":{en:["warning","caution","alert"],ru:["предупреждение","осторожность","тревога"]},"🚸":{en:["children crossing","school","pedestrian"],ru:["дети на переходе","школа","пешеход"]},"⛔":{en:["no entry","prohibited","restricted"],ru:["вход запрещён","запрещено","ограничено"]},"🚫":{en:["prohibited","no","forbidden"],ru:["запрещено","нет","запрещено"]},"☢️":{en:["radioactive","hazard","danger"],ru:["радиоактивный","опасность","угроза"]},"☣️":{en:["biohazard","toxic","warning"],ru:["биологическая опасность","ядовитый","предупреждение"]},"➕":{en:["plus","addition","math"],ru:["плюс","сложение","математика"]},"➖":{en:["minus","subtraction","math"],ru:["минус","вычитание","математика"]},"➗":{en:["division","divide","math"],ru:["деление","делить","математика"]},"✖️":{en:["multiplication","times","math"],ru:["умножение","раз","математика"]},"♾️":{en:["infinity","limitless","math"],ru:["бесконечность","безграничный","математика"]},"💲":{en:["dollar","money","currency"],ru:["доллар","деньги","валюта"]},"💱":{en:["currency exchange","finance","money"],ru:["обмен валюты","финансы","деньги"]},"⬆️":{en:["up arrow","increase","direction"],ru:["стрелка вверх","увеличение","направление"]},"↗️":{en:["up-right arrow","growth","move"],ru:["стрелка вверх-вправо","рост","движение"]},"➡️":{en:["right arrow","next","forward"],ru:["стрелка вправо","далее","вперёд"]},"↘️":{en:["down-right arrow","decrease","move"],ru:["стрелка вниз-вправо","уменьшение","движение"]},"⬇️":{en:["down arrow","lower","decline"],ru:["стрелка вниз","понижение","снижение"]},"↙️":{en:["down-left arrow","falling","move"],ru:["стрелка вниз-влево","падение","движение"]},"⬅️":{en:["left arrow","back","previous"],ru:["стрелка влево","назад","предыдущий"]},"↖️":{en:["up-left arrow","direction","move"],ru:["стрелка вверх-влево","направление","движение"]},"↕️":{en:["vertical arrows","up down","change"],ru:["вертикальные стрелки","вверх вниз","изменение"]},"↔️":{en:["horizontal arrows","left right","switch"],ru:["горизонтальные стрелки","влево вправо","переключение"]},"↩️":{en:["back arrow","undo","return"],ru:["стрелка назад","отмена","возврат"]},"↪️":{en:["right curved arrow","redirect","turn"],ru:["изогнутая стрелка вправо","перенаправление","поворот"]},"⤴️":{en:["up-right arrow","diagonal","move"],ru:["диагональная стрелка вверх-вправо","диагональ","движение"]},"⤵️":{en:["down-right arrow","diagonal","move"],ru:["диагональная стрелка вниз-вправо","диагональ","движение"]},"🔃":{en:["repeat","cycle","refresh"],ru:["повтор","цикл","обновление"]},"🔄":{en:["counterclockwise arrows","reload","sync"],ru:["стрелки против часовой стрелки","перезагрузка","синхронизация"]},"🔆":{en:["bright","high brightness","sun"],ru:["яркий","высокая яркость","солнце"]},"📶":{en:["signal","network","connection"],ru:["сигнал","сеть","соединение"]},"🎦":{en:["cinema","movies","entertainment"],ru:["кино","фильмы","развлечения"]},"🔅":{en:["dim","low brightness","light"],ru:["тусклый","низкая яркость","свет"]},"♻️":{en:["recycle","eco","sustainability"],ru:["переработка","эко","устойчивость"]},"✅":{en:["check mark","yes","approved"],ru:["галочка","да","одобрено"]},"❌":{en:["cross mark","no","wrong"],ru:["крестик","нет","неправильно"]},"❎":{en:["negative cross","decline","cancel"],ru:["отрицательный крест","отказ","отмена"]},"➰":{en:["curly loop","infinity","twist"],ru:["извилистая петля","бесконечность","скрутка"]},"➿":{en:["double curly loop","loop","repeat"],ru:["двойная извилистая петля","петля","повтор"]},"〽️":{en:["part alternation","music","symbol"],ru:["знак чередования","музыка","символ"]},"✳️":{en:["eight-spoked asterisk","star","highlight"],ru:["восьмиконечная астериска","звезда","акцент"]},"✴️":{en:["eight-pointed star","shine","special"],ru:["восьмиконечная звезда","сияние","особый"]},"❇️":{en:["sparkle","highlight","shine"],ru:["сверкание","акцент","сияние"]},"©️":{en:["copyright","legal","rights"],ru:["авторское право","юридический","права"]},"®️":{en:["registered","trademark","brand"],ru:["зарегистрировано","торговая марка","бренд"]},"™️":{en:["trademark","brand","symbol"],ru:["торговая марка","бренд","символ"]},"🏁":{en:["checkered flag","finish line","racing"],ru:["шашечный флаг","финишная черта","гонки"]},"🚩":{en:["triangular flag","mark","warning"],ru:["треугольный флаг","метка","предупреждение"]},"🎌":{en:["crossed flags","celebration","Japan"],ru:["перекрещённые флаги","празднование","Япония"]},"🏴":{en:["black flag","protest","symbol"],ru:["чёрный флаг","протест","символ"]},"🏳️":{en:["white flag","surrender","peace"],ru:["белый флаг","капитуляция","мир"]},"🏳️🌈":{en:["rainbow flag","LGBTQ+","pride"],ru:["радужный флаг","ЛГБТК+","гордость"]},"🏳️⚧️":{en:["transgender flag","trans","pride"],ru:["трансгендерный флаг","транс","гордость"]},"🏴☠️":{en:["pirate flag","skull","danger"],ru:["пиратский флаг","череп","опасность"]},"🇺🇸":{en:["United States","USA","America"],ru:["Соединённые Штаты","США","Америка"]},"🇬🇧":{en:["United Kingdom","UK","Britain"],ru:["Соединённое Королевство","Великобритания","Британия"]},"🇯🇵":{en:["Japan","Japanese","Asia"],ru:["Япония","японский","Азия"]},"🇰🇷":{en:["South Korea","Korea","Asian"],ru:["Южная Корея","Корея","азиатский"]},"🇩🇪":{en:["Germany","Deutschland","Europe"],ru:["Германия","Германия","Европа"]},"🇨🇳":{en:["China","Chinese","Asia"],ru:["Китай","китайский","Азия"]},"🇧🇷":{en:["Brazil","Brasil","South America"],ru:["Бразилия","Бразилия","Южная Америка"]},"🇮🇳":{en:["India","Indian","Asia"],ru:["Индия","индийский","Азия"]},"🇫🇷":{en:["France","French","Europe"],ru:["Франция","французский","Европа"]},"🇪🇸":{en:["Spain","Spanish","Europe"],ru:["Испания","испанский","Европа"]},"🇮🇹":{en:["Italy","Italian","Europe"],ru:["Италия","итальянский","Европа"]},"🇷🇺":{en:["Russia","Russian","Europe"],ru:["Россия","русский","Европа"]},"🇨🇦":{en:["Canada","Canadian","North America"],ru:["Канада","канадский","Северная Америка"]},"🇦🇺":{en:["Australia","Aussie","Oceania"],ru:["Австралия","австралиец","Океания"]},"🇳🇿":{en:["New Zealand","Kiwi","Oceania"],ru:["Новая Зеландия","киви","Океания"]},"🇲🇽":{en:["Mexico","Mexican","Latin America"],ru:["Мексика","мексиканский","Латинская Америка"]},"🇦🇷":{en:["Argentina","Argentinian","South America"],ru:["Аргентина","аргентинский","Южная Америка"]},"🇵🇰":{en:["Pakistan","Pakistani","Asia"],ru:["Пакистан","пакистанский","Азия"]},"🇪🇬":{en:["Egypt","Egyptian","Africa"],ru:["Египет","египетский","Африка"]},"🇸🇪":{en:["Sweden","Swedish","Europe"],ru:["Швеция","шведский","Европа"]},"🇳🇴":{en:["Norway","Norwegian","Europe"],ru:["Норвегия","норвежский","Европа"]},"🇳🇱":{en:["Netherlands","Dutch","Europe"],ru:["Нидерланды","голландский","Европа"]},"🇨🇭":{en:["Switzerland","Swiss","Europe"],ru:["Швейцария","швейцарский","Европа"]},"🇹🇷":{en:["Turkey","Turkish","Eurasia"],ru:["Турция","турецкий","Евразия"]},"🇮🇩":{en:["Indonesia","Indonesian","Asia"],ru:["Индонезия","индонезийский","Азия"]},"🇸🇬":{en:["Singapore","Singaporean","Asia"],ru:["Сингапур","сингапурский","Азия"]},"🇮🇱":{en:["Israel","Israeli","Middle East"],ru:["Израиль","израильский","Ближний Восток"]},"🇵🇹":{en:["Portugal","Portuguese","Europe"],ru:["Португалия","португальский","Европа"]},"🇵🇱":{en:["Poland","Polish","Europe"],ru:["Польша","польский","Европа"]},"🇹🇭":{en:["Thailand","Thai","Asia"],ru:["Таиланд","тайский","Азия"]}};function re(e){return{hueMap:{},hueStep:e.hueStep||30,maxHue:e.maxHue||360,saturation:e.saturation||"80%",lightness:e.lightness||"50%",getColor(e){let t=this.hueMap[e];if(!t){const n=this.maxHue/this.hueStep;t=Math.floor(Math.random()*n)*this.hueStep,this.hueMap[e]=t}return`hsl(${t}, ${this.saturation}, ${this.lightness})`}}}const ie=re({maxHue:210,hueStep:30,saturation:"80%",lightness:"50%"}),ae=re({maxHue:210,hueStep:30,saturation:"80%",lightness:"50%"});let oe=null;function se(){let e;do{e=k[Math.floor(Math.random()*k.length)]}while(e===oe);return oe=e,e}function ce(){const e=document.querySelector("#app-chat-container .chat-wrapper");if(!e)return;const t=document.querySelector("#app-chat-container"),n=e.offsetWidth<=780,r=t.classList.contains("maximized"),i=document.querySelector("#app-chat-container .user-list-container");i&&(i.style.display=n&&!r?"none":""),document.querySelectorAll("#app-chat-container .message").forEach((e=>{e.style.flexDirection=n&&!r?"column":"row",e.style.marginBottom=n&&!r?"0.4em":"0"}))}function le(){const e=document.getElementById("app-chat-container"),t=document.querySelector(".chat-toggle-button");if(!e||!t)return;const n=de(),r=window.innerWidth,i=window.innerHeight,a=getComputedStyle(document.documentElement),o=parseInt(a.getPropertyValue("--min-chat-width"))||250,s=parseInt(a.getPropertyValue("--min-chat-height"))||200;e.style.width=Math.min(r,Math.max(o,n.width))+"px",e.style.height=Math.min(i,Math.max(s,n.height))+"px",e.style.left=he(n.left,0,r-e.offsetWidth)+"px",n.floating?(e.style.top=he(n.top,0,i-e.offsetHeight)+"px",e.style.bottom="",e.classList.add("floating-chat"),e.style.display=n.isVisible?"flex":"none",e.style.opacity=n.isVisible?"1":"0",t.innerHTML=n.isVisible?Y:Q):(e.style.bottom="0",e.style.top="",e.classList.remove("floating-chat"),e.classList.remove("visible-chat","hidden-chat"),e.classList.add(n.isVisible?"visible-chat":"hidden-chat"),t.innerHTML=n.isVisible?Y:Q),ce()}function de(){const e=localStorage.getItem("chatState"),t={height:300,width:Math.min(window.innerWidth,600),left:0,floating:!1,top:window.innerHeight-300,isVisible:!0,fontSizeMultiplier:1};return e?{...t,...JSON.parse(e)}:t}function ue(e){const t=document.getElementById("app-chat-container"),n=document.getElementById("message-input");if(!t)return;t.style.fontSize=`${e}em`,n&&(n.style.fontSize="1em");me({...de(),fontSizeMultiplier:e})}function pe(){ue(de().fontSizeMultiplier)}function me(e){localStorage.setItem("chatState",JSON.stringify(e))}function he(e,t,n){return Math.min(Math.max(e,t),n)}function ge(e){return"string"!=typeof e?e:e.replace(/^\d+#/,"")}function fe(e){if(!e)return null;const t=e.split("/");if(t.length<2)return null;return t[1].split("#")[0]}function ye(e){return e?e.includes("#")?e.split("#")[1]:e.replace(/^\d+#/,""):"Unknown"}function be(){Object.entries(x.bigImageEvents).forEach((([e,t])=>{document.removeEventListener(e,t)}))}function ve(e,t,n){e&&(e.offsetHeight,e.style.transition="opacity 0.3s ease",e.style.opacity="show"===t?n:"0","hide"===t&&e.addEventListener("transitionend",(()=>{"0"===e.style.opacity&&e.parentNode&&e.parentNode.removeChild(e)}),{once:!0}))}const we=e=>{try{const{hostname:t}=new URL(e),n=t.toLowerCase().split(".").slice(-2).join(".");return{isTrusted:E.includes(n),domain:n}}catch(t){return console.error("Error in isTrustedDomain:",t.message),{isTrusted:!1,domain:e}}};function ke(e){return/^https?:\/\//.test(e)&&/%[0-9A-Fa-f]{2}/.test(e)}function xe(e){const[t]=e.split("#");return decodeURIComponent(t).replace(/ /g,"_")}function Ee(){const e=document.getElementById("messages-panel");if(!e)return;const t=localStorage.getItem("mentionKeywords");if(!t)return;let n;try{if(n=JSON.parse(t),!Array.isArray(n))return}catch(e){return}const r=new WeakSet;e.querySelectorAll(".message-text").forEach((e=>{const t=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,{acceptNode:e=>{if(r.has(e))return NodeFilter.FILTER_SKIP;return e.parentElement.closest(".mention, .time, .username")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT}}),i=[];let a;for(;a=t.nextNode();)i.push(a);i.forEach((e=>{r.has(e)||(!function(e,t){const n=/(@?[\wа-яА-ЯёЁ'-]+)|[\s]+|[^@\s\wа-яА-ЯёЁ'-]+/gu,r=e.textContent.match(n)||[],i=document.createDocumentFragment();r.forEach((e=>{if(t.some((t=>0===t.localeCompare(e,void 0,{sensitivity:"accent"})))){const t=document.createElement("span");t.className="mention",e.split("").forEach((e=>{const n=document.createElement("span");n.style.color=ae.getColor(e),n.textContent=e,t.appendChild(n)})),i.appendChild(t)}else i.appendChild(document.createTextNode(e))})),e.parentNode.replaceChild(i,e)}(e,n),r.add(e))}))}))}let Ce=!0;const je=600;function Se(){const e=document.getElementById("messages-panel");if(e)if(Ce)e.scrollTop=e.scrollHeight,Ce=!1;else{e.scrollHeight-e.scrollTop-e.clientHeight<=je&&(e.scrollTop=e.scrollHeight)}}function Le(e,t={}){const n=document.querySelector(".chat-drag-area");if(!n)return;const r=n.querySelector(".chat-dynamic-alert");r&&r.parentNode===n&&n.removeChild(r);const i={type:"info",duration:3e3,...t},a={info:"#2196F3",warning:"#FF9800",error:"#F44336",success:"#4CAF50"},o=document.createElement("div");o.className="chat-dynamic-alert",o.innerHTML=e,o.style.cssText=`\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n color: ${a[i.type]||a.info};\n padding: 5px 10px;\n border-radius: 3px;\n z-index: 1000;\n font-family: Roboto, Montserrat;\n font-size: 10px;\n font-weight: normal;\n box-shadow: 0 2px 5px rgba(0,0,0,0.2);\n opacity: 0;\n `,n.appendChild(o),requestAnimationFrame((()=>{o.style.transition="all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55)",o.style.opacity="1",o.style.transform="translate(-50%, -50%)",setTimeout((()=>{o.style.transition="transform 0.05s ease-in-out",[{x:5,delay:0},{x:-7,delay:50},{x:9,delay:100},{x:-6,delay:150},{x:4,delay:200},{x:-3,delay:250},{x:0,delay:300}].forEach((e=>{setTimeout((()=>{o.style.transform=`translate(calc(-50% + ${e.x}px), -50%)`}),e.delay)}))}),300),setTimeout((()=>{o.style.transition="opacity 0.3s ease-in-out",o.style.opacity="0",setTimeout((()=>{o&&o.parentNode===n&&n.removeChild(o)}),300)}),i.duration)}))}function Ie(){const e=document.getElementById("app-chat-container"),t=document.getElementById("message-input");return!(!t||!e||"none"===e.style.display)&&(t.focus(),!0)}async function Me(e){const t=`https://klavogonki.ru/api/profile/search-users?query=${encodeURIComponent(e)}`;try{const n=await async function(e){const t=await fetch(e);if(!t.ok)throw new Error(`Failed to fetch ${e}`);return t.json()}(t);if(!n.all?.length)throw new Error(`User ${e} not found.`);const r=n.all.find((t=>t.login===e));if(!r)throw new Error(`Exact match for user ${e} not found.`);return r.id}catch(t){return Le(`Could not find user "${e}"`,{type:"error",duration:5e3}),null}}const $e={isPrivateMode:!1,targetUsername:null,targetId:null,fullJid:null,async setPrivateTarget(e){if(!e)return this.exitPrivateMode(),!1;try{const t=await Me(e);return!!t&&(this.isPrivateMode=!0,this.targetUsername=e,this.targetId=t,this.fullJid=`${t}#${e}@jabber.klavogonki.ru/web`,!0)}catch(e){return console.error("Error setting private target:",e),!1}},exitPrivateMode(){this.isPrivateMode=!1,this.targetUsername=null,this.targetId=null,this.fullJid=null}};async function ze(e){if(!e)return;const t=e.value,n=/^\/pm\s+([\wа-яА-ЯёЁ\-\.\_\+]+)\s/,r=t.match(n);if(r){const i=r[1];await $e.setPrivateTarget(i)?(!function(e){const t=document.getElementById("message-input");$e.isPrivateMode&&$e.targetUsername!==e&&Ae();if(t.classList.contains("private-mode")&&$e.targetUsername===e)$e.targetUsername===e&&(t.placeholder=`️PM to ➡ ${e}`,Le(`Private chat with ${e} activated`,{type:"warning",duration:3e3}));else{t.classList.add("private-mode"),t.placeholder=`PM to ➡ ${e}`;let n=document.querySelector(".private-mode-exit");if(!n){n=document.createElement("span"),n.className="private-mode-exit",n.addEventListener("click",(()=>{Ae(),t.focus()}));t.parentElement.insertBefore(n,t.nextSibling)}n.innerHTML="🔒",n.title="Exit private mode",n.addEventListener("mouseenter",(()=>{n.innerHTML="🔓"})),n.addEventListener("mouseleave",(()=>{n.innerHTML="🔒"})),Le(`Private chat with ${e} activated`,{type:"warning",duration:3e3}),$e.isPrivateMode=!0,$e.targetUsername=e}}(i),e.value=t.replace(n,"")):(Le(`Could not find user "${i}"`,{type:"error",duration:3e3}),Ae())}else/^\/exit\s*$/.test(t)&&(Ae(),e.value="")}function Ae(){const e=document.getElementById("message-input");if(e.classList.contains("private-mode")){e.classList.remove("private-mode"),e.placeholder="";const t=document.querySelector(".private-mode-exit");t&&t.remove(),$e.exitPrivateMode(),Le("Exited private chat mode",{type:"success",duration:3e3})}}class Pe{constructor(e="user-list"){this.container=document.getElementById(e),this.activeUsers=new Map,this.isFirstLoad=!0,this.avatarCache=this.loadAvatarCache(),this.cacheDate=(new Date).toDateString(),this.roleIcons={visitor:"🐥",participant:"🗿",moderator:"⚔️️"},this.rolePriority={moderator:1,participant:2,visitor:3},this.setupEventListeners()}loadAvatarCache(){try{const e=localStorage.getItem("userAvatarCache");if(e){const t=JSON.parse(e);return t.date===(new Date).toDateString()?(console.log("🗃️ Loaded avatar cache from localStorage"),t.avatars||{}):(console.log("🗃️ Avatar cache expired (new day), creating fresh cache"),{})}}catch(e){console.error("Error loading avatar cache:",e)}return{}}saveAvatarCache(){try{localStorage.setItem("userAvatarCache",JSON.stringify({date:this.cacheDate,avatars:this.avatarCache}))}catch(e){console.error("Error saving avatar cache:",e)}}setupEventListeners(){this.container.addEventListener("click",(e=>{if(e.target.classList.contains("username-clickable")){const t=e.target.getAttribute("data-user-id");if(t)if(e.ctrlKey){const t=e.target.textContent.trim(),n=document.getElementById("message-input");n.value=`/pm ${t} `,ze(n),n.focus()}else{const e=t.split("/")[1].split("#")[0];window.location.href=`https://klavogonki.ru/u/#/${e}/`}}if(e.target.closest(".game-indicator")){const t=e.target.closest(".game-indicator").getAttribute("data-game-id");t&&(e.stopPropagation(),window.location.href=`https://klavogonki.ru/g/?gmid=${t}`)}}))}async updatePresence(e){const t=(new DOMParser).parseFromString(e,"text/xml").getElementsByTagName("presence");if(e.includes('<presence id="pres_1"'))return console.log("🔄 Initial room join detected, requesting full roster"),void this.requestFullRoster();let n=!1;const r=[],i=[];for(let e=0;e<t.length;e++){const a=t[e],o=a.getAttribute("from"),s=a.getAttribute("type");if(!o||!o.includes("[email protected]/"))continue;const c=o.split("/").pop();if(!c)continue;if("клавобот"===c.toLowerCase()||o.toLowerCase().includes("#клавобот"))continue;if("unavailable"===s){if(this.activeUsers.has(o)){const e=this.activeUsers.get(o);fe(o),ye(e.login);this.isFirstLoad,this.activeUsers.delete(o),n=!0}continue}const l=this.activeUsers.get(o)||{},d=fe(o),u=this.avatarCache[d];let p={jid:o,login:c,color:"#777",usernameColor:ie.getColor(c),role:"participant",gameId:null,avatar:null};const m=a.getElementsByTagName("x");let h=!1;for(let e=0;e<m.length;e++){const t=m[e].getAttribute("xmlns");if("klavogonki:userdata"===t){const t=m[e].getElementsByTagName("user")[0];if(t){const e=t.getElementsByTagName("login")[0];e&&e.textContent&&(p.login=e.textContent,p.usernameColor=ie.getColor(ye(p.login)));const n=t.getElementsByTagName("avatar")[0];n&&n.textContent&&(p.avatar=n.textContent,h=!0);const r=t.getElementsByTagName("moderator")[0];r&&"1"===r.textContent&&(p.role="moderator")}const n=m[e].getElementsByTagName("game_id")[0];n&&n.textContent&&(p.gameId=n.textContent)}if("http://jabber.org/protocol/muc#user"===t){const t=m[e].getElementsByTagName("item")[0];if(t){const e=t.getAttribute("role");e&&"moderator"!==p.role&&(p.role=e)}}}!h&&l&&l.avatar&&(p.avatar=l.avatar),!p.avatar&&u&&u.hasAvatar&&(p.avatar=u.avatarUrl);ye(p.login);this.activeUsers.has(o)?JSON.stringify(l)!==JSON.stringify(p)&&(this.activeUsers.set(o,p),n=!0,i.push(o)):(this.isFirstLoad,this.activeUsers.set(o,p),n=!0,r.push(o))}n&&this.updateUI(r,i)}updateUI(e=[],t=[]){const n=new Map;this.container.querySelectorAll(".user-item").forEach((e=>{n.set(e.getAttribute("data-jid"),e)}));const r=Array.from(this.activeUsers.values()).sort(((e,t)=>{const n=this.rolePriority[e.role]-this.rolePriority[t.role];return 0!==n?n:ye(e.login).localeCompare(ye(t.login))})),i=document.createDocumentFragment();r.forEach((e=>{let t=n.get(e.jid);const r=fe(e.jid),a=ye(e.login);if(t){if(!t.querySelector(".avatar-container")){const n=document.createElement("span");n.className="avatar-container",this.setUserAvatar(n,e,r,a),t.insertBefore(n,t.firstChild)}n.delete(e.jid);const i=t.querySelector(".role"),o=this.roleIcons[e.role]||"👤";i&&i.textContent!==o&&(i.textContent=o,i.classList.contains(e.role)||(i.className=`role ${e.role}`));const s=t.querySelector(".username");s&&s.style.color!==e.usernameColor&&(s.style.color=e.usernameColor)}else{t=document.createElement("div"),t.classList.add("user-item"),t.setAttribute("data-jid",e.jid);const n=this.roleIcons[e.role]||"👤",i=document.createElement("span");i.className="avatar-container",this.setUserAvatar(i,e,r,a);const o=document.createElement("div");o.className="user-info",o.innerHTML=`\n <div class="username" style="color: ${e.usernameColor}">\n <span class="username-clickable" data-user-id="${e.jid}">${a}</span>\n <span class="role ${e.role}">${n}</span>\n </div>\n `,t.appendChild(i),t.appendChild(o)}this.updateGameIndicator(t,e),i.appendChild(t)})),this.container.innerHTML="",this.container.appendChild(i),n.forEach((e=>{e&&e.parentNode&&e.remove()})),this.isFirstLoad||e.forEach((e=>{const t=this.container.querySelector(`.user-item[data-jid="${e}"]`);t&&t.parentNode&&ee(t)})),this.isFirstLoad&&(this.isFirstLoad=!1)}setUserAvatar(e,t,n,r){const i=this.avatarCache[n];if(t.avatar){const t=`${y}/storage/avatars/${n}_big.png`,a=document.createElement("img");a.className="user-avatar image-avatar",a.src=t,a.alt=`${r}'s avatar`,a.addEventListener("error",(()=>{const t=i?.emoji||se();e.innerHTML="";const r=document.createElement("span");r.className="user-avatar svg-avatar",r.textContent=t,e.appendChild(r),this.avatarCache[n]={hasAvatar:!1,emoji:t},this.saveAvatarCache()})),a.addEventListener("load",(()=>{!i||i.hasAvatar,this.avatarCache[n]={hasAvatar:!0,avatarUrl:t},this.saveAvatarCache()})),e.appendChild(a)}else if(i)if(i.hasAvatar){const t=document.createElement("img");t.className="user-avatar image-avatar",t.src=i.avatarUrl,t.alt=`${r}'s avatar`,t.addEventListener("error",(()=>{const t=se();e.innerHTML="";const r=document.createElement("span");r.className="user-avatar svg-avatar",r.textContent=t,e.appendChild(r),this.avatarCache[n]={hasAvatar:!1,emoji:t},this.saveAvatarCache()})),e.appendChild(t)}else{const t=document.createElement("span");t.className="user-avatar svg-avatar",t.textContent=i.emoji,e.appendChild(t),this.avatarCache[n]&&this.avatarCache[n].hasEmoji||(this.avatarCache[n].hasEmoji=!0,this.saveAvatarCache())}else{const t=`${y}/storage/avatars/${n}_big.png`,i=document.createElement("img");i.className="user-avatar image-avatar",i.src=t,i.alt=`${r}'s avatar`,i.addEventListener("error",(()=>{const t=se();e.innerHTML="";const i=document.createElement("span");i.className="user-avatar svg-avatar",i.textContent=t,e.appendChild(i),console.log(`😊 Using emoji avatar for User: ${r} ID: (${n}): ${t}`),this.avatarCache[n]={hasAvatar:!1,emoji:t,hasEmoji:!0},this.saveAvatarCache()})),i.addEventListener("load",(()=>{console.log(`🖼️ Using image avatar for User: ${r} ID: (${n})`),this.avatarCache[n]={hasAvatar:!0,avatarUrl:t},this.saveAvatarCache()})),e.appendChild(i)}}updateGameIndicator(e,t){let n=e.querySelector(".game-indicator");if(t.gameId){if(!n||n.getAttribute("data-game-id")!==t.gameId){const r=`<span class="game-indicator" title="${t.gameId}" data-game-id="${t.gameId}">\n <span class="traffic-icon">🚦</span>\n </span>`;if(n)n.outerHTML=r;else{e.querySelector(".username").insertAdjacentHTML("beforeend",r)}}}else n&&n.parentNode&&n.remove()}async requestFullRoster(){console.log("📑 Would request full roster here (using existing data for now)"),this.updateUI()}}class Te{constructor(e="messages-panel",t=""){this.panel=document.getElementById(e),this.messages=[],this.messageIdCounter=0,this.currentUsername=t,this.sentMessageTexts=new Set,this.processedMessageIds=new Set,this.chatHistory=new Map}processMessages(e){if(!e||"string"!=typeof e)return;const t=(new DOMParser).parseFromString(e,"text/xml").getElementsByTagName("message");let n=!1;this.processedMessageKeys=this.processedMessageKeys||new Set,Array.from(t).forEach((e=>{let t=e.getAttribute("id");const r=e.getElementsByTagName("body")[0];if(!r||!r.textContent)return;const i=r.textContent.trim();if("This room is not anonymous"===i)return;const a=e.getAttribute("from"),o=ge(a&&a.split("#")[1]?.split("@")[0]||"unknown");let s=(new Date).toISOString();const c=e.getElementsByTagName("delay");c.length&&c[0].getAttribute("stamp")&&(s=c[0].getAttribute("stamp"));const l=`${o}|${s}|${i}`;if(t=t||l,this.processedMessageIds.has(t)||this.processedMessageKeys.has(l))return;const d=e.getAttribute("to"),u="chat"===e.getAttribute("type");let p=null;u&&d&&(p=d.split("#")[1]?.split("@")[0]||d,p=ge(p));const m={id:t,from:o,text:i,timestamp:s,isPrivate:u,recipient:p};this.messages.push(m),this.chatHistory.set(t,m),this.processedMessageIds.add(t),this.processedMessageKeys.add(l),n=!0})),n&&this.updatePanel()}addSentMessage(e,t={}){this.sentMessageTexts.add(e);const n=`msg_${Date.now()}`,r={id:n,from:this.currentUsername,text:e,timestamp:(new Date).toISOString(),isPrivate:t.isPrivate||!1,recipient:t.recipient||null};if(this.messages.push(r),this.chatHistory.set(n,r),this.processedMessageIds.add(n),this.updatePanel(),this.sentMessageTexts.size>20){const e=Array.from(this.sentMessageTexts);for(let t=0;t<e.length-20;t++)this.sentMessageTexts.delete(e[t])}}updatePanel(){if(!this.panel)return;this.messages.sort(((e,t)=>new Date(e.timestamp)-new Date(t.timestamp)));const e=new Set(Array.from(this.panel.querySelectorAll(".message")).map((e=>e.getAttribute("data-message-id"))));this.messages.forEach((t=>{if(!e.has(t.id)){const e=new Date(t.timestamp).toLocaleTimeString("en-GB",{hour12:!1}),n=ie.getColor(t.from),r=document.createElement("div");r.className="message",t.isPrivate&&(r.classList.add("private-message"),r.classList.add(t.from===this.currentUsername?"sent":"received"),t.recipient&&r.setAttribute("data-recipient",t.recipient)),t.text.startsWith("/me ")&&(r.classList.add("system"),t.text=`${t.from} ${t.text.substring(t.text.indexOf(" ")+1)}`),t.isSystem&&r.classList.add("system"),r.setAttribute("data-message-id",t.id);const i=document.createElement("div");i.className="message-info";let a=t.from;t.isPrivate&&(a=t.from===this.currentUsername&&t.recipient?`→ ${t.recipient}`:`${t.from} →`),i.innerHTML=`\n <span class="time">${e}</span>\n <span class="username" style="color: ${n}">${a}</span>\n `;const o=document.createElement("div");o.className="message-text",o.innerHTML=(e=>{let t=0,n=[];return e=(e=e.replace(/(\b(https?|ftp):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/gi,(e=>(n.push(e),`___URL${t++}___`)))).replace(/:(\w+):/g,((e,t)=>`<img src="https://klavogonki.ru/img/smilies/${t}.gif" alt="${t}" />`)).replace(/(\p{Emoji_Presentation}|\p{Emoji}\uFE0F)/gu,'<span class="emoji-adjuster">$&</span>'),n.forEach(((t,n)=>{e=e.replace(`___URL${n}___`,`<a href="${t}" target="_blank">${t}</a>`)})),e})(t.text),r.appendChild(i),r.appendChild(o),this.panel.appendChild(r)}})),this.addUsernameClickListeners(),Ee(this.currentUsername),requestAnimationFrame((()=>{Se()}))}addUsernameClickListeners(){const e=this.panel.querySelectorAll(".username"),t=document.getElementById("message-input");e.forEach((e=>{e.addEventListener("click",(n=>{let r=e.textContent.trim();if(r.includes("→")&&(r=r.startsWith("→")?r.replace("→","").trim():r.split("→")[0].trim()),n.ctrlKey)t.value=`/pm ${r} `,ze(t);else{const e=`${r}, `;t.value.includes(e)||(t.value+=e)}t.focus()}))}))}getChatHistory(){return Array.from(this.chatHistory.values())}clearMessages(){const e=`system_${Date.now()}`,t={id:e,from:"System",text:"Chat connection lost. Reconnecting...",timestamp:(new Date).toISOString(),isPrivate:!1,recipient:null,isSystem:!0};this.messages.push(t),this.chatHistory.set(e,t),this.processedMessageIds.add(e),this.updatePanel()}}function Ne(){const e=document.getElementById("app-chat-container"),t=document.querySelector(".chat-toggle-button");if(!e)return;if(e.classList.contains("maximized"))return void Le("Chat is currently maximized",{type:"warning",duration:1e3});const n=JSON.parse(localStorage.getItem("chatState"))||{};if(n.floating||!1){const r="0"===e.style.opacity;e.style.opacity=r?"1":"0",setTimeout((()=>{e.style.display=r?"flex":"none",t.innerHTML=r?Y:Q,me({...n,isVisible:r}),r&&Ie()}),300)}else{const r=!e.classList.contains("visible-chat");e.classList.remove("visible-chat","hidden-chat"),e.classList.add(r?"visible-chat":"hidden-chat"),t.innerHTML=r?Y:Q,me({...n,isVisible:r}),r&&Ie()}}class He{constructor(e={}){this.container=null,this.options={container:e.container||document.body,helpButton:e.helpButton,onDestroy:e.onDestroy},He.instance=this}init(){return this.createPanel(),this.bindEvents(),this}createPanel(){this.container=document.createElement("div"),this.container.className="help-panel",this.content=document.createElement("div"),this.content.className="help-content",this.updatePanelContent(),this.container.appendChild(this.content),document.body.appendChild(this.container),ve(this.container,"show","1")}updatePanelContent(){const e={en:{heading:"Chat Commands & Hotkeys",sections:[{title:"Chat Commands",items:[{key:"/help",desc:"Show this help panel"},{key:"/pm username",desc:"Activate private chat mode with the specified user"},{key:"/exit",desc:"Exit private chat mode"}]},{title:"Chat Hotkeys",items:[{key:"Ctrl + Space",desc:"Hide/Show the chat"},{key:"Shift + Ctrl + Space",desc:"Expand/Collapse the chat"},{key:"Ctrl + Click",desc:"Activate private chat mode with the clicked user"}]},{heading:"Emoji Panel Actions & Hotkeys",subSections:[{title:"Emoji Panel Actions",items:[{key:"Click an emoji",desc:"Insert the emoji"},{key:"Click outside panel",desc:"Closes the panel (emoji or help)"}]},{title:"Emoji Panel Hotkeys",items:[{key:"Ctrl + ;",desc:"Open the Emoji Panel"},{key:"Enter",desc:"Insert the emoji"},{key:"Ctrl + Enter",desc:"Insert the emoji keeping the panel open"},{key:"Ctrl + Click",desc:"Insert the emoji keeping the panel open"},{key:"Shift + Click",desc:"Remove emoji from recent list (in recent category)"},{key:"q",desc:"Hide the Emoji Panel (single press when search is not focused)"},{key:"qq",desc:"Hide the Emoji Panel (double press 'q' when search is focused)"},{key:"Esc",desc:"Close the panel (emoji or help)"}]}]},{heading:"Image Manipulations",subSections:[{title:"Open/Close",items:[{key:"(LMB) Click",desc:"Open the image"},{key:"Ctrl + (RMB)",desc:"Close the image and copy the link"},{key:"Space or ESC",desc:"Close the image"}]},{title:"Movement and Scaling",items:[{key:"Hold (MMB)",desc:"Drag the expanded image"},{key:"Scroll (MMB)",desc:"Zoom in/out the image"},{key:"Ctrl + (MMB)",desc:"Scale the image. Move the cursor up or down."}]},{title:"Navigation",items:[{key:"Arrow keys (< >)",desc:"Switch between images"},{key:"(LMB), (RMB)",desc:"Switch between images"}]}]}]},ru:{heading:"Команды чата и горячие клавиши",sections:[{title:"Команды чата",items:[{key:"/help",desc:"Показать панель помощи"},{key:"/pm username",desc:"Активировать приватный чат для указанного пользователя"},{key:"/exit",desc:"Выйти из приватного чата"}]},{title:"Горячие клавиши чата",items:[{key:"Ctrl + Space",desc:"Скрыть/Показать чат"},{key:"Shift + Ctrl + Space",desc:"Развернуть/Свернуть чат"},{key:"Ctrl + Click",desc:"Активировать приватный чат для выбранного пользователя"}]},{heading:"Действия и горячие клавиши панели эмодзи",subSections:[{title:"Действия панели эмодзи",items:[{key:"Click an emoji",desc:"Вставить эмодзи"},{key:"Click outside panel",desc:"Закрыть панель (эмодзи или помощь)"}]},{title:"Горячие клавиши панели эмодзи",items:[{key:"Ctrl + ;",desc:"Открыть панель эмодзи"},{key:"Enter",desc:"Вставить эмодзи"},{key:"Ctrl + Enter",desc:"Вставить эмодзи, оставив панель открытой"},{key:"Ctrl + Click",desc:"Вставить эмодзи, оставив панель открытой"},{key:"Shift + Click",desc:'Удалить эмодзи из списка "Недавно использованные"'},{key:"q",desc:"Скрыть панель эмодзи (одиночный нажим, когда поиск не в фокусе)"},{key:"qq",desc:"Скрыть панель эмодзи (дважды нажмите 'q', когда поиск в фокусе)"},{key:"Esc",desc:"Закрыть (эмодзи или помощь)"}]}]},{heading:"Манипуляции с изображением",subSections:[{title:"Открытие/Закрытие",items:[{key:"(ЛКМ) Клик",desc:"Открыть изображение"},{key:"Ctrl + (ПКМ)",desc:"Закрыть изображение и скопировать ссылку"},{key:"Space или ESC",desc:"Закрыть изображение"}]},{title:"Перемещение и масштабирование",items:[{key:"Зажатая (СКМ)",desc:"Перемещайте развернутое изображение"},{key:"Прокрутка (СКМ)",desc:"Увеличивайте/уменьшайте изображение"},{key:"Ctrl + (СКМ)",desc:"Масштабируйте изображение. Курсор вверх или вниз."}]},{title:"Навигация",items:[{key:"Стрелки (< >)",desc:"Переключение между изображениями"},{key:"(ЛКМ), (ПКМ)",desc:"Переключение между изображениями"}]}]}]}}[localStorage.getItem("emojiPanelLanguage")||"en"];let t=`<h5 class="help-section-header">${e.heading}</h5>`;e.sections.forEach((e=>{e.title?t+=`<h6 class="help-section-subheader">${e.title}</h6>`:e.heading&&(t+=`<h5 class="help-section-header">${e.heading}</h5>`),e.items&&(t+='<ul class="help-list">',e.items.forEach((e=>{t+=`<li class="help-list-item"><strong class="help-hotkey">${e.key}</strong> ${e.desc}</li>`})),t+="</ul>"),e.subSections&&e.subSections.forEach((e=>{t+=`<h6 class="help-section-subheader">${e.title}</h6>`,t+='<ul class="help-list">',e.items.forEach((e=>{t+=`<li class="help-list-item"><strong class="help-hotkey">${e.key}</strong> ${e.desc}</li>`})),t+="</ul>"}))})),this.content.innerHTML=t}bindEvents(){this._clickOutsideHandler=e=>{this.options.helpButton&&(e.target===this.options.helpButton||this.options.helpButton.contains(e.target))||this.container&&!this.container.contains(e.target)&&(this.remove(),Le("Help panel has been closed.",{type:"warning",duration:2e3}))},document.addEventListener("click",this._clickOutsideHandler,!0),this._escHandler=e=>{"Escape"===e.key&&(this.remove(),Le("Help panel has been closed.",{type:"warning",duration:2e3}))},document.addEventListener("keydown",this._escHandler,!0),this._stopPropagationHandler=e=>{e.stopPropagation()},this.container.addEventListener("click",this._stopPropagationHandler)}remove(){this._clickOutsideHandler&&(document.removeEventListener("click",this._clickOutsideHandler,!0),this._clickOutsideHandler=null),this._escHandler&&(document.removeEventListener("keydown",this._escHandler,!0),this._escHandler=null),this.container&&(this.container.removeEventListener("click",this._stopPropagationHandler),this._stopPropagationHandler=null),this.container&&(ve(this.container,"hide","0"),this.container=null),"function"==typeof this.options.onDestroy&&this.options.onDestroy(),He.instance=null}show(){this.container?this.updatePanelContent():this.init(),document.body.contains(this.container)||(document.body.appendChild(this.container),ve(this.container,"show","1"),Le("Help panel is now visible."))}toggle(){this.container&&document.body.contains(this.container)?this.remove():this.show()}static setupHelpCommandEvents(){const e=document.getElementById("message-input");return e&&e.addEventListener("keydown",(t=>{if("/help"===e.value.trim()&&"Space"===t.code){if(t.preventDefault(),He.instance)He.instance.remove();else{const e=new He({onDestroy:()=>{}});e.init(),e.show(),Le("Help panel is now visible.")}e.value=""}})),He.instance}}He.instance=null;class Re{static instance=null;constructor(e={}){if(Re.instance)return Re.instance;Re.instance=this,this.options={onEmojiSelect:e.onEmojiSelect||(()=>{}),container:e.container||document.body,position:e.position||"bottom",onDestroy:e.onDestroy,emojiButton:e.emojiButton},this.container=null,this.searchInput=null,this.emojiContainer=null,this.categoryNav=null,this.infoPanel=null,this.infoIcon=null,this.infoKeywords=null,this.languageSelect=null,this.categories={recent:{icon:"🕒"},smileys:{icon:"😊"},nature:{icon:"🦊"},food:{icon:"🍔"},activities:{icon:"⚽"},travel:{icon:"✈️"},objects:{icon:"💡"},symbols:{icon:"💕"},flags:{icon:"🎌"}},this.categoryLabels={en:{recent:"Recently Used",smileys:"Smileys & People",nature:"Animals & Nature",food:"Food & Drink",activities:"Activities",travel:"Travel & Places",objects:"Objects",symbols:"Symbols",flags:"Flags"},ru:{recent:"Недавно использованные",smileys:"Смайлы и люди",nature:"Животные и природа",food:"Еда и напитки",activities:"Активности",travel:"Путешествия и места",objects:"Объекты",symbols:"Символы",flags:"Флаги"}},this.uiLabels={en:{searchResults:"Search Results"},ru:{searchResults:"Результаты поиска"}},this.emojiData=te,this.emojiKeywords=ne,this.recentEmojis=this.loadRecentEmojis(),this.batchSize=50,this.loadedIndices={},this.categorySections={},this.currentLanguage=localStorage.getItem("emojiPanelLanguage")||"en"}init(){return this.createPanel(),this.bindEvents(),this.loadAllEmojis(),this}createPanel(){if(document.querySelector(".emoji-panel"))return;this.container=document.createElement("div"),this.container.className="emoji-panel";const e=document.createElement("div");e.className="emoji-search-container",this.searchInput=document.createElement("input"),this.searchInput.type="search",this.searchInput.className="emoji-search",e.appendChild(this.searchInput),this.categoryNav=document.createElement("div"),this.categoryNav.className="emoji-categories",Object.entries(this.categories).forEach((([e,t])=>{const n=document.createElement("button");n.className="emoji-category-btn",n.dataset.category=e,n.innerHTML=t.icon,n.title=this.getLocalizedCategoryName(e),this.categoryNav.appendChild(n)})),this.emojiContainer=document.createElement("div"),this.emojiContainer.className="emoji-container",this.infoPanel=document.createElement("div"),this.infoPanel.className="emoji-info-panel",this.infoIcon=document.createElement("span"),this.infoIcon.className="emoji-info-icon",this.infoKeywords=document.createElement("span"),this.infoKeywords.className="emoji-info-keywords",this.infoPanel.appendChild(this.infoIcon),this.infoPanel.appendChild(this.infoKeywords),this.languageSelect=document.createElement("select"),this.languageSelect.className="emoji-language-select",this.languageSelect.innerHTML='\n <option value="en">EN</option>\n <option value="ru">RU</option>\n ',this.languageSelect.value=this.currentLanguage;const t=document.createElement("div");t.className="emoji-footer",t.appendChild(this.infoPanel),t.appendChild(this.languageSelect),this.container.appendChild(e),this.container.appendChild(this.categoryNav),this.container.appendChild(this.emojiContainer),this.container.appendChild(t),this.options.container.appendChild(this.container),ve(this.container,"show","1"),this.searchInput.focus()}loadAllEmojis(){this.emojiContainer.innerHTML="",this.loadedIndices={},this.categorySections={},Object.keys(this.categories).forEach((e=>{const t=document.createElement("div");t.className="emoji-category-section",t.id=`emoji-section-${e}`;const n=document.createElement("div");n.className="emoji-category-header",n.textContent=this.getLocalizedCategoryName(e),t.appendChild(n);const r=document.createElement("div");r.className="emoji-list",t.appendChild(r),this.emojiContainer.appendChild(t),this.loadedIndices[e]=0,this.categorySections[e]={section:t,emojiList:r,header:n},this.loadMoreEmojisForCategory(e)}))}loadMoreEmojisForCategory(e){const t="recent"===e?this.recentEmojis:this.emojiData[e]||[],n=this.loadedIndices[e],r=t.slice(n,n+this.batchSize);if(!r.length)return;const i=this.categorySections[e].emojiList;r.forEach((t=>{const n=document.createElement("button");n.className="emoji-btn",n.textContent=t,n.addEventListener("mouseenter",(()=>this.updateInfoPanel(t))),n.addEventListener("mouseleave",(()=>this.clearInfoPanel())),n.addEventListener("click",(n=>{n.stopPropagation(),n.shiftKey&&"recent"===e?(n.preventDefault(),this.removeFromRecent(t)):(this.addToRecent(t),this.options.onEmojiSelect(t),n.ctrlKey?this.searchInput.focus():this.destroy())})),i.appendChild(n)})),this.loadedIndices[e]+=r.length}searchEmojis(e){this.emojiContainer.innerHTML="";const t=document.createElement("div");t.className="emoji-category-section";const n=document.createElement("div");n.className="emoji-category-header",n.textContent=this.uiLabels[this.currentLanguage].searchResults,t.appendChild(n);const r=document.createElement("div");r.className="emoji-list",t.appendChild(r);const i=[];Object.keys(this.emojiData).forEach((t=>{(this.emojiData[t]||[]).forEach((t=>{const n=this.emojiKeywords[t]||{},r=Object.values(n).flat();(t.includes(e)||r.some((t=>t.toLowerCase().includes(e))))&&i.push(t)}))})),i.forEach((e=>{const t=document.createElement("button");t.className="emoji-btn",t.textContent=e,t.addEventListener("mouseenter",(()=>this.updateInfoPanel(e))),t.addEventListener("mouseleave",(()=>this.clearInfoPanel())),t.addEventListener("click",(t=>{t.stopPropagation(),this.addToRecent(e),this.options.onEmojiSelect(e),t.ctrlKey?this.searchInput.focus():this.destroy()})),r.appendChild(t)})),this.emojiContainer.appendChild(t)}bindEvents(){this._documentClickHandler=e=>{this.container.contains(e.target)||this.destroy()},document.addEventListener("click",this._documentClickHandler),this._emojiKeydownHandler=e=>{"Escape"===e.key&&this.destroy()},document.addEventListener("keydown",this._emojiKeydownHandler),this._openPanelHandler=e=>{e.ctrlKey&&"Semicolon"===e.code&&(e.preventDefault(),document.querySelector(".emoji-panel")||this.show())},document.addEventListener("keydown",this._openPanelHandler),this._qKeydownHandler=e=>{if("KeyQ"===e.code)if(document.activeElement===this.searchInput){const t=Date.now();this._lastQPressTime&&t-this._lastQPressTime<500?(e.preventDefault(),this.destroy(),this._lastQPressTime=0):this._lastQPressTime=t}else e.preventDefault(),this.destroy()},document.addEventListener("keydown",this._qKeydownHandler),this.searchInput.addEventListener("input",(e=>{const t=e.target.value.trim().toLowerCase();t?(this.searchEmojis(t),this.emojiContainer.classList.add("search-active")):(this.loadAllEmojis(),this.emojiContainer.classList.remove("search-active"))})),this.searchInput.addEventListener("keydown",(e=>{if("Enter"===e.key&&(e.preventDefault(),this.emojiContainer.classList.contains("search-active"))){const t=this.emojiContainer.querySelector(".emoji-btn");if(t){const n=new MouseEvent("click",{bubbles:!0,cancelable:!0,ctrlKey:e.ctrlKey});t.dispatchEvent(n),this.searchInput.value="",this.loadAllEmojis(),this.emojiContainer.classList.remove("search-active"),e.ctrlKey?this.searchInput.focus():this.destroy()}}})),this.categoryNav.addEventListener("click",(e=>{const t=e.target.closest(".emoji-category-btn");if(t){const e=t.dataset.category,n=document.getElementById(`emoji-section-${e}`);n&&n.scrollIntoView({behavior:"smooth",block:"start"})}})),this.emojiContainer.addEventListener("scroll",(()=>this.handleScroll())),this.languageSelect.addEventListener("change",(e=>{this.currentLanguage=e.target.value,localStorage.setItem("emojiPanelLanguage",this.currentLanguage);const t=this.infoIcon.textContent;t&&this.updateInfoPanel(t),this.updateCategoryLabels(),this.searchInput.value.trim()&&this.searchEmojis(this.searchInput.value.trim().toLowerCase())})),this.container.addEventListener("click",(e=>{e.stopPropagation()}))}handleScroll(){Object.keys(this.categorySections).forEach((e=>{const{section:t}=this.categorySections[e],n=t.getBoundingClientRect(),r=this.emojiContainer.getBoundingClientRect();n.bottom<r.bottom+100&&this.loadMoreEmojisForCategory(e)}));let e=null,t=1/0;Object.keys(this.categorySections).forEach((n=>{const r=this.categorySections[n].header.getBoundingClientRect(),i=this.emojiContainer.getBoundingClientRect(),a=Math.abs(r.top-i.top);r.top<=i.top+10&&a<t&&(t=a,e=n)})),e&&this.highlightCategory(e)}updateCategoryLabels(){Object.keys(this.categories).forEach((e=>{const t=this.getLocalizedCategoryName(e),n=this.categoryNav.querySelector(`[data-category="${e}"]`);n&&(n.title=t),this.categorySections[e]&&this.categorySections[e].header&&(this.categorySections[e].header.textContent=t)}))}updateInfoPanel(e){if(!this.infoIcon||!this.infoKeywords)return;this.infoIcon.textContent=e;const t=(this.emojiKeywords[e]||{})[this.currentLanguage]||[];this.infoKeywords.textContent=t.join(", ")}clearInfoPanel(){this.infoIcon&&this.infoKeywords&&(this.infoIcon.textContent="",this.infoKeywords.textContent="")}addToRecent(e){if(this.recentEmojis=[e,...this.recentEmojis.filter((t=>t!==e))].slice(0,25),this.saveRecentEmojis(),this.categorySections.recent){this.categorySections.recent.emojiList.innerHTML="",this.loadedIndices.recent=0,this.loadMoreEmojisForCategory("recent")}}removeFromRecent(e){if(this.recentEmojis=this.recentEmojis.filter((t=>t!==e)),this.saveRecentEmojis(),this.categorySections.recent){this.categorySections.recent.emojiList.innerHTML="",this.loadedIndices.recent=0,this.loadMoreEmojisForCategory("recent")}}loadRecentEmojis(){try{return JSON.parse(localStorage.getItem("recentEmojis"))||[]}catch{return[]}}saveRecentEmojis(){try{localStorage.setItem("recentEmojis",JSON.stringify(this.recentEmojis))}catch(e){console.error("Failed to save recent emojis:",e)}}highlightCategory(e){this.categoryNav.querySelectorAll(".emoji-category-btn").forEach((t=>{t.classList.toggle("active",t.dataset.category===e)}))}show(){this.createPanel(),this.bindEvents(),this.loadAllEmojis(),this.searchInput.focus()}destroy(){document.removeEventListener("keydown",this._emojiKeydownHandler),document.removeEventListener("keydown",this._qKeydownHandler),document.removeEventListener("click",this._documentClickHandler),this.container&&ve(this.container,"hide","0"),this.container=null,this.searchInput=null,this.emojiContainer=null,this.categoryNav=null,this.infoPanel=null,this.infoIcon=null,this.infoKeywords=null,this.languageSelect=null,Re.instance=null,this.options.emojiButton&&(this.options.emojiButton.title="Open emoji picker"),"function"==typeof this.options.onDestroy&&this.options.onDestroy()}toggle(){document.querySelector(".emoji-panel")?this.destroy():this.show()}getLocalizedCategoryName(e){return this.categoryLabels[this.currentLanguage][e]||e}}function Be(){const e=document.createElement("div");e.id="app-chat-container",["top","left","right"].forEach((t=>{const n=document.createElement("div");n.className=`resize-handle ${t}`,e.appendChild(n)}));const t=document.createElement("div");t.className="chat-wrapper";const n=document.createElement("div");n.className="chat-content";const r=document.createElement("div");r.id="messages-panel",r.className="messages-panel";const i=document.createElement("div");i.className="input-container";const a=document.createElement("button");var o,s;a.className="emoji-trigger filled-button",a.innerHTML="🙂",a.classList.add("emoji-button"),a.title="Open emoji picker",a.addEventListener("mouseover",(()=>{a.innerHTML="🙃"})),a.addEventListener("mouseout",(()=>{a.innerHTML="🙂"})),function(e,t){const n=Object.keys(ne),r=setInterval((()=>{const t=n[Math.floor(Math.random()*n.length)];e.innerHTML=t,ee(e),setTimeout((()=>{e.innerHTML="🙂"}),1500)}),t);e.randomEmojiIntervalId=r}(a,((o=6e5)>(s=18e5)&&([o,s]=[s,o]),Math.floor(Math.random()*(s-o+1))+o));let c=null;a.addEventListener("click",(e=>{e.stopPropagation(),c&&document.querySelector(".emoji-panel")?c.destroy():(c=new Re({container:r,position:"bottom",emojiButton:a,onEmojiSelect:e=>{const t=document.getElementById("message-input");if(t){const n=t.selectionStart,r=t.value.substring(0,n),i=t.value.substring(t.selectionEnd);t.value=r+e+i;const a=n+e.length;t.setSelectionRange(a,a),t.focus()}},onDestroy:()=>{a.title="Open emoji picker",c=null}}),c.init(),a.title="Close emoji picker")}));const l=document.createElement("input");l.type="text",l.id="message-input";const d=document.createElement("button");d.id="send-button",d.className="filled-button send-button",d.innerHTML=V,i.appendChild(a),i.appendChild(l),i.appendChild(d),n.appendChild(r),n.appendChild(i);const u=document.createElement("div");u.className="user-list-container";const p=document.createElement("div");p.id="user-list",u.appendChild(p),t.appendChild(n),t.appendChild(u),e.appendChild(t);const m=document.createElement("button");m.className="filled-button header-button chat-maximize-button",m.innerHTML=G,m.addEventListener("click",De),e.appendChild(m);const h=document.createElement("button");h.className="filled-button header-button chat-help-button",h.innerHTML=Z,h.title="Show chat help";let g=null;h.addEventListener("click",(e=>{if(console.log("Help button clicked."),e.stopPropagation(),g&&document.querySelector(".help-panel"))return g.remove(),h.title="Show chat help",g=null,void Le("Help panel has been closed.",{type:"warning",duration:2e3});console.log("Help panel does not exist. Creating help panel..."),g=new He({helpButton:h,onDestroy:()=>{h.title="Show chat help",g=null}}),g.init(),g.show(),Le('Help panel has been opened. Press "?" or "ESC" key, or click outside to close.',{type:"success",duration:2e3}),h.title="Hide chat help"})),e.appendChild(h);const f=document.createElement("button");f.className="filled-button header-button chat-toggle-button",f.innerHTML=Y,f.addEventListener("click",Ne),e.appendChild(f);const y=document.createElement("div");y.className="chat-drag-area",y.addEventListener("dblclick",Ne),e.appendChild(y),document.body.appendChild(e),le(),function(){if(!document.getElementById("app-chat-container"))return;const e=de(),t=document.createElement("div");t.className="font-size-control";const n=document.createElement("input");n.type="range",n.min="0.8",n.max="1.5",n.step="0.1",n.value=e.fontSizeMultiplier,n.className="font-size-slider",n.addEventListener("mousedown",(e=>{e.stopPropagation()})),n.addEventListener("input",(e=>{ue(parseFloat(e.target.value))})),t.appendChild(n);const r=document.querySelector(".chat-drag-area");r&&r.appendChild(t)}(),pe(),requestAnimationFrame((()=>{const e=document.getElementById("messages-panel");e&&(e.scrollTop=e.scrollHeight)}))}let qe=null;function De(){const e=document.getElementById("app-chat-container"),t=document.querySelector(".chat-maximize-button");if(e)if(e.classList.contains("maximized")){const n=document.getElementById("messages-panel"),r=n.scrollHeight-n.scrollTop-n.clientHeight<=300;if(e.maximizeResizeHandler&&(window.removeEventListener("resize",e.maximizeResizeHandler),delete e.maximizeResizeHandler),qe){if(e.style.width=`${qe.width}px`,e.style.height=`${qe.height}px`,e.style.left=`${qe.left}px`,e.style.maxWidth="",e.style.minWidth="",e.style.position="fixed",e.style.right="",e.style.margin="",e.style.transform="",e.style.top="auto",qe.floating){const t=window.innerHeight,n=qe.top;n+qe.height<=t?e.style.top=`${n}px`:(e.style.bottom="0",e.style.top="auto")}else e.style.bottom="0",e.style.top="";me({...de(),width:qe.width,height:qe.height,left:qe.left,top:qe.top,floating:qe.floating,isVisible:qe.isVisible})}e.classList.remove("maximized"),t.classList.remove("maximized"),t.innerHTML=G,requestAnimationFrame((()=>{ce(),r&&(n.scrollTop=n.scrollHeight),Ie(),pe()}))}else{const n=!e.classList.contains("visible-chat")&&!e.classList.contains("hidden-chat");qe=de();const r=()=>`${Math.floor(.9*window.innerHeight)}px`;e.style.cssText=`\n width: 100vw !important;\n height: ${r()} !important;\n max-width: 100vw !important;\n min-width: 100vw !important;\n position: fixed !important;\n bottom: 0 !important;\n left: 0 !important;\n right: 0 !important;\n top: auto !important;\n margin: 0 !important;\n transform: none !important;\n `,n&&e.classList.remove("visible-chat","hidden-chat"),e.classList.add("maximized"),t.classList.add("maximized"),t.innerHTML=X;const i=()=>{e.style.height=r(),e.style.bottom="0",e.style.top="auto"};window.addEventListener("resize",i),e.maximizeResizeHandler=i,ce(),Ie(),pe()}}let Ue,_e,Fe,Ke,Oe=!1;let Je,We,Ve,Ye,Qe,Xe,Ge=!1,Ze=null,et=0;var tt=n(498),nt={};nt.styleTagTransform=h(),nt.setAttributes=d(),nt.insert=c().bind(null,"head"),nt.domAPI=o(),nt.insertStyleElement=p();i()(tt.A,nt);tt.A&&tt.A.locals&&tt.A.locals;var rt=n(21),it={};it.styleTagTransform=h(),it.setAttributes=d(),it.insert=c().bind(null,"head"),it.domAPI=o(),it.insertStyleElement=p();i()(rt.A,it);rt.A&&rt.A.locals&&rt.A.locals;function at(){if(function(){try{return window!==window.top}catch(e){return!0}}())return console.error("Application cannot run in an iframe"),!1;const e=new URLSearchParams(window.location.search);if("/g/"===window.location.pathname&&e.has("gmid"))return!1;if(window.location.href.includes("/gamelist/"))return function(){if(window.location.href.startsWith("https://klavogonki.ru/gamelist/"))try{const e=Array.from(document.scripts).find((e=>e.text.includes("PageData")));if(!e)throw new Error("PageData script not found");const t=e.text.match(/\.constant\('PageData', ([\s\S]*?})\)/)[1],n=JSON.parse(t.replace(/(\w+):/g,'"$1":').replace(/'/g,'"')),r=`${n.chatParams.user.id}#${n.chatParams.user.login}`,i=n.chatParams.pass;localStorage.getItem("klavoauth")||(localStorage.setItem("klavoauth",JSON.stringify({username:r,password:i})),setTimeout((()=>{window.location.href="https://klavogonki.ru"}),500))}catch(e){console.error("Auth error:",e),localStorage.removeItem("klavoauth"),alert(`Auth failed: ${e.message}\nPlease refresh the page.`)}}(),!1;return!!(localStorage.getItem("klavoauth")&&w.username&&w.password)||(localStorage.removeItem("klavoauth"),window.location.href="https://klavogonki.ru/gamelist/",!1)}!async function(){try{if(!at())return;Be(),function(){const e=document.getElementById("app-chat-container"),t=document.getElementById("chat-close-btn"),n=document.getElementById("chat-header");if(!e)return;const r=JSON.parse(localStorage.getItem("chatState"))||{},i=r.floating||!1,a=!1!==r.isVisible;i?(e.style.display=a?"flex":"none",e.style.opacity=a?"1":"0"):(e.classList.remove("visible-chat","hidden-chat"),e.classList.add(a?"visible-chat":"hidden-chat")),document.addEventListener("keydown",(e=>{e.ctrlKey&&e.shiftKey&&"Space"===e.code?(e.preventDefault(),De()):e.ctrlKey&&"Space"===e.code&&(e.preventDefault(),Ne())})),t&&t.addEventListener("click",Ne),n&&n.addEventListener("dblclick",Ne)}(),document.addEventListener("mousedown",(e=>{if(!e.target.closest(".chat-drag-area"))return;const t=document.getElementById("app-chat-container");let n=de();if(Oe=!0,Ue=e.clientX,_e=e.clientY,Fe=t.offsetLeft,Ke=parseInt(t.style.top)||t.getBoundingClientRect().top,!n.floating){const e=window.innerHeight-t.offsetHeight;t.style.top=e+"px",t.style.bottom="",n.top=e,n.floating=!0,t.classList.add("floating-chat"),me(n)}document.body.style.userSelect="none"})),document.addEventListener("mousemove",(e=>{if(!Oe)return;const t=document.getElementById("app-chat-container"),n=window.innerWidth,r=window.innerHeight,i=e.clientX-Ue,a=e.clientY-_e,o=he(Fe+i,0,n-t.offsetWidth),s=he(Ke+a,0,r-t.offsetHeight);t.style.left=o+"px",t.style.top=s+"px";let c=de();c.left=o,c.top=s,c.floating=!0,me(c)})),document.addEventListener("mouseup",(()=>{if(!Oe)return;Oe=!1;const e=document.getElementById("app-chat-container"),t=window.innerWidth,n=window.innerHeight,r=e.getBoundingClientRect(),i=r.left<0||r.top<0||r.right>t||r.bottom>n,a=n-r.bottom<50;let o=de();i||a?(e.style.top="",e.style.bottom="0",o.floating=!1,e.classList.remove("floating-chat")):(o.floating=!0,o.top=r.top,e.classList.add("floating-chat")),me(o),document.body.style.userSelect=""})),document.addEventListener("mousedown",(e=>{const t=e.target.closest(".resize-handle");if(!t)return;Ge=!0,Ze=t.classList[1];const n=document.getElementById("app-chat-container");Je=e.clientX,We=e.clientY,Ve=n.offsetWidth,Ye=n.offsetHeight,Qe=n.offsetLeft,Xe=parseInt(n.style.top)||n.getBoundingClientRect().top,et=e.clientY-Xe,document.body.style.userSelect="none"})),document.addEventListener("mousemove",(e=>{if(!Ge)return;const t=document.getElementById("app-chat-container"),n=window.innerWidth,r=window.innerHeight,i=getComputedStyle(document.documentElement),a=parseInt(i.getPropertyValue("--min-chat-width"))||250,o=parseInt(i.getPropertyValue("--min-chat-height"))||200;let s=de();if("left"===Ze){const r=Math.max(a,Ve-(e.clientX-Je)),i=he(Qe+(e.clientX-Je),0,n-r);t.style.width=r+"px",t.style.left=i+"px",s.width=r,s.left=i}else if("right"===Ze){const r=n-t.getBoundingClientRect().left,i=Math.min(r,Math.max(a,Ve+(e.clientX-Je)));t.style.width=i+"px",s.width=i}const c=e.clientY-et;if("top"===Ze)if(!1===s.floating){let e=he(c,0,r-o),n=r-e;t.style.top=e+"px",t.style.height=n+"px",s.top=e,s.height=n}else{let e=he(c,0,Xe+Ye-o),n=Ye-(e-Xe);n=Math.min(n,r),t.style.top=e+"px",t.style.height=n+"px",s.top=e,s.height=n}if("left"===Ze||"right"===Ze)if(!1===s.floating){let e=he(c,0,r-o),n=r-e;t.style.top=e+"px",t.style.height=n+"px",s.top=e,s.height=n}else{let e=he(c,0,Xe+Ye-o),n=Ye-(e-Xe);n=Math.min(n,r-e),t.style.top=e+"px",t.style.height=n+"px",s.top=e,s.height=n}t.offsetHeight>r&&(t.style.height=r+"px",!1===s.floating&&(t.style.top="0px",s.top=0),s.height=r),me(s),ce()})),document.addEventListener("mouseup",(()=>{Ge=!1,document.body.style.userSelect=""})),window.addEventListener("resize",(()=>{le(),ce()})),function(){const e=document.getElementById("messages-panel");if(!e)return;new MutationObserver((()=>{ce(),K(),q(),Se()})).observe(e,{childList:!0,subtree:!0})}();const e=new Pe("user-list"),t=new Te("messages-panel",ge(w.username)),n=function(e,t,n,r){const i=e=>e&&t.updatePresence(e),a=e=>e&&n.processMessages(e);return{userManager:t,messageManager:n,presenceInterval:null,isReconnecting:!1,isConnected:!1,async connect(){try{this.presenceInterval&&(clearInterval(this.presenceInterval),this.presenceInterval=null);let t=5;for(;t>0&&!this.isConnected;)try{const t=await e.connect();console.log("💬 Step 8: Joining chat room...");const n=`<body rid='${e.nextRid()}' sid='${t.sid}'\n xmlns='http://jabber.org/protocol/httpbind'>\n <presence id='pres_1' xmlns='jabber:client' to='[email protected]/${r}'>\n <x xmlns='http://jabber.org/protocol/muc'/>\n </presence>\n </body>`,o=await e.sendRequestWithRetry(n);console.log("📥 Join response:",o),i(o),a(o);const s=`<body rid='${e.nextRid()}' sid='${t.sid}'\n xmlns='http://jabber.org/protocol/httpbind'>\n <iq type='get' id='info1' xmlns='jabber:client' to='[email protected]'>\n <query xmlns='http://jabber.org/protocol/disco#info'/>\n </iq>\n </body>`;await e.sendRequestWithRetry(s),console.log("🚀 Step 10: Connected! Starting presence updates..."),this.isConnected=!0,this.isReconnecting&&(Le("Chat connected successfully!",{type:"success"}),this.isReconnecting=!1),this.startPresencePolling(e);break}catch(e){console.error(`💥 Connection error: ${e.message}`),t--,0===t?(console.log("⏳ Scheduling reconnection attempt in 5 seconds..."),this.isReconnecting=!0,setTimeout((()=>this.connect()),v)):(console.log(`🔄 Retrying connection... (${t} attempts left)`),await new Promise((e=>setTimeout(e,5e3))))}}catch(e){console.error(`💥 Final connection error: ${e.message}`),this.isConnected=!1,this.isReconnecting||(console.log("⏳ Scheduling reconnection attempt in 5 seconds..."),this.isReconnecting=!0,setTimeout((()=>this.connect()),v))}},startPresencePolling(e){this.presenceInterval=setInterval((async()=>{if(this.isConnected)try{const t=await e.sendRequestWithRetry(`<body rid='${e.nextRid()}' sid='${e.sid}' xmlns='http://jabber.org/protocol/httpbind'/>`);i(t),a(t),this.isReconnecting=!1}catch(e){console.error("Presence polling error:",e.message),e.message.includes("404")&&!this.isReconnecting&&(console.log("🛑 Connection lost (404). Reconnecting in 5 seconds..."),Le("Chat connection lost. Reconnecting...",{type:"warning"}),n.clearMessages(),this.isReconnecting=!0,this.isConnected=!1,clearInterval(this.presenceInterval),this.presenceInterval=null,setTimeout((()=>this.connect()),v))}else console.log("⚠️ Skipping presence poll - not connected")}),5e3)},sendMessage(t){if(this.isReconnecting||!this.isConnected)return void console.warn("⚠️ Message not sent - connection not ready");const i=`msg_${Date.now()}`;let o;$e.isPrivateMode&&$e.fullJid?(o=`\n <body rid='${e.nextRid()}' sid='${e.sid}' xmlns='http://jabber.org/protocol/httpbind'>\n <message from='${r}@jabber.klavogonki.ru/web'\n to='${$e.fullJid}'\n type='chat'\n id='${i}'\n xmlns='jabber:client'>\n <body>${t}</body>\n <x xmlns='klavogonki:userdata'>\n <user>\n <login>${r.replace(/^\d+#/,"")}</login>\n <avatar>/storage/avatars/${r.split("#")[0]}.png</avatar>\n <background>#7788cc</background>\n </user>\n </x>\n </message>\n </body>`,n.addSentMessage(t,{isPrivate:!0,recipient:$e.targetUsername})):(o=`\n <body rid='${e.nextRid()}' sid='${e.sid}' xmlns='http://jabber.org/protocol/httpbind'>\n <message to='[email protected]'\n type='groupchat'\n id='${i}'\n xmlns='jabber:client'>\n <body>${t}</body>\n </message>\n </body>`,n.addSentMessage(t)),e.sendRequestWithRetry(o).then((e=>a(e))).catch((e=>console.error("Message send error:",e.message)))}}}(new C({username:w.username,password:w.password,bindUrl:b,delay:200}),e,t,w.username),r=document.getElementById("message-input"),i=()=>{const e=r.value.trim();e&&(n.sendMessage(e),r.value="",r.focus())};document.getElementById("send-button").addEventListener("click",i),r.addEventListener("keypress",(e=>"Enter"===e.key&&i())),function(){const e=document.getElementById("message-input");e&&(e.addEventListener("keydown",(e=>{"Escape"===e.key&&$e.isPrivateMode&&(Ae(),e.preventDefault())})),e.addEventListener("input",(()=>{ze(e)})))}(),He.setupHelpCommandEvents(),await n.connect(),window.xmppClient=n,r.addEventListener("input",(function(e){ze(e.target)}))}catch(e){console.error("App init error:",e),localStorage.removeItem("klavoauth"),window.location.href="https://klavogonki.ru/gamelist/"}}()})();