function mediaLibraryOrganizerTinyMCERegisterPlugin(e){(function(i){tinymce.PluginManager.add(e.prefix+"_"+e.name.replaceAll("-","_"),function(a,n){a.addButton(e.prefix+"_"+e.name.replaceAll("-","_"),{title:e.title,image:e.icon,cmd:"media_library_organizer_"+e.name.replaceAll("-","_")});a.addCommand(e.prefix+"_"+e.name.replaceAll("-","_"),function(){a.windowManager.open({id:"wpzinc-tinymce-modal",title:e.title,width:e.modal.width,height:e.modal.height,buttons:[{text:media_library_organizer_tinymce.labels.cancel,classes:"cancel"},{text:media_library_organizer_tinymce.labels.insert,subtype:"primary",classes:"insert"}]});i.post(ajaxurl,{action:"media_library_organizer_tinymce_output_modal",nonce:media_library_organizer_tinymce.nonce,editor_type:"tinymce",shortcode:e.name},function(e){jQuery("#wpzinc-tinymce-modal-body").html(e);wp_zinc_tabs_init();mediaLibraryOrganizerSelectizeInit()})})})})(jQuery)}