!function(e,t,s,i,r){var n=s.createElement,o=i.TextControl,a=i.CheckboxControl,c=i.RadioControl;function b(e,t,s){var i=e.attributes||"",r="",n="",o="",a="",c="",b="",u="";switch("subscribe"===i.hide?r=' hide="subscribe"':"unsubscribe"===i.hide&&(r=' hide="unsubscribe"'),""!==i.id&&undefined!==i.id&&(n=' id="'+i.id+'"'),!0===i.nojs&&(o=' nojs="true"'),!0===i.antispam&&(a=' antispam="true"'),""!==i.size&&undefined!==i.size&&"20"!==i.size&&(c=' size="'+i.size+'"'),!0===i.wrap&&(b=' wrap="false"'),""!==i.link&&undefined!==i.link&&(u=' link="'+i.link+'"'),t){case"hide":"none"===s?r="":"subscribe"===s?r=' hide="subscribe"':"unsubscribe"===s&&(r=' hide="unsubscribe"');break;case"id":n=""===s?"":' id="'+s+'"';break;case"nojs":!0===s?o=' nojs="true"':!1===s&&(o="");break;case"antispam":!0===s?a=' antispam="true"':!1===s&&(a="");break;case"size":c="20"===s?"":' size="'+s+'"';break;case"wrap":!0===s?b=' wrap="false"':!1===s&&(b="");break;case"link":u=""===s?"":' link="'+s+'"'}return e.attributes.shortcode="[subscribe2"+r+n+o+a+c+b+u+"]",e.attributes.shortcode}e.registerBlockType("subscribe2-html/shortcode",{title:t.__("Subscribe2 HTML","subscribe2"),icon:"email",category:"widgets",keywords:[t.__("email","subscribe2"),t.__("notification","subscribe2")],supports:{customClassName:!1,className:!1,multiple:!1,html:!1},attributes:{shortcode:{type:"text",selector:"p"},hide:{type:"string"},id:{type:"string"},nojs:{type:"boolean"},antispam:{type:"boolean"},size:{type:"number"},wrap:{type:"boolean"},link:{type:"string"}},transforms:{to:[{type:"block",blocks:["core/shortcode"],transform:function(t){return undefined!==t.shortcode&&""!==t.shortcode||(t.shortcode="[subscribe2]"),e.createBlock("core/shortcode",{text:t.shortcode})}}],from:[{type:"block",blocks:["core/shortcode"],transform:function(t){var s,i,r,n,o,a,c,b,u,l,d,p;if("subscribe2"===t.text.substr(1,10)){for(s=t.text,p=(i=t.text.replace(/^\[subscribe2|\]$/g,"").replace(/^\s+|\s+$/g,"").split(/['"]\s/g)).length,d=0;d
"+e.attributes.shortcode+"
")}})}(window.wp.blocks,window.wp.i18n,window.wp.element,window.wp.components,window.wp.editor);