n8n-editor-ui
Version:
Workflow Editor UI for n8n
2 lines • 1.55 kB
JavaScript
(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{};e.SENTRY_RELEASE={id:`n8n@2.13.4`}}catch{}})();try{(function(){var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`34546f48-1469-49f6-a136-44a489254664`,e._sentryDebugIdIdentifier=`sentry-dbid-34546f48-1469-49f6-a136-44a489254664`)})()}catch{}import{o as e}from"./chunk-DxpFCn6T.js";import{bt as t}from"./_MapCache-CUJwh2qp.js";import{t as n}from"./dateformat-CYfyw486.js";var r=e(n(),1);const i=e=>e.findLast(e=>e.event===`activated`),a=e=>`Version ${e.substring(0,8)}`,o=({workflowHistory:e,currentVersionId:n})=>{let r=t();return e.name?e.name:e.versionId===n?r.baseText(`workflowHistory.item.currentChanges`):a(e.versionId)},s=e=>{let t=new Date().getFullYear().toString(),[n,i]=(0,r.default)(e,`${e.startsWith(t)?``:`yyyy `}mmm d"#"HH:MM:ss`).split(`#`);return{date:n,time:i}},c=e=>{let t=[],n=[],r=0,i=()=>{n.length>0&&(t.push({type:`group-header`,groupId:`group-${r++}`,count:n.length,versions:[...n]}),n=[])};for(let r=0;r<e.length;r++){let a=e[r];r!==0&&!a.name?.trim()?n.push({type:`version`,item:a,originalIndex:r,isGrouped:!0}):(i(),t.push({type:`version`,item:a,originalIndex:r,isGrouped:!1}))}return i(),t},l=e=>{if(e)return e.activeVersionId??e.activeVersion?.versionId??void 0};export{l as a,i,s as n,o,a as r,c as t};
//# sourceMappingURL=utils-B8F_XQAK.js.map