(()=>{var e={942:(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=s(e,l(n)))}return e}function l(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return o.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var n in e)r.call(e,n)&&e[n]&&(t=s(t,n));return t}function s(e,t){return t?e?e+" "+t:e+t:e}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var l=t[r]={exports:{}};return e[r](l,l.exports,n),l.exports}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),(()=>{"use strict";const e=window.wp.blocks,t=window.wp.element;var r=n(942),o=n.n(r);const l=window.wp.i18n,s=window.wp.blockEditor,i=(window.wp.coreData,(0,t.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},(0,t.createElement)("defs",null,(0,t.createElement)("path",{id:"a",d:"M0 0h24v24H0z"})),(0,t.createElement)("g",{fill:"none"},(0,t.createElement)("path",{stroke:"#c3232d",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",d:"M10 12V3.5A1.5 1.5 0 0111.5 2v0A1.5 1.5 0 0113 3.5V12M10 5.5A1.5 1.5 0 008.5 4v0A1.5 1.5 0 007 5.5V12"}),(0,t.createElement)("path",{stroke:"#c3232d",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",d:"M13 5.5A1.5 1.5 0 0114.5 4v0A1.5 1.5 0 0116 5.5V14l1.901-1.901a1.554 1.554 0 012.198 0v0c.524.524.605 1.345.194 1.961l-3.512 5.268A6 6 0 0111.789 22H10a6 6 0 01-6-6V7.5A1.5 1.5 0 015.5 6v0A1.5 1.5 0 017 7.5"})))),a=window.wp.components;function c(e){const{attributes:n,setAttributes:r}=e;return(0,t.createElement)(s.InspectorControls,null,(0,t.createElement)(a.Panel,null))}const u=window.wp.data;function d(e){const{attributes:n,setAttributes:r}=e,{comment:o=""}=n;return(0,t.createElement)(t.Fragment,null,o&&(0,t.createElement)("div",{className:"mailster-step-comment"},o),(0,t.createElement)(s.InspectorControls,null,(0,t.createElement)(a.Panel,null,(0,t.createElement)(a.PanelBody,null,(0,t.createElement)(a.PanelRow,null,(0,t.createElement)(a.TextControl,{label:(0,l.__)("Comment","mailster"),help:(0,l.__)("Add a comment to help you understand your workflow.","mailster"),value:o,onChange:e=>r({comment:e||void 0})}))))))}function m(e){const{attributes:n,setAttributes:r,clientId:o,isSelected:l}=e,{id:i}=n;return(0,t.useEffect)((()=>{new Promise((e=>{const t=(0,u.subscribe)((()=>{if((0,u.select)("core/editor").isCleanNewPost()||(0,u.select)("core/block-editor").getBlockCount()>0){const n=document.querySelector('iframe[name="editor-canvas"]'),r=n?n.contentWindow:window,o=()=>{r.removeEventListener("load",o),t(),e(r)};r.document.querySelector(".is-root-container")?o():r.addEventListener("load",o)}}))})).then((e=>{(!i||e.document.querySelectorAll(".mailster-step-"+i).length>1)&&r({id:o.substring(30)})}))})),(0,t.useEffect)((()=>{if(l&&i)return history.replaceState(void 0,void 0,"#step-"+i),()=>{history.pushState("",document.title,location.pathname+location.search)}}),[l]),(0,t.createElement)(s.InspectorControls,null,(0,t.createElement)(a.Panel,null,(0,t.createElement)(a.PanelBody,null,(0,t.createElement)(a.PanelRow,null,sprintf("Step ID : %s",i)))))}window.lodash,window.moment,window.wp.date;const p=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"mailster-workflow/stop","title":"Stop","category":"mailster-automation-fields","keywords":["stop"],"parent":["mailster-workflow/condition-yes","mailster-workflow/condition-no"],"description":"This is a stop block which prevents any further action in the workflow.","example":{},"supports":{"html":false,"className":false,"customClassName":false,"reusable":false},"attributes":{"id":{"type":"string"},"comment":{"type":"string"}},"textdomain":"mailster","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css"}'),{name:w,...f}=p;(0,e.registerBlockType)(w,{...f,icon:i,edit:function(e){const{attributes:n,setAttributes:r,isSelected:l,clientId:a}=e,{id:u}=n,p=[];(0,t.useEffect)((()=>{(!u||document.querySelectorAll(".mailster-step-"+u).length>1)&&r({id:a.substring(30)})})),u&&p.push("mailster-step-"+u);const w=(0,s.useBlockProps)({className:o()({},p)});return(0,t.createElement)(t.Fragment,null,(0,t.createElement)(c,e),(0,t.createElement)("div",w,(0,t.createElement)(d,e),(0,t.createElement)("div",{className:"mailster-stop"},i)),(0,t.createElement)(m,e))},save:()=>null})})()})();