n8n-editor-ui
Version:
Workflow Editor UI for n8n
2 lines • 2.49 kB
JavaScript
!function(){try{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{}).SENTRY_RELEASE={id:"n8n@2.16.1"}}catch(e){}}(),System.register(["./vue.runtime.esm-bundler-legacy-BW6xDdqj.js","./src-legacy-B67uuxhB.js","./users.store-legacy-azRUgFdP.js","./constants-legacy-2_ytuuS3.js","./useRootStore-legacy-CC08el-l.js","./settings.store-legacy-I6rZOvfF.js"],(function(e,n){var t,o,r,a,s,i,d,l,c,f,u,p,y;return{setters:[function(e){t=e.Ft,o=e.S},function(e){r=e.lt},function(e){a=e.Nn,s=e.fr,i=e.hr,d=e.it,l=e.s},function(e){c=e.Ic,f=e.Qo,u=e.n},function(e){p=e.T},function(e){y=e.An}],execute:function(){try{n="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},(g=(new n.Error).stack)&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[g]="db07fe1a-0e90-46bf-8d26-cabab63678fc",n._sentryDebugIdIdentifier="sentry-dbid-db07fe1a-0e90-46bf-8d26-cabab63678fc")}catch(n){}var n,g;e("t",p(y.EXPERIMENT_EMPTY_STATE_BUILDER_PROMPT,(()=>{const e=i(),n=a(),p=l(),y=d(),g=r(),m=s(),b=t(null),w=o((()=>e.getVariant(c.name))),I=o((()=>w.value===c.variantBuilderPrompt)),h=o((()=>n.userIsTrialing&&I.value));return{currentVariant:w,isFeatureEnabled:h,pendingPrompt:o((()=>b.value)),createWorkflowWithPrompt:async function(e,n,t){m.track("User submitted empty state builder prompt",{prompt_length:e.length}),b.value=e;const o=await p.createNewWorkflow({name:u,nodes:[],connections:{},projectId:n,parentFolderId:t});await g.push({name:f.WORKFLOW,params:{name:o.id}})},consumePendingPrompt:function(){const e=b.value;return b.value=null,e},createWorkflowFromImport:async function(e,n,t){if("object"!=typeof(o=e)||null===o||!("nodes"in o)||!Array.isArray(o.nodes))throw new Error("Invalid workflow data");var o;!function(e){if(e?.nodes)for(const n of e.nodes)if(n.credentials)for(const[e,t]of Object.entries(n.credentials))"string"!=typeof t&&null!==t.id&&(y.getCredentialById(t.id)||delete n.credentials[e])}(e),m.track("User imported workflow from empty state",{node_count:e.nodes?.length??0});const r=await p.createNewWorkflow({name:e.name??"My workflow",nodes:e.nodes??[],connections:e.connections??{},settings:e.settings,pinData:e.pinData,meta:e.meta,projectId:n,parentFolderId:t});await g.push({name:f.WORKFLOW,params:{name:r.id}})}}})))}}}));
//# sourceMappingURL=emptyStateBuilderPrompt.store-legacy-BeIEEd3Z.js.map