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