(()=>{var e={6942(e,t){var n;!function(){"use strict";var o={}.hasOwnProperty;function s(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=i(e,r(n)))}return e}function r(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return s.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)o.call(e,n)&&e[n]&&(t=i(t,n));return t}function i(e,t){return t?e?e+" "+t:e+t:e}e.exports?(s.default=s,e.exports=s):void 0===(n=function(){return s}.apply(t,[]))||(e.exports=n)}()}};const t={};function n(o){const s=t[o];if(void 0!==s)return s.exports;const r=t[o]={exports:{}};return e[o](r,r.exports,n),r.exports}n.n=e=>{const t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{if(Array.isArray(t))for(var o=0;o<t.length;){var s=t[o++],r=t[o++];n.o(e,s)?0===r&&o++:0===r?Object.defineProperty(e,s,{enumerable:!0,value:t[o++]}):Object.defineProperty(e,s,{enumerable:!0,get:r})}else for(var s in t)n.o(t,s)&&!n.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:t[s]})},n.o=(e,t)=>Object.hasOwn(e,t),(()=>{"use strict";const e=window.wp.blocks;var t=n(6942),o=n.n(t);const s=window.wp.i18n,r=window.wp.blockEditor,i=(window.lodash,window.moment,window.wp.element,window.wp.data),l=window.ReactJSXRuntime;const a=window.wp.components;function c(e){const{attributes:t,setAttributes:n,isSelected:o,clientId:i,name:c}=e,d="mailster-workflow/condition-yes"===c;return(0,l.jsx)(r.InspectorControls,{children:(0,l.jsx)(a.Panel,{children:(0,l.jsx)(a.PanelBody,{children:(0,l.jsx)(a.PanelRow,{children:d?(0,s.__)("These steps run if the condition is fullfilled.","mailster"):(0,s.__)("These steps run if the condition is not fullfilled.","mailster")})})})})}const d=(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,l.jsxs)("g",{fill:"none",children:[(0,l.jsx)("path",{d:"M0 0h24v24H0z"}),(0,l.jsx)("path",{stroke:"#46b450",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",d:"M6.944 19H5.056A1.056 1.056 0 014 17.944v-7.388C4 9.973 4.473 9.5 5.056 9.5h1.888C7.527 9.5 8 9.973 8 10.556v7.388C8 18.527 7.527 19 6.944 19zM8 10.572l3.649-4.751a1.734 1.734 0 012.714-.046v0c.265.321.409.725.409 1.141v3.271h3.096a1.8 1.8 0 011.496.799l.329.491a1.8 1.8 0 01.234 1.499l-1.359 4.722A1.8 1.8 0 0116.839 19H10.55a1.8 1.8 0 01-1.318-.574L8 17.1"})]})}),u=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"mailster-workflow/condition-yes","title":"Condition fulfilled","category":"mailster-workflow-steps","parent":["mailster-workflow/conditions"],"example":{},"supports":{"html":false,"inserter":false,"className":false,"customClassName":false,"reusable":false,"renaming":false,"lock":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"usesContext":["mailster-workflow/weight"],"textdomain":"mailster","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css"}'),{name:f,...p}=u;(0,e.registerBlockType)(f,{...p,icon:d,edit:function(e){const{attributes:t,setAttributes:n,isSelected:a,clientId:d,context:u,name:f}=e,p=["mailster-step-condition","canvas-handle"],w="mailster-workflow/condition-yes"===f;(e=>function(e,t,n=!0){const o=function(e,t=null,n=!0){const{getBlocks:o,getBlockRootClientId:s}=(0,i.select)("core/block-editor"),r=o(t),l=[];return function t(o){o.forEach(o=>{o.name&&new RegExp(e,"g").test(o.name)&&(o.rootClientId=s(o.clientId),l.push(o)),n&&o.innerBlocks.length>0&&t(o.innerBlocks)})}(r||[]),l}("mailster-workflow/stop",t,n);return!!o.length&&o[0]}(0,e,!1))(d)&&p.push("mailster-has-stop"),p.push(w?"yes":"no");const m=w?(0,s.__)("Condition is fullfilled","mailster"):(0,s.__)("Condition is not fullfilled","mailster"),h=(0,r.useBlockProps)({className:o()({},p)}),v=(0,r.useInnerBlocksProps)({className:"canvas-handle"},{allowedBlocks:["mailster-workflow/stop"],templateLock:!1});return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{...h,children:[(0,l.jsx)("div",{className:"line line-in canvas-handle",children:(0,l.jsx)("span",{className:"condition-label",title:m})}),(0,l.jsx)("div",{...v}),(0,l.jsx)("div",{className:"line line-out canvas-handle"})]}),(0,l.jsx)(c,{...e})]})},save:function(e){return(0,l.jsx)(r.InnerBlocks.Content,{...r.useBlockProps.save()})}})})()})();