@emporix/process-diagram 2.0.0-beta.25 → 2.0.0-beta.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,9 +2,7 @@ import type { Process } from '../types';
2
2
  import type { AddStepOperation, AddStepType } from '../helpers/add-process.helpers';
3
3
  export interface ProcessDiagramProps {
4
4
  process: Process;
5
- iteratorEnabled?: boolean;
6
- conditionsEnabled?: boolean;
7
- onAddTrigger: (id?: string, pathId?: string, operation?: AddStepType) => unknown;
5
+ onAddTrigger: (id?: string, pathId?: string, type?: AddStepType, operation?: AddStepOperation) => unknown;
8
6
  onAddStep: (id?: string, pathId?: string, operation?: AddStepOperation) => unknown;
9
7
  onAddCondition: (stepId?: string, pathId?: string, operation?: AddStepOperation) => void;
10
8
  onAddLoop: (stepId?: string, pathId?: string, operation?: AddStepOperation) => void;
@@ -16,6 +14,6 @@ export interface ProcessDiagramProps {
16
14
  onSelectStep: (id: string) => unknown;
17
15
  onCheckScenario: (id: string) => unknown;
18
16
  }
19
- declare const ProcessDiagram: ({ process, iteratorEnabled, conditionsEnabled, addMultipleTriggers, onAddStep, onAddTrigger, onAddCondition, onAddLoop, onResize, onDeleteTrigger, onDeleteStep, onUpdateFilter, onSelectStep, onCheckScenario, }: Readonly<ProcessDiagramProps>) => import("react/jsx-runtime").JSX.Element;
17
+ declare const ProcessDiagram: ({ process, addMultipleTriggers, onAddStep, onAddTrigger, onAddCondition, onAddLoop, onResize, onDeleteTrigger, onDeleteStep, onUpdateFilter, onSelectStep, onCheckScenario, }: Readonly<ProcessDiagramProps>) => import("react/jsx-runtime").JSX.Element;
20
18
  export default ProcessDiagram;
21
19
  //# sourceMappingURL=ProcessDiagram.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ProcessDiagram.d.ts","sourceRoot":"","sources":["../../src/components/ProcessDiagram.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,UAAU,CAAA;AAGvC,OAAO,KAAK,EACV,gBAAgB,EAChB,WAAW,EACZ,MAAM,gCAAgC,CAAA;AAEvC,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,OAAO,CAAA;IAChB,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,YAAY,EAAE,CACZ,EAAE,CAAC,EAAE,MAAM,EACX,MAAM,CAAC,EAAE,MAAM,EACf,SAAS,CAAC,EAAE,WAAW,KACpB,OAAO,CAAA;IACZ,SAAS,EAAE,CACT,EAAE,CAAC,EAAE,MAAM,EACX,MAAM,CAAC,EAAE,MAAM,EACf,SAAS,CAAC,EAAE,gBAAgB,KACzB,OAAO,CAAA;IACZ,cAAc,EAAE,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,gBAAgB,KAAK,IAAI,CAAA;IACxF,SAAS,EAAE,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,gBAAgB,KAAK,IAAI,CAAA;IACnF,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;IACrB,eAAe,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAA;IACxC,YAAY,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAA;IACrC,cAAc,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAA;IACvC,mBAAmB,EAAE,MAAM,OAAO,CAAA;IAClC,YAAY,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAA;IACrC,eAAe,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAA;CACzC;AAED,QAAA,MAAM,cAAc,GAAI,mNAerB,QAAQ,CAAC,mBAAmB,CAAC,4CA+C/B,CAAA;AAED,eAAe,cAAc,CAAA"}
1
+ {"version":3,"file":"ProcessDiagram.d.ts","sourceRoot":"","sources":["../../src/components/ProcessDiagram.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,UAAU,CAAA;AAGvC,OAAO,KAAK,EACV,gBAAgB,EAChB,WAAW,EACZ,MAAM,gCAAgC,CAAA;AAEvC,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,OAAO,CAAA;IAChB,YAAY,EAAE,CACZ,EAAE,CAAC,EAAE,MAAM,EACX,MAAM,CAAC,EAAE,MAAM,EACf,IAAI,CAAC,EAAE,WAAW,EAClB,SAAS,CAAC,EAAE,gBAAgB,KACzB,OAAO,CAAA;IACZ,SAAS,EAAE,CACT,EAAE,CAAC,EAAE,MAAM,EACX,MAAM,CAAC,EAAE,MAAM,EACf,SAAS,CAAC,EAAE,gBAAgB,KACzB,OAAO,CAAA;IACZ,cAAc,EAAE,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,gBAAgB,KAAK,IAAI,CAAA;IACxF,SAAS,EAAE,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,gBAAgB,KAAK,IAAI,CAAA;IACnF,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;IACrB,eAAe,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAA;IACxC,YAAY,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAA;IACrC,cAAc,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAA;IACvC,mBAAmB,EAAE,MAAM,OAAO,CAAA;IAClC,YAAY,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAA;IACrC,eAAe,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAA;CACzC;AAED,QAAA,MAAM,cAAc,GAAI,+KAarB,QAAQ,CAAC,mBAAmB,CAAC,4CA4C/B,CAAA;AAED,eAAe,cAAc,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"Condition.d.ts","sourceRoot":"","sources":["../../../src/components/condition/Condition.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAG7C,QAAA,MAAM,SAAS,GAAI,8CAKhB,QAAQ,CAAC;IACV,UAAU,EAAE,MAAM,CAAA;IAClB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAA;IAC3B,MAAM,CAAC,EAAE,UAAU,CAAA;IACnB,YAAY,CAAC,EAAE,OAAO,CAAA;CACvB,CAAC,4CAgDD,CAAA;AAED,eAAe,SAAS,CAAA"}
1
+ {"version":3,"file":"Condition.d.ts","sourceRoot":"","sources":["../../../src/components/condition/Condition.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAG7C,QAAA,MAAM,SAAS,GAAI,8CAKhB,QAAQ,CAAC;IACV,UAAU,EAAE,MAAM,CAAA;IAClB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAA;IAC3B,MAAM,CAAC,EAAE,UAAU,CAAA;IACnB,YAAY,CAAC,EAAE,OAAO,CAAA;CACvB,CAAC,4CA8CD,CAAA;AAED,eAAe,SAAS,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"IfStatement.d.ts","sourceRoot":"","sources":["../../../src/components/if-statement/IfStatement.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAI7C,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;IACrB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;IACrB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,MAAM,CAAC,EAAE,UAAU,CAAA;CACpB;AAED,QAAA,MAAM,WAAW,GAAI,OAAO,QAAQ,CAAC,gBAAgB,CAAC,4CA8ErD,CAAA;AAED,eAAe,WAAW,CAAA"}
1
+ {"version":3,"file":"IfStatement.d.ts","sourceRoot":"","sources":["../../../src/components/if-statement/IfStatement.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAI7C,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;IACrB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;IACrB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,MAAM,CAAC,EAAE,UAAU,CAAA;CACpB;AAED,QAAA,MAAM,WAAW,GAAI,OAAO,QAAQ,CAAC,gBAAgB,CAAC,4CAgFrD,CAAA;AAED,eAAe,WAAW,CAAA"}
@@ -3,8 +3,6 @@ import type { AddStepOperation, AddStepType } from '../../helpers/add-process.he
3
3
  export interface IteratorProps {
4
4
  /** Iterator data: must include localId; limit is optional. */
5
5
  value: Pick<IteratorType, 'localId'> & Partial<Pick<IteratorType, 'limit' | 'steps' | 'condition' | 'status'>>;
6
- iteratorEnabled?: boolean;
7
- conditionsEnabled?: boolean;
8
6
  onAddStep?: (id?: string, pathId?: string, operation?: AddStepOperation) => void;
9
7
  onAddTrigger?: (id?: string, pathId?: string, operation?: AddStepType) => void;
10
8
  onAddCondition?: (stepId?: string, pathId?: string, operation?: AddStepOperation) => void;
@@ -15,6 +13,6 @@ export interface IteratorProps {
15
13
  onResize?: () => void;
16
14
  onCheckScenario?: (id: string) => void;
17
15
  }
18
- declare const IteratorComponent: ({ value, iteratorEnabled, conditionsEnabled, onAddStep, onAddTrigger, onAddCondition, onAddLoop, onDeleteStep, onUpdateFilter, onSelectStep, onResize, onCheckScenario, }: Readonly<IteratorProps>) => import("react/jsx-runtime").JSX.Element;
16
+ declare const IteratorComponent: ({ value, onAddStep, onAddTrigger, onAddCondition, onAddLoop, onDeleteStep, onUpdateFilter, onSelectStep, onResize, onCheckScenario, }: Readonly<IteratorProps>) => import("react/jsx-runtime").JSX.Element;
19
17
  export default IteratorComponent;
20
18
  //# sourceMappingURL=Iterator.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Iterator.d.ts","sourceRoot":"","sources":["../../../src/components/iterator/Iterator.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,QAAQ,IAAI,YAAY,EAAE,MAAM,aAAa,CAAA;AAC3D,OAAO,KAAK,EACV,gBAAgB,EAChB,WAAW,EACZ,MAAM,mCAAmC,CAAA;AAI1C,MAAM,WAAW,aAAa;IAC5B,8DAA8D;IAC9D,KAAK,EAAE,IAAI,CAAC,YAAY,EAAE,SAAS,CAAC,GAClC,OAAO,CAAC,IAAI,CAAC,YAAY,EAAE,OAAO,GAAG,OAAO,GAAG,WAAW,GAAG,QAAQ,CAAC,CAAC,CAAA;IACzE,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,SAAS,CAAC,EAAE,CACV,EAAE,CAAC,EAAE,MAAM,EACX,MAAM,CAAC,EAAE,MAAM,EACf,SAAS,CAAC,EAAE,gBAAgB,KACzB,IAAI,CAAA;IACT,YAAY,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,WAAW,KAAK,IAAI,CAAA;IAC9E,cAAc,CAAC,EAAE,CACf,MAAM,CAAC,EAAE,MAAM,EACf,MAAM,CAAC,EAAE,MAAM,EACf,SAAS,CAAC,EAAE,gBAAgB,KACzB,IAAI,CAAA;IACT,SAAS,CAAC,EAAE,CACV,MAAM,CAAC,EAAE,MAAM,EACf,MAAM,CAAC,EAAE,MAAM,EACf,SAAS,CAAC,EAAE,gBAAgB,KACzB,IAAI,CAAA;IACT,YAAY,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;IACnC,cAAc,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;IACrC,YAAY,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;IACnC,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;IACrB,eAAe,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;CACvC;AAED,QAAA,MAAM,iBAAiB,GAAI,2KAaxB,QAAQ,CAAC,aAAa,CAAC,4CAyGzB,CAAA;AAED,eAAe,iBAAiB,CAAA"}
1
+ {"version":3,"file":"Iterator.d.ts","sourceRoot":"","sources":["../../../src/components/iterator/Iterator.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,QAAQ,IAAI,YAAY,EAAE,MAAM,aAAa,CAAA;AAC3D,OAAO,KAAK,EACV,gBAAgB,EAChB,WAAW,EACZ,MAAM,mCAAmC,CAAA;AAI1C,MAAM,WAAW,aAAa;IAC5B,8DAA8D;IAC9D,KAAK,EAAE,IAAI,CAAC,YAAY,EAAE,SAAS,CAAC,GAClC,OAAO,CAAC,IAAI,CAAC,YAAY,EAAE,OAAO,GAAG,OAAO,GAAG,WAAW,GAAG,QAAQ,CAAC,CAAC,CAAA;IACzE,SAAS,CAAC,EAAE,CACV,EAAE,CAAC,EAAE,MAAM,EACX,MAAM,CAAC,EAAE,MAAM,EACf,SAAS,CAAC,EAAE,gBAAgB,KACzB,IAAI,CAAA;IACT,YAAY,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,WAAW,KAAK,IAAI,CAAA;IAC9E,cAAc,CAAC,EAAE,CACf,MAAM,CAAC,EAAE,MAAM,EACf,MAAM,CAAC,EAAE,MAAM,EACf,SAAS,CAAC,EAAE,gBAAgB,KACzB,IAAI,CAAA;IACT,SAAS,CAAC,EAAE,CACV,MAAM,CAAC,EAAE,MAAM,EACf,MAAM,CAAC,EAAE,MAAM,EACf,SAAS,CAAC,EAAE,gBAAgB,KACzB,IAAI,CAAA;IACT,YAAY,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;IACnC,cAAc,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;IACrC,YAAY,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;IACnC,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;IACrB,eAAe,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;CACvC;AAED,QAAA,MAAM,iBAAiB,GAAI,uIAWxB,QAAQ,CAAC,aAAa,CAAC,4CA6GzB,CAAA;AAED,eAAe,iBAAiB,CAAA"}
@@ -1,17 +1,15 @@
1
1
  import type { AddStepOperation, AddStepType } from '../../helpers/add-process.helpers';
2
2
  export interface PlusButtonProps {
3
3
  style?: React.CSSProperties;
4
- iteratorEnabled?: boolean;
5
- conditionsEnabled?: boolean;
6
4
  lineColor?: string;
7
5
  onAddStep?: (id?: string, pathId?: string, operation?: AddStepOperation) => void;
8
- onAddTrigger?: (id?: string, pathId?: string, operation?: AddStepType) => void;
6
+ onAddTrigger?: (id?: string, pathId?: string, type?: AddStepType, operation?: AddStepOperation) => void;
9
7
  onAddCondition?: (stepId?: string, pathId?: string, operation?: AddStepOperation) => void;
10
8
  onAddLoop?: (stepId?: string, pathId?: string, operation?: AddStepOperation) => void;
11
9
  stepId?: string;
12
10
  index?: number;
13
11
  pathId?: string;
14
12
  }
15
- declare const PlusButton: ({ onAddStep, onAddTrigger, onAddCondition, onAddLoop, iteratorEnabled, conditionsEnabled, lineColor, stepId, index, style, pathId, }: PlusButtonProps) => import("react/jsx-runtime").JSX.Element;
13
+ declare const PlusButton: ({ onAddStep, onAddTrigger, onAddCondition, onAddLoop, lineColor, stepId, index, style, pathId, }: PlusButtonProps) => import("react/jsx-runtime").JSX.Element;
16
14
  export default PlusButton;
17
15
  //# sourceMappingURL=PlusButton.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"PlusButton.d.ts","sourceRoot":"","sources":["../../../src/components/plus-button/PlusButton.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EACV,gBAAgB,EAChB,WAAW,EACZ,MAAM,mCAAmC,CAAA;AAE1C,MAAM,WAAW,eAAe;IAC9B,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAA;IAC3B,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,SAAS,CAAC,EAAE,CACV,EAAE,CAAC,EAAE,MAAM,EACX,MAAM,CAAC,EAAE,MAAM,EACf,SAAS,CAAC,EAAE,gBAAgB,KACzB,IAAI,CAAA;IACT,YAAY,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,WAAW,KAAK,IAAI,CAAA;IAC9E,cAAc,CAAC,EAAE,CACf,MAAM,CAAC,EAAE,MAAM,EACf,MAAM,CAAC,EAAE,MAAM,EACf,SAAS,CAAC,EAAE,gBAAgB,KACzB,IAAI,CAAA;IACT,SAAS,CAAC,EAAE,CACV,MAAM,CAAC,EAAE,MAAM,EACf,MAAM,CAAC,EAAE,MAAM,EACf,SAAS,CAAC,EAAE,gBAAgB,KACzB,IAAI,CAAA;IACT,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED,QAAA,MAAM,UAAU,GAAI,sIAYjB,eAAe,4CA0EjB,CAAA;AAED,eAAe,UAAU,CAAA"}
1
+ {"version":3,"file":"PlusButton.d.ts","sourceRoot":"","sources":["../../../src/components/plus-button/PlusButton.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EACV,gBAAgB,EAChB,WAAW,EACZ,MAAM,mCAAmC,CAAA;AAE1C,MAAM,WAAW,eAAe;IAC9B,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAA;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,SAAS,CAAC,EAAE,CACV,EAAE,CAAC,EAAE,MAAM,EACX,MAAM,CAAC,EAAE,MAAM,EACf,SAAS,CAAC,EAAE,gBAAgB,KACzB,IAAI,CAAA;IACT,YAAY,CAAC,EAAE,CACb,EAAE,CAAC,EAAE,MAAM,EACX,MAAM,CAAC,EAAE,MAAM,EACf,IAAI,CAAC,EAAE,WAAW,EAClB,SAAS,CAAC,EAAE,gBAAgB,KACzB,IAAI,CAAA;IACT,cAAc,CAAC,EAAE,CACf,MAAM,CAAC,EAAE,MAAM,EACf,MAAM,CAAC,EAAE,MAAM,EACf,SAAS,CAAC,EAAE,gBAAgB,KACzB,IAAI,CAAA;IACT,SAAS,CAAC,EAAE,CACV,MAAM,CAAC,EAAE,MAAM,EACf,MAAM,CAAC,EAAE,MAAM,EACf,SAAS,CAAC,EAAE,gBAAgB,KACzB,IAAI,CAAA;IACT,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED,QAAA,MAAM,UAAU,GAAI,kGAUjB,eAAe,4CA+DjB,CAAA;AAED,eAAe,UAAU,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"DebuggerRow.d.ts","sourceRoot":"","sources":["../../../src/components/process-debugger-diagram/DebuggerRow.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAY,IAAI,EAAE,IAAI,EAAc,MAAM,aAAa,CAAA;AAsBnE,UAAU,KAAK;IACb,KAAK,EAAE,IAAI,EAAE,GAAG,IAAI,EAAE,CAAA;IACtB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,YAAY,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;IAClC,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;IACrB,eAAe,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;CACtC;AAED,QAAA,MAAM,WAAW,GAAI,OAAO,QAAQ,CAAC,KAAK,CAAC,4CAwT1C,CAAA;AAED,eAAe,WAAW,CAAA"}
1
+ {"version":3,"file":"DebuggerRow.d.ts","sourceRoot":"","sources":["../../../src/components/process-debugger-diagram/DebuggerRow.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAY,IAAI,EAAE,IAAI,EAAc,MAAM,aAAa,CAAA;AAsBnE,UAAU,KAAK;IACb,KAAK,EAAE,IAAI,EAAE,GAAG,IAAI,EAAE,CAAA;IACtB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,YAAY,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;IAClC,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;IACrB,eAAe,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;CACtC;AAED,QAAA,MAAM,WAAW,GAAI,OAAO,QAAQ,CAAC,KAAK,CAAC,4CA0T1C,CAAA;AAED,eAAe,WAAW,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"ProcessDebuggerDiagram.d.ts","sourceRoot":"","sources":["../../../src/components/process-debugger-diagram/ProcessDebuggerDiagram.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAUtD,MAAM,WAAW,2BAA2B;IAC1C,OAAO,EAAE,OAAO,CAAA;IAChB,4FAA4F;IAC5F,gBAAgB,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC,CAAA;IACtD,8DAA8D;IAC9D,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;IACrB,YAAY,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAA;IACrC,eAAe,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAA;CAC1C;AA4CD,QAAA,MAAM,sBAAsB,GAAI,2FAO7B,QAAQ,CAAC,2BAA2B,CAAC,4CAqCvC,CAAA;AAED,eAAe,sBAAsB,CAAA"}
1
+ {"version":3,"file":"ProcessDebuggerDiagram.d.ts","sourceRoot":"","sources":["../../../src/components/process-debugger-diagram/ProcessDebuggerDiagram.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAUtD,MAAM,WAAW,2BAA2B;IAC1C,OAAO,EAAE,OAAO,CAAA;IAChB,4FAA4F;IAC5F,gBAAgB,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC,CAAA;IACtD,8DAA8D;IAC9D,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;IACrB,YAAY,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAA;IACrC,eAAe,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAA;CAC1C;AA4CD,QAAA,MAAM,sBAAsB,GAAI,2FAO7B,QAAQ,CAAC,2BAA2B,CAAC,4CA6CvC,CAAA;AAED,eAAe,sBAAsB,CAAA"}
@@ -3,8 +3,6 @@ import type { AddStepOperation, AddStepType } from '../../helpers/add-process.he
3
3
  interface Props {
4
4
  items: Path[] | Step[];
5
5
  pathId?: string;
6
- iteratorEnabled?: boolean;
7
- conditionsEnabled?: boolean;
8
6
  onAddStep?: (id?: string, pathId?: string, operation?: AddStepOperation) => void;
9
7
  onAddTrigger?: (id?: string, pathId?: string, operation?: AddStepType) => void;
10
8
  onAddCondition: (stepId?: string, pathId?: string, operation?: AddStepOperation) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"Row.d.ts","sourceRoot":"","sources":["../../../src/components/row/Row.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAI7C,OAAO,KAAK,EACV,gBAAgB,EAChB,WAAW,EACZ,MAAM,mCAAmC,CAAA;AAO1C,UAAU,KAAK;IACb,KAAK,EAAE,IAAI,EAAE,GAAG,IAAI,EAAE,CAAA;IACtB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,SAAS,CAAC,EAAE,CACV,EAAE,CAAC,EAAE,MAAM,EACX,MAAM,CAAC,EAAE,MAAM,EACf,SAAS,CAAC,EAAE,gBAAgB,KACzB,IAAI,CAAA;IACT,YAAY,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,WAAW,KAAK,IAAI,CAAA;IAC9E,cAAc,EAAE,CACd,MAAM,CAAC,EAAE,MAAM,EACf,MAAM,CAAC,EAAE,MAAM,EACf,SAAS,CAAC,EAAE,gBAAgB,KACzB,IAAI,CAAA;IACT,SAAS,CAAC,EAAE,CACV,MAAM,CAAC,EAAE,MAAM,EACf,MAAM,CAAC,EAAE,MAAM,EACf,SAAS,CAAC,EAAE,gBAAgB,KACzB,IAAI,CAAA;IACT,YAAY,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;IACnC,cAAc,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;IACpC,YAAY,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;IAClC,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;IACrB,eAAe,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;CACtC;AAID,QAAA,MAAM,GAAG,GAAI,OAAO,QAAQ,CAAC,KAAK,CAAC,4CAyNlC,CAAA;AAED,eAAe,GAAG,CAAA"}
1
+ {"version":3,"file":"Row.d.ts","sourceRoot":"","sources":["../../../src/components/row/Row.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAI7C,OAAO,KAAK,EACV,gBAAgB,EAChB,WAAW,EACZ,MAAM,mCAAmC,CAAA;AAO1C,UAAU,KAAK;IACb,KAAK,EAAE,IAAI,EAAE,GAAG,IAAI,EAAE,CAAA;IACtB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,SAAS,CAAC,EAAE,CACV,EAAE,CAAC,EAAE,MAAM,EACX,MAAM,CAAC,EAAE,MAAM,EACf,SAAS,CAAC,EAAE,gBAAgB,KACzB,IAAI,CAAA;IACT,YAAY,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,WAAW,KAAK,IAAI,CAAA;IAC9E,cAAc,EAAE,CACd,MAAM,CAAC,EAAE,MAAM,EACf,MAAM,CAAC,EAAE,MAAM,EACf,SAAS,CAAC,EAAE,gBAAgB,KACzB,IAAI,CAAA;IACT,SAAS,CAAC,EAAE,CACV,MAAM,CAAC,EAAE,MAAM,EACf,MAAM,CAAC,EAAE,MAAM,EACf,SAAS,CAAC,EAAE,gBAAgB,KACzB,IAAI,CAAA;IACT,YAAY,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;IACnC,cAAc,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;IACpC,YAAY,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;IAClC,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;IACrB,eAAe,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;CACtC;AAID,QAAA,MAAM,GAAG,GAAI,OAAO,QAAQ,CAAC,KAAK,CAAC,4CAgNlC,CAAA;AAED,eAAe,GAAG,CAAA"}
@@ -6,10 +6,8 @@ interface Props extends PropsWithClassName {
6
6
  centerY?: number;
7
7
  onDeleteStep?: (id: string) => void;
8
8
  onUpdateFilter: (id: string) => void;
9
- iteratorEnabled?: boolean;
10
- conditionsEnabled?: boolean;
11
9
  onAddStep: (id?: string, pathId?: string, operation?: AddStepOperation) => void;
12
- onAddTrigger?: (id?: string, pathId?: string, operation?: AddStepType) => void;
10
+ onAddTrigger?: (id?: string, pathId?: string, type?: AddStepType, operation?: AddStepOperation) => void;
13
11
  onAddCondition: (stepId?: string, pathId?: string, operation?: AddStepOperation) => void;
14
12
  onAddLoop?: (stepId?: string, pathId?: string, operation?: AddStepOperation) => void;
15
13
  onSelectStep: (id: string) => void;
@@ -19,6 +17,6 @@ interface Props extends PropsWithClassName {
19
17
  onCheckScenario: (id: string) => void;
20
18
  }
21
19
  export declare const STEP_ROW_HEIGHT = 68;
22
- declare const Steps: ({ pathId, steps, centerY, className, iteratorEnabled, conditionsEnabled, onAddStep, onDeleteStep, onUpdateFilter, onAddTrigger, onAddCondition, onAddLoop, onSelectStep, onResize, onCheckScenario, isDescendent, }: Readonly<Props>) => import("react/jsx-runtime").JSX.Element;
20
+ declare const Steps: ({ pathId, steps, centerY, className, onAddStep, onDeleteStep, onUpdateFilter, onAddTrigger, onAddCondition, onAddLoop, onSelectStep, onResize, onCheckScenario, isDescendent, }: Readonly<Props>) => import("react/jsx-runtime").JSX.Element;
23
21
  export default Steps;
24
22
  //# sourceMappingURL=Steps.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Steps.d.ts","sourceRoot":"","sources":["../../../src/components/steps/Steps.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAA;AAE7D,OAAO,KAAK,EAA4B,IAAI,EAAE,MAAM,aAAa,CAAA;AAIjE,OAAO,KAAK,EACV,gBAAgB,EAChB,WAAW,EACZ,MAAM,mCAAmC,CAAA;AAE1C,UAAU,KAAM,SAAQ,kBAAkB;IACxC,KAAK,EAAE,IAAI,EAAE,CAAA;IACb,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,YAAY,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;IACnC,cAAc,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;IACpC,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,SAAS,EAAE,CACT,EAAE,CAAC,EAAE,MAAM,EACX,MAAM,CAAC,EAAE,MAAM,EACf,SAAS,CAAC,EAAE,gBAAgB,KACzB,IAAI,CAAA;IACT,YAAY,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,WAAW,KAAK,IAAI,CAAA;IAC9E,cAAc,EAAE,CACd,MAAM,CAAC,EAAE,MAAM,EACf,MAAM,CAAC,EAAE,MAAM,EACf,SAAS,CAAC,EAAE,gBAAgB,KACzB,IAAI,CAAA;IACT,SAAS,CAAC,EAAE,CACV,MAAM,CAAC,EAAE,MAAM,EACf,MAAM,CAAC,EAAE,MAAM,EACf,SAAS,CAAC,EAAE,gBAAgB,KACzB,IAAI,CAAA;IACT,YAAY,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;IAClC,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;IACrB,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,eAAe,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;CACtC;AAED,eAAO,MAAM,eAAe,KAAK,CAAA;AAGjC,QAAA,MAAM,KAAK,GAAI,qNAiBZ,QAAQ,CAAC,KAAK,CAAC,4CAkNjB,CAAA;AAED,eAAe,KAAK,CAAA"}
1
+ {"version":3,"file":"Steps.d.ts","sourceRoot":"","sources":["../../../src/components/steps/Steps.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAA;AAE7D,OAAO,KAAK,EAA4B,IAAI,EAAE,MAAM,aAAa,CAAA;AAIjE,OAAO,KAAK,EACV,gBAAgB,EAChB,WAAW,EACZ,MAAM,mCAAmC,CAAA;AAE1C,UAAU,KAAM,SAAQ,kBAAkB;IACxC,KAAK,EAAE,IAAI,EAAE,CAAA;IACb,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,YAAY,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;IACnC,cAAc,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;IACpC,SAAS,EAAE,CACT,EAAE,CAAC,EAAE,MAAM,EACX,MAAM,CAAC,EAAE,MAAM,EACf,SAAS,CAAC,EAAE,gBAAgB,KACzB,IAAI,CAAA;IACT,YAAY,CAAC,EAAE,CACb,EAAE,CAAC,EAAE,MAAM,EACX,MAAM,CAAC,EAAE,MAAM,EACf,IAAI,CAAC,EAAE,WAAW,EAClB,SAAS,CAAC,EAAE,gBAAgB,KACzB,IAAI,CAAA;IACT,cAAc,EAAE,CACd,MAAM,CAAC,EAAE,MAAM,EACf,MAAM,CAAC,EAAE,MAAM,EACf,SAAS,CAAC,EAAE,gBAAgB,KACzB,IAAI,CAAA;IACT,SAAS,CAAC,EAAE,CACV,MAAM,CAAC,EAAE,MAAM,EACf,MAAM,CAAC,EAAE,MAAM,EACf,SAAS,CAAC,EAAE,gBAAgB,KACzB,IAAI,CAAA;IACT,YAAY,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;IAClC,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;IACrB,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,eAAe,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;CACtC;AAED,eAAO,MAAM,eAAe,KAAK,CAAA;AAGjC,QAAA,MAAM,KAAK,GAAI,iLAeZ,QAAQ,CAAC,KAAK,CAAC,4CAsMjB,CAAA;AAED,eAAe,KAAK,CAAA"}
@@ -1,3 +1,5 @@
1
- declare const MultipleTriggersIcon: () => import("react/jsx-runtime").JSX.Element;
1
+ declare const MultipleTriggersIcon: ({ color, }: Readonly<{
2
+ color?: string;
3
+ }>) => import("react/jsx-runtime").JSX.Element;
2
4
  export default MultipleTriggersIcon;
3
5
  //# sourceMappingURL=MultipleTriggersIcon.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"MultipleTriggersIcon.d.ts","sourceRoot":"","sources":["../../../src/components/triggers/MultipleTriggersIcon.tsx"],"names":[],"mappings":"AAEA,QAAA,MAAM,oBAAoB,+CAQzB,CAAA;AAED,eAAe,oBAAoB,CAAA"}
1
+ {"version":3,"file":"MultipleTriggersIcon.d.ts","sourceRoot":"","sources":["../../../src/components/triggers/MultipleTriggersIcon.tsx"],"names":[],"mappings":"AAEA,QAAA,MAAM,oBAAoB,GAAI,YAE3B,QAAQ,CAAC;IAAE,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,4CAW9B,CAAA;AAED,eAAe,oBAAoB,CAAA"}
@@ -11,8 +11,10 @@ export interface TriggerProps extends PropsWithClassName {
11
11
  debuggerMode?: boolean;
12
12
  /** When set, SVG trigger curves use this color instead of status-based debugger stroke colors. */
13
13
  resolveCurveStrokeColor?: (status: StepStatus | undefined) => string;
14
- isAdmin?: boolean;
14
+ isEditable?: boolean;
15
+ /** Status of the first process step after the trigger hub (used to decide hub finished styling). */
16
+ nextStepStatus?: StepStatus;
15
17
  }
16
- declare const Trigger: ({ steps, title, className, onDeleteTrigger, onAddTrigger, onSelectStep, onUpdateFilter, onCenterYUpdate, debuggerMode, resolveCurveStrokeColor, isAdmin, }: Readonly<TriggerProps>) => import("react/jsx-runtime").JSX.Element;
18
+ declare const Trigger: ({ steps, title, className, onDeleteTrigger, onAddTrigger, onSelectStep, onUpdateFilter, onCenterYUpdate, debuggerMode, resolveCurveStrokeColor, isEditable, nextStepStatus, }: Readonly<TriggerProps>) => import("react/jsx-runtime").JSX.Element;
17
19
  export default Trigger;
18
20
  //# sourceMappingURL=Trigger.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Trigger.d.ts","sourceRoot":"","sources":["../../../src/components/triggers/Trigger.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAKnD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAA;AAI7D,MAAM,WAAW,YAAa,SAAQ,kBAAkB;IACtD,KAAK,EAAE,IAAI,EAAE,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,eAAe,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAA;IACzC,YAAY,CAAC,EAAE,MAAM,OAAO,CAAA;IAC5B,YAAY,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAA;IACrC,cAAc,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAA;IACxC,eAAe,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,IAAI,CAAA;IAChD,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,kGAAkG;IAClG,uBAAuB,CAAC,EAAE,CAAC,MAAM,EAAE,UAAU,GAAG,SAAS,KAAK,MAAM,CAAA;IACpE,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAaD,QAAA,MAAM,OAAO,GAAI,4JAYd,QAAQ,CAAC,YAAY,CAAC,4CAgSxB,CAAA;AAED,eAAe,OAAO,CAAA"}
1
+ {"version":3,"file":"Trigger.d.ts","sourceRoot":"","sources":["../../../src/components/triggers/Trigger.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAKnD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAA;AAI7D,MAAM,WAAW,YAAa,SAAQ,kBAAkB;IACtD,KAAK,EAAE,IAAI,EAAE,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,eAAe,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAA;IACzC,YAAY,CAAC,EAAE,MAAM,OAAO,CAAA;IAC5B,YAAY,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAA;IACrC,cAAc,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAA;IACxC,eAAe,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,IAAI,CAAA;IAChD,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,kGAAkG;IAClG,uBAAuB,CAAC,EAAE,CAAC,MAAM,EAAE,UAAU,GAAG,SAAS,KAAK,MAAM,CAAA;IACpE,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,oGAAoG;IACpG,cAAc,CAAC,EAAE,UAAU,CAAA;CAC5B;AAaD,QAAA,MAAM,OAAO,GAAI,+KAad,QAAQ,CAAC,YAAY,CAAC,4CAgTxB,CAAA;AAED,eAAe,OAAO,CAAA"}
@@ -0,0 +1,4 @@
1
+ import type { Process } from '../types';
2
+ declare const one: Process;
3
+ export default one;
4
+ //# sourceMappingURL=one.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"one.d.ts","sourceRoot":"","sources":["../../src/fixtures/one.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,UAAU,CAAA;AAEvC,QAAA,MAAM,GAAG,EAAE,OAiFV,CAAA;AAED,eAAe,GAAG,CAAA"}
package/dist/index.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),u=require("react"),st=require("react-dom"),ot="_container_1f7x1_1",it="_step_1f7x1_7",rt="_dotsButton_1f7x1_23",lt="_selected_1f7x1_27",ct="_selectedInvalid_1f7x1_36",at="_isSet_1f7x1_45",dt="_invalid_1f7x1_52",ut="_debuggerStatus_1f7x1_60",pt="_title_1f7x1_64",ht="_icon_1f7x1_67",ft="_filterFlag_1f7x1_78",gt="_content_1f7x1_141",E={container:ot,step:it,dotsButton:rt,selected:lt,selectedInvalid:ct,isSet:at,invalid:dt,debuggerStatus:ut,title:pt,icon:ht,filterFlag:ft,content:gt};var De={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},ke=u.createContext&&u.createContext(De),xt=["attr","size","title"];function mt(e,n){if(e==null)return{};var s=Ct(e,n),o,i;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(i=0;i<l.length;i++)o=l[i],!(n.indexOf(o)>=0)&&Object.prototype.propertyIsEnumerable.call(e,o)&&(s[o]=e[o])}return s}function Ct(e,n){if(e==null)return{};var s={};for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){if(n.indexOf(o)>=0)continue;s[o]=e[o]}return s}function oe(){return oe=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var s=arguments[n];for(var o in s)Object.prototype.hasOwnProperty.call(s,o)&&(e[o]=s[o])}return e},oe.apply(this,arguments)}function Re(e,n){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),s.push.apply(s,o)}return s}function ie(e){for(var n=1;n<arguments.length;n++){var s=arguments[n]!=null?arguments[n]:{};n%2?Re(Object(s),!0).forEach(function(o){vt(e,o,s[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):Re(Object(s)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(s,o))})}return e}function vt(e,n,s){return n=jt(n),n in e?Object.defineProperty(e,n,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[n]=s,e}function jt(e){var n=_t(e,"string");return typeof n=="symbol"?n:n+""}function _t(e,n){if(typeof e!="object"||!e)return e;var s=e[Symbol.toPrimitive];if(s!==void 0){var o=s.call(e,n);if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}function Be(e){return e&&e.map((n,s)=>u.createElement(n.tag,ie({key:s},n.attr),Be(n.child)))}function Z(e){return n=>u.createElement(It,oe({attr:ie({},e.attr)},n),Be(e.child))}function It(e){var n=s=>{var{attr:o,size:i,title:l}=e,d=mt(e,xt),h=i||s.size||"1em",c;return s.className&&(c=s.className),e.className&&(c=(c?c+" ":"")+e.className),u.createElement("svg",oe({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},s.attr,o,d,{className:c,style:ie(ie({color:e.color||s.color},s.style),e.style),height:h,width:h,xmlns:"http://www.w3.org/2000/svg"}),l&&u.createElement("title",null,l),e.children)};return ke!==void 0?u.createElement(ke.Consumer,null,s=>n(s)):n(De)}function wt(e){return Z({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M5.52.359A.5.5 0 0 1 6 0h4a.5.5 0 0 1 .474.658L8.694 6H12.5a.5.5 0 0 1 .395.807l-7 9a.5.5 0 0 1-.873-.454L6.823 9.5H3.5a.5.5 0 0 1-.48-.641zM6.374 1 4.168 8.5H7.5a.5.5 0 0 1 .478.647L6.78 13.04 11.478 7H8a.5.5 0 0 1-.474-.658L9.306 1z"},child:[]}]})(e)}function Fe(e){return Z({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M12.146.146a.5.5 0 0 1 .708 0l3 3a.5.5 0 0 1 0 .708l-10 10a.5.5 0 0 1-.168.11l-5 2a.5.5 0 0 1-.65-.65l2-5a.5.5 0 0 1 .11-.168zM11.207 2.5 13.5 4.793 14.793 3.5 12.5 1.207zm1.586 3L10.5 3.207 4 9.707V10h.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.5h.293zm-9.761 5.175-.106.106-1.528 3.821 3.821-1.528.106-.106A.5.5 0 0 1 5 12.5V12h-.5a.5.5 0 0 1-.5-.5V11h-.5a.5.5 0 0 1-.468-.325"},child:[]}]})(e)}function re(e){return Z({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M9.5 13a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0m0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0m0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0"},child:[]}]})(e)}function ae(e){return Z({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M5.5 5.5A.5.5 0 0 1 6 6v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5m2.5 0a.5.5 0 0 1 .5.5v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5m3 .5a.5.5 0 0 0-1 0v6a.5.5 0 0 0 1 0z"},child:[]},{tag:"path",attr:{d:"M14.5 3a1 1 0 0 1-1 1H13v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V4h-.5a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1H6a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1h3.5a1 1 0 0 1 1 1zM4.118 4 4 4.059V13a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1V4.059L11.882 4zM2.5 3h11V2h-11z"},child:[]}]})(e)}const yt="_panel_19663_1",bt="_panelExiting_19663_13",Nt="_menuItem_19663_37",St="_disabled_19663_52",Lt="_menuItemIcon_19663_57",Tt="_menuItemText_19663_63",Pt="_overlay_19663_69",F={panel:yt,panelExiting:bt,menuItem:Nt,disabled:St,menuItemIcon:Lt,menuItemText:Tt,overlay:Pt},kt=e=>{const s=e.currentTarget??e.target;if(s?.getBoundingClientRect){const i=s.getBoundingClientRect();return{top:i.bottom+2,left:i.left}}const o=e;return{top:(o.clientY??0)+2,left:o.clientX??0}},te=u.forwardRef(function({model:n,popup:s=!0,onHide:o,onClick:i},l){const[d,h]=u.useState(!1),[c,r]=u.useState(!1),[f,m]=u.useState({top:0,left:0}),j=u.useRef(null),C=u.useCallback(()=>{c||r(!0)},[c]),I=u.useCallback(p=>{c&&p.animationName.includes("menuOut")&&(h(!1),r(!1),o?.())},[c,o]),w=u.useCallback(p=>{m(kt(p)),r(!1),h(!0)},[]),x=u.useCallback(p=>{d?C():w(p)},[d,C,w]);u.useImperativeHandle(l,()=>({show:w,hide:C,toggle:x}),[w,C,x]),u.useEffect(()=>{if(!d)return;const p=a=>{a.key==="Escape"&&C()},y=a=>{const v=j.current;v&&!v.contains(a.target)&&(a.stopPropagation(),C())};return document.addEventListener("keydown",p),document.addEventListener("mousedown",y),()=>{document.removeEventListener("keydown",p),document.removeEventListener("mousedown",y)}},[d,C]);const g=(p,y)=>{y.stopPropagation(),p.command?.({originalEvent:y,item:p}),C()},R=(p,y)=>{const a=v=>g(p,v);return p.template?t.jsx(u.Fragment,{children:p.template(p,{onClick:a})},y):t.jsxs("button",{type:"button",className:`${F.menuItem} ${p.disabled&&F.disabled}`,onClick:v=>{p.disabled||a(v)},children:[p.icon&&t.jsx("span",{className:F.menuItemIcon,children:p.icon}),t.jsx("span",{className:F.menuItemText,children:p.label})]},y)};return!d||!s?null:st.createPortal(t.jsxs(t.Fragment,{children:[t.jsx("div",{className:F.overlay,"aria-hidden":!0,onClick:()=>C(),onMouseDown:p=>p.stopPropagation()}),t.jsx("div",{ref:j,className:`${F.panel} ${c?F.panelExiting:""}`,role:"menu",style:{top:f.top,left:f.left},onAnimationEnd:I,onClick:p=>{p.stopPropagation(),i?.(p)},children:n.map(R)})]}),document.body)}),de=()=>(e,n)=>t.jsxs("button",{className:F.menuItem,onClick:s=>n.onClick(s),children:[t.jsx("span",{className:F.menuItemIcon,children:e.icon}),t.jsx("span",{className:F.menuItemText,children:e.label})]}),b={NAVY:"#3B64A0",LIGHT_BG:"#fafafa",FINISHED_GREEN:"#17a34a",ERROR_RED:"#E32012",TEAL:"#127ee3",ADD_TRIGGER_FILL:"#0C971F",ADD_TRIGGER_STROKE:"#14BC2B",SEPARATOR:"#a1bbdc",SLATE_400:"#94a3b8",ORANGE:"#ff9800"},ue=e=>e?.toLowerCase()===b.FINISHED_GREEN.toLowerCase(),G=e=>ue(e)?`3px dotted ${e}`:`2px solid ${e}`,pe={pending:b.NAVY,running:b.TEAL,validating:b.ORANGE,finished:b.FINISHED_GREEN,failed:b.ERROR_RED,cancelled:b.ORANGE,skipped:b.SLATE_400,invalid:b.ERROR_RED},Rt={pending:b.LIGHT_BG,running:"#e6f7f6",validating:"#eff6ff",finished:"#DFFFE3",failed:"#fde8e6",cancelled:"#f1f5f9",skipped:"#f1f5f9",invalid:"#fffbeb"},Et=({width:e=16,height:n=16,color:s=b.NAVY})=>t.jsxs("svg",{width:e,height:n,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[t.jsx("rect",{x:"7.99219",y:"0.222732",width:"11",height:"11",rx:"1.5",transform:"rotate(45 7.99219 0.222732)",stroke:s}),t.jsx("path",{d:"M10.4693 5.52599L5.52513 10.4813M5.52513 5.53151L10.4749 10.4813",stroke:s,strokeLinecap:"round"})]}),Mt=({width:e=16,height:n=16,color:s=b.NAVY})=>t.jsxs("svg",{width:e,height:n,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[t.jsx("path",{d:"M11.5341 7.00002H15.4661C15.5136 7.00004 15.5601 7.01359 15.6002 7.03909C15.6403 7.06459 15.6722 7.10098 15.6924 7.144C15.7125 7.18702 15.72 7.23489 15.7139 7.282C15.7079 7.32912 15.6885 7.37352 15.6581 7.41002L13.6921 9.77002C13.6686 9.79816 13.6393 9.82079 13.6061 9.83633C13.5729 9.85186 13.5367 9.85991 13.5001 9.85991C13.4635 9.85991 13.4273 9.85186 13.3941 9.83633C13.3609 9.82079 13.3315 9.79816 13.3081 9.77002L11.3421 7.41002C11.3117 7.37352 11.2923 7.32912 11.2862 7.282C11.2802 7.23489 11.2876 7.18702 11.3078 7.144C11.3279 7.10098 11.3599 7.06459 11.4 7.03909C11.4401 7.01359 11.4866 7.00004 11.5341 7.00002ZM0.534086 9.00002H4.46609C4.51359 9.00001 4.56011 8.98645 4.60019 8.96096C4.64027 8.93546 4.67225 8.89907 4.6924 8.85605C4.71254 8.81303 4.72002 8.76516 4.71394 8.71804C4.70786 8.67093 4.68849 8.62652 4.65809 8.59002L2.69209 6.23002C2.66862 6.20189 2.63926 6.17925 2.60609 6.16372C2.57291 6.14819 2.53672 6.14014 2.50009 6.14014C2.46345 6.14014 2.42726 6.14819 2.39409 6.16372C2.36091 6.17925 2.33155 6.20189 2.30809 6.23002L0.342086 8.59002C0.311684 8.62652 0.29231 8.67093 0.286234 8.71804C0.280157 8.76516 0.287629 8.81303 0.307775 8.85605C0.327921 8.89907 0.359907 8.93546 0.399987 8.96096C0.440067 8.98645 0.486583 9.00001 0.534086 9.00002Z",fill:s}),t.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.00001 3.00023C6.44801 3.00023 5.06001 3.70723 4.14301 4.81823C4.10206 4.87131 4.05086 4.9156 3.99245 4.94849C3.93404 4.98138 3.86961 5.00219 3.803 5.00968C3.73638 5.01717 3.66895 5.01119 3.60469 4.99209C3.54043 4.97299 3.48068 4.94117 3.42897 4.89851C3.37726 4.85586 3.33465 4.80324 3.30368 4.74379C3.27272 4.68434 3.25402 4.61926 3.24871 4.55244C3.24339 4.48562 3.25157 4.41841 3.27275 4.35481C3.29394 4.29121 3.32769 4.23252 3.37201 4.18223C4.1042 3.29576 5.0756 2.63824 6.17067 2.28789C7.26575 1.93753 8.43841 1.90908 9.54918 2.20592C10.66 2.50276 11.6621 3.1124 12.4364 3.96232C13.2107 4.81224 13.7246 5.86668 13.917 7.00023H12.9C12.6691 5.87104 12.0554 4.85623 11.1625 4.12738C10.2697 3.39853 9.15256 3.00037 8.00001 3.00023ZM3.10001 9.00023C3.28932 9.92486 3.73636 10.7771 4.38949 11.4584C5.04261 12.1397 5.87517 12.6223 6.79097 12.8505C7.70677 13.0787 8.66845 13.0431 9.5649 12.7479C10.4613 12.4527 11.256 11.9099 11.857 11.1822C11.898 11.1292 11.9492 11.0849 12.0076 11.052C12.066 11.0191 12.1304 10.9983 12.197 10.9908C12.2636 10.9833 12.3311 10.9893 12.3953 11.0084C12.4596 11.0275 12.5193 11.0593 12.5711 11.102C12.6228 11.1446 12.6654 11.1972 12.6963 11.2567C12.7273 11.3161 12.746 11.3812 12.7513 11.448C12.7566 11.5148 12.7484 11.5821 12.7273 11.6457C12.7061 11.7093 12.6723 11.7679 12.628 11.8182C11.8958 12.7047 10.9244 13.3622 9.82934 13.7126C8.73427 14.0629 7.56161 14.0914 6.45083 13.7945C5.34006 13.4977 4.33791 12.8881 3.5636 12.0381C2.78928 11.1882 2.27538 10.1338 2.08301 9.00023H3.10001Z",fill:s})]}),me=({width:e=16,height:n=16,color:s=b.NAVY})=>t.jsxs("svg",{width:e,height:n,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[t.jsx("path",{d:"M8 15C6.14348 15 4.36301 14.2625 3.05025 12.9497C1.7375 11.637 1 9.85652 1 8C1 6.14348 1.7375 4.36301 3.05025 3.05025C4.36301 1.7375 6.14348 1 8 1C9.85652 1 11.637 1.7375 12.9497 3.05025C14.2625 4.36301 15 6.14348 15 8C15 9.85652 14.2625 11.637 12.9497 12.9497C11.637 14.2625 9.85652 15 8 15ZM8 16C10.1217 16 12.1566 15.1571 13.6569 13.6569C15.1571 12.1566 16 10.1217 16 8C16 5.87827 15.1571 3.84344 13.6569 2.34315C12.1566 0.842855 10.1217 0 8 0C5.87827 0 3.84344 0.842855 2.34315 2.34315C0.842855 3.84344 0 5.87827 0 8C0 10.1217 0.842855 12.1566 2.34315 13.6569C3.84344 15.1571 5.87827 16 8 16Z",fill:s}),t.jsx("path",{d:"M7 11.5C7 11.3674 7.05268 11.2402 7.14645 11.1464C7.24021 11.0527 7.36739 11 7.5 11H8.5C8.63261 11 8.75979 11.0527 8.85355 11.1464C8.94732 11.2402 9 11.3674 9 11.5C9 11.6326 8.94732 11.7598 8.85355 11.8536C8.75979 11.9473 8.63261 12 8.5 12H7.5C7.36739 12 7.24021 11.9473 7.14645 11.8536C7.05268 11.7598 7 11.6326 7 11.5ZM5 8.5C5 8.36739 5.05268 8.24021 5.14645 8.14645C5.24021 8.05268 5.36739 8 5.5 8H10.5C10.6326 8 10.7598 8.05268 10.8536 8.14645C10.9473 8.24021 11 8.36739 11 8.5C11 8.63261 10.9473 8.75979 10.8536 8.85355C10.7598 8.94732 10.6326 9 10.5 9H5.5C5.36739 9 5.24021 8.94732 5.14645 8.85355C5.05268 8.75979 5 8.63261 5 8.5ZM3 5.5C3 5.36739 3.05268 5.24021 3.14645 5.14645C3.24021 5.05268 3.36739 5 3.5 5H12.5C12.6326 5 12.7598 5.05268 12.8536 5.14645C12.9473 5.24021 13 5.36739 13 5.5C13 5.63261 12.9473 5.75979 12.8536 5.85355C12.7598 5.94732 12.6326 6 12.5 6H3.5C3.36739 6 3.24021 5.94732 3.14645 5.85355C3.05268 5.75979 3 5.63261 3 5.5Z",fill:s})]}),Ae=u.createContext(void 0),Ot=({children:e})=>{const[n,s]=u.useState([]),o=u.useCallback((d,h)=>{s(c=>(c.forEach(r=>{r.current&&r!==d&&r.current.hide(h)}),[])),d.current?.toggle(h),s([d])},[]),i=u.useCallback(d=>{s(h=>h.filter(c=>c!==d))},[]),l=u.useMemo(()=>({openMenus:n,openMenu:o,closeMenu:i}),[n,o,i]);return t.jsx(Ae.Provider,{value:l,children:e})},he=()=>{const e=u.useContext(Ae);if(e===void 0)throw new Error("useMenuProvider must be used within a MenuProvider");return e},$t=({color:e=b.ERROR_RED})=>t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[t.jsx("g",{clipPath:"url(#clip0_3105_5367)",children:t.jsx("path",{d:"M16 8C16 10.1217 15.1571 12.1566 13.6569 13.6569C12.1566 15.1571 10.1217 16 8 16C5.87827 16 3.84344 15.1571 2.34315 13.6569C0.842855 12.1566 0 10.1217 0 8C0 5.87827 0.842855 3.84344 2.34315 2.34315C3.84344 0.842855 5.87827 0 8 0C10.1217 0 12.1566 0.842855 13.6569 2.34315C15.1571 3.84344 16 5.87827 16 8ZM8 4C7.87361 4.00007 7.74863 4.02662 7.63312 4.07793C7.51761 4.12924 7.41413 4.20418 7.32934 4.29791C7.24456 4.39165 7.18035 4.5021 7.14084 4.62217C7.10134 4.74223 7.08743 4.86923 7.1 4.995L7.45 8.502C7.46176 8.63977 7.5248 8.76811 7.62664 8.86164C7.72849 8.95516 7.86173 9.00705 8 9.00705C8.13827 9.00705 8.27151 8.95516 8.37336 8.86164C8.4752 8.76811 8.53824 8.63977 8.55 8.502L8.9 4.995C8.91257 4.86923 8.89866 4.74223 8.85915 4.62217C8.81965 4.5021 8.75544 4.39165 8.67066 4.29791C8.58587 4.20418 8.48239 4.12924 8.36688 4.07793C8.25137 4.02662 8.12639 4.00007 8 4ZM8.002 10C7.73678 10 7.48243 10.1054 7.29489 10.2929C7.10736 10.4804 7.002 10.7348 7.002 11C7.002 11.2652 7.10736 11.5196 7.29489 11.7071C7.48243 11.8946 7.73678 12 8.002 12C8.26722 12 8.52157 11.8946 8.70911 11.7071C8.89664 11.5196 9.002 11.2652 9.002 11C9.002 10.7348 8.89664 10.4804 8.70911 10.2929C8.52157 10.1054 8.26722 10 8.002 10Z",fill:e})}),t.jsx("defs",{children:t.jsx("clipPath",{id:"clip0_3105_5367",children:t.jsx("rect",{width:"16",height:"16",fill:"white"})})})]});function Dt(e){return Z({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"},child:[]},{tag:"polyline",attr:{points:"15 3 21 3 21 9"},child:[]},{tag:"line",attr:{x1:"10",y1:"14",x2:"21",y2:"3"},child:[]}]})(e)}function Bt(e){return Z({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"4"},child:[]},{tag:"line",attr:{x1:"1.05",y1:"12",x2:"7",y2:"12"},child:[]},{tag:"line",attr:{x1:"17.01",y1:"12",x2:"22.96",y2:"12"},child:[]}]})(e)}function Ft(e){return Z({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polygon",attr:{points:"13 2 3 14 12 14 11 22 21 10 12 10 13 2"},child:[]}]})(e)}const K=e=>{const{isSet:n,isSelected:s,isFilter:o,debuggerMode:i=!1,status:l,className:d,title:h,icon:c,contextMenuItems:r=void 0,onDeleteStep:f,onUpdateFilter:m,onSelectStep:j,onCheckScenario:C,subtitle:I,isInvalid:w,localId:x}=e,g=u.useRef(null),{openMenu:R,closeMenu:p}=he(),y=de(),[a]=u.useState(!0),v=u.useMemo(()=>{const N=[];return i||N.push({label:"Add Step Filter",icon:t.jsx("div",{className:"mr-2 flex items-center justify-center",children:t.jsx(me,{})}),command:P=>{P?.originalEvent?.stopPropagation(),m&&m(x)},template:y}),f&&!i&&N.push({label:"Remove",icon:t.jsx(ae,{color:b.NAVY,size:18}),command:P=>{P?.originalEvent?.stopPropagation(),f(x)},template:y}),a&&N.push({label:"Check Scenario",icon:t.jsx("div",{className:"mr-2 flex items-center justify-center",children:t.jsx(Dt,{color:b.NAVY,size:18})}),command:P=>{P?.originalEvent?.stopPropagation(),C(x)},template:y}),N},[m,f,x,y,a,C,i]),S=u.useMemo(()=>r??v,[r,v]),k=N=>{N.stopPropagation(),R(g,N)},M=u.useMemo(()=>{if(!(!i||l==null||l==="pending"))return{"--step-debugger-accent":pe[l]}},[i,l]),_=u.useMemo(()=>s&&w?E.step+" "+E.selectedInvalid:i&&l!=null&&l!=="pending"?E.step+" "+E.debuggerStatus:s?E.step+" "+E.selected:n?E.step+" "+E.isSet:w?E.step+" "+E.invalid:E.step,[n,s,w,l,i]),T=u.useMemo(()=>w?t.jsx($t,{color:b.ERROR_RED}):c,[c,w]);return t.jsx("div",{className:E.container+" "+d,"data-local-id":void 0,children:t.jsxs("div",{children:[t.jsxs("div",{className:_,style:M,onClick:()=>j(x),children:[t.jsxs("div",{className:E.content,children:[t.jsx("div",{className:`${E.icon} ${w&&E.invalid}`,children:T}),t.jsx("div",{className:E.title,children:h})]}),S.length>0&&t.jsxs(t.Fragment,{children:[t.jsx("button",{className:E.dotsButton,onClick:k,"aria-haspopup":!0,"aria-label":"Step options",children:t.jsx(re,{className:E.dots,size:16})}),t.jsx(te,{model:S,popup:!0,ref:g,onClick:N=>N.stopPropagation(),onHide:()=>p(g)})]})]}),o&&t.jsxs("div",{className:E.filterFlag,role:"button",tabIndex:0,onClick:()=>{m&&m(x)},onKeyDown:N=>{(N.key==="Enter"||N.key===" ")&&m&&(N.preventDefault(),m(x))},children:[t.jsx(me,{color:b.NAVY}),t.jsx("span",{children:"Filter"}),!i&&t.jsx(re,{className:E.dots,color:w?b.ERROR_RED:b.NAVY,style:{height:"10px"}})]}),I&&t.jsx("div",{className:E.subtitle,children:I})]})})},At=()=>t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:[t.jsxs("g",{clipPath:"url(#clip0_6551_9169)",children:[t.jsx("rect",{width:"24",height:"24",rx:"12",fill:b.ADD_TRIGGER_FILL}),t.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11 6C11 5.44772 11.4477 5 12 5C12.5523 5 13 5.44772 13 6V11H18C18.5523 11 19 11.4477 19 12C19 12.5523 18.5523 13 18 13H13V18C13 18.5523 12.5523 19 12 19C11.4477 19 11 18.5523 11 18V13H6C5.44772 13 5 12.5523 5 12C5 11.4477 5.44772 11 6 11H11V6Z",fill:"white"})]}),t.jsx("rect",{x:"0.75",y:"0.75",width:"22.5",height:"22.5",rx:"11.25",stroke:b.ADD_TRIGGER_STROKE,strokeWidth:"1.5"}),t.jsx("defs",{children:t.jsx("clipPath",{id:"clip0_6551_9169",children:t.jsx("rect",{width:"24",height:"24",rx:"12",fill:"white"})})})]}),Wt="_multipleTriggersIcon_oxhdi_1",Ht={multipleTriggersIcon:Wt},Vt=()=>t.jsx("div",{className:Ht.multipleTriggersIcon,children:t.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:t.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1.5 3.75C1.5 3.15326 1.73705 2.58097 2.15901 2.15901C2.58097 1.73705 3.15326 1.5 3.75 1.5H5.25C5.84674 1.5 6.41903 1.73705 6.84099 2.15901C7.26295 2.58097 7.5 3.15326 7.5 3.75L13.701 3.75C13.8661 3.46404 14.1209 3.24054 14.426 3.11418C14.7311 2.98782 15.0693 2.96565 15.3883 3.05111C15.7072 3.13657 15.9891 3.32489 16.1901 3.58686C16.3911 3.84882 16.5 4.1698 16.5 4.5C16.5 4.8302 16.3911 5.15118 16.1901 5.41314C15.9891 5.67511 15.7072 5.86343 15.3883 5.94889C15.0693 6.03435 14.7311 6.01218 14.426 5.88582C14.1209 5.75946 13.8661 5.53596 13.701 5.25H10.686C10.956 5.52 11.196 5.8215 11.412 6.1575C12.369 7.6455 12.75 9.6885 12.75 12C12.75 14.9895 13.1355 16.638 13.8195 17.55C14.3535 18.264 15.162 18.6315 16.5 18.726C16.5063 18.1334 16.7462 17.5673 17.1674 17.1505C17.5887 16.7337 18.1574 16.5 18.75 16.5H20.25C20.8467 16.5 21.419 16.7371 21.841 17.159C22.2629 17.581 22.5 18.1533 22.5 18.75V20.25C22.5 20.8467 22.2629 21.419 21.841 21.841C21.419 22.2629 20.8467 22.5 20.25 22.5H18.75C18.1533 22.5 17.581 22.2629 17.159 21.841C16.7371 21.419 16.5 20.8467 16.5 20.25H10.299C10.1339 20.536 9.87905 20.7595 9.57399 20.8858C9.26892 21.0122 8.93068 21.0344 8.61173 20.9489C8.29278 20.8634 8.01095 20.6751 7.80993 20.4131C7.60892 20.1512 7.49996 19.8302 7.49996 19.5C7.49996 19.1698 7.60892 18.8488 7.80993 18.5869C8.01095 18.3249 8.29278 18.1366 8.61173 18.0511C8.93068 17.9656 9.26892 17.9878 9.57399 18.1142C9.87905 18.2405 10.1339 18.464 10.299 18.75H12.8655C12.7785 18.6538 12.6959 18.5537 12.618 18.45C11.6145 17.1105 11.25 15.0105 11.25 12C11.25 9.81 10.881 8.1045 10.1505 6.9675C9.5655 6.06 8.7225 5.4675 7.5 5.2995C7.48706 5.88762 7.2443 6.44728 6.82374 6.85859C6.40318 7.2699 5.83826 7.50014 5.25 7.5H3.75C3.15326 7.5 2.58097 7.26295 2.15901 6.84099C1.73705 6.41903 1.5 5.84674 1.5 5.25V3.75ZM3.75 3C3.55109 3 3.36032 3.07902 3.21967 3.21967C3.07902 3.36032 3 3.55109 3 3.75V5.25C3 5.44891 3.07902 5.63968 3.21967 5.78033C3.36032 5.92098 3.55109 6 3.75 6H5.25C5.44891 6 5.63968 5.92098 5.78033 5.78033C5.92098 5.63968 6 5.44891 6 5.25V3.75C6 3.55109 5.92098 3.36032 5.78033 3.21967C5.63968 3.07902 5.44891 3 5.25 3H3.75ZM18.75 18C18.5511 18 18.3603 18.079 18.2197 18.2197C18.079 18.3603 18 18.5511 18 18.75V20.25C18 20.4489 18.079 20.6397 18.2197 20.7803C18.3603 20.921 18.5511 21 18.75 21H20.25C20.4489 21 20.6397 20.921 20.7803 20.7803C20.921 20.6397 21 20.4489 21 20.25V18.75C21 18.5511 20.921 18.3603 20.7803 18.2197C20.6397 18.079 20.4489 18 20.25 18H18.75Z",fill:"white"})})}),zt="_trigger_kfg1y_1",Yt="_title_kfg1y_7",Gt="_empty_kfg1y_15",Zt="_triggerContainer_kfg1y_21",Ut="_stepsContainer_kfg1y_25",Xt="_stepItem_kfg1y_51",qt="_curvesSvg_kfg1y_70",Kt="_centralNode_kfg1y_78",Jt="_iconWrapper_kfg1y_104",Qt="_fadeIn_kfg1y_127",en="_fadeOut_kfg1y_130",tn="_operationContainer_kfg1y_134",O={trigger:zt,title:Yt,empty:Gt,triggerContainer:Zt,stepsContainer:Ut,stepItem:Xt,curvesSvg:qt,centralNode:Kt,iconWrapper:Jt,fadeIn:Qt,fadeOut:en,operationContainer:tn},nn=()=>t.jsx("div",{style:{height:"1px",marginLeft:"4px",marginRight:"4px",borderTop:`1px solid ${b.SEPARATOR}`}}),sn=["failed","invalid","cancelled","validating","running","finished","skipped","pending"],We=e=>{const n=[...new Set(e.filter(s=>s!=null))];if(n.length!==0){for(const s of sn)if(n.includes(s))return s;return n[0]}},He=(e,n)=>!n||e==null?b.NAVY:pe[e],on=(e,n,s=b.NAVY)=>e==null?s:n?.[e]??pe[e],rn=(e,n=b.NAVY)=>({statusLine:s=>on(s,e,n)}),Q=e=>{if("status"in e&&e.status!=null)return e.status;const n=e.steps;if(n?.[0]?.status!=null)return n[0].status},ln=80,se=34,_e=({steps:e,title:n,className:s,onDeleteTrigger:o,onAddTrigger:i,onSelectStep:l,onUpdateFilter:d,onCenterYUpdate:h,debuggerMode:c=!1,resolveCurveStrokeColor:r,isAdmin:f=!1})=>{const m=u.useRef(null),j=u.useRef([]),[C,I]=u.useState([]),[w,x]=u.useState({width:0,height:0}),[g,R]=u.useState(!1),[p,y]=u.useState(!1),a=u.useRef(null);u.useEffect(()=>{const _=()=>{if(!m.current)return;const T=[];if(j.current.forEach((N,P)=>{if(N&&m.current){const D=m.current.getBoundingClientRect(),$=N.getBoundingClientRect();T.push({localId:e[P]?.localId??`step-${P}`,top:$.top-D.top,right:$.right-D.left,centerY:$.top-D.top+$.height/2})}}),I(T),m.current&&T.length>0){const N=m.current.getBoundingClientRect(),P=Math.min(...T.map(W=>W.top)),D=j.current.filter(Boolean).map(W=>W?.offsetHeight||68),$=Math.max(...T.map((W,nt)=>W.top+(D[nt]||68))),ge=Math.max(...T.map(W=>W.right))+0,xe=Math.max(N.height,$-P+100);x({width:ge,height:xe})}};return _(),window.addEventListener("resize",_),()=>window.removeEventListener("resize",_)},[e]),u.useEffect(()=>{let _=!0;if(g){a.current&&(clearTimeout(a.current),a.current=null);const T=setTimeout(()=>{_&&y(!0)},0);return()=>{_=!1,clearTimeout(T)}}return a.current=setTimeout(()=>{_&&y(!1)},140),()=>{_=!1,a.current&&(clearTimeout(a.current),a.current=null)}},[g]);const v=C.length>0?ln:0,S=u.useMemo(()=>C.length>1?C.reduce((_,T)=>_+T.top+se,0)/C.length:C.length===1?C[0].top+se:0,[C]);u.useEffect(()=>{h?.(S)},[S,h]);const k=de();if(e.length===0)return t.jsxs("div",{className:`${O.trigger} ${s||""}`,children:[n&&t.jsx("h3",{className:O.title,children:n}),t.jsx("div",{className:O.empty,children:"No steps"})]});const M=(_,T,N,P)=>{const D=N-_,$=Math.min(D*.6,60),ne=_+$,ge=T,xe=N-$;return`M ${_} ${T} C ${ne} ${ge}, ${xe} ${P}, ${N} ${P}`};return t.jsxs("div",{className:`${O.trigger} ${s||""}`,ref:m,children:[n&&t.jsx("h3",{className:O.title,children:n}),t.jsxs("div",{className:O.triggerContainer,children:[t.jsx("div",{className:O.stepsContainer,children:e.map((_,T)=>t.jsx("div",{ref:N=>{j.current[T]=N},children:t.jsx(K,{title:_.title,className:O.stepItem,localId:_.localId,idx:T,isSet:_.isSet,isSelected:_.isSelected,isInvalid:_.isInvalid,isFilter:_.isFilter,status:_.status,debuggerMode:c,icon:_.icon,onSelectStep:l,onUpdateFilter:d,onCheckScenario:()=>{throw new Error("Check scenario not handled in Trigger")},contextMenuItems:f?[{label:"Add Step Filter",icon:t.jsx("div",{className:"mr-2 flex items-center justify-center",children:t.jsx(me,{})}),command:N=>{N?.originalEvent?.stopPropagation(),d&&d(_.localId)},template:k},{label:"Delete",icon:t.jsx(ae,{className:"mr-2",color:b.NAVY,size:18}),command:()=>{o?.(_.localId)},disabled:e.length===1},{label:"",template:()=>t.jsx(nn,{})},{label:"Add More Triggers",icon:t.jsx(wt,{className:"mr-2",color:b.NAVY,size:18}),command:()=>{i?.()}}]:[]})},_.localId))}),t.jsx("div",{style:{position:"relative"},children:C.length>1&&t.jsx("svg",{className:O.curvesSvg,width:w.width,height:w.height,children:C.map(_=>{const N=C.length===1?C[0].top+se:_.top+se,P=v,D=S,$=e.find(ne=>ne.localId===_.localId)?.status;return t.jsx("path",{d:M(0,N,P,D),stroke:r!=null?r($):He($,c),strokeWidth:"2",fill:"none",strokeLinecap:"round"},_.localId)})})}),C.length>1?t.jsxs("div",{style:{position:"relative",marginRight:"140px"},children:[t.jsx("div",{className:O.centralNode,style:{"--node-x":`${v}px`,"--node-y":`${S}px`},onMouseEnter:()=>R(!0),onMouseLeave:()=>R(!1),children:p?t.jsx("div",{className:`${O.iconWrapper} ${g?O.fadeIn:O.fadeOut}`,onClick:i,children:t.jsx(At,{})}):null}),t.jsx("div",{className:O.operationContainer,style:{"--op-x":`${v+16}px`,"--op-y":`${S}px`},children:t.jsx(Vt,{})})]}):null]})]})},cn=()=>t.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[t.jsx("path",{d:"M6 12L18 12",stroke:b.NAVY,strokeWidth:"2",strokeLinecap:"round"}),t.jsx("path",{d:"M12 6V18",stroke:b.NAVY,strokeWidth:"2",strokeLinecap:"round"})]}),an="_stepLinkIcon_b0452_1",dn="_stepLinkLine_b0452_15",un="_stepLinkContainer_b0452_39",pn="_readOnly_b0452_61",hn="_debuggerIconCollapsed_b0452_66",fn="_dashedLine_b0452_75",B={stepLinkIcon:an,stepLinkLine:dn,stepLinkContainer:un,readOnly:pn,debuggerIconCollapsed:hn,dashedLine:fn},U=({onAddStep:e,onAddTrigger:n,onAddCondition:s,onAddLoop:o,iteratorEnabled:i=!0,conditionsEnabled:l=!0,lineColor:d=b.NAVY,stepId:h,index:c=0,style:r,pathId:f})=>{const m=de(),j=u.useRef(null),C=[...c>0?[{label:"Trigger",icon:t.jsx(Ft,{color:b.NAVY,size:18}),command:()=>{n?.(h,f,"trigger")},template:m}]:[],{label:"Step",icon:t.jsx(Bt,{color:b.NAVY,size:18}),command:()=>e?.(h,f,c>0?"append":"prepend"),template:m},...l&&h!=null?[{label:"Condition",icon:t.jsx(Et,{width:18,height:18}),command:()=>s?.(h,f,c>0?"append":"prepend"),template:m}]:[],...i?[{label:"Loop",icon:t.jsx(Mt,{width:18,height:18}),command:()=>o?.(h,f,c>0?"append":"prepend"),template:m}]:[]],I=w=>{j.current?.show(w)};return t.jsxs("div",{className:B.stepLinkContainer,style:{...r,"--step-link-color":d},"data-plus-index":c,children:[t.jsx("div",{className:B.stepLinkLine}),t.jsx("div",{className:B.stepLinkIcon,onClick:I,"aria-haspopup":!0,children:t.jsx(cn,{})}),t.jsx(te,{model:C,popup:!0,ref:j}),t.jsx("div",{className:B.stepLinkLine})]})},gn="_steps_yug55_1",xn="_stepContainer_yug55_8",mn="_stepContainerWithPaths_yug55_14",q={steps:gn,stepContainer:xn,stepContainerWithPaths:mn},Cn=(e,n,s,o)=>{const i=s-e,l=Math.min(i*.66,66),d=e+l,h=n,c=s-l;return`M ${e} ${n} C ${d} ${h}, ${c} ${o}, ${s} ${o}`},Ce=({width:e,height:n,strokeColor:s=b.NAVY,fromLocalId:o,toLocalId:i})=>{const l=ue(s),f=Cn(0,1,e,n);return t.jsx("div",{style:{position:"absolute"},"data-connector-from":void 0,"data-connector-to":void 0,children:t.jsx("svg",{width:e,height:n+1,viewBox:`0 0 ${e} ${n+1}`,xmlns:"http://www.w3.org/2000/svg",children:t.jsx("path",{d:f,stroke:s,strokeWidth:l?3:2,fill:"none",strokeLinecap:"round",strokeDasharray:l?"0 6":void 0,"data-connector-from":void 0,"data-connector-to":void 0})})})},vn="_column_1uiy3_1",jn="_row_1uiy3_19",_n="_stepsContainer_1uiy3_24",A={column:vn,row:jn,stepsContainer:_n},In="_wrapper_1nl2d_1",wn="_tooltip_1nl2d_5",Ee={wrapper:In,tooltip:wn},yn=({content:e,children:n,maxWidth:s=500,className:o})=>t.jsxs("div",{className:`${Ee.wrapper} ${o??""}`.trim(),style:{"--tooltip-max-width":`${s}px`},children:[n,e?t.jsx("div",{className:Ee.tooltip,role:"tooltip",children:e}):null]}),bn="_conditionContainer_19jfz_1",Nn="_debuggerTint_19jfz_5",Sn="_connectorLine_19jfz_5",Ln="_connectorDot_19jfz_8",Tn="_condition_19jfz_1",Pn="_conditionWrapper_19jfz_15",kn="_conditionFits_19jfz_67",H={conditionContainer:bn,debuggerTint:Nn,connectorLine:Sn,connectorDot:Ln,condition:Tn,conditionWrapper:Pn,conditionFits:kn},fe=({expression:e,style:n,status:s,debuggerMode:o=!1})=>{const i=u.useRef(null),l=u.useRef(null),[d,h]=u.useState(!1);u.useLayoutEffect(()=>{const C=i.current,I=l.current;if(!C||!I)return;const{paddingLeft:w,paddingRight:x}=getComputedStyle(C),g=Number.parseFloat(w)+Number.parseFloat(x);h(I.offsetWidth>=C.clientWidth-g)},[e]);const c=e&&d?e:"",r=o&&s!=null,f=u.useMemo(()=>{if(!r||s==null)return;const C=s==="finished";return{"--condition-accent":pe[s],"--condition-bg":Rt[s],...C&&{"--condition-line-width":"3px","--condition-line-style":"dotted"}}},[r,s]),m=`${H.condition} ${d?"":H.conditionFits}`.trim(),j=`${H.conditionContainer} ${r?H.debuggerTint:""}`.trim();return t.jsxs("div",{className:j,style:{...n,...f},children:[t.jsx("div",{className:H.connectorLine}),t.jsx(yn,{content:c,className:H.conditionWrapper,children:t.jsx("div",{ref:i,className:m,children:t.jsx("span",{ref:l,children:e})})}),t.jsx("div",{className:H.connectorLine}),t.jsx("div",{className:H.connectorDot})]})},Rn="data:image/svg+xml,%3csvg%20width='44'%20height='44'%20viewBox='0%200%2044%2044'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20x='21.8125'%20y='-2.52539'%20width='34.4207'%20height='34.4207'%20rx='6.09524'%20transform='rotate(45%2021.8125%20-2.52539)'%20fill='%236B90C0'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M31.3947%2013.0355C31.4679%2013.1085%2031.526%2013.1952%2031.5656%2013.2907C31.6052%2013.3861%2031.6256%2013.4885%2031.6256%2013.5918C31.6256%2013.6952%2031.6052%2013.7975%2031.5656%2013.8929C31.526%2013.9884%2031.4679%2014.0751%2031.3947%2014.1481L14.109%2031.4338C13.9615%2031.5813%2013.7614%2031.6642%2013.5527%2031.6642C13.3441%2031.6642%2013.144%2031.5813%2012.9965%2031.4338C12.8489%2031.2863%2012.766%2031.0862%2012.766%2030.8775C12.766%2030.6689%2012.8489%2030.4688%2012.9965%2030.3212L30.2822%2013.0355C30.3552%2012.9623%2030.4419%2012.9043%2030.5373%2012.8647C30.6328%2012.8251%2030.7351%2012.8047%2030.8385%2012.8047C30.9418%2012.8047%2031.0441%2012.8251%2031.1396%2012.8647C31.2351%2012.9043%2031.3218%2012.9623%2031.3947%2013.0355Z'%20fill='white'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M12.9965%2013.0355C12.9233%2013.1085%2012.8652%2013.1952%2012.8256%2013.2907C12.786%2013.3861%2012.7656%2013.4885%2012.7656%2013.5918C12.7656%2013.6952%2012.786%2013.7975%2012.8256%2013.8929C12.8652%2013.9884%2012.9233%2014.0751%2012.9965%2014.1481L30.2822%2031.4338C30.4297%2031.5813%2030.6298%2031.6642%2030.8385%2031.6642C31.0471%2031.6642%2031.2472%2031.5813%2031.3947%2031.4338C31.5423%2031.2863%2031.6252%2031.0862%2031.6252%2030.8775C31.6252%2030.6689%2031.5423%2030.4688%2031.3947%2030.3212L14.109%2013.0355C14.036%2012.9623%2013.9493%2012.9043%2013.8539%2012.8647C13.7584%2012.8251%2013.6561%2012.8047%2013.5527%2012.8047C13.4494%2012.8047%2013.3471%2012.8251%2013.2516%2012.8647C13.1561%2012.9043%2013.0694%2012.9623%2012.9965%2013.0355Z'%20fill='white'/%3e%3c/svg%3e",En="data:image/svg+xml,%3csvg%20width='28'%20height='28'%20viewBox='0%200%2028%2028'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20x='1'%20y='1'%20width='26'%20height='26'%20rx='13'%20fill='white'/%3e%3crect%20x='1'%20y='1'%20width='26'%20height='26'%20rx='13'%20stroke='%236B90C0'%20stroke-width='2'/%3e%3ccircle%20cx='14'%20cy='14'%20r='6'%20fill='%236B90C0'/%3e%3c/svg%3e",Mn="data:image/svg+xml,%3csvg%20width='44'%20height='44'%20viewBox='0%200%2044%2044'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20x='21.8125'%20y='-2.52539'%20width='34.4207'%20height='34.4207'%20rx='6.09524'%20transform='rotate(45%2021.8125%20-2.52539)'%20fill='%2317A34A'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M31.3947%2013.0355C31.4679%2013.1085%2031.526%2013.1952%2031.5656%2013.2907C31.6052%2013.3861%2031.6256%2013.4885%2031.6256%2013.5918C31.6256%2013.6952%2031.6052%2013.7975%2031.5656%2013.8929C31.526%2013.9884%2031.4679%2014.0751%2031.3947%2014.1481L14.109%2031.4338C13.9615%2031.5813%2013.7614%2031.6642%2013.5527%2031.6642C13.3441%2031.6642%2013.144%2031.5813%2012.9965%2031.4338C12.8489%2031.2863%2012.766%2031.0862%2012.766%2030.8775C12.766%2030.6689%2012.8489%2030.4688%2012.9965%2030.3212L30.2822%2013.0355C30.3552%2012.9623%2030.4419%2012.9043%2030.5373%2012.8647C30.6328%2012.8251%2030.7351%2012.8047%2030.8385%2012.8047C30.9418%2012.8047%2031.0441%2012.8251%2031.1396%2012.8647C31.2351%2012.9043%2031.3218%2012.9623%2031.3947%2013.0355Z'%20fill='white'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M12.9965%2013.0355C12.9233%2013.1085%2012.8652%2013.1952%2012.8256%2013.2907C12.786%2013.3861%2012.7656%2013.4885%2012.7656%2013.5918C12.7656%2013.6952%2012.786%2013.7975%2012.8256%2013.8929C12.8652%2013.9884%2012.9233%2014.0751%2012.9965%2014.1481L30.2822%2031.4338C30.4297%2031.5813%2030.6298%2031.6642%2030.8385%2031.6642C31.0471%2031.6642%2031.2472%2031.5813%2031.3947%2031.4338C31.5423%2031.2863%2031.6252%2031.0862%2031.6252%2030.8775C31.6252%2030.6689%2031.5423%2030.4688%2031.3947%2030.3212L14.109%2013.0355C14.036%2012.9623%2013.9493%2012.9043%2013.8539%2012.8647C13.7584%2012.8251%2013.6561%2012.8047%2013.5527%2012.8047C13.4494%2012.8047%2013.3471%2012.8251%2013.2516%2012.8647C13.1561%2012.9043%2013.0694%2012.9623%2012.9965%2013.0355Z'%20fill='white'/%3e%3c/svg%3e",On="data:image/svg+xml,%3csvg%20width='28'%20height='28'%20viewBox='0%200%2028%2028'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20x='1'%20y='1'%20width='26'%20height='26'%20rx='13'%20fill='white'/%3e%3crect%20x='1'%20y='1'%20width='26'%20height='26'%20rx='13'%20stroke='%2317A34A'%20stroke-width='2'/%3e%3ccircle%20cx='14'%20cy='14'%20r='6'%20fill='%2317A34A'/%3e%3c/svg%3e",$n="_ifStatement_xtij3_1",Dn="_conditionIcon_xtij3_7",Bn="_ifStatementContainer_xtij3_21",Fn="_menuButton_xtij3_27",An="_menuIcon_xtij3_52",Wn="_ifdotIcon_xtij3_59",z={ifStatement:$n,conditionIcon:Dn,ifStatementContainer:Bn,menuButton:Fn,menuIcon:An,ifdotIcon:Wn},Hn=({style:e,color:n=b.NAVY})=>t.jsx("div",{style:{width:"100%",height:"2px",borderTop:G(n),...e}}),Ve=e=>{const{enabled:n=!0,onDelete:s,onSelect:o,debuggerMode:i=!1,status:l}=e,d=u.useRef(null),{openMenu:h,closeMenu:c}=he(),r=n&&!i,f=i&&l==="finished",m=He(l,i),j=f?Mn:Rn,C=f?On:En,I=u.useMemo(()=>[{label:"Edit",icon:t.jsx(Fe,{color:b.NAVY,size:18}),command:()=>o?.()},{label:"Delete",icon:t.jsx(ae,{color:b.NAVY,size:18}),command:()=>s?.()}],[o,s]),w=g=>{g.stopPropagation(),h(d,g)},x=g=>{g.target.closest(`.${z.menuButton}`)||o?.()};return t.jsxs("div",{className:z.ifStatementContainer,children:[t.jsx(Hn,{color:m,style:{position:"absolute",top:"22.5px",left:0,zIndex:1}}),t.jsx("div",{className:z.ifStatement,children:t.jsx("img",{src:j,alt:"condition",onClick:g=>x(g),className:z.conditionIcon})}),r&&t.jsxs(t.Fragment,{children:[t.jsx("button",{type:"button",className:z.menuButton,onClick:w,"aria-label":"Open menu","aria-haspopup":"menu",children:t.jsx(re,{className:z.menuIcon,size:16})}),t.jsx(te,{ref:d,model:I,popup:!0,onHide:()=>c(d)})]}),t.jsx("img",{src:C,alt:"ifdot",className:z.ifdotIcon})]})},Me=34.5,Vn=33,J=b.NAVY,ze=e=>{const{items:n,pathId:s,onAddStep:o,onAddTrigger:i,onAddCondition:l,onAddLoop:d,onDeleteStep:h,onUpdateFilter:c,onSelectStep:r,onResize:f,onCheckScenario:m,iteratorEnabled:j,conditionsEnabled:C}=e,I=u.useRef(null),w=u.useRef([]),[x,g]=u.useState([]);u.useEffect(()=>{const p=()=>{const v=I.current;if(!v||n.length===0){g([]);return}const S=[],k=Number.parseFloat(getComputedStyle(v).zoom||"1");for(let M=0;M<n.length;M++){const _=w.current[M];if(_)if(_.offsetParent==null){const T=v.getBoundingClientRect(),N=_.getBoundingClientRect();S.push((N.top-T.top)/k+Me)}else S.push(_.offsetTop-Vn+Me)}S.length===n.length&&g(S)};p();const y=new ResizeObserver(p),a=I.current;return a&&y.observe(a),window.addEventListener("resize",p),()=>{y.disconnect(),window.removeEventListener("resize",p)}},[n]);const R=u.useMemo(()=>x.length!==n.length||n.length<=1?null:n.map((p,y)=>y).filter(p=>p>0).map(p=>{const y=x[p];return y===void 0?null:t.jsx(Ce,{width:100,height:y,strokeColor:J},p)}),[n,x]);return t.jsxs("div",{className:A.row,children:[t.jsx(Ve,{onDelete:()=>s!=null&&h?.(s),enabled:C,onSelect:s!=null&&r?()=>r(s):void 0}),t.jsxs("div",{ref:I,className:A.column,style:{marginTop:"33px"},children:[t.jsx("div",{style:{position:"absolute",top:0,left:0,width:"100px",height:"2px",borderTop:`2px solid ${J}`}}),R]}),t.jsx("div",{className:A.column,children:n.map((p,y)=>{let a;if(p.paths)a=t.jsx(ze,{items:p.paths,pathId:s,onAddStep:o,onAddTrigger:i,onAddCondition:l,onAddLoop:d,onDeleteStep:h,onUpdateFilter:c,onSelectStep:r,onResize:f,onCheckScenario:m,iteratorEnabled:j,conditionsEnabled:C},p.localId);else if(p.steps){const v=p;a=t.jsxs("div",{className:A.stepsContainer,children:[t.jsx(fe,{expression:v.condition,status:v.status,style:{marginTop:"25px"}}),t.jsx(Ie,{steps:p.steps,pathId:p.localId,iteratorEnabled:j,conditionsEnabled:C,onSelectStep:r??(()=>{}),onAddStep:o??(()=>{}),onAddTrigger:i,onAddCondition:l??(()=>{}),onAddLoop:d,onDeleteStep:h,onUpdateFilter:c,onResize:f,onCheckScenario:m},p.localId)]})}else a=t.jsx(K,{localId:p.localId,title:"title"in p?p.title:"",idx:1,icon:"icon"in p?p.icon:void 0,status:"status"in p?p.status:void 0,onSelectStep:r,onDeleteStep:h,onUpdateFilter:c,onCheckScenario:m},p.localId);return t.jsx("div",{ref:v=>{w.current[y]=v},style:{width:"100%"},children:a},p.localId)})}),t.jsxs("div",{className:A.column,style:{marginTop:"33px"},children:[t.jsx("div",{style:{position:"absolute",top:.5,left:0,flex:1,width:"100%",height:"2px",borderTop:`2px solid ${J}`}}),R]}),t.jsx(U,{onAddStep:o,onAddTrigger:i,onAddCondition:l,onAddLoop:d,iteratorEnabled:j,conditionsEnabled:C,lineColor:J,stepId:s,pathId:s,index:1,style:{marginTop:"34px",height:0}}),t.jsx("div",{style:{flex:1,width:"100%",height:"2px",borderTop:`2px solid ${J}`,marginTop:"34px"}})]})},ve=68,Y=b.NAVY,Ie=({pathId:e,steps:n,centerY:s,className:o,iteratorEnabled:i,conditionsEnabled:l,onAddStep:d,onDeleteStep:h,onUpdateFilter:c,onAddTrigger:r,onAddCondition:f,onAddLoop:m,onSelectStep:j,onResize:C,onCheckScenario:I,isDescendent:w=!0})=>{const x=s===void 0?void 0:{marginTop:Math.max(0,s-ve/2)};return n.length===0?t.jsxs("div",{style:{width:"100%",marginTop:"20px",display:"flex",flexDirection:"row",flex:1,minWidth:0,...x},children:[t.jsx("div",{style:{flexGrow:1,flexShrink:0,flexBasis:"auto",minWidth:0,height:"2px",marginTop:"13.5px",borderTop:`2px solid ${Y}`}}),t.jsx(U,{onAddStep:()=>{d?.(void 0,e)},onAddTrigger:r,onAddCondition:f,onAddLoop:m,iteratorEnabled:i,conditionsEnabled:l,lineColor:Y,stepId:e,index:0,style:{height:"auto",marginTop:"0"}}),t.jsx("div",{style:{flexGrow:1,flexShrink:0,flexBasis:"auto",minWidth:0,height:"2px",marginTop:"13.5px",borderTop:`2px solid ${Y}`}})]}):t.jsx("div",{className:q.steps+(o?" "+o:""),style:x,children:t.jsxs("div",{style:{display:"flex",flexDirection:"row",flex:1,minWidth:0,width:"100%",alignItems:"flex-start"},children:[t.jsx(U,{onAddStep:()=>{d?.(n[0].localId,e,"prepend")},onAddTrigger:r,onAddCondition:f,onAddLoop:m,iteratorEnabled:i,conditionsEnabled:l,lineColor:Y,stepId:n[0].localId,pathId:e,index:0,style:{marginTop:"20px"}}),n.map((g,R)=>{const p=!!g.paths,y="condition"in g&&typeof g.condition=="string";let a;return p&&g.paths?a=t.jsx(ze,{items:g.paths,pathId:g.localId,iteratorEnabled:i,conditionsEnabled:l,onAddStep:d,onAddCondition:f,onAddLoop:m,onDeleteStep:h,onAddTrigger:r,onSelectStep:j,onUpdateFilter:c,onResize:C,onCheckScenario:I},g.title):y?a=t.jsxs(t.Fragment,{children:[t.jsx(Ge,{value:g,iteratorEnabled:i,conditionsEnabled:l,onAddStep:d,onAddTrigger:r,onAddCondition:f,onAddLoop:m,onDeleteStep:h,onUpdateFilter:c,onSelectStep:j,onResize:C,onCheckScenario:I},g.localId),t.jsx(U,{onAddStep:d,onAddTrigger:r,onAddCondition:f,onAddLoop:m,iteratorEnabled:i,conditionsEnabled:l,lineColor:Y,stepId:g.localId,pathId:e,index:R+1,style:{marginTop:"34px",height:0}})]}):a=t.jsxs(t.Fragment,{children:[t.jsx(K,{localId:g.localId,title:g.title,idx:1,icon:g.icon,isSet:g.isSet,isInvalid:g.isInvalid,isFilter:g.isFilter,status:g.status,onSelectStep:j,onDeleteStep:h,onUpdateFilter:c,onCheckScenario:I},g.title),t.jsx(U,{onAddStep:d,onAddTrigger:r,onAddCondition:f,onAddLoop:m,iteratorEnabled:i,conditionsEnabled:l,lineColor:Y,stepId:g.localId,pathId:e,index:R+1})]}),t.jsx("div",{className:q.stepContainer+(p||y?" "+q.stepContainerWithPaths:""),children:a},g.localId)}),w&&t.jsx("div",{style:{flexGrow:1,minWidth:0,borderTop:`2px solid ${Y}`,marginTop:"33.5px"}})]})})},Ye=()=>t.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[t.jsx("path",{d:"M17.3006 10.5H23.1986C23.2699 10.5001 23.3397 10.5204 23.3998 10.5586C23.4599 10.5969 23.5079 10.6515 23.5381 10.716C23.5683 10.7805 23.5795 10.8523 23.5704 10.923C23.5613 10.9937 23.5322 11.0603 23.4866 11.115L20.5376 14.655C20.5024 14.6972 20.4584 14.7312 20.4086 14.7545C20.3589 14.7778 20.3046 14.7899 20.2496 14.7899C20.1947 14.7899 20.1404 14.7778 20.0906 14.7545C20.0409 14.7312 19.9968 14.6972 19.9616 14.655L17.0126 11.115C16.967 11.0603 16.938 10.9937 16.9289 10.923C16.9197 10.8523 16.931 10.7805 16.9612 10.716C16.9914 10.6515 17.0394 10.5969 17.0995 10.5586C17.1596 10.5204 17.2294 10.5001 17.3006 10.5ZM0.800641 13.5H6.69864C6.7699 13.5 6.83967 13.4797 6.89979 13.4414C6.95991 13.4032 7.00789 13.3486 7.03811 13.2841C7.06833 13.2195 7.07953 13.1477 7.07042 13.0771C7.06131 13.0064 7.03224 12.9398 6.98664 12.885L4.03764 9.34504C4.00245 9.30283 3.95841 9.26888 3.90864 9.24558C3.85887 9.22228 3.80459 9.21021 3.74964 9.21021C3.69469 9.21021 3.64041 9.22228 3.59064 9.24558C3.54087 9.26888 3.49683 9.30283 3.46164 9.34504L0.512641 12.885C0.467037 12.9398 0.437977 13.0064 0.428862 13.0771C0.419747 13.1477 0.430956 13.2195 0.461175 13.2841C0.491394 13.3486 0.539372 13.4032 0.599493 13.4414C0.659613 13.4797 0.729386 13.5 0.800641 13.5Z",fill:"#41B0AC"}),t.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.9995 4.50011C9.67152 4.50011 7.58952 5.5606 6.21402 7.2271C6.1526 7.30671 6.0758 7.37316 5.98819 7.42249C5.90057 7.47183 5.80393 7.50304 5.70401 7.51427C5.60409 7.52551 5.50293 7.51653 5.40655 7.48789C5.31016 7.45924 5.22052 7.41151 5.14296 7.34753C5.06539 7.28354 5.00149 7.20462 4.95504 7.11544C4.90859 7.02626 4.88054 6.92865 4.87257 6.82842C4.8646 6.72819 4.87687 6.62737 4.90864 6.53198C4.94041 6.43658 4.99104 6.34854 5.05752 6.27311C6.15581 4.9434 7.61291 3.95712 9.25552 3.43159C10.8981 2.90606 12.6571 2.86338 14.3233 3.30864C15.9895 3.7539 17.4927 4.66835 18.6541 5.94324C19.8156 7.21812 20.5865 8.79978 20.875 10.5001L19.3495 10.5001C19.0032 8.80632 18.0826 7.28409 16.7433 6.19082C15.4041 5.09755 13.7284 4.50032 11.9995 4.50011ZM4.64952 13.5001C4.93349 14.887 5.60405 16.1653 6.58374 17.1873C7.56343 18.2093 8.81226 18.9332 10.186 19.2755C11.5597 19.6178 13.0022 19.5645 14.3469 19.1217C15.6915 18.6789 16.8835 17.8646 17.785 16.7731C17.8464 16.6935 17.9232 16.627 18.0109 16.5777C18.0985 16.5284 18.1951 16.4972 18.295 16.4859C18.395 16.4747 18.4961 16.4837 18.5925 16.5123C18.6889 16.541 18.7785 16.5887 18.8561 16.6527C18.9337 16.7167 18.9976 16.7956 19.044 16.8848C19.0905 16.974 19.1185 17.0716 19.1265 17.1718C19.1344 17.272 19.1222 17.3728 19.0904 17.4682C19.0586 17.5636 19.008 17.6517 18.9415 17.7271C17.8432 19.0568 16.3861 20.0431 14.7435 20.5686C13.1009 21.0942 11.3419 21.1368 9.67576 20.6916C8.0096 20.2463 6.50638 19.3319 5.34491 18.057C4.18343 16.7821 3.41258 15.2004 3.12402 13.5001H4.64952Z",fill:"#41B0AC"})]}),zn="_container_18jhr_1",Yn="_collapsed_18jhr_16",Gn="_loopNodeWrapper_18jhr_21",Zn="_loopIconWrapper_18jhr_31",Un="_loopBox_18jhr_40",Xn="_dotsButton_18jhr_57",qn="_label_18jhr_77",Kn="_limit_18jhr_84",Jn="_expandable_18jhr_90",Qn="_expandableCollapsed_18jhr_98",e1="_connector_18jhr_105",t1="_line_18jhr_113",n1="_circleDot_18jhr_121",s1="_innerDot_18jhr_136",o1="_stepsWrapper_18jhr_143",L={container:zn,collapsed:Yn,loopNodeWrapper:Gn,loopIconWrapper:Zn,loopBox:Un,dotsButton:Xn,label:qn,limit:Kn,expandable:Jn,expandableCollapsed:Qn,connector:e1,line:t1,circleDot:n1,innerDot:s1,stepsWrapper:o1},Ge=({value:e,iteratorEnabled:n=!0,conditionsEnabled:s=!0,onAddStep:o,onAddTrigger:i,onAddCondition:l,onAddLoop:d,onDeleteStep:h,onUpdateFilter:c,onSelectStep:r,onResize:f,onCheckScenario:m})=>{const{localId:j,limit:C,steps:I,condition:w}=e,x=I??[],g=()=>{},[R,p]=u.useState(!1),y=u.useRef(null),{openMenu:a,closeMenu:v}=he(),S=de(),k=u.useMemo(()=>[{label:"Edit",icon:t.jsx(Fe,{color:b.NAVY,size:18}),command:P=>{P?.originalEvent?.stopPropagation(),r?.(j)},template:S},{label:"Remove",icon:t.jsx(ae,{color:b.NAVY,size:18}),command:P=>{P?.originalEvent?.stopPropagation(),h&&h(j)},template:S}],[r,h,j,S]),M=P=>{P.stopPropagation(),a(y,P)},_=()=>{p(P=>!P),f?.()},T=L.container+(R?"":" "+L.collapsed),N=L.expandable+(R?"":" "+L.expandableCollapsed);return t.jsxs("div",{className:T,children:[t.jsxs("div",{className:L.loopNodeWrapper,children:[t.jsxs("div",{className:L.loopBox,children:[t.jsx("div",{onClick:_,className:L.loopIconWrapper,children:t.jsx(Ye,{})}),n&&t.jsx("button",{className:L.dotsButton,onClick:M,children:t.jsx(re,{size:16})}),t.jsx(te,{model:k,popup:!0,ref:y,onHide:()=>v(y)})]}),t.jsx("div",{className:L.label,children:"Loop"}),C!=null&&t.jsxs("div",{className:L.limit,children:[C,"x"]})]}),t.jsxs("div",{className:N,children:[t.jsxs("div",{className:L.connector,children:[t.jsx("div",{className:L.line}),t.jsx("div",{className:L.circleDot,children:t.jsx("div",{className:L.innerDot})}),t.jsx("div",{className:L.line})]}),t.jsx(fe,{expression:w??"",status:e.status,style:{marginTop:"25.5px"}}),t.jsx("div",{className:L.stepsWrapper,children:t.jsx(Ie,{steps:x,pathId:j,iteratorEnabled:n,conditionsEnabled:s,onAddStep:o??g,onAddTrigger:i,onAddCondition:l??g,onAddLoop:d,onDeleteStep:h,onUpdateFilter:c??g,onSelectStep:r??g,onCheckScenario:m??g,isDescendent:!0})})]})]})},i1="_container_kielx_1",Ze={container:i1},r1=({process:e,iteratorEnabled:n=!0,conditionsEnabled:s=!0,addMultipleTriggers:o,onAddStep:i,onAddTrigger:l,onAddCondition:d,onAddLoop:h,onResize:c,onDeleteTrigger:r,onDeleteStep:f,onUpdateFilter:m,onSelectStep:j,onCheckScenario:C})=>{const[I,w]=u.useState(0);return t.jsxs("div",{className:Ze.container,children:[t.jsx(_e,{steps:e.triggers,onAddTrigger:o,onUpdateFilter:m,onDeleteTrigger:r,onSelectStep:j,onCenterYUpdate:w}),e.steps.length>0?t.jsx(Ie,{steps:e.steps,centerY:I,onAddStep:i,onAddTrigger:l,onAddCondition:d,onAddLoop:h,onResize:c,onDeleteStep:f,onUpdateFilter:m,onSelectStep:j,iteratorEnabled:n,conditionsEnabled:s,isDescendent:!1,pathId:void 0,onCheckScenario:C}):t.jsx(U,{onAddStep:()=>i(),onAddTrigger:l,onAddCondition:d,onAddLoop:h,iteratorEnabled:n,conditionsEnabled:s,index:0,style:{height:ve,marginTop:Math.max(0,I-ve/2)}})]})},we=(e,n,s)=>{if(n===s)return!1;const o=r=>{if("paths"in r&&r.paths&&r.paths.length>0){const f=r.paths[r.paths.length-1];if(f.steps&&f.steps.length>0){const m=f.steps[f.steps.length-1];return o(m)}return f.localId}return"steps"in r&&r.steps&&r.steps.length>0?o(r.steps[r.steps.length-1]):r.localId},i=r=>r.steps&&r.steps.length>0?o(r.steps[r.steps.length-1]):r.paths&&r.paths.length>0?i(r.paths[r.paths.length-1]):r.localId,l=(r,f)=>"paths"in r&&r.paths&&r.paths.length>0?r.paths.some(j=>i(j)===f):o(r)===f,d=r=>{for(let f=0;f<r.length-1;f++){const m=r[f],j=r[f+1];if(m.localId===n&&j.localId===s||l(m,n)&&j.localId===s)return!0}for(const f of r){if(f.localId===n&&f.steps?.[0]?.localId===s)return!0;if("paths"in f&&f.paths){for(const m of f.paths)if(h(m))return!0}if("steps"in f&&f.steps&&d(f.steps))return!0}return!1},h=r=>{if(r.localId===n&&r.steps?.[0]?.localId===s||r.steps&&r.steps.length>0&&d(r.steps))return!0;if(r.paths){for(const f of r.paths)if(h(f))return!0}return!1},c=e.steps;return c?.[0]&&c[0].localId===n&&c[0].steps?.[0]?.localId===s?!0:d(c)},Ue=(e,n)=>{if(e.localId===n)return e.status;if(e.steps)for(const s of e.steps){const o=ye(s,n);if(o!==void 0)return o}if(e.paths)for(const s of e.paths){const o=Ue(s,n);if(o!==void 0)return o}},ye=(e,n)=>{if(e.localId===n)return e.status;if(e.paths)for(const s of e.paths){const o=Ue(s,n);if(o!==void 0)return o}if(e.steps)for(const s of e.steps){const o=ye(s,n);if(o!==void 0)return o}},V=(e,n)=>{for(const s of e.triggers)if(s.localId===n)return s.status;for(const s of e.steps){const o=ye(s,n);if(o!==void 0)return o}},l1=(e,n)=>{const s=i=>{if(i.localId===n)return!0;if(i.steps){for(const l of i.steps)if(o(l))return!0}if(i.paths){for(const l of i.paths)if(s(l))return!0}return!1},o=i=>{if(i.paths){for(const l of i.paths)if(s(l))return!0}if(i.steps){for(const l of i.steps)if(o(l))return!0}return!1};for(const i of e.triggers)if(o(i))return!0;for(const i of e.steps)if(o(i))return!0;return!1},le=(e,n,s)=>{if(n===s)return!1;const o=V(e,n),i=V(e,s);return o!=="finished"||i!=="finished"?!1:we(e,n,s)},be=(e,n,s)=>n===s||!l1(e,n)||V(e,s)!=="finished"?!1:we(e,n,s),X=({lineColor:e,style:n,fromLocalId:s,toLocalId:o})=>{const l=ue(e)?`${B.stepLinkLine} ${B.dashedLine}`:B.stepLinkLine;return t.jsxs("div",{className:`${B.stepLinkContainer} ${B.readOnly}`,style:{...n,"--step-link-color":e},"aria-hidden":!0,"data-connector-from":void 0,"data-connector-to":void 0,children:[t.jsx("div",{className:l}),t.jsx("div",{className:`${B.stepLinkIcon} ${B.debuggerIconCollapsed}`,"aria-hidden":!0}),t.jsx("div",{className:l})]})},Ne=e=>e.steps&&e.steps.length>0?ee(e.steps[e.steps.length-1]):e.paths&&e.paths.length>0?Ne(e.paths[e.paths.length-1]):e.localId,ee=e=>"paths"in e&&e.paths&&e.paths.length>0?Ne(e.paths[e.paths.length-1]):"steps"in e&&e.steps&&e.steps.length>0?ee(e.steps[e.steps.length-1]):e.localId,ce=e=>"steps"in e&&e.steps&&e.steps.length>0?ce(e.steps[e.steps.length-1]):"paths"in e&&e.paths&&e.paths.length>0?ce(e.paths[e.paths.length-1]):e.localId,Xe=(e,n,s,o)=>{const i=n.statusLine(void 0);if(o==null)return i;const l=V(e,o);return l==null?i:l!=="finished"?n.statusLine(l):s==null?i:be(e,s,o)||le(e,s,o)?n.statusLine("finished"):i},qe=u.createContext(null),c1=qe.Provider,Se=()=>{const e=u.useContext(qe);if(!e)throw new Error("useProcessDebuggerContext must be used within ProcessDebuggerProvider");return e},Oe=34.5,a1=33,Ke=e=>{const{items:n,pathId:s,previousLocalId:o,nextLocalId:i,onSelectStep:l,onResize:d,onCheckScenario:h}=e,{process:c,lineColors:r}=Se(),f=()=>{},m=Xe(c,r,o,i),j=u.useRef(null),C=u.useRef([]),[I,w]=u.useState([]);u.useEffect(()=>{const a=()=>{const k=j.current;if(!k||n.length===0){w([]);return}const M=[],_=Number.parseFloat(getComputedStyle(k).zoom||"1");for(let T=0;T<n.length;T++){const N=C.current[T];if(N)if(N.offsetParent==null){const P=k.getBoundingClientRect(),D=N.getBoundingClientRect();M.push((D.top-P.top)/_+Oe)}else M.push(N.offsetTop-a1+Oe)}M.length===n.length&&w(M)};a();const v=new ResizeObserver(a),S=j.current;return S&&v.observe(S),window.addEventListener("resize",a),()=>{v.disconnect(),window.removeEventListener("resize",a)}},[n]);const x=u.useMemo(()=>{if(n.length)return We(n.map(a=>Q(a)))},[n]),g=u.useMemo(()=>{const a=r.statusLine(void 0);return n.length===0?a:Q(n[0])==="finished"?r.statusLine("finished"):a},[n,r]),R=u.useMemo(()=>I.length!==n.length||n.length<=1?null:n.map((a,v)=>v).filter(a=>a>0).map(a=>{const v=I[a];if(v===void 0)return null;const S=Q(n[a]),k=r.statusLine(S);return t.jsx(Ce,{width:100,height:v,strokeColor:k,fromLocalId:n[a-1]?.localId,toLocalId:n[a]?.localId},a)}),[n,I,r]),p=u.useMemo(()=>{if(I.length!==n.length||n.length<=1)return null;const a=r.statusLine(void 0);return n.map((v,S)=>S).filter(v=>v>0).map(v=>{const S=I[v];if(S===void 0)return null;let k=a;if(i!=null&&V(c,i)==="finished"){const _=ce(n[v]);le(c,_,i)&&(k=r.statusLine("finished"))}return t.jsx(Ce,{width:100,height:S,strokeColor:k,fromLocalId:o,toLocalId:i},v)})},[n,I,r,c,i,o]),y=u.useMemo(()=>{const a=r.statusLine(void 0);if(n.length===0||i==null||V(c,i)!=="finished")return a;const S=ce(n[0]);return le(c,S,i)?r.statusLine("finished"):a},[n,r,c,i]);return t.jsxs("div",{className:A.row,children:[t.jsx(Ve,{onDelete:()=>{},enabled:!1,debuggerMode:!0,status:x,onSelect:s!=null&&l?()=>l(s):void 0}),t.jsxs("div",{ref:j,className:A.column,style:{marginTop:"33px"},children:[t.jsx("div",{style:{position:"absolute",top:0,left:0,width:"100px",height:"2px",borderTop:G(g)}}),R]}),t.jsx("div",{className:A.column,children:n.map((a,v)=>{let S;if(a.paths)S=t.jsx(Ke,{items:a.paths,pathId:s,previousLocalId:a.localId,nextLocalId:i,onSelectStep:l,onResize:d,onCheckScenario:h},a.localId);else if(a.steps){const k=a,M=k.status==="finished"||i!=null&&be(c,k.localId,i)?"finished":void 0;S=t.jsxs("div",{className:A.stepsContainer,"data-local-id":void 0,children:[t.jsx(fe,{expression:k.condition,status:M,debuggerMode:!0,style:{marginTop:"25px"}}),t.jsx(Le,{steps:a.steps,pathId:a.localId,previousLocalId:k.localId,nextLocalId:i,onSelectStep:l??f,onResize:d,onCheckScenario:h},a.localId)]})}else S=t.jsx(K,{localId:a.localId,title:"title"in a?a.title:"",idx:1,icon:"icon"in a?a.icon:void 0,status:"status"in a?a.status:void 0,debuggerMode:!0,onSelectStep:l,onUpdateFilter:f,onCheckScenario:h},a.localId);return t.jsx("div",{ref:k=>{C.current[v]=k},style:{width:"100%"},"data-local-id":void 0,children:S},a.localId)})}),t.jsxs("div",{className:A.column,style:{marginTop:"33px"},children:[t.jsx("div",{style:{position:"absolute",top:.5,left:0,flex:1,width:"100%",height:"2px",borderTop:G(y)}}),p]}),t.jsx(X,{lineColor:m,fromLocalId:o,toLocalId:i,style:{marginTop:"34px",height:0}}),t.jsx("div",{style:{flex:1,width:"100%",height:"2px",borderTop:G(m),marginTop:"34px"}})]})},d1=({value:e,previousLocalId:n,nextLocalId:s,onSelectStep:o,onResize:i,onCheckScenario:l})=>{const{process:d,lineColors:h}=Se(),{localId:c,limit:r,steps:f,condition:m}=e,j=f??[],C=()=>{},[I,w]=u.useState(!1),x=()=>{w(S=>!S),i?.()},g=L.container+(I?"":" "+L.collapsed),R=L.expandable+(I?"":" "+L.expandableCollapsed),p=j[0]?.localId,y=p!=null?V(d,p):void 0,v=n!=null&&(be(d,n,c)||V(d,n)==="finished"&&we(d,n,c)||le(d,n,c))&&y==="finished"?h.statusLine("finished"):h.statusLine(void 0);return t.jsxs("div",{className:g,"data-local-id":void 0,children:[t.jsxs("div",{className:L.loopNodeWrapper,children:[t.jsx("div",{className:L.loopBox,children:t.jsx("div",{onClick:x,className:L.loopIconWrapper,children:t.jsx(Ye,{})})}),t.jsx("div",{className:L.label,children:"Loop"}),r!=null&&t.jsxs("div",{className:L.limit,children:[r,"x"]})]}),t.jsxs("div",{className:R,children:[t.jsxs("div",{className:L.connector,style:{"--iterator-connector-color":v,...ue(v)&&{"--iterator-connector-width":"3px","--iterator-connector-style":"dotted"}},children:[t.jsx("div",{className:L.line}),t.jsx("div",{className:L.circleDot,children:t.jsx("div",{className:L.innerDot})}),t.jsx("div",{className:L.line})]}),t.jsx(fe,{expression:m??"",status:e.status,debuggerMode:!0,style:{marginTop:"25.5px"}}),t.jsx("div",{className:L.stepsWrapper,children:t.jsx(Le,{steps:j,pathId:c,previousLocalId:c,nextLocalId:s,onSelectStep:o??(()=>{}),onCheckScenario:l??C,isDescendent:!0})})]})]})},je=68,u1=e=>{if(!e||e.length===0)return;const n=We(e.map(o=>Q(o))),s=e.find(o=>Q(o)===n)??e[e.length-1];return Ne(s)},Le=({pathId:e,steps:n,centerY:s,className:o,previousLocalId:i,nextLocalId:l,onSelectStep:d,onResize:h,onCheckScenario:c,isDescendent:r=!0})=>{const{process:f,lineColors:m}=Se(),j=()=>{},C=s===void 0?void 0:{marginTop:Math.max(0,s-je/2)},I=(x,g)=>Xe(f,m,x,g),w=x=>x===n.length-1?l:n[x+1]?.localId;if(n.length===0){const x=I(i,l);return t.jsxs("div",{"data-path-id":e??"",style:{width:"100%",marginTop:"20px",display:"flex",flexDirection:"row",flex:1,minWidth:0,...C},children:[t.jsx("div",{style:{flexGrow:1,flexShrink:0,flexBasis:"auto",minWidth:0,height:"2px",marginTop:"13.5px",borderTop:G(x)}}),t.jsx(X,{lineColor:x,fromLocalId:i,toLocalId:l,style:{height:"auto",marginTop:"2px"}}),t.jsx("div",{style:{flexGrow:1,flexShrink:0,flexBasis:"auto",minWidth:0,height:"2px",marginTop:"13.5px",borderTop:G(x)}})]})}return t.jsx("div",{"data-path-id":e??"",className:q.steps+(o?" "+o:""),style:C,children:t.jsxs("div",{style:{display:"flex",flexDirection:"row",flex:1,minWidth:0,width:"100%",alignItems:"flex-start"},children:[t.jsx(X,{lineColor:I(i,n[0]?.localId),fromLocalId:i,toLocalId:n[0]?.localId,style:{marginTop:"21.5px"}}),n.map((x,g)=>{const R=!!x.paths,p="condition"in x&&typeof x.condition=="string";let y;if(R&&x.paths){const a=u1(x.paths);y=t.jsx(Ke,{items:x.paths,pathId:x.localId,previousLocalId:a??x.localId,nextLocalId:w(g),onSelectStep:d,onResize:h,onCheckScenario:c},x.title)}else if(p){const a=g===0?i:ee(n[g-1]),v=ee(x);y=t.jsxs(t.Fragment,{children:[t.jsx(d1,{value:x,previousLocalId:a,nextLocalId:w(g),onSelectStep:d,onResize:h,onCheckScenario:c}),t.jsx(X,{lineColor:I(v,w(g)),fromLocalId:x.localId,toLocalId:w(g),style:{marginTop:"34px",height:0}})]})}else y=t.jsxs(t.Fragment,{children:[t.jsx(K,{localId:x.localId,title:x.title,idx:1,icon:x.icon,isSet:x.isSet,isInvalid:x.isInvalid,isFilter:x.isFilter,status:x.status,debuggerMode:!0,onSelectStep:d,onUpdateFilter:j,onCheckScenario:c},x.title),t.jsx(X,{lineColor:I(x.localId,w(g)),fromLocalId:x.localId,toLocalId:w(g)})]});return t.jsx("div",{className:q.stepContainer+(R||p?" "+q.stepContainerWithPaths:""),children:y},x.localId)}),r&&t.jsx("div",{style:{flexGrow:1,minWidth:0,borderTop:G(I(n.length>0?ee(n[n.length-1]):void 0,l)),marginTop:"33.5px"}})]})})},p1=({centerY:e,neutralLineColor:n})=>t.jsxs("div",{style:{display:"flex",flexDirection:"row",flex:1,minWidth:0,width:"100%",marginTop:Math.max(0,e-je/2),height:je,alignItems:"center"},children:[t.jsx("div",{style:{flexGrow:1,minWidth:0,height:"2px",borderTop:`2px solid ${n}`}}),t.jsx(X,{lineColor:n,style:{height:"auto"}}),t.jsx("div",{style:{flexGrow:1,minWidth:0,height:"2px",borderTop:`2px solid ${n}`}})]}),h1=({process:e,statusLineColors:n,neutralLineColor:s=b.NAVY,onResize:o,onSelectStep:i,onCheckScenario:l=()=>{}})=>{const[d,h]=u.useState(0),c=u.useMemo(()=>rn(n,s),[n,s]);return t.jsx("div",{className:Ze.container,children:t.jsxs(c1,{value:{process:e,lineColors:c},children:[t.jsx(_e,{steps:e.triggers,onSelectStep:i,debuggerMode:!0,resolveCurveStrokeColor:c.statusLine,onCenterYUpdate:h}),e.steps.length>0?t.jsx(Le,{steps:e.steps,centerY:d,onResize:o,onSelectStep:i,onCheckScenario:l,isDescendent:!1,pathId:void 0}):t.jsx(p1,{centerY:d,neutralLineColor:c.statusLine(void 0)})]})})};class Je extends Error{constructor(n){super(n),this.name="AddStepError"}}const $e=e=>"condition"in e&&typeof e.condition=="string",Qe=(e,n,s,o)=>{const i=o==="prepend"?n:n+1;return[...e.slice(0,i),s,...e.slice(i)]},Te=(e,n,s,o)=>{for(let i=0;i<e.length;i++){if(e[i].localId===n)return Qe(e,i,o,s);const l=e[i],d=l.steps?.length&&Te(l.steps,n,s,o);if(d)return e.map((c,r)=>r===i?{...c,steps:d}:c);const h=l.paths?.length&&et(l.paths,n,s,o);if(h)return e.map((c,r)=>r===i?{...c,paths:h}:c)}return null},f1=(e,n,s)=>{const o=e.steps??[],i=n==="prepend"?[s,...o]:[...o,s];return{...e,steps:i}},et=(e,n,s,o)=>{for(let i=0;i<e.length;i++){const l=e[i];if(l.localId===n)return $e(l)?e.map((d,h)=>h===i?f1(l,s,o):d):Qe(e,i,o,s);if($e(l)){const d=l.steps?.length&&Te(l.steps,n,s,o);if(d)return e.map((c,r)=>r===i?{...c,steps:d}:c);const h=l.paths?.length&&et(l.paths,n,s,o);if(h)return e.map((c,r)=>r===i?{...c,paths:h}:c)}}return null},g1=(e,n,s,o)=>{const i=Te(e.steps,n,s,o);if(i)return{...e,steps:i};throw new Je(`Step or path with id "${n}" not found`)},tt=(e,n)=>({...e,...e.steps!=null&&{steps:Pe(e.steps,n)},...e.paths!=null&&{paths:e.paths.map(s=>tt(s,n))}}),Pe=(e,n)=>e.filter(s=>s.localId!==n).map(s=>({...s,...s.steps!=null&&{steps:Pe(s.steps,n)},...s.paths!=null&&{paths:s.paths.map(o=>tt(o,n))}})),x1=(e,n)=>{const s=Pe(e.steps,n);return{...e,steps:s}};exports.AddStepError=Je;exports.Iterator=Ge;exports.Menu=te;exports.MenuProvider=Ot;exports.ProcessDebuggerDiagram=h1;exports.ProcessDiagram=r1;exports.ProcessStep=K;exports.Trigger=_e;exports.addStep=g1;exports.deleteStep=x1;exports.useMenuProvider=he;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),d=require("react"),it=require("react-dom"),rt="_container_1f7x1_1",lt="_step_1f7x1_7",ct="_dotsButton_1f7x1_23",at="_selected_1f7x1_27",dt="_selectedInvalid_1f7x1_36",ut="_isSet_1f7x1_45",pt="_invalid_1f7x1_52",ht="_debuggerStatus_1f7x1_60",ft="_title_1f7x1_64",gt="_icon_1f7x1_67",xt="_filterFlag_1f7x1_78",mt="_content_1f7x1_141",k={container:rt,step:lt,dotsButton:ct,selected:at,selectedInvalid:dt,isSet:ut,invalid:pt,debuggerStatus:ht,title:ft,icon:gt,filterFlag:xt,content:mt};var Be={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Re=d.createContext&&d.createContext(Be),Ct=["attr","size","title"];function vt(e,n){if(e==null)return{};var s=jt(e,n),o,i;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(i=0;i<l.length;i++)o=l[i],!(n.indexOf(o)>=0)&&Object.prototype.propertyIsEnumerable.call(e,o)&&(s[o]=e[o])}return s}function jt(e,n){if(e==null)return{};var s={};for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){if(n.indexOf(o)>=0)continue;s[o]=e[o]}return s}function ae(){return ae=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var s=arguments[n];for(var o in s)Object.prototype.hasOwnProperty.call(s,o)&&(e[o]=s[o])}return e},ae.apply(this,arguments)}function Me(e,n){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),s.push.apply(s,o)}return s}function de(e){for(var n=1;n<arguments.length;n++){var s=arguments[n]!=null?arguments[n]:{};n%2?Me(Object(s),!0).forEach(function(o){_t(e,o,s[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):Me(Object(s)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(s,o))})}return e}function _t(e,n,s){return n=It(n),n in e?Object.defineProperty(e,n,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[n]=s,e}function It(e){var n=wt(e,"string");return typeof n=="symbol"?n:n+""}function wt(e,n){if(typeof e!="object"||!e)return e;var s=e[Symbol.toPrimitive];if(s!==void 0){var o=s.call(e,n);if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}function Ae(e){return e&&e.map((n,s)=>d.createElement(n.tag,de({key:s},n.attr),Ae(n.child)))}function X(e){return n=>d.createElement(yt,ae({attr:de({},e.attr)},n),Ae(e.child))}function yt(e){var n=s=>{var{attr:o,size:i,title:l}=e,a=vt(e,Ct),h=i||s.size||"1em",c;return s.className&&(c=s.className),e.className&&(c=(c?c+" ":"")+e.className),d.createElement("svg",ae({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},s.attr,o,a,{className:c,style:de(de({color:e.color||s.color},s.style),e.style),height:h,width:h,xmlns:"http://www.w3.org/2000/svg"}),l&&d.createElement("title",null,l),e.children)};return Re!==void 0?d.createElement(Re.Consumer,null,s=>n(s)):n(Be)}function bt(e){return X({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M5.52.359A.5.5 0 0 1 6 0h4a.5.5 0 0 1 .474.658L8.694 6H12.5a.5.5 0 0 1 .395.807l-7 9a.5.5 0 0 1-.873-.454L6.823 9.5H3.5a.5.5 0 0 1-.48-.641zM6.374 1 4.168 8.5H7.5a.5.5 0 0 1 .478.647L6.78 13.04 11.478 7H8a.5.5 0 0 1-.474-.658L9.306 1z"},child:[]}]})(e)}function We(e){return X({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M12.146.146a.5.5 0 0 1 .708 0l3 3a.5.5 0 0 1 0 .708l-10 10a.5.5 0 0 1-.168.11l-5 2a.5.5 0 0 1-.65-.65l2-5a.5.5 0 0 1 .11-.168zM11.207 2.5 13.5 4.793 14.793 3.5 12.5 1.207zm1.586 3L10.5 3.207 4 9.707V10h.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.5h.293zm-9.761 5.175-.106.106-1.528 3.821 3.821-1.528.106-.106A.5.5 0 0 1 5 12.5V12h-.5a.5.5 0 0 1-.5-.5V11h-.5a.5.5 0 0 1-.468-.325"},child:[]}]})(e)}function ue(e){return X({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M9.5 13a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0m0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0m0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0"},child:[]}]})(e)}function fe(e){return X({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M5.5 5.5A.5.5 0 0 1 6 6v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5m2.5 0a.5.5 0 0 1 .5.5v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5m3 .5a.5.5 0 0 0-1 0v6a.5.5 0 0 0 1 0z"},child:[]},{tag:"path",attr:{d:"M14.5 3a1 1 0 0 1-1 1H13v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V4h-.5a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1H6a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1h3.5a1 1 0 0 1 1 1zM4.118 4 4 4.059V13a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1V4.059L11.882 4zM2.5 3h11V2h-11z"},child:[]}]})(e)}const Nt="_panel_19663_1",St="_panelExiting_19663_13",Lt="_menuItem_19663_37",Et="_disabled_19663_52",Tt="_menuItemIcon_19663_57",kt="_menuItemText_19663_63",Pt="_overlay_19663_69",B={panel:Nt,panelExiting:St,menuItem:Lt,disabled:Et,menuItemIcon:Tt,menuItemText:kt,overlay:Pt},Rt=e=>{const s=e.currentTarget??e.target;if(s?.getBoundingClientRect){const i=s.getBoundingClientRect();return{top:i.bottom+2,left:i.left}}const o=e;return{top:(o.clientY??0)+2,left:o.clientX??0}},re=d.forwardRef(function({model:n,popup:s=!0,onHide:o,onClick:i},l){const[a,h]=d.useState(!1),[c,r]=d.useState(!1),[p,_]=d.useState({top:0,left:0}),I=d.useRef(null),y=d.useCallback(()=>{c||r(!0)},[c]),v=d.useCallback(m=>{c&&m.animationName.includes("menuOut")&&(h(!1),r(!1),o?.())},[c,o]),x=d.useCallback(m=>{_(Rt(m)),r(!1),h(!0)},[]),g=d.useCallback(m=>{a?y():x(m)},[a,y,x]);d.useImperativeHandle(l,()=>({show:x,hide:y,toggle:g}),[x,y,g]),d.useEffect(()=>{if(!a)return;const m=u=>{u.key==="Escape"&&y()},b=u=>{const j=I.current;j&&!j.contains(u.target)&&(u.stopPropagation(),y())};return document.addEventListener("keydown",m),document.addEventListener("mousedown",b),()=>{document.removeEventListener("keydown",m),document.removeEventListener("mousedown",b)}},[a,y]);const f=(m,b)=>{b.stopPropagation(),m.command?.({originalEvent:b,item:m}),y()},N=(m,b)=>{const u=j=>f(m,j);return m.template?t.jsx(d.Fragment,{children:m.template(m,{onClick:u})},b):t.jsxs("button",{type:"button",className:`${B.menuItem} ${m.disabled&&B.disabled}`,onClick:j=>{m.disabled||u(j)},children:[m.icon&&t.jsx("span",{className:B.menuItemIcon,children:m.icon}),t.jsx("span",{className:B.menuItemText,children:m.label})]},b)};return!a||!s?null:it.createPortal(t.jsxs(t.Fragment,{children:[t.jsx("div",{className:B.overlay,"aria-hidden":!0,onClick:()=>y(),onMouseDown:m=>m.stopPropagation()}),t.jsx("div",{ref:I,className:`${B.panel} ${c?B.panelExiting:""}`,role:"menu",style:{top:p.top,left:p.left},onAnimationEnd:v,onClick:m=>{m.stopPropagation(),i?.(m)},children:n.map(N)})]}),document.body)}),ge=()=>(e,n)=>t.jsxs("button",{className:B.menuItem,onClick:s=>n.onClick(s),children:[t.jsx("span",{className:B.menuItemIcon,children:e.icon}),t.jsx("span",{className:B.menuItemText,children:e.label})]}),w={NAVY:"#3B64A0",FINISHED_GREEN:"#17a34a",ERROR_RED:"#E32012",TEAL:"#127ee3",ADD_TRIGGER_FILL:"#0C971F",ADD_TRIGGER_STROKE:"#14BC2B",SEPARATOR:"#a1bbdc",SLATE_400:"#94a3b8",ORANGE:"#ff9800"},le=e=>e?.toLowerCase()===w.FINISHED_GREEN.toLowerCase(),U=e=>le(e)?`3px dotted ${e}`:`2px solid ${e}`,xe={pending:w.NAVY,running:w.TEAL,validating:w.ORANGE,finished:w.FINISHED_GREEN,failed:w.ERROR_RED,cancelled:w.ORANGE,skipped:w.SLATE_400,invalid:w.ERROR_RED},Mt={finished:"#DFFFE3"},Ot=({width:e=16,height:n=16,color:s=w.NAVY})=>t.jsxs("svg",{width:e,height:n,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[t.jsx("rect",{x:"7.99219",y:"0.222732",width:"11",height:"11",rx:"1.5",transform:"rotate(45 7.99219 0.222732)",stroke:s}),t.jsx("path",{d:"M10.4693 5.52599L5.52513 10.4813M5.52513 5.53151L10.4749 10.4813",stroke:s,strokeLinecap:"round"})]}),Dt=({width:e=16,height:n=16,color:s=w.NAVY})=>t.jsxs("svg",{width:e,height:n,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[t.jsx("path",{d:"M11.5341 7.00002H15.4661C15.5136 7.00004 15.5601 7.01359 15.6002 7.03909C15.6403 7.06459 15.6722 7.10098 15.6924 7.144C15.7125 7.18702 15.72 7.23489 15.7139 7.282C15.7079 7.32912 15.6885 7.37352 15.6581 7.41002L13.6921 9.77002C13.6686 9.79816 13.6393 9.82079 13.6061 9.83633C13.5729 9.85186 13.5367 9.85991 13.5001 9.85991C13.4635 9.85991 13.4273 9.85186 13.3941 9.83633C13.3609 9.82079 13.3315 9.79816 13.3081 9.77002L11.3421 7.41002C11.3117 7.37352 11.2923 7.32912 11.2862 7.282C11.2802 7.23489 11.2876 7.18702 11.3078 7.144C11.3279 7.10098 11.3599 7.06459 11.4 7.03909C11.4401 7.01359 11.4866 7.00004 11.5341 7.00002ZM0.534086 9.00002H4.46609C4.51359 9.00001 4.56011 8.98645 4.60019 8.96096C4.64027 8.93546 4.67225 8.89907 4.6924 8.85605C4.71254 8.81303 4.72002 8.76516 4.71394 8.71804C4.70786 8.67093 4.68849 8.62652 4.65809 8.59002L2.69209 6.23002C2.66862 6.20189 2.63926 6.17925 2.60609 6.16372C2.57291 6.14819 2.53672 6.14014 2.50009 6.14014C2.46345 6.14014 2.42726 6.14819 2.39409 6.16372C2.36091 6.17925 2.33155 6.20189 2.30809 6.23002L0.342086 8.59002C0.311684 8.62652 0.29231 8.67093 0.286234 8.71804C0.280157 8.76516 0.287629 8.81303 0.307775 8.85605C0.327921 8.89907 0.359907 8.93546 0.399987 8.96096C0.440067 8.98645 0.486583 9.00001 0.534086 9.00002Z",fill:s}),t.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.00001 3.00023C6.44801 3.00023 5.06001 3.70723 4.14301 4.81823C4.10206 4.87131 4.05086 4.9156 3.99245 4.94849C3.93404 4.98138 3.86961 5.00219 3.803 5.00968C3.73638 5.01717 3.66895 5.01119 3.60469 4.99209C3.54043 4.97299 3.48068 4.94117 3.42897 4.89851C3.37726 4.85586 3.33465 4.80324 3.30368 4.74379C3.27272 4.68434 3.25402 4.61926 3.24871 4.55244C3.24339 4.48562 3.25157 4.41841 3.27275 4.35481C3.29394 4.29121 3.32769 4.23252 3.37201 4.18223C4.1042 3.29576 5.0756 2.63824 6.17067 2.28789C7.26575 1.93753 8.43841 1.90908 9.54918 2.20592C10.66 2.50276 11.6621 3.1124 12.4364 3.96232C13.2107 4.81224 13.7246 5.86668 13.917 7.00023H12.9C12.6691 5.87104 12.0554 4.85623 11.1625 4.12738C10.2697 3.39853 9.15256 3.00037 8.00001 3.00023ZM3.10001 9.00023C3.28932 9.92486 3.73636 10.7771 4.38949 11.4584C5.04261 12.1397 5.87517 12.6223 6.79097 12.8505C7.70677 13.0787 8.66845 13.0431 9.5649 12.7479C10.4613 12.4527 11.256 11.9099 11.857 11.1822C11.898 11.1292 11.9492 11.0849 12.0076 11.052C12.066 11.0191 12.1304 10.9983 12.197 10.9908C12.2636 10.9833 12.3311 10.9893 12.3953 11.0084C12.4596 11.0275 12.5193 11.0593 12.5711 11.102C12.6228 11.1446 12.6654 11.1972 12.6963 11.2567C12.7273 11.3161 12.746 11.3812 12.7513 11.448C12.7566 11.5148 12.7484 11.5821 12.7273 11.6457C12.7061 11.7093 12.6723 11.7679 12.628 11.8182C11.8958 12.7047 10.9244 13.3622 9.82934 13.7126C8.73427 14.0629 7.56161 14.0914 6.45083 13.7945C5.34006 13.4977 4.33791 12.8881 3.5636 12.0381C2.78928 11.1882 2.27538 10.1338 2.08301 9.00023H3.10001Z",fill:s})]}),ve=({width:e=16,height:n=16,color:s=w.NAVY})=>t.jsxs("svg",{width:e,height:n,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[t.jsx("path",{d:"M8 15C6.14348 15 4.36301 14.2625 3.05025 12.9497C1.7375 11.637 1 9.85652 1 8C1 6.14348 1.7375 4.36301 3.05025 3.05025C4.36301 1.7375 6.14348 1 8 1C9.85652 1 11.637 1.7375 12.9497 3.05025C14.2625 4.36301 15 6.14348 15 8C15 9.85652 14.2625 11.637 12.9497 12.9497C11.637 14.2625 9.85652 15 8 15ZM8 16C10.1217 16 12.1566 15.1571 13.6569 13.6569C15.1571 12.1566 16 10.1217 16 8C16 5.87827 15.1571 3.84344 13.6569 2.34315C12.1566 0.842855 10.1217 0 8 0C5.87827 0 3.84344 0.842855 2.34315 2.34315C0.842855 3.84344 0 5.87827 0 8C0 10.1217 0.842855 12.1566 2.34315 13.6569C3.84344 15.1571 5.87827 16 8 16Z",fill:s}),t.jsx("path",{d:"M7 11.5C7 11.3674 7.05268 11.2402 7.14645 11.1464C7.24021 11.0527 7.36739 11 7.5 11H8.5C8.63261 11 8.75979 11.0527 8.85355 11.1464C8.94732 11.2402 9 11.3674 9 11.5C9 11.6326 8.94732 11.7598 8.85355 11.8536C8.75979 11.9473 8.63261 12 8.5 12H7.5C7.36739 12 7.24021 11.9473 7.14645 11.8536C7.05268 11.7598 7 11.6326 7 11.5ZM5 8.5C5 8.36739 5.05268 8.24021 5.14645 8.14645C5.24021 8.05268 5.36739 8 5.5 8H10.5C10.6326 8 10.7598 8.05268 10.8536 8.14645C10.9473 8.24021 11 8.36739 11 8.5C11 8.63261 10.9473 8.75979 10.8536 8.85355C10.7598 8.94732 10.6326 9 10.5 9H5.5C5.36739 9 5.24021 8.94732 5.14645 8.85355C5.05268 8.75979 5 8.63261 5 8.5ZM3 5.5C3 5.36739 3.05268 5.24021 3.14645 5.14645C3.24021 5.05268 3.36739 5 3.5 5H12.5C12.6326 5 12.7598 5.05268 12.8536 5.14645C12.9473 5.24021 13 5.36739 13 5.5C13 5.63261 12.9473 5.75979 12.8536 5.85355C12.7598 5.94732 12.6326 6 12.5 6H3.5C3.36739 6 3.24021 5.94732 3.14645 5.85355C3.05268 5.75979 3 5.63261 3 5.5Z",fill:s})]}),He=d.createContext(void 0),$t=({children:e})=>{const[n,s]=d.useState([]),o=d.useCallback((a,h)=>{s(c=>(c.forEach(r=>{r.current&&r!==a&&r.current.hide(h)}),[])),a.current?.toggle(h),s([a])},[]),i=d.useCallback(a=>{s(h=>h.filter(c=>c!==a))},[]),l=d.useMemo(()=>({openMenus:n,openMenu:o,closeMenu:i}),[n,o,i]);return t.jsx(He.Provider,{value:l,children:e})},me=()=>{const e=d.useContext(He);if(e===void 0)throw new Error("useMenuProvider must be used within a MenuProvider");return e},Ft=({color:e=w.ERROR_RED})=>t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[t.jsx("g",{clipPath:"url(#clip0_3105_5367)",children:t.jsx("path",{d:"M16 8C16 10.1217 15.1571 12.1566 13.6569 13.6569C12.1566 15.1571 10.1217 16 8 16C5.87827 16 3.84344 15.1571 2.34315 13.6569C0.842855 12.1566 0 10.1217 0 8C0 5.87827 0.842855 3.84344 2.34315 2.34315C3.84344 0.842855 5.87827 0 8 0C10.1217 0 12.1566 0.842855 13.6569 2.34315C15.1571 3.84344 16 5.87827 16 8ZM8 4C7.87361 4.00007 7.74863 4.02662 7.63312 4.07793C7.51761 4.12924 7.41413 4.20418 7.32934 4.29791C7.24456 4.39165 7.18035 4.5021 7.14084 4.62217C7.10134 4.74223 7.08743 4.86923 7.1 4.995L7.45 8.502C7.46176 8.63977 7.5248 8.76811 7.62664 8.86164C7.72849 8.95516 7.86173 9.00705 8 9.00705C8.13827 9.00705 8.27151 8.95516 8.37336 8.86164C8.4752 8.76811 8.53824 8.63977 8.55 8.502L8.9 4.995C8.91257 4.86923 8.89866 4.74223 8.85915 4.62217C8.81965 4.5021 8.75544 4.39165 8.67066 4.29791C8.58587 4.20418 8.48239 4.12924 8.36688 4.07793C8.25137 4.02662 8.12639 4.00007 8 4ZM8.002 10C7.73678 10 7.48243 10.1054 7.29489 10.2929C7.10736 10.4804 7.002 10.7348 7.002 11C7.002 11.2652 7.10736 11.5196 7.29489 11.7071C7.48243 11.8946 7.73678 12 8.002 12C8.26722 12 8.52157 11.8946 8.70911 11.7071C8.89664 11.5196 9.002 11.2652 9.002 11C9.002 10.7348 8.89664 10.4804 8.70911 10.2929C8.52157 10.1054 8.26722 10 8.002 10Z",fill:e})}),t.jsx("defs",{children:t.jsx("clipPath",{id:"clip0_3105_5367",children:t.jsx("rect",{width:"16",height:"16",fill:"white"})})})]});function Bt(e){return X({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"},child:[]},{tag:"polyline",attr:{points:"15 3 21 3 21 9"},child:[]},{tag:"line",attr:{x1:"10",y1:"14",x2:"21",y2:"3"},child:[]}]})(e)}function At(e){return X({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"4"},child:[]},{tag:"line",attr:{x1:"1.05",y1:"12",x2:"7",y2:"12"},child:[]},{tag:"line",attr:{x1:"17.01",y1:"12",x2:"22.96",y2:"12"},child:[]}]})(e)}function Wt(e){return X({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polygon",attr:{points:"13 2 3 14 12 14 11 22 21 10 12 10 13 2"},child:[]}]})(e)}const ee=e=>{const{isSet:n,isSelected:s,isFilter:o,debuggerMode:i=!1,status:l,className:a,title:h,icon:c,contextMenuItems:r=void 0,onDeleteStep:p,onUpdateFilter:_,onSelectStep:I,onCheckScenario:y,subtitle:v,isInvalid:x,localId:g}=e,f=d.useRef(null),{openMenu:N,closeMenu:m}=me(),b=ge(),[u]=d.useState(!0),j=d.useMemo(()=>{const C=[];return i||C.push({label:"Add Step Filter",icon:t.jsx("div",{className:"mr-2 flex items-center justify-center",children:t.jsx(ve,{})}),command:T=>{T?.originalEvent?.stopPropagation(),_&&_(g)},template:b}),p&&!i&&C.push({label:"Remove",icon:t.jsx(fe,{color:w.NAVY,size:18}),command:T=>{T?.originalEvent?.stopPropagation(),p(g)},template:b}),u&&C.push({label:"Check Scenario",icon:t.jsx("div",{className:"mr-2 flex items-center justify-center",children:t.jsx(Bt,{color:w.NAVY,size:18})}),command:T=>{T?.originalEvent?.stopPropagation(),y(g)},template:b}),C},[_,p,g,b,u,y,i]),L=d.useMemo(()=>r??j,[r,j]),E=C=>{C.stopPropagation(),N(f,C)},P=d.useMemo(()=>{if(!(!i||l==null||l==="pending"))return{"--step-debugger-accent":xe[l]}},[i,l]),$=d.useMemo(()=>s&&x?k.step+" "+k.selectedInvalid:i&&l!=null&&l!=="pending"?k.step+" "+k.debuggerStatus:s?k.step+" "+k.selected:n?k.step+" "+k.isSet:x?k.step+" "+k.invalid:k.step,[n,s,x,l,i]),R=d.useMemo(()=>x?t.jsx(Ft,{color:w.ERROR_RED}):c,[c,x]);return t.jsx("div",{className:k.container+" "+a,"data-local-id":void 0,children:t.jsxs("div",{children:[t.jsxs("div",{className:$,style:P,onClick:()=>I(g),children:[t.jsxs("div",{className:k.content,children:[t.jsx("div",{className:`${k.icon} ${x&&k.invalid}`,children:R}),t.jsx("div",{className:k.title,children:h})]}),L.length>0&&t.jsxs(t.Fragment,{children:[t.jsx("button",{className:k.dotsButton,onClick:E,"aria-haspopup":!0,"aria-label":"Step options",children:t.jsx(ue,{className:k.dots,size:16})}),t.jsx(re,{model:L,popup:!0,ref:f,onClick:C=>C.stopPropagation(),onHide:()=>m(f)})]})]}),o&&t.jsxs("div",{className:k.filterFlag,role:"button",tabIndex:0,onClick:()=>{_&&_(g)},onKeyDown:C=>{(C.key==="Enter"||C.key===" ")&&_&&(C.preventDefault(),_(g))},children:[t.jsx(ve,{color:w.NAVY}),t.jsx("span",{children:"Filter"}),!i&&t.jsx(ue,{className:k.dots,color:x?w.ERROR_RED:w.NAVY,style:{height:"10px"}})]}),v&&t.jsx("div",{className:k.subtitle,children:v})]})})},Ht=()=>t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:[t.jsxs("g",{clipPath:"url(#clip0_6551_9169)",children:[t.jsx("rect",{width:"24",height:"24",rx:"12",fill:w.ADD_TRIGGER_FILL}),t.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11 6C11 5.44772 11.4477 5 12 5C12.5523 5 13 5.44772 13 6V11H18C18.5523 11 19 11.4477 19 12C19 12.5523 18.5523 13 18 13H13V18C13 18.5523 12.5523 19 12 19C11.4477 19 11 18.5523 11 18V13H6C5.44772 13 5 12.5523 5 12C5 11.4477 5.44772 11 6 11H11V6Z",fill:"white"})]}),t.jsx("rect",{x:"0.75",y:"0.75",width:"22.5",height:"22.5",rx:"11.25",stroke:w.ADD_TRIGGER_STROKE,strokeWidth:"1.5"}),t.jsx("defs",{children:t.jsx("clipPath",{id:"clip0_6551_9169",children:t.jsx("rect",{width:"24",height:"24",rx:"12",fill:"white"})})})]}),Vt="_multipleTriggersIcon_oxhdi_1",zt={multipleTriggersIcon:Vt},Yt=({color:e})=>t.jsx("div",{className:zt.multipleTriggersIcon,style:e!=null?{backgroundColor:e,color:e}:void 0,children:t.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:t.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1.5 3.75C1.5 3.15326 1.73705 2.58097 2.15901 2.15901C2.58097 1.73705 3.15326 1.5 3.75 1.5H5.25C5.84674 1.5 6.41903 1.73705 6.84099 2.15901C7.26295 2.58097 7.5 3.15326 7.5 3.75L13.701 3.75C13.8661 3.46404 14.1209 3.24054 14.426 3.11418C14.7311 2.98782 15.0693 2.96565 15.3883 3.05111C15.7072 3.13657 15.9891 3.32489 16.1901 3.58686C16.3911 3.84882 16.5 4.1698 16.5 4.5C16.5 4.8302 16.3911 5.15118 16.1901 5.41314C15.9891 5.67511 15.7072 5.86343 15.3883 5.94889C15.0693 6.03435 14.7311 6.01218 14.426 5.88582C14.1209 5.75946 13.8661 5.53596 13.701 5.25H10.686C10.956 5.52 11.196 5.8215 11.412 6.1575C12.369 7.6455 12.75 9.6885 12.75 12C12.75 14.9895 13.1355 16.638 13.8195 17.55C14.3535 18.264 15.162 18.6315 16.5 18.726C16.5063 18.1334 16.7462 17.5673 17.1674 17.1505C17.5887 16.7337 18.1574 16.5 18.75 16.5H20.25C20.8467 16.5 21.419 16.7371 21.841 17.159C22.2629 17.581 22.5 18.1533 22.5 18.75V20.25C22.5 20.8467 22.2629 21.419 21.841 21.841C21.419 22.2629 20.8467 22.5 20.25 22.5H18.75C18.1533 22.5 17.581 22.2629 17.159 21.841C16.7371 21.419 16.5 20.8467 16.5 20.25H10.299C10.1339 20.536 9.87905 20.7595 9.57399 20.8858C9.26892 21.0122 8.93068 21.0344 8.61173 20.9489C8.29278 20.8634 8.01095 20.6751 7.80993 20.4131C7.60892 20.1512 7.49996 19.8302 7.49996 19.5C7.49996 19.1698 7.60892 18.8488 7.80993 18.5869C8.01095 18.3249 8.29278 18.1366 8.61173 18.0511C8.93068 17.9656 9.26892 17.9878 9.57399 18.1142C9.87905 18.2405 10.1339 18.464 10.299 18.75H12.8655C12.7785 18.6538 12.6959 18.5537 12.618 18.45C11.6145 17.1105 11.25 15.0105 11.25 12C11.25 9.81 10.881 8.1045 10.1505 6.9675C9.5655 6.06 8.7225 5.4675 7.5 5.2995C7.48706 5.88762 7.2443 6.44728 6.82374 6.85859C6.40318 7.2699 5.83826 7.50014 5.25 7.5H3.75C3.15326 7.5 2.58097 7.26295 2.15901 6.84099C1.73705 6.41903 1.5 5.84674 1.5 5.25V3.75ZM3.75 3C3.55109 3 3.36032 3.07902 3.21967 3.21967C3.07902 3.36032 3 3.55109 3 3.75V5.25C3 5.44891 3.07902 5.63968 3.21967 5.78033C3.36032 5.92098 3.55109 6 3.75 6H5.25C5.44891 6 5.63968 5.92098 5.78033 5.78033C5.92098 5.63968 6 5.44891 6 5.25V3.75C6 3.55109 5.92098 3.36032 5.78033 3.21967C5.63968 3.07902 5.44891 3 5.25 3H3.75ZM18.75 18C18.5511 18 18.3603 18.079 18.2197 18.2197C18.079 18.3603 18 18.5511 18 18.75V20.25C18 20.4489 18.079 20.6397 18.2197 20.7803C18.3603 20.921 18.5511 21 18.75 21H20.25C20.4489 21 20.6397 20.921 20.7803 20.7803C20.921 20.6397 21 20.4489 21 20.25V18.75C21 18.5511 20.921 18.3603 20.7803 18.2197C20.6397 18.079 20.4489 18 20.25 18H18.75Z",fill:"white"})})}),Gt="_trigger_kfg1y_1",Zt="_title_kfg1y_7",Ut="_empty_kfg1y_15",Xt="_triggerContainer_kfg1y_21",qt="_stepsContainer_kfg1y_25",Kt="_stepItem_kfg1y_51",Jt="_curvesSvg_kfg1y_70",Qt="_centralNode_kfg1y_78",en="_iconWrapper_kfg1y_104",tn="_fadeIn_kfg1y_127",nn="_fadeOut_kfg1y_130",sn="_operationContainer_kfg1y_134",O={trigger:Gt,title:Zt,empty:Ut,triggerContainer:Xt,stepsContainer:qt,stepItem:Kt,curvesSvg:Jt,centralNode:Qt,iconWrapper:en,fadeIn:tn,fadeOut:nn,operationContainer:sn},on=()=>t.jsx("div",{style:{height:"1px",marginLeft:"4px",marginRight:"4px",borderTop:`1px solid ${w.SEPARATOR}`}}),rn=["failed","invalid","cancelled","validating","running","finished","skipped","pending"],Ve=e=>{const n=[...new Set(e.filter(s=>s!=null))];if(n.length!==0){for(const s of rn)if(n.includes(s))return s;return n[0]}},ze=(e,n)=>!n||e==null?w.NAVY:xe[e],ln=(e,n,s=w.NAVY)=>e==null?s:n?.[e]??xe[e],cn=(e,n=w.NAVY)=>({statusLine:s=>ln(s,e,n)}),oe=e=>{if("status"in e&&e.status!=null)return e.status;const n=e.steps;if(n?.[0]?.status!=null)return n[0].status},an=80,ce=34,we=({steps:e,title:n,className:s,onDeleteTrigger:o,onAddTrigger:i,onSelectStep:l,onUpdateFilter:a,onCenterYUpdate:h,debuggerMode:c=!1,resolveCurveStrokeColor:r,isEditable:p=!1,nextStepStatus:_})=>{const I=d.useRef(null),y=d.useRef([]),[v,x]=d.useState([]),[g,f]=d.useState({width:0,height:0}),[N,m]=d.useState(!1),[b,u]=d.useState(!1),j=d.useRef(null);d.useEffect(()=>{const C=()=>{if(!I.current)return;const T=[];if(y.current.forEach((M,W)=>{if(M&&I.current){const H=I.current.getBoundingClientRect(),D=M.getBoundingClientRect();T.push({localId:e[W]?.localId??`step-${W}`,top:D.top-H.top,right:D.right-H.left,centerY:D.top-H.top+D.height/2})}}),x(T),I.current&&T.length>0){const M=I.current.getBoundingClientRect(),W=Math.min(...T.map(V=>V.top)),H=y.current.filter(Boolean).map(V=>V?.offsetHeight||68),D=Math.max(...T.map((V,ot)=>V.top+(H[ot]||68))),q=Math.max(...T.map(V=>V.right))+0,ne=Math.max(M.height,D-W+100);f({width:q,height:ne})}};return C(),window.addEventListener("resize",C),()=>window.removeEventListener("resize",C)},[e]),d.useEffect(()=>{let C=!0;if(N){j.current&&(clearTimeout(j.current),j.current=null);const T=setTimeout(()=>{C&&u(!0)},0);return()=>{C=!1,clearTimeout(T)}}return j.current=setTimeout(()=>{C&&u(!1)},140),()=>{C=!1,j.current&&(clearTimeout(j.current),j.current=null)}},[N]);const L=v.length>0?an:0,E=d.useMemo(()=>v.length>1?v.reduce((C,T)=>C+T.top+ce,0)/v.length:v.length===1?v[0].top+ce:0,[v]);d.useEffect(()=>{h?.(E)},[E,h]);const P=c&&e.some(C=>C.status==="finished")&&_==="finished",$=ge();if(e.length===0)return t.jsxs("div",{className:`${O.trigger} ${s||""}`,children:[n&&t.jsx("h3",{className:O.title,children:n}),t.jsx("div",{className:O.empty,children:"No steps"})]});const R=(C,T,M,W)=>{const H=M-C,D=Math.min(H*.6,60),te=C+D,q=T,ne=M-D;return`M ${C} ${T} C ${te} ${q}, ${ne} ${W}, ${M} ${W}`};return t.jsxs("div",{className:`${O.trigger} ${s||""}`,ref:I,children:[n&&t.jsx("h3",{className:O.title,children:n}),t.jsxs("div",{className:O.triggerContainer,children:[t.jsx("div",{className:O.stepsContainer,children:e.map((C,T)=>t.jsx("div",{ref:M=>{y.current[T]=M},children:t.jsx(ee,{title:C.title,className:O.stepItem,localId:C.localId,idx:T,isSet:C.isSet,isSelected:C.isSelected,isInvalid:C.isInvalid,isFilter:C.isFilter,status:C.status,debuggerMode:c,icon:C.icon,onSelectStep:l,onUpdateFilter:a,onCheckScenario:()=>{throw new Error("Check scenario not handled in Trigger")},contextMenuItems:p?[{label:"Add Step Filter",icon:t.jsx("div",{className:"mr-2 flex items-center justify-center",children:t.jsx(ve,{})}),command:M=>{M?.originalEvent?.stopPropagation(),a&&a(C.localId)},template:$},{label:"Delete",icon:t.jsx(fe,{className:"mr-2",color:w.NAVY,size:18}),command:()=>{o?.(C.localId)},disabled:e.length===1},{label:"",template:()=>t.jsx(on,{})},{label:"Add More Triggers",icon:t.jsx(bt,{className:"mr-2",color:w.NAVY,size:18}),command:()=>{i?.()}}]:[]})},C.localId))}),t.jsx("div",{style:{position:"relative"},children:v.length>1&&t.jsx("svg",{className:O.curvesSvg,width:g.width,height:g.height,children:v.map(C=>{const M=v.length===1?v[0].top+ce:C.top+ce,W=L,H=E,D=e.find(ne=>ne.localId===C.localId)?.status,te=r!=null?r(D):ze(D,c),q=le(te);return t.jsx("path",{d:R(0,M,W,H),stroke:te,strokeWidth:q?3:2,fill:"none",strokeLinecap:"round",strokeDasharray:q?"0 6":void 0},C.localId)})})}),v.length>1?t.jsxs("div",{style:{position:"relative",marginRight:"140px"},children:[t.jsx("div",{className:O.centralNode,style:{"--node-x":`${L}px`,"--node-y":`${E}px`,...c&&{cursor:"default",pointerEvents:"none"},...P&&{backgroundColor:w.FINISHED_GREEN}},...!c&&{onMouseEnter:()=>m(!0),onMouseLeave:()=>m(!1)},children:!c&&b?t.jsx("div",{className:`${O.iconWrapper} ${N?O.fadeIn:O.fadeOut}`,onClick:i,children:t.jsx(Ht,{})}):null}),t.jsx("div",{className:O.operationContainer,style:{"--op-x":`${L+16}px`,"--op-y":`${E}px`},children:t.jsx(Yt,{color:P?w.FINISHED_GREEN:void 0})})]}):null]})]})},dn=()=>t.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[t.jsx("path",{d:"M6 12L18 12",stroke:w.NAVY,strokeWidth:"2",strokeLinecap:"round"}),t.jsx("path",{d:"M12 6V18",stroke:w.NAVY,strokeWidth:"2",strokeLinecap:"round"})]}),un="_stepLinkIcon_b0452_1",pn="_stepLinkLine_b0452_15",hn="_stepLinkContainer_b0452_39",fn="_readOnly_b0452_61",gn="_debuggerIconCollapsed_b0452_66",xn="_dashedLine_b0452_75",F={stepLinkIcon:un,stepLinkLine:pn,stepLinkContainer:hn,readOnly:fn,debuggerIconCollapsed:gn,dashedLine:xn},K=({onAddStep:e,onAddTrigger:n,onAddCondition:s,onAddLoop:o,lineColor:i=w.NAVY,stepId:l,index:a=0,style:h,pathId:c})=>{const r=ge(),p=d.useRef(null),_=[{label:"Trigger",icon:t.jsx(Wt,{color:w.NAVY,size:18}),command:()=>{n?.(l,c,"trigger",a>0?"append":"prepend")},template:r},{label:"Step",icon:t.jsx(At,{color:w.NAVY,size:18}),command:()=>e?.(l,c,a>0?"append":"prepend"),template:r},{label:"Condition",icon:t.jsx(Ot,{width:18,height:18}),command:()=>s?.(l,c,a>0?"append":"prepend"),template:r},{label:"Loop",icon:t.jsx(Dt,{width:18,height:18}),command:()=>o?.(l,c,a>0?"append":"prepend"),template:r}],I=y=>{p.current?.show(y)};return t.jsxs("div",{className:F.stepLinkContainer,style:{...h,"--step-link-color":i},"data-plus-index":a,children:[t.jsx("div",{className:F.stepLinkLine}),t.jsx("div",{className:F.stepLinkIcon,onClick:I,"aria-haspopup":!0,children:t.jsx(dn,{})}),t.jsx(re,{model:_,popup:!0,ref:p}),t.jsx("div",{className:F.stepLinkLine})]})},mn="_steps_yug55_1",Cn="_stepContainer_yug55_8",vn="_stepContainerWithPaths_yug55_14",Q={steps:mn,stepContainer:Cn,stepContainerWithPaths:vn},jn=(e,n,s,o)=>{const i=s-e,l=Math.min(i*.66,66),a=e+l,h=n,c=s-l;return`M ${e} ${n} C ${a} ${h}, ${c} ${o}, ${s} ${o}`},je=({width:e,height:n,strokeColor:s=w.NAVY,fromLocalId:o,toLocalId:i})=>{const l=le(s),p=jn(0,1,e,n);return t.jsx("div",{style:{position:"absolute"},"data-connector-from":void 0,"data-connector-to":void 0,children:t.jsx("svg",{width:e,height:n+1,viewBox:`0 0 ${e} ${n+1}`,xmlns:"http://www.w3.org/2000/svg",children:t.jsx("path",{d:p,stroke:s,strokeWidth:l?3:2,fill:"none",strokeLinecap:"round",strokeDasharray:l?"0 6":void 0,"data-connector-from":void 0,"data-connector-to":void 0})})})},_n="_column_1uiy3_1",In="_row_1uiy3_19",wn="_stepsContainer_1uiy3_24",A={column:_n,row:In,stepsContainer:wn},yn="_wrapper_1nl2d_1",bn="_tooltip_1nl2d_5",Oe={wrapper:yn,tooltip:bn},Nn=({content:e,children:n,maxWidth:s=500,className:o})=>t.jsxs("div",{className:`${Oe.wrapper} ${o??""}`.trim(),style:{"--tooltip-max-width":`${s}px`},children:[n,e?t.jsx("div",{className:Oe.tooltip,role:"tooltip",children:e}):null]}),Sn="_conditionContainer_19jfz_1",Ln="_debuggerTint_19jfz_5",En="_connectorLine_19jfz_5",Tn="_connectorDot_19jfz_8",kn="_condition_19jfz_1",Pn="_conditionWrapper_19jfz_15",Rn="_conditionFits_19jfz_67",z={conditionContainer:Sn,debuggerTint:Ln,connectorLine:En,connectorDot:Tn,condition:kn,conditionWrapper:Pn,conditionFits:Rn},Ce=({expression:e,style:n,status:s,debuggerMode:o=!1})=>{const i=d.useRef(null),l=d.useRef(null),[a,h]=d.useState(!1);d.useLayoutEffect(()=>{const v=i.current,x=l.current;if(!v||!x)return;const{paddingLeft:g,paddingRight:f}=getComputedStyle(v),N=Number.parseFloat(g)+Number.parseFloat(f);h(x.offsetWidth>=v.clientWidth-N)},[e]);const c=e&&a?e:"",r=o&&s==="finished",p=r,_=d.useMemo(()=>{if(r)return{"--condition-accent":xe.finished,"--condition-bg":Mt.finished,"--condition-line-width":"3px","--condition-line-style":"dotted"}},[r]),I=`${z.condition} ${a?"":z.conditionFits}`.trim(),y=`${z.conditionContainer} ${p?z.debuggerTint:""}`.trim();return t.jsxs("div",{className:y,style:{...n,..._},children:[t.jsx("div",{className:z.connectorLine}),t.jsx(Nn,{content:c,className:z.conditionWrapper,children:t.jsx("div",{ref:i,className:I,children:t.jsx("span",{ref:l,children:e})})}),t.jsx("div",{className:z.connectorLine}),t.jsx("div",{className:z.connectorDot})]})},Mn="data:image/svg+xml,%3csvg%20width='44'%20height='44'%20viewBox='0%200%2044%2044'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20x='21.8125'%20y='-2.52539'%20width='34.4207'%20height='34.4207'%20rx='6.09524'%20transform='rotate(45%2021.8125%20-2.52539)'%20fill='%236B90C0'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M31.3947%2013.0355C31.4679%2013.1085%2031.526%2013.1952%2031.5656%2013.2907C31.6052%2013.3861%2031.6256%2013.4885%2031.6256%2013.5918C31.6256%2013.6952%2031.6052%2013.7975%2031.5656%2013.8929C31.526%2013.9884%2031.4679%2014.0751%2031.3947%2014.1481L14.109%2031.4338C13.9615%2031.5813%2013.7614%2031.6642%2013.5527%2031.6642C13.3441%2031.6642%2013.144%2031.5813%2012.9965%2031.4338C12.8489%2031.2863%2012.766%2031.0862%2012.766%2030.8775C12.766%2030.6689%2012.8489%2030.4688%2012.9965%2030.3212L30.2822%2013.0355C30.3552%2012.9623%2030.4419%2012.9043%2030.5373%2012.8647C30.6328%2012.8251%2030.7351%2012.8047%2030.8385%2012.8047C30.9418%2012.8047%2031.0441%2012.8251%2031.1396%2012.8647C31.2351%2012.9043%2031.3218%2012.9623%2031.3947%2013.0355Z'%20fill='white'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M12.9965%2013.0355C12.9233%2013.1085%2012.8652%2013.1952%2012.8256%2013.2907C12.786%2013.3861%2012.7656%2013.4885%2012.7656%2013.5918C12.7656%2013.6952%2012.786%2013.7975%2012.8256%2013.8929C12.8652%2013.9884%2012.9233%2014.0751%2012.9965%2014.1481L30.2822%2031.4338C30.4297%2031.5813%2030.6298%2031.6642%2030.8385%2031.6642C31.0471%2031.6642%2031.2472%2031.5813%2031.3947%2031.4338C31.5423%2031.2863%2031.6252%2031.0862%2031.6252%2030.8775C31.6252%2030.6689%2031.5423%2030.4688%2031.3947%2030.3212L14.109%2013.0355C14.036%2012.9623%2013.9493%2012.9043%2013.8539%2012.8647C13.7584%2012.8251%2013.6561%2012.8047%2013.5527%2012.8047C13.4494%2012.8047%2013.3471%2012.8251%2013.2516%2012.8647C13.1561%2012.9043%2013.0694%2012.9623%2012.9965%2013.0355Z'%20fill='white'/%3e%3c/svg%3e",On="data:image/svg+xml,%3csvg%20width='28'%20height='28'%20viewBox='0%200%2028%2028'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20x='1'%20y='1'%20width='26'%20height='26'%20rx='13'%20fill='white'/%3e%3crect%20x='1'%20y='1'%20width='26'%20height='26'%20rx='13'%20stroke='%236B90C0'%20stroke-width='2'/%3e%3ccircle%20cx='14'%20cy='14'%20r='6'%20fill='%236B90C0'/%3e%3c/svg%3e",Dn="data:image/svg+xml,%3csvg%20width='44'%20height='44'%20viewBox='0%200%2044%2044'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20x='21.8125'%20y='-2.52539'%20width='34.4207'%20height='34.4207'%20rx='6.09524'%20transform='rotate(45%2021.8125%20-2.52539)'%20fill='%2317A34A'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M31.3947%2013.0355C31.4679%2013.1085%2031.526%2013.1952%2031.5656%2013.2907C31.6052%2013.3861%2031.6256%2013.4885%2031.6256%2013.5918C31.6256%2013.6952%2031.6052%2013.7975%2031.5656%2013.8929C31.526%2013.9884%2031.4679%2014.0751%2031.3947%2014.1481L14.109%2031.4338C13.9615%2031.5813%2013.7614%2031.6642%2013.5527%2031.6642C13.3441%2031.6642%2013.144%2031.5813%2012.9965%2031.4338C12.8489%2031.2863%2012.766%2031.0862%2012.766%2030.8775C12.766%2030.6689%2012.8489%2030.4688%2012.9965%2030.3212L30.2822%2013.0355C30.3552%2012.9623%2030.4419%2012.9043%2030.5373%2012.8647C30.6328%2012.8251%2030.7351%2012.8047%2030.8385%2012.8047C30.9418%2012.8047%2031.0441%2012.8251%2031.1396%2012.8647C31.2351%2012.9043%2031.3218%2012.9623%2031.3947%2013.0355Z'%20fill='white'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M12.9965%2013.0355C12.9233%2013.1085%2012.8652%2013.1952%2012.8256%2013.2907C12.786%2013.3861%2012.7656%2013.4885%2012.7656%2013.5918C12.7656%2013.6952%2012.786%2013.7975%2012.8256%2013.8929C12.8652%2013.9884%2012.9233%2014.0751%2012.9965%2014.1481L30.2822%2031.4338C30.4297%2031.5813%2030.6298%2031.6642%2030.8385%2031.6642C31.0471%2031.6642%2031.2472%2031.5813%2031.3947%2031.4338C31.5423%2031.2863%2031.6252%2031.0862%2031.6252%2030.8775C31.6252%2030.6689%2031.5423%2030.4688%2031.3947%2030.3212L14.109%2013.0355C14.036%2012.9623%2013.9493%2012.9043%2013.8539%2012.8647C13.7584%2012.8251%2013.6561%2012.8047%2013.5527%2012.8047C13.4494%2012.8047%2013.3471%2012.8251%2013.2516%2012.8647C13.1561%2012.9043%2013.0694%2012.9623%2012.9965%2013.0355Z'%20fill='white'/%3e%3c/svg%3e",$n="data:image/svg+xml,%3csvg%20width='28'%20height='28'%20viewBox='0%200%2028%2028'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20x='1'%20y='1'%20width='26'%20height='26'%20rx='13'%20fill='white'/%3e%3crect%20x='1'%20y='1'%20width='26'%20height='26'%20rx='13'%20stroke='%2317A34A'%20stroke-width='2'/%3e%3ccircle%20cx='14'%20cy='14'%20r='6'%20fill='%2317A34A'/%3e%3c/svg%3e",Fn="_ifStatement_xtij3_1",Bn="_conditionIcon_xtij3_7",An="_ifStatementContainer_xtij3_21",Wn="_menuButton_xtij3_27",Hn="_menuIcon_xtij3_52",Vn="_ifdotIcon_xtij3_59",G={ifStatement:Fn,conditionIcon:Bn,ifStatementContainer:An,menuButton:Wn,menuIcon:Hn,ifdotIcon:Vn},zn=({style:e,color:n=w.NAVY})=>t.jsx("div",{style:{width:"100%",height:"2px",borderTop:U(n),...e}}),Ye=e=>{const{enabled:n=!0,onDelete:s,onSelect:o,debuggerMode:i=!1,status:l}=e,a=d.useRef(null),{openMenu:h,closeMenu:c}=me(),r=n&&!i,p=i&&l==="finished",_=p?ze("finished",!0):w.NAVY,I=p?Dn:Mn,y=p?$n:On,v=d.useMemo(()=>[{label:"Edit",icon:t.jsx(We,{color:w.NAVY,size:18}),command:()=>o?.()},{label:"Delete",icon:t.jsx(fe,{color:w.NAVY,size:18}),command:()=>s?.()}],[o,s]),x=f=>{f.stopPropagation(),h(a,f)},g=f=>{f.target.closest(`.${G.menuButton}`)||o?.()};return t.jsxs("div",{className:G.ifStatementContainer,children:[t.jsx(zn,{color:_,style:{position:"absolute",top:"22.5px",left:0,zIndex:1}}),t.jsx("div",{className:G.ifStatement,children:t.jsx("img",{src:I,alt:"condition",onClick:f=>g(f),className:G.conditionIcon})}),r&&t.jsxs(t.Fragment,{children:[t.jsx("button",{type:"button",className:G.menuButton,onClick:x,"aria-label":"Open menu","aria-haspopup":"menu",children:t.jsx(ue,{className:G.menuIcon,size:16})}),t.jsx(re,{ref:a,model:v,popup:!0,onHide:()=>c(a)})]}),t.jsx("img",{src:y,alt:"ifdot",className:G.ifdotIcon})]})},De=34.5,Yn=33,se=w.NAVY,Ge=e=>{const{items:n,pathId:s,onAddStep:o,onAddTrigger:i,onAddCondition:l,onAddLoop:a,onDeleteStep:h,onUpdateFilter:c,onSelectStep:r,onResize:p,onCheckScenario:_}=e,I=d.useRef(null),y=d.useRef([]),[v,x]=d.useState([]);d.useEffect(()=>{const f=()=>{const b=I.current;if(!b||n.length===0){x([]);return}const u=[],j=Number.parseFloat(getComputedStyle(b).zoom||"1");for(let L=0;L<n.length;L++){const E=y.current[L];if(E)if(E.offsetParent==null){const P=b.getBoundingClientRect(),$=E.getBoundingClientRect();u.push(($.top-P.top)/j+De)}else u.push(E.offsetTop-Yn+De)}u.length===n.length&&x(u)};f();const N=new ResizeObserver(f),m=I.current;return m&&N.observe(m),window.addEventListener("resize",f),()=>{N.disconnect(),window.removeEventListener("resize",f)}},[n]);const g=d.useMemo(()=>v.length!==n.length||n.length<=1?null:n.map((f,N)=>N).filter(f=>f>0).map(f=>{const N=v[f];return N===void 0?null:t.jsx(je,{width:100,height:N,strokeColor:se},f)}),[n,v]);return t.jsxs("div",{className:A.row,children:[t.jsx(Ye,{onDelete:()=>s!=null&&h?.(s),onSelect:s!=null&&r?()=>r(s):void 0}),t.jsxs("div",{ref:I,className:A.column,style:{marginTop:"33px"},children:[t.jsx("div",{style:{position:"absolute",top:0,left:0,width:"100px",height:"2px",borderTop:`2px solid ${se}`}}),g]}),t.jsx("div",{className:A.column,children:n.map((f,N)=>{let m;if(f.paths)m=t.jsx(Ge,{items:f.paths,pathId:s,onAddStep:o,onAddTrigger:i,onAddCondition:l,onAddLoop:a,onDeleteStep:h,onUpdateFilter:c,onSelectStep:r,onResize:p,onCheckScenario:_},f.localId);else if(f.steps){const b=f;m=t.jsxs("div",{className:A.stepsContainer,children:[t.jsx(Ce,{expression:b.condition,status:b.status,style:{marginTop:"25px"}}),t.jsx(ye,{steps:f.steps,pathId:f.localId,onSelectStep:r??(()=>{}),onAddStep:o??(()=>{}),onAddTrigger:i,onAddCondition:l??(()=>{}),onAddLoop:a,onDeleteStep:h,onUpdateFilter:c,onResize:p,onCheckScenario:_},f.localId)]})}else m=t.jsx(ee,{localId:f.localId,title:"title"in f?f.title:"",idx:1,icon:"icon"in f?f.icon:void 0,status:"status"in f?f.status:void 0,onSelectStep:r,onDeleteStep:h,onUpdateFilter:c,onCheckScenario:_},f.localId);return t.jsx("div",{ref:b=>{y.current[N]=b},style:{width:"100%"},children:m},f.localId)})}),t.jsxs("div",{className:A.column,style:{marginTop:"33px"},children:[t.jsx("div",{style:{position:"absolute",top:.5,left:0,flex:1,width:"100%",height:"2px",borderTop:`2px solid ${se}`}}),g]}),t.jsx(K,{onAddStep:o,onAddTrigger:i,onAddCondition:l,onAddLoop:a,lineColor:se,stepId:s,pathId:s,index:1,style:{marginTop:"34px",height:0}}),t.jsx("div",{style:{flex:1,width:"100%",height:"2px",borderTop:`2px solid ${se}`,marginTop:"34px"}})]})},_e=68,Z=w.NAVY,ye=({pathId:e,steps:n,centerY:s,className:o,onAddStep:i,onDeleteStep:l,onUpdateFilter:a,onAddTrigger:h,onAddCondition:c,onAddLoop:r,onSelectStep:p,onResize:_,onCheckScenario:I,isDescendent:y=!0})=>{const v=s===void 0?void 0:{marginTop:Math.max(0,s-_e/2)};return n.length===0?t.jsxs("div",{style:{width:"100%",marginTop:"20px",display:"flex",flexDirection:"row",flex:1,minWidth:0,...v},children:[t.jsx("div",{style:{flexGrow:1,flexShrink:0,flexBasis:"auto",minWidth:0,height:"2px",marginTop:"13.5px",borderTop:`2px solid ${Z}`}}),t.jsx(K,{onAddStep:()=>{i?.(void 0,e)},onAddTrigger:h,onAddCondition:c,onAddLoop:r,lineColor:Z,stepId:e,index:0,style:{height:"auto",marginTop:"0"}}),t.jsx("div",{style:{flexGrow:1,flexShrink:0,flexBasis:"auto",minWidth:0,height:"2px",marginTop:"13.5px",borderTop:`2px solid ${Z}`}})]}):t.jsx("div",{className:Q.steps+(o?" "+o:""),style:v,children:t.jsxs("div",{style:{display:"flex",flexDirection:"row",flex:1,minWidth:0,width:"100%",alignItems:"flex-start"},children:[t.jsx(K,{onAddStep:()=>{i?.(n[0].localId,e,"prepend")},onAddTrigger:h,onAddCondition:c,onAddLoop:r,lineColor:Z,stepId:n[0].localId,pathId:e,index:0,style:{marginTop:"20px"}}),n.map((x,g)=>{const f=!!x.paths,N="condition"in x&&typeof x.condition=="string";let m;return f&&x.paths?m=t.jsx(Ge,{items:x.paths,pathId:x.localId,onAddStep:i,onAddCondition:c,onAddLoop:r,onDeleteStep:l,onAddTrigger:h,onSelectStep:p,onUpdateFilter:a,onResize:_,onCheckScenario:I},x.title):N?m=t.jsxs(t.Fragment,{children:[t.jsx(Ue,{value:x,onAddStep:i,onAddTrigger:h,onAddCondition:c,onAddLoop:r,onDeleteStep:l,onUpdateFilter:a,onSelectStep:p,onResize:_,onCheckScenario:I},x.localId),t.jsx(K,{onAddStep:i,onAddTrigger:h,onAddCondition:c,onAddLoop:r,lineColor:Z,stepId:x.localId,pathId:e,index:g+1,style:{marginTop:"34px",height:0}})]}):m=t.jsxs(t.Fragment,{children:[t.jsx(ee,{localId:x.localId,title:x.title,idx:1,icon:x.icon,isSet:x.isSet,isInvalid:x.isInvalid,isFilter:x.isFilter,status:x.status,onSelectStep:p,onDeleteStep:l,onUpdateFilter:a,onCheckScenario:I},x.title),t.jsx(K,{onAddStep:i,onAddTrigger:h,onAddCondition:c,onAddLoop:r,lineColor:Z,stepId:x.localId,pathId:e,index:g+1})]}),t.jsx("div",{className:Q.stepContainer+(f||N?" "+Q.stepContainerWithPaths:""),children:m},x.localId)}),y&&t.jsx("div",{style:{flexGrow:1,minWidth:0,borderTop:`2px solid ${Z}`,marginTop:"33.5px"}})]})})},Ze=()=>t.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[t.jsx("path",{d:"M17.3006 10.5H23.1986C23.2699 10.5001 23.3397 10.5204 23.3998 10.5586C23.4599 10.5969 23.5079 10.6515 23.5381 10.716C23.5683 10.7805 23.5795 10.8523 23.5704 10.923C23.5613 10.9937 23.5322 11.0603 23.4866 11.115L20.5376 14.655C20.5024 14.6972 20.4584 14.7312 20.4086 14.7545C20.3589 14.7778 20.3046 14.7899 20.2496 14.7899C20.1947 14.7899 20.1404 14.7778 20.0906 14.7545C20.0409 14.7312 19.9968 14.6972 19.9616 14.655L17.0126 11.115C16.967 11.0603 16.938 10.9937 16.9289 10.923C16.9197 10.8523 16.931 10.7805 16.9612 10.716C16.9914 10.6515 17.0394 10.5969 17.0995 10.5586C17.1596 10.5204 17.2294 10.5001 17.3006 10.5ZM0.800641 13.5H6.69864C6.7699 13.5 6.83967 13.4797 6.89979 13.4414C6.95991 13.4032 7.00789 13.3486 7.03811 13.2841C7.06833 13.2195 7.07953 13.1477 7.07042 13.0771C7.06131 13.0064 7.03224 12.9398 6.98664 12.885L4.03764 9.34504C4.00245 9.30283 3.95841 9.26888 3.90864 9.24558C3.85887 9.22228 3.80459 9.21021 3.74964 9.21021C3.69469 9.21021 3.64041 9.22228 3.59064 9.24558C3.54087 9.26888 3.49683 9.30283 3.46164 9.34504L0.512641 12.885C0.467037 12.9398 0.437977 13.0064 0.428862 13.0771C0.419747 13.1477 0.430956 13.2195 0.461175 13.2841C0.491394 13.3486 0.539372 13.4032 0.599493 13.4414C0.659613 13.4797 0.729386 13.5 0.800641 13.5Z",fill:"#41B0AC"}),t.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.9995 4.50011C9.67152 4.50011 7.58952 5.5606 6.21402 7.2271C6.1526 7.30671 6.0758 7.37316 5.98819 7.42249C5.90057 7.47183 5.80393 7.50304 5.70401 7.51427C5.60409 7.52551 5.50293 7.51653 5.40655 7.48789C5.31016 7.45924 5.22052 7.41151 5.14296 7.34753C5.06539 7.28354 5.00149 7.20462 4.95504 7.11544C4.90859 7.02626 4.88054 6.92865 4.87257 6.82842C4.8646 6.72819 4.87687 6.62737 4.90864 6.53198C4.94041 6.43658 4.99104 6.34854 5.05752 6.27311C6.15581 4.9434 7.61291 3.95712 9.25552 3.43159C10.8981 2.90606 12.6571 2.86338 14.3233 3.30864C15.9895 3.7539 17.4927 4.66835 18.6541 5.94324C19.8156 7.21812 20.5865 8.79978 20.875 10.5001L19.3495 10.5001C19.0032 8.80632 18.0826 7.28409 16.7433 6.19082C15.4041 5.09755 13.7284 4.50032 11.9995 4.50011ZM4.64952 13.5001C4.93349 14.887 5.60405 16.1653 6.58374 17.1873C7.56343 18.2093 8.81226 18.9332 10.186 19.2755C11.5597 19.6178 13.0022 19.5645 14.3469 19.1217C15.6915 18.6789 16.8835 17.8646 17.785 16.7731C17.8464 16.6935 17.9232 16.627 18.0109 16.5777C18.0985 16.5284 18.1951 16.4972 18.295 16.4859C18.395 16.4747 18.4961 16.4837 18.5925 16.5123C18.6889 16.541 18.7785 16.5887 18.8561 16.6527C18.9337 16.7167 18.9976 16.7956 19.044 16.8848C19.0905 16.974 19.1185 17.0716 19.1265 17.1718C19.1344 17.272 19.1222 17.3728 19.0904 17.4682C19.0586 17.5636 19.008 17.6517 18.9415 17.7271C17.8432 19.0568 16.3861 20.0431 14.7435 20.5686C13.1009 21.0942 11.3419 21.1368 9.67576 20.6916C8.0096 20.2463 6.50638 19.3319 5.34491 18.057C4.18343 16.7821 3.41258 15.2004 3.12402 13.5001H4.64952Z",fill:"#41B0AC"})]}),Gn="_container_18jhr_1",Zn="_collapsed_18jhr_16",Un="_loopNodeWrapper_18jhr_21",Xn="_loopIconWrapper_18jhr_31",qn="_loopBox_18jhr_40",Kn="_dotsButton_18jhr_57",Jn="_label_18jhr_77",Qn="_limit_18jhr_84",e1="_expandable_18jhr_90",t1="_expandableCollapsed_18jhr_98",n1="_connector_18jhr_105",s1="_line_18jhr_113",o1="_circleDot_18jhr_121",i1="_innerDot_18jhr_136",r1="_stepsWrapper_18jhr_143",S={container:Gn,collapsed:Zn,loopNodeWrapper:Un,loopIconWrapper:Xn,loopBox:qn,dotsButton:Kn,label:Jn,limit:Qn,expandable:e1,expandableCollapsed:t1,connector:n1,line:s1,circleDot:o1,innerDot:i1,stepsWrapper:r1},Ue=({value:e,onAddStep:n,onAddTrigger:s,onAddCondition:o,onAddLoop:i,onDeleteStep:l,onUpdateFilter:a,onSelectStep:h,onResize:c,onCheckScenario:r})=>{const{localId:p,limit:_,steps:I,condition:y}=e,v=I??[],x=()=>{},[g,f]=d.useState(!1),N=d.useRef(null),{openMenu:m,closeMenu:b}=me(),u=ge(),j=d.useMemo(()=>[{label:"Edit",icon:t.jsx(We,{color:w.NAVY,size:18}),command:R=>{R?.originalEvent?.stopPropagation(),h?.(p)},template:u},{label:"Remove",icon:t.jsx(fe,{color:w.NAVY,size:18}),command:R=>{R?.originalEvent?.stopPropagation(),l&&l(p)},template:u}],[h,l,p,u]),L=R=>{R.stopPropagation(),m(N,R)},E=()=>{f(R=>!R),c?.()},P=S.container+(g?"":" "+S.collapsed),$=S.expandable+(g?"":" "+S.expandableCollapsed);return t.jsxs("div",{className:P,children:[t.jsxs("div",{className:S.loopNodeWrapper,children:[t.jsxs("div",{className:S.loopBox,children:[t.jsx("div",{onClick:E,className:S.loopIconWrapper,children:t.jsx(Ze,{})}),t.jsx("button",{type:"button",className:S.dotsButton,onClick:L,"aria-label":"Open loop menu","aria-haspopup":"menu",children:t.jsx(ue,{size:16})}),t.jsx(re,{model:j,popup:!0,ref:N,onHide:()=>b(N)})]}),t.jsx("div",{className:S.label,children:"Loop"}),_!=null&&t.jsxs("div",{className:S.limit,children:[_,"x"]})]}),t.jsxs("div",{className:$,children:[t.jsxs("div",{className:S.connector,children:[t.jsx("div",{className:S.line}),t.jsx("div",{className:S.circleDot,children:t.jsx("div",{className:S.innerDot})}),t.jsx("div",{className:S.line})]}),t.jsx(Ce,{expression:y??"",status:e.status,style:{marginTop:"25.5px"}}),t.jsx("div",{className:S.stepsWrapper,children:t.jsx(ye,{steps:v,pathId:p,onAddStep:n??x,onAddTrigger:s,onAddCondition:o??x,onAddLoop:i,onDeleteStep:l,onUpdateFilter:a??x,onSelectStep:h??x,onCheckScenario:r??x,isDescendent:!0})})]})]})},l1="_container_kielx_1",Xe={container:l1},c1=({process:e,addMultipleTriggers:n,onAddStep:s,onAddTrigger:o,onAddCondition:i,onAddLoop:l,onResize:a,onDeleteTrigger:h,onDeleteStep:c,onUpdateFilter:r,onSelectStep:p,onCheckScenario:_})=>{const[I,y]=d.useState(0);return t.jsxs("div",{className:Xe.container,children:[t.jsx(we,{steps:e.triggers,onAddTrigger:n,onUpdateFilter:r,onDeleteTrigger:h,onSelectStep:p,onCenterYUpdate:y,isEditable:!0}),e.steps.length>0?t.jsx(ye,{steps:e.steps,centerY:I,onAddStep:s,onAddTrigger:o,onAddCondition:i,onAddLoop:l,onResize:a,onDeleteStep:c,onUpdateFilter:r,onSelectStep:p,isDescendent:!1,pathId:void 0,onCheckScenario:_}):t.jsx(K,{onAddStep:()=>s(),onAddTrigger:o,onAddCondition:i,onAddLoop:l,index:0,style:{height:_e,marginTop:Math.max(0,I-_e/2)}})]})},be=(e,n,s)=>{if(n===s)return!1;const o=r=>{if("paths"in r&&r.paths&&r.paths.length>0){const p=r.paths[r.paths.length-1];if(p.steps&&p.steps.length>0){const _=p.steps[p.steps.length-1];return o(_)}return p.localId}return"steps"in r&&r.steps&&r.steps.length>0?o(r.steps[r.steps.length-1]):r.localId},i=r=>r.steps&&r.steps.length>0?o(r.steps[r.steps.length-1]):r.paths&&r.paths.length>0?i(r.paths[r.paths.length-1]):r.localId,l=(r,p)=>"paths"in r&&r.paths&&r.paths.length>0?r.paths.some(I=>i(I)===p):o(r)===p,a=r=>{for(let p=0;p<r.length-1;p++){const _=r[p],I=r[p+1];if(_.localId===n&&I.localId===s||l(_,n)&&I.localId===s)return!0}for(const p of r){if(p.localId===n&&p.steps?.[0]?.localId===s)return!0;if("paths"in p&&p.paths){for(const _ of p.paths)if(h(_))return!0}if("steps"in p&&p.steps&&a(p.steps))return!0}return!1},h=r=>{if(r.localId===n&&r.steps?.[0]?.localId===s||r.steps&&r.steps.length>0&&a(r.steps))return!0;if(r.paths){for(const p of r.paths)if(h(p))return!0}return!1},c=e.steps;return c?.[0]&&c[0].localId===n&&c[0].steps?.[0]?.localId===s?!0:a(c)},qe=(e,n)=>{if(e.localId===n)return e.status;if(e.steps)for(const s of e.steps){const o=Ne(s,n);if(o!==void 0)return o}if(e.paths)for(const s of e.paths){const o=qe(s,n);if(o!==void 0)return o}},Ne=(e,n)=>{if(e.localId===n)return e.status;if(e.paths)for(const s of e.paths){const o=qe(s,n);if(o!==void 0)return o}if(e.steps)for(const s of e.steps){const o=Ne(s,n);if(o!==void 0)return o}},Y=(e,n)=>{for(const s of e.triggers)if(s.localId===n)return s.status;for(const s of e.steps){const o=Ne(s,n);if(o!==void 0)return o}},a1=(e,n)=>{const s=i=>{if(i.localId===n)return!0;if(i.steps){for(const l of i.steps)if(o(l))return!0}if(i.paths){for(const l of i.paths)if(s(l))return!0}return!1},o=i=>{if(i.paths){for(const l of i.paths)if(s(l))return!0}if(i.steps){for(const l of i.steps)if(o(l))return!0}return!1};for(const i of e.triggers)if(o(i))return!0;for(const i of e.steps)if(o(i))return!0;return!1},pe=(e,n,s)=>{if(n===s)return!1;const o=Y(e,n),i=Y(e,s);return o!=="finished"||i!=="finished"?!1:be(e,n,s)},Se=(e,n,s)=>n===s||!a1(e,n)||Y(e,s)!=="finished"?!1:be(e,n,s),J=({lineColor:e,style:n,fromLocalId:s,toLocalId:o})=>{const l=le(e)?`${F.stepLinkLine} ${F.dashedLine}`:F.stepLinkLine;return t.jsxs("div",{className:`${F.stepLinkContainer} ${F.readOnly}`,style:{...n,"--step-link-color":e},"aria-hidden":!0,"data-connector-from":void 0,"data-connector-to":void 0,children:[t.jsx("div",{className:l}),t.jsx("div",{className:`${F.stepLinkIcon} ${F.debuggerIconCollapsed}`,"aria-hidden":!0}),t.jsx("div",{className:l})]})},Le=e=>e.steps&&e.steps.length>0?ie(e.steps[e.steps.length-1]):e.paths&&e.paths.length>0?Le(e.paths[e.paths.length-1]):e.localId,ie=e=>"paths"in e&&e.paths&&e.paths.length>0?Le(e.paths[e.paths.length-1]):"steps"in e&&e.steps&&e.steps.length>0?ie(e.steps[e.steps.length-1]):e.localId,he=e=>"steps"in e&&e.steps&&e.steps.length>0?he(e.steps[e.steps.length-1]):"paths"in e&&e.paths&&e.paths.length>0?he(e.paths[e.paths.length-1]):e.localId,Ke=(e,n,s,o)=>{const i=n.statusLine(void 0);if(o==null)return i;const l=Y(e,o);return l==null||l!=="finished"||s==null?i:Se(e,s,o)||pe(e,s,o)?n.statusLine("finished"):i},Je=d.createContext(null),d1=Je.Provider,Ee=()=>{const e=d.useContext(Je);if(!e)throw new Error("useProcessDebuggerContext must be used within ProcessDebuggerProvider");return e},$e=34.5,u1=33,Qe=e=>{const{items:n,pathId:s,previousLocalId:o,nextLocalId:i,onSelectStep:l,onResize:a,onCheckScenario:h}=e,{process:c,lineColors:r}=Ee(),p=()=>{},_=Ke(c,r,o,i),I=d.useRef(null),y=d.useRef([]),[v,x]=d.useState([]);d.useEffect(()=>{const u=()=>{const E=I.current;if(!E||n.length===0){x([]);return}const P=[],$=Number.parseFloat(getComputedStyle(E).zoom||"1");for(let R=0;R<n.length;R++){const C=y.current[R];if(C)if(C.offsetParent==null){const T=E.getBoundingClientRect(),M=C.getBoundingClientRect();P.push((M.top-T.top)/$+$e)}else P.push(C.offsetTop-u1+$e)}P.length===n.length&&x(P)};u();const j=new ResizeObserver(u),L=I.current;return L&&j.observe(L),window.addEventListener("resize",u),()=>{j.disconnect(),window.removeEventListener("resize",u)}},[n]);const g=d.useMemo(()=>{if(n.length)return Ve(n.map(u=>oe(u)))},[n]),f=d.useMemo(()=>{const u=r.statusLine(void 0);return n.length===0?u:oe(n[0])==="finished"?r.statusLine("finished"):u},[n,r]),N=d.useMemo(()=>v.length!==n.length||n.length<=1?null:n.map((u,j)=>j).filter(u=>u>0).map(u=>{const j=v[u];if(j===void 0)return null;const E=oe(n[u])==="finished"?r.statusLine("finished"):r.statusLine(void 0);return t.jsx(je,{width:100,height:j,strokeColor:E,fromLocalId:n[u-1]?.localId,toLocalId:n[u]?.localId},u)}),[n,v,r]),m=d.useMemo(()=>{if(v.length!==n.length||n.length<=1)return null;const u=r.statusLine(void 0);return n.map((j,L)=>L).filter(j=>j>0).map(j=>{const L=v[j];if(L===void 0)return null;let E=u;if(i!=null&&Y(c,i)==="finished"){const $=he(n[j]);pe(c,$,i)&&(E=r.statusLine("finished"))}return t.jsx(je,{width:100,height:L,strokeColor:E,fromLocalId:o,toLocalId:i},j)})},[n,v,r,c,i,o]),b=d.useMemo(()=>{const u=r.statusLine(void 0);if(n.length===0||i==null||Y(c,i)!=="finished")return u;const L=he(n[0]);return pe(c,L,i)?r.statusLine("finished"):u},[n,r,c,i]);return t.jsxs("div",{className:A.row,children:[t.jsx(Ye,{onDelete:()=>{},enabled:!1,debuggerMode:!0,status:g,onSelect:s!=null&&l?()=>l(s):void 0}),t.jsxs("div",{ref:I,className:A.column,style:{marginTop:"33px"},children:[t.jsx("div",{style:{position:"absolute",top:0,left:0,width:"100px",height:"2px",borderTop:U(f)}}),N]}),t.jsx("div",{className:A.column,children:n.map((u,j)=>{let L;if(u.paths)L=t.jsx(Qe,{items:u.paths,pathId:s,previousLocalId:u.localId,nextLocalId:i,onSelectStep:l,onResize:a,onCheckScenario:h},u.localId);else if(u.steps){const E=u,P=E.status==="finished"||i!=null&&Se(c,E.localId,i)?"finished":void 0;L=t.jsxs("div",{className:A.stepsContainer,"data-local-id":void 0,children:[t.jsx(Ce,{expression:E.condition,status:P,debuggerMode:!0,style:{marginTop:"25px"}}),t.jsx(Te,{steps:u.steps,pathId:u.localId,previousLocalId:E.localId,nextLocalId:i,onSelectStep:l??p,onResize:a,onCheckScenario:h},u.localId)]})}else L=t.jsx(ee,{localId:u.localId,title:"title"in u?u.title:"",idx:1,icon:"icon"in u?u.icon:void 0,status:"status"in u?u.status:void 0,debuggerMode:!0,onSelectStep:l,onUpdateFilter:p,onCheckScenario:h},u.localId);return t.jsx("div",{ref:E=>{y.current[j]=E},style:{width:"100%"},"data-local-id":void 0,children:L},u.localId)})}),t.jsxs("div",{className:A.column,style:{marginTop:"33px"},children:[t.jsx("div",{style:{position:"absolute",top:.5,left:0,flex:1,width:"100%",height:"2px",borderTop:U(b)}}),m]}),t.jsx(J,{lineColor:_,fromLocalId:o,toLocalId:i,style:{marginTop:"34px",height:0}}),t.jsx("div",{style:{flex:1,width:"100%",height:"2px",borderTop:U(_),marginTop:"34px"}})]})},p1=({value:e,previousLocalId:n,nextLocalId:s,onSelectStep:o,onResize:i,onCheckScenario:l})=>{const{process:a,lineColors:h}=Ee(),{localId:c,limit:r,steps:p,condition:_}=e,I=p??[],y=()=>{},[v,x]=d.useState(!1),g=()=>{x(L=>!L),i?.()},f=S.container+(v?"":" "+S.collapsed),N=S.expandable+(v?"":" "+S.expandableCollapsed),m=I[0]?.localId,b=m!=null?Y(a,m):void 0,j=n!=null&&(Se(a,n,c)||Y(a,n)==="finished"&&be(a,n,c)||pe(a,n,c))&&b==="finished"?h.statusLine("finished"):h.statusLine(void 0);return t.jsxs("div",{className:f,"data-local-id":void 0,children:[t.jsxs("div",{className:S.loopNodeWrapper,children:[t.jsx("div",{className:S.loopBox,children:t.jsx("div",{onClick:g,className:S.loopIconWrapper,children:t.jsx(Ze,{})})}),t.jsx("div",{className:S.label,children:"Loop"}),r!=null&&t.jsxs("div",{className:S.limit,children:[r,"x"]})]}),t.jsxs("div",{className:N,children:[t.jsxs("div",{className:S.connector,style:{"--iterator-connector-color":j,...le(j)&&{"--iterator-connector-width":"3px","--iterator-connector-style":"dotted"}},children:[t.jsx("div",{className:S.line}),t.jsx("div",{className:S.circleDot,children:t.jsx("div",{className:S.innerDot})}),t.jsx("div",{className:S.line})]}),t.jsx(Ce,{expression:_??"",status:e.status,debuggerMode:!0,style:{marginTop:"25.5px"}}),t.jsx("div",{className:S.stepsWrapper,children:t.jsx(Te,{steps:I,pathId:c,previousLocalId:c,nextLocalId:s,onSelectStep:o??(()=>{}),onCheckScenario:l??y,isDescendent:!0})})]})]})},Ie=68,h1=e=>{if(!e||e.length===0)return;const n=Ve(e.map(o=>oe(o))),s=e.find(o=>oe(o)===n)??e[e.length-1];return Le(s)},Te=({pathId:e,steps:n,centerY:s,className:o,previousLocalId:i,nextLocalId:l,onSelectStep:a,onResize:h,onCheckScenario:c,isDescendent:r=!0})=>{const{process:p,lineColors:_}=Ee(),I=()=>{},y=s===void 0?void 0:{marginTop:Math.max(0,s-Ie/2)},v=(g,f)=>Ke(p,_,g,f),x=g=>g===n.length-1?l:n[g+1]?.localId;if(n.length===0){const g=v(i,l);return t.jsxs("div",{"data-path-id":e??"",style:{width:"100%",marginTop:"20px",display:"flex",flexDirection:"row",flex:1,minWidth:0,...y},children:[t.jsx("div",{style:{flexGrow:1,flexShrink:0,flexBasis:"auto",minWidth:0,height:"2px",marginTop:"13.5px",borderTop:U(g)}}),t.jsx(J,{lineColor:g,fromLocalId:i,toLocalId:l,style:{height:"auto",marginTop:"2px"}}),t.jsx("div",{style:{flexGrow:1,flexShrink:0,flexBasis:"auto",minWidth:0,height:"2px",marginTop:"13.5px",borderTop:U(g)}})]})}return t.jsx("div",{"data-path-id":e??"",className:Q.steps+(o?" "+o:""),style:y,children:t.jsxs("div",{style:{display:"flex",flexDirection:"row",flex:1,minWidth:0,width:"100%",alignItems:"flex-start"},children:[t.jsx(J,{lineColor:v(i,n[0]?.localId),fromLocalId:i,toLocalId:n[0]?.localId,style:{marginTop:"21.5px"}}),n.map((g,f)=>{const N=!!g.paths,m="condition"in g&&typeof g.condition=="string";let b;if(N&&g.paths){const u=h1(g.paths);b=t.jsx(Qe,{items:g.paths,pathId:g.localId,previousLocalId:u??g.localId,nextLocalId:x(f),onSelectStep:a,onResize:h,onCheckScenario:c},g.title)}else if(m){const u=f===0?i:ie(n[f-1]),j=ie(g);b=t.jsxs(t.Fragment,{children:[t.jsx(p1,{value:g,previousLocalId:u,nextLocalId:x(f),onSelectStep:a,onResize:h,onCheckScenario:c}),t.jsx(J,{lineColor:v(j,x(f)),fromLocalId:g.localId,toLocalId:x(f),style:{marginTop:"34px",height:0}})]})}else b=t.jsxs(t.Fragment,{children:[t.jsx(ee,{localId:g.localId,title:g.title,idx:1,icon:g.icon,isSet:g.isSet,isInvalid:g.isInvalid,isFilter:g.isFilter,status:g.status,debuggerMode:!0,onSelectStep:a,onUpdateFilter:I,onCheckScenario:c},g.title),t.jsx(J,{lineColor:v(g.localId,x(f)),fromLocalId:g.localId,toLocalId:x(f)})]});return t.jsx("div",{className:Q.stepContainer+(N||m?" "+Q.stepContainerWithPaths:""),children:b},g.localId)}),r&&t.jsx("div",{style:{flexGrow:1,minWidth:0,borderTop:U(v(n.length>0?ie(n[n.length-1]):void 0,l)),marginTop:"33.5px"}})]})})},f1=({centerY:e,neutralLineColor:n})=>t.jsxs("div",{style:{display:"flex",flexDirection:"row",flex:1,minWidth:0,width:"100%",marginTop:Math.max(0,e-Ie/2),height:Ie,alignItems:"center"},children:[t.jsx("div",{style:{flexGrow:1,minWidth:0,height:"2px",borderTop:`2px solid ${n}`}}),t.jsx(J,{lineColor:n,style:{height:"auto"}}),t.jsx("div",{style:{flexGrow:1,minWidth:0,height:"2px",borderTop:`2px solid ${n}`}})]}),g1=({process:e,statusLineColors:n,neutralLineColor:s=w.NAVY,onResize:o,onSelectStep:i,onCheckScenario:l=()=>{}})=>{const[a,h]=d.useState(0),c=d.useMemo(()=>cn(n,s),[n,s]),r=d.useCallback(p=>p==="finished"?c.statusLine("finished"):c.statusLine(void 0),[c]);return t.jsx("div",{className:Xe.container,children:t.jsxs(d1,{value:{process:e,lineColors:c},children:[t.jsx(we,{steps:e.triggers,onSelectStep:i,debuggerMode:!0,resolveCurveStrokeColor:r,onCenterYUpdate:h,nextStepStatus:e.steps[0]?.status}),e.steps.length>0?t.jsx(Te,{steps:e.steps,centerY:a,onResize:o,onSelectStep:i,onCheckScenario:l,isDescendent:!1,pathId:void 0}):t.jsx(f1,{centerY:a,neutralLineColor:c.statusLine(void 0)})]})})};class et extends Error{constructor(n){super(n),this.name="AddStepError"}}const Fe=e=>"condition"in e&&typeof e.condition=="string",tt=(e,n,s,o)=>{const i=o==="prepend"?n:n+1;return[...e.slice(0,i),s,...e.slice(i)]},ke=(e,n,s,o)=>{for(let i=0;i<e.length;i++){if(e[i].localId===n)return tt(e,i,o,s);const l=e[i],a=l.steps?.length&&ke(l.steps,n,s,o);if(a)return e.map((c,r)=>r===i?{...c,steps:a}:c);const h=l.paths?.length&&nt(l.paths,n,s,o);if(h)return e.map((c,r)=>r===i?{...c,paths:h}:c)}return null},x1=(e,n,s)=>{const o=e.steps??[],i=n==="prepend"?[s,...o]:[...o,s];return{...e,steps:i}},nt=(e,n,s,o)=>{for(let i=0;i<e.length;i++){const l=e[i];if(l.localId===n)return Fe(l)?e.map((a,h)=>h===i?x1(l,s,o):a):tt(e,i,o,s);if(Fe(l)){const a=l.steps?.length&&ke(l.steps,n,s,o);if(a)return e.map((c,r)=>r===i?{...c,steps:a}:c);const h=l.paths?.length&&nt(l.paths,n,s,o);if(h)return e.map((c,r)=>r===i?{...c,paths:h}:c)}}return null},m1=(e,n,s,o)=>{const i=ke(e.steps,n,s,o);if(i)return{...e,steps:i};throw new et(`Step or path with id "${n}" not found`)},st=(e,n)=>({...e,...e.steps!=null&&{steps:Pe(e.steps,n)},...e.paths!=null&&{paths:e.paths.map(s=>st(s,n))}}),Pe=(e,n)=>e.filter(s=>s.localId!==n).map(s=>({...s,...s.steps!=null&&{steps:Pe(s.steps,n)},...s.paths!=null&&{paths:s.paths.map(o=>st(o,n))}})),C1=(e,n)=>{const s=Pe(e.steps,n);return{...e,steps:s}};exports.AddStepError=et;exports.Iterator=Ue;exports.Menu=re;exports.MenuProvider=$t;exports.ProcessDebuggerDiagram=g1;exports.ProcessDiagram=c1;exports.ProcessStep=ee;exports.Trigger=we;exports.addStep=m1;exports.deleteStep=C1;exports.useMenuProvider=me;
2
2
  //# sourceMappingURL=index.cjs.map