window.pageGeneratorProTinyMCERegisterPlugin=function(e){var n;n=jQuery,tinymce.PluginManager.add("page_generator_pro_"+e.name.replaceAll("-","_"),function(t){t.addButton("page_generator_pro_"+e.name.replaceAll("-","_"),{title:e.title,image:e.icon,cmd:"page_generator_pro_"+e.name.replaceAll("-","_")}),t.addCommand("page_generator_pro_"+e.name.replaceAll("-","_"),function(){"undefined"!=typeof wpZincModal&&wpZincModal.content(new wpZincModalContent);const i=[{text:"Cancel",classes:"cancel"},{text:e.render_callback?"Insert":"Run",subtype:"primary",classes:e.render_callback?"insert":"run"}];t.windowManager.open({id:"wpzinc-tinymce-modal",title:e.title,width:e.modal.width,height:e.modal.height,buttons:i}),n.post(ajaxurl,{action:"page_generator_pro_output_tinymce_modal",nonce:page_generator_pro_tinymce.nonces.tinymce,editor_type:"tinymce",shortcode:e.name},function(e){n("#wpzinc-tinymce-modal-body").html(e),wp_zinc_tabs_init(),page_generator_pro_reinit_selectize(),"undefined"!=typeof wp_zinc_autocomplete_initialize&&wp_zinc_autocomplete_initialize(".wpzinc-tinymce-popup"),page_generator_pro_conditional_fields_initialize(),n("select.wpzinc-conditional, .wpzinc-conditional select").trigger("change")})})})};