UNPKG

n8n-editor-ui

Version:

Workflow Editor UI for n8n

1 lines 251 kB
(function(e){function t(t){for(var o,a,r=t[0],l=t[1],c=t[2],u=0,p=[];u<r.length;u++)a=r[u],Object.prototype.hasOwnProperty.call(i,a)&&i[a]&&p.push(i[a][0]),i[a]=0;for(o in l)Object.prototype.hasOwnProperty.call(l,o)&&(e[o]=l[o]);d&&d(t);while(p.length)p.shift()();return n.push.apply(n,c||[]),s()}function s(){for(var e,t=0;t<n.length;t++){for(var s=n[t],o=!0,r=1;r<s.length;r++){var l=s[r];0!==i[l]&&(o=!1)}o&&(n.splice(t--,1),e=a(a.s=s[0]))}return e}var o={},i={app:0},n=[];function a(t){if(o[t])return o[t].exports;var s=o[t]={i:t,l:!1,exports:{}};return e[t].call(s.exports,s,s.exports,a),s.l=!0,s.exports}a.m=e,a.c=o,a.d=function(e,t,s){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:s})},a.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var s=Object.create(null);if(a.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)a.d(s,o,function(t){return e[t]}.bind(null,o));return s},a.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="/%BASE_PATH%/";var r=window["webpackJsonp"]=window["webpackJsonp"]||[],l=r.push.bind(r);r.push=t,r=r.slice();for(var c=0;c<r.length;c++)t(r[c]);var d=l;n.push([0,"chunk-vendors"]),s()})({0:function(e,t,s){e.exports=s("cd49")},"01db":function(e,t,s){},"0232":function(e,t,s){},"03b2":function(e,t,s){},"041d":function(e,t,s){},"06df":function(e,t,s){},"0b8a":function(e,t,s){},1617:function(e,t,s){"use strict";s("4b55")},"19d7":function(e,t,s){"use strict";s("284d")},"1b39":function(e,t,s){"use strict";s("fc8e")},"1caf":function(e,t,s){"use strict";s("b943")},"224a":function(e,t,s){},2644:function(e,t,s){},"26fe":function(e,t,s){"use strict";s("a38a")},"280a":function(e,t,s){},"284d":function(e,t,s){},"28c1":function(e,t,s){"use strict";s("06df")},2942:function(e,t,s){},"2d96":function(e,t,s){"use strict";s("b8b6")},"368d":function(e,t,s){},"37f7":function(e,t,s){},"383b":function(e,t,s){},"3a3b":function(e,t,s){"use strict";s("280a")},"3c38":function(e,t,s){"use strict";s.r(t);var o=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"paramter-input-list-wrapper"},e._l(e.filteredParameters,(function(t){return s("div",{key:t.name},[!0===e.multipleValues(t)&&"fixedCollection"!==t.type?s("div",{staticClass:"parameter-item"},[s("multiple-parameter",{attrs:{parameter:t,values:e.getParameterValue(e.nodeValues,t.name,e.path),nodeValues:e.nodeValues,path:e.getPath(t.name)},on:{valueChanged:e.valueChanged}})],1):["collection","fixedCollection"].includes(t.type)?s("div",{staticClass:"multi-parameter"},[s("div",{staticClass:"parameter-name",attrs:{title:t.displayName}},[!0===e.hideDelete||e.isReadOnly?e._e():s("div",{staticClass:"delete-option clickable",attrs:{title:"Delete"}},[s("font-awesome-icon",{staticClass:"reset-icon clickable",attrs:{icon:"trash",title:"Parameter Options"},on:{click:function(s){return e.deleteOption(t.name)}}})],1),e._v("\n\t\t\t\t"+e._s(t.displayName)+":\n\t\t\t\t"),t.description?s("el-tooltip",{staticClass:"parameter-info",attrs:{placement:"top",effect:"light"}},[s("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(t.description)},slot:"content"}),s("font-awesome-icon",{attrs:{icon:"question-circle"}})],1):e._e()],1),s("div",["collection"===t.type?s("collection-parameter",{attrs:{parameter:t,values:e.getParameterValue(e.nodeValues,t.name,e.path),nodeValues:e.nodeValues,path:e.getPath(t.name)},on:{valueChanged:e.valueChanged}}):"fixedCollection"===t.type?s("fixed-collection-parameter",{attrs:{parameter:t,values:e.getParameterValue(e.nodeValues,t.name,e.path),nodeValues:e.nodeValues,path:e.getPath(t.name)},on:{valueChanged:e.valueChanged}}):e._e()],1)]):e.displayNodeParameter(t)?s("div",{staticClass:"parameter-item"},[!0===e.hideDelete||e.isReadOnly?e._e():s("div",{staticClass:"delete-option clickable",attrs:{title:"Delete"}},[s("font-awesome-icon",{staticClass:"reset-icon clickable",attrs:{icon:"trash",title:"Delete Parameter"},on:{click:function(s){return e.deleteOption(t.name)}}})],1),s("parameter-input-full",{attrs:{parameter:t,value:e.getParameterValue(e.nodeValues,t.name,e.path),displayOptions:!0,path:e.getPath(t.name)},on:{valueChanged:e.valueChanged}})],1):e._e()])})),0)},i=[],n=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"duplicate-parameter",on:{keydown:function(e){e.stopPropagation()}}},[s("div",{staticClass:"parameter-name"},[e._v("\n\t\t"+e._s(e.parameter.displayName)+":\n\t\t"),e.parameter.description?s("el-tooltip",{staticClass:"parameter-info",attrs:{placement:"top",effect:"light"}},[s("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.parameter.description)},slot:"content"}),s("font-awesome-icon",{attrs:{icon:"question-circle"}})],1):e._e()],1),e._l(e.values,(function(t,o){return s("div",{key:o,staticClass:"duplicate-parameter-item",class:e.parameter.type},[e.isReadOnly?e._e():s("div",{staticClass:"delete-item clickable",attrs:{title:"Delete Item"},on:{click:function(t){return e.deleteItem(o)}}},[s("font-awesome-icon",{attrs:{icon:"trash"}})],1),"collection"===e.parameter.type?s("div",[s("collection-parameter",{attrs:{parameter:e.parameter,values:t,nodeValues:e.nodeValues,path:e.getPath(o),hideDelete:e.hideDelete},on:{valueChanged:e.valueChanged}})],1):s("div",[s("parameter-input",{staticClass:"duplicate-parameter-input-item",attrs:{parameter:e.parameter,value:t,displayOptions:!0,path:e.getPath(o)},on:{valueChanged:e.valueChanged}})],1)])})),s("div",{staticClass:"add-item-wrapper"},[e.values&&0===Object.keys(e.values).length||e.isReadOnly?s("div",{staticClass:"no-items-exist"},[e._v("\n\t\t\tCurrently no items exist\n\t\t")]):e._e(),e.isReadOnly?e._e():s("el-button",{staticClass:"add-item",attrs:{size:"small"},on:{click:function(t){return e.addItem()}}},[e._v(e._s(e.addButtonText))])],1)],2)},a=[],r=s("3eb9"),l=s("89e8"),c=s("9ec3"),d=s("4971"),u=s("aaf5"),p=Object(u["a"])(d["a"]).extend({name:"MultipleParameter",components:{CollectionParameter:r["default"],ParameterInput:l["a"]},props:["nodeValues","parameter","path","values"],computed:{addButtonText(){return this.parameter.typeOptions&&this.parameter.typeOptions.multipleValueButtonText?this.parameter.typeOptions.multipleValueButtonText:"Add item"},hideDelete(){return 1===this.parameter.options.length}},methods:{addItem(){const e=this.getPath();let t=Object(c["get"])(this.nodeValues,e);void 0===t&&(t=[]),t.push(JSON.parse(JSON.stringify(this.parameter.default)));const s={name:e,value:t};this.$emit("valueChanged",s)},deleteItem(e){const t={name:this.getPath(e),value:void 0};this.$emit("valueChanged",t)},getPath(e){return this.path+(void 0!==e?`[${e}]`:"")},valueChanged(e){this.$emit("valueChanged",e)}}}),h=p,m=(s("c922"),s("5e82"),s("2be6")),f=Object(m["a"])(h,n,a,!1,null,"1fc9e78c",null),w=f.exports,g=s("6fae"),v=s("4a0c"),y=Object(u["a"])(d["a"],g["a"]).extend({name:"ParameterInputList",components:{MultipleParameter:w,ParameterInputFull:v["a"]},props:["nodeValues","parameters","path","hideDelete"],computed:{filteredParameters(){return this.parameters.filter(e=>this.displayNodeParameter(e))}},methods:{multipleValues(e){return!0===this.getArgument("multipleValues",e)},getArgument(e,t){if(void 0!==t.typeOptions&&void 0!==t.typeOptions[e])return t.typeOptions[e]},getPath(e){return(this.path?this.path+".":"")+e},deleteOption(e){const t={name:this.getPath(e),value:void 0};this.$emit("valueChanged",t)},displayNodeParameter(e){return"hidden"!==e.type&&(void 0===e.displayOptions||this.displayParameter(this.nodeValues,e,this.path))},valueChanged(e){this.$emit("valueChanged",e)}},beforeCreate:function(){this.$options.components.FixedCollectionParameter=s("fe0b").default,this.$options.components.CollectionParameter=s("3eb9").default}}),k=y,b=(s("ae93"),Object(m["a"])(k,o,i,!1,null,null,null));t["default"]=b.exports},"3eb9":function(e,t,s){"use strict";s.r(t);var o=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"collection-parameter",on:{keydown:function(e){e.stopPropagation()}}},[s("div",{staticClass:"collection-parameter-wrapper"},[0===e.getProperties.length?s("div",{staticClass:"no-items-exist"},[e._v("\n\t\t\tCurrently no properties exist\n\t\t")]):e._e(),s("parameter-input-list",{attrs:{parameters:e.getProperties,nodeValues:e.nodeValues,path:e.path,hideDelete:e.hideDelete},on:{valueChanged:e.valueChanged}}),e.parameterOptions.length>0&&!e.isReadOnly?s("div",[1===e.parameter.options.length?s("el-button",{staticClass:"add-option",attrs:{size:"small"},on:{click:function(t){return e.optionSelected(e.parameter.options[0].name)}}},[e._v(e._s(e.getPlaceholderText))]):s("el-select",{staticClass:"add-option",attrs:{placeholder:e.getPlaceholderText,size:"small",filterable:""},on:{change:e.optionSelected},model:{value:e.selectedOption,callback:function(t){e.selectedOption=t},expression:"selectedOption"}},e._l(e.parameterOptions,(function(e){return s("el-option",{key:e.name,attrs:{label:e.displayName,value:e.name}})})),1)],1):e._e()],1)])},i=[],n=s("4971"),a=s("6fae"),r=s("9ec3"),l=s("aaf5"),c=Object(l["a"])(n["a"],a["a"]).extend({name:"CollectionParameter",props:["hideDelete","nodeValues","parameter","path","values"],data(){return{selectedOption:void 0}},computed:{getPlaceholderText(){return this.parameter.placeholder?this.parameter.placeholder:"Choose Option To Add"},getProperties(){const e=[];let t;for(const s of this.propertyNames)t=this.getOptionProperties(s),void 0!==t&&e.push(t);return e},filteredOptions(){return this.parameter.options.filter(e=>this.displayNodeParameter(e))},parameterOptions(){return this.filteredOptions.filter(e=>!this.propertyNames.includes(e.name))},propertyNames(){return this.values?Object.keys(this.values):[]}},methods:{getArgument(e){if(void 0!==this.parameter.typeOptions&&void 0!==this.parameter.typeOptions[e])return this.parameter.typeOptions[e]},getOptionProperties(e){for(const t of this.parameter.options)if(t.name===e)return t},displayNodeParameter(e){return void 0===e.displayOptions||this.displayParameter(this.nodeValues,e,this.path)},optionSelected(e){const t=this.getOptionProperties(e);if(void 0===t)return;const s=`${this.path}.${t.name}`;let o;if(void 0!==t.typeOptions&&!0===t.typeOptions.multipleValues){let i;"fixedCollection"===t.type?i=Object(r["get"])(this.nodeValues,`${this.path}.${e}`,{}):(i=Object(r["get"])(this.nodeValues,`${this.path}.${e}`,[]),i.push(JSON.parse(JSON.stringify(t.default)))),o={name:s,value:i}}else o={name:s,value:JSON.parse(JSON.stringify(t.default))};this.$emit("valueChanged",o),this.selectedOption=void 0},valueChanged(e){this.$emit("valueChanged",e)}},beforeCreate:function(){this.$options.components.ParameterInputList=s("3c38").default}}),d=c,u=(s("ab7d"),s("2be6")),p=Object(u["a"])(d,o,i,!1,null,null,null);t["default"]=p.exports},"42af":function(e,t,s){},4637:function(e,t,s){},"46d0":function(e,t,s){"use strict";s("f481")},"470f":function(e,t,s){"use strict";s("37f7")},4971:function(e,t,s){"use strict";s.d(t,"a",(function(){return r}));var o=s("e5bf"),i=s.n(o),n=s("77f0"),a=s("aaf5");const r=Object(a["a"])(n["a"]).extend({data(){return{loadingService:null}},computed:{isReadOnly(){return!["NodeViewExisting","NodeViewNew"].includes(this.$route.name)}},methods:{convertToDisplayDate(e){return i()(e,"yyyy-mm-dd HH:MM:ss")},displayTimer(e,t=!1){if(e<6e4)return!1===t?Math.floor(e/1e3)+" sec.":e/1e3+" sec.";const s=Math.floor(e/1e3),o=Math.floor(s/60),i=(s-60*o).toString().padStart(2,"0");return`${o}:${i} min.`},editAllowedCheck(){return!this.isReadOnly||(this.$showMessage({title:"Workflow can not be changed!",message:"The workflow can not be edited as a past execution gets displayed. To make changed either open the original workflow of which the execution gets displayed or save it under a new name first.",type:"error",duration:0}),!1)},startLoading(){null===this.loadingService&&(this.loadingService=this.$loading({lock:!0,text:"Loading",spinner:"el-icon-loading",background:"rgba(255, 255, 255, 0.8)"}))},stopLoading(){null!==this.loadingService&&(this.loadingService.close(),this.loadingService=null)},async confirmMessage(e,t,s="warning",o="OK",i="Cancel"){try{return await this.$confirm(e,t,{confirmButtonText:o,cancelButtonText:i,type:s,dangerouslyUseHTMLString:!0}),!0}catch(n){return!1}}}})},"4a0c":function(e,t,s){"use strict";var o=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("el-row",{staticClass:"parameter-wrapper"},[s("el-col",{staticClass:"parameter-name",class:{"multi-line":e.isMultiLineParameter},attrs:{span:e.isMultiLineParameter?24:10}},[s("span",{staticClass:"title",attrs:{title:e.parameter.displayName}},[e._v(e._s(e.parameter.displayName))]),e._v(":\n\t\t"),e.parameter.description?s("el-tooltip",{staticClass:"parameter-info",attrs:{placement:"top",effect:"light"}},[s("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.parameter.description)},slot:"content"}),s("font-awesome-icon",{attrs:{icon:"question-circle"}})],1):e._e()],1),s("el-col",{staticClass:"parameter-value",attrs:{span:e.isMultiLineParameter?24:14}},[s("parameter-input",{attrs:{parameter:e.parameter,value:e.value,displayOptions:e.displayOptions,path:e.path},on:{valueChanged:e.valueChanged}})],1)],1)},i=[],n=s("9869"),a=s("89e8"),r=n["default"].extend({name:"ParameterInputFull",components:{ParameterInput:a["a"]},computed:{isMultiLineParameter(){if(this.level>4)return!0;const e=this.getArgument("rows");return void 0!==e&&e>1},level(){return this.path.split(".").length}},props:["displayOptions","parameter","path","value"],methods:{getArgument(e){if(void 0!==this.parameter.typeOptions&&void 0!==this.parameter.typeOptions[e])return this.parameter.typeOptions[e]},valueChanged(e){this.$emit("valueChanged",e)}}}),l=r,c=(s("63f3"),s("2be6")),d=Object(c["a"])(l,o,i,!1,null,null,null);t["a"]=d.exports},"4a15":function(e,t,s){"use strict";s("b4ca")},"4ad1":function(e,t,s){},"4b55":function(e,t,s){},"4bdf":function(e,t,s){"use strict";s("d6d2")},"4cb6":function(e,t,s){"use strict";s("fd90")},"52f2":function(e,t,s){"use strict";s("e78d")},"53f5":function(e,t,s){"use strict";s("ea6e")},5572:function(e,t,s){},"5c0b":function(e,t,s){"use strict";s("4ad1")},"5e82":function(e,t,s){"use strict";s("2644")},6188:function(e,t,s){"use strict";s("aaea")},"62ca":function(e,t,s){"use strict";s("224a")},"63f3":function(e,t,s){"use strict";s("2942")},6929:function(e,t,s){},"6e4f":function(e,t,s){"use strict";s("eaf6")},"6fae":function(e,t,s){"use strict";s.d(t,"a",(function(){return r}));var o=s("e105"),i=s("7b04"),n=s("9ec3"),a=s("aaf5");const r=Object(a["a"])(i["a"]).extend({methods:{getParameterValue(e,t,s){return Object(n["get"])(e,s?s+"."+t:t)},displayParameter(e,t,s){return o["NodeHelpers"].displayParameterPath(e,t,s)},getNodeIssues(e,t,s){let i=null;if(s=s||[],!0===t.disabled)return null;if(null===e)s.includes("typeUnknown")||(i={typeUnknown:!0});else if(s.includes("parameters")||(i=o["NodeHelpers"].getNodeParametersIssues(e.properties,t)),!s.includes("credentials")){const s=this.getNodeCredentialIssues(t,e);null===i?i=s:o["NodeHelpers"].mergeIssues(i,s)}return!0!==this.hasNodeExecutionIssues(t)||s.includes("execution")||(null===i&&(i={}),i.execution=!0),i},hasNodeExecutionIssues(e){const t=this.$store.getters.getWorkflowRunData;if(null===t||!t.hasOwnProperty(e.name))return!1;for(const s of t[e.name])if(void 0!==s.error)return!0;return!1},updateNodesExecutionIssues(){const e=this.$store.getters.allNodes;for(const t of e)this.$store.commit("setNodeIssue",{node:t.name,type:"execution",value:!!this.hasNodeExecutionIssues(t)||null})},updateNodeCredentialIssues(e){const t=this.getNodeCredentialIssues(e);let s=null;null!==t&&(s=t.credentials),this.$store.commit("setNodeIssue",{node:e.name,type:"credentials",value:s})},updateNodeParameterIssues(e,t){if(void 0===t&&(t=this.$store.getters.nodeType(e.type)),null===t)return;const s=o["NodeHelpers"].getNodeParametersIssues(t.properties,e);let i=null;null!==s&&(i=s.parameters),this.$store.commit("setNodeIssue",{node:e.name,type:"parameters",value:i})},getNodeCredentialIssues(e,t){if(!0===e.disabled)return null;if(void 0===t&&(t=this.$store.getters.nodeType(e.type)),null===t||void 0===t.credentials)return null;if(void 0===t.credentials)return null;const s={};let o,i,n,a;for(const r of t.credentials)!0===this.displayParameter(e.parameters,r,"")&&(i=this.$store.getters.credentialType(r.name),n=null===i?r.name:i.displayName,void 0===e.credentials||void 0===e.credentials[r.name]?!0===r.required&&(s[r.name]=[`Credentials for "${n}" are not set.`]):(a=e.credentials[r.name],o=this.$store.getters.credentialsByType(r.name),null===o&&(o=[]),void 0===o.find(e=>e.name===a)&&(s[r.name]=[`Credentials with name "${a}" do not exist for "${n}".`])));return 0===Object.keys(s).length?null:{credentials:s}},updateNodesCredentialsIssues(){const e=this.$store.getters.allNodes;let t;for(const s of e)t=this.getNodeCredentialIssues(s),this.$store.commit("setNodeIssue",{node:s.name,type:"credentials",value:null===t?null:t.credentials})},getNodeInputData(e,t=0,s=0){if(null===e)return[];if(null===this.$store.getters.getWorkflowExecution)return[];const o=this.$store.getters.getWorkflowExecution.data,i=o.resultData.runData;return null!==i&&void 0!==i[e.name]&&i[e.name][t].data&&void 0!==i[e.name][t].data?this.getMainInputData(i[e.name][t].data,s):[]},getMainInputData(e,t){return!e||!e.hasOwnProperty("main")||void 0===e.main||e.main.length<t||null===e.main[t]?[]:e.main[t]},getBinaryData(e,t,s,o){if(null===t)return[];const i=e;if(null===i||!i[t]||!i[t][s]||!i[t][s].data)return[];const n=this.getMainInputData(i[t][s].data,o),a=[];for(let r=0;r<n.length;r++)n[r].hasOwnProperty("binary")&&void 0!==n[r].binary&&a.push(n[r].binary);return a},disableNodes(e){for(const t of e){const e={name:t.name,properties:{disabled:!t.disabled}};this.$store.commit("updateNodeProperties",e),this.updateNodeParameterIssues(t),this.updateNodeCredentialIssues(t)}}}})},7744:function(e,t,s){"use strict";s("383b")},"77f0":function(e,t,s){"use strict";s.d(t,"a",(function(){return n}));var o=s("9869"),i=s("8767");const n=o["default"].extend({methods:{$showMessage(e){return e.dangerouslyUseHTMLString=!0,void 0===e.position&&(e.position="bottom-right"),Object(i["Notification"])(e)},$showError(e,t,s){this.$showMessage({title:t,message:`${s}<br /><i>${e.message}</i>`,type:"error",duration:0})}}})},"79ed":function(e,t,s){},"7b04":function(e,t,s){"use strict";s.d(t,"a",(function(){return c}));var o=s("9869"),i=s("2f01"),n=s("8206"),a=s.n(n);function r(e){const t={...e,workflowData:e.workflowData,data:Object(i["a"])(e.data)};return t.finished=!!t.finished&&t.finished,e.id&&(t.id=e.id),t}class l extends Error{constructor(e,t,s,o){super(e),this.name="ResponseError",t&&(this.errorCode=t),s&&(this.httpStatusCode=s),o&&(this.serverStackTrace=o)}}const c=o["default"].extend({methods:{restApi(){const e=this;return{async makeRestApiRequest(t,s,o){try{const i={method:t,url:s,baseURL:e.$store.getters.getRestUrl,headers:{sessionid:e.$store.getters.sessionId}};["PATCH","POST","PUT"].includes(t)?i.data=o:i.params=o;const n=await a.a.request(i);return n.data.data}catch(i){if("Network Error"===i.message)throw new l("API-Server can not be reached. It is probably down.");const e=i.response.data;if(void 0!==e&&void 0!==e.message)throw new l(e.message,e.code,i.response.status,e.stack);throw i}},getActiveWorkflows:()=>e.restApi().makeRestApiRequest("GET","/active"),getActivationError:t=>e.restApi().makeRestApiRequest("GET","/active/error/"+t),getCurrentExecutions:t=>{let s={};return t&&(s={filter:t}),e.restApi().makeRestApiRequest("GET","/executions-current",s)},stopCurrentExecution:t=>e.restApi().makeRestApiRequest("POST",`/executions-current/${t}/stop`),getSettings:()=>e.restApi().makeRestApiRequest("GET","/settings"),getNodeTypes:()=>e.restApi().makeRestApiRequest("GET","/node-types"),getNodesInformation:t=>e.restApi().makeRestApiRequest("POST","/node-types",{nodeNames:t}),getNodeParameterOptions:(t,s,o,i)=>{const n={nodeType:t,methodName:s,credentials:i,currentNodeParameters:o};return e.restApi().makeRestApiRequest("GET","/node-parameter-options",n)},removeTestWebhook:t=>e.restApi().makeRestApiRequest("DELETE","/test-webhook/"+t),runWorkflow:async t=>e.restApi().makeRestApiRequest("POST","/workflows/run",t),createNewWorkflow:t=>e.restApi().makeRestApiRequest("POST","/workflows",t),updateWorkflow:(t,s)=>e.restApi().makeRestApiRequest("PATCH","/workflows/"+t,s),deleteWorkflow:t=>e.restApi().makeRestApiRequest("DELETE","/workflows/"+t),getWorkflow:t=>e.restApi().makeRestApiRequest("GET","/workflows/"+t),getWorkflows:t=>{let s;return t&&(s={filter:t}),e.restApi().makeRestApiRequest("GET","/workflows",s)},getWorkflowFromUrl:t=>e.restApi().makeRestApiRequest("GET","/workflows/from-url",{url:t}),createNewCredentials:t=>e.restApi().makeRestApiRequest("POST","/credentials",t),deleteCredentials:t=>e.restApi().makeRestApiRequest("DELETE","/credentials/"+t),updateCredentials:(t,s)=>e.restApi().makeRestApiRequest("PATCH","/credentials/"+t,s),getCredentials:(t,s)=>{let o;return s&&(o={includeData:s}),e.restApi().makeRestApiRequest("GET","/credentials/"+t,o)},getAllCredentials:t=>{let s;return t&&(s={filter:t}),e.restApi().makeRestApiRequest("GET","/credentials",s)},getCredentialTypes:()=>e.restApi().makeRestApiRequest("GET","/credential-types"),oAuth1CredentialAuthorize:t=>e.restApi().makeRestApiRequest("GET","/oauth1-credential/auth",t),oAuth2CredentialAuthorize:t=>e.restApi().makeRestApiRequest("GET","/oauth2-credential/auth",t),oAuth2Callback:(t,s)=>{const o={code:t,state:s};return e.restApi().makeRestApiRequest("POST","/oauth2-credential/callback",o)},getExecution:async t=>{const s=await e.restApi().makeRestApiRequest("GET","/executions/"+t);return r(s)},deleteExecutions:t=>e.restApi().makeRestApiRequest("POST","/executions/delete",t),retryExecution:(t,s)=>{let o;return!0===s&&(o={loadWorkflow:!0}),e.restApi().makeRestApiRequest("POST",`/executions/${t}/retry`,o)},getPastExecutions:(t,s,o)=>{let i={};return t&&(i={filter:t,lastId:o,limit:s}),e.restApi().makeRestApiRequest("GET","/executions",i)},getTimezones:()=>e.restApi().makeRestApiRequest("GET","/options/timezones")}}}})},"7b46":function(e,t,s){"use strict";s("c570")},"847d":function(e,t,s){"use strict";s("0b8a")},"85ee":function(e,t,s){"use strict";s.d(t,"a",(function(){return o})),s.d(t,"b",(function(){return i})),s.d(t,"c",(function(){return n})),s.d(t,"d",(function(){return a}));const o=204800,i=250,n="node-",a="__EMPTY__"},"89e8":function(e,t,s){"use strict";var o=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{class:e.parameterInputClasses,on:{keydown:function(e){e.stopPropagation()}}},[s("expression-edit",{attrs:{dialogVisible:e.expressionEditDialogVisible,value:e.value,parameter:e.parameter,path:e.path},on:{closeDialog:e.closeExpressionEditDialog,valueChanged:e.expressionUpdated}}),s("div",{staticClass:"parameter-input ignore-key-press",style:e.parameterInputWrapperStyle},[["json","string"].includes(e.parameter.type)||null!==e.remoteParameterOptionsLoadingIssues?s("div",[s("code-edit",{attrs:{dialogVisible:e.codeEditDialogVisible,value:e.value,parameter:e.parameter},on:{closeDialog:e.closeCodeEditDialog,valueChanged:e.expressionUpdated}}),s("text-edit",{attrs:{dialogVisible:e.textEditDialogVisible,value:e.value,parameter:e.parameter},on:{closeDialog:e.closeTextEditDialog,valueChanged:e.expressionUpdated}}),!0===e.isEditor?s("div",{staticClass:"clickable",on:{click:function(t){return e.displayEditDialog()}}},[e.codeEditDialogVisible?e._e():s("prism-editor",{attrs:{lineNumbers:!0,readonly:!0,code:e.displayValue,language:"js"}})],1):s("el-input",{ref:"inputField",attrs:{size:"small",type:e.getStringInputType,rows:e.getArgument("rows"),value:e.displayValue,disabled:e.isReadOnly,title:e.displayTitle,placeholder:e.isValueExpression?"":e.parameter.placeholder},on:{change:e.valueChanged,keydown:function(e){e.stopPropagation()},focus:e.setFocus},model:{value:e.tempValue,callback:function(t){e.tempValue=t},expression:"tempValue"}},[e.isValueExpression||e.isReadOnly?e._e():s("font-awesome-icon",{staticClass:"edit-window-button clickable",attrs:{slot:"suffix",icon:"external-link-alt",title:"Open Edit Window"},on:{click:function(t){return e.displayEditDialog()}},slot:"suffix"})],1)],1):"dateTime"===e.parameter.type?s("div",[s("el-date-picker",{ref:"inputField",attrs:{type:"datetime",size:"small",value:e.displayValue,title:e.displayTitle,disabled:e.isReadOnly,placeholder:e.parameter.placeholder?e.parameter.placeholder:"Select date and time","picker-options":e.dateTimePickerOptions},on:{change:e.valueChanged,focus:e.setFocus,keydown:function(e){e.stopPropagation()}},model:{value:e.tempValue,callback:function(t){e.tempValue=t},expression:"tempValue"}})],1):"number"===e.parameter.type?s("div",[s("el-input-number",{ref:"inputField",attrs:{size:"small",value:e.displayValue,max:e.getArgument("maxValue"),min:e.getArgument("minValue"),precision:e.getArgument("numberPrecision"),step:e.getArgument("numberStepSize"),disabled:e.isReadOnly,title:e.displayTitle,placeholder:e.parameter.placeholder},on:{change:e.valueChanged,focus:e.setFocus,keydown:function(e){e.stopPropagation()}}})],1):"options"===e.parameter.type?s("el-select",{ref:"inputField",attrs:{size:"small",filterable:"",value:e.displayValue,loading:e.remoteParameterOptionsLoading,disabled:e.isReadOnly||e.remoteParameterOptionsLoading,title:e.displayTitle},on:{change:e.valueChanged,keydown:function(e){e.stopPropagation()},focus:e.setFocus}},e._l(e.parameterOptions,(function(t){return s("el-option",{key:t.value,attrs:{value:t.value,label:t.name}},[s("div",{staticClass:"option-headline"},[e._v(e._s(t.name))]),t.description?s("div",{staticClass:"option-description",domProps:{innerHTML:e._s(t.description)}}):e._e()])})),1):"multiOptions"===e.parameter.type?s("el-select",{ref:"inputField",attrs:{size:"small",filterable:"",multiple:"",value:e.displayValue,loading:e.remoteParameterOptionsLoading,disabled:e.isReadOnly||e.remoteParameterOptionsLoading,title:e.displayTitle},on:{change:e.valueChanged,keydown:function(e){e.stopPropagation()},focus:e.setFocus}},e._l(e.parameterOptions,(function(t){return s("el-option",{key:t.value,attrs:{value:t.value,label:t.name}},[s("div",{staticClass:"option-headline"},[e._v(e._s(t.name))]),t.description?s("div",{staticClass:"option-description",domProps:{innerHTML:e._s(t.description)}}):e._e()])})),1):"color"===e.parameter.type?s("div",{ref:"inputField",staticClass:"color-input"},[s("el-color-picker",{staticClass:"color-picker",attrs:{value:e.displayValue,disabled:e.isReadOnly,size:"small",title:e.displayTitle,"show-alpha":e.getArgument("showAlpha")},on:{change:e.valueChanged,focus:e.setFocus}}),s("el-input",{attrs:{size:"small",type:"text",value:e.tempValue,disabled:e.isReadOnly,title:e.displayTitle},on:{change:e.valueChanged,keydown:function(e){e.stopPropagation()},focus:e.setFocus},model:{value:e.tempValue,callback:function(t){e.tempValue=t},expression:"tempValue"}})],1):"boolean"===e.parameter.type?s("div",[s("el-switch",{ref:"inputField",attrs:{value:e.displayValue,"active-color":"#13ce66",disabled:e.isValueExpression||e.isReadOnly},on:{change:e.valueChanged}}),s("div",{staticClass:"expression-info clickable",on:{click:function(t){e.expressionEditDialogVisible=!0}}},[e._v("Edit Expression")])],1):e._e()],1),e.displayOptionsComputed?s("div",{staticClass:"parameter-options"},[s("el-dropdown",{attrs:{trigger:"click",size:"mini"},on:{command:e.optionSelected}},[s("span",{staticClass:"el-dropdown-link"},[s("font-awesome-icon",{staticClass:"reset-icon clickable",attrs:{icon:"cogs",title:"Parameter Options"}})],1),s("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[!0===e.parameter.noDataExpression||e.isValueExpression?e._e():s("el-dropdown-item",{attrs:{command:"addExpression"}},[e._v("Add Expression")]),!0!==e.parameter.noDataExpression&&e.isValueExpression?s("el-dropdown-item",{attrs:{command:"removeExpression"}},[e._v("Remove Expression")]):e._e(),s("el-dropdown-item",{attrs:{command:"resetValue",disabled:e.isDefault,divided:""}},[e._v("Reset Value")])],1)],1)],1):e._e(),e.getIssues.length?s("div",{staticClass:"parameter-issues"},[s("el-tooltip",{attrs:{placement:"top",effect:"light"}},[s("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s("Issues:<br />&nbsp;&nbsp;- "+e.getIssues.join("<br />&nbsp;&nbsp;- "))},slot:"content"}),s("font-awesome-icon",{attrs:{icon:"exclamation-triangle"}})],1)],1):e._e()],1)},i=[],n=s("9ec3"),a=s("e105"),r=function(){var e=this,t=e.$createElement,s=e._self._c||t;return e.dialogVisible?s("div",[s("el-dialog",{attrs:{visible:e.dialogVisible,"append-to-body":"",width:"80%",title:"Edit "+e.parameter.displayName,"before-close":e.closeDialog}},[s("div",{staticClass:"text-editor-wrapper ignore-key-press"},[s("div",{staticClass:"editor-description"},[e._v("\n\t\t\t\t"+e._s(e.parameter.displayName)+":\n\t\t\t")]),s("div",{staticClass:"text-editor",on:{keydown:function(e){e.stopPropagation()}}},[s("prism-editor",{attrs:{lineNumbers:!0,code:e.value,language:"js"},on:{change:e.valueChanged}})],1)])])],1):e._e()},l=[],c=s("9869"),d=s("789a"),u=s.n(d),p=c["default"].extend({name:"CodeEdit",props:["dialogVisible","parameter","value"],components:{PrismEditor:u.a},data(){return{}},methods:{valueChanged(e){this.$emit("valueChanged",e)},closeDialog(){return this.$emit("closeDialog"),!1}}}),h=p,m=(s("1caf"),s("2be6")),f=Object(m["a"])(h,r,l,!1,null,"49397ad7",null),w=f.exports,g=function(){var e=this,t=e.$createElement,s=e._self._c||t;return e.dialogVisible?s("div",{on:{keydown:function(e){e.stopPropagation()}}},[s("el-dialog",{attrs:{visible:e.dialogVisible,"custom-class":"expression-dialog","append-to-body":"",width:"80%",title:"Edit Expression","before-close":e.closeDialog}},[s("el-row",[s("el-col",{attrs:{span:8}},[s("div",{staticClass:"header-side-menu"},[s("div",{staticClass:"headline"},[e._v("\n\t\t\t\t\t\tEdit Expression\n\t\t\t\t\t")]),s("div",{staticClass:"sub-headline"},[e._v("\n\t\t\t\t\t\tVariable Selector\n\t\t\t\t\t")])]),s("div",{staticClass:"variable-selector"},[s("variable-selector",{attrs:{path:e.path},on:{itemSelected:e.itemSelected}})],1)]),s("el-col",{staticClass:"right-side",attrs:{span:16}},[s("div",{staticClass:"expression-editor-wrapper"},[s("div",{staticClass:"editor-description"},[e._v("\n\t\t\t\t\t\tExpression\n\t\t\t\t\t")]),s("div",{staticClass:"expression-editor"},[s("expression-input",{ref:"inputFieldExpression",attrs:{parameter:e.parameter,rows:"8",value:e.value,path:e.path},on:{change:e.valueChanged,keydown:function(t){return t.stopPropagation(),e.noOp(t)}}})],1)]),s("div",{staticClass:"expression-result-wrapper"},[s("div",{staticClass:"editor-description"},[e._v("\n\t\t\t\t\t\tResult\n\t\t\t\t\t")]),s("expression-input",{attrs:{parameter:e.parameter,resolvedValue:"true",rows:"8",value:e.value,path:e.path}})],1)])],1)],1)],1):e._e()},v=[],y=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",[s("div",{ref:"expression-editor",staticClass:"ignore-key-press",style:e.editorStyle,on:{keydown:function(e){e.stopPropagation()}}})])},k=[],b=(s("b8f1"),s("d5a1")),x=s.n(b),C=s("5d01"),N=s.n(C),D=s("d2e2"),T=s("aaf5"),E=Object(T["a"])(D["a"]).extend({name:"ExpressionInput",props:["rows","value","parameter","path","resolvedValue"],data(){return{editor:null}},computed:{editorStyle(){let e=1;return this.rows&&(e=parseInt(this.rows,10)),{height:Math.max(26*e+10,40)+"px"}},workflow(){return this.getWorkflow()}},watch:{value(){this.resolvedValue&&this.initValue()}},mounted(){const e=this,t=x.a.import("blots/inline");class s extends t{static create(e){const t=super.create(e);return t.setAttribute("data-value",e),t.setAttribute("class","variable"),t}static formats(t){let s=t.innerHTML.trim();e.resolvedValue&&(s=t.getAttribute("data-value"));const o=e.getPlaceholderClasses(s);return t.getAttribute("class")!==o&&t.setAttribute("class",o),!0}}s.blotName="variable",s.className="variable",s.tagName="span",x.a.register({"formats/variable":s}),N.a.DEFAULTS={expression:{trigger:/\B[\w\s]/,find:/\{\{[^\s,;:!?}]+\}\}/i,format:"variable"}},this.editor=new x.a(this.$refs["expression-editor"],{readOnly:!!this.resolvedValue,modules:{autoformat:{},keyboard:{bindings:{"list autofill":{prefix:/^$/}}}}}),this.editor.root.addEventListener("blur",e=>{this.$emit("blur",e)}),this.initValue(),this.resolvedValue||(this.setFocus(),this.editor.on("text-change",()=>this.update()))},methods:{customizeVariable(e){const t={classes:[],message:e};let s;try{s=this.resolveExpression("="+e),void 0!==s?t.classes.push("valid"):t.classes.push("invalid")}catch(o){t.classes.push("invalid")}return t},resolveParameterString(e){let t;try{t=this.resolveExpression("="+e)}catch(s){return`[invalid (${s.message})]`}return void 0===t?"[not found]":t},getPlaceholderClasses(e){const t=this.customizeVariable(e);return"variable "+t.classes.join(" ")},getValue(){if(!this.editor)return"";const e=this.editor.getContents();if(!e||!e.ops)return"";let t="";return e.ops.forEach(e=>{e.insert&&(t+=e.insert)}),"="+t.replace(/\s+$/g,"")},setFocus(){this.editor.focus()},itemSelected(e){this.editor.focus();const t=this.editor.getSelection();let s=null;if(t&&(s=t.index),s)this.editor.insertText(s,`{{${e.variable}}}`,"variable",!0),this.update();else{let t=this.value;"="!==t&&(t+=" "),t+=`{{${e.variable}}}\n`,this.$emit("change",t),this.resolvedValue||c["default"].nextTick(()=>{this.initValue()})}},initValue(){if(!this.value)return;let e=this.value;"="===e.charAt(0)&&(e=e.slice(1));const t=[];e.replace(/\{\{(.*?)\}\}/gi,"*%%#_@^$1*%%#_@").split("*%%#_@").forEach(e=>{if(e)if("^"===e.charAt(0)){let s=`{{${e.slice(1)}}}`;this.resolvedValue&&(s=[null,void 0].includes(s)?"":s,s=this.resolveParameterString(s.toString())),s=[null,void 0].includes(s)?"":s,t.push({attributes:{variable:`{{${e.slice(1)}}}`},insert:s.toString()})}else t.push({insert:e});else;}),this.editor.setContents(t)},update(){this.$emit("input",this.getValue()),this.$emit("change",this.getValue())}}}),$=E,A=(s("46d0"),Object(m["a"])($,y,k,!1,null,null,null)),O=A.exports,S=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"variable-selector-wrapper",on:{keydown:function(e){e.stopPropagation()}}},[s("div",{staticClass:"input-wrapper"},[s("el-input",{ref:"inputField",attrs:{placeholder:"Variable filter...",size:"small",type:"text"},model:{value:e.variableFilter,callback:function(t){e.variableFilter=t},expression:"variableFilter"}})],1),s("div",{staticClass:"result-wrapper"},e._l(e.currentResults,(function(t){return s("variable-selector-item",{key:t.key,attrs:{item:t,extendAll:e.extendAll},on:{itemSelected:e.forwardItemSelected}})})),1)])},_=[],P=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"item"},[e.item.options?s("div",{staticClass:"options"},[e.item.options.length?s("div",{staticClass:"headline clickable",on:{click:function(t){e.extended=!e.extended}}},[!0!==e.extendAll?s("div",{staticClass:"options-toggle"},[e.extended?s("font-awesome-icon",{attrs:{icon:"angle-down"}}):s("font-awesome-icon",{attrs:{icon:"angle-right"}})],1):e._e(),s("div",{staticClass:"option-title",attrs:{title:e.item.key}},[e._v("\n\t\t\t\t"+e._s(e.item.name)+"\n\n\t\t\t\t"),!0===e.allowParentSelect?s("el-dropdown",{attrs:{trigger:"click"},on:{click:function(e){e.stopPropagation()},command:function(t){return e.optionSelected(t,e.item)}}},[s("span",{staticClass:"el-dropdown-link clickable",on:{click:function(e){e.stopPropagation()}}},[s("font-awesome-icon",{attrs:{icon:"dot-circle",title:"Select Item"}})],1),s("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},e._l(e.itemAddOperations,(function(t){return s("el-dropdown-item",{key:t.command,attrs:{command:t.command}},[e._v(e._s(t.displayName))])})),1)],1):e._e()],1)]):e._e(),!e.item.options||!0!==e.extended&&!0!==e.extendAll?e._e():s("div",e._l(e.item.options,(function(t){return s("variable-selector-item",{key:t.key,staticClass:"sub-level",attrs:{item:t,extendAll:e.extendAll,allowParentSelect:t.allowParentSelect},on:{itemSelected:e.forwardItemSelected}})})),1)]):s("div",{staticClass:"value clickable",on:{click:function(t){return e.selectItem(e.item)}}},[s("div",{staticClass:"item-title",attrs:{title:e.item.key}},[e._v("\n\t\t\t"+e._s(e.item.name)+":\n\t\t\t"),s("font-awesome-icon",{attrs:{icon:"dot-circle",title:"Select Item"}})],1),s("div",{staticClass:"item-value"},[e._v(e._s(void 0!==e.item.value?e.item.value:"--- EMPTY ---"))])])])},I=[],V=c["default"].extend({name:"VariableSelectorItem",props:["allowParentSelect","extendAll","item"],computed:{itemAddOperations(){const e=[{command:"raw",displayName:"Raw value"}];return"array"===this.item.dataType?(e.push({command:"arrayLength",displayName:"Length"}),e.push({command:"arrayValues",displayName:"Values"})):"object"===this.item.dataType&&(e.push({command:"objectKeys",displayName:"Keys"}),e.push({command:"objectValues",displayName:"Values"})),e}},data(){return{extended:!1}},methods:{optionSelected(e,t){let s=t.key;"arrayValues"===e?s=t.key+".join(', ')":"arrayLength"===e?s=t.key+".length":"objectKeys"===e?s=`Object.keys(${t.key}).join(', ')`:"objectValues"===e&&(s=`Object.values(${t.key}).join(', ')`),this.$emit("itemSelected",{variable:s})},selectItem(e){this.$emit("itemSelected",{variable:e.key})},forwardItemSelected(e){this.$emit("itemSelected",e)}}}),W=V,R=(s("6e4f"),Object(m["a"])(W,P,I,!1,null,"42795557",null)),L=R.exports,M=Object(T["a"])(D["a"]).extend({name:"VariableSelector",components:{VariableSelectorItem:L},props:["path"],data(){return{variableFilter:"",selectorOpenInputIndex:null}},computed:{extendAll(){return!!this.variableFilter},currentResults(){return this.getFilterResults(this.variableFilter.toLowerCase(),0)},workflow(){return this.getWorkflow()}},methods:{forwardItemSelected(e){this.$emit("itemSelected",e)},sortOptions(e){return null===e?null:e.sort((e,t)=>{const s=e.hasOwnProperty("options"),o=t.hasOwnProperty("options");return o&&!s?1:!o&&s||e.name<t.name?-1:e.name>t.name?1:0})},removeEmptyEntries(e){if(Array.isArray(e)){const t=[];let s;return e.forEach(e=>{s=this.removeEmptyEntries(e),null!==s&&t.push(s)}),t}if(e&&e.options){const t=this.removeEmptyEntries(e.options);return Array.isArray(t)&&t.length?(e.options=this.sortOptions(t),e):null}return e},getPathNormalized(e){if(void 0===e)return"";const t=e.split("."),s=[];let o;for(const i of t){const e=i.match(/\[.*?\]/g);if(null===e)s.push(i);else for(o of("["!==i.charAt(0)&&s.push(i.substr(0,i.indexOf("["))),e))o=o.slice(1,-1),['"',"'"].includes(o.charAt(0))?(o=o.slice(1,-1),s.push(o)):s.push(`[${o}]`)}return s.join("|")},jsonDataToFilterOption(e,t,s,o,i,n,a){let r=`${t}["${s}"]`;void 0!==i&&(r+=`[${i}]`);const l=[];if(null===e)return l.push({name:s,key:r,value:"[null]"}),l;if(Array.isArray(e)){let c=s,d=t;void 0!==i&&(d+=`["${s}"]`,c=i.toString());const u=[];for(let t=0;t<e.length;t++)u.push.apply(u,this.jsonDataToFilterOption(e[t],d,c,o,t,`[Item: ${t}]`,a));l.push({name:n||s,options:u,key:r,allowParentSelect:!0,dataType:"array"})}else if("object"===typeof e){const t=[];for(const s of Object.keys(e))t.push.apply(t,this.jsonDataToFilterOption(e[s],r,s,o,void 0,void 0,a));t.length&&l.push({name:n||s,options:this.sortOptions(t),key:r,allowParentSelect:!0,dataType:"object"})}else{if(void 0!==o&&-1===s.toLowerCase().indexOf(o))return l;this.getPathNormalized(a)!==this.getPathNormalized(r)&&l.push({name:s,key:r,value:e})}return l},getNodeOutputData(e,t,s,o=0,i=0,n="main",a=0,r=!1){if(!e.hasOwnProperty(t))return null;if(e[t].length<=i)return null;if(!e[t][i].hasOwnProperty("data")||null===e[t][i].data||void 0===e[t][i].data)return null;if(!e[t][i].data.hasOwnProperty(n))return null;if(e[t][i].data[n].length<=a)return null;if(null===e[t][i].data[n][a]||e[t][i].data[n][a].length<=o)return null;const l=e[t][i].data[n][a][o],c=[];if(l.hasOwnProperty("json")){const e=!0===r?"$json":`$node["${t}"].json`,o=[];for(const t of Object.keys(l.json))o.push.apply(o,this.jsonDataToFilterOption(l.json[t],e,t,s));o.length&&c.push({name:"JSON",options:this.sortOptions(o)})}if(l.hasOwnProperty("binary")){const e=!0===r?"$binary":`$node["${t}"].binary`,o=[];let i=[];for(const t of Object.keys(l.binary)){i=[];for(const o in l.binary[t])"data"!==o&&(s&&-1===o.toLowerCase().indexOf(s)||i.push({name:o,key:`${e}.${t}.${o}`,value:l.binary[t][o]}));i.length&&o.push({name:t,key:`${e}.${t}`,options:this.sortOptions(i),allowParentSelect:!0})}o.length&&c.push({name:"Binary",key:e,options:this.sortOptions(o),allowParentSelect:!0})}return c},getNodeContext(e,t,s,o,i){const n=0,r=0,l="main",c=0,d=[],u=this.connectionInputData(s,l,c,n);if(null===u)return d;const p=new a["WorkflowDataProxy"](e,t,c,r,o,u),h=p.getDataProxy(),m=h.$node[o].context;for(const a of Object.keys(m))void 0!==i&&-1===a.toLowerCase().indexOf(i)||d.push({name:a,key:`$node["${o}"].context["${a}"]`,value:m[a]});return d},getNodeParameters(e,t,s,o){const i=this.workflow.getNode(e);if(null===i)return null;const n=[];for(const a in i.parameters)a!==s&&(void 0!==o&&-1===a.toLowerCase().indexOf(o)||n.push.apply(n,this.jsonDataToFilterOption(i.parameters[a],t,a,o,void 0,void 0,s)));return n},getFilterResults(e,t){const s="main",o=this.$store.getters.activeNode;if(null===o)return[];const i=this.$store.getters.getWorkflowExecution;let n=this.workflow.getParentNodes(o.name,s,1),a=this.$store.getters.getWorkflowRunData;null===a&&(a={});let r=[];const l=[];let c,d;if(null!==i){const t=i.data;c=this.getNodeContext(this.workflow,t,n,o.name,e),c.length&&l.push({name:"Context",options:this.sortOptions(c)})}if(n.length){const s=this.workflow.getNodeConnectionOutputIndex(o.name,n[0],"main");d=this.getNodeOutputData(a,n[0],e,t,0,"main",s,!0),d&&(JSON.stringify(d).length<102400?l.push({name:"Input Data",options:this.sortOptions(d)}):l.push({name:"Input Data",options:[{name:"[Data to large]"}]}))}const u="$parameter";let p=this.path;p.startsWith("parameters.")&&(p=u+p.substring(10)),l.push({name:"Parameters",options:this.sortOptions(this.getNodeParameters(o.name,u,p,e))}),r.push({name:"Current Node",options:this.sortOptions(l)});const h=[];let m;const f=this.workflow.getParentNodes(o.name,s);for(const w of Object.keys(this.workflow.nodes))if(w!==o.name){if(m=[{name:"Parameters",options:this.sortOptions(this.getNodeParameters(w,`$node["${w}"].parameter`,void 0,e))}],null!==i){const t=i.data;n=this.workflow.getParentNodes(w,s,1),c=this.getNodeContext(this.workflow,t,n,w,e),c.length&&(m=[{name:"Context",options:this.sortOptions(c)}])}f.includes(w)&&(d=this.getNodeOutputData(a,w,e,t),d&&m.push({name:"Output Data",options:this.sortOptions(d)})),h.push({name:w,options:this.sortOptions(m)})}return r.push({name:"Nodes",options:this.sortOptions(h)}),r=this.removeEmptyEntries(r),null===r?[]:r}}}),j=M,B=(s("fce6"),Object(m["a"])(j,S,_,!1,null,"3d5d07d1",null)),F=B.exports,U=c["default"].extend({name:"ExpressionEdit",props:["dialogVisible","parameter","path","value"],components:{ExpressionInput:O,VariableSelector:F},data(){return{}},methods:{valueChanged(e){this.$emit("valueChanged",e)},closeDialog(){return this.$emit("closeDialog"),!1},itemSelected(e){this.$refs.inputFieldExpression.itemSelected(e)}}}),z=U,H=(s("fec8"),Object(m["a"])(z,g,v,!1,null,"6d3f0730",null)),q=H.exports,J=function(){var e=this,t=e.$createElement,s=e._self._c||t;return e.dialogVisible?s("div",[s("el-dialog",{attrs:{visible:e.dialogVisible,"append-to-body":"",width:"80%",title:"Edit "+e.parameter.displayName,"before-close":e.closeDialog}},[s("div",{staticClass:"text-editor-wrapper ignore-key-press"},[s("div",{staticClass:"editor-description"},[e._v("\n\t\t\t\t"+e._s(e.parameter.displayName)+":\n\t\t\t")]),s("div",{staticClass:"text-editor",on:{keydown:[function(e){e.stopPropagation()},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"esc",27,t.key,["Esc","Escape"])?null:e.closeDialog()}]}},[s("el-input",{ref:"inputField",attrs:{type:"textarea",value:e.value,placeholder:e.parameter.placeholder,rows:"15"},on:{change:e.valueChanged,keydown:function(t){return t.stopPropagation(),e.noOp(t)}},model:{value:e.tempValue,callback:function(t){e.tempValue=t},expression:"tempValue"}})],1)])])],1):e._e()},K=[],Y=c["default"].extend({name:"TextEdit",props:["dialogVisible","parameter","value"],data(){return{tempValue:""}},methods:{valueChanged(e){this.$emit("valueChanged",e)},closeDialog(){return this.$emit("closeDialog"),!1}},mounted(){this.tempValue=this.value},watch:{dialogVisible(){!0===this.dialogVisible&&c["default"].nextTick(()=>{this.$refs.inputField.focus()})},value(){this.tempValue=this.value}}}),G=Y,X=(s("6188"),Object(m["a"])(G,J,K,!1,null,"e1a93d38",null)),Z=X.exports,Q=s("4971"),ee=s("6fae"),te=s("77f0"),se=Object(T["a"])(Q["a"],ee["a"],te["a"],D["a"]).extend({name:"ParameterInput",components:{CodeEdit:w,ExpressionEdit:q,PrismEditor:u.a,TextEdit:Z},props:["displayOptions","parameter","path","value","isCredential"],data(){return{codeEditDialogVisible:!1,nodeName:"",expressionAddOperation:"set",expressionEditDialogVisible:!1,remoteParameterOptions:[],remoteParameterOptionsLoading:!1,remoteParameterOptionsLoadingIssues:null,textEditDialogVisible:!1,tempValue:"",dateTimePickerOptions:{shortcuts:[{text:"Today",onClick(e){e.$emit("pick",new Date)}},{text:"Yesterday",onClick(e){const t=new Date;t.setTime(t.getTime()-864e5),e.$emit("pick",t)}},{text:"A week ago",onClick(e){const t=new Date;t.setTime(t.getTime()-6048e5),e.$emit("pick",t)}}]}}},watch:{dependentParametersValues(){this.loadRemoteParameterOptions()},value(){"color"===this.parameter.type&&!0===this.getArgument("showAlpha")||(this.tempValue=this.displayValue)}},computed:{dependentParametersValues(){const e=this.getArgument("loadOptionsDependsOn");if(void 0===e)return null;const t=this.$store.getters.activeNode.parameters,s=this.getResolveNodeParameters(t),o=[];for(const i of e)o.push(Object(n["get"])(s,i));return o.join("|")},node(){return!0===this.isCredential?null:this.$store.getters.activeNode},displayTitle(){let e=`Parameter: "${this.shortPath}"`;return this.getIssues.length?(e+=" has issues",!0===this.isValueExpression&&(e+=" and expression"),e+="!"):!0===this.isValueExpression&&(e+=" has expression"),e},displayValue(){if(!0===this.remoteParameterOptionsLoading)return"Loading options...";let e;if(e=!1===this.isValueExpression?this.value:this.expressionValueComputed,"color"===this.parameter.type&&!0===this.getArgument("showAlpha")&&"#"===e.charAt(0)){const t=parseInt(e.slice(1),16),s=[];s.push(t>>24&255),s.push(t>>16&255),s.push(t>>8&255),s.push((255-t&255)/255),e="rgba("+s.join()+")"}if(void 0!==e&&null!==e&&"string"===this.parameter.type){const t=this.getArgument("rows");void 0!==t&&1!==t||(e=e.toString().replace(/\n/,"|"))}return e},displayOptionsComputed(){return!0!==this.isReadOnly&&("collection"!==this.parameter.type&&!0===this.displayOptions)},expressionValueComputed(){if(!0===this.isCredential||null===this.node)return null;let e;try{e=this.resolveExpression(this.value)}catch(t){e=`[ERROR: ${t.message}]`}return"number"===this.parameter.type&&(e=parseInt(e,10),isNaN(e))?null:e},getStringInputType(){if(!0===this.getArgument("password"))return"password";const e=this.getArgument("rows");return void 0!==e&&e>1?"textarea":"text"},getIssues(){if(!0===this.isCredential||null===this.node)return[];const e=this.shortPath.split(".");e.pop();const t=a["NodeHelpers"].getParameterIssues(this.parameter,this.node.parameters,e.join("."));if(["options","multiOptions"].includes(this.parameter.type)&&!1===this.remoteParameterOptionsLoading&&null===this.remoteParameterOptionsLoadingIssues){const e=this.parameterOptions.map(e=>e.value),s=[];Array.isArray(this.displayValue)?s.push.apply(s,this.displayValue):s.push(this.displayValue);for(const o of s)null!==o&&e.includes(o)||(void 0===t.parameters&&(t.parameters={}),t.parameters[this.parameter.name]=[`The value "${o}" is not supported!`])}else null!==this.remoteParameterOptionsLoadingIssues&&(void 0===t.parameters&&(t.parameters={}),t.parameters[this.parameter.name]=[`There was a problem loading the parameter options from server: "${this.remoteParameterOptionsLoadingIssues}"`]);return void 0!==t&&void 0!==t.parameters&&void 0!==t.parameters[this.parameter.name]?t.parameters[this.parameter.name]:[]},isDefault(){return this.parameter.default===this.value},isEditor(){return"code"===this.getArgument("editor")},isValueExpression(){return!0!==this.parameter.noDataExpression&&("string"===typeof this.value&&"="===this.value.charAt(0))},parameterOptions(){return void 0===this.remoteMethod?this.parameter.options:this.remoteParameterOptions},parameterInputClasses(){const e=[];return this.isValueExpression&&e.push("expression"),this.getIssues.length&&e.push("has-issues"),e},parameterInputWrapperStyle(){let e=0;const t={width:"100%"};return!0===this.displayOptionsComputed&&(e+=25),this.getIssues.length&&(e+=20),0!==e&&(t.width=`calc(100% - ${e}px)`),t},remoteMethod(){return this.getArgument("loadOptionsMethod")},shortPath(){const e=this.path.split(".");return e.shift(),e.join(".")},workflow(){return this.getWorkflow()}},methods:{getResolveNodeParameters(e){const t={};for(const s of Object.keys(e))Array.isArray(e[s])?t[s]=e[s].map(e=>this.resolveExpression(e)):"object"===typeof e[s]?t[s]=this.getResolveNodeParameters(e[s]):t[s]=this.resolveExpression(e[s]);return t},async loadRemoteParameterOptions(){if(null===this.node||void 0===this.remoteMethod||this.remoteParameterOptionsLoading)return;this.remoteParameterOptionsLoadingIssues=null,this.remoteParameterOptionsLoading=!0,this.remoteParameterOptions.length=0;const e=this.$store.getters.activeNode.parameters,t=this.getR