function pageGeneratorProGutenbergButtonResearch(e){!function(e,n,t,o,r){const{createElement:a}=t,{registerFormatType:i,getTextContent:c,applyFormat:g,toggleFormat:_,slice:p,insert:l,create:s}=n,{BlockControls:u}=e,{ToolbarGroup:w,ToolbarButton:d}=o;var m="dashicons-tablet";void 0!==r.gutenberg_icon&&(m=r.gutenberg_icon.search("svg")>=0?t.RawHTML({children:r.gutenberg_icon}):r.gutenberg_icon),i("page-generator-pro/"+r.name,{title:r.title,tagName:r.tag,className:r.name,edit:function(e){var n=c(p(e.value));return a(u,{},a(w,{},a(d,{key:"page_generator_pro_"+r.name+"_toolbar_button",icon:m,title:r.title,onClick:function(){wpzinc_modal_open("Generating..."),jQuery.post(ajaxurl,{action:"page_generator_pro_tinymce_spintax_generate",nonce:r.nonce,content:n},(function(n){return n.success?(wpzinc_modal_show_success_and_exit("Done!"),e.onChange(l(e.value,s({html:n.data.replace(/(<([^>]+)>)/gi,"")})))):wpzinc_modal_show_error_message(n.data)}))}})))}})}(window.wp.blockEditor,window.wp.richText,window.wp.element,window.wp.components,e)}"undefined"!=typeof wp&&void 0!==wp.blocks&&pageGeneratorProGutenbergButtonResearch(page_generator_pro_gutenberg_button_spintax_generate);