"use strict";var editor,element="",code="";jQuery(document).on("click",".tiny_button_tags_placeholders .item",function(){element="",code="",element=jQuery(this).attr("element"),code=jQuery(this).attr("code"),editor.selection.setContent("{{"+code+"}}"),code=""}),tinymce.create("tinymce.plugins.nf_tags_button",{init:function(e,t){e.addButton("nf_tags_button",{title:"Add an element",classes:"flight_shortcodes btn nf_mce_button",text:"+ Add field tag",onclick:function(t){editor=e;var n=jQuery("#"+t.control._id),o=n.offset();o.top,o.left;jQuery(".tags_opened").removeClass("tags_opened");var s=jQuery(".tiny_button_tags_placeholders").detach(),a=n.closest(".wp-editor-wrap");a.prepend(s),t="",code="",n.hasClass("is_opened")?(n.removeClass("is_opened"),jQuery(".tiny_button_tags_placeholders").hide(),jQuery(".tags_opened").removeClass("tags_opened")):(n.addClass("is_opened"),jQuery(".tiny_button_tags_placeholders").slideDown("fast"),a.addClass("tags_opened"))}})},createControl:function(e,t){return null}}),tinymce.PluginManager.add("nf_tags_button",tinymce.plugins.nf_tags_button);