@kestra-io/ui-libs 0.0.225 → 0.0.227
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.
- package/dist/FlowYamlUtils-DAm_-0Qh.cjs +2 -0
- package/dist/{FlowYamlUtils-CwE38P6I.cjs.map → FlowYamlUtils-DAm_-0Qh.cjs.map} +1 -1
- package/dist/{FlowYamlUtils-BnXiRqSX.js → FlowYamlUtils-MCAmyY3D.js} +906 -863
- package/dist/{FlowYamlUtils-BnXiRqSX.js.map → FlowYamlUtils-MCAmyY3D.js.map} +1 -1
- package/dist/{VueFlowUtils-DKrM_RaI.js → VueFlowUtils-A_7_qgxS.js} +2 -2
- package/dist/{VueFlowUtils-DKrM_RaI.js.map → VueFlowUtils-A_7_qgxS.js.map} +1 -1
- package/dist/{VueFlowUtils-Dh7ybprm.cjs → VueFlowUtils-CL70qtJ4.cjs} +2 -2
- package/dist/{VueFlowUtils-Dh7ybprm.cjs.map → VueFlowUtils-CL70qtJ4.cjs.map} +1 -1
- package/dist/kestra-flowyamlutils.cjs.js +1 -1
- package/dist/kestra-flowyamlutils.es.js +18 -17
- package/dist/kestra-index.cjs.js +1 -1
- package/dist/kestra-index.es.js +3 -3
- package/dist/kestra-vueflowutils.cjs.js +1 -1
- package/dist/kestra-vueflowutils.es.js +2 -2
- package/dist/utils/FlowYamlUtils.d.ts +9 -0
- package/dist/utils/FlowYamlUtils.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/utils/FlowYamlUtils.test.ts +141 -0
- package/src/utils/FlowYamlUtils.ts +75 -0
- package/dist/FlowYamlUtils-CwE38P6I.cjs +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("js-yaml");require("yaml");const e=require("./FlowYamlUtils-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("js-yaml");require("yaml");const e=require("./FlowYamlUtils-DAm_-0Qh.cjs");exports.FLOW_SECTION_KEYS=e.FLOW_SECTION_KEYS;exports.ORDERED_FLOW_ROOT_KEYS=e.ORDERED_FLOW_ROOT_KEYS;exports.checkBlockAlreadyExists=e.checkBlockAlreadyExists;exports.cleanMetadata=e.cleanMetadata;exports.deleteBlock=e.deleteBlock;exports.deleteBlockWithPath=e.deleteBlockWithPath;exports.deleteMetadata=e.deleteMetadata;exports.deletePluginDefaults=e.deletePluginDefaults;exports.extractBlock=e.extractBlock;exports.extractBlockWithPath=e.extractBlockWithPath;exports.extractFieldFromMaps=e.extractFieldFromMaps;exports.extractPluginDefault=e.extractPluginDefault;exports.flowHaveTasks=e.flowHaveTasks;exports.getAllCharts=e.getAllCharts;exports.getChartAtPosition=e.getChartAtPosition;exports.getLastBlock=e.getLastBlock;exports.getMetadata=e.getMetadata;exports.getPathFromSectionAndId=e.getPathFromSectionAndId;exports.getTasksLines=e.getTasksLines;exports.getTypeAtPosition=e.getTypeAtPosition;exports.getVersionAtPosition=e.getVersionAtPosition;exports.insertBlock=e.insertBlock;exports.insertBlockWithPath=e.insertBlockWithPath;exports.insertErrorInFlowable=e.insertErrorInFlowable;exports.isParentChildrenRelation=e.isParentChildrenRelation;exports.localizeElementAtIndex=e.localizeElementAtIndex;exports.pairsToMap=e.pairsToMap;exports.parse=e.parse;exports.parsePath=e.parsePath;exports.replaceBlockInDocument=e.replaceBlockInDocument;exports.replaceBlockWithPath=e.replaceBlockWithPath;exports.replaceIdAndNamespace=e.replaceIdAndNamespace;exports.replacePluginDefaultsInDocument=e.replacePluginDefaultsInDocument;exports.sort=e.sort;exports.stringify=e.stringify;exports.swapBlocks=e.swapBlocks;exports.updateMetadata=e.updateMetadata;
|
|
2
2
|
//# sourceMappingURL=kestra-flowyamlutils.cjs.js.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import "js-yaml";
|
|
2
2
|
import "yaml";
|
|
3
|
-
import { al as l, am as o, v as
|
|
3
|
+
import { al as l, am as o, v as i, h as r, x as c, ak as n, b as d, d as p, A as h, ag as k, e as g, a as P, f as m, n as B, m as u, w as A, c as f, af as x, an as E, k as D, g as I, y as F, aj as M, j as O, t as T, l as W, p as C, o as _, ai as w, z as y, ah as L, i as R, r as S, s as b, q as j, C as v, u as z } from "./FlowYamlUtils-MCAmyY3D.js";
|
|
4
4
|
export {
|
|
5
5
|
l as FLOW_SECTION_KEYS,
|
|
6
6
|
o as ORDERED_FLOW_ROOT_KEYS,
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
i as checkBlockAlreadyExists,
|
|
8
|
+
r as cleanMetadata,
|
|
9
9
|
c as deleteBlock,
|
|
10
10
|
n as deleteBlockWithPath,
|
|
11
11
|
d as deleteMetadata,
|
|
@@ -20,23 +20,24 @@ export {
|
|
|
20
20
|
A as getLastBlock,
|
|
21
21
|
f as getMetadata,
|
|
22
22
|
x as getPathFromSectionAndId,
|
|
23
|
-
E as
|
|
24
|
-
D as
|
|
25
|
-
I as
|
|
26
|
-
F as
|
|
27
|
-
M as
|
|
28
|
-
O as
|
|
23
|
+
E as getTasksLines,
|
|
24
|
+
D as getTypeAtPosition,
|
|
25
|
+
I as getVersionAtPosition,
|
|
26
|
+
F as insertBlock,
|
|
27
|
+
M as insertBlockWithPath,
|
|
28
|
+
O as insertErrorInFlowable,
|
|
29
|
+
T as isParentChildrenRelation,
|
|
29
30
|
W as localizeElementAtIndex,
|
|
30
31
|
C as pairsToMap,
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
_ as parse,
|
|
33
|
+
w as parsePath,
|
|
34
|
+
y as replaceBlockInDocument,
|
|
35
|
+
L as replaceBlockWithPath,
|
|
35
36
|
R as replaceIdAndNamespace,
|
|
36
37
|
S as replacePluginDefaultsInDocument,
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
b as sort,
|
|
39
|
+
j as stringify,
|
|
40
|
+
v as swapBlocks,
|
|
41
|
+
z as updateMetadata
|
|
41
42
|
};
|
|
42
43
|
//# sourceMappingURL=kestra-flowyamlutils.es.js.map
|
package/dist/kestra-index.cjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var er=Object.create;var Gn=Object.defineProperty;var tr=Object.getOwnPropertyDescriptor;var nr=Object.getOwnPropertyNames;var or=Object.getPrototypeOf,lr=Object.prototype.hasOwnProperty;var rr=(e,n,o,l)=>{if(n&&typeof n=="object"||typeof n=="function")for(let r of nr(n))!lr.call(e,r)&&r!==o&&Gn(e,r,{get:()=>n[r],enumerable:!(l=tr(n,r))||l.enumerable});return e};var ir=(e,n,o)=>(o=e!=null?er(or(e)):{},rr(n||!e||!e.__esModule?Gn(o,"default",{value:e,enumerable:!0}):o,e));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const We=require("yaml"),y=require("./VueFlowUtils-Dh7ybprm.cjs"),W=require("./FlowYamlUtils-CwE38P6I.cjs"),t=require("vue"),re=require("@vue-flow/core"),tn=require("@vue-flow/controls"),nn=require("moment"),ar=require("@popperjs/core"),bt=require("vue-router"),sr={lineWidth:0},Wn=["tasks","triggers","errors","finally","afterExecution","pluginDefaults"],cr={stringify:W.stringify,parse:W.parse,pairsToMap:W.pairsToMap,extractTask(e,n){for(const o of Wn){const l=W.extractBlock({source:e,section:o,key:n});if(l)return l}},_extractTask(e,n,o){function l(i){if(i){if(i instanceof We.YAMLMap&&i.get("type")!==void 0&&n===i.get("id"))return o?o(i):i;if(i.items)for(const[a,s]of i.items.entries()){let c;if(s instanceof We.YAMLMap?c=l(s):c=l(s.value),c&&(o&&(i instanceof We.YAMLMap?i.set(s.key.value,c):i.items[a]=c),!o&&c))return c}}}const r=l(e.contents);if(r!==void 0)return o?new We.Document(r):new We.Document(r)},replaceTaskInDocument(e,n,o,l="tasks",r="id"){return W.replaceBlockInDocument({source:e,section:l,keyName:r,key:n,newContent:o})},sort:W.sort,getAllCharts:W.getAllCharts,getChartAtPosition:W.getChartAtPosition,localizeElementAtIndex:W.localizeElementAtIndex,getTaskType:W.getTypeAtPosition,swapTasks(e,n,o){const l=We.parseDocument(e),r=this._extractTask(l,n),i=this._extractTask(l,o);return We.visit(l,{Pair(a,s){if(s.key.value==="dependsOn"&&s.value.items.map(c=>c.value).includes(o))throw{message:"dependency task",messageOptions:{taskId:o}}}}),this._extractTask(l,n,()=>i),this._extractTask(l,o,()=>r),l.toString(sr)},insertTask(e,n,o,l,r){return W.insertBlock({source:e,section:"tasks",newBlock:o,refKey:n,position:l,parentKey:r})},insertSection(e,n,o){return W.insertBlock({source:n,section:e,newBlock:o})},insertErrorInFlowable:W.insertErrorInFlowable,deleteSection(e,n,o){return W.deleteBlock({source:e,section:n,key:o})},deleteTask(e,n,o){return(o===y.SECTIONS.TASKS?["tasks","errors"]:["triggers"]).reduce((r,i)=>W.deleteBlock({source:r,section:i,key:n}),e)},getLastTask(e,n){return W.getLastBlock({source:e,section:"tasks",parentKey:n})},checkTaskAlreadyExist(e,n){return W.checkBlockAlreadyExists({source:e,section:"tasks",newContent:n,keyName:"id"})},isParentChildrenRelation(e,n,o){return W.isParentChildrenRelation({source:e,sections:Wn,key1:n,key2:o,keyName:"id"})},replaceIdAndNamespace:W.replaceIdAndNamespace,updateMetadata:W.updateMetadata,cleanMetadata:W.cleanMetadata,getMetadata:W.getMetadata,deleteMetadata:W.deleteMetadata,flowHaveTasks:W.flowHaveTasks,extractPluginDefault:W.extractPluginDefault,replacePluginDefaultsInDocument:W.replacePluginDefaultsInDocument,deletePluginDefaults:W.deletePluginDefaults,extractFieldFromMaps:W.extractFieldFromMaps,getVersionAtPosition:W.getVersionAtPosition},Ne=e=>{const n=document.querySelector(":root"),o=n?getComputedStyle(n):null;return o==null?void 0:o.getPropertyValue(e)};var ur=y.requireMapValues();const gt=W.getDefaultExportFromCjs(ur),B=(e,n)=>{const o=e.__vccOpts||e;for(const[l,r]of n)o[l]=r;return o},dr={name:"PauseCircleIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},fr=["aria-hidden","aria-label"],mr=["fill","width","height"],pr={d:"M15,16H13V8H15M11,16H9V8H11M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z"},gr={key:0};function hr(e,n,o,l,r,i){return t.openBlock(),t.createElementBlock("span",t.mergeProps(e.$attrs,{"aria-hidden":o.title?null:!0,"aria-label":o.title,class:"material-design-icon pause-circle-icon",role:"img",onClick:n[0]||(n[0]=a=>e.$emit("click",a))}),[(t.openBlock(),t.createElementBlock("svg",{fill:o.fillColor,class:"material-design-icon__svg",width:o.size,height:o.size,viewBox:"0 0 24 24"},[t.createElementVNode("path",pr,[o.title?(t.openBlock(),t.createElementBlock("title",gr,t.toDisplayString(o.title),1)):t.createCommentVNode("",!0)])],8,mr))],16,fr)}const jn=B(dr,[["render",hr]]),Er={name:"CheckCircleIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},kr=["aria-hidden","aria-label"],_r=["fill","width","height"],yr={d:"M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M10 17L5 12L6.41 10.59L10 14.17L17.59 6.58L19 8L10 17Z"},Cr={key:0};function Nr(e,n,o,l,r,i){return t.openBlock(),t.createElementBlock("span",t.mergeProps(e.$attrs,{"aria-hidden":o.title?null:!0,"aria-label":o.title,class:"material-design-icon check-circle-icon",role:"img",onClick:n[0]||(n[0]=a=>e.$emit("click",a))}),[(t.openBlock(),t.createElementBlock("svg",{fill:o.fillColor,class:"material-design-icon__svg",width:o.size,height:o.size,viewBox:"0 0 24 24"},[t.createElementVNode("path",yr,[o.title?(t.openBlock(),t.createElementBlock("title",Cr,t.toDisplayString(o.title),1)):t.createCommentVNode("",!0)])],8,_r))],16,kr)}const vr=B(Er,[["render",Nr]]),Sr={name:"PlayCircleIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},br=["aria-hidden","aria-label"],Lr=["fill","width","height"],Tr={d:"M10,16.5V7.5L16,12M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z"},wr={key:0};function Ar(e,n,o,l,r,i){return t.openBlock(),t.createElementBlock("span",t.mergeProps(e.$attrs,{"aria-hidden":o.title?null:!0,"aria-label":o.title,class:"material-design-icon play-circle-icon",role:"img",onClick:n[0]||(n[0]=a=>e.$emit("click",a))}),[(t.openBlock(),t.createElementBlock("svg",{fill:o.fillColor,class:"material-design-icon__svg",width:o.size,height:o.size,viewBox:"0 0 24 24"},[t.createElementVNode("path",Tr,[o.title?(t.openBlock(),t.createElementBlock("title",wr,t.toDisplayString(o.title),1)):t.createCommentVNode("",!0)])],8,Lr))],16,br)}const Ir=B(Sr,[["render",Ar]]),Vr={name:"CloseCircleIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},Or=["aria-hidden","aria-label"],Dr=["fill","width","height"],Br={d:"M12,2C17.53,2 22,6.47 22,12C22,17.53 17.53,22 12,22C6.47,22 2,17.53 2,12C2,6.47 6.47,2 12,2M15.59,7L12,10.59L8.41,7L7,8.41L10.59,12L7,15.59L8.41,17L12,13.41L15.59,17L17,15.59L13.41,12L17,8.41L15.59,7Z"},Pr={key:0};function Rr(e,n,o,l,r,i){return t.openBlock(),t.createElementBlock("span",t.mergeProps(e.$attrs,{"aria-hidden":o.title?null:!0,"aria-label":o.title,class:"material-design-icon close-circle-icon",role:"img",onClick:n[0]||(n[0]=a=>e.$emit("click",a))}),[(t.openBlock(),t.createElementBlock("svg",{fill:o.fillColor,class:"material-design-icon__svg",width:o.size,height:o.size,viewBox:"0 0 24 24"},[t.createElementVNode("path",Br,[o.title?(t.openBlock(),t.createElementBlock("title",Pr,t.toDisplayString(o.title),1)):t.createCommentVNode("",!0)])],8,Dr))],16,Or)}const cn=B(Vr,[["render",Rr]]),$r={name:"StopCircleIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},Mr=["aria-hidden","aria-label"],xr=["fill","width","height"],Fr={d:"M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M9,9H15V15H9"},Ur={key:0};function Hr(e,n,o,l,r,i){return t.openBlock(),t.createElementBlock("span",t.mergeProps(e.$attrs,{"aria-hidden":o.title?null:!0,"aria-label":o.title,class:"material-design-icon stop-circle-icon",role:"img",onClick:n[0]||(n[0]=a=>e.$emit("click",a))}),[(t.openBlock(),t.createElementBlock("svg",{fill:o.fillColor,class:"material-design-icon__svg",width:o.size,height:o.size,viewBox:"0 0 24 24"},[t.createElementVNode("path",Fr,[o.title?(t.openBlock(),t.createElementBlock("title",Ur,t.toDisplayString(o.title),1)):t.createCommentVNode("",!0)])],8,xr))],16,Mr)}const zr=B($r,[["render",Hr]]),Gr={name:"SkipPreviousCircleIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},Wr=["aria-hidden","aria-label"],jr=["fill","width","height"],Kr={d:"M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M8,8H10V16H8M16,8V16L11,12"},Yr={key:0};function qr(e,n,o,l,r,i){return t.openBlock(),t.createElementBlock("span",t.mergeProps(e.$attrs,{"aria-hidden":o.title?null:!0,"aria-label":o.title,class:"material-design-icon skip-previous-circle-icon",role:"img",onClick:n[0]||(n[0]=a=>e.$emit("click",a))}),[(t.openBlock(),t.createElementBlock("svg",{fill:o.fillColor,class:"material-design-icon__svg",width:o.size,height:o.size,viewBox:"0 0 24 24"},[t.createElementVNode("path",Kr,[o.title?(t.openBlock(),t.createElementBlock("title",Yr,t.toDisplayString(o.title),1)):t.createCommentVNode("",!0)])],8,jr))],16,Wr)}const Xr=B(Gr,[["render",qr]]),Zr={name:"AlertCircleIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},Jr=["aria-hidden","aria-label"],Qr=["fill","width","height"],ei={d:"M13,13H11V7H13M13,17H11V15H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z"},ti={key:0};function ni(e,n,o,l,r,i){return t.openBlock(),t.createElementBlock("span",t.mergeProps(e.$attrs,{"aria-hidden":o.title?null:!0,"aria-label":o.title,class:"material-design-icon alert-circle-icon",role:"img",onClick:n[0]||(n[0]=a=>e.$emit("click",a))}),[(t.openBlock(),t.createElementBlock("svg",{fill:o.fillColor,class:"material-design-icon__svg",width:o.size,height:o.size,viewBox:"0 0 24 24"},[t.createElementVNode("path",ei,[o.title?(t.openBlock(),t.createElementBlock("title",ti,t.toDisplayString(o.title),1)):t.createCommentVNode("",!0)])],8,Qr))],16,Jr)}const un=B(Zr,[["render",ni]]),oi={name:"DotsVerticalCircleIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},li=["aria-hidden","aria-label"],ri=["fill","width","height"],ii={d:"M2,12A10,10 0 0,1 12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12M10.5,12A1.5,1.5 0 0,0 12,13.5A1.5,1.5 0 0,0 13.5,12A1.5,1.5 0 0,0 12,10.5A1.5,1.5 0 0,0 10.5,12M10.5,17.5A1.5,1.5 0 0,0 12,19A1.5,1.5 0 0,0 13.5,17.5A1.5,1.5 0 0,0 12,16A1.5,1.5 0 0,0 10.5,17.5M10.5,6.5A1.5,1.5 0 0,0 12,8A1.5,1.5 0 0,0 13.5,6.5A1.5,1.5 0 0,0 12,5A1.5,1.5 0 0,0 10.5,6.5Z"},ai={key:0};function si(e,n,o,l,r,i){return t.openBlock(),t.createElementBlock("span",t.mergeProps(e.$attrs,{"aria-hidden":o.title?null:!0,"aria-label":o.title,class:"material-design-icon dots-vertical-circle-icon",role:"img",onClick:n[0]||(n[0]=a=>e.$emit("click",a))}),[(t.openBlock(),t.createElementBlock("svg",{fill:o.fillColor,class:"material-design-icon__svg",width:o.size,height:o.size,viewBox:"0 0 24 24"},[t.createElementVNode("path",ii,[o.title?(t.openBlock(),t.createElementBlock("title",ai,t.toDisplayString(o.title),1)):t.createCommentVNode("",!0)])],8,ri))],16,li)}const ci=B(oi,[["render",si]]),ui={name:"MotionPauseOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},di=["aria-hidden","aria-label"],fi=["fill","width","height"],mi={d:"M22 12C22 6.46 17.54 2 12 2C10.83 2 9.7 2.19 8.62 2.56L9.32 4.5C10.17 4.16 11.06 3.97 12 3.97C16.41 3.97 20.03 7.59 20.03 12C20.03 16.41 16.41 20.03 12 20.03C7.59 20.03 3.97 16.41 3.97 12C3.97 11.06 4.16 10.12 4.5 9.28L2.56 8.62C2.19 9.7 2 10.83 2 12C2 17.54 6.46 22 12 22C17.54 22 22 17.54 22 12M5.47 7C4.68 7 3.97 6.32 3.97 5.47C3.97 4.68 4.68 3.97 5.47 3.97C6.32 3.97 7 4.68 7 5.47C7 6.32 6.32 7 5.47 7M9 9H11V15H9M13 9H15V15H13"},pi={key:0};function gi(e,n,o,l,r,i){return t.openBlock(),t.createElementBlock("span",t.mergeProps(e.$attrs,{"aria-hidden":o.title?null:!0,"aria-label":o.title,class:"material-design-icon motion-pause-outline-icon",role:"img",onClick:n[0]||(n[0]=a=>e.$emit("click",a))}),[(t.openBlock(),t.createElementBlock("svg",{fill:o.fillColor,class:"material-design-icon__svg",width:o.size,height:o.size,viewBox:"0 0 24 24"},[t.createElementVNode("path",mi,[o.title?(t.openBlock(),t.createElementBlock("title",pi,t.toDisplayString(o.title),1)):t.createCommentVNode("",!0)])],8,fi))],16,di)}const hi=B(ui,[["render",gi]]),Ei={name:"RefreshIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},ki=["aria-hidden","aria-label"],_i=["fill","width","height"],yi={d:"M17.65,6.35C16.2,4.9 14.21,4 12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20C15.73,20 18.84,17.45 19.73,14H17.65C16.83,16.33 14.61,18 12,18A6,6 0 0,1 6,12A6,6 0 0,1 12,6C13.66,6 15.14,6.69 16.22,7.78L13,11H20V4L17.65,6.35Z"},Ci={key:0};function Ni(e,n,o,l,r,i){return t.openBlock(),t.createElementBlock("span",t.mergeProps(e.$attrs,{"aria-hidden":o.title?null:!0,"aria-label":o.title,class:"material-design-icon refresh-icon",role:"img",onClick:n[0]||(n[0]=a=>e.$emit("click",a))}),[(t.openBlock(),t.createElementBlock("svg",{fill:o.fillColor,class:"material-design-icon__svg",width:o.size,height:o.size,viewBox:"0 0 24 24"},[t.createElementVNode("path",yi,[o.title?(t.openBlock(),t.createElementBlock("title",Ci,t.toDisplayString(o.title),1)):t.createCommentVNode("",!0)])],8,_i))],16,ki)}const Kn=B(Ei,[["render",Ni]]),vi={name:"CancelIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},Si=["aria-hidden","aria-label"],bi=["fill","width","height"],Li={d:"M12 2C17.5 2 22 6.5 22 12S17.5 22 12 22 2 17.5 2 12 6.5 2 12 2M12 4C10.1 4 8.4 4.6 7.1 5.7L18.3 16.9C19.3 15.5 20 13.8 20 12C20 7.6 16.4 4 12 4M16.9 18.3L5.7 7.1C4.6 8.4 4 10.1 4 12C4 16.4 7.6 20 12 20C13.9 20 15.6 19.4 16.9 18.3Z"},Ti={key:0};function wi(e,n,o,l,r,i){return t.openBlock(),t.createElementBlock("span",t.mergeProps(e.$attrs,{"aria-hidden":o.title?null:!0,"aria-label":o.title,class:"material-design-icon cancel-icon",role:"img",onClick:n[0]||(n[0]=a=>e.$emit("click",a))}),[(t.openBlock(),t.createElementBlock("svg",{fill:o.fillColor,class:"material-design-icon__svg",width:o.size,height:o.size,viewBox:"0 0 24 24"},[t.createElementVNode("path",Li,[o.title?(t.openBlock(),t.createElementBlock("title",Ti,t.toDisplayString(o.title),1)):t.createCommentVNode("",!0)])],8,bi))],16,Si)}const Yn=B(vi,[["render",wi]]),G=Object.freeze({CREATED:{name:"CREATED",color:"#1761FD",colorClass:"cyan",icon:ci,isRunning:!0,isKillable:!0,isFailed:!1},RESTARTED:{name:"RESTARTED",color:"#1761FD",colorClass:"cyan",icon:Xr,isRunning:!1,isKillable:!0,isFailed:!1},SUCCESS:{name:"SUCCESS",color:"#029E73",colorClass:"green",icon:vr,isRunning:!1,isKillable:!1,isFailed:!1},RUNNING:{name:"RUNNING",color:"#8405FF",colorClass:"purple",icon:Ir,isRunning:!0,isKillable:!0,isFailed:!1},KILLING:{name:"KILLING",color:"#FCE07C",colorClass:"yellow",icon:cn,isRunning:!0,isKillable:!0,isFailed:!0},KILLED:{name:"KILLED",color:"#FCE07C",colorClass:"yellow",icon:zr,isRunning:!1,isKillable:!1,isFailed:!0},WARNING:{name:"WARNING",color:"#DD5F00",colorClass:"orange",icon:un,isRunning:!1,isKillable:!1,isFailed:!0},FAILED:{name:"FAILED",color:"#AB0009",colorClass:"red",icon:cn,isRunning:!1,isKillable:!1,isFailed:!0},PAUSED:{name:"PAUSED",color:"#918BA9",colorClass:"indigo",icon:jn,isRunning:!0,isKillable:!0,isFailed:!1},CANCELLED:{name:"CANCELLED",color:"#918BA9",colorClass:"gray",icon:Yn,isRunning:!1,isKillable:!1,isFailed:!0},SKIPPED:{name:"SKIPPED",color:"#918BA9",colorClass:"gray",icon:Yn,isRunning:!1,isKillable:!1,isFailed:!0},QUEUED:{name:"QUEUED",color:"#918BA9",colorClass:"gray",icon:hi,isRunning:!1,isKillable:!1,isFailed:!1},RETRYING:{name:"RETRYING",color:"#918BA9",colorClass:"gray",icon:Kn,isRunning:!1,isKillable:!0,isFailed:!1},RETRIED:{name:"RETRIED",color:"#918BA9",colorClass:"gray",icon:Kn,isRunning:!1,isKillable:!1,isFailed:!1},BREAKPOINT:{name:"BREAKPOINT",color:"#918BA9",colorClass:"gray",icon:jn,isRunning:!1,isKillable:!1,isFailed:!1}});class ae{static get CREATED(){return G.CREATED.name}static get RESTARTED(){return G.RESTARTED.name}static get SUCCESS(){return G.SUCCESS.name}static get RUNNING(){return G.RUNNING.name}static get KILLING(){return G.KILLING.name}static get KILLED(){return G.KILLED.name}static get FAILED(){return G.FAILED.name}static get WARNING(){return G.WARNING.name}static get PAUSED(){return G.PAUSED.name}static get CANCELLED(){return G.CANCELLED.name}static get QUEUED(){return G.QUEUED.name}static get RETRYING(){return G.RETRYING.name}static get RETRIED(){return G.RETRIED.name}static get BREAKPOINT(){return G.BREAKPOINT.name}static isRunning(n){return G[n]&&G[n].isRunning}static isKillable(n){return G[n]&&G[n].isKillable}static isPaused(n){return G[n]&&G[n]===G.PAUSED}static isFailed(n){return G[n]&&G[n].isFailed}static isQueued(n){return G[n]&&G[n]===G.QUEUED}static allStates(){return gt(G,n=>({key:n.name,icon:n.icon,color:""}))}static arrayAllStates(){return Object.values(G)}static colorClass(){return gt(G,n=>n.colorClass)}static color(){return gt(G,n=>Ne("--bs-"+n.colorClass))}static getStateColor(n){return G[n].color}static icon(){return gt(G,n=>n.icon)}static getTerminatedStates(){return Object.values(G).filter(n=>!n.isRunning).map(n=>n.name)}}let ht;async function Ai(){if(ht)return ht;const e=await Promise.resolve().then(()=>require("./useMarkdownParser-CPHSSwzs.cjs")).then(o=>o.useMarkdownParser);return ht=await(e.default??e)(),ht}var vt={exports:{}},Ii=vt.exports,qn;function Vi(){return qn||(qn=1,function(e,n){(function(o,l,r){e.exports=r(),e.exports.default=r()})("slugify",Ii,function(){var o=JSON.parse(`{"$":"dollar","%":"percent","&":"and","<":"less",">":"greater","|":"or","¢":"cent","£":"pound","¤":"currency","¥":"yen","©":"(c)","ª":"a","®":"(r)","º":"o","À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","Æ":"AE","Ç":"C","È":"E","É":"E","Ê":"E","Ë":"E","Ì":"I","Í":"I","Î":"I","Ï":"I","Ð":"D","Ñ":"N","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","Ù":"U","Ú":"U","Û":"U","Ü":"U","Ý":"Y","Þ":"TH","ß":"ss","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","æ":"ae","ç":"c","è":"e","é":"e","ê":"e","ë":"e","ì":"i","í":"i","î":"i","ï":"i","ð":"d","ñ":"n","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","ù":"u","ú":"u","û":"u","ü":"u","ý":"y","þ":"th","ÿ":"y","Ā":"A","ā":"a","Ă":"A","ă":"a","Ą":"A","ą":"a","Ć":"C","ć":"c","Č":"C","č":"c","Ď":"D","ď":"d","Đ":"DJ","đ":"dj","Ē":"E","ē":"e","Ė":"E","ė":"e","Ę":"e","ę":"e","Ě":"E","ě":"e","Ğ":"G","ğ":"g","Ģ":"G","ģ":"g","Ĩ":"I","ĩ":"i","Ī":"i","ī":"i","Į":"I","į":"i","İ":"I","ı":"i","Ķ":"k","ķ":"k","Ļ":"L","ļ":"l","Ľ":"L","ľ":"l","Ł":"L","ł":"l","Ń":"N","ń":"n","Ņ":"N","ņ":"n","Ň":"N","ň":"n","Ō":"O","ō":"o","Ő":"O","ő":"o","Œ":"OE","œ":"oe","Ŕ":"R","ŕ":"r","Ř":"R","ř":"r","Ś":"S","ś":"s","Ş":"S","ş":"s","Š":"S","š":"s","Ţ":"T","ţ":"t","Ť":"T","ť":"t","Ũ":"U","ũ":"u","Ū":"u","ū":"u","Ů":"U","ů":"u","Ű":"U","ű":"u","Ų":"U","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","ź":"z","Ż":"Z","ż":"z","Ž":"Z","ž":"z","Ə":"E","ƒ":"f","Ơ":"O","ơ":"o","Ư":"U","ư":"u","Lj":"LJ","lj":"lj","Nj":"NJ","nj":"nj","Ș":"S","ș":"s","Ț":"T","ț":"t","ə":"e","˚":"o","Ά":"A","Έ":"E","Ή":"H","Ί":"I","Ό":"O","Ύ":"Y","Ώ":"W","ΐ":"i","Α":"A","Β":"B","Γ":"G","Δ":"D","Ε":"E","Ζ":"Z","Η":"H","Θ":"8","Ι":"I","Κ":"K","Λ":"L","Μ":"M","Ν":"N","Ξ":"3","Ο":"O","Π":"P","Ρ":"R","Σ":"S","Τ":"T","Υ":"Y","Φ":"F","Χ":"X","Ψ":"PS","Ω":"W","Ϊ":"I","Ϋ":"Y","ά":"a","έ":"e","ή":"h","ί":"i","ΰ":"y","α":"a","β":"b","γ":"g","δ":"d","ε":"e","ζ":"z","η":"h","θ":"8","ι":"i","κ":"k","λ":"l","μ":"m","ν":"n","ξ":"3","ο":"o","π":"p","ρ":"r","ς":"s","σ":"s","τ":"t","υ":"y","φ":"f","χ":"x","ψ":"ps","ω":"w","ϊ":"i","ϋ":"y","ό":"o","ύ":"y","ώ":"w","Ё":"Yo","Ђ":"DJ","Є":"Ye","І":"I","Ї":"Yi","Ј":"J","Љ":"LJ","Њ":"NJ","Ћ":"C","Џ":"DZ","А":"A","Б":"B","В":"V","Г":"G","Д":"D","Е":"E","Ж":"Zh","З":"Z","И":"I","Й":"J","К":"K","Л":"L","М":"M","Н":"N","О":"O","П":"P","Р":"R","С":"S","Т":"T","У":"U","Ф":"F","Х":"H","Ц":"C","Ч":"Ch","Ш":"Sh","Щ":"Sh","Ъ":"U","Ы":"Y","Ь":"","Э":"E","Ю":"Yu","Я":"Ya","а":"a","б":"b","в":"v","г":"g","д":"d","е":"e","ж":"zh","з":"z","и":"i","й":"j","к":"k","л":"l","м":"m","н":"n","о":"o","п":"p","р":"r","с":"s","т":"t","у":"u","ф":"f","х":"h","ц":"c","ч":"ch","ш":"sh","щ":"sh","ъ":"u","ы":"y","ь":"","э":"e","ю":"yu","я":"ya","ё":"yo","ђ":"dj","є":"ye","і":"i","ї":"yi","ј":"j","љ":"lj","њ":"nj","ћ":"c","ѝ":"u","џ":"dz","Ґ":"G","ґ":"g","Ғ":"GH","ғ":"gh","Қ":"KH","қ":"kh","Ң":"NG","ң":"ng","Ү":"UE","ү":"ue","Ұ":"U","ұ":"u","Һ":"H","һ":"h","Ә":"AE","ә":"ae","Ө":"OE","ө":"oe","Ա":"A","Բ":"B","Գ":"G","Դ":"D","Ե":"E","Զ":"Z","Է":"E'","Ը":"Y'","Թ":"T'","Ժ":"JH","Ի":"I","Լ":"L","Խ":"X","Ծ":"C'","Կ":"K","Հ":"H","Ձ":"D'","Ղ":"GH","Ճ":"TW","Մ":"M","Յ":"Y","Ն":"N","Շ":"SH","Չ":"CH","Պ":"P","Ջ":"J","Ռ":"R'","Ս":"S","Վ":"V","Տ":"T","Ր":"R","Ց":"C","Փ":"P'","Ք":"Q'","Օ":"O''","Ֆ":"F","և":"EV","ء":"a","آ":"aa","أ":"a","ؤ":"u","إ":"i","ئ":"e","ا":"a","ب":"b","ة":"h","ت":"t","ث":"th","ج":"j","ح":"h","خ":"kh","د":"d","ذ":"th","ر":"r","ز":"z","س":"s","ش":"sh","ص":"s","ض":"dh","ط":"t","ظ":"z","ع":"a","غ":"gh","ف":"f","ق":"q","ك":"k","ل":"l","م":"m","ن":"n","ه":"h","و":"w","ى":"a","ي":"y","ً":"an","ٌ":"on","ٍ":"en","َ":"a","ُ":"u","ِ":"e","ْ":"","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","پ":"p","چ":"ch","ژ":"zh","ک":"k","گ":"g","ی":"y","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9","฿":"baht","ა":"a","ბ":"b","გ":"g","დ":"d","ე":"e","ვ":"v","ზ":"z","თ":"t","ი":"i","კ":"k","ლ":"l","მ":"m","ნ":"n","ო":"o","პ":"p","ჟ":"zh","რ":"r","ს":"s","ტ":"t","უ":"u","ფ":"f","ქ":"k","ღ":"gh","ყ":"q","შ":"sh","ჩ":"ch","ც":"ts","ძ":"dz","წ":"ts","ჭ":"ch","ხ":"kh","ჯ":"j","ჰ":"h","Ṣ":"S","ṣ":"s","Ẁ":"W","ẁ":"w","Ẃ":"W","ẃ":"w","Ẅ":"W","ẅ":"w","ẞ":"SS","Ạ":"A","ạ":"a","Ả":"A","ả":"a","Ấ":"A","ấ":"a","Ầ":"A","ầ":"a","Ẩ":"A","ẩ":"a","Ẫ":"A","ẫ":"a","Ậ":"A","ậ":"a","Ắ":"A","ắ":"a","Ằ":"A","ằ":"a","Ẳ":"A","ẳ":"a","Ẵ":"A","ẵ":"a","Ặ":"A","ặ":"a","Ẹ":"E","ẹ":"e","Ẻ":"E","ẻ":"e","Ẽ":"E","ẽ":"e","Ế":"E","ế":"e","Ề":"E","ề":"e","Ể":"E","ể":"e","Ễ":"E","ễ":"e","Ệ":"E","ệ":"e","Ỉ":"I","ỉ":"i","Ị":"I","ị":"i","Ọ":"O","ọ":"o","Ỏ":"O","ỏ":"o","Ố":"O","ố":"o","Ồ":"O","ồ":"o","Ổ":"O","ổ":"o","Ỗ":"O","ỗ":"o","Ộ":"O","ộ":"o","Ớ":"O","ớ":"o","Ờ":"O","ờ":"o","Ở":"O","ở":"o","Ỡ":"O","ỡ":"o","Ợ":"O","ợ":"o","Ụ":"U","ụ":"u","Ủ":"U","ủ":"u","Ứ":"U","ứ":"u","Ừ":"U","ừ":"u","Ử":"U","ử":"u","Ữ":"U","ữ":"u","Ự":"U","ự":"u","Ỳ":"Y","ỳ":"y","Ỵ":"Y","ỵ":"y","Ỷ":"Y","ỷ":"y","Ỹ":"Y","ỹ":"y","–":"-","‘":"'","’":"'","“":"\\"","”":"\\"","„":"\\"","†":"+","•":"*","…":"...","₠":"ecu","₢":"cruzeiro","₣":"french franc","₤":"lira","₥":"mill","₦":"naira","₧":"peseta","₨":"rupee","₩":"won","₪":"new shequel","₫":"dong","€":"euro","₭":"kip","₮":"tugrik","₯":"drachma","₰":"penny","₱":"peso","₲":"guarani","₳":"austral","₴":"hryvnia","₵":"cedi","₸":"kazakhstani tenge","₹":"indian rupee","₺":"turkish lira","₽":"russian ruble","₿":"bitcoin","℠":"sm","™":"tm","∂":"d","∆":"delta","∑":"sum","∞":"infinity","♥":"love","元":"yuan","円":"yen","﷼":"rial","ﻵ":"laa","ﻷ":"laa","ﻹ":"lai","ﻻ":"la"}`),l=JSON.parse('{"bg":{"Й":"Y","Ц":"Ts","Щ":"Sht","Ъ":"A","Ь":"Y","й":"y","ц":"ts","щ":"sht","ъ":"a","ь":"y"},"de":{"Ä":"AE","ä":"ae","Ö":"OE","ö":"oe","Ü":"UE","ü":"ue","ß":"ss","%":"prozent","&":"und","|":"oder","∑":"summe","∞":"unendlich","♥":"liebe"},"es":{"%":"por ciento","&":"y","<":"menor que",">":"mayor que","|":"o","¢":"centavos","£":"libras","¤":"moneda","₣":"francos","∑":"suma","∞":"infinito","♥":"amor"},"fr":{"%":"pourcent","&":"et","<":"plus petit",">":"plus grand","|":"ou","¢":"centime","£":"livre","¤":"devise","₣":"franc","∑":"somme","∞":"infini","♥":"amour"},"pt":{"%":"porcento","&":"e","<":"menor",">":"maior","|":"ou","¢":"centavo","∑":"soma","£":"libra","∞":"infinito","♥":"amor"},"uk":{"И":"Y","и":"y","Й":"Y","й":"y","Ц":"Ts","ц":"ts","Х":"Kh","х":"kh","Щ":"Shch","щ":"shch","Г":"H","г":"h"},"vi":{"Đ":"D","đ":"d"},"da":{"Ø":"OE","ø":"oe","Å":"AA","å":"aa","%":"procent","&":"og","|":"eller","$":"dollar","<":"mindre end",">":"større end"},"nb":{"&":"og","Å":"AA","Æ":"AE","Ø":"OE","å":"aa","æ":"ae","ø":"oe"},"it":{"&":"e"},"nl":{"&":"en"},"sv":{"&":"och","Å":"AA","Ä":"AE","Ö":"OE","å":"aa","ä":"ae","ö":"oe"}}');function r(i,a){if(typeof i!="string")throw new Error("slugify: string argument expected");a=typeof a=="string"?{replacement:a}:a||{};var s=l[a.locale]||{},c=a.replacement===void 0?"-":a.replacement,d=a.trim===void 0?!0:a.trim,m=i.normalize().split("").reduce(function(E,h){var C=s[h];return C===void 0&&(C=o[h]),C===void 0&&(C=h),C===c&&(C=" "),E+C.replace(a.remove||/[^\w\s$*_+~.()'"!\-:@]+/g,"")},"");return a.strict&&(m=m.replace(/[^A-Za-z0-9\s]/g,"")),d&&(m=m.trim()),m=m.replace(/\s+/g,c),a.lower&&(m=m.toLowerCase()),m}return r.extend=function(i){Object.assign(o,i)},r})}(vt)),vt.exports}var Oi=Vi();const Ro=W.getDefaultExportFromCjs(Oi);Ro.extend({"(":"-",")":""});function je(e){return Ro(e,{lower:!0,locale:"en"})}function $o(e,n){var o;return Array.isArray(n)&&!["categories","controllers","storages","aliases","guides"].includes(e)&&(n.length===0||((o=n[0])==null?void 0:o.cls)!==void 0)}function Je(e){const n=e.title.replaceAll(/\.([a-zA-Z])/g,(o,l)=>` ${l.toUpperCase()}`);return n.charAt(0).toUpperCase()+n.slice(1)}/*!
|
|
1
|
+
"use strict";var er=Object.create;var Gn=Object.defineProperty;var tr=Object.getOwnPropertyDescriptor;var nr=Object.getOwnPropertyNames;var or=Object.getPrototypeOf,lr=Object.prototype.hasOwnProperty;var rr=(e,n,o,l)=>{if(n&&typeof n=="object"||typeof n=="function")for(let r of nr(n))!lr.call(e,r)&&r!==o&&Gn(e,r,{get:()=>n[r],enumerable:!(l=tr(n,r))||l.enumerable});return e};var ir=(e,n,o)=>(o=e!=null?er(or(e)):{},rr(n||!e||!e.__esModule?Gn(o,"default",{value:e,enumerable:!0}):o,e));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const We=require("yaml"),y=require("./VueFlowUtils-CL70qtJ4.cjs"),W=require("./FlowYamlUtils-DAm_-0Qh.cjs"),t=require("vue"),re=require("@vue-flow/core"),tn=require("@vue-flow/controls"),nn=require("moment"),ar=require("@popperjs/core"),bt=require("vue-router"),sr={lineWidth:0},Wn=["tasks","triggers","errors","finally","afterExecution","pluginDefaults"],cr={stringify:W.stringify,parse:W.parse,pairsToMap:W.pairsToMap,extractTask(e,n){for(const o of Wn){const l=W.extractBlock({source:e,section:o,key:n});if(l)return l}},_extractTask(e,n,o){function l(i){if(i){if(i instanceof We.YAMLMap&&i.get("type")!==void 0&&n===i.get("id"))return o?o(i):i;if(i.items)for(const[a,s]of i.items.entries()){let c;if(s instanceof We.YAMLMap?c=l(s):c=l(s.value),c&&(o&&(i instanceof We.YAMLMap?i.set(s.key.value,c):i.items[a]=c),!o&&c))return c}}}const r=l(e.contents);if(r!==void 0)return o?new We.Document(r):new We.Document(r)},replaceTaskInDocument(e,n,o,l="tasks",r="id"){return W.replaceBlockInDocument({source:e,section:l,keyName:r,key:n,newContent:o})},sort:W.sort,getAllCharts:W.getAllCharts,getChartAtPosition:W.getChartAtPosition,localizeElementAtIndex:W.localizeElementAtIndex,getTaskType:W.getTypeAtPosition,swapTasks(e,n,o){const l=We.parseDocument(e),r=this._extractTask(l,n),i=this._extractTask(l,o);return We.visit(l,{Pair(a,s){if(s.key.value==="dependsOn"&&s.value.items.map(c=>c.value).includes(o))throw{message:"dependency task",messageOptions:{taskId:o}}}}),this._extractTask(l,n,()=>i),this._extractTask(l,o,()=>r),l.toString(sr)},insertTask(e,n,o,l,r){return W.insertBlock({source:e,section:"tasks",newBlock:o,refKey:n,position:l,parentKey:r})},insertSection(e,n,o){return W.insertBlock({source:n,section:e,newBlock:o})},insertErrorInFlowable:W.insertErrorInFlowable,deleteSection(e,n,o){return W.deleteBlock({source:e,section:n,key:o})},deleteTask(e,n,o){return(o===y.SECTIONS.TASKS?["tasks","errors"]:["triggers"]).reduce((r,i)=>W.deleteBlock({source:r,section:i,key:n}),e)},getLastTask(e,n){return W.getLastBlock({source:e,section:"tasks",parentKey:n})},checkTaskAlreadyExist(e,n){return W.checkBlockAlreadyExists({source:e,section:"tasks",newContent:n,keyName:"id"})},isParentChildrenRelation(e,n,o){return W.isParentChildrenRelation({source:e,sections:Wn,key1:n,key2:o,keyName:"id"})},replaceIdAndNamespace:W.replaceIdAndNamespace,updateMetadata:W.updateMetadata,cleanMetadata:W.cleanMetadata,getMetadata:W.getMetadata,deleteMetadata:W.deleteMetadata,flowHaveTasks:W.flowHaveTasks,extractPluginDefault:W.extractPluginDefault,replacePluginDefaultsInDocument:W.replacePluginDefaultsInDocument,deletePluginDefaults:W.deletePluginDefaults,extractFieldFromMaps:W.extractFieldFromMaps,getVersionAtPosition:W.getVersionAtPosition},Ne=e=>{const n=document.querySelector(":root"),o=n?getComputedStyle(n):null;return o==null?void 0:o.getPropertyValue(e)};var ur=y.requireMapValues();const gt=W.getDefaultExportFromCjs(ur),B=(e,n)=>{const o=e.__vccOpts||e;for(const[l,r]of n)o[l]=r;return o},dr={name:"PauseCircleIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},fr=["aria-hidden","aria-label"],mr=["fill","width","height"],pr={d:"M15,16H13V8H15M11,16H9V8H11M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z"},gr={key:0};function hr(e,n,o,l,r,i){return t.openBlock(),t.createElementBlock("span",t.mergeProps(e.$attrs,{"aria-hidden":o.title?null:!0,"aria-label":o.title,class:"material-design-icon pause-circle-icon",role:"img",onClick:n[0]||(n[0]=a=>e.$emit("click",a))}),[(t.openBlock(),t.createElementBlock("svg",{fill:o.fillColor,class:"material-design-icon__svg",width:o.size,height:o.size,viewBox:"0 0 24 24"},[t.createElementVNode("path",pr,[o.title?(t.openBlock(),t.createElementBlock("title",gr,t.toDisplayString(o.title),1)):t.createCommentVNode("",!0)])],8,mr))],16,fr)}const jn=B(dr,[["render",hr]]),Er={name:"CheckCircleIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},kr=["aria-hidden","aria-label"],_r=["fill","width","height"],yr={d:"M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M10 17L5 12L6.41 10.59L10 14.17L17.59 6.58L19 8L10 17Z"},Cr={key:0};function Nr(e,n,o,l,r,i){return t.openBlock(),t.createElementBlock("span",t.mergeProps(e.$attrs,{"aria-hidden":o.title?null:!0,"aria-label":o.title,class:"material-design-icon check-circle-icon",role:"img",onClick:n[0]||(n[0]=a=>e.$emit("click",a))}),[(t.openBlock(),t.createElementBlock("svg",{fill:o.fillColor,class:"material-design-icon__svg",width:o.size,height:o.size,viewBox:"0 0 24 24"},[t.createElementVNode("path",yr,[o.title?(t.openBlock(),t.createElementBlock("title",Cr,t.toDisplayString(o.title),1)):t.createCommentVNode("",!0)])],8,_r))],16,kr)}const vr=B(Er,[["render",Nr]]),Sr={name:"PlayCircleIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},br=["aria-hidden","aria-label"],Lr=["fill","width","height"],Tr={d:"M10,16.5V7.5L16,12M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z"},wr={key:0};function Ar(e,n,o,l,r,i){return t.openBlock(),t.createElementBlock("span",t.mergeProps(e.$attrs,{"aria-hidden":o.title?null:!0,"aria-label":o.title,class:"material-design-icon play-circle-icon",role:"img",onClick:n[0]||(n[0]=a=>e.$emit("click",a))}),[(t.openBlock(),t.createElementBlock("svg",{fill:o.fillColor,class:"material-design-icon__svg",width:o.size,height:o.size,viewBox:"0 0 24 24"},[t.createElementVNode("path",Tr,[o.title?(t.openBlock(),t.createElementBlock("title",wr,t.toDisplayString(o.title),1)):t.createCommentVNode("",!0)])],8,Lr))],16,br)}const Ir=B(Sr,[["render",Ar]]),Vr={name:"CloseCircleIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},Or=["aria-hidden","aria-label"],Dr=["fill","width","height"],Br={d:"M12,2C17.53,2 22,6.47 22,12C22,17.53 17.53,22 12,22C6.47,22 2,17.53 2,12C2,6.47 6.47,2 12,2M15.59,7L12,10.59L8.41,7L7,8.41L10.59,12L7,15.59L8.41,17L12,13.41L15.59,17L17,15.59L13.41,12L17,8.41L15.59,7Z"},Pr={key:0};function Rr(e,n,o,l,r,i){return t.openBlock(),t.createElementBlock("span",t.mergeProps(e.$attrs,{"aria-hidden":o.title?null:!0,"aria-label":o.title,class:"material-design-icon close-circle-icon",role:"img",onClick:n[0]||(n[0]=a=>e.$emit("click",a))}),[(t.openBlock(),t.createElementBlock("svg",{fill:o.fillColor,class:"material-design-icon__svg",width:o.size,height:o.size,viewBox:"0 0 24 24"},[t.createElementVNode("path",Br,[o.title?(t.openBlock(),t.createElementBlock("title",Pr,t.toDisplayString(o.title),1)):t.createCommentVNode("",!0)])],8,Dr))],16,Or)}const cn=B(Vr,[["render",Rr]]),$r={name:"StopCircleIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},Mr=["aria-hidden","aria-label"],xr=["fill","width","height"],Fr={d:"M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M9,9H15V15H9"},Ur={key:0};function Hr(e,n,o,l,r,i){return t.openBlock(),t.createElementBlock("span",t.mergeProps(e.$attrs,{"aria-hidden":o.title?null:!0,"aria-label":o.title,class:"material-design-icon stop-circle-icon",role:"img",onClick:n[0]||(n[0]=a=>e.$emit("click",a))}),[(t.openBlock(),t.createElementBlock("svg",{fill:o.fillColor,class:"material-design-icon__svg",width:o.size,height:o.size,viewBox:"0 0 24 24"},[t.createElementVNode("path",Fr,[o.title?(t.openBlock(),t.createElementBlock("title",Ur,t.toDisplayString(o.title),1)):t.createCommentVNode("",!0)])],8,xr))],16,Mr)}const zr=B($r,[["render",Hr]]),Gr={name:"SkipPreviousCircleIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},Wr=["aria-hidden","aria-label"],jr=["fill","width","height"],Kr={d:"M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M8,8H10V16H8M16,8V16L11,12"},Yr={key:0};function qr(e,n,o,l,r,i){return t.openBlock(),t.createElementBlock("span",t.mergeProps(e.$attrs,{"aria-hidden":o.title?null:!0,"aria-label":o.title,class:"material-design-icon skip-previous-circle-icon",role:"img",onClick:n[0]||(n[0]=a=>e.$emit("click",a))}),[(t.openBlock(),t.createElementBlock("svg",{fill:o.fillColor,class:"material-design-icon__svg",width:o.size,height:o.size,viewBox:"0 0 24 24"},[t.createElementVNode("path",Kr,[o.title?(t.openBlock(),t.createElementBlock("title",Yr,t.toDisplayString(o.title),1)):t.createCommentVNode("",!0)])],8,jr))],16,Wr)}const Xr=B(Gr,[["render",qr]]),Zr={name:"AlertCircleIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},Jr=["aria-hidden","aria-label"],Qr=["fill","width","height"],ei={d:"M13,13H11V7H13M13,17H11V15H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z"},ti={key:0};function ni(e,n,o,l,r,i){return t.openBlock(),t.createElementBlock("span",t.mergeProps(e.$attrs,{"aria-hidden":o.title?null:!0,"aria-label":o.title,class:"material-design-icon alert-circle-icon",role:"img",onClick:n[0]||(n[0]=a=>e.$emit("click",a))}),[(t.openBlock(),t.createElementBlock("svg",{fill:o.fillColor,class:"material-design-icon__svg",width:o.size,height:o.size,viewBox:"0 0 24 24"},[t.createElementVNode("path",ei,[o.title?(t.openBlock(),t.createElementBlock("title",ti,t.toDisplayString(o.title),1)):t.createCommentVNode("",!0)])],8,Qr))],16,Jr)}const un=B(Zr,[["render",ni]]),oi={name:"DotsVerticalCircleIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},li=["aria-hidden","aria-label"],ri=["fill","width","height"],ii={d:"M2,12A10,10 0 0,1 12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12M10.5,12A1.5,1.5 0 0,0 12,13.5A1.5,1.5 0 0,0 13.5,12A1.5,1.5 0 0,0 12,10.5A1.5,1.5 0 0,0 10.5,12M10.5,17.5A1.5,1.5 0 0,0 12,19A1.5,1.5 0 0,0 13.5,17.5A1.5,1.5 0 0,0 12,16A1.5,1.5 0 0,0 10.5,17.5M10.5,6.5A1.5,1.5 0 0,0 12,8A1.5,1.5 0 0,0 13.5,6.5A1.5,1.5 0 0,0 12,5A1.5,1.5 0 0,0 10.5,6.5Z"},ai={key:0};function si(e,n,o,l,r,i){return t.openBlock(),t.createElementBlock("span",t.mergeProps(e.$attrs,{"aria-hidden":o.title?null:!0,"aria-label":o.title,class:"material-design-icon dots-vertical-circle-icon",role:"img",onClick:n[0]||(n[0]=a=>e.$emit("click",a))}),[(t.openBlock(),t.createElementBlock("svg",{fill:o.fillColor,class:"material-design-icon__svg",width:o.size,height:o.size,viewBox:"0 0 24 24"},[t.createElementVNode("path",ii,[o.title?(t.openBlock(),t.createElementBlock("title",ai,t.toDisplayString(o.title),1)):t.createCommentVNode("",!0)])],8,ri))],16,li)}const ci=B(oi,[["render",si]]),ui={name:"MotionPauseOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},di=["aria-hidden","aria-label"],fi=["fill","width","height"],mi={d:"M22 12C22 6.46 17.54 2 12 2C10.83 2 9.7 2.19 8.62 2.56L9.32 4.5C10.17 4.16 11.06 3.97 12 3.97C16.41 3.97 20.03 7.59 20.03 12C20.03 16.41 16.41 20.03 12 20.03C7.59 20.03 3.97 16.41 3.97 12C3.97 11.06 4.16 10.12 4.5 9.28L2.56 8.62C2.19 9.7 2 10.83 2 12C2 17.54 6.46 22 12 22C17.54 22 22 17.54 22 12M5.47 7C4.68 7 3.97 6.32 3.97 5.47C3.97 4.68 4.68 3.97 5.47 3.97C6.32 3.97 7 4.68 7 5.47C7 6.32 6.32 7 5.47 7M9 9H11V15H9M13 9H15V15H13"},pi={key:0};function gi(e,n,o,l,r,i){return t.openBlock(),t.createElementBlock("span",t.mergeProps(e.$attrs,{"aria-hidden":o.title?null:!0,"aria-label":o.title,class:"material-design-icon motion-pause-outline-icon",role:"img",onClick:n[0]||(n[0]=a=>e.$emit("click",a))}),[(t.openBlock(),t.createElementBlock("svg",{fill:o.fillColor,class:"material-design-icon__svg",width:o.size,height:o.size,viewBox:"0 0 24 24"},[t.createElementVNode("path",mi,[o.title?(t.openBlock(),t.createElementBlock("title",pi,t.toDisplayString(o.title),1)):t.createCommentVNode("",!0)])],8,fi))],16,di)}const hi=B(ui,[["render",gi]]),Ei={name:"RefreshIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},ki=["aria-hidden","aria-label"],_i=["fill","width","height"],yi={d:"M17.65,6.35C16.2,4.9 14.21,4 12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20C15.73,20 18.84,17.45 19.73,14H17.65C16.83,16.33 14.61,18 12,18A6,6 0 0,1 6,12A6,6 0 0,1 12,6C13.66,6 15.14,6.69 16.22,7.78L13,11H20V4L17.65,6.35Z"},Ci={key:0};function Ni(e,n,o,l,r,i){return t.openBlock(),t.createElementBlock("span",t.mergeProps(e.$attrs,{"aria-hidden":o.title?null:!0,"aria-label":o.title,class:"material-design-icon refresh-icon",role:"img",onClick:n[0]||(n[0]=a=>e.$emit("click",a))}),[(t.openBlock(),t.createElementBlock("svg",{fill:o.fillColor,class:"material-design-icon__svg",width:o.size,height:o.size,viewBox:"0 0 24 24"},[t.createElementVNode("path",yi,[o.title?(t.openBlock(),t.createElementBlock("title",Ci,t.toDisplayString(o.title),1)):t.createCommentVNode("",!0)])],8,_i))],16,ki)}const Kn=B(Ei,[["render",Ni]]),vi={name:"CancelIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},Si=["aria-hidden","aria-label"],bi=["fill","width","height"],Li={d:"M12 2C17.5 2 22 6.5 22 12S17.5 22 12 22 2 17.5 2 12 6.5 2 12 2M12 4C10.1 4 8.4 4.6 7.1 5.7L18.3 16.9C19.3 15.5 20 13.8 20 12C20 7.6 16.4 4 12 4M16.9 18.3L5.7 7.1C4.6 8.4 4 10.1 4 12C4 16.4 7.6 20 12 20C13.9 20 15.6 19.4 16.9 18.3Z"},Ti={key:0};function wi(e,n,o,l,r,i){return t.openBlock(),t.createElementBlock("span",t.mergeProps(e.$attrs,{"aria-hidden":o.title?null:!0,"aria-label":o.title,class:"material-design-icon cancel-icon",role:"img",onClick:n[0]||(n[0]=a=>e.$emit("click",a))}),[(t.openBlock(),t.createElementBlock("svg",{fill:o.fillColor,class:"material-design-icon__svg",width:o.size,height:o.size,viewBox:"0 0 24 24"},[t.createElementVNode("path",Li,[o.title?(t.openBlock(),t.createElementBlock("title",Ti,t.toDisplayString(o.title),1)):t.createCommentVNode("",!0)])],8,bi))],16,Si)}const Yn=B(vi,[["render",wi]]),G=Object.freeze({CREATED:{name:"CREATED",color:"#1761FD",colorClass:"cyan",icon:ci,isRunning:!0,isKillable:!0,isFailed:!1},RESTARTED:{name:"RESTARTED",color:"#1761FD",colorClass:"cyan",icon:Xr,isRunning:!1,isKillable:!0,isFailed:!1},SUCCESS:{name:"SUCCESS",color:"#029E73",colorClass:"green",icon:vr,isRunning:!1,isKillable:!1,isFailed:!1},RUNNING:{name:"RUNNING",color:"#8405FF",colorClass:"purple",icon:Ir,isRunning:!0,isKillable:!0,isFailed:!1},KILLING:{name:"KILLING",color:"#FCE07C",colorClass:"yellow",icon:cn,isRunning:!0,isKillable:!0,isFailed:!0},KILLED:{name:"KILLED",color:"#FCE07C",colorClass:"yellow",icon:zr,isRunning:!1,isKillable:!1,isFailed:!0},WARNING:{name:"WARNING",color:"#DD5F00",colorClass:"orange",icon:un,isRunning:!1,isKillable:!1,isFailed:!0},FAILED:{name:"FAILED",color:"#AB0009",colorClass:"red",icon:cn,isRunning:!1,isKillable:!1,isFailed:!0},PAUSED:{name:"PAUSED",color:"#918BA9",colorClass:"indigo",icon:jn,isRunning:!0,isKillable:!0,isFailed:!1},CANCELLED:{name:"CANCELLED",color:"#918BA9",colorClass:"gray",icon:Yn,isRunning:!1,isKillable:!1,isFailed:!0},SKIPPED:{name:"SKIPPED",color:"#918BA9",colorClass:"gray",icon:Yn,isRunning:!1,isKillable:!1,isFailed:!0},QUEUED:{name:"QUEUED",color:"#918BA9",colorClass:"gray",icon:hi,isRunning:!1,isKillable:!1,isFailed:!1},RETRYING:{name:"RETRYING",color:"#918BA9",colorClass:"gray",icon:Kn,isRunning:!1,isKillable:!0,isFailed:!1},RETRIED:{name:"RETRIED",color:"#918BA9",colorClass:"gray",icon:Kn,isRunning:!1,isKillable:!1,isFailed:!1},BREAKPOINT:{name:"BREAKPOINT",color:"#918BA9",colorClass:"gray",icon:jn,isRunning:!1,isKillable:!1,isFailed:!1}});class ae{static get CREATED(){return G.CREATED.name}static get RESTARTED(){return G.RESTARTED.name}static get SUCCESS(){return G.SUCCESS.name}static get RUNNING(){return G.RUNNING.name}static get KILLING(){return G.KILLING.name}static get KILLED(){return G.KILLED.name}static get FAILED(){return G.FAILED.name}static get WARNING(){return G.WARNING.name}static get PAUSED(){return G.PAUSED.name}static get CANCELLED(){return G.CANCELLED.name}static get QUEUED(){return G.QUEUED.name}static get RETRYING(){return G.RETRYING.name}static get RETRIED(){return G.RETRIED.name}static get BREAKPOINT(){return G.BREAKPOINT.name}static isRunning(n){return G[n]&&G[n].isRunning}static isKillable(n){return G[n]&&G[n].isKillable}static isPaused(n){return G[n]&&G[n]===G.PAUSED}static isFailed(n){return G[n]&&G[n].isFailed}static isQueued(n){return G[n]&&G[n]===G.QUEUED}static allStates(){return gt(G,n=>({key:n.name,icon:n.icon,color:""}))}static arrayAllStates(){return Object.values(G)}static colorClass(){return gt(G,n=>n.colorClass)}static color(){return gt(G,n=>Ne("--bs-"+n.colorClass))}static getStateColor(n){return G[n].color}static icon(){return gt(G,n=>n.icon)}static getTerminatedStates(){return Object.values(G).filter(n=>!n.isRunning).map(n=>n.name)}}let ht;async function Ai(){if(ht)return ht;const e=await Promise.resolve().then(()=>require("./useMarkdownParser-CPHSSwzs.cjs")).then(o=>o.useMarkdownParser);return ht=await(e.default??e)(),ht}var vt={exports:{}},Ii=vt.exports,qn;function Vi(){return qn||(qn=1,function(e,n){(function(o,l,r){e.exports=r(),e.exports.default=r()})("slugify",Ii,function(){var o=JSON.parse(`{"$":"dollar","%":"percent","&":"and","<":"less",">":"greater","|":"or","¢":"cent","£":"pound","¤":"currency","¥":"yen","©":"(c)","ª":"a","®":"(r)","º":"o","À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","Æ":"AE","Ç":"C","È":"E","É":"E","Ê":"E","Ë":"E","Ì":"I","Í":"I","Î":"I","Ï":"I","Ð":"D","Ñ":"N","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","Ù":"U","Ú":"U","Û":"U","Ü":"U","Ý":"Y","Þ":"TH","ß":"ss","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","æ":"ae","ç":"c","è":"e","é":"e","ê":"e","ë":"e","ì":"i","í":"i","î":"i","ï":"i","ð":"d","ñ":"n","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","ù":"u","ú":"u","û":"u","ü":"u","ý":"y","þ":"th","ÿ":"y","Ā":"A","ā":"a","Ă":"A","ă":"a","Ą":"A","ą":"a","Ć":"C","ć":"c","Č":"C","č":"c","Ď":"D","ď":"d","Đ":"DJ","đ":"dj","Ē":"E","ē":"e","Ė":"E","ė":"e","Ę":"e","ę":"e","Ě":"E","ě":"e","Ğ":"G","ğ":"g","Ģ":"G","ģ":"g","Ĩ":"I","ĩ":"i","Ī":"i","ī":"i","Į":"I","į":"i","İ":"I","ı":"i","Ķ":"k","ķ":"k","Ļ":"L","ļ":"l","Ľ":"L","ľ":"l","Ł":"L","ł":"l","Ń":"N","ń":"n","Ņ":"N","ņ":"n","Ň":"N","ň":"n","Ō":"O","ō":"o","Ő":"O","ő":"o","Œ":"OE","œ":"oe","Ŕ":"R","ŕ":"r","Ř":"R","ř":"r","Ś":"S","ś":"s","Ş":"S","ş":"s","Š":"S","š":"s","Ţ":"T","ţ":"t","Ť":"T","ť":"t","Ũ":"U","ũ":"u","Ū":"u","ū":"u","Ů":"U","ů":"u","Ű":"U","ű":"u","Ų":"U","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","ź":"z","Ż":"Z","ż":"z","Ž":"Z","ž":"z","Ə":"E","ƒ":"f","Ơ":"O","ơ":"o","Ư":"U","ư":"u","Lj":"LJ","lj":"lj","Nj":"NJ","nj":"nj","Ș":"S","ș":"s","Ț":"T","ț":"t","ə":"e","˚":"o","Ά":"A","Έ":"E","Ή":"H","Ί":"I","Ό":"O","Ύ":"Y","Ώ":"W","ΐ":"i","Α":"A","Β":"B","Γ":"G","Δ":"D","Ε":"E","Ζ":"Z","Η":"H","Θ":"8","Ι":"I","Κ":"K","Λ":"L","Μ":"M","Ν":"N","Ξ":"3","Ο":"O","Π":"P","Ρ":"R","Σ":"S","Τ":"T","Υ":"Y","Φ":"F","Χ":"X","Ψ":"PS","Ω":"W","Ϊ":"I","Ϋ":"Y","ά":"a","έ":"e","ή":"h","ί":"i","ΰ":"y","α":"a","β":"b","γ":"g","δ":"d","ε":"e","ζ":"z","η":"h","θ":"8","ι":"i","κ":"k","λ":"l","μ":"m","ν":"n","ξ":"3","ο":"o","π":"p","ρ":"r","ς":"s","σ":"s","τ":"t","υ":"y","φ":"f","χ":"x","ψ":"ps","ω":"w","ϊ":"i","ϋ":"y","ό":"o","ύ":"y","ώ":"w","Ё":"Yo","Ђ":"DJ","Є":"Ye","І":"I","Ї":"Yi","Ј":"J","Љ":"LJ","Њ":"NJ","Ћ":"C","Џ":"DZ","А":"A","Б":"B","В":"V","Г":"G","Д":"D","Е":"E","Ж":"Zh","З":"Z","И":"I","Й":"J","К":"K","Л":"L","М":"M","Н":"N","О":"O","П":"P","Р":"R","С":"S","Т":"T","У":"U","Ф":"F","Х":"H","Ц":"C","Ч":"Ch","Ш":"Sh","Щ":"Sh","Ъ":"U","Ы":"Y","Ь":"","Э":"E","Ю":"Yu","Я":"Ya","а":"a","б":"b","в":"v","г":"g","д":"d","е":"e","ж":"zh","з":"z","и":"i","й":"j","к":"k","л":"l","м":"m","н":"n","о":"o","п":"p","р":"r","с":"s","т":"t","у":"u","ф":"f","х":"h","ц":"c","ч":"ch","ш":"sh","щ":"sh","ъ":"u","ы":"y","ь":"","э":"e","ю":"yu","я":"ya","ё":"yo","ђ":"dj","є":"ye","і":"i","ї":"yi","ј":"j","љ":"lj","њ":"nj","ћ":"c","ѝ":"u","џ":"dz","Ґ":"G","ґ":"g","Ғ":"GH","ғ":"gh","Қ":"KH","қ":"kh","Ң":"NG","ң":"ng","Ү":"UE","ү":"ue","Ұ":"U","ұ":"u","Һ":"H","һ":"h","Ә":"AE","ә":"ae","Ө":"OE","ө":"oe","Ա":"A","Բ":"B","Գ":"G","Դ":"D","Ե":"E","Զ":"Z","Է":"E'","Ը":"Y'","Թ":"T'","Ժ":"JH","Ի":"I","Լ":"L","Խ":"X","Ծ":"C'","Կ":"K","Հ":"H","Ձ":"D'","Ղ":"GH","Ճ":"TW","Մ":"M","Յ":"Y","Ն":"N","Շ":"SH","Չ":"CH","Պ":"P","Ջ":"J","Ռ":"R'","Ս":"S","Վ":"V","Տ":"T","Ր":"R","Ց":"C","Փ":"P'","Ք":"Q'","Օ":"O''","Ֆ":"F","և":"EV","ء":"a","آ":"aa","أ":"a","ؤ":"u","إ":"i","ئ":"e","ا":"a","ب":"b","ة":"h","ت":"t","ث":"th","ج":"j","ح":"h","خ":"kh","د":"d","ذ":"th","ر":"r","ز":"z","س":"s","ش":"sh","ص":"s","ض":"dh","ط":"t","ظ":"z","ع":"a","غ":"gh","ف":"f","ق":"q","ك":"k","ل":"l","م":"m","ن":"n","ه":"h","و":"w","ى":"a","ي":"y","ً":"an","ٌ":"on","ٍ":"en","َ":"a","ُ":"u","ِ":"e","ْ":"","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","پ":"p","چ":"ch","ژ":"zh","ک":"k","گ":"g","ی":"y","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9","฿":"baht","ა":"a","ბ":"b","გ":"g","დ":"d","ე":"e","ვ":"v","ზ":"z","თ":"t","ი":"i","კ":"k","ლ":"l","მ":"m","ნ":"n","ო":"o","პ":"p","ჟ":"zh","რ":"r","ს":"s","ტ":"t","უ":"u","ფ":"f","ქ":"k","ღ":"gh","ყ":"q","შ":"sh","ჩ":"ch","ც":"ts","ძ":"dz","წ":"ts","ჭ":"ch","ხ":"kh","ჯ":"j","ჰ":"h","Ṣ":"S","ṣ":"s","Ẁ":"W","ẁ":"w","Ẃ":"W","ẃ":"w","Ẅ":"W","ẅ":"w","ẞ":"SS","Ạ":"A","ạ":"a","Ả":"A","ả":"a","Ấ":"A","ấ":"a","Ầ":"A","ầ":"a","Ẩ":"A","ẩ":"a","Ẫ":"A","ẫ":"a","Ậ":"A","ậ":"a","Ắ":"A","ắ":"a","Ằ":"A","ằ":"a","Ẳ":"A","ẳ":"a","Ẵ":"A","ẵ":"a","Ặ":"A","ặ":"a","Ẹ":"E","ẹ":"e","Ẻ":"E","ẻ":"e","Ẽ":"E","ẽ":"e","Ế":"E","ế":"e","Ề":"E","ề":"e","Ể":"E","ể":"e","Ễ":"E","ễ":"e","Ệ":"E","ệ":"e","Ỉ":"I","ỉ":"i","Ị":"I","ị":"i","Ọ":"O","ọ":"o","Ỏ":"O","ỏ":"o","Ố":"O","ố":"o","Ồ":"O","ồ":"o","Ổ":"O","ổ":"o","Ỗ":"O","ỗ":"o","Ộ":"O","ộ":"o","Ớ":"O","ớ":"o","Ờ":"O","ờ":"o","Ở":"O","ở":"o","Ỡ":"O","ỡ":"o","Ợ":"O","ợ":"o","Ụ":"U","ụ":"u","Ủ":"U","ủ":"u","Ứ":"U","ứ":"u","Ừ":"U","ừ":"u","Ử":"U","ử":"u","Ữ":"U","ữ":"u","Ự":"U","ự":"u","Ỳ":"Y","ỳ":"y","Ỵ":"Y","ỵ":"y","Ỷ":"Y","ỷ":"y","Ỹ":"Y","ỹ":"y","–":"-","‘":"'","’":"'","“":"\\"","”":"\\"","„":"\\"","†":"+","•":"*","…":"...","₠":"ecu","₢":"cruzeiro","₣":"french franc","₤":"lira","₥":"mill","₦":"naira","₧":"peseta","₨":"rupee","₩":"won","₪":"new shequel","₫":"dong","€":"euro","₭":"kip","₮":"tugrik","₯":"drachma","₰":"penny","₱":"peso","₲":"guarani","₳":"austral","₴":"hryvnia","₵":"cedi","₸":"kazakhstani tenge","₹":"indian rupee","₺":"turkish lira","₽":"russian ruble","₿":"bitcoin","℠":"sm","™":"tm","∂":"d","∆":"delta","∑":"sum","∞":"infinity","♥":"love","元":"yuan","円":"yen","﷼":"rial","ﻵ":"laa","ﻷ":"laa","ﻹ":"lai","ﻻ":"la"}`),l=JSON.parse('{"bg":{"Й":"Y","Ц":"Ts","Щ":"Sht","Ъ":"A","Ь":"Y","й":"y","ц":"ts","щ":"sht","ъ":"a","ь":"y"},"de":{"Ä":"AE","ä":"ae","Ö":"OE","ö":"oe","Ü":"UE","ü":"ue","ß":"ss","%":"prozent","&":"und","|":"oder","∑":"summe","∞":"unendlich","♥":"liebe"},"es":{"%":"por ciento","&":"y","<":"menor que",">":"mayor que","|":"o","¢":"centavos","£":"libras","¤":"moneda","₣":"francos","∑":"suma","∞":"infinito","♥":"amor"},"fr":{"%":"pourcent","&":"et","<":"plus petit",">":"plus grand","|":"ou","¢":"centime","£":"livre","¤":"devise","₣":"franc","∑":"somme","∞":"infini","♥":"amour"},"pt":{"%":"porcento","&":"e","<":"menor",">":"maior","|":"ou","¢":"centavo","∑":"soma","£":"libra","∞":"infinito","♥":"amor"},"uk":{"И":"Y","и":"y","Й":"Y","й":"y","Ц":"Ts","ц":"ts","Х":"Kh","х":"kh","Щ":"Shch","щ":"shch","Г":"H","г":"h"},"vi":{"Đ":"D","đ":"d"},"da":{"Ø":"OE","ø":"oe","Å":"AA","å":"aa","%":"procent","&":"og","|":"eller","$":"dollar","<":"mindre end",">":"større end"},"nb":{"&":"og","Å":"AA","Æ":"AE","Ø":"OE","å":"aa","æ":"ae","ø":"oe"},"it":{"&":"e"},"nl":{"&":"en"},"sv":{"&":"och","Å":"AA","Ä":"AE","Ö":"OE","å":"aa","ä":"ae","ö":"oe"}}');function r(i,a){if(typeof i!="string")throw new Error("slugify: string argument expected");a=typeof a=="string"?{replacement:a}:a||{};var s=l[a.locale]||{},c=a.replacement===void 0?"-":a.replacement,d=a.trim===void 0?!0:a.trim,m=i.normalize().split("").reduce(function(E,h){var C=s[h];return C===void 0&&(C=o[h]),C===void 0&&(C=h),C===c&&(C=" "),E+C.replace(a.remove||/[^\w\s$*_+~.()'"!\-:@]+/g,"")},"");return a.strict&&(m=m.replace(/[^A-Za-z0-9\s]/g,"")),d&&(m=m.trim()),m=m.replace(/\s+/g,c),a.lower&&(m=m.toLowerCase()),m}return r.extend=function(i){Object.assign(o,i)},r})}(vt)),vt.exports}var Oi=Vi();const Ro=W.getDefaultExportFromCjs(Oi);Ro.extend({"(":"-",")":""});function je(e){return Ro(e,{lower:!0,locale:"en"})}function $o(e,n){var o;return Array.isArray(n)&&!["categories","controllers","storages","aliases","guides"].includes(e)&&(n.length===0||((o=n[0])==null?void 0:o.cls)!==void 0)}function Je(e){const n=e.title.replaceAll(/\.([a-zA-Z])/g,(o,l)=>` ${l.toUpperCase()}`);return n.charAt(0).toUpperCase()+n.slice(1)}/*!
|
|
2
2
|
* shared v11.1.3
|
|
3
3
|
* (c) 2025 kazuya kawaguchi
|
|
4
4
|
* Released under the MIT License.
|
package/dist/kestra-index.es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _l, { Document as yl, YAMLMap as Nn } from "yaml";
|
|
2
|
-
import { S as nt, r as Hr, E as $, U as ke, c as Br, g as zr, C as El, l as Gr } from "./VueFlowUtils-
|
|
3
|
-
import { N as e_, V as t_, e as n_, d as l_, a as i_, f as r_, s as o_, b as a_ } from "./VueFlowUtils-
|
|
4
|
-
import { g as Wr, e as jr, d as Kr, r as Yr, a as qr, f as Xr, b as Zr, c as Jr, h as Qr, u as eo, i as to, j as no, k as lo, l as io, m as ro, n as oo, s as ao, p as so, o as uo, q as co, t as gi, v as fo, w as mo, x as vl, y as bl, z as po, A as ho, B as _i, C as go } from "./FlowYamlUtils-
|
|
2
|
+
import { S as nt, r as Hr, E as $, U as ke, c as Br, g as zr, C as El, l as Gr } from "./VueFlowUtils-A_7_qgxS.js";
|
|
3
|
+
import { N as e_, V as t_, e as n_, d as l_, a as i_, f as r_, s as o_, b as a_ } from "./VueFlowUtils-A_7_qgxS.js";
|
|
4
|
+
import { g as Wr, e as jr, d as Kr, r as Yr, a as qr, f as Xr, b as Zr, c as Jr, h as Qr, u as eo, i as to, j as no, k as lo, l as io, m as ro, n as oo, s as ao, p as so, o as uo, q as co, t as gi, v as fo, w as mo, x as vl, y as bl, z as po, A as ho, B as _i, C as go } from "./FlowYamlUtils-MCAmyY3D.js";
|
|
5
5
|
import { createElementBlock as c, openBlock as u, mergeProps as K, createElementVNode as E, createCommentVNode as L, toDisplayString as V, getCurrentInstance as rn, inject as _o, ref as re, shallowRef as jt, computed as J, watch as Ge, onMounted as Rt, onUnmounted as yi, defineComponent as _e, h as Et, createVNode as x, Text as Nt, Fragment as Ee, nextTick as on, onBeforeUnmount as Ei, renderSlot as se, createTextVNode as Ze, normalizeClass as oe, createBlock as Q, withCtx as G, normalizeStyle as At, unref as P, toRef as Cl, resolveComponent as Kt, resolveDynamicComponent as mt, renderList as qe, createSlots as vi, provide as An, normalizeProps as yo, guardReactiveProps as Eo, withModifiers as bi, withAsyncContext as kl, toRaw as vo, reactive as bo, defineAsyncComponent as Co, Comment as ko, Suspense as Lo } from "vue";
|
|
6
6
|
import { Handle as $e, useVueFlow as Ci, Position as Ll, EdgeLabelRenderer as So, getSmoothStepPath as wo, VueFlow as To } from "@vue-flow/core";
|
|
7
7
|
import { Controls as No, ControlButton as Sl } from "@vue-flow/controls";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});require("@vue-flow/core");const e=require("./VueFlowUtils-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});require("@vue-flow/core");const e=require("./VueFlowUtils-CL70qtJ4.cjs");require("./FlowYamlUtils-DAm_-0Qh.cjs");exports.areTasksIdenticalInGraphUntilTask=e.areTasksIdenticalInGraphUntilTask;exports.cleanGraph=e.cleanGraph;exports.computeClusterColor=e.computeClusterColor;exports.default=e.VueFlowUtils;exports.flowHaveTasks=e.flowHaveTasks;exports.generateDagreGraph=e.generateDagreGraph;exports.generateGraph=e.generateGraph;exports.getEdgeColor=e.getEdgeColor;exports.getNextTaskNodes=e.getNextTaskNodes;exports.getNodeHeight=e.getNodeHeight;exports.getNodePosition=e.getNodePosition;exports.getNodeWidth=e.getNodeWidth;exports.getRootNodes=e.getRootNodes;exports.getTargetNodesEdges=e.getTargetNodesEdges;exports.haveAdd=e.haveAdd;exports.isClusterRootOrEnd=e.isClusterRootOrEnd;exports.isCollapsedCluster=e.isCollapsedCluster;exports.isExpandableTask=e.isExpandableTask;exports.isTaskNode=e.isTaskNode;exports.isTriggerNode=e.isTriggerNode;exports.linkedElements=e.linkedElements;exports.nodeColor=e.nodeColor;exports.predecessorsEdge=e.predecessorsEdge;exports.predecessorsNode=e.predecessorsNode;exports.replaceIfCollapsed=e.replaceIfCollapsed;exports.successorsEdge=e.successorsEdge;exports.successorsNode=e.successorsNode;
|
|
2
2
|
//# sourceMappingURL=kestra-vueflowutils.cjs.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "@vue-flow/core";
|
|
2
|
-
import { I as r, c as t, B as d, V as l, w as g, k as i, g as p, z as n, H as c, o as N, m as h, n as k, F as u, G as C, y as T, A as E, u as m, D as G, q as f, t as x, l as I, x as v, p as H, i as w, v as A, h as D, j as R } from "./VueFlowUtils-
|
|
3
|
-
import "./FlowYamlUtils-
|
|
2
|
+
import { I as r, c as t, B as d, V as l, w as g, k as i, g as p, z as n, H as c, o as N, m as h, n as k, F as u, G as C, y as T, A as E, u as m, D as G, q as f, t as x, l as I, x as v, p as H, i as w, v as A, h as D, j as R } from "./VueFlowUtils-A_7_qgxS.js";
|
|
3
|
+
import "./FlowYamlUtils-MCAmyY3D.js";
|
|
4
4
|
export {
|
|
5
5
|
r as areTasksIdenticalInGraphUntilTask,
|
|
6
6
|
t as cleanGraph,
|
|
@@ -136,4 +136,13 @@ export declare function getChartAtPosition(source: string, position: {
|
|
|
136
136
|
lineNumber: number;
|
|
137
137
|
column: number;
|
|
138
138
|
}): any;
|
|
139
|
+
/**
|
|
140
|
+
* Get line start and end for all tasks
|
|
141
|
+
* @param source - YAML source code
|
|
142
|
+
* @returns lines infos for each taskId
|
|
143
|
+
*/
|
|
144
|
+
export declare function getTasksLines(source: string): Record<string, {
|
|
145
|
+
start: number;
|
|
146
|
+
end: number;
|
|
147
|
+
}>;
|
|
139
148
|
//# sourceMappingURL=FlowYamlUtils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FlowYamlUtils.d.ts","sourceRoot":"","sources":["../../src/utils/FlowYamlUtils.ts"],"names":[],"mappings":"AACA,OAAO,EAEH,OAAO,EAWP,KAAK,EACR,MAAM,MAAM,CAAC;AAGd,wBAAgB,KAAK,CAAC,CAAC,GAAG,GAAG,EAAE,IAAI,CAAC,EAAE,MAAM,EAAE,YAAY,UAAO,GAAG,CAA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2DD,MAAM,MAAM,WAAW,GAAG;IACtB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC3B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,CAAC;IAC/B,KAAK,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;CACpC,CAAC;AAEF,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,GAAG,WAAW,CAiDzF;AAID,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,YAmB1C;AAED,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,OA+BlG;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CACzB,MAAM,EAAE,MAAM,GAChB,MAAM,CAAC,MAAM,EAAE;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAC,CAAC,CA0B7C"}
|
package/package.json
CHANGED
|
@@ -1493,4 +1493,145 @@ describe("cleanMetadata", () => {
|
|
|
1493
1493
|
expect(lines[0]).toBe("id: test");
|
|
1494
1494
|
expect(lines[1]).toBe("namespace: test");
|
|
1495
1495
|
});
|
|
1496
|
+
});
|
|
1497
|
+
|
|
1498
|
+
describe("get lines infos", () => {
|
|
1499
|
+
test("get tasks lines", () => {
|
|
1500
|
+
const yamlString = `# this count as an empty line
|
|
1501
|
+
tasks:
|
|
1502
|
+
- id: plugin1
|
|
1503
|
+
type: type1
|
|
1504
|
+
name: Plugin 1
|
|
1505
|
+
extrafield: Extra field 1
|
|
1506
|
+
- id: plugin2
|
|
1507
|
+
type: type2
|
|
1508
|
+
name: Plugin 2
|
|
1509
|
+
`;
|
|
1510
|
+
|
|
1511
|
+
const tasksLines = YamlUtils.getTasksLines(yamlString);
|
|
1512
|
+
expect(tasksLines).to.containSubset({plugin1: {start: 3, end: 6}});
|
|
1513
|
+
expect(tasksLines).to.containSubset({plugin2: {start: 7, end: 9}});
|
|
1514
|
+
})
|
|
1515
|
+
test("get tasks lines including comments and line breaks", () => {
|
|
1516
|
+
const yamlString = `# this count as an empty line
|
|
1517
|
+
# second comment
|
|
1518
|
+
tasks:
|
|
1519
|
+
# third comment
|
|
1520
|
+
- id: plugin1
|
|
1521
|
+
type: type1
|
|
1522
|
+
# fourth comment
|
|
1523
|
+
name: Plugin 1
|
|
1524
|
+
|
|
1525
|
+
|
|
1526
|
+
# end comment
|
|
1527
|
+
`;
|
|
1528
|
+
|
|
1529
|
+
const tasksLines = YamlUtils.getTasksLines(yamlString);
|
|
1530
|
+
expect(tasksLines).to.containSubset({plugin1: {start: 5, end: 8}});
|
|
1531
|
+
})
|
|
1532
|
+
test("get tasks lines including multiline field", () => {
|
|
1533
|
+
const yamlString = `# this count as an empty line
|
|
1534
|
+
tasks:
|
|
1535
|
+
- id: plugin1
|
|
1536
|
+
type: type1
|
|
1537
|
+
name: Plugin 1
|
|
1538
|
+
payload: |
|
|
1539
|
+
{
|
|
1540
|
+
"text": "Failure alert for flow {{ flow.namespace }}.{{ flow.id }} with ID {{ execution.id }}"
|
|
1541
|
+
}
|
|
1542
|
+
# end comment
|
|
1543
|
+
`;
|
|
1544
|
+
|
|
1545
|
+
const tasksLines = YamlUtils.getTasksLines(yamlString);
|
|
1546
|
+
expect(tasksLines).to.containSubset({plugin1: {start: 3, end: 9}});
|
|
1547
|
+
})
|
|
1548
|
+
test("get tasks lines for 'Dag' tasks", () => {
|
|
1549
|
+
const yamlString = `# this count as an empty line
|
|
1550
|
+
tasks:
|
|
1551
|
+
- id: log_task
|
|
1552
|
+
type: io.kestra.plugin.core.log.Log
|
|
1553
|
+
message: 'log msg'
|
|
1554
|
+
- id: dag_task
|
|
1555
|
+
type: io.kestra.plugin.core.flow.Dag
|
|
1556
|
+
tasks:
|
|
1557
|
+
- task:
|
|
1558
|
+
id: nested_task_1_inside_dag
|
|
1559
|
+
type: io.kestra.plugin.core.log.Log
|
|
1560
|
+
message: test1
|
|
1561
|
+
- task:
|
|
1562
|
+
id: nested_task_2_inside_dag
|
|
1563
|
+
type: io.kestra.plugin.core.log.Log
|
|
1564
|
+
message: test2
|
|
1565
|
+
`;
|
|
1566
|
+
|
|
1567
|
+
const tasksLines = YamlUtils.getTasksLines(yamlString);
|
|
1568
|
+
expect(tasksLines).to.containSubset({dag_task: {start: 6, end: 16}});
|
|
1569
|
+
expect(tasksLines).to.containSubset({nested_task_1_inside_dag: {start: 10, end: 12}});
|
|
1570
|
+
expect(tasksLines).to.containSubset({nested_task_2_inside_dag: {start: 14, end: 16}});
|
|
1571
|
+
})
|
|
1572
|
+
test("get tasks lines for 'Foreach' tasks", () => {
|
|
1573
|
+
const yamlString = `# this count as an empty line
|
|
1574
|
+
tasks:
|
|
1575
|
+
- id: for_each_task
|
|
1576
|
+
type: io.kestra.plugin.core.flow.ForEach
|
|
1577
|
+
values:
|
|
1578
|
+
- value 1
|
|
1579
|
+
tasks:
|
|
1580
|
+
- id: for_each_task_1
|
|
1581
|
+
type: io.kestra.plugin.core.log.Log
|
|
1582
|
+
message: test1
|
|
1583
|
+
`;
|
|
1584
|
+
|
|
1585
|
+
const tasksLines = YamlUtils.getTasksLines(yamlString);
|
|
1586
|
+
expect(tasksLines).to.containSubset({for_each_task: {start: 3, end: 10}});
|
|
1587
|
+
expect(tasksLines).to.containSubset({for_each_task_1: {start: 8, end: 10}});
|
|
1588
|
+
})
|
|
1589
|
+
test("get tasks lines for nested 'Foreach' tasks", () => {
|
|
1590
|
+
const yamlString = `# this count as an empty line
|
|
1591
|
+
tasks:
|
|
1592
|
+
- id: for_each
|
|
1593
|
+
type: io.kestra.plugin.core.flow.ForEach
|
|
1594
|
+
values:
|
|
1595
|
+
- value 1
|
|
1596
|
+
tasks:
|
|
1597
|
+
- id: for_each_task_1
|
|
1598
|
+
type: io.kestra.plugin.core.log.Log
|
|
1599
|
+
message: test1
|
|
1600
|
+
- id: nested_foreach
|
|
1601
|
+
type: io.kestra.plugin.core.flow.ForEach
|
|
1602
|
+
values:
|
|
1603
|
+
- value 2
|
|
1604
|
+
tasks:
|
|
1605
|
+
- id: nested_foreach_task1
|
|
1606
|
+
type: io.kestra.plugin.core.log.Log
|
|
1607
|
+
message: test2
|
|
1608
|
+
`;
|
|
1609
|
+
|
|
1610
|
+
const tasksLines = YamlUtils.getTasksLines(yamlString);
|
|
1611
|
+
expect(tasksLines).to.containSubset({for_each: {start: 3, end: 18}});
|
|
1612
|
+
expect(tasksLines).to.containSubset({for_each_task_1: {start: 8, end: 10}});
|
|
1613
|
+
expect(tasksLines).to.containSubset({nested_foreach: {start: 11, end: 18}});
|
|
1614
|
+
expect(tasksLines).to.containSubset({nested_foreach_task1: {start: 16, end: 18}});
|
|
1615
|
+
})
|
|
1616
|
+
test("get tasks lines for 'Condition' task", () => {
|
|
1617
|
+
const yamlString = `# this count as an empty line
|
|
1618
|
+
tasks:
|
|
1619
|
+
- id: if_task
|
|
1620
|
+
type: io.kestra.plugin.core.flow.If
|
|
1621
|
+
condition: "{{ inputs.string == 'Condition' }}"
|
|
1622
|
+
then:
|
|
1623
|
+
- id: when_true
|
|
1624
|
+
type: io.kestra.plugin.core.log.Log
|
|
1625
|
+
message: "Condition was true"
|
|
1626
|
+
else:
|
|
1627
|
+
- id: when_false
|
|
1628
|
+
type: io.kestra.plugin.core.log.Log
|
|
1629
|
+
message: "Condition was false"
|
|
1630
|
+
`;
|
|
1631
|
+
|
|
1632
|
+
const tasksLines = YamlUtils.getTasksLines(yamlString);
|
|
1633
|
+
expect(tasksLines).to.containSubset({if_task: {start: 3, end: 13}});
|
|
1634
|
+
expect(tasksLines).to.containSubset({when_true: {start: 7, end: 9}});
|
|
1635
|
+
expect(tasksLines).to.containSubset({when_false: {start: 11, end: 13}});
|
|
1636
|
+
})
|
|
1496
1637
|
});
|
|
@@ -1214,3 +1214,78 @@ export function getChartAtPosition(source: string, position: { lineNumber: numbe
|
|
|
1214
1214
|
|
|
1215
1215
|
return chart ? chart.toJSON() : null;
|
|
1216
1216
|
}
|
|
1217
|
+
|
|
1218
|
+
/**
|
|
1219
|
+
* Get line start and end for all tasks
|
|
1220
|
+
* @param source - YAML source code
|
|
1221
|
+
* @returns lines infos for each taskId
|
|
1222
|
+
*/
|
|
1223
|
+
export function getTasksLines(
|
|
1224
|
+
source: string
|
|
1225
|
+
):Record<string, {start: number, end: number}> {
|
|
1226
|
+
const yamlDoc = parseDocument(source) as any;
|
|
1227
|
+
const lineCounter = new LineCounter();
|
|
1228
|
+
parseDocument(source, {lineCounter});
|
|
1229
|
+
|
|
1230
|
+
let tasksLines: Record<string, {start: number, end: number}> = {};
|
|
1231
|
+
visit(yamlDoc, {
|
|
1232
|
+
Map(_, map) {
|
|
1233
|
+
if (map.items) {
|
|
1234
|
+
for (const item of map.items as any[]) {
|
|
1235
|
+
if (item?.key?.value === "tasks") { // visit only root tasks block for now
|
|
1236
|
+
if (item?.value?.items) {
|
|
1237
|
+
for (const task of item.value.items) {
|
|
1238
|
+
if(isMap(task)){
|
|
1239
|
+
const foundChilTasksLines = getTasksAndFlowableLines(lineCounter, task);
|
|
1240
|
+
tasksLines = {...tasksLines, ...foundChilTasksLines}
|
|
1241
|
+
}
|
|
1242
|
+
}
|
|
1243
|
+
}
|
|
1244
|
+
return visit.BREAK;
|
|
1245
|
+
}
|
|
1246
|
+
}
|
|
1247
|
+
}
|
|
1248
|
+
},
|
|
1249
|
+
});
|
|
1250
|
+
return tasksLines;
|
|
1251
|
+
}
|
|
1252
|
+
function getTasksAndFlowableLines(lineCounter: LineCounter, task: YAMLMap) : Record<string, {start: number, end: number}>{
|
|
1253
|
+
let tasksLines: Record<string, {start: number, end: number}> = {};
|
|
1254
|
+
const taskId = task.get("id") as string | undefined;
|
|
1255
|
+
if(taskId){
|
|
1256
|
+
if(task.range) {
|
|
1257
|
+
tasksLines[taskId] = {start: lineCounter.linePos(task.range[0]).line, end: lineCounter.linePos(task.range[1]).line -1}
|
|
1258
|
+
}
|
|
1259
|
+
const childTasks = new YAMLSeq<YAMLMap>();
|
|
1260
|
+
const tasksChilds = task.get("tasks") as YAMLSeq<YAMLMap> | undefined;
|
|
1261
|
+
if (isSeq<YAMLMap>(tasksChilds)){
|
|
1262
|
+
tasksChilds.items.forEach(x => childTasks.add(x));
|
|
1263
|
+
}
|
|
1264
|
+
const thenChilds = task.get("then") as YAMLSeq<YAMLMap> | undefined;
|
|
1265
|
+
// io.kestra.plugin.core.flow special case
|
|
1266
|
+
if (isSeq<YAMLMap>(thenChilds)){
|
|
1267
|
+
thenChilds.items.forEach(x => childTasks.add(x));
|
|
1268
|
+
}
|
|
1269
|
+
|
|
1270
|
+
const elseChilds = task.get("else") as YAMLSeq<YAMLMap> | undefined;
|
|
1271
|
+
// io.kestra.plugin.core.flow special case
|
|
1272
|
+
if (isSeq<YAMLMap>(elseChilds)){
|
|
1273
|
+
elseChilds.items.forEach(x => childTasks.add(x));
|
|
1274
|
+
}
|
|
1275
|
+
|
|
1276
|
+
childTasks.items.forEach(childTask => {
|
|
1277
|
+
if(isMap(childTask)){
|
|
1278
|
+
tasksLines = {...tasksLines, ...getTasksAndFlowableLines(lineCounter, childTask)}
|
|
1279
|
+
}
|
|
1280
|
+
})
|
|
1281
|
+
} else {
|
|
1282
|
+
if (task.get("task")) {
|
|
1283
|
+
// io.kestra.plugin.core.flow.Dag special case
|
|
1284
|
+
const nestedDagTaskField = task.get("task") as YAMLMap;
|
|
1285
|
+
if(isMap(nestedDagTaskField)) {
|
|
1286
|
+
tasksLines = {...tasksLines, ...getTasksAndFlowableLines(lineCounter, nestedDagTaskField)};
|
|
1287
|
+
}
|
|
1288
|
+
}
|
|
1289
|
+
}
|
|
1290
|
+
return tasksLines;
|
|
1291
|
+
}
|