!function(){function t(t,r){var i,a=r.feed;if(this.caseSensitive=r.caseSensitive,this.marker=r.hasOwnProperty("marker")?r.marker:"@",this.minChars=null!==r.minChars&&void 0!==r.minChars?r.minChars:2,!(i=r.pattern)){i=this.minChars;var o="\\"+this.marker+"[_a-zA-Z0-9À-ž]";o=(i?o+"{"+i+",}":o+"*")+"$";i=new RegExp(o)}this.pattern=i,this.cache=void 0===r.cache||r.cache,this.followingSpace=r.followingSpace,this.throttle=void 0!==r.throttle?r.throttle:200,this._autocomplete=new NEW_CKEDITOR.plugins.autocomplete(t,{textTestCallback:e(this.marker,this.minChars,this.pattern),dataCallback:n(a,this),itemTemplate:r.itemTemplate,outputTemplate:r.outputTemplate,throttle:this.throttle,itemsLimit:r.itemsLimit,followingSpace:this.followingSpace})}function e(t,e,n){function r(t,e){var r=t.slice(0,e).match(n);if(!r)return null;var i=t[r.index-1];return void 0===i||i.match(/\s+/)?{start:r.index,end:e}:null}return function(t){return t.collapsed?NEW_CKEDITOR.plugins.textMatch.match(t,r):null}}function n(t,e){return function(n,i){function a(t){t&&(t=NEW_CKEDITOR.tools.array.map(t,(function(t){return NEW_CKEDITOR.tools.object.merge(t,{name:e.marker+t.name})})),i(t))}var o=n.query;e.marker&&(o=o.substring(e.marker.length)),NEW_CKEDITOR.tools.array.isArray(t)?function(){var n=function(t){var e=1;return NEW_CKEDITOR.tools.array.reduce(t,(function(t,n){return t.push({name:n,id:e++}),t}),[])}(t).filter((function(t){return t=t.name,e.caseSensitive||(t=t.toLowerCase(),o=o.toLowerCase()),0===t.indexOf(o)}));a(n)}():"string"==typeof t?function(){var n=new NEW_CKEDITOR.template(t).output({encodedQuery:encodeURIComponent(o)});if(e.cache&&r[n])return a(r[n]);NEW_CKEDITOR.ajax.load(n,(function(t){t=JSON.parse(t),e.cache&&null!==t&&(r[n]=t),a(t)}))}():t({query:o,marker:e.marker},a)}}NEW_CKEDITOR._.mentions={cache:{}};var r=NEW_CKEDITOR._.mentions.cache;NEW_CKEDITOR.plugins.add("mentions",{requires:"autocomplete,textmatch,ajax",instances:[],init:function(e){var n=this;e.on("instanceReady",(function(){NEW_CKEDITOR.tools.array.forEach(e.config.mentions||[],(function(r){n.instances.push(new t(e,r))}))}))},isSupportedEnvironment:function(t){return t.plugins.autocomplete.isSupportedEnvironment(t)}}),t.prototype={destroy:function(){this._autocomplete.destroy()}},NEW_CKEDITOR.plugins.mentions=t}();