WordPress/wp-includes/js/wp-emoji.min.js

1 line
1.3 KiB
JavaScript
Raw Normal View History

!function(a,b,c){function d(){function d(){g&&new g(function(a){for(var b,c,d=a.length;d--;)for(b=a[d].addedNodes.length;b--;)c=a[d].addedNodes[b],3===c.nodeType&&(c=c.parentNode),c&&1===c.nodeType&&f(c)}).observe(document.body,{childList:!0,subtree:!0}),f(document.body)}function e(a){var b=document.createElement("canvas"),c=b.getContext&&b.getContext("2d");return c&&c.fillText?(c.textBaseline="top",c.font="600 32px Arial","flag"===a?(c.fillText(String.fromCharCode(55356,56812,55356,56807),0,0),b.toDataURL().length>3e3):(c.fillText(String.fromCharCode(55357,56835),0,0),0!==c.getImageData(16,16,1,1).data[0])):!1}function f(a,d){if(!j)return a;var e=d&&d.className||"emoji";return b.parse(a,{base:c.baseUrl,ext:c.ext,className:e,callback:function(a,b){switch(a){case"a9":case"ae":case"2122":case"2194":case"2660":case"2663":case"2665":case"2666":return!1}return i||!h||/^1f1(?:e[6-9a-f]|f[1-9a-f])-1f1(?:e[6-9a-f]|f[1-9a-f])$/.test(a)?"".concat(b.base,"/",a,b.ext):!1}})}var g=a.MutationObserver||a.WebKitMutationObserver||a.MozMutationObserver,h=!1,i=!1,j=!1;return b&&c&&(h=e(),i=e("flag"),j=!h||!i,a.addEventListener?a.addEventListener("load",d,!1):a.attachEvent&&a.attachEvent("onload",d)),{browserSupportsEmoji:e,replaceEmoji:j,parse:f}}a.wp=a.wp||{},a.wp.emoji=new d}(window,window.twemoji,window._wpemojiSettings);