!function(e,o){"object"==typeof exports&&"object"==typeof module?module.exports=o(require("quill")):"function"==typeof define&&define.amd?define(["quill"],o):"object"==typeof exports?exports.QuillEmoji=o(require("quill")):e.QuillEmoji=o(e.Quill)}(window,function(a){return function(a){var r={};function c(e){if(r[e])return r[e].exports;var o=r[e]={i:e,l:!1,exports:{}};return a[e].call(o.exports,o,o.exports,c),o.l=!0,o.exports}return c.m=a,c.c=r,c.d=function(e,o,a){c.o(e,o)||Object.defineProperty(e,o,{enumerable:!0,get:a})},c.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},c.t=function(o,e){if(1&e&&(o=c(o)),8&e)return o;if(4&e&&"object"==typeof o&&o&&o.__esModule)return o;var a=Object.create(null);if(c.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:o}),2&e&&"string"!=typeof o)for(var r in o)c.d(a,r,function(e){return o[e]}.bind(null,r));return a},c.n=function(e){var o=e&&e.__esModule?function(){return e.default}:function(){return e};return c.d(o,"a",o),o},c.o=function(e,o){return Object.prototype.hasOwnProperty.call(e,o)},c.p="",c(c.s=3)}([function(e,o){e.exports=a},function(e,o,a){var r;r=function(){return function(a){var r={};function c(e){if(r[e])return r[e].exports;var o=r[e]={i:e,l:!1,exports:{}};return a[e].call(o.exports,o,o.exports,c),o.l=!0,o.exports}return c.m=a,c.c=r,c.d=function(e,o,a){c.o(e,o)||Object.defineProperty(e,o,{enumerable:!0,get:a})},c.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},c.t=function(o,e){if(1&e&&(o=c(o)),8&e)return o;if(4&e&&"object"==typeof o&&o&&o.__esModule)return o;var a=Object.create(null);if(c.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:o}),2&e&&"string"!=typeof o)for(var r in o)c.d(a,r,function(e){return o[e]}.bind(null,r));return a},c.n=function(e){var o=e&&e.__esModule?function(){return e.default}:function(){return e};return c.d(o,"a",o),o},c.o=function(e,o){return Object.prototype.hasOwnProperty.call(e,o)},c.p="",c(c.s="./src/index.js")}({"./src/bitap/bitap_matched_indices.js":function(e,o){e.exports=function(){for(var e=0a)return _(e,this.pattern,r);var c=this.options,n=c.location,d=c.distance,i=c.threshold,m=c.findAllMatches,t=c.minMatchCharLength;return l(e,this.pattern,this.patternAlphabet,{location:n,distance:d,threshold:i,findAllMatches:m,minMatchCharLength:t})}}])&&r(e.prototype,o),a&&r(e,a),j}();e.exports=c},"./src/helpers/deep_value.js":function(e,o,a){var _=a("./src/helpers/is_array.js");e.exports=function(e,o){return function e(o,a,r){if(a){var c=a.indexOf("."),n=a,d=null;-1!==c&&(n=a.slice(0,c),d=a.slice(c+1));var i=o[n];if(null!=i)if(d||"string"!=typeof i&&"number"!=typeof i)if(_(i))for(var m=0,t=i.length;m 0 and <= 1");f=f.name}else i[f]={weight:1};this._analyze({key:f,value:this.options.getFn(_,f),record:_,index:m},{resultMap:r,results:c,tokenSearchers:e,fullSearcher:o})}return{weights:i,results:c}}},{key:"_analyze",value:function(e,o){var a=e.key,r=e.arrayIndex,c=void 0===r?-1:r,n=e.value,d=e.record,i=e.index,m=o.tokenSearchers,t=void 0===m?[]:m,_=o.fullSearcher,l=void 0===_?[]:_,s=o.resultMap,f=void 0===s?{}:s,g=o.results,u=void 0===g?[]:g;if(null!=n){var h=!1,y=-1,j=0;if("string"==typeof n){this._log("\nKey: ".concat(""===a?"-":a));var p=l.search(n);if(this._log('Full text: "'.concat(n,'", score: ').concat(p.score)),this.options.tokenize){for(var b=n.split(this.options.tokenSeparator),v=[],k=0;k=t.length;if(this._log("\nCheck Matches: ".concat(z)),(h||p.isMatch)&&z){var T=f[i];T?T.output.push({key:a,arrayIndex:c,value:n,score:M,matchedIndices:p.matchedIndices}):(f[i]={item:d,output:[{key:a,arrayIndex:c,value:n,score:M,matchedIndices:p.matchedIndices}]},u.push(f[i]))}}else if(I(n))for(var P=0,A=n.length;Pthis.quill.container.offsetWidth?this.container.style.left=a.left-250+"px":this.container.style.left=a.left+"px",this.container.style.top=a.top+a.height+"px",this.open=!0,this.quill.on("text-change",this.onTextChange),this.quill.once("selection-change",this.onSelectionChange),this.onOpen&&this.onOpen()}},{key:"handleArrow",value:function(){if(!this.open)return!0;this.buttons[0].classList.remove("emoji-active"),this.buttons[0].focus(),1=e)return this.close(null);this.query=this.quill.getText(this.atIndex+1,e-this.atIndex-1);try{if(event&&this.isWhiteSpace(this.query))return void this.close(null)}catch(e){console.warn(e)}this.query=this.query.trim();var o=this.fuse.search(this.query);o.sort(function(e,o){return e.emoji_order-o.emoji_order}),this.query.length'},{type:"n",name:"nature",content:'
'},{type:"d",name:"food",content:'
'},{type:"s",name:"symbols",content:'
'},{type:"a",name:"activity",content:'
'},{type:"t",name:"travel",content:'
'},{type:"o",name:"objects",content:'
'},{type:"f",name:"flags",content:'
'}].map(function(e){var o=document.createElement("li");o.classList.add("emoji-tab"),o.classList.add("filter-"+e.name);var a=e.content;o.innerHTML=a,o.dataset.filter=e.type,_.appendChild(o);var r=document.querySelector(".filter-"+e.name);r.addEventListener("click",function(){var e=document.querySelector(".active");e&&e.classList.remove("active"),r.classList.toggle("active"),function(e,o,a){for(;o.firstChild;)o.removeChild(o.firstChild);H(e.dataset.filter,o,a)}(r,t,c)})}),H("p",t,c),document.querySelector(".filter-people").classList.add("active")}(e),this.quill.on("text-change",function(e,o,a){"user"===a&&(I(),B(r))})}}])&&O(o.prototype,a),r&&O(o,r),c}();function I(){var e=document.getElementById("emoji-palette");document.getElementById("emoji-close-div").style.display="none",e&&e.remove()}function B(e){return e.getSelection()}function H(e,n,d){var o=new p.a(c,{shouldSort:!0,matchAllTokens:!0,threshold:.3,location:0,distance:100,maxPatternLength:32,minMatchCharLength:3,keys:["category"]}).search(e);o.sort(function(e,o){return e.emoji_order-o.emoji_order}),d.focus();var i=B(d);o.map(function(e){var o=document.createElement("span"),a=document.createTextNode(e.shortname);o.appendChild(a),o.classList.add("bem"),o.classList.add("bem-"+e.name),o.classList.add("ap"),o.classList.add("ap-"+e.name);var r=""+e.code_decimal;o.innerHTML=r+" ",n.appendChild(o);var c=document.querySelector(".bem-"+e.name);c&&c.addEventListener("click",function(){(function(e,o){var a=document.createElement(e);Object.keys(o).forEach(function(e){return a[e]=o[e]});for(var r=arguments.length,c=new Array(2'};var R=A;function N(e){return(N="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function U(e,o){for(var a=0;a'},{type:"n",name:"nature",content:'
'},{type:"d",name:"food",content:'
'},{type:"s",name:"symbols",content:'
'},{type:"a",name:"activity",content:'
'},{type:"t",name:"travel",content:'
'},{type:"o",name:"objects",content:'
'},{type:"f",name:"flags",content:'
'}].map(function(e){var o=document.createElement("li");o.classList.add("emoji-tab"),o.classList.add("filter-"+e.name);var a=e.content;o.innerHTML=a,o.dataset.filter=e.type,n.appendChild(o);var r=document.querySelector(".filter-"+e.name);r.addEventListener("click",function(){var e=document.getElementById("textarea-emoji"),o=e&&e.querySelector(".active");for(o&&o.classList.remove("active"),r.classList.toggle("active");i.firstChild;)i.removeChild(i.firstChild);$(r.dataset.filter,i,m)})}),window.innerHeight/2'};var J=Q;a(2);m.a.register({"formats/emoji":y,"modules/emoji-shortname":C,"modules/emoji-toolbar":R,"modules/emoji-textarea":J},!0);o.default={EmojiBlot:y,ShortNameEmoji:C,ToolbarEmoji:R,TextAreaEmoji:J}}])});