CKEDITOR.dialog.add("emojioneDialog",function(d){var l=d.config,h,k=function(c){var b=c.data.getTarget();b.getAttribute("data-unicode")&&(d.insertText(emojione.convert(b.getAttribute("data-unicode"))),h.hide());c.data.preventDefault()},m=CKEDITOR.tools.addFunction(function(c,b){c=new CKEDITOR.dom.event(c);b=new CKEDITOR.dom.element(b);var a;a=c.getKeystroke();var e="rtl"==d.lang.dir;switch(a){case 38:if(a=b.getParent().getParent().getPrevious())a=a.getChild([b.getParent().getIndex(),0]),a.focus();
c.preventDefault();break;case 40:(a=b.getParent().getParent().getNext())&&(a=a.getChild([b.getParent().getIndex(),0]))&&a.focus();c.preventDefault();break;case 32:k({data:c});c.preventDefault();break;case e?37:39:if(a=b.getParent().getNext())a=a.getChild(0),a.focus(),c.preventDefault(!0);else if(a=b.getParent().getParent().getNext())(a=a.getChild([0,0]))&&a.focus(),c.preventDefault(!0);break;case e?39:37:if(a=b.getParent().getPrevious())a=a.getChild(0),a.focus(),c.preventDefault(!0);else if(a=b.getParent().getParent().getPrevious())a=
a.getLast().getChild(0),a.focus(),c.preventDefault(!0)}}),n=function(c){var b=CKEDITOR.tools.getNextId()+"_smiley_emtions_label",b=['\x3cdiv style\x3d"max-height:300px;overflow-y:scroll;"\x3e\x3cspan id\x3d"'+b+'" class\x3d"cke_voice_label"\x3eTest\x3c/span\x3e','\x3ctable role\x3d"listbox" aria-labelledby\x3d"'+b+'" style\x3d"width:100%;height:100%;border-collapse:separate;" cellspacing\x3d"2" cellpadding\x3d"2"',CKEDITOR.env.ie&&CKEDITOR.env.quirks?' style\x3d"position:absolute;"':"","\x3e\x3ctbody\x3e"],
a={},e=0;emojione.imageType="svg";emojione.sprites=!0;emojione.imagePathSVGSprites="/vendor/emojione/assets/sprites/emojione.sprites.svg";for(var f in emojione.emojioneList)if(emojione.emojioneList.hasOwnProperty(f)){var d=emojione.emojioneList[f];if(d.isCanonical)for(var g in d)d.hasOwnProperty(g)&&-1!=l.emojione.emojis[c].indexOf(f)&&(a[f]=d)}for(f in a)if(0===e%10&&b.push('\x3ctr role\x3d"presentation"\x3e'),a.hasOwnProperty(f)){d=a[f];for(g in d)d.hasOwnProperty(g);b.push('\x3ctd class\x3d"cke_centered" style\x3d"vertical-align: middle;" role\x3d"presentation"\x3e\x3ca style\x3d"font-size: 25px;" data-unicode\x3d"'+
d.unicode[0]+'" data-shortcode\x3d"'+f+'" href\x3d"javascript:void(0)" role\x3d"option"',' aria-posinset\x3d"'+(e+1)+'"',' aria-setsize\x3d""',' aria-labelledby\x3d""',' class\x3d"cke_hand" tabindex\x3d"-1" onkeydown\x3d"CKEDITOR.tools.callFunction( ',m,', event, this );"\x3e',emojione.shortnameToUnicode(f)+"\x3c/a\x3e","\x3c/td\x3e");9==e%10&&b.push("\x3c/tr\x3e");e++}if(9>e){for(;9>e;e++)b.push("\x3ctd\x3e\x3c/td\x3e");b.push("\x3c/tr\x3e")}b.push("\x3c/tbody\x3e\x3c/table\x3e\x3c/div\x3e");return b},
g=function(c){return{type:"html",id:"emojiSelector",html:n(c).join(""),onLoad:function(b){h=b.sender},focus:function(){var b=this;setTimeout(function(){b.getElement().getElementsByTag("a").getItem(0).focus()},0)},onClick:k,style:"width: 100%; border-collapse: separate;"}};return{title:"Emojis",minWidth:550,minHeight:200,contents:[{id:"tab-people",label:d.config.emojione.tabs.people,elements:[g("people")]},{id:"tab-nature",label:d.config.emojione.tabs.nature,elements:[g("nature")]},{id:"tab-objects",
label:d.config.emojione.tabs.objects,elements:[g("objects")]},{id:"tab-places",label:d.config.emojione.tabs.places,elements:[g("places")]},{id:"tab-symbols",label:d.config.emojione.tabs.symbols,elements:[g("symbols")]}],onShow:function(){}}});