import { D as N, F as D, a as R, b as P, c as W, I as A, O as E, T as C, V as I, d as B, e as O, f as V, g as z, h as L, i as H, j as q, k as M, E as _, l as $, m as j, n as G, o as U, p as Y, q as J, r as K, s as Q, t as X, u as Z, v as ee, w as se, x as re, y as oe, z as ae, A as te, B as ie, C as ne } from "./index-B-D9UuLO.js";
import { F as ce, S as de, a as pe, u as ue } from "./SchemaBuilderDrawer-BP7aZgFe.js";
import "react/jsx-runtime";
import "react";
import "@mui/material";
import "react-icons/md";
import { NodeTypeRegistry as he, baseNodeDefaults as me, conditionBranchDescriptor as ge, defineNode as Fe, endEventDescriptor as be, makeSubWorkflowDescriptor as Te, nodeTypeRegistry as we, notificationDescriptor as ye, restApiDescriptor as ke, startEventDescriptor as Se, subWorkflowDescriptor as xe, webhookTriggerDescriptor as ve, webhookTriggerTemplate as Ne } from "./nodeRegistry.js";
import { TemplateRegistry as Re, templateRegistry as Pe } from "./templateRegistry.js";
import { F as Ae, a as Ee, S as Ce, F as Ie, W as Be, b as Oe } from "./WorkflowExecutionHistory-B0OiFCyi.js";
import { d as ze } from "./messages-CO299wPN.js";
import { l as He, s as qe } from "./bpmn-CtfWDaOY.js";
import { A as _e, b as $e, E as je, c as Ge, F as Ue, R as Ye, S as Je, T as Ke, W as Qe, e as Xe } from "./GatewayBranchEdge-BWz43Sat.js";
import { b as es } from "./buildBackendPayload-4SwOp7St.js";
class g {
  constructor() {
    this.channels = /* @__PURE__ */ new Map();
  }
  register(s, r) {
    this.channels.set(s, r);
  }
  get(s) {
    return this.channels.get(s);
  }
  list() {
    return Array.from(this.channels.entries()).map(([s, r]) => ({ key: s, ...r }));
  }
  has(s) {
    return this.channels.has(s);
  }
}
const k = new g();
function S(e) {
  const {
    currentNodeId: s,
    nodes: r,
    getParents: t,
    getOutputSchema: o,
    nodePath: i,
    nodeLabel: n,
    getNodeId: l = (a) => a.id
  } = e, c = r.find((a) => l(a) === s);
  if (!c) return [];
  const h = F(c, r, t, l), p = [];
  for (const a of h) {
    const d = o(a);
    if (!d || d.length === 0) continue;
    const u = i(a);
    p.push({
      label: n ? n(a) : u,
      items: d.map((m) => f(m, u))
    });
  }
  return p;
}
function F(e, s, r, t) {
  const o = /* @__PURE__ */ new Set(), i = [], n = [...r(e, s)];
  for (; n.length > 0; ) {
    const l = n.shift(), c = t(l);
    o.has(c) || (o.add(c), i.push(l), n.push(...r(l, s)));
  }
  return i;
}
function f(e, s) {
  const r = `${s}.${e.key}`, t = e.description ?? (e.sample !== void 0 && e.sample !== null ? String(e.sample) : void 0), o = { label: e.label, path: r };
  return t !== void 0 && (o.description = t), e.children && e.children.length > 0 && (o.children = e.children.map((i) => f(i, r))), o;
}
export {
  _e as ActionNode,
  $e as ApprovalNode,
  N as DynamicFormRenderer,
  je as EdgeWithPlusLabel,
  Ge as EndNode,
  D as FF,
  ce as FIELD_TYPE_OPTIONS,
  Ue as FilterNode,
  Ae as FlowForgeCanvas,
  Ee as FlowForgeHeader,
  R as FlowForgeRegistry,
  P as FlowForm,
  W as FormulaInput,
  A as InfiniteSelectField,
  he as NodeTypeRegistry,
  E as OptionsResolversProvider,
  Ye as RestApiNode,
  de as SchemaBuilder,
  pe as SchemaBuilderDrawer,
  Je as StartNode,
  Ce as SubWorkflowPreviewDrawer,
  C as TablePickerField,
  Re as TemplateRegistry,
  Ke as TriggerNode,
  I as VariablePicker,
  B as VariablePickerProvider,
  Qe as WebhookTriggerNode,
  Ie as WorkflowCanvas,
  Be as WorkflowExecutionHistory,
  Oe as WorkflowTemplateLibrary,
  O as astHasRefs,
  V as astToTokens,
  me as baseNodeDefaults,
  es as buildBackendPayload,
  z as buildEvaluationPayload,
  L as buildFieldConfig,
  H as buildFormulaPath,
  q as buildSelectStyles,
  M as buildValidationSchema,
  S as buildVariableGroups,
  Xe as builtInNodeTypes,
  ge as conditionBranchDescriptor,
  _ as dataSourceRegistry,
  ze as defaultFlowForgeMessages,
  Fe as defineNode,
  be as endEventDescriptor,
  $ as errorTextStyle,
  j as extractLabel,
  G as fieldRegistry,
  U as hasFormulaTokens,
  Y as helperTextStyle,
  J as inputStyle,
  K as isFormula,
  He as loadWorkflowFromBpmn,
  Te as makeSubWorkflowDescriptor,
  we as nodeTypeRegistry,
  k as notificationChannelRegistry,
  ye as notificationDescriptor,
  Q as parseToAST,
  ke as restApiDescriptor,
  qe as saveWorkflowToBpmn,
  X as serializeAST,
  Z as serializeASTAsConfig,
  ee as serializeConditionExpressions,
  Se as startEventDescriptor,
  se as stripFormulaTokens,
  xe as subWorkflowDescriptor,
  Pe as templateRegistry,
  re as tokenize,
  oe as unwrapFormula,
  ae as useDynamicOptions,
  ue as useFlowForm,
  te as useOptionsResolvers,
  ie as useVariablePickerContext,
  ve as webhookTriggerDescriptor,
  Ne as webhookTriggerTemplate,
  ne as wrapFormula
};
//# sourceMappingURL=index.js.map
