(()=>{var e,t={120:(e,t,r)=>{"use strict";const n=window.wp.blocks,s=window.wp.element,o=window.wp.primitives,a=(0,s.createElement)(o.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,s.createElement)(o.Path,{d:"M19 6.5H5c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-7c0-1.1-.9-2-2-2zm.5 9c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-7c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v7zM8 12.8h8v-1.5H8v1.5z"}));function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},l.apply(this,arguments)}var i=r(184),c=r.n(i);const u=window.wp.i18n,d=window.wp.components,p=window.wp.blockEditor;function m(e){let{selectedWidth:t,setAttributes:r}=e;return(0,s.createElement)(d.PanelBody,{title:(0,u.__)("Width settings")},(0,s.createElement)(d.ButtonGroup,{"aria-label":(0,u.__)("Button width")},[25,50,75,100].map((e=>(0,s.createElement)(d.Button,{key:e,isSmall:!0,variant:e===t?"primary":void 0,onClick:()=>{var n;r({width:t===(n=e)?void 0:n})}},e,"%")))))}(0,n.registerBlockType)("madeitforms/submit-field",{icon:a,edit:function(e){var t;const{attributes:r,setAttributes:n,className:o,isSelected:a,onReplace:i,mergeBlocks:d}=e,{style:v,text:f,width:h}=r,b=(0,p.__experimentalUseBorderProps)(r),w=(0,p.__experimentalUseColorProps)(r),y=(0,p.__experimentalGetSpacingClassesAndStyles)(r),_=(0,p.useBlockProps)();return(0,s.createElement)(s.Fragment,null,(0,s.createElement)("div",l({},_,{className:c()(_.className,{["has-custom-width wp-block-madeitforms-submit-button__width-"+h]:h,"has-custom-font-size":_.style.fontSize})}),(0,s.createElement)(p.RichText,{"aria-label":(0,u.__)("Button text"),placeholder:(0,u.__)("Add text…"),value:f,onChange:e=>{n({text:e.replace(/<\/?a[^>]*>/g,"")})},withoutInteractiveFormatting:!0,className:c()(o,"wp-block-madeitforms-submit-button__link",w.className,b.className,{"no-border-radius":0===(null==v||null===(t=v.border)||void 0===t?void 0:t.radius)}),style:{...b.style,...w.style,...y.style},onReplace:i,onMerge:d,identifier:"text"})),(0,s.createElement)(p.InspectorControls,null,(0,s.createElement)(m,{selectedWidth:h,setAttributes:n})))},save:function(e){var t,r;let{attributes:n,className:o}=e;const{fontSize:a,style:l,text:i,width:u}=n;if(!i)return null;const d=(0,p.__experimentalGetBorderClassesAndStyles)(n),m=(0,p.__experimentalGetColorClassesAndStyles)(n),v=(0,p.__experimentalGetSpacingClassesAndStyles)(n),f=c()("wp-block-madeitforms-submit-button__link",m.className,d.className,{"no-border-radius":0===(null==l||null===(t=l.border)||void 0===t?void 0:t.radius)}),h={...d.style,...m.style,...v.style},b=c()(o,{[`has-custom-width wp-block-madeitforms-submit-button__width-${u}`]:u,"has-custom-font-size":a||(null==l||null===(r=l.typography)||void 0===r?void 0:r.fontSize)});return(0,s.createElement)("div",p.useBlockProps.save({className:b}),(0,s.createElement)(p.RichText.Content,{tagName:"button",className:f,style:h,value:i}))}})},184:(e,t)=>{var r;!function(){"use strict";var n={}.hasOwnProperty;function s(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var o=typeof r;if("string"===o||"number"===o)e.push(r);else if(Array.isArray(r)){if(r.length){var a=s.apply(null,r);a&&e.push(a)}}else if("object"===o)if(r.toString===Object.prototype.toString)for(var l in r)n.call(r,l)&&r[l]&&e.push(l);else e.push(r.toString())}}return e.join(" ")}e.exports?(s.default=s,e.exports=s):void 0===(r=function(){return s}.apply(t,[]))||(e.exports=r)}()}},r={};function n(e){var s=r[e];if(void 0!==s)return s.exports;var o=r[e]={exports:{}};return t[e](o,o.exports,n),o.exports}n.m=t,e=[],n.O=(t,r,s,o)=>{if(!r){var a=1/0;for(u=0;u<e.length;u++){r=e[u][0],s=e[u][1],o=e[u][2];for(var l=!0,i=0;i<r.length;i++)(!1&o||a>=o)&&Object.keys(n.O).every((e=>n.O[e](r[i])))?r.splice(i--,1):(l=!1,o<a&&(a=o));if(l){e.splice(u--,1);var c=s();void 0!==c&&(t=c)}}return t}o=o||0;for(var u=e.length;u>0&&e[u-1][2]>o;u--)e[u]=e[u-1];e[u]=[r,s,o]},n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={826:0,431:0};n.O.j=t=>0===e[t];var t=(t,r)=>{var s,o,a=r[0],l=r[1],i=r[2],c=0;if(a.some((t=>0!==e[t]))){for(s in l)n.o(l,s)&&(n.m[s]=l[s]);if(i)var u=i(n)}for(t&&t(r);c<a.length;c++)o=a[c],n.o(e,o)&&e[o]&&e[o][0](),e[o]=0;return n.O(u)},r=self.webpackChunkmadeit_forms=self.webpackChunkmadeit_forms||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})();var s=n.O(void 0,[431],(()=>n(120)));s=n.O(s)})();