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

4 lines
14 KiB
JavaScript
Raw Normal View History

// Source: wp-includes/js/twemoji.min.js
var twemoji=function(){"use strict";function a(a){return document.createTextNode(a)}function b(a,b){return"".concat(b.base,b.size,"/",a,b.ext)}function c(a,b){for(var d,e,f=a.childNodes,g=f.length;g--;)d=f[g],e=d.nodeType,3===e?b.push(d):1!==e||o.test(d.nodeName)||c(d,b);return b}function d(a,b){return l(""===b?a.slice(0,-1):3===a.length&&""===a.charAt(1)?a.charAt(0)+a.charAt(2):a)}function e(b,e){for(var f,g,h,i,j,k,l,o,p,q,r,s,t,u=c(b,[]),v=u.length;v--;){for(f=!1,g=document.createDocumentFragment(),h=u[v],i=h.nodeValue,k=0;j=n.exec(i);){if(l=j.index,l!==k&&g.appendChild(a(i.slice(k,l))),p=j[0],q=j[1],r=j[2],k=l+p.length,""!==r&&(s=e.callback(d(q,r),e,r))){if(o=new Image,e.imgAttr)for(t in e.imgAttr)o.setAttribute(t,e.imgAttr[t]);o.onerror=m.onerror,o.className=e.className,o.setAttribute("draggable","false"),o.alt=p,o.src=s,f=!0,g.appendChild(o)}o||g.appendChild(a(p)),o=null}f&&(k<i.length&&g.appendChild(a(i.slice(k))),h.parentNode.replaceChild(g,h))}return b}function f(a,b){return j(a,function(a,c,e){var f,g,h="";if(""!==e&&(f=b.callback(d(c,e),b,e))){if(b.imgAttr)for(g in b.imgAttr)/draggable|class|alt|src/i.test(g)||(h+=" ".concat(g,'="',b.imgAttr[g],'"'));a="<img ".concat('class="',b.className,'" ','draggable="false" ','alt="',a,'" ','src="',f,'"',h,">")}return a})}function g(a){return"number"==typeof a?a+"x"+a:a}function h(a){var b="string"==typeof a?parseInt(a,16):a;return 65536>b?p(b):(b-=65536,p(55296+(b>>10),56320+(1023&b)))}function i(a,c){return c&&"function"!=typeof c||(c={callback:c}),("string"==typeof a?f:e)(a,{callback:c.callback||b,base:"string"==typeof c.base?c.base:m.base,ext:c.ext||m.ext,size:c.folder||g(c.size||m.size),className:c.className||m.className,imgAttr:c.imgAttr})}function j(a,b){return String(a).replace(n,b)}function k(a){n.lastIndex=0;var b=n.test(a);return n.lastIndex=0,b}function l(a,b){for(var c=[],d=0,e=0,f=0;f<a.length;)d=a.charCodeAt(f++),e?(c.push((65536+(e-55296<<10)+(d-56320)).toString(16)),e=0):d>=55296&&56319>=d?e=d:c.push(d.toString(16));return c.join(b||"-")}var m={base:("https:"===location.protocol?"https:":"http:")+"//twemoji.maxcdn.com/",ext:".png",size:"36x36",className:"emoji",convert:{fromCodePoint:h,toCodePoint:l},onerror:function(){this.parentNode&&this.parentNode.replaceChild(a(this.alt),this)},parse:i,replace:j,test:k},n=/((?:\ud83c\udde8\ud83c\uddf3|\ud83c\uddfa\ud83c\uddf8|\ud83c\uddf7\ud83c\uddfa|\ud83c\uddf0\ud83c\uddf7|\ud83c\uddef\ud83c\uddf5|\ud83c\uddee\ud83c\uddf9|\ud83c\uddec\ud83c\udde7|\ud83c\uddeb\ud83c\uddf7|\ud83c\uddea\ud83c\uddf8|\ud83c\udde9\ud83c\uddea|\u0039\ufe0f?\u20e3|\u0038\ufe0f?\u20e3|\u0037\ufe0f?\u20e3|\u0036\ufe0f?\u20e3|\u0035\ufe0f?\u20e3|\u0034\ufe0f?\u20e3|\u0033\ufe0f?\u20e3|\u0032\ufe0f?\u20e3|\u0031\ufe0f?\u20e3|\u0030\ufe0f?\u20e3|\u0023\ufe0f?\u20e3|\ud83d\udeb3|\ud83d\udeb1|\ud83d\udeb0|\ud83d\udeaf|\ud83d\udeae|\ud83d\udea6|\ud83d\udea3|\ud83d\udea1|\ud83d\udea0|\ud83d\ude9f|\ud83d\ude9e|\ud83d\ude9d|\ud83d\ude9c|\ud83d\ude9b|\ud83d\ude98|\ud83d\ude96|\ud83d\ude94|\ud83d\ude90|\ud83d\ude8e|\ud83d\ude8d|\ud83d\ude8b|\ud83d\ude8a|\ud83d\ude88|\ud83d\ude86|\ud83d\ude82|\ud83d\ude81|\ud83d\ude36|\ud83d\ude34|\ud83d\ude2f|\ud83d\ude2e|\ud83d\ude2c|\ud83d\ude27|\ud83d\ude26|\ud83d\ude1f|\ud83d\ude1b|\ud83d\ude19|\ud83d\ude17|\ud83d\ude15|\ud83d\ude11|\ud83d\ude10|\ud83d\ude0e|\ud83d\ude08|\ud83d\ude07|\ud83d\ude00|\ud83d\udd67|\ud83d\udd66|\ud83d\udd65|\ud83d\udd64|\ud83d\udd63|\ud83d\udd62|\ud83d\udd61|\ud83d\udd60|\ud83d\udd5f|\ud83d\udd5e|\ud83d\udd5d|\ud83d\udd5c|\ud83d\udd2d|\ud83d\udd2c|\ud83d\udd15|\ud83d\udd09|\ud83d\udd08|\ud83d\udd07|\ud83d\udd06|\ud83d\udd05|\ud83d\udd04|\ud83d\udd02|\ud83d\udd01|\ud83d\udd00|\ud83d\udcf5|\ud83d\udcef|\ud83d\udced|\ud83d\udcec|\ud83d\udcb7|\ud83d\udcb6|\ud83d\udcad|\ud83d\udc6d|\ud83d\udc6c|\ud83d\udc65|\ud83d\udc2a|\ud83d\udc16|\ud83d\udc15|\ud83d\udc13|\ud83d\udc10|\ud83d\udc0f|\ud83d\udc0b|\ud83d\udc0a|\ud83d\udc09|\ud83d\udc08|\ud83d\udc07|\ud83d\udc06|\ud83d\udc05|\ud83d\udc04|\ud83d\udc03|\ud83d\udc02|\ud83d\udc01|\ud83d\udc00|\ud83c\udfe4|\ud83c\udfc9|\ud83c\udfc7|\ud8
// Source: wp-includes/js/wp-emoji.min.js
!function(a,b){function c(){function c(){if(!i){if("undefined"==typeof a.twemoji){if(j>600)return;return a.clearTimeout(f),f=a.setTimeout(c,50),void j++}e=a.twemoji,i=!0,g&&new g(function(a){for(var b,c,e,f,g=a.length;g--;){if(b=a[g].addedNodes,c=a[g].removedNodes,e=b.length,1===e&&1===c.length&&3===b[0].nodeType&&"IMG"===c[0].nodeName&&b[0].data===c[0].alt)return;for(;e--;)f=b[e],3===f.nodeType&&(f=f.parentNode),!f||1!==f.nodeType||"ownerSVGElement"in f||f.className&&"string"==typeof f.className&&-1!==f.className.indexOf("wp-exclude-emoji")||d(f)}}).observe(document.body,{childList:!0,subtree:!0}),d(document.body)}}function d(a,c){return h&&e?(c=c||{},e.parse(a,{base:b.baseUrl,ext:b.ext,className:c.className||"emoji",imgAttr:c.imgAttr,callback:function(a,c){switch(a){case"a9":case"ae":case"2122":case"2194":case"2660":case"2663":case"2665":case"2666":return!1}return b.supports.flag||!b.supports.simple||/^1f1(?:e[6-9a-f]|f[0-9a-f])-1f1(?:e[6-9a-f]|f[0-9a-f])$/.test(a)?"".concat(c.base,a,c.ext):!1}})):a}var e,f,g=a.MutationObserver||a.WebKitMutationObserver||a.MozMutationObserver,h=!1,i=!1,j=0;return b&&(h=!b.supports.simple||!b.supports.flag,b.DOMReady?c():b.readyCallback=c),{replaceEmoji:h,parse:d}}a.wp=a.wp||{},a.wp.emoji=new c}(window,window._wpemojiSettings);