index of
/
home
/
thefkyzp
/
hulmvisaadvisor.com
/
wp-content
/
plugins
/
chaty
/
admin
/
assets
/
js
/
File: /home/thefkyzp/hulmvisaadvisor.com/wp-content/plugins/chaty/admin/assets/js/picmo-umd.min.js
var ye=(e,t,o)=>{if(!t.has(e))throw TypeError("Cannot "+o)},w=(e,t,o)=>(ye(e,t,"read from private field"),o?o.call(e):t.get(e)),b=(e,t,o)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,o)},J=(e,t,o,i)=>(ye(e,t,"write to private field"),i?i.call(e,o):t.set(e,o),o),v=(e,t,o)=>(ye(e,t,"access private method"),o);!function(e,t){"object"==typeof exports&&typeof module<"u"?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=typeof globalThis<"u"?globalThis:e||self).picmo={})}(this,(function(e){var t,o,i,s,r,a,n,c,l,h,d,m,u,p;async function g(e,t={}){const{local:o=!1,version:i="latest",cdnUrl:s,...r}=t,a=function(e,t,o){let i=`https://cdn.jsdelivr.net/npm/emojibase-data@${t}/${e}`;return"function"==typeof o?i=o(e,t):"string"==typeof o&&(i=`${o}/${e}`),i}(e,i,s),n=o?localStorage:sessionStorage,c=`emojibase/${i}/${e}`,l=n.getItem(c);if(l)return Promise.resolve(JSON.parse(l));const h=await fetch(a,{credentials:"omit",mode:"cors",redirect:"error",...r});if(!h.ok)throw new Error("Failed to load Emojibase dataset.");const d=await h.json();try{n.setItem(c,JSON.stringify(d))}catch{}return d}const y={discord:"joypixels",slack:"iamcal"};async function f(e,t,o){var i;return g(`${e}/shortcodes/${null!==(i=y[t])&&void 0!==i?i:t}.json`,o)}function j(e,t){if(0===t.length)return e;const o=new Set(e.shortcodes);return t.forEach((t=>{const i=t[e.hexcode];Array.isArray(i)?i.forEach((e=>o.add(e))):i&&o.add(i)})),e.shortcodes=[...o],e.skins&&e.skins.forEach((e=>{j(e,t)})),e}async function C(e,t={}){const{compact:o=!1,flat:i=!1,shortcodes:s=[],...r}=t,a=await g(`${e}/${o?"compact":"data"}.json`,r);let n=[];return s.length>0&&(n=await Promise.all(s.map((t=>{let o;if(t.includes("/")){const[e,i]=t.split("/");o=f(e,i,r)}else o=f(e,t,r);return o.catch((()=>({})))})))),i?function(e,t=[]){const o=[];return e.forEach((e=>{if(e.skins){const{skins:i,...s}=e;o.push(j(s,t)),i.forEach((e=>{const i={...e};s.tags&&(i.tags=[...s.tags]),o.push(j(i,t))}))}else o.push(j(e,t))})),o}(a,n):function(e,t){return 0===t.length||e.forEach((e=>{j(e,t)})),e}(a,n)}async function k(e,t){return g(`${e}/messages.json`,t)}function _(e,t){const o=e.target.closest("[data-emoji]");if(o){const e=t.find((e=>e.emoji===o.dataset.emoji));if(e)return e}return null}function x(e){var t;const o=null==(t=window.matchMedia)?void 0:t.call(window,"(prefers-reduced-motion: reduce)");return e.animate&&!(null!=o&&o.matches)}function E(e,t){return e.toLowerCase().includes(t.toLowerCase())}function S(e,t){let o=null;return()=>{o||(o=window.setTimeout((()=>{e(),o=null}),t))}}function z(e,t){let o=null;return(...i)=>{o&&window.clearTimeout(o),o=window.setTimeout((()=>{e(...i),o=null}),t)}}function P(e,t,o,i){if(x(i)&&e.animate)return e.animate(t,o).finished;const s="normal"===o.direction?1:0,r=Object.entries(t).reduce(((e,[t,o])=>({...e,[t]:o[s]})),{});return Object.assign(e.style,r),Promise.resolve()}function L(e){var t;const o=document.createElement("template");return o.innerHTML=e,null==(t=o.content)?void 0:t.firstElementChild}async function F(e){const t=(new TextEncoder).encode(e),o=await crypto.subtle.digest("SHA-256",t);return Array.from(new Uint8Array(o)).map((e=>e.toString(16).padStart(2,"0"))).join("")}function $(...e){return e.reduce(((e,t)=>({...e,[t]:A(t)})),{})}function A(e){return`picmo__${e}`}function I(e){for(;e.firstChild;)e.removeChild(e.firstChild);return e}function T(e,...t){I(e).append(...t)}function M(e){try{return window[e].length,!0}catch{return!1}}function V(){return M("sessionStorage")}function R(){return M("localStorage")}function D(e){var t;return{emoji:e.emoji,label:e.label,tags:e.tags,skins:null==(t=e.skins)?void 0:t.map((e=>D(e))),order:e.order,custom:!1,hexcode:e.hexcode,version:e.version}}function B(e,t,o){var i;return!(o&&!o.some((t=>t.order===e.group)))&&(E(e.label,t)||(null==(i=e.tags)?void 0:i.some((e=>E(e,t)))))}class N{constructor(e="en"){this.locale=e}}const H=[(e,t)=>("1F91D"===e.hexcode&&t<14&&(e.skins=[]),e),(e,t)=>(e.skins&&(e.skins=e.skins.filter((e=>!e.version||e.version<=t))),e)];function O(e,t){return e.filter((e=>null!==function(e,t){return H.some((o=>null===o(e,t)))?null:e}(e,t)))}const K={};function U(e){return K[e]||(K[e]=new W(e)),K[e]}U.deleteDatabase=e=>{};class W extends N{open(){return Promise.resolve()}delete(){return Promise.resolve()}close(){}isPopulated(){return Promise.resolve(!1)}getEmojiCount(){return Promise.resolve(this.emojis.length)}getEtags(){return Promise.resolve({foo:"bar"})}getHash(){return Promise.resolve("")}populate(e){return this.categories=e.groups,this.emojis=e.emojis,Promise.resolve()}getCategories(e){var t;let o=this.categories.filter((e=>"component"!==e.key));if(e.showRecents&&o.unshift({key:"recents",order:-1}),null!=(t=e.custom)&&t.length&&o.push({key:"custom",order:10}),e.categories){const t=e.categories;o=o.filter((e=>t.includes(e.key))),o.sort(((e,o)=>t.indexOf(e.key)-t.indexOf(o.key)))}else o.sort(((e,t)=>e.order-t.order));return Promise.resolve(o)}getEmojis(e,t){const o=this.emojis.filter((t=>t.group===e.order)).filter((e=>e.version<=t)).sort(((e,t)=>null!=e.order&&null!=t.order?e.order-t.order:0)).map(D);return Promise.resolve(O(o,t))}searchEmojis(e,t,o,i){const s=this.emojis.filter((t=>B(t,e,i)&&t.version<=o)).map(D),r=t.filter((t=>B(t,e,i))),a=[...O(s,o),...r];return Promise.resolve(a)}setMeta(e){this.meta=e}}async function q(e){try{return(await fetch(e,{method:"HEAD"})).headers.get("etag")}catch{return null}}async function G(e,t,o){let i=o||t(e);try{await i.open()}catch{console.warn("[picmo] IndexedDB not available, falling back to InMemoryStoreFactory"),i=U(e)}return i}async function Z(e,t,o){if(!V()&&typeof window<"u")throw new Error("Session storage is required to use CDN emoji data.");const i=await G(e,t,o),[s,r]=await function(e){const{emojisUrl:t,messagesUrl:o}=function(e,t){const o=`https://cdn.jsdelivr.net/npm/emojibase-data@${"latest"}/${t}`;return{emojisUrl:`${o}/data.json`,messagesUrl:`${o}/messages.json`}}(0,e);try{return Promise.all([q(t),q(o)])}catch{return Promise.all([null,null])}}(e);if(await i.isPopulated())s&&r&&await async function(e,t,o){let i;try{i=await e.getEtags()}catch{i={}}const{storedEmojisEtag:s,storedMessagesEtag:r}=i;if(o!==r||t!==s){const[i,s]=await Promise.all([k(e.locale),C(e.locale)]);await e.populate({groups:i.groups,emojis:s,emojisEtag:t,messagesEtag:o})}}(i,s,r);else{const[t,o]=await Promise.all([k(e),C(e)]);await i.populate({groups:t.groups,emojis:o,emojisEtag:s,messagesEtag:r})}return i}async function Y(e,t,o,i,s){return o&&i?async function(e,t,o,i,s){const r=await G(e,t,s),a=await F(i);return(!await r.isPopulated()||await async function(e,t){return t!==await e.getHash()}(r,a))&&await r.populate({groups:o.groups,emojis:i,hash:a}),r}(e,t,o,i,s):Z(e,t,s)}class Q{constructor(){this.handleKeyDown=this.handleKeyDown.bind(this)}activate(e){this.rootElement=e,this.rootElement.addEventListener("keydown",this.handleKeyDown)}deactivate(){var e;null==(e=this.rootElement)||e.removeEventListener("keydown",this.handleKeyDown)}get focusableElements(){return this.rootElement.querySelectorAll('input, [tabindex="0"]')}get lastFocusableElement(){return this.focusableElements[this.focusableElements.length-1]}get firstFocusableElement(){return this.focusableElements[0]}checkFocus(e,t,o){e.target===t&&(o.focus(),e.preventDefault())}handleKeyDown(e){"Tab"===e.key&&this.checkFocus(e,e.shiftKey?this.firstFocusableElement:this.lastFocusableElement,e.shiftKey?this.lastFocusableElement:this.firstFocusableElement)}}const{light:X,dark:ee,auto:te}=$("light","dark","auto");class oe{constructor({template:e,classes:t,parent:o}){this.isDestroyed=!1,this.appEvents={},this.uiEvents=[],this.uiElements={},this.ui={},this.template=e,this.classes=t,this.parent=o,this.keyBindingHandler=this.keyBindingHandler.bind(this)}initialize(){this.bindAppEvents()}setCustomEmojis(e){this.customEmojis=e}setEvents(e){this.events=e}setPickerId(e){this.pickerId=e}emit(e,...t){this.events.emit(e,...t)}setI18n(e){this.i18n=e}setRenderer(e){this.renderer=e}setEmojiData(e){this.emojiDataPromise=e,e.then((e=>{this.emojiData=e}))}updateEmojiData(e){this.emojiData=e,this.emojiDataPromise=Promise.resolve(e)}setOptions(e){this.options=e}renderSync(e={}){return this.el=this.template.renderSync({classes:this.classes,i18n:this.i18n,pickerId:this.pickerId,...e}),this.postRender(),this.el}async render(e={}){return await this.emojiDataPromise,this.el=await this.template.renderAsync({classes:this.classes,i18n:this.i18n,pickerId:this.pickerId,...e}),this.postRender(),this.el}postRender(){this.bindUIElements(),this.bindKeyBindings(),this.bindUIEvents(),this.scheduleShowAnimation()}bindAppEvents(){Object.keys(this.appEvents).forEach((e=>{this.events.on(e,this.appEvents[e],this)})),this.events.on("data:ready",this.updateEmojiData,this)}unbindAppEvents(){Object.keys(this.appEvents).forEach((e=>{this.events.off(e,this.appEvents[e])})),this.events.off("data:ready",this.updateEmojiData)}keyBindingHandler(e){const t=this.keyBindings[e.key];t&&t.call(this,e)}bindKeyBindings(){this.keyBindings&&this.el.addEventListener("keydown",this.keyBindingHandler)}unbindKeyBindings(){this.keyBindings&&this.el.removeEventListener("keydown",this.keyBindingHandler)}bindUIElements(){this.ui=Object.keys(this.uiElements).reduce(((e,t)=>({...e,[t]:this.el.querySelector(this.uiElements[t])})),{})}bindUIEvents(){this.uiEvents.forEach((e=>{e.handler=e.handler.bind(this),(e.target?this.ui[e.target]:this.el).addEventListener(e.event,e.handler,e.options)}))}unbindUIEvents(){this.uiEvents.forEach((e=>{(e.target?this.ui[e.target]:this.el).removeEventListener(e.event,e.handler)}))}destroy(){this.unbindAppEvents(),this.unbindUIEvents(),this.unbindKeyBindings(),this.el.remove(),this.isDestroyed=!0}scheduleShowAnimation(){if(this.parent){const e=new MutationObserver((t=>{const[o]=t;"childList"===o.type&&o.addedNodes[0]===this.el&&(x(this.options)&&this.animateShow&&this.animateShow(),e.disconnect)}));e.observe(this.parent,{childList:!0})}}static childEvent(e,t,o,i={}){return{target:e,event:t,handler:o,options:i}}static uiEvent(e,t,o={}){return{event:e,handler:t,options:o}}static byClass(e){return`.${e}`}}const ie={clock:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">\x3c!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --\x3e<path d="M256 512C114.6 512 0 397.4 0 256C0 114.6 114.6 0 256 0C397.4 0 512 114.6 512 256C512 397.4 397.4 512 256 512zM232 256C232 264 236 271.5 242.7 275.1L338.7 339.1C349.7 347.3 364.6 344.3 371.1 333.3C379.3 322.3 376.3 307.4 365.3 300L280 243.2V120C280 106.7 269.3 96 255.1 96C242.7 96 231.1 106.7 231.1 120L232 256z"/></svg>',flag:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">\x3c!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --\x3e<path d="M64 496C64 504.8 56.75 512 48 512h-32C7.25 512 0 504.8 0 496V32c0-17.75 14.25-32 32-32s32 14.25 32 32V496zM476.3 0c-6.365 0-13.01 1.35-19.34 4.233c-45.69 20.86-79.56 27.94-107.8 27.94c-59.96 0-94.81-31.86-163.9-31.87C160.9 .3055 131.6 4.867 96 15.75v350.5c32-9.984 59.87-14.1 84.85-14.1c73.63 0 124.9 31.78 198.6 31.78c31.91 0 68.02-5.971 111.1-23.09C504.1 355.9 512 344.4 512 332.1V30.73C512 11.1 495.3 0 476.3 0z"/></svg>',frown:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">\x3c!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --\x3e<path d="M0 256C0 114.6 114.6 0 256 0C397.4 0 512 114.6 512 256C512 397.4 397.4 512 256 512C114.6 512 0 397.4 0 256zM176.4 240C194 240 208.4 225.7 208.4 208C208.4 190.3 194 176 176.4 176C158.7 176 144.4 190.3 144.4 208C144.4 225.7 158.7 240 176.4 240zM336.4 176C318.7 176 304.4 190.3 304.4 208C304.4 225.7 318.7 240 336.4 240C354 240 368.4 225.7 368.4 208C368.4 190.3 354 176 336.4 176zM259.9 369.4C288.8 369.4 316.2 375.2 340.6 385.5C352.9 390.7 366.7 381.3 361.4 369.1C344.8 330.9 305.6 303.1 259.9 303.1C214.3 303.1 175.1 330.8 158.4 369.1C153.1 381.3 166.1 390.6 179.3 385.4C203.7 375.1 231 369.4 259.9 369.4L259.9 369.4z"/></svg>',gamepad:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512">\x3c!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --\x3e<path d="M448 64H192C85.96 64 0 149.1 0 256s85.96 192 192 192h256c106 0 192-85.96 192-192S554 64 448 64zM247.1 280h-32v32c0 13.2-10.78 24-23.98 24c-13.2 0-24.02-10.8-24.02-24v-32L136 279.1C122.8 279.1 111.1 269.2 111.1 256c0-13.2 10.85-24.01 24.05-24.01L167.1 232v-32c0-13.2 10.82-24 24.02-24c13.2 0 23.98 10.8 23.98 24v32h32c13.2 0 24.02 10.8 24.02 24C271.1 269.2 261.2 280 247.1 280zM431.1 344c-22.12 0-39.1-17.87-39.1-39.1s17.87-40 39.1-40s39.1 17.88 39.1 40S454.1 344 431.1 344zM495.1 248c-22.12 0-39.1-17.87-39.1-39.1s17.87-40 39.1-40c22.12 0 39.1 17.88 39.1 40S518.1 248 495.1 248z"/></svg>',lightbulb:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512">\x3c!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --\x3e<path d="M112.1 454.3c0 6.297 1.816 12.44 5.284 17.69l17.14 25.69c5.25 7.875 17.17 14.28 26.64 14.28h61.67c9.438 0 21.36-6.401 26.61-14.28l17.08-25.68c2.938-4.438 5.348-12.37 5.348-17.7L272 415.1h-160L112.1 454.3zM191.4 .0132C89.44 .3257 16 82.97 16 175.1c0 44.38 16.44 84.84 43.56 115.8c16.53 18.84 42.34 58.23 52.22 91.45c.0313 .25 .0938 .5166 .125 .7823h160.2c.0313-.2656 .0938-.5166 .125-.7823c9.875-33.22 35.69-72.61 52.22-91.45C351.6 260.8 368 220.4 368 175.1C368 78.61 288.9-.2837 191.4 .0132zM192 96.01c-44.13 0-80 35.89-80 79.1C112 184.8 104.8 192 96 192S80 184.8 80 176c0-61.76 50.25-111.1 112-111.1c8.844 0 16 7.159 16 16S200.8 96.01 192 96.01z"/></svg>',mug:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512">\x3c!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --\x3e<path d="M512 32H120c-13.25 0-24 10.75-24 24L96.01 288c0 53 43 96 96 96h192C437 384 480 341 480 288h32c70.63 0 128-57.38 128-128S582.6 32 512 32zM512 224h-32V96h32c35.25 0 64 28.75 64 64S547.3 224 512 224zM560 416h-544C7.164 416 0 423.2 0 432C0 458.5 21.49 480 48 480h480c26.51 0 48-21.49 48-48C576 423.2 568.8 416 560 416z"/></svg>',plane:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512">\x3c!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --\x3e<path d="M482.3 192C516.5 192 576 221 576 256C576 292 516.5 320 482.3 320H365.7L265.2 495.9C259.5 505.8 248.9 512 237.4 512H181.2C170.6 512 162.9 501.8 165.8 491.6L214.9 320H112L68.8 377.6C65.78 381.6 61.04 384 56 384H14.03C6.284 384 0 377.7 0 369.1C0 368.7 .1818 367.4 .5398 366.1L32 256L.5398 145.9C.1818 144.6 0 143.3 0 142C0 134.3 6.284 128 14.03 128H56C61.04 128 65.78 130.4 68.8 134.4L112 192H214.9L165.8 20.4C162.9 10.17 170.6 0 181.2 0H237.4C248.9 0 259.5 6.153 265.2 16.12L365.7 192H482.3z"/></svg>',robot:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512">\x3c!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --\x3e<path d="M9.375 233.4C3.375 239.4 0 247.5 0 256v128c0 8.5 3.375 16.62 9.375 22.62S23.5 416 32 416h32V224H32C23.5 224 15.38 227.4 9.375 233.4zM464 96H352V32c0-17.62-14.38-32-32-32S288 14.38 288 32v64H176C131.8 96 96 131.8 96 176V448c0 35.38 28.62 64 64 64h320c35.38 0 64-28.62 64-64V176C544 131.8 508.3 96 464 96zM256 416H192v-32h64V416zM224 296C201.9 296 184 278.1 184 256S201.9 216 224 216S264 233.9 264 256S246.1 296 224 296zM352 416H288v-32h64V416zM448 416h-64v-32h64V416zM416 296c-22.12 0-40-17.88-40-40S393.9 216 416 216S456 233.9 456 256S438.1 296 416 296zM630.6 233.4C624.6 227.4 616.5 224 608 224h-32v192h32c8.5 0 16.62-3.375 22.62-9.375S640 392.5 640 384V256C640 247.5 636.6 239.4 630.6 233.4z"/></svg>',sad:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">\n <defs>\n <radialGradient gradientUnits="userSpaceOnUse" cy="10%" id="gradient-0">\n <stop offset="0" stop-color="hsl(50, 100%, 50%)" />\n <stop offset="1" stop-color="hsl(50, 100%, 60%)" />\n </radialGradient>\n </defs>\n \x3c!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --\x3e\n <ellipse stroke="#000" fill="rgba(0, 0, 0, 0.6)" cx="172.586" cy="207.006" rx="39.974" ry="39.974"/>\n <ellipse stroke="#000" fill="rgba(0, 0, 0, 0.6)" cx="334.523" cy="207.481" rx="39.974" ry="39.974"/>\n <ellipse stroke="#000" fill="rgba(0, 0, 0, 0.6)" cx="313.325" cy="356.208" rx="91.497" ry="59.893"/>\n <path fill="#55a7ff" d="M 159.427 274.06 L 102.158 363.286 L 124.366 417.011 L 160.476 423.338 L 196.937 414.736 L 218.502 375.214"></path>\n <path fill="url(#gradient-0)" d="M256 0C397.4 0 512 114.6 512 256C512 397.4 397.4 512 256 512C114.6 512 0 397.4 0 256C0 114.6 114.6 0 256 0zM256 352C290.9 352 323.2 367.8 348.3 394.9C354.3 401.4 364.4 401.7 370.9 395.7C377.4 389.7 377.7 379.6 371.7 373.1C341.6 340.5 301 320 256 320C247.2 320 240 327.2 240 336C240 344.8 247.2 352 256 352H256zM208 369C208 349 179.6 308.6 166.4 291.3C163.2 286.9 156.8 286.9 153.6 291.3C140.6 308.6 112 349 112 369C112 395 133.5 416 160 416C186.5 416 208 395 208 369H208zM303.6 208C303.6 225.7 317.1 240 335.6 240C353.3 240 367.6 225.7 367.6 208C367.6 190.3 353.3 176 335.6 176C317.1 176 303.6 190.3 303.6 208zM207.6 208C207.6 190.3 193.3 176 175.6 176C157.1 176 143.6 190.3 143.6 208C143.6 225.7 157.1 240 175.6 240C193.3 240 207.6 225.7 207.6 208z" />\n</svg>',search:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">\x3c!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --\x3e<path d="M500.3 443.7l-119.7-119.7c27.22-40.41 40.65-90.9 33.46-144.7C401.8 87.79 326.8 13.32 235.2 1.723C99.01-15.51-15.51 99.01 1.724 235.2c11.6 91.64 86.08 166.7 177.6 178.9c53.8 7.189 104.3-6.236 144.7-33.46l119.7 119.7c15.62 15.62 40.95 15.62 56.57 0C515.9 484.7 515.9 459.3 500.3 443.7zM79.1 208c0-70.58 57.42-128 128-128s128 57.42 128 128c0 70.58-57.42 128-128 128S79.1 278.6 79.1 208z"/></svg>',smiley:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">\x3c!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --\x3e<path d="M0 256C0 114.6 114.6 0 256 0C397.4 0 512 114.6 512 256C512 397.4 397.4 512 256 512C114.6 512 0 397.4 0 256zM256.3 331.8C208.9 331.8 164.1 324.9 124.5 312.8C112.2 309 100.2 319.7 105.2 331.5C130.1 390.6 188.4 432 256.3 432C324.2 432 382.4 390.6 407.4 331.5C412.4 319.7 400.4 309 388.1 312.8C348.4 324.9 303.7 331.8 256.3 331.8H256.3zM176.4 176C158.7 176 144.4 190.3 144.4 208C144.4 225.7 158.7 240 176.4 240C194 240 208.4 225.7 208.4 208C208.4 190.3 194 176 176.4 176zM336.4 240C354 240 368.4 225.7 368.4 208C368.4 190.3 354 176 336.4 176C318.7 176 304.4 190.3 304.4 208C304.4 225.7 318.7 240 336.4 240z"/></svg>',symbols:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">\x3c!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --\x3e<path d="M500.3 7.251C507.7 13.33 512 22.41 512 31.1V175.1C512 202.5 483.3 223.1 447.1 223.1C412.7 223.1 383.1 202.5 383.1 175.1C383.1 149.5 412.7 127.1 447.1 127.1V71.03L351.1 90.23V207.1C351.1 234.5 323.3 255.1 287.1 255.1C252.7 255.1 223.1 234.5 223.1 207.1C223.1 181.5 252.7 159.1 287.1 159.1V63.1C287.1 48.74 298.8 35.61 313.7 32.62L473.7 .6198C483.1-1.261 492.9 1.173 500.3 7.251H500.3zM74.66 303.1L86.5 286.2C92.43 277.3 102.4 271.1 113.1 271.1H174.9C185.6 271.1 195.6 277.3 201.5 286.2L213.3 303.1H239.1C266.5 303.1 287.1 325.5 287.1 351.1V463.1C287.1 490.5 266.5 511.1 239.1 511.1H47.1C21.49 511.1-.0019 490.5-.0019 463.1V351.1C-.0019 325.5 21.49 303.1 47.1 303.1H74.66zM143.1 359.1C117.5 359.1 95.1 381.5 95.1 407.1C95.1 434.5 117.5 455.1 143.1 455.1C170.5 455.1 191.1 434.5 191.1 407.1C191.1 381.5 170.5 359.1 143.1 359.1zM440.3 367.1H496C502.7 367.1 508.6 372.1 510.1 378.4C513.3 384.6 511.6 391.7 506.5 396L378.5 508C372.9 512.1 364.6 513.3 358.6 508.9C352.6 504.6 350.3 496.6 353.3 489.7L391.7 399.1H336C329.3 399.1 323.4 395.9 321 389.6C318.7 383.4 320.4 376.3 325.5 371.1L453.5 259.1C459.1 255 467.4 254.7 473.4 259.1C479.4 263.4 481.6 271.4 478.7 278.3L440.3 367.1zM116.7 219.1L19.85 119.2C-8.112 90.26-6.614 42.31 24.85 15.34C51.82-8.137 93.26-3.642 118.2 21.83L128.2 32.32L137.7 21.83C162.7-3.642 203.6-8.137 231.6 15.34C262.6 42.31 264.1 90.26 236.1 119.2L139.7 219.1C133.2 225.6 122.7 225.6 116.7 219.1H116.7z"/></svg>',tree:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512">\x3c!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --\x3e<path d="M413.8 447.1L256 448l0 31.99C256 497.7 241.8 512 224.1 512c-17.67 0-32.1-14.32-32.1-31.99l0-31.99l-158.9-.0099c-28.5 0-43.69-34.49-24.69-56.4l68.98-79.59H62.22c-25.41 0-39.15-29.8-22.67-49.13l60.41-70.85H89.21c-21.28 0-32.87-22.5-19.28-37.31l134.8-146.5c10.4-11.3 28.22-11.3 38.62-.0033l134.9 146.5c13.62 14.81 2.001 37.31-19.28 37.31h-10.77l60.35 70.86c16.46 19.34 2.716 49.12-22.68 49.12h-15.2l68.98 79.59C458.7 413.7 443.1 447.1 413.8 447.1z"/></svg>',users:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512">\x3c!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --\x3e<path d="M224 256c70.7 0 128-57.31 128-128S294.7 0 224 0C153.3 0 96 57.31 96 128S153.3 256 224 256zM274.7 304H173.3c-95.73 0-173.3 77.6-173.3 173.3C0 496.5 15.52 512 34.66 512H413.3C432.5 512 448 496.5 448 477.3C448 381.6 370.4 304 274.7 304zM479.1 320h-73.85C451.2 357.7 480 414.1 480 477.3C480 490.1 476.2 501.9 470 512h138C625.7 512 640 497.6 640 479.1C640 391.6 568.4 320 479.1 320zM432 256C493.9 256 544 205.9 544 144S493.9 32 432 32c-25.11 0-48.04 8.555-66.72 22.51C376.8 76.63 384 101.4 384 128c0 35.52-11.93 68.14-31.59 94.71C372.7 243.2 400.8 256 432 256z"/></svg>',warning:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">\n <defs>\n <radialGradient id="radial" cy="85%">\n <stop offset="20%" stop-color="var(--color-secondary)" />\n <stop offset="100%" stop-color="var(--color-primary)" />\n </radialGradient>\n </defs>\n \x3c!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --\x3e\n <path fill="url(\'#radial\')" d="M506.3 417l-213.3-364c-16.33-28-57.54-28-73.98 0l-213.2 364C-10.59 444.9 9.849 480 42.74 480h426.6C502.1 480 522.6 445 506.3 417zM232 168c0-13.25 10.75-24 24-24S280 154.8 280 168v128c0 13.25-10.75 24-23.1 24S232 309.3 232 296V168zM256 416c-17.36 0-31.44-14.08-31.44-31.44c0-17.36 14.07-31.44 31.44-31.44s31.44 14.08 31.44 31.44C287.4 401.9 273.4 416 256 416z" />\n</svg>',xmark:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512">\x3c!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --\x3e<path d="M310.6 361.4c12.5 12.5 12.5 32.75 0 45.25C304.4 412.9 296.2 416 288 416s-16.38-3.125-22.62-9.375L160 301.3L54.63 406.6C48.38 412.9 40.19 416 32 416S15.63 412.9 9.375 406.6c-12.5-12.5-12.5-32.75 0-45.25l105.4-105.4L9.375 150.6c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0L160 210.8l105.4-105.4c12.5-12.5 32.75-12.5 45.25 0s12.5 32.75 0 45.25l-105.4 105.4L310.6 361.4z"/></svg>'},se={recents:"clock","smileys-emotion":"smiley","people-body":"users","animals-nature":"tree","food-drink":"mug",activities:"gamepad","travel-places":"plane",objects:"lightbulb",symbols:"symbols",flags:"flag",custom:"robot"};function re(e,t){if(!(e in ie))return console.warn(`Unknown icon: "${e}"`),document.createElement("div");const o=function(e,t){const o=L(t);return o.dataset.icon=e,o.classList.add(A("icon")),o}(e,ie[e]);return t&&o.classList.add(A(`icon-${t}`)),o}const ae="sync";class ne{constructor(e,s={}){b(this,i),b(this,r),b(this,n),b(this,t,void 0),b(this,o,void 0),J(this,t,e),J(this,o,s.mode||ae)}renderSync(e={}){const o=L(w(this,t).call(this,e));return v(this,n,c).call(this,o,e),v(this,r,a).call(this,o),v(this,i,s).call(this,o,e),o}async renderAsync(e={}){const o=L(w(this,t).call(this,e));return v(this,n,c).call(this,o,e),v(this,r,a).call(this,o),await v(this,i,s).call(this,o,e),o}render(e){return"sync"===w(this,o)?this.renderSync(e):this.renderAsync(e)}}t=new WeakMap,o=new WeakMap,i=new WeakSet,s=async function(e,t){const o=e.querySelectorAll("[data-view]"),i=[];for(const e of o){const o=t[e.dataset.view];o?"sync"!==e.dataset.render?i.push(o.render().then((t=>(e.replaceWith(t),t)))):e.replaceWith(o.renderSync()):e.remove()}return Promise.all(i)},r=new WeakSet,a=function(e){e.querySelectorAll("i[data-icon]").forEach((e=>{const{icon:t,size:o}=e.dataset;e.replaceWith(re(t,o))}))},n=new WeakSet,c=function(e,t){return e.querySelectorAll("[data-placeholder]").forEach((e=>{const o=e.dataset.placeholder;if(o&&t[o]){const i=t[o];e.replaceWith(...[i].flat())}else console.warn(`Missing placeholder element for key "${o}"`)})),e};const ce=$("imagePlaceholder","placeholder"),le=new ne((({classes:e})=>`\n <div class="${e.placeholder} ${e.imagePlaceholder}"></div>\n`));class he extends oe{constructor({classNames:e}={}){super({template:le,classes:ce}),this.classNames=e}load(e){const t=document.createElement("img");this.classNames&&(t.className=this.classNames),t.addEventListener("load",(()=>{this.el.replaceWith(t)}),{once:!0}),Promise.resolve(e).then((e=>t.src=e))}renderSync(){return super.renderSync(),this.classNames&&this.classNames.split(" ").forEach((e=>this.el.classList.add(e))),this.el}}const de=$("customEmoji");class me{renderElement(e){return{content:e}}renderImage(e="",t){const o=new he({classNames:e});return o.renderSync(),{content:o,resolver:()=>(o.load(t()),o.el)}}doRender(e,t,o){if(e.custom)return this.renderCustom(e,t,o);const{content:i,resolver:s}=this.render(e,o),r=i instanceof Element?i:i.el;return s&&s(),r}doEmit(e){return e.custom?this.emitCustom(e):this.emit(e)}emitCustom({url:e,label:t,emoji:o,data:i}){return{url:e,label:t,emoji:o,data:i}}renderCustom(e,t,o=""){const i=[de.customEmoji,o].join(" ").trim(),{content:s,resolver:r}=this.renderImage(i,(()=>e.url)),a=s instanceof Element?s:s.el;return r&&r(),a}}const ue=new ne((({emoji:e})=>`<span>${e}</span>`));class pe extends me{render(e){return this.renderElement(ue.renderSync({emoji:e.emoji}))}emit({emoji:e,hexcode:t,label:o}){return{emoji:e,hexcode:t,label:o}}}const ge={"categories.activities":"Activities","categories.animals-nature":"Animals & Nature","categories.custom":"Custom","categories.flags":"Flags","categories.food-drink":"Food & Drink","categories.objects":"Objects","categories.people-body":"People & Body","categories.recents":"Recently Used","categories.smileys-emotion":"Smileys & Emotion","categories.symbols":"Symbols","categories.travel-places":"Travel & Places","error.load":"Failed to load emojis","recents.clear":"Clear recent emojis","recents.none":"You haven't selected any emojis yet.",retry:"Try again","search.clear":"Clear search","search.error":"Failed to search emojis","search.notFound":"No results found",search:"Search emojis..."},ye="PicMo";function ve(e){return new fe(e)}ve.deleteDatabase=e=>new Promise(((t,o)=>{const i=indexedDB.deleteDatabase(`${ye}-${e}`);i.addEventListener("success",t),i.addEventListener("error",o)}));class fe extends N{async open(){const e=indexedDB.open(`${ye}-${this.locale}`);return new Promise(((t,o)=>{e.addEventListener("success",(e=>{var o;this.db=null==(o=e.target)?void 0:o.result,t()})),e.addEventListener("error",o),e.addEventListener("upgradeneeded",(async e=>{var t;this.db=null==(t=e.target)?void 0:t.result,this.db.createObjectStore("category",{keyPath:"order"});const o=this.db.createObjectStore("emoji",{keyPath:"emoji"});o.createIndex("category","group"),o.createIndex("version","version"),this.db.createObjectStore("meta")}))}))}async delete(){this.close();const e=indexedDB.deleteDatabase(`${ye}-${this.locale}`);await this.waitForRequest(e)}close(){this.db.close()}async getEmojiCount(){const e=this.db.transaction("emoji","readonly").objectStore("emoji");return(await this.waitForRequest(e.count())).target.result}async getEtags(){const e=this.db.transaction("meta","readonly").objectStore("meta"),[t,o]=await Promise.all([this.waitForRequest(e.get("emojisEtag")),this.waitForRequest(e.get("messagesEtag"))]);return{storedEmojisEtag:t.target.result,storedMessagesEtag:o.target.result}}async setMeta(e){const t=this.db.transaction("meta","readwrite"),o=t.objectStore("meta");return new Promise((i=>{t.oncomplete=i,Object.keys(e).filter(Boolean).forEach((t=>{o.put(e[t],t)}))}))}async getHash(){const e=this.db.transaction("meta","readonly").objectStore("meta");return(await this.waitForRequest(e.get("hash"))).target.result}async isPopulated(){const e=this.db.transaction("category","readonly").objectStore("category");return(await this.waitForRequest(e.count())).target.result>0}async populate({groups:e,emojis:t,emojisEtag:o,messagesEtag:i,hash:s}){await this.removeAllObjects("category","emoji");const r=[this.addObjects("category",e),this.addObjects("emoji",t),this.setMeta({emojisEtag:o,messagesEtag:i,hash:s})];await Promise.all(r)}async getCategories(e){var t;const o=this.db.transaction("category","readonly").objectStore("category");let i=(await this.waitForRequest(o.getAll())).target.result.filter((e=>"component"!==e.key));if(e.showRecents&&i.unshift({key:"recents",order:-1}),null!=(t=e.custom)&&t.length&&i.push({key:"custom",order:10}),e.categories){const t=e.categories;i=i.filter((e=>t.includes(e.key))),i.sort(((e,o)=>t.indexOf(e.key)-t.indexOf(o.key)))}else i.sort(((e,t)=>e.order-t.order));return i}async getEmojis(e,t){const o=this.db.transaction("emoji","readonly").objectStore("emoji").index("category");return O((await this.waitForRequest(o.getAll(e.order))).target.result.filter((e=>e.version<=t)).sort(((e,t)=>null!=e.order&&null!=t.order?e.order-t.order:0)).map(D),t)}async searchEmojis(e,t,o,i){const s=[];return new Promise(((r,a)=>{const n=this.db.transaction("emoji","readonly").objectStore("emoji").openCursor();n.addEventListener("success",(a=>{var n;const c=null==(n=a.target)?void 0:n.result;if(!c)return r([...O(s,o),...t.filter((t=>B(t,e)))]);const l=c.value;B(l,e,i)&&l.version<=o&&s.push(D(l)),c.continue()})),n.addEventListener("error",(e=>{a(e)}))}))}async waitForRequest(e){return new Promise(((t,o)=>{e.onsuccess=t,e.onerror=o}))}withTransaction(e,t="readwrite",o){return new Promise(((i,s)=>{const r=this.db.transaction(e,t);r.oncomplete=i,r.onerror=s,o(r)}))}async removeAllObjects(...e){const t=this.db.transaction(e,"readwrite"),o=e.map((e=>t.objectStore(e)));await Promise.all(o.map((e=>this.waitForRequest(e.clear()))))}async addObjects(e,t){return this.withTransaction(e,"readwrite",(o=>{const i=o.objectStore(e);t.forEach((e=>{i.add(e)}))}))}}function we(){let e={};return{getItem:t=>e[t],setItem:(t,o)=>e[t]=o,length:Object.keys(e).length,clear:()=>e={},key:t=>Object.keys(e)[t],removeItem:t=>delete e[t]}}class be{}const je="PicMo:recents";class Ce extends be{constructor(e){super(),this.storage=e}clear(){this.storage.removeItem(je)}getRecents(e){var t;try{return JSON.parse(null!=(t=this.storage.getItem(je))?t:"[]").slice(0,e)}catch{return[]}}addOrUpdateRecent(e,t){const o=[e,...this.getRecents(t).filter((t=>t.hexcode!==e.hexcode))].slice(0,t);try{this.storage.setItem(je,JSON.stringify(o))}catch{console.warn("storage is not available, recent emojis will not be saved")}}}class ke extends Ce{constructor(){super(R()?localStorage:we())}}const _e={dataStore:ve,theme:X,animate:!0,showCategoryTabs:!0,showPreview:!0,showRecents:!0,showSearch:!0,showVariants:!0,emojisPerRow:8,visibleRows:6,emojiVersion:"auto",i18n:ge,locale:"en",maxRecents:50,custom:[]};function xe(e={}){return{..._e,...e,renderer:e.renderer||new pe,recentsProvider:e.recentsProvider||new ke}}class Ee{constructor(){b(this,h),b(this,m),b(this,l,new Map)}on(e,t,o){v(this,m,u).call(this,e,t,o)}once(e,t,o){v(this,m,u).call(this,e,t,o,!0)}off(e,t){const o=v(this,h,d).call(this,e);w(this,l).set(e,o.filter((e=>e.handler!==t)))}emit(e,...t){v(this,h,d).call(this,e).forEach((o=>{o.handler.apply(o.context,t),o.once&&this.off(e,o.handler)}))}removeAll(){w(this,l).clear()}}l=new WeakMap,h=new WeakSet,d=function(e){return w(this,l).has(e)||w(this,l).set(e,[]),w(this,l).get(e)},m=new WeakSet,u=function(e,t,o,i=!1){v(this,h,d).call(this,e).push({context:o,handler:t,once:i})};const Se={injectStyles:!0};class ze extends Ee{}class Pe extends Ee{}const Le=$("emojiCategory","categoryName","noRecents","recentEmojis");class Fe extends oe{constructor({template:e,category:t,showVariants:o,lazyLoader:i}){super({template:e,classes:Le}),this.baseUIElements={categoryName:oe.byClass(Le.categoryName)},this.category=t,this.showVariants=o,this.lazyLoader=i}setActive(e,t,o){this.emojiContainer.setActive(e,t,o)}}const $e=new ne((({classes:e,emoji:t})=>`\n <button\n type="button"\n class="${e.emojiButton}"\n title="${t.label}"\n data-emoji="${t.emoji}"\n tabindex="-1">\n <div data-placeholder="emojiContent"></div>\n </button>\n`)),Ae=$("emojiButton");class Ie extends oe{constructor({emoji:e,lazyLoader:t,category:o}){super({template:$e,classes:Ae}),this.emoji=e,this.lazyLoader=t,this.category=o}initialize(){this.uiEvents=[oe.uiEvent("focus",this.handleFocus)],super.initialize()}handleFocus(){this.category&&this.events.emit("focus:change",this.category)}activateFocus(e){this.el.tabIndex=0,e&&this.el.focus()}deactivateFocus(){this.el.tabIndex=-1}renderSync(){return super.renderSync({emoji:this.emoji,emojiContent:this.renderer.doRender(this.emoji,this.lazyLoader)})}}class Te{constructor(e,t,o=0,i=0,s=!1){this.events=new Ee,this.keyHandlers={ArrowLeft:this.focusPrevious.bind(this),ArrowRight:this.focusNext.bind(this),ArrowUp:this.focusUp.bind(this),ArrowDown:this.focusDown.bind(this)},this.rowCount=Math.ceil(t/e),this.columnCount=e,this.focusedRow=o,this.focusedColumn=i,this.emojiCount=t,this.wrap=s,this.handleKeyDown=this.handleKeyDown.bind(this)}destroy(){this.events.removeAll()}on(e,t){this.events.on(e,t)}handleKeyDown(e){e.key in this.keyHandlers&&(e.preventDefault(),this.keyHandlers[e.key]())}setCell(e,t,o=!0){const i=this.getIndex();this.focusedRow=e,void 0!==t&&(this.focusedColumn=Math.min(this.columnCount,t)),(this.focusedRow>=this.rowCount||this.getIndex()>=this.emojiCount)&&(this.focusedRow=this.rowCount-1,this.focusedColumn=this.emojiCount%this.columnCount-1),this.events.emit("focus:change",{from:i,to:this.getIndex(),performFocus:o})}setFocusedIndex(e,t=!0){const o=Math.floor(e/this.columnCount),i=e%this.columnCount;this.setCell(o,i,t)}focusNext(){this.focusedColumn<this.columnCount-1&&this.getIndex()<this.emojiCount-1?this.setCell(this.focusedRow,this.focusedColumn+1):this.focusedRow<this.rowCount-1?this.setCell(this.focusedRow+1,0):this.wrap?this.setCell(0,0):this.events.emit("focus:overflow",0)}focusPrevious(){this.focusedColumn>0?this.setCell(this.focusedRow,this.focusedColumn-1):this.focusedRow>0?this.setCell(this.focusedRow-1,this.columnCount-1):this.wrap?this.setCell(this.rowCount-1,this.columnCount-1):this.events.emit("focus:underflow",this.columnCount-1)}focusUp(){this.focusedRow>0?this.setCell(this.focusedRow-1,this.focusedColumn):this.events.emit("focus:underflow",this.focusedColumn)}focusDown(){this.focusedRow<this.rowCount-1?this.setCell(this.focusedRow+1,this.focusedColumn):this.events.emit("focus:overflow",this.focusedColumn)}focusToIndex(e){this.setCell(Math.floor(e/this.columnCount),e%this.columnCount)}getIndex(){return this.focusedRow*this.columnCount+this.focusedColumn}getCell(){return{row:this.focusedRow,column:this.focusedColumn}}getRowCount(){return this.rowCount}}const Me=new ne((({classes:e})=>`\n <div class="${e.emojiContainer}">\n <div data-placeholder="emojis"></div>\n </div>\n`)),Ve=$("emojiContainer");class Re extends oe{constructor({emojis:e,showVariants:t,preview:o=!0,lazyLoader:i,category:s,fullHeight:r=!1}){super({template:Me,classes:Ve}),this.fullHeight=!1,this.showVariants=t,this.lazyLoader=i,this.preview=o,this.emojis=e,this.category=s,this.fullHeight=r,this.setFocus=this.setFocus.bind(this),this.triggerNextCategory=this.triggerNextCategory.bind(this),this.triggerPreviousCategory=this.triggerPreviousCategory.bind(this)}initialize(){this.grid=new Te(this.options.emojisPerRow,this.emojiCount,0,0,!this.category),this.grid.on("focus:change",this.setFocus),this.grid.on("focus:overflow",this.triggerNextCategory),this.grid.on("focus:underflow",this.triggerPreviousCategory),this.uiEvents=[oe.uiEvent("click",this.selectEmoji),oe.uiEvent("keydown",this.grid.handleKeyDown)],this.preview&&this.uiEvents.push(oe.uiEvent("mouseover",this.showPreview),oe.uiEvent("mouseout",this.hidePreview),oe.uiEvent("focus",this.showPreview,{capture:!0}),oe.uiEvent("blur",this.hidePreview,{capture:!0})),super.initialize()}setFocusedView(e,t){if(e)if("string"==typeof e){const t=this.emojis.findIndex((t=>t.emoji===e));this.grid.setFocusedIndex(t,!1),setTimeout((()=>{var e,o,i,s;const r=this.emojiViews[t].el;r.scrollIntoView();const a=null==(e=r.parentElement)?void 0:e.previousElementSibling;(null==(i=null==(o=r.parentElement)?void 0:o.parentElement)?void 0:i.parentElement).scrollTop-=null!=(s=null==a?void 0:a.offsetHeight)?s:0}))}else"first"===e.row||0===e.row?this.grid.setCell(0,e.offset,t):"last"===e.row&&this.grid.setCell(this.grid.getRowCount()-1,e.offset,t)}setActive(e,t,o){var i;e?this.setFocusedView(t,o):null==(i=this.emojiViews[this.grid.getIndex()])||i.deactivateFocus()}renderSync(){return this.emojiViews=this.emojis.map((e=>this.viewFactory.create(Ie,{emoji:e,category:this.category,lazyLoader:this.lazyLoader,renderer:this.renderer}))),this.emojiElements=this.emojiViews.map((e=>e.renderSync())),super.renderSync({emojis:this.emojiElements,i18n:this.i18n})}destroy(){super.destroy(),this.emojiViews.forEach((e=>e.destroy())),this.grid.destroy()}triggerPreviousCategory(e){this.events.emit("category:previous",e)}triggerNextCategory(e){this.category&&this.events.emit("category:next",e)}setFocus({from:e,to:t,performFocus:o}){var i,s;null==(i=this.emojiViews[e])||i.deactivateFocus(),null==(s=this.emojiViews[t])||s.activateFocus(o)}selectEmoji(e){e.stopPropagation();const t=_(e,this.emojis);t&&this.events.emit("emoji:select",{emoji:t,showVariants:this.showVariants})}showPreview(e){const t=e.target.closest("button"),o=null==t?void 0:t.firstElementChild,i=_(e,this.emojis);i&&this.events.emit("preview:show",i,null==o?void 0:o.cloneNode(!0))}hidePreview(e){_(e,this.emojis)&&this.events.emit("preview:hide")}get emojiCount(){return this.emojis.length}}const De=new ne((({classes:e,category:t,pickerId:o,icon:i,i18n:s})=>`\n <section class="${e.emojiCategory}" role="tabpanel" aria-labelledby="${o}-category-${t.key}">\n <h3 data-category="${t.key}" class="${e.categoryName}">\n <i data-icon="${i}"></i>\n ${s.get(`categories.${t.key}`,t.message||t.key)}\n </h3>\n <div data-view="emojis" data-render="sync"></div>\n </section>\n`));class Be extends Fe{constructor({category:e,showVariants:t,lazyLoader:o,emojiVersion:i}){super({category:e,showVariants:t,lazyLoader:o,template:De}),this.showVariants=t,this.lazyLoader=o,this.emojiVersion=i}initialize(){this.uiElements={...this.baseUIElements},super.initialize()}async render(){await this.emojiDataPromise;const e=await this.emojiData.getEmojis(this.category,this.emojiVersion);return this.emojiContainer=this.viewFactory.create(Re,{emojis:e,showVariants:this.showVariants,lazyLoader:this.lazyLoader,category:this.category.key}),super.render({category:this.category,emojis:this.emojiContainer,emojiCount:e.length,icon:se[this.category.key]})}}class Ne extends Re{constructor({category:e,emojis:t,preview:o=!0,lazyLoader:i}){super({category:e,emojis:t,showVariants:!1,preview:o,lazyLoader:i})}async addOrUpdate(e){const t=this.el.querySelector(`[data-emoji="${e.emoji}"]`);t&&(this.el.removeChild(t),this.emojis=this.emojis.filter((t=>t!==e)));const o=this.viewFactory.create(Ie,{emoji:e});if(this.el.insertBefore(o.renderSync(),this.el.firstChild),this.emojis=[e,...this.emojis.filter((t=>t!==e))],this.emojis.length>this.options.maxRecents){this.emojis=this.emojis.slice(0,this.options.maxRecents);const e=this.el.childElementCount-this.options.maxRecents;for(let t=0;t<e;t++)this.el.lastElementChild&&this.el.removeChild(this.el.lastElementChild)}}}const He=new ne((({emojiCount:e,classes:t,category:o,pickerId:i,icon:s,i18n:r})=>`\n <section class="${t.emojiCategory}" role="tabpanel" aria-labelledby="${i}-category-${o.key}">\n <h3 data-category="${o.key}" class="${t.categoryName}">\n <i data-icon="${s}"></i>\n ${r.get(`categories.${o.key}`,o.message||o.key)}\n </h3>\n <div data-empty="${0===e}" class="${t.recentEmojis}">\n <div data-view="emojis" data-render="sync"></div>\n </div>\n <div class="${t.noRecents}">\n ${r.get("recents.none")}\n </div>\n </section>\n`),{mode:"async"});const Oe=new ne((({classes:e,category:t,pickerId:o,icon:i,i18n:s})=>`\n <section class="${e.emojiCategory}" role="tabpanel" aria-labelledby="${o}-category-${t.key}">\n <h3 data-category="${t.key}" class="${e.categoryName}">\n <i data-icon="${i}"></i>\n ${s.get(`categories.${t.key}`,t.message||t.key)}\n </h3>\n <div data-view="emojis" data-render="sync"></div>\n </section>\n`));class Ke{constructor(){this.elements=new Map}lazyLoad(e,t){return this.elements.set(e,t),e}observe(e){if(window.IntersectionObserver){const t=new IntersectionObserver((e=>{e.filter((e=>e.intersectionRatio>0)).map((e=>e.target)).forEach((e=>{const o=this.elements.get(e);null==o||o(),t.unobserve(e)}))}),{root:e});this.elements.forEach(((e,o)=>{t.observe(o)}))}else this.elements.forEach((e=>{e()}))}}const Ue=$("emojiArea"),We=new ne((({classes:e})=>`\n <div class="${e.emojiArea}">\n <div data-placeholder="emojis"></div>\n </div>\n`),{mode:"async"}),qe={recents:class extends Fe{constructor({category:e,lazyLoader:t,provider:o}){super({category:e,showVariants:!1,lazyLoader:t,template:He}),this.provider=o}initialize(){this.uiElements={...this.baseUIElements,recents:oe.byClass(Le.recentEmojis)},this.appEvents={"recent:add":this.addRecent},super.initialize()}async addRecent(e){await this.emojiContainer.addOrUpdate(e),this.ui.recents.dataset.empty="false"}async render(){var e;const t=null==(e=this.provider)?void 0:e.getRecents(this.options.maxRecents);return this.emojiContainer=this.viewFactory.create(Ne,{emojis:t,showVariants:!1,lazyLoader:this.lazyLoader,category:this.category.key}),await super.render({category:this.category,emojis:this.emojiContainer,emojiCount:t.length,icon:se[this.category.key]}),this.el}},custom:class extends Fe{constructor({category:e,lazyLoader:t}){super({template:Oe,showVariants:!1,lazyLoader:t,category:e})}initialize(){this.uiElements={...this.baseUIElements},super.initialize()}async render(){return this.emojiContainer=this.viewFactory.create(Re,{emojis:this.customEmojis,showVariants:this.showVariants,lazyLoader:this.lazyLoader,category:this.category.key}),super.render({category:this.category,emojis:this.emojiContainer,emojiCount:this.customEmojis.length,icon:se[this.category.key]})}}};class Ge extends oe{constructor({categoryTabs:e,categories:t,emojiVersion:o}){super({template:We,classes:Ue}),this.selectedCategory=0,this.scrollListenerState="active",this.lazyLoader=new Ke,this.categoryTabs=e,this.categories=t,this.emojiVersion=o,this.handleScroll=S(this.handleScroll.bind(this),100)}initialize(){this.appEvents={"category:select":this.handleCategorySelect,"category:previous":this.focusPreviousCategory,"category:next":this.focusNextCategory,"focus:change":this.updateFocusedCategory},this.uiElements={emojis:oe.byClass(Ue.emojiArea)},this.uiEvents=[oe.uiEvent("scroll",this.handleScroll)],super.initialize()}get focusableEmoji(){return this.el.querySelector('[tabindex="0"]')}async render(){this.emojiCategories=this.categories.map(this.createCategory,this);const e={};return this.categories.forEach(((t,o)=>{e[`emojis-${t.key}`]=this.emojiCategories[o]})),await super.render({emojis:await Promise.all(this.emojiCategories.map((e=>e.render())))}),this.lazyLoader.observe(this.el),this.el}destroy(){super.destroy(),this.emojiCategories.forEach((e=>{var t;null==(t=this.observer)||t.unobserve(e.el),e.destroy()}))}handleCategorySelect(e,t){this.el.style.overflow="hidden",this.selectCategory(e,t),this.el.style.overflow="auto"}createCategory(e){const t=qe[e.key]||Be;return this.viewFactory.create(t,{category:e,showVariants:!0,lazyLoader:this.lazyLoader,emojiVersion:this.emojiVersion,provider:this.options.recentsProvider})}determineInitialCategory(){var e;return this.options.initialCategory&&this.categories.find((e=>e.key===this.options.initialCategory))?this.options.initialCategory:null==(e=this.categories.find((e=>"recents"!==e.key)))?void 0:e.key}determineFocusTarget(e){const t=this.emojiCategories.find((t=>t.category.key===e));return this.options.initialEmoji&&(null==t?void 0:t.el.querySelector(`[data-emoji="${this.options.initialEmoji}"]`))?this.options.initialEmoji:"button"}reset(e=!0){this.events.emit("preview:hide");const t=this.determineInitialCategory();t&&(this.selectCategory(t,{focus:this.determineFocusTarget(t),performFocus:e,scroll:"jump"}),this.selectedCategory=this.getCategoryIndex(t))}getCategoryIndex(e){return this.categories.findIndex((t=>t.key===e))}focusPreviousCategory(e){this.selectedCategory>0&&this.focusCategory(this.selectedCategory-1,{row:"last",offset:null!=e?e:this.options.emojisPerRow})}focusNextCategory(e){this.selectedCategory<this.categories.length-1&&this.focusCategory(this.selectedCategory+1,{row:"first",offset:null!=e?e:0})}focusCategory(e,t){this.selectCategory(e,{focus:t,performFocus:!0})}async selectCategory(e,t={}){var o;this.scrollListenerState="suspend";const{focus:i,performFocus:s,scroll:r}={performFocus:!1,...t};this.emojiCategories[this.selectedCategory].setActive(!1);const a=this.selectedCategory="number"==typeof e?e:this.getCategoryIndex(e);null==(o=this.categoryTabs)||o.setActiveTab(this.selectedCategory,{performFocus:s,scroll:"button"===i});const n=this.emojiCategories[a].el.offsetTop;var c;this.emojiCategories[a].setActive(!0,(c=i)&&"button"!==c?c:{row:"first",offset:0},"button"!==i&&s),r&&(this.el.scrollTop=n),this.scrollListenerState="resume"}updateFocusedCategory(e){var t;this.categories[this.selectedCategory].key!==e&&(this.scrollListenerState="suspend",this.selectedCategory=this.getCategoryIndex(e),null==(t=this.categoryTabs)||t.setActiveTab(this.selectedCategory,{changeFocusable:!1,performFocus:!1}),this.scrollListenerState="resume")}handleScroll(){if("suspend"===this.scrollListenerState||!this.categoryTabs)return;if("resume"===this.scrollListenerState)return void(this.scrollListenerState="active");const e=this.el.scrollTop,t=this.el.scrollHeight-this.el.offsetHeight,o=this.emojiCategories.findIndex(((t,o)=>{var i;return e<(null==(i=this.emojiCategories[o+1])?void 0:i.el.offsetTop)})),i={changeFocusable:!1,performFocus:!1,scroll:!1};0===e?this.categoryTabs.setActiveTab(0,i):Math.floor(e)===Math.floor(t)||o<0?this.categoryTabs.setActiveTab(this.categories.length-1,i):this.categoryTabs.setActiveTab(o,i)}}const Je=new ne((({classList:e,classes:t,icon:o,message:i})=>`\n<div class="${e}" role="alert">\n <div class="${t.iconContainer}"><i data-size="10x" data-icon="${o}"></i></div>\n <h3 class="${t.title}">${i}</h3>\n</div>\n`)),Ze=$("error","iconContainer","title");class Ye extends oe{constructor({message:e,icon:t="warning",template:o=Je,className:i}){super({template:o,classes:Ze}),this.message=e,this.icon=t,this.className=i}renderSync(){const e=[Ze.error,this.className].join(" ").trim();return super.renderSync({message:this.message,icon:this.icon,classList:e})}}const Qe=new ne((({classList:e,classes:t,icon:o,i18n:i,message:s})=>`\n <div class="${e}" role="alert">\n <div class="${t.icon}"><i data-size="10x" data-icon="${o}"></i></div>\n <h3 class="${t.title}">${s}</h3>\n <button type="button">${i.get("retry")}</button>\n </div>\n`)),Xe=$("dataError");class et extends Ye{constructor({message:e}){super({message:e,template:Qe,className:Xe.dataError})}initialize(){this.uiElements={retryButton:"button"},this.uiEvents=[oe.childEvent("retryButton","click",this.onRetry)],super.initialize()}async onRetry(){this.emojiData?await this.emojiData.delete():await this.options.dataStore.deleteDatabase(this.options.locale),this.events.emit("reinitialize");const e=await Y(this.options.locale,this.options.dataStore,this.options.messages,this.options.emojiData,this.emojiData);this.viewFactory.setEmojiData(e),this.events.emit("data:ready",e)}}const tt=$("preview","previewEmoji","previewName","tagList","tag"),ot=new ne((({classes:e,tag:t})=>`\n <li class="${e.tag}">${t}</li>\n`)),it=new ne((({classes:e})=>`\n <div class="${e.preview}">\n <div class="${e.previewEmoji}"></div>\n <div class="${e.previewName}"></div>\n <ul class="${e.tagList}"></ul>\n </div>\n`));class st extends oe{constructor(){super({template:it,classes:tt})}initialize(){this.uiElements={emoji:oe.byClass(tt.previewEmoji),name:oe.byClass(tt.previewName),tagList:oe.byClass(tt.tagList)},this.appEvents={"preview:show":this.showPreview,"preview:hide":this.hidePreview},super.initialize()}showPreview(e,t){if(T(this.ui.emoji,t),this.ui.name.textContent=e.label,e.tags){this.ui.tagList.style.display="flex";const t=e.tags.map((e=>ot.renderSync({tag:e,classes:tt})));T(this.ui.tagList,...t)}}hidePreview(){I(this.ui.emoji),I(this.ui.name),I(this.ui.tagList)}}const rt=new ne((({classes:e,i18n:t})=>`\n <button title="${t.get("search.clear")}" class="${e.clearSearchButton}">\n <i data-icon="xmark"></i>\n </button>\n`)),at=new ne((({classes:e,i18n:t})=>`\n<div class="${e.searchContainer}">\n <input class="${e.searchField}" placeholder="${t.get("search")}">\n <span class="${e.searchAccessory}"></span>\n</div>\n`),{mode:"async"}),nt=$("searchContainer","searchField","clearButton","searchAccessory","clearSearchButton","notFound");class ct extends oe{constructor({categories:e,emojiVersion:t}){super({template:at,classes:nt}),this.categories=e.filter((e=>"recents"!==e.key)),this.emojiVersion=t,this.search=z(this.search.bind(this),100)}initialize(){this.uiElements={searchField:oe.byClass(nt.searchField),searchAccessory:oe.byClass(nt.searchAccessory)},this.uiEvents=[oe.childEvent("searchField","keydown",this.onKeyDown),oe.childEvent("searchField","input",this.onSearchInput)],super.initialize()}async render(){return await super.render(),this.searchIcon=re("search"),this.notFoundMessage=this.viewFactory.create(Ye,{message:this.i18n.get("search.notFound"),className:nt.notFound,icon:"sad"}),this.notFoundMessage.renderSync(),this.errorMessage=this.viewFactory.create(Ye,{message:this.i18n.get("search.error")}),this.errorMessage.renderSync(),this.clearSearchButton=rt.render({classes:nt,i18n:this.i18n}),this.clearSearchButton.addEventListener("click",(e=>this.onClearSearch(e))),this.searchField=this.ui.searchField,this.showSearchIcon(),this.el}showSearchIcon(){this.showSearchAccessory(this.searchIcon)}showClearSearchButton(){this.showSearchAccessory(this.clearSearchButton)}showSearchAccessory(e){T(this.ui.searchAccessory,e)}clear(){this.searchField.value="",this.showSearchIcon()}focus(){this.searchField.focus()}onClearSearch(e){var t;e.stopPropagation(),this.searchField.value="",null==(t=this.resultsContainer)||t.destroy(),this.resultsContainer=null,this.showSearchIcon(),this.events.emit("content:show"),this.searchField.focus()}handleResultsKeydown(e){this.resultsContainer&&"Escape"===e.key&&this.onClearSearch(e)}onKeyDown(e){var t;"Escape"===e.key&&this.searchField.value?this.onClearSearch(e):("Enter"===e.key||"ArrowDown"===e.key)&&this.resultsContainer&&(e.preventDefault(),null==(t=this.resultsContainer.el.querySelector('[tabindex="0"]'))||t.focus())}onSearchInput(e){this.searchField.value?(this.showClearSearchButton(),this.search()):this.onClearSearch(e)}async search(){var e;if(this.searchField.value)try{const t=await this.emojiData.searchEmojis(this.searchField.value,this.customEmojis,this.emojiVersion,this.categories);if(this.events.emit("preview:hide"),t.length){const o=new Ke;this.resultsContainer=this.viewFactory.create(Re,{emojis:t,fullHeight:!0,showVariants:!0,lazyLoader:o}),this.resultsContainer.renderSync(),null!=(e=this.resultsContainer)&&e.el&&(o.observe(this.resultsContainer.el),this.resultsContainer.setActive(!0,{row:0,offset:0},!1),this.resultsContainer.el.addEventListener("keydown",(e=>this.handleResultsKeydown(e))),this.events.emit("content:show",this.resultsContainer))}else this.events.emit("content:show",this.notFoundMessage)}catch{this.events.emit("content:show",this.errorMessage)}}}const lt=new ne((({classes:e})=>`\n <div class="${e.variantOverlay}">\n <div class="${e.variantPopup}">\n <div data-view="emojis" data-render="sync"></div>\n </div>\n </div>\n`)),ht=$("variantOverlay","variantPopup"),dt={easing:"ease-in-out",duration:250,fill:"both"},mt={opacity:[0,1]},ut={opacity:[0,1],transform:["scale3d(0.8, 0.8, 0.8)","scale3d(1, 1, 1)"]};class pt extends oe{constructor({emoji:e,parent:t}){super({template:lt,classes:ht,parent:t}),this.focusedEmojiIndex=0,this.focusTrap=new Q,this.animateShow=()=>Promise.all([P(this.el,mt,dt,this.options),P(this.ui.popup,ut,dt,this.options)]),this.emoji=e}initialize(){this.uiElements={popup:oe.byClass(ht.variantPopup)},this.uiEvents=[oe.uiEvent("click",this.handleClick),oe.uiEvent("keydown",this.handleKeydown)],super.initialize()}animateHide(){const e={...dt,direction:"reverse"};return Promise.all([P(this.el,mt,e,this.options),P(this.ui.popup,ut,e,this.options)])}async hide(){await this.animateHide(),this.events.emit("variantPopup:hide")}handleKeydown(e){"Escape"===e.key&&(this.hide(),e.stopPropagation())}handleClick(e){this.ui.popup.contains(e.target)||this.hide()}getEmoji(e){return this.renderedEmojis[e]}setFocusedEmoji(e){this.getEmoji(this.focusedEmojiIndex).tabIndex=-1,this.focusedEmojiIndex=e;const t=this.getEmoji(this.focusedEmojiIndex);t.tabIndex=0,t.focus()}destroy(){this.emojiContainer.destroy(),this.focusTrap.deactivate(),super.destroy()}renderSync(){const e=[{...this.emoji,skins:null},...(this.emoji.skins||[]).map((e=>({...e,label:this.emoji.label,tags:this.emoji.tags})))];return this.emojiContainer=this.viewFactory.create(Re,{emojis:e,preview:!1}),super.renderSync({emojis:this.emojiContainer}),e.length<this.options.emojisPerRow&&this.el.style.setProperty("--emojis-per-row",e.length.toString()),this.el}activate(){this.emojiContainer.setActive(!0,{row:0,offset:0},!0),this.focusTrap.activate(this.el)}}const gt=new ne((({classes:e,i18n:t,category:o,pickerId:i,icon:s})=>`\n<li class="${e.categoryTab}">\n <button\n aria-selected="false"\n role="tab"\n class="${e.categoryButton}"\n tabindex="-1"\n title="${t.get(`categories.${o.key}`,o.message||o.key)}"\n type="button"\n data-category="${o.key}"\n id="${i}-category-${o.key}"\n >\n <i data-icon="${s}"></i>\n</li>\n`)),yt=$("categoryTab","categoryTabActive","categoryButton");class vt extends oe{constructor({category:e,icon:t}){super({template:gt,classes:yt}),this.isActive=!1,this.category=e,this.icon=t}initialize(){this.uiElements={button:oe.byClass(yt.categoryButton)},this.uiEvents=[oe.childEvent("button","click",this.selectCategory),oe.childEvent("button","focus",this.selectCategory)],super.initialize()}renderSync(){return super.renderSync({category:this.category,icon:this.icon}),this.ui.button.ariaSelected="false",this.el}setActive(e,t={}){const{changeFocusable:o,performFocus:i,scroll:s}={changeFocusable:!0,performFocus:!0,scroll:!0,...t};this.el.classList.toggle(yt.categoryTabActive,e),o&&(this.ui.button.tabIndex=e?0:-1,this.ui.button.ariaSelected=e.toString()),e&&i&&(this.ui.button.focus(),s&&this.events.emit("category:select",this.category.key,{scroll:"animate",focus:"button",performFocus:!1})),this.isActive=e}selectCategory(){this.isActive||this.events.emit("category:select",this.category.key,{scroll:"animate",focus:"button",performFocus:!0})}}const ft=new ne((({classes:e})=>`\n <div class="${e.categoryButtonsContainer}">\n <ul role="tablist" class="${e.categoryButtons}">\n <div data-placeholder="tabs"></div>\n </ul>\n </div>\n`)),wt=$("categoryButtons","categoryButtonsContainer");class bt extends oe{constructor({categories:e}){super({template:ft,classes:wt}),this.activeCategoryIndex=0,this.categories=e}initialize(){this.keyBindings={ArrowLeft:this.stepSelectedTab(-1),ArrowRight:this.stepSelectedTab(1)},this.uiEvents=[oe.uiEvent("scroll",this.checkOverflow)],super.initialize()}checkOverflow(){const e=Math.abs(this.el.scrollLeft-(this.el.scrollWidth-this.el.offsetWidth))>1,t=this.el.scrollLeft>0;this.el.className="categoryButtonsContainer",t&&e?this.el.classList.add("has-overflow-both"):t?this.el.classList.add("has-overflow-left"):e&&this.el.classList.add("has-overflow-right")}renderSync(){return this.tabViews=this.categories.map((e=>this.viewFactory.create(vt,{category:e,icon:se[e.key]}))),super.renderSync({tabs:this.tabViews.map((e=>e.renderSync()))}),this.el}get currentCategory(){return this.categories[this.activeCategoryIndex]}get currentTabView(){return this.tabViews[this.activeCategoryIndex]}setActiveTab(e,t={}){this.checkOverflow();const o=this.currentTabView,i=this.tabViews[e];o.setActive(!1,t),i.setActive(!0,t),this.activeCategoryIndex=e}getTargetCategory(e){return e<0?this.categories.length-1:e>=this.categories.length?0:e}stepSelectedTab(e){return()=>{const t=this.activeCategoryIndex+e;this.setActiveTab(this.getTargetCategory(t),{changeFocusable:!0,performFocus:!0})}}}const jt=[{version:15,emoji:String.fromCodePoint(129768)},{version:14,emoji:String.fromCodePoint(128733)},{version:13,emoji:String.fromCodePoint(129729)},{version:12,emoji:String.fromCodePoint(129449)},{version:11,emoji:String.fromCodePoint(129463)},{version:5,emoji:String.fromCodePoint(129322)},{version:4,emoji:String.fromCodePoint(9877)},{version:3,emoji:String.fromCodePoint(129314)},{version:2,emoji:String.fromCodePoint(128488)},{version:1,emoji:String.fromCodePoint(128512)}];function Ct(){var e;const t=jt.find((e=>function(e){const t=document.createElement("canvas").getContext("2d");if(t)return t.textBaseline="top",t.font="32px Arial",t.fillText(e,0,0),0!==t.getImageData(16,16,1,1).data[0]}(e.emoji)));return null!=(e=null==t?void 0:t.version)?e:1}function kt(e,t){return Array.from({length:e},(()=>t)).join("")}function _t(e){const{emojiCount:t,classes:o,theme:i,className:s,categoryCount:r}=e;return`\n <div class="picmo__picker ${o.skeleton} ${o.picker} ${i} ${s}">\n ${(({showHeader:t,classes:o})=>t?`\n <header class="${o.headerSkeleton}">\n ${(({showSearch:e,classes:t})=>e?`\n <div class="${t.searchSkeleton}">\n <div class="${t.searchInput} ${t.placeholder}"></div>\n </div>\n `:"")(e)}\n ${(({showCategoryTabs:e,classes:t})=>e?`\n <div class="${t.categoryTabsSkeleton}">\n ${kt(r,`<div class="${t.placeholder} ${t.categoryTab}"></div>`)}\n </div>\n `:"")(e)}\n </header>\n `:"")(e)}\n <div class="${o.contentSkeleton}">\n <div class="${o.placeholder} ${o.categoryName}"></div>\n <div class="${o.emojiGrid}">\n ${kt(t,`<div class="${o.placeholder} ${o.emoji}"></div>`)}\n </div>\n </div>\n ${(({showPreview:e,classes:t})=>e?`\n <div class="${t.previewSkeleton}">\n <div class="${t.placeholder} ${t.previewEmoji}"></div>\n <div class="${t.placeholder} ${t.previewName}"></div>\n <ul class="${t.tagList}">\n ${kt(3,`<li class="${t.placeholder} ${t.tag}"></li>`)}\n </ul>\n </div>\n `:"")(e)}\n </div>\n `}const xt=new ne((e=>e.isLoaded?function(e){const{classes:t,theme:o,className:i=""}=e;return`\n <div class="picmo__picker ${t.picker} ${o} ${i}">\n ${function({showHeader:e,classes:t}){return e?`\n <header class="${t.header}">\n <div data-view="search"></div>\n <div data-view="categoryTabs" data-render="sync"></div>\n </header>\n `:""}(e)}\n <div class="${t.content}">\n <div data-view="emojiArea"></div>\n </div>\n <div data-view="preview"></div>\n </div>\n `}(e):_t(e))),Et=$("picker","skeleton","placeholder","searchSkeleton","searchInput","categoryTabsSkeleton","headerSkeleton","categoryTab","contentSkeleton","categoryName","emojiGrid","emoji","previewSkeleton","previewEmoji","previewName","tagList","tag","overlay","content","fullHeight","pluginContainer","header"),St={emojisPerRow:"--emojis-per-row",visibleRows:"--row-count",emojiSize:"--emoji-size"};class zt extends oe{constructor(){super({template:xt,classes:Et}),this.pickerReady=!1,this.externalEvents=new Pe,this.updaters={styleProperty:e=>t=>this.el.style.setProperty(St[e],t.toString()),theme:e=>{const t=this.options.theme,o=this.el.closest(`.${t}`);this.el.classList.remove(t),null==o||o.classList.remove(t),this.el.classList.add(e),null==o||o.classList.add(e)},className:e=>{this.options.className&&this.el.classList.remove(this.options.className),this.el.classList.add(e)},emojisPerRow:this.updateStyleProperty.bind(this,"emojisPerRow"),emojiSize:this.updateStyleProperty.bind(this,"emojiSize"),visibleRows:this.updateStyleProperty.bind(this,"visibleRows")}}initialize(){this.uiElements={pickerContent:oe.byClass(Et.content),header:oe.byClass(Et.header)},this.uiEvents=[oe.uiEvent("keydown",this.handleKeyDown)],this.appEvents={error:this.onError,reinitialize:this.reinitialize,"data:ready":this.onDataReady,"content:show":this.showContent,"variantPopup:hide":this.hideVariantPopup,"emoji:select":this.selectEmoji},super.initialize(),this.options.recentsProvider}destroy(){var e,t;super.destroy(),null==(e=this.search)||e.destroy(),this.emojiArea.destroy(),null==(t=this.categoryTabs)||t.destroy(),this.events.removeAll(),this.externalEvents.removeAll()}clearRecents(){this.options.recentsProvider.clear()}addEventListener(e,t){this.externalEvents.on(e,t)}removeEventListener(e,t){this.externalEvents.off(e,t)}initializePickerView(){this.pickerReady&&(this.showContent(),this.emojiArea.reset(!1))}handleKeyDown(e){const t=e.ctrlKey||e.metaKey;"s"===e.key&&t&&this.search&&(e.preventDefault(),this.search.focus())}buildChildViews(){return this.options.showPreview&&(this.preview=this.viewFactory.create(st)),this.options.showSearch&&(this.search=this.viewFactory.create(ct,{categories:this.categories,emojiVersion:this.emojiVersion})),this.options.showCategoryTabs&&(this.categoryTabs=this.viewFactory.create(bt,{categories:this.categories})),this.currentView=this.emojiArea=this.viewFactory.create(Ge,{categoryTabs:this.categoryTabs,categories:this.categories,emojiVersion:this.emojiVersion}),[this.preview,this.search,this.emojiArea,this.categoryTabs]}setStyleProperties(){this.options.showSearch||this.el.style.setProperty("--search-height-full","0px"),this.options.showCategoryTabs||(this.el.style.setProperty("--category-tabs-height","0px"),this.el.style.setProperty("--category-tabs-offset","0px")),this.options.showPreview||this.el.style.setProperty("--emoji-preview-height-full","0px"),Object.keys(St).forEach((e=>{this.options[e]&&this.el.style.setProperty(St[e],this.options[e].toString())}))}updateStyleProperty(e,t){this.el.style.setProperty(St[e],t.toString())}reinitialize(){this.renderSync()}onError(e){const t=this.viewFactory.createWithOptions({data:!1},et,{message:this.i18n.get("error.load")}),o=this.el.offsetHeight||375;throw this.el.style.height=`${o}px`,T(this.el,t.renderSync()),e}async onDataReady(e){const t=this.el;try{e?this.emojiData=e:await this.emojiDataPromise,"auto"===this.options.emojiVersion?this.emojiVersion=Ct()||parseFloat("14.0"):this.emojiVersion=this.options.emojiVersion,this.categories=await this.emojiData.getCategories(this.options);const[o,i,s,r]=this.buildChildViews();await super.render({isLoaded:!0,search:i,categoryTabs:r,emojiArea:s,preview:o,showHeader:Boolean(this.search||this.categoryTabs),theme:this.options.theme,className:this.options.className}),this.el.style.setProperty("--category-count",this.categories.length.toString()),this.pickerReady=!0,t.replaceWith(this.el),this.setStyleProperties(),this.initializePickerView(),this.setInitialFocus(),this.externalEvents.emit("data:ready")}catch(e){this.events.emit("error",e)}}renderSync(){var e;let t=(null==(e=this.options.categories)?void 0:e.length)||10;if(this.options.showRecents&&(t+=1),super.renderSync({isLoaded:!1,theme:this.options.theme,className:this.options.className,showSearch:this.options.showSearch,showPreview:this.options.showPreview,showCategoryTabs:this.options.showCategoryTabs,showHeader:this.options.showSearch||this.options.showCategoryTabs,emojiCount:this.options.emojisPerRow*this.options.visibleRows,categoryCount:t}),this.el.style.setProperty("--category-count",t.toString()),!this.options.rootElement)throw new Error("Picker must be given a root element via the rootElement option");return T(this.options.rootElement,this.el),this.setStyleProperties(),this.pickerReady&&this.initializePickerView(),this.el}getInitialFocusTarget(){if(typeof this.options.autoFocus<"u")switch(this.options.autoFocus){case"emojis":return this.emojiArea.focusableEmoji;case"search":return this.search;case"auto":return this.search||this.emojiArea.focusableEmoji;default:return null}if(!0===this.options.autoFocusSearch)return console.warn("options.autoFocusSearch is deprecated, please use options.focusTarget instead"),this.search}setInitialFocus(){var e;!this.pickerReady||null==(e=this.getInitialFocusTarget())||e.focus()}reset(e=!0){var t;this.pickerReady&&(this.emojiArea.reset(e),this.showContent(this.emojiArea)),null==(t=this.search)||t.clear(),this.hideVariantPopup()}showContent(e=this.emojiArea){var t,o;e!==this.currentView&&(this.currentView!==this.emojiArea&&(null==(t=this.currentView)||t.destroy()),this.ui.pickerContent.classList.toggle(Et.fullHeight,e!==this.emojiArea),T(this.ui.pickerContent,e.el),this.currentView=e,e===this.emojiArea?(this.emojiArea.reset(),this.categoryTabs&&this.ui.header.appendChild(this.categoryTabs.el)):null==(o=this.categoryTabs)||o.el.remove())}hideVariantPopup(){var e;null==(e=this.variantPopup)||e.destroy()}isPickerClick(e){var t,o;const i=e.target,s=this.el.contains(i),r=null==(o=null==(t=this.variantPopup)?void 0:t.el)?void 0:o.contains(i);return s||r}async selectEmoji({emoji:e}){var t,o;(null==(t=e.skins)?void 0:t.length)&&this.options.showVariants&&!this.isVariantPopupOpen?this.showVariantPopup(e):(await(null==(o=this.variantPopup)?void 0:o.animateHide()),this.events.emit("variantPopup:hide"),await this.emitEmoji(e))}get isVariantPopupOpen(){return this.variantPopup&&!this.variantPopup.isDestroyed}async showVariantPopup(e){const t=document.activeElement;this.events.once("variantPopup:hide",(()=>{null==t||t.focus()})),this.variantPopup=this.viewFactory.create(pt,{emoji:e,parent:this.el}),this.el.appendChild(this.variantPopup.renderSync()),this.variantPopup.activate()}async emitEmoji(e){this.externalEvents.emit("emoji:select",await this.renderer.doEmit(e)),this.options.recentsProvider.addOrUpdateRecent(e,this.options.maxRecents),this.events.emit("recent:add",e)}updateOptions(e){Object.keys(e).forEach((t=>{this.updaters[t](e[t])})),Object.assign(this.options,e)}}class Pt{constructor({events:e,i18n:t,renderer:o,emojiData:i,options:s,customEmojis:r=[],pickerId:a}){this.events=e,this.i18n=t,this.renderer=o,this.emojiData=i,this.options=s,this.customEmojis=r,this.pickerId=a}setEmojiData(e){this.emojiData=Promise.resolve(e)}createWithOptions(e={},t,...o){const i=new t(...o);return i.setPickerId(this.pickerId),i.setEvents(this.events),i.setI18n(this.i18n),i.setRenderer(this.renderer),!1!==e.data&&i.setEmojiData(this.emojiData),i.setOptions(this.options),i.setCustomEmojis(this.customEmojis),i.viewFactory=this,i.initialize(),i}create(e,...t){return this.createWithOptions({},e,...t)}}class Lt{constructor(e={}){b(this,p,void 0),J(this,p,new Map(Object.entries(e)))}get(e,t=e){return w(this,p).get(e)||t}}function Ft(){let e=!1;return function(t){Se.injectStyles&&!e&&(function(e,t){void 0===t&&(t={});var o=t.insertAt;if(e&&!(typeof document>"u")){var i=document.head||document.getElementsByTagName("head")[0],s=document.createElement("style");s.type="text/css","top"===o&&i.firstChild?i.insertBefore(s,i.firstChild):i.appendChild(s),s.styleSheet?s.styleSheet.cssText=e:s.appendChild(document.createTextNode(e))}}(t),e=!0)}}p=new WeakMap;let $t,At=0;const It=Ft();const Tt=Object.freeze(Object.defineProperty({__proto__:null,de:{"categories.activities":"Aktivitäten","categories.animals-nature":"Tiere & Natur","categories.custom":"Benutzerdefiniert","categories.flags":"Flaggen","categories.food-drink":"Essen & Trinken","categories.objects":"Gegenstände","categories.people-body":"Mensch & Körper","categories.recents":"Zuletzt genutzt","categories.smileys-emotion":"Smileys & Emotionen","categories.symbols":"Symbole","categories.travel-places":"Reisen & Orte","error.load":"Emojis wurden nicht geladen","recents.clear":"Zuletzt genutzte Emojis löschen","recents.none":"Kein Emoji ausgewählt.",retry:"Erneut versuchen","search.clear":"Suche löschen","search.error":"Suche erfolglos","search.notFound":"Kein Emoji gefunden",search:"Emojis durchsuchen ..."},en:ge,fi:{"categories.activities":"Aktiviteetit","categories.animals-nature":"Eläimet & luonto","categories.custom":"Mukautettu","categories.flags":"Liput","categories.food-drink":"Ruoka & juoma","categories.objects":"Esineet","categories.people-body":"Ihmiset & keho","categories.recents":"Viimeksi käytetty","categories.smileys-emotion":"Hymiöt & tunne","categories.symbols":"Symbolit","categories.travel-places":"Matkustus & paikat","error.load":"Emojien lataaminen epäonnistui","recents.clear":"Tyhjennä viimeksi käytetyt emojit","recents.none":"Et ole valinnut vielä emojia.",retry:"Kokeile uudestaan","search.clear":"Tyhjennä haku","search.error":"Emojien etsiminen epäonnistui","search.notFound":"Emojia ei löytynyt",search:"Etsi emojia..."},fr:{"categories.activities":"Activités","categories.animals-nature":"Animaux et nature","categories.custom":"Personnalisé","categories.flags":"Drapeaux","categories.food-drink":"Nourriture et boissons","categories.objects":"Objets","categories.people-body":"Personnes et corps","categories.recents":"Récemment utilisé","categories.smileys-emotion":"Visages et émotions","categories.symbols":"Symboles","categories.travel-places":"Voyages et lieux","error.load":"Échec du chargement des émojis","recents.clear":"Effacez les émojis récents","recents.none":"Vous n'avez pas encore sélectionné d'émojis.",retry:"Essayez à nouveau","search.clear":"Effacer la recherche","search.error":"Échec de la recherche d'émojis","search.notFound":"Aucun émoji trouvé",search:"Rechercher des émojis..."},nl:{"categories.activities":"Activiteiten","categories.animals-nature":"Dieren & Natuur","categories.custom":"Aangepast","categories.flags":"Vlaggen","categories.food-drink":"Eten & Drinken","categories.objects":"Voorwerpen","categories.people-body":"Mens & Lichaam","categories.recents":"Laatst gebruikt","categories.smileys-emotion":"Smileys en emoties","categories.symbols":"Symbolen","categories.travel-places":"Reizen & Plaatsen","error.load":"Kan emoji's niet laden","recents.clear":"Wis recente emoji's","recents.none":"Geen emoji geselecteerd.",retry:"Probeer het nog eens","search.clear":"Zoekopdracht wissen","search.error":"Zoeken mislukt","search.notFound":"Geen emoji gevonden",search:"Zoek emoji..."},no:{"categories.activities":"Aktiviteter","categories.animals-nature":"Dyr & natur","categories.custom":"Tilpasset","categories.flags":"Flagg","categories.food-drink":"Mat & drikke","categories.objects":"Objekter","categories.people-body":"Mennesker & kropp","categories.recents":"Nylig brukte","categories.smileys-emotion":"Smilefjes & følelser","categories.symbols":"Symboler","categories.travel-places":"Reise & steder","error.load":"Klarte ikke laste inn emojis","recents.clear":"Fjern nylige emojis","recents.none":"Du har ikke valgt noen emojis enda.",retry:"Prøv igjen","search.clear":"Tøm søk","search.error":"Klarte ikke å søke etter emojis","search.notFound":"Ingen emojis funnet",search:"Søk etter emojis..."},sv:{"categories.activities":"Aktiviteter","categories.animals-nature":"Djur & natur","categories.custom":"Anpassad","categories.flags":"Flagga","categories.food-drink":"Mat & dryck","categories.objects":"Objekt","categories.people-body":"Människor & kropp","categories.recents":"Nyligen använd","categories.smileys-emotion":"Humör & känslor","categories.symbols":"Symboler","categories.travel-places":"Resor & platser","error.load":"Det gick inte att ladda emojis","recents.clear":"Ta bort de senaste emojis","recents.none":"Du har inte valt några emojis än",retry:"Försök igen","search.clear":"Tom sökning","search.error":"Det gick inte att söka efter emojis","search.notFound":"Inga emojis hittades",search:"Sök efter emojis..."}},Symbol.toStringTag,{value:"Module"}));e.EmojiPicker=zt,e.Events=Ee,e.FocusTrap=Q,e.InMemoryProvider=class extends be{constructor(){super(...arguments),this.recents=[]}clear(){this.recents=[]}getRecents(e){return this.recents.slice(0,e)}addOrUpdateRecent(e,t){this.recents=[e,...this.getRecents(t).filter((t=>t.hexcode!==e.hexcode))].slice(0,t)}},e.InMemoryStoreFactory=U,e.IndexedDbStoreFactory=ve,e.LocalStorageProvider=ke,e.NativeRenderer=pe,e.RecentsProvider=be,e.Renderer=me,e.SessionStorageProvider=class extends Ce{constructor(){super(V()?sessionStorage:we())}},e.animate=P,e.autoTheme=te,e.caseInsensitiveIncludes=E,e.computeHash=F,e.createDatabase=async function(e,t,o,i){(await Y(e,t,o,i)).close()},e.createPicker=function(e){It('.picmo__picker .picmo__icon{width:1.25em;height:1em;fill:currentColor}.picmo__icon-small{font-size:.8em}.picmo__icon-medium{font-size:1em}.picmo__icon-large{font-size:1.25em}.picmo__icon-2x{font-size:2em}.picmo__icon-3x{font-size:3em}.picmo__icon-4x{font-size:4em}.picmo__icon-5x{font-size:5em}.picmo__icon-8x{font-size:8em}.picmo__icon-10x{font-size:10em}.picmo__light,.picmo__auto{color-scheme:light;--accent-color: #4f46e5;--background-color: #f9fafb;--border-color: #cccccc;--category-name-background-color: #f9fafb;--category-name-button-color: #999999;--category-name-text-color: hsl(214, 30%, 50%);--category-tab-active-background-color: rgba(255, 255, 255, .6);--category-tab-active-color: var(--accent-color);--category-tab-color: #666;--category-tab-highlight-background-color: rgba(0, 0, 0, .15);--error-color-dark: hsl(0, 100%, 45%);--error-color: hsl(0, 100%, 40%);--focus-indicator-background-color: hsl(198, 65%, 85%);--focus-indicator-color: #333333;--hover-background-color: #c7d2fe;--placeholder-background-color: #cccccc;--search-background-color: #f9fafb;--search-focus-background-color: #ffffff;--search-icon-color: #999999;--search-placeholder-color: #71717a;--secondary-background-color: #e2e8f0;--secondary-text-color: #666666;--tag-background-color: rgba(162, 190, 245, .3);--text-color: #000000;--variant-popup-background-color: #ffffff}.picmo__dark{color-scheme:dark;--accent-color: #A580F9;--background-color: #333333;--border-color: #666666;--category-name-background-color: #333333;--category-name-button-color: #eeeeee;--category-name-text-color: #ffffff;--category-tab-active-background-color: #000000;--category-tab-active-color: var(--accent-color);--category-tab-color: #cccccc;--category-tab-highlight-background-color: #4A4A4A;--error-color-dark: hsl(0, 7%, 3%);--error-color: hsl(0, 30%, 60%);--focus-indicator-background-color: hsl(0, 0%, 50%);--focus-indicator-color: #999999;--hover-background-color: hsla(0, 0%, 40%, .85);--image-placeholder-color: #ffffff;--placeholder-background-color: #666666;--search-background-color: #71717a;--search-focus-background-color: #52525b;--search-icon-color: #cccccc;--search-placeholder-color: #d4d4d8;--secondary-background-color: #000000;--secondary-text-color: #999999;--tag-background-color: rgba(162, 190, 245, .3);--text-color: #ffffff;--variant-popup-background-color: #333333}@media (prefers-color-scheme: dark){.picmo__auto{color-scheme:dark;--accent-color: #A580F9;--background-color: #333333;--border-color: #666666;--category-name-background-color: #333333;--category-name-button-color: #eeeeee;--category-name-text-color: #ffffff;--category-tab-active-background-color: #000000;--category-tab-active-color: var(--accent-color);--category-tab-color: #cccccc;--category-tab-highlight-background-color: #4A4A4A;--error-color-dark: hsl(0, 7%, 3%);--error-color: hsl(0, 30%, 60%);--focus-indicator-background-color: hsl(0, 0%, 50%);--focus-indicator-color: #999999;--hover-background-color: hsla(0, 0%, 40%, .85);--image-placeholder-color: #ffffff;--placeholder-background-color: #666666;--search-background-color: #71717a;--search-focus-background-color: #52525b;--search-icon-color: #cccccc;--search-placeholder-color: #d4d4d8;--secondary-background-color: #000000;--secondary-text-color: #999999;--tag-background-color: rgba(162, 190, 245, .3);--text-color: #ffffff;--variant-popup-background-color: #333333}}.picmo__picker .picmo__categoryButtonsContainer{overflow:auto;padding:2px 0}.picmo__picker .picmo__categoryButtonsContainer.picmo__has-overflow-right{mask-image:linear-gradient(270deg,rgba(255,255,255,0) 0%,rgba(255,255,255,1) 10%);-webkit-mask-image:linear-gradient(270deg,rgba(255,255,255,0) 0%,rgba(255,255,255,1) 10%)}.picmo__picker .picmo__categoryButtonsContainer.picmo__has-overflow-left{mask-image:linear-gradient(90deg,rgba(255,255,255,0) 0%,rgba(255,255,255,1) 10%);-webkit-mask-image:linear-gradient(90deg,rgba(255,255,255,0) 0%,rgba(255,255,255,1) 10%)}.picmo__picker .picmo__categoryButtonsContainer.picmo__has-overflow-both{mask-image:linear-gradient(90deg,rgba(255,255,255,0) 0%,rgba(255,255,255,1) 10%,rgba(255,255,255,1) 90%,rgba(255,255,255,0) 100%);-webkit-mask-image:linear-gradient(90deg,rgba(255,255,255,0) 0%,rgba(255,255,255,1) 10%,rgba(255,255,255,1) 90%,rgba(255,255,255,0) 100%)}.picmo__picker .picmo__categoryButtons{display:flex;flex-direction:row;gap:var(--tab-gap);margin:0;padding:0 .5em;align-items:center;height:var(--category-tabs-height);box-sizing:border-box;width:100%;justify-content:space-between;position:relative;list-style-type:none;justify-self:center;max-width:min(23.55rem,calc(var(--category-count, 1) * 2.5rem))}.picmo__picker .picmo__categoryButtons .picmo__categoryTab{display:flex;align-items:center;transition:all .1s;width:2em}.picmo__picker .picmo__categoryButtons .picmo__categoryTab.picmo__categoryTabActive .picmo__categoryButton{color:var(--category-tab-active-color);background:linear-gradient(rgba(255,255,255,.75) 0%,rgba(255,255,255,.75) 100%),linear-gradient(var(--category-tab-active-color) 0%,var(--category-tab-active-color) 100%);border:2px solid var(--category-tab-active-color)}.picmo__picker .picmo__categoryButtons .picmo__categoryTab.picmo__categoryTabActive .picmo__categoryButton:hover{background-color:var(--category-tab-active-background-color)}.picmo__picker .picmo__categoryButtons .picmo__categoryTab button.picmo__categoryButton{border-radius:5px;background:transparent;border:2px solid transparent;color:var(--category-tab-color);cursor:pointer;padding:2px;vertical-align:middle;display:flex;align-items:center;justify-content:center;font-size:1.2rem;width:1.6em;height:1.6em;transition:all .1s}.picmo__picker .picmo__categoryButtons .picmo__categoryTab button.picmo__categoryButton:is(img){width:var(--category-tab-size);height:var(--category-tab-size)}.picmo__picker .picmo__categoryButtons .picmo__categoryTab button.picmo__categoryButton:hover{background:var(--category-tab-highlight-background-color)}.picmo__dataError [data-icon]{opacity:.8}@keyframes appear{0%{opacity:0}to{opacity:.8}}@keyframes appear-grow{0%{opacity:0;transform:scale(.8)}to{opacity:.8;transform:scale(1)}}.picmo__picker .picmo__error{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;color:var(--secondary-text-color)}.picmo__picker .picmo__error .picmo__iconContainer{opacity:.8;animation:appear-grow .25s cubic-bezier(.175,.885,.32,1.275);--color-primary: var(--error-color);--color-secondary: var(--error-color-dark)}.picmo__picker .picmo__error .picmo__title{animation:appear .25s;animation-delay:50ms;animation-fill-mode:both}.picmo__picker .picmo__error button{padding:8px 16px;cursor:pointer;background:var(--background-color);border:1px solid var(--text-color);border-radius:5px;color:var(--text-color)}.picmo__picker .picmo__error button:hover{background:var(--text-color);color:var(--background-color)}.picmo__emojiButton{background:transparent;border:none;border-radius:15px;cursor:pointer;display:flex;font-family:var(--emoji-font);font-size:var(--emoji-size);height:100%;justify-content:center;align-items:center;margin:0;overflow:hidden;padding:0;width:100%}.picmo__emojiButton:hover{background:var(--hover-background-color)}.picmo__emojiButton:focus{border-radius:0;background:var(--focus-indicator-background-color);outline:1px solid var(--focus-indicator-color)}.picmo__picker .picmo__emojiArea{height:var(--emoji-area-height);overflow-y:auto;position:relative}.picmo__picker .picmo__emojiCategory{position:relative}.picmo__picker .picmo__emojiCategory .picmo__categoryName{font-size:.9em;padding:.5rem;margin:0;background:var(--category-name-background-color);color:var(--category-name-text-color);top:0;z-index:1;display:grid;gap:4px;grid-template-columns:auto 1fr auto;align-items:center;line-height:1;box-sizing:border-box;height:var(--category-name-height);justify-content:flex-start;text-transform:uppercase}.picmo__picker .picmo__emojiCategory .picmo__categoryName button{background:transparent;border:none;display:flex;align-items:center;cursor:pointer;color:var(--category-name-button-color)}.picmo__picker .picmo__emojiCategory .picmo__categoryName button:hover{opacity:1}.picmo__picker .picmo__emojiCategory .picmo__noRecents{color:var(--secondary-text-color);grid-column:1 / span var(--emojis-per-row);font-size:.9em;text-align:center;display:flex;align-items:center;justify-content:center;min-height:calc(var(--emoji-size) * var(--emoji-size-multiplier))}.picmo__picker .picmo__emojiCategory .picmo__recentEmojis[data-empty=true]{display:none}:is(.picmo__picker .picmo__emojiCategory) .picmo__recentEmojis[data-empty=false]+div{display:none}.picmo__picker .picmo__emojiContainer{display:grid;justify-content:space-between;gap:1px;padding:0 .5em;grid-template-columns:repeat(var(--emojis-per-row),calc(var(--emoji-size) * var(--emoji-size-multiplier)));grid-auto-rows:calc(var(--emoji-size) * var(--emoji-size-multiplier));align-items:center;justify-items:center}.picmo__picker.picmo__picker{--border-radius: 5px;--emoji-area-height: calc( (var(--row-count) * var(--emoji-size) * var(--emoji-size-multiplier)) + var(--category-name-height) );--content-height: var(--emoji-area-height);--emojis-per-row: 8;--row-count: 6;--emoji-preview-margin: 4px;--emoji-preview-height: calc(var(--emoji-preview-size) + 1em + 1px);--emoji-preview-height-full: calc(var(--emoji-preview-height) + var(--emoji-preview-margin));--emoji-preview-size: 2.75em;--emoji-size: 2rem;--emoji-size-multiplier: 1.3;--content-margin: 8px;--category-tabs-height:calc(1.5em + 9px);--category-tabs-offset: 8px;--category-tab-size: 1.2rem;--category-name-height: 2rem;--category-name-padding-y: 6px;--search-height: 2em;--search-margin: .5em;--search-margin-bottom: 4px;--search-height-full: calc(var(--search-height) + var(--search-margin) + var(--search-margin-bottom));--overlay-background-color: rgba(0, 0, 0, .8);--emoji-font: "Segoe UI Emoji", "Segoe UI Symbol", "Segoe UI", "Apple Color Emoji", "Twemoji Mozilla", "Noto Color Emoji", "EmojiOne Color", "Android Emoji";--ui-font: -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;--ui-font-size: 16px;--picker-width: calc(var(--emojis-per-row) * var(--emoji-size) * var(--emoji-size-multiplier) + 2.75rem);--preview-background-color: var(--secondary-background-color);background:var(--background-color);border-radius:var(--border-radius);border:1px solid var(--border-color);font-family:var(--ui-font);font-size:var(--ui-font-size);overflow:hidden;position:relative;width:var(--picker-width);display:grid;gap:8px}.picmo__picker.picmo__picker>*{font-family:var(--ui-font)}.picmo__picker.picmo__skeleton{background:var(--background-color);border-radius:var(--border-radius);border:1px solid var(--border-color);font-family:var(--ui-font);width:var(--picker-width);color:var(--secondary-text-color)}.picmo__picker.picmo__skeleton *{box-sizing:border-box}.picmo__picker.picmo__skeleton .picmo__placeholder{background:var(--placeholder-background-color);position:relative;overflow:hidden}.picmo__picker.picmo__skeleton .picmo__placeholder:after{position:absolute;top:0;right:0;bottom:0;left:0;transform:translate(-100%);background-image:linear-gradient(90deg,rgba(255,255,255,0) 0,rgba(255,255,255,.2) 20%,rgba(255,255,255,.5) 60%,rgba(255,255,255,0) 100%);animation:shine 2s infinite;content:""}.picmo__picker.picmo__skeleton .picmo__headerSkeleton{background-color:var(--secondary-background-color);padding-top:8px;padding-bottom:8px;display:flex;flex-direction:column;overflow:hidden;gap:8px;border-bottom:1px solid var(--border-color);width:var(--picker-width)}.picmo__picker.picmo__skeleton .picmo__searchSkeleton{padding:0 8px;height:var(--search-height)}.picmo__picker.picmo__skeleton .picmo__searchSkeleton .picmo__searchInput{width:100%;height:28px;border-radius:3px}.picmo__picker.picmo__skeleton .picmo__categoryTabsSkeleton{height:var(--category-tabs-height);display:flex;flex-direction:row;align-items:center;justify-self:center;width:calc(2rem * var(--category-count, 1))}.picmo__picker.picmo__skeleton .picmo__categoryTabsSkeleton .picmo__categoryTab{width:25px;height:25px;padding:2px;border-radius:5px;margin:.25em}.picmo__picker.picmo__skeleton .picmo__contentSkeleton{height:var(--content-height);padding-right:8px;opacity:.7}.picmo__picker.picmo__skeleton .picmo__contentSkeleton .picmo__categoryName{width:50%;height:1rem;margin:.5rem;box-sizing:border-box}.picmo__picker.picmo__skeleton .picmo__contentSkeleton .picmo__emojiGrid{display:grid;justify-content:space-between;gap:1px;padding:0 .5em;grid-template-columns:repeat(var(--emojis-per-row),calc(var(--emoji-size) * var(--emoji-size-multiplier)));grid-auto-rows:calc(var(--emoji-size) * var(--emoji-size-multiplier));align-items:center;justify-items:center;width:var(--picker-width)}.picmo__picker.picmo__skeleton .picmo__contentSkeleton .picmo__emojiGrid .picmo__emoji{width:var(--emoji-size);height:var(--emoji-size);border-radius:50%}.picmo__picker.picmo__skeleton .picmo__previewSkeleton{height:var(--emoji-preview-height);border-top:1px solid var(--border-color);display:grid;align-items:center;padding:.5em;gap:6px;grid-template-columns:auto 1fr;grid-template-rows:auto 1fr;grid-template-areas:"emoji name" "emoji tags"}.picmo__picker.picmo__skeleton .picmo__previewSkeleton .picmo__previewEmoji{grid-area:emoji;border-radius:50%;width:var(--emoji-preview-size);height:var(--emoji-preview-size)}.picmo__picker.picmo__skeleton .picmo__previewSkeleton .picmo__previewName{grid-area:name;height:.8em;width:80%}.picmo__picker.picmo__skeleton .picmo__previewSkeleton .picmo__tagList{grid-area:tags;list-style-type:none;display:flex;flex-direction:row;padding:0;margin:0}.picmo__picker.picmo__skeleton .picmo__previewSkeleton .picmo__tagList .picmo__tag{border-radius:3px;padding:2px 8px;margin-right:.25em;height:1em;width:20%}.picmo__overlay{background:rgba(0,0,0,.75);height:100%;left:0;position:fixed;top:0;width:100%;z-index:1000}.picmo__content{position:relative;overflow:hidden;height:var(--content-height)}.picmo__content.picmo__fullHeight{height:calc(var(--content-height) + var(--category-tabs-height) + var(--category-tabs-offset));overflow-y:auto}.picmo__pluginContainer{margin:.5em;display:flex;flex-direction:row}.picmo__header{background-color:var(--secondary-background-color);padding-top:8px;padding-bottom:8px;display:grid;gap:8px;border-bottom:1px solid var(--border-color)}@media (prefers-reduced-motion: reduce){.picmo__placeholder{background:var(--placeholder-background-color);position:relative;overflow:hidden}.picmo__placeholder:after{display:none}}.picmo__picker .picmo__preview{border-top:1px solid var(--border-color);display:grid;align-items:center;gap:6px;grid-template-columns:auto 1fr;grid-template-rows:auto 1fr;grid-template-areas:"emoji name" "emoji tags";height:var(--emoji-preview-height);box-sizing:border-box;padding:.5em;position:relative;background:var(--preview-background-color)}.picmo__picker .picmo__preview .picmo__previewEmoji{grid-area:emoji;font-size:var(--emoji-preview-size);font-family:var(--emoji-font);width:1.25em;display:flex;align-items:center;justify-content:center}.picmo__picker .picmo__preview .picmo__previewName{grid-area:name;color:var(--text-color);font-size:.8em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:500}.picmo__picker .picmo__preview .picmo__tagList{grid-area:tags;list-style-type:none;display:flex;flex-direction:row;padding:0;margin:0;font-size:.75em;overflow:hidden}.picmo__picker .picmo__preview .picmo__tag{border-radius:3px;background:var(--tag-background-color);color:var(--text-color);padding:2px 8px;margin-right:.25em;white-space:nowrap}.picmo__picker .picmo__preview .picmo__tag:last-child{margin-right:0}.picmo__picker .picmo__searchContainer{display:flex;height:var(--search-height);box-sizing:border-box;padding:0 8px;position:relative}.picmo__picker .picmo__searchContainer .picmo__searchField{background:var(--search-background-color);border-radius:3px;border:none;box-sizing:border-box;color:var(--text-color);font-size:.9em;outline:none;padding:.5em 2.25em .5em .5em;width:100%}.picmo__picker .picmo__searchContainer .picmo__searchField:focus{background:var(--search-focus-background-color)}.picmo__picker .picmo__searchContainer .picmo__searchField::placeholder{color:var(--search-placeholder-color)}.picmo__picker .picmo__searchContainer .picmo__searchAccessory{color:var(--search-icon-color);height:100%;position:absolute;right:1em;top:0;width:1.25rem;display:flex;align-items:center}.picmo__picker .picmo__searchContainer .picmo__searchAccessory svg{fill:var(--search-icon-color)}.picmo__picker .picmo__searchContainer .picmo__clearButton{border:0;color:var(--search-icon-color);background:transparent;cursor:pointer}.picmo__picker .picmo__searchContainer .picmo__clearSearchButton{cursor:pointer;border:none;background:transparent;color:var(--search-icon-color);font-size:1em;width:100%;height:100%;display:flex;align-items:center;padding:0}.picmo__picker .picmo__searchContainer .picmo__notFound [data-icon]{fill:#f3e265}.picmo__picker .picmo__variantOverlay{background:var(--overlay-background-color);border-radius:5px;display:flex;flex-direction:column;height:100%;justify-content:center;left:0;position:absolute;top:0;width:100%;z-index:1}.picmo__picker .picmo__variantOverlay .picmo__variantPopup{background:var(--variant-popup-background-color);border-radius:5px;margin:.5em;padding:.5em;text-align:center;user-select:none;display:flex;align-items:center;justify-content:center}.picmo__customEmoji{width:1em;height:1em}@keyframes shine{to{transform:translate(100%)}}.picmo__picker .picmo__imagePlaceholder{width:2rem;height:2rem;border-radius:50%}.picmo__placeholder{background:#DDDBDD;position:relative}.picmo__placeholder:after{position:absolute;top:0;right:0;bottom:0;left:0;transform:translate(-100%);background-image:linear-gradient(90deg,rgba(255,255,255,0) 0,rgba(255,255,255,.2) 20%,rgba(255,255,255,.5) 60%,rgba(255,255,255,0) 100%);animation:shine 2s infinite;content:""}\n');const t=xe(e),o=((null==t?void 0:t.custom)||[]).map((e=>({...e,custom:!0,tags:["custom",...e.tags||[]]}))),i=new ze;$t||($t=function(e){return Y(e.locale,e.dataStore,e.messages,e.emojiData)}(t));const s=new Lt(t.i18n);$t.then((e=>{i.emit("data:ready",e)})).catch((e=>{i.emit("error",e)}));const r=new Pt({events:i,i18n:s,customEmojis:o,renderer:t.renderer,options:t,emojiData:$t,pickerId:`picmo-${Date.now()}-${At++}`}).create(zt);return r.renderSync(),r},e.createStyleInjector=Ft,e.darkTheme=ee,e.debounce=z,e.deleteDatabase=function(e,t){e.deleteDatabase(t)},e.empty=I,e.en=ge,e.getEmojiForEvent=_,e.getOptions=xe,e.getPrefixedClasses=$,e.globalConfig=Se,e.i18n=Tt,e.isLocalStorageAvailable=R,e.isSessionStorageAvailable=V,e.lightTheme=X,e.prefixClassName=A,e.replaceChildren=T,e.shouldAnimate=x,e.throttle=S,e.toElement=L,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));