"use strict";(self.webpackChunkdami=self.webpackChunkdami||[]).push([[8428],{18428:(e,i,n)=>{n.r(i),n.d(i,{default:()=>t});const t=async function({data:e,id:i},{prevBlock:n}){return new Promise(((t,o)=>{let s,c=!1;const r=this.getBlockConnections(i),l=e.specificFlow&&n?.id!==e.flowBlockId,a=()=>{const e=this.engine.connectionsMap;Object.keys(e).forEach((n=>{if(![...e[n].values()].some((e=>e.id===i)))return;const t=n.indexOf("-output"),o=n.slice(0,-1===t?n.length:t);this.engine.waitConnections[i][o]={isHere:!1,isContinue:!1}}))},d=()=>{if(c)return;const u=Object.values(this.engine.waitConnections[i]);if(u.every((e=>e.isHere))){this.engine.waitConnections[i][n.id].isContinue=!0;if(u.every((e=>e.isContinue))&&a(),clearTimeout(s),e.specificFlow&&e.flowBlockId){if(!Object.keys(this.engine.waitConnections[i]).includes(e.flowBlockId))return void o(new Error("No specific flow selected"))}t({data:"",nextBlockId:r,destroyWorker:l})}else setTimeout((()=>{d()}),1e3)};this.engine.waitConnections[i]||(this.engine.waitConnections[i]={},a()),this.engine.waitConnections[i][n.id].isHere=!0,s=setTimeout((()=>{c=!0,t({data:"",nextBlockId:r,destroyWorker:l})}),e.timeout),d()}))}}}]);