UNPKG

n8n-editor-ui

Version:

Workflow Editor UI for n8n

2 lines 2.44 kB
!function(){try{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{}).SENTRY_RELEASE={id:"n8n@2.13.4"}}catch(e){}}(),System.register(["./vue.runtime.esm-bundler-legacy-IafOlCW8.js","./src-legacy-Dwzr7bD0.js","./users.store-legacy-OKuN0qAC.js","./constants-legacy-DNCca_FT.js","./_baseOrderBy-legacy-PsQY_Pvh.js"],(function(e,n){var t,o,r,a,s,i,c,d,l,u,f,p,b;return{setters:[function(e){t=e.Ft,o=e.S},function(e){r=e._t},function(e){a=e.Hr,s=e.at,i=e.en,c=e.hr,d=e.s,l=e.sl},function(e){u=e.Xc,f=e.ms,p=e.n},function(e){b=e.j}],execute:function(){try{n="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},(y=(new n.Error).stack)&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[y]="b543e063-066b-4b83-ab55-c3bc512ccb88",n._sentryDebugIdIdentifier="sentry-dbid-b543e063-066b-4b83-ab55-c3bc512ccb88")}catch(n){}var n,y;e("t",b(l.EXPERIMENT_EMPTY_STATE_BUILDER_PROMPT,(()=>{const e=a(),n=c(),l=d(),b=s(),y=r(),m=i(),g=t(null),w=o((()=>e.getVariant(u.name))),I=o((()=>w.value===u.variantBuilderPrompt)),h=o((()=>n.userIsTrialing&&I.value));return{currentVariant:w,isFeatureEnabled:h,pendingPrompt:o((()=>g.value)),createWorkflowWithPrompt:async function(e,n,t){m.track("User submitted empty state builder prompt",{prompt_length:e.length}),g.value=e;const o=await l.createNewWorkflow({name:p,nodes:[],connections:{},projectId:n,parentFolderId:t});await y.push({name:f.WORKFLOW,params:{name:o.id}})},consumePendingPrompt:function(){const e=g.value;return g.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&&(b.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 l.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 y.push({name:f.WORKFLOW,params:{name:r.id}})}}})))}}})); //# sourceMappingURL=emptyStateBuilderPrompt.store-legacy-ClAJh0oo.js.map