jQuery(document).ready((function(t){t("body").on("click","form.wpzinc-tinymce-popup button.close",(function(t){"undefined"==typeof tinyMCE||!tinyMCE.activeEditor||tinyMCE.activeEditor.isHidden()?wpZincQuickTagsModal.close():tinymce.activeEditor.windowManager.close()})),t("body").on("click","form.wpzinc-tinymce-popup div.buttons input[type=button]",(function(i){i.preventDefault();var e=t(this).closest("form.wpzinc-tinymce-popup"),n="["+t("input[name=shortcode]",t(e)).val();return t("input, select",t(e)).each((function(i){if(void 0===t(this).data("shortcode"))return!0;if(!t(this).val())return!0;if(0==t(this).val().length)return!0;var e=t(this).data("shortcode"),o=t(this).val();if(!e.length)return!0;e.search("}")>-1&&e.search("{")>-1&&(e=e.replace(/{|}/gi,(function(t){return""})),e=t(e,t(this).parent().parent()).val()),void 0!==t(this).data("shortcode-prepend")&&(e=t(this).data("shortcode-prepend")+e),Array.isArray(o)&&(o=o.join(",")),n+=" "+e.trim()+'="'+o.trim()+'"'})),n+="]","undefined"!=typeof tinyMCE&&tinyMCE.activeEditor&&!tinyMCE.activeEditor.isHidden()?(tinyMCE.activeEditor.execCommand("mceReplaceContent",!1,n),void tinyMCE.activeEditor.windowManager.close()):"undefined"!=typeof QTags?(QTags.insertContent(n),void wpZincQuickTagsModal.close()):void 0}))}));var wpZincQuickTagsModal=new wp.media.view.Modal({controller:{trigger:function(){}},hasCloseButton:!1,className:"wpzinc-quicktags-modal"}),wpZincQuickTagsModalContent=wp.Backbone.View.extend({template:wp.template("wpzinc-quicktags-modal")});wpZincQuickTagsModal.content(new wpZincQuickTagsModalContent);