function page_generator_pro_autocomplete_initialize(){var e;(e=jQuery)(page_generator_pro_autocomplete.fields.join(", ")).each((function(t){e(this).data("autocomplete")&&(e(this).autocomplete("destroy"),e(this).removeData("autocomplete")),page_generator_pro_autocomplete_initialize_input(this,page_generator_pro_autocomplete.keywords,!0)}))}function page_generator_pro_autocomplete_initialize_input(e,t,o){var r;r=jQuery,o&&r(e).data("autocomplete")&&(r(e).autocomplete("destroy"),r(e).removeData("autocomplete")),r(e).data("autocomplete")||r(e).on("keydown",(function(e){e.keyCode===r.ui.keyCode.TAB&&r(this).autocomplete("instance").menu.active&&e.preventDefault()})).autocomplete({minLength:0,source:function(e,o){o(r.ui.autocomplete.filter(t,e.term.split(/[ ,]+/).pop()))},focus:function(){return!1},select:function(e,t){var o=this.value.split(/[ ,]+/);return o.pop(),o.push(t.item.value),o.push(""),this.value=o.join(" "),!1}})}function appendPageGeneratorProAutocompleter(e,t){return e.concat(pageGeneratorProKeywordAutocompleter)}jQuery(document).ready((function(e){page_generator_pro_autocomplete_initialize()}));var pageGeneratorProKeywordAutocompleter={name:"keywords",triggerPrefix:"{",options:page_generator_pro_autocomplete.keywords,getOptionKeywords:function(e){return e},getOptionLabel:function(e){return e},getOptionCompletion:function(e){return e}};void 0!==wp.hooks&&wp.hooks.addFilter("editor.Autocomplete.completers","page-generator-pro/autocompleters/keywords",appendPageGeneratorProAutocompleter);