bluekiwi 1.1.2 → 1.2.0

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.
Files changed (127) hide show
  1. package/README.md +59 -0
  2. package/dist/assets/app-runtime/.next/BUILD_ID +1 -1
  3. package/dist/assets/app-runtime/.next/app-path-routes-manifest.json +5 -5
  4. package/dist/assets/app-runtime/.next/build-manifest.json +2 -2
  5. package/dist/assets/app-runtime/.next/prerender-manifest.json +3 -3
  6. package/dist/assets/app-runtime/.next/server/app/(app)/credentials/page_client-reference-manifest.js +1 -1
  7. package/dist/assets/app-runtime/.next/server/app/(app)/docs/page_client-reference-manifest.js +1 -1
  8. package/dist/assets/app-runtime/.next/server/app/(app)/instructions/page_client-reference-manifest.js +1 -1
  9. package/dist/assets/app-runtime/.next/server/app/(app)/page_client-reference-manifest.js +1 -1
  10. package/dist/assets/app-runtime/.next/server/app/(app)/settings/groups/page_client-reference-manifest.js +1 -1
  11. package/dist/assets/app-runtime/.next/server/app/(app)/settings/page_client-reference-manifest.js +1 -1
  12. package/dist/assets/app-runtime/.next/server/app/(app)/tasks/[id]/page.js +1 -1
  13. package/dist/assets/app-runtime/.next/server/app/(app)/tasks/[id]/page_client-reference-manifest.js +1 -1
  14. package/dist/assets/app-runtime/.next/server/app/(app)/tasks/page_client-reference-manifest.js +1 -1
  15. package/dist/assets/app-runtime/.next/server/app/(app)/tutorial/page_client-reference-manifest.js +1 -1
  16. package/dist/assets/app-runtime/.next/server/app/(app)/workflows/[id]/edit/page_client-reference-manifest.js +1 -1
  17. package/dist/assets/app-runtime/.next/server/app/(app)/workflows/[id]/page_client-reference-manifest.js +1 -1
  18. package/dist/assets/app-runtime/.next/server/app/(app)/workflows/new/page_client-reference-manifest.js +1 -1
  19. package/dist/assets/app-runtime/.next/server/app/(app)/workflows/page_client-reference-manifest.js +1 -1
  20. package/dist/assets/app-runtime/.next/server/app/(auth)/change-password/page_client-reference-manifest.js +1 -1
  21. package/dist/assets/app-runtime/.next/server/app/(auth)/invite/[token]/page_client-reference-manifest.js +1 -1
  22. package/dist/assets/app-runtime/.next/server/app/(auth)/login/page_client-reference-manifest.js +1 -1
  23. package/dist/assets/app-runtime/.next/server/app/(auth)/setup/page_client-reference-manifest.js +1 -1
  24. package/dist/assets/app-runtime/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  25. package/dist/assets/app-runtime/.next/server/app/_global-error.html +1 -1
  26. package/dist/assets/app-runtime/.next/server/app/_global-error.rsc +1 -1
  27. package/dist/assets/app-runtime/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  28. package/dist/assets/app-runtime/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  29. package/dist/assets/app-runtime/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  30. package/dist/assets/app-runtime/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  31. package/dist/assets/app-runtime/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  32. package/dist/assets/app-runtime/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  33. package/dist/assets/app-runtime/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  34. package/dist/assets/app-runtime/.next/server/app/_not-found.html +1 -1
  35. package/dist/assets/app-runtime/.next/server/app/_not-found.rsc +1 -1
  36. package/dist/assets/app-runtime/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
  37. package/dist/assets/app-runtime/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  38. package/dist/assets/app-runtime/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
  39. package/dist/assets/app-runtime/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  40. package/dist/assets/app-runtime/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  41. package/dist/assets/app-runtime/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  42. package/dist/assets/app-runtime/.next/server/app/api/tasks/start/route.js +1 -1
  43. package/dist/assets/app-runtime/.next/server/app/api/version/route.js +1 -1
  44. package/dist/assets/app-runtime/.next/server/app/api/workflows/[id]/activate/route.js +5 -5
  45. package/dist/assets/app-runtime/.next/server/app/api/workflows/[id]/route.js +5 -5
  46. package/dist/assets/app-runtime/.next/server/app/api/workflows/[id]/transfer/route.js +5 -5
  47. package/dist/assets/app-runtime/.next/server/app/api/workflows/import/route.js +1 -1
  48. package/dist/assets/app-runtime/.next/server/app/api/workflows/route.js +5 -5
  49. package/dist/assets/app-runtime/.next/server/app/change-password.html +1 -1
  50. package/dist/assets/app-runtime/.next/server/app/change-password.rsc +1 -1
  51. package/dist/assets/app-runtime/.next/server/app/change-password.segments/!KGF1dGgp/change-password/__PAGE__.segment.rsc +1 -1
  52. package/dist/assets/app-runtime/.next/server/app/change-password.segments/!KGF1dGgp/change-password.segment.rsc +1 -1
  53. package/dist/assets/app-runtime/.next/server/app/change-password.segments/!KGF1dGgp.segment.rsc +1 -1
  54. package/dist/assets/app-runtime/.next/server/app/change-password.segments/_full.segment.rsc +1 -1
  55. package/dist/assets/app-runtime/.next/server/app/change-password.segments/_head.segment.rsc +1 -1
  56. package/dist/assets/app-runtime/.next/server/app/change-password.segments/_index.segment.rsc +1 -1
  57. package/dist/assets/app-runtime/.next/server/app/change-password.segments/_tree.segment.rsc +1 -1
  58. package/dist/assets/app-runtime/.next/server/app/login.html +1 -1
  59. package/dist/assets/app-runtime/.next/server/app/login.rsc +1 -1
  60. package/dist/assets/app-runtime/.next/server/app/login.segments/!KGF1dGgp/login/__PAGE__.segment.rsc +1 -1
  61. package/dist/assets/app-runtime/.next/server/app/login.segments/!KGF1dGgp/login.segment.rsc +1 -1
  62. package/dist/assets/app-runtime/.next/server/app/login.segments/!KGF1dGgp.segment.rsc +1 -1
  63. package/dist/assets/app-runtime/.next/server/app/login.segments/_full.segment.rsc +1 -1
  64. package/dist/assets/app-runtime/.next/server/app/login.segments/_head.segment.rsc +1 -1
  65. package/dist/assets/app-runtime/.next/server/app/login.segments/_index.segment.rsc +1 -1
  66. package/dist/assets/app-runtime/.next/server/app/login.segments/_tree.segment.rsc +1 -1
  67. package/dist/assets/app-runtime/.next/server/app/setup.html +1 -1
  68. package/dist/assets/app-runtime/.next/server/app/setup.rsc +1 -1
  69. package/dist/assets/app-runtime/.next/server/app/setup.segments/!KGF1dGgp/setup/__PAGE__.segment.rsc +1 -1
  70. package/dist/assets/app-runtime/.next/server/app/setup.segments/!KGF1dGgp/setup.segment.rsc +1 -1
  71. package/dist/assets/app-runtime/.next/server/app/setup.segments/!KGF1dGgp.segment.rsc +1 -1
  72. package/dist/assets/app-runtime/.next/server/app/setup.segments/_full.segment.rsc +1 -1
  73. package/dist/assets/app-runtime/.next/server/app/setup.segments/_head.segment.rsc +1 -1
  74. package/dist/assets/app-runtime/.next/server/app/setup.segments/_index.segment.rsc +1 -1
  75. package/dist/assets/app-runtime/.next/server/app/setup.segments/_tree.segment.rsc +1 -1
  76. package/dist/assets/app-runtime/.next/server/app-paths-manifest.json +5 -5
  77. package/dist/assets/app-runtime/.next/server/chunks/2624.js +1 -1
  78. package/dist/assets/app-runtime/.next/server/chunks/4024.js +1 -1
  79. package/dist/assets/app-runtime/.next/server/middleware-build-manifest.js +1 -1
  80. package/dist/assets/app-runtime/.next/server/pages/404.html +1 -1
  81. package/dist/assets/app-runtime/.next/server/pages/500.html +1 -1
  82. package/dist/assets/app-runtime/.next/server/server-reference-manifest.json +1 -1
  83. package/dist/assets/app-runtime/.next/static/chunks/{7552-67667f5f15d4f961.js → 7552-aa220264909ca9d9.js} +1 -1
  84. package/dist/assets/app-runtime/.next/static/chunks/{9243-34655a593a6aa471.js → 9243-9c99cc0df75c9121.js} +1 -1
  85. package/dist/assets/app-runtime/.next/static/chunks/app/(app)/instructions/{page-0aa5fcbf056c7144.js → page-dd25654a8191a638.js} +1 -1
  86. package/dist/assets/app-runtime/.next/static/chunks/app/(app)/{layout-64cb9b84079366f9.js → layout-d7f54b544bb8d2df.js} +1 -1
  87. package/dist/assets/app-runtime/.next/static/chunks/app/(app)/tasks/[id]/{page-29349afdbe6e318f.js → page-e88075977b43a9d5.js} +1 -1
  88. package/dist/assets/app-runtime/node_modules/@img/sharp-libvips-linux-arm64/lib/index.js +1 -0
  89. package/dist/assets/app-runtime/node_modules/@img/sharp-libvips-linux-arm64/lib/libvips-cpp.so.8.17.3 +0 -0
  90. package/dist/assets/app-runtime/node_modules/@img/sharp-libvips-linux-arm64/package.json +42 -0
  91. package/dist/assets/app-runtime/node_modules/@img/sharp-libvips-linux-arm64/versions.json +30 -0
  92. package/dist/assets/app-runtime/node_modules/@img/sharp-libvips-linuxmusl-arm64/lib/index.js +1 -0
  93. package/dist/assets/app-runtime/node_modules/@img/sharp-libvips-linuxmusl-arm64/lib/libvips-cpp.so.8.17.3 +0 -0
  94. package/dist/assets/app-runtime/node_modules/@img/sharp-libvips-linuxmusl-arm64/package.json +42 -0
  95. package/dist/assets/app-runtime/node_modules/@img/sharp-libvips-linuxmusl-arm64/versions.json +30 -0
  96. package/dist/assets/app-runtime/node_modules/@img/sharp-linux-arm64/LICENSE +191 -0
  97. package/dist/assets/app-runtime/node_modules/@img/sharp-linux-arm64/lib/sharp-linux-arm64.node +0 -0
  98. package/dist/assets/app-runtime/node_modules/@img/sharp-linux-arm64/package.json +46 -0
  99. package/dist/assets/app-runtime/node_modules/@img/sharp-linuxmusl-arm64/LICENSE +191 -0
  100. package/dist/assets/app-runtime/node_modules/@img/sharp-linuxmusl-arm64/lib/sharp-linuxmusl-arm64.node +0 -0
  101. package/dist/assets/app-runtime/node_modules/@img/sharp-linuxmusl-arm64/package.json +46 -0
  102. package/dist/assets/app-runtime/node_modules/better-sqlite3/build/Release/better_sqlite3.node +0 -0
  103. package/dist/assets/app-runtime/package.json +1 -1
  104. package/dist/runtimes/antigravity.js +14 -0
  105. package/dist/runtimes/claude-code.js +10 -62
  106. package/dist/runtimes/claude-desktop.js +16 -0
  107. package/dist/runtimes/cline.js +16 -0
  108. package/dist/runtimes/codex.js +8 -24
  109. package/dist/runtimes/continue.js +68 -0
  110. package/dist/runtimes/cursor.js +14 -0
  111. package/dist/runtimes/detect.js +24 -0
  112. package/dist/runtimes/gemini-cli.js +9 -61
  113. package/dist/runtimes/goose.js +109 -0
  114. package/dist/runtimes/jetbrains.js +50 -0
  115. package/dist/runtimes/json-mcp.js +93 -0
  116. package/dist/runtimes/openclaw.js +9 -61
  117. package/dist/runtimes/opencode.js +9 -61
  118. package/dist/runtimes/platform-paths.js +57 -0
  119. package/dist/runtimes/roo-code.js +15 -0
  120. package/dist/runtimes/skills-helper.js +31 -0
  121. package/dist/runtimes/trae.js +16 -0
  122. package/dist/runtimes/vscode.js +19 -0
  123. package/dist/runtimes/windsurf.js +15 -0
  124. package/dist/runtimes/zed.js +16 -0
  125. package/package.json +6 -3
  126. /package/dist/assets/app-runtime/.next/static/{hqMZcC_as2uhicKR6YANm → UVzMOjly0ACJRK3vNndFP}/_buildManifest.js +0 -0
  127. /package/dist/assets/app-runtime/.next/static/{hqMZcC_as2uhicKR6YANm → UVzMOjly0ACJRK3vNndFP}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- exports.id=4024,exports.ids=[4024],exports.modules={2864:(a,b,c)=>{"use strict";c.d(b,{E:()=>i});var d=c(48249);c(67484);var e=c(21654),f=c(43980),g=c(14490);let h=(0,e.F)("inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-3 py-1 text-xs font-semibold tracking-[0.01em] whitespace-nowrap transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3",{variants:{variant:{default:"border-brand-blue-600/20 bg-brand-blue-100 text-brand-blue-700",accent:"border-brand-kiwi-600/30 bg-brand-kiwi-100 text-brand-kiwi-700",neutral:"border-border bg-brand-surface-soft text-brand-ink-700",success:"border-success/20 bg-success/10 text-success",warning:"border-warning/20 bg-warning/10 text-warning",danger:"border-danger/20 bg-danger/10 text-danger",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40 [a&]:hover:bg-destructive/90",outline:"border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",ghost:"border-transparent [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",link:"border-transparent text-primary underline-offset-4 [a&]:hover:underline"}},defaultVariants:{variant:"default"}});function i({className:a,variant:b,asChild:c=!1,...e}){let j=c?f.bL:"span";return(0,d.jsx)(j,{"data-slot":"badge","data-variant":b,className:(0,g.cn)(h({variant:b}),a),...e})}},9402:(a,b,c)=>{"use strict";c.d(b,{Sidebar:()=>K});var d=c(48249),e=c(67484),f=c(81220),g=c(2116),h=c.n(g),i=c(19099),j=c(45577),k=c(54641),l=c(48684),m=c(80600),n=c(35654),o=c(20150),p=c(31763),q=c(17387),r=c(37436),s=c(95581),t=c(41023),u=c(1619),v=c(67132),w=c(56128),x=c(10636),y=c(33922),z=c(96029),A=c(14490),B=c(2864),C=c(38393),D=c(55296),E=c(859);function F({className:a,orientation:b="horizontal",decorative:c=!0,...e}){return(0,d.jsx)(E.b,{"data-slot":"separator",decorative:c,orientation:b,className:(0,A.cn)("shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",a),...e})}var G=c(82244);function H({href:a,icon:b,label:c,collapsed:e,badge:f,external:g}){let j=(0,i.usePathname)(),k=!g&&(j===a||j.startsWith(a+"/")),l=(0,A.cn)("flex items-center gap-3 rounded-lg px-3 py-2 text-sm transition-colors",k?"bg-[var(--sidebar-accent)] text-[var(--sidebar-accent-foreground)] font-medium":"text-[var(--sidebar-foreground)]/70 hover:bg-[var(--sidebar-accent)]/50 hover:text-[var(--sidebar-foreground)]"),m=(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(b,{className:"h-4 w-4 shrink-0"}),!e&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("span",{className:"flex-1 truncate",children:c}),void 0!==f&&f>0&&(0,d.jsx)(B.E,{variant:"secondary",className:"ml-auto h-5 px-1.5 text-[10px]",children:f})]})]}),n=g?(0,d.jsx)("a",{href:a,target:"_blank",rel:"noopener noreferrer",className:l,children:m}):(0,d.jsx)(h(),{href:a,className:l,children:m});return e?(0,d.jsxs)(D.m_,{delayDuration:0,children:[(0,d.jsx)(D.k$,{asChild:!0,children:n}),(0,d.jsxs)(D.ZI,{side:"right",className:"flex items-center gap-2",children:[c,void 0!==f&&f>0&&(0,d.jsx)(B.E,{variant:"secondary",className:"h-5 px-1.5 text-[10px]",children:f})]})]}):n}var I=c(45729);let J="https://github.com/dandacompany/bluekiwi";function K({user:a,teamName:b}){let c=(0,i.useRouter)(),{t:g,locale:E,setLocale:L}=(0,I.B)(),[M,N]=(0,e.useState)(!1),[O,P]=(0,e.useState)({current:"",hasUpdate:!1,latest:null,releaseUrl:null}),[Q,R]=(0,e.useState)(!1),S=(0,e.useMemo)(()=>[{href:"/workflows",icon:j.A,label:g("nav.workflows")},{href:"/tasks",icon:k.A,label:g("nav.tasks")},{href:"/credentials",icon:l.A,label:g("nav.credentials")},{href:"/instructions",icon:m.A,label:g("nav.instructions")}],[g]),T=(0,e.useMemo)(()=>[{href:"/tutorial",icon:n.A,label:g("nav.tutorial")},{href:"/docs",icon:o.A,label:g("nav.apiDocs")},{href:"https://bluekiwi.work",icon:p.A,label:g("nav.marketplace"),external:!0}],[g]),U=async()=>{await fetch("/api/auth/logout",{method:"POST"}),c.push("/login"),c.refresh()};return(0,d.jsxs)(D.Bc,{children:[(0,d.jsxs)("aside",{className:(0,A.cn)("relative flex h-screen flex-col overflow-visible border-r border-[var(--sidebar-border)] bg-[var(--sidebar-background)] transition-[width] duration-200 ease-in-out",M?"w-14":"w-[220px]"),children:[(0,d.jsx)("button",{onClick:()=>{N(a=>(localStorage.setItem("sidebar-collapsed",JSON.stringify(!a)),!a))},"aria-label":M?"Expand sidebar":"Collapse sidebar",className:"absolute top-12 right-0 z-40 flex h-7 w-7 translate-x-1/2 items-center justify-center rounded-full border border-[var(--sidebar-border)] bg-[var(--sidebar-background)] text-[var(--muted-foreground)] shadow-md transition-colors hover:bg-[var(--sidebar-accent)] hover:text-[var(--sidebar-foreground)]",children:M?(0,d.jsx)(q.A,{className:"h-3.5 w-3.5"}):(0,d.jsx)(r.A,{className:"h-3.5 w-3.5"})}),(0,d.jsx)("div",{className:"flex h-14 items-center gap-2 border-b border-[var(--sidebar-border)] px-3",children:(0,d.jsxs)(h(),{href:"/",className:"flex items-center gap-2",children:[(0,d.jsx)(f.default,{src:"/logo-48.png",alt:"BlueKiwi",className:"h-8 w-8 shrink-0 rounded-lg",width:32,height:32}),!M&&(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsx)("span",{className:"block truncate font-semibold tracking-tight text-[var(--sidebar-foreground)]",children:"BlueKiwi"}),b?(0,d.jsx)("span",{className:"block truncate text-[10px] font-medium text-[var(--muted-foreground)]/85",children:b}):null]})]})}),(0,d.jsxs)("div",{className:"flex-1 overflow-y-auto px-2 py-2",children:[!M&&(0,d.jsx)("p",{className:"px-3 pb-1 pt-2 text-[10px] font-semibold uppercase tracking-wider text-[var(--muted-foreground)]",children:g("nav.main")}),(0,d.jsx)("nav",{className:"flex flex-col gap-0.5",children:S.map(a=>(0,d.jsx)(H,{...a,collapsed:M},a.href))}),!M&&(0,d.jsx)("p",{className:"px-3 pb-1 pt-4 text-[10px] font-semibold uppercase tracking-wider text-[var(--muted-foreground)]",children:g("nav.resources")}),M&&(0,d.jsx)(F,{className:"my-2"}),(0,d.jsx)("nav",{className:"flex flex-col gap-0.5",children:T.map(a=>(0,d.jsx)(H,{...a,collapsed:M,external:a.external},a.href))})]}),(0,d.jsx)("div",{className:"border-t border-[var(--sidebar-border)] px-2 py-2",children:a&&(0,d.jsxs)(G.rI,{children:[(0,d.jsx)(G.ty,{asChild:!0,children:(0,d.jsxs)("button",{className:(0,A.cn)("relative flex w-full items-center gap-2 rounded-lg px-3 py-2 transition-colors hover:bg-[var(--sidebar-accent)]/50",M&&"justify-center"),children:[(0,d.jsx)("div",{className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-full bg-[var(--sidebar-accent)] text-xs font-medium",children:a.username.charAt(0).toUpperCase()}),!M&&(0,d.jsxs)("div",{className:"min-w-0 flex-1 text-left",children:[(0,d.jsx)("p",{className:"truncate text-xs font-medium text-[var(--sidebar-foreground)]",children:a.username}),(0,d.jsx)("p",{className:"truncate text-[10px] text-[var(--muted-foreground)]",children:a.role})]}),O.hasUpdate?(0,d.jsx)("span",{className:"absolute top-1.5 right-1.5 flex h-2.5 w-2.5 rounded-full bg-emerald-500 ring-2 ring-[var(--sidebar-background)]"}):null]})}),(0,d.jsxs)(G.SQ,{side:M?"right":"top",align:"start",className:"w-52",children:[(0,d.jsxs)(G._2,{onClick:()=>c.push("/settings"),children:[(0,d.jsx)(s.A,{className:"mr-2 h-3.5 w-3.5"}),g("nav.settings")]}),(0,d.jsxs)(G._2,{onClick:()=>L("ko"===E?"en":"ko"),children:[(0,d.jsx)(t.A,{className:"mr-2 h-3.5 w-3.5"}),"ko"===E?"English":"한국어"]}),(0,d.jsx)(G.mB,{}),(0,d.jsx)(G._2,{asChild:!0,children:(0,d.jsxs)("a",{href:J,target:"_blank",rel:"noopener noreferrer",className:"flex items-center",children:[(0,d.jsx)(u.A,{className:"mr-2 h-3.5 w-3.5"}),g("nav.github")]})}),(0,d.jsx)(G._2,{asChild:!0,children:(0,d.jsxs)("a",{href:"https://github.com/dandacompany/bluekiwi/blob/main/LICENSE.md",target:"_blank",rel:"noopener noreferrer",className:"flex items-center",children:[(0,d.jsx)(v.A,{className:"mr-2 h-3.5 w-3.5"}),g("nav.license")]})}),(0,d.jsx)(G._2,{asChild:!0,children:(0,d.jsxs)("a",{href:"https://buymeacoffee.com/dante.labs",target:"_blank",rel:"noopener noreferrer",className:"flex items-center",children:[(0,d.jsx)(w.A,{className:"mr-2 h-3.5 w-3.5"}),g("nav.support")]})}),(0,d.jsx)(G._2,{onClick:()=>R(!0),children:O.hasUpdate?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(x.A,{className:"mr-2 h-3.5 w-3.5 text-emerald-500"}),(0,d.jsxs)("span",{className:"flex flex-1 items-center gap-1 text-[11px] font-medium",children:[(0,d.jsxs)("span",{className:"text-muted-foreground line-through",children:["v",O.current]}),(0,d.jsx)("span",{className:"text-emerald-500",children:"→"}),(0,d.jsxs)("span",{className:"rounded-sm bg-emerald-500/15 px-1 py-0.5 font-semibold text-emerald-600 dark:text-emerald-400",children:["v",O.latest]})]}),(0,d.jsx)(B.E,{variant:"success",className:"ml-2 px-2 py-0.5",children:g("nav.updateAvailable")})]}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(y.A,{className:"mr-2 h-3.5 w-3.5 opacity-50"}),(0,d.jsxs)("span",{className:"flex-1 opacity-70",children:[g("nav.version")," v",O.current]})]})}),(0,d.jsx)(G.mB,{}),(0,d.jsxs)(G._2,{onClick:U,children:[(0,d.jsx)(z.A,{className:"mr-2 h-3.5 w-3.5"}),g("auth.logout")]})]})]})})]}),(0,d.jsx)(C.lG,{open:Q,onOpenChange:R,children:(0,d.jsxs)(C.Cf,{children:[(0,d.jsxs)(C.c7,{children:[(0,d.jsx)(C.L3,{children:g("nav.versionDialogTitle")}),(0,d.jsx)(C.rr,{children:O.hasUpdate?g("nav.versionDialogDescUpdate",{current:O.current,latest:O.latest??""}):g("nav.versionDialogDescCurrent",{current:O.current})})]}),(0,d.jsxs)("div",{className:"space-y-4 text-sm",children:[O.hasUpdate?(0,d.jsxs)("div",{className:"rounded-2xl border border-emerald-500/20 bg-emerald-500/10 px-4 py-3",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)(x.A,{className:"h-4 w-4 text-emerald-500"}),(0,d.jsx)("span",{className:"font-medium text-emerald-700 dark:text-emerald-400",children:g("nav.updateAvailable")})]}),(0,d.jsxs)("p",{className:"mt-1 text-xs text-muted-foreground",children:["v",O.current," → v",O.latest]})]}):(0,d.jsx)("div",{className:"rounded-2xl border border-border bg-muted/30 px-4 py-3",children:(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)(y.A,{className:"h-4 w-4 text-muted-foreground"}),(0,d.jsxs)("span",{className:"font-medium",children:[g("nav.version")," v",O.current]})]})}),(0,d.jsxs)("div",{className:"space-y-3",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"font-medium",children:g("nav.updateMethodCliTitle")}),(0,d.jsx)("pre",{className:"mt-1 overflow-x-auto rounded-xl border border-border bg-muted/30 px-3 py-2 font-mono text-xs",children:"bluekiwi upgrade"})]}),(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"font-medium",children:g("nav.updateMethodNpmTitle")}),(0,d.jsx)("pre",{className:"mt-1 overflow-x-auto rounded-xl border border-border bg-muted/30 px-3 py-2 font-mono text-xs",children:"npm install -g bluekiwi@latest"})]}),(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"font-medium",children:g("nav.updateMethodDockerTitle")}),(0,d.jsx)("pre",{className:"mt-1 overflow-x-auto rounded-xl border border-border bg-muted/30 px-3 py-2 font-mono text-xs",children:"docker compose pull && docker compose up -d"})]})]})]}),(0,d.jsxs)(C.Es,{children:[(0,d.jsx)("button",{type:"button",className:"inline-flex h-10 items-center justify-center rounded-2xl border border-border px-4 text-sm font-medium transition-colors hover:bg-accent",onClick:()=>R(!1),children:g("common.close")}),(0,d.jsx)("a",{href:O.releaseUrl??`${J}/releases/tag/v${O.current}`,target:"_blank",rel:"noopener noreferrer",className:"inline-flex h-10 items-center justify-center rounded-2xl bg-primary px-4 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/90",children:g("nav.viewReleaseNotes")})]})]})})]})}},14490:(a,b,c)=>{"use strict";c.d(b,{cn:()=>f});var d=c(99314),e=c(96862);function f(...a){return(0,e.QP)((0,d.$)(a))}},15775:(a,b,c)=>{"use strict";c.d(b,{CommandPalette:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call CommandPalette() from the server but CommandPalette is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/dante/workspace/dante-code/projects/bluekiwi/src/components/shared/command-palette.tsx","CommandPalette")},17049:(a,b,c)=>{Promise.resolve().then(c.bind(c,9402)),Promise.resolve().then(c.bind(c,85980)),Promise.resolve().then(c.bind(c,32073))},25250:(a,b,c)=>{"use strict";c.d(b,{G7:()=>k,Gj:()=>j,L$:()=>n,h_:()=>o,oI:()=>l,xL:()=>m});var d=c(48249);c(67484);var e=c(8900),f=c(10316),g=c(14490),h=c(38393);function i({className:a,...b}){return(0,d.jsx)(e.uB,{"data-slot":"command",className:(0,g.cn)("flex h-full w-full flex-col overflow-hidden rounded-[1.5rem] bg-popover text-popover-foreground",a),...b})}function j({title:a="Command Palette",description:b="Search for a command to run...",children:c,className:e,showCloseButton:f=!0,...k}){return(0,d.jsxs)(h.lG,{...k,children:[(0,d.jsxs)(h.c7,{className:"sr-only",children:[(0,d.jsx)(h.L3,{children:a}),(0,d.jsx)(h.rr,{children:b})]}),(0,d.jsx)(h.Cf,{className:(0,g.cn)("overflow-hidden p-0",e),showCloseButton:f,children:(0,d.jsx)(i,{className:"**:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:c})})]})}function k({className:a,...b}){return(0,d.jsxs)("div",{"data-slot":"command-input-wrapper",className:"flex h-9 items-center gap-2 border-b px-3",children:[(0,d.jsx)(f.A,{className:"size-4 shrink-0 opacity-50"}),(0,d.jsx)(e.uB.Input,{"data-slot":"command-input",className:(0,g.cn)("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",a),...b})]})}function l({className:a,...b}){return(0,d.jsx)(e.uB.List,{"data-slot":"command-list",className:(0,g.cn)("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",a),...b})}function m({...a}){return(0,d.jsx)(e.uB.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...a})}function n({className:a,...b}){return(0,d.jsx)(e.uB.Group,{"data-slot":"command-group",className:(0,g.cn)("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",a),...b})}function o({className:a,...b}){return(0,d.jsx)(e.uB.Item,{"data-slot":"command-item",className:(0,g.cn)("relative flex cursor-default items-center gap-2 rounded-xl px-3 py-2 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-[selected=true]:bg-brand-blue-100 data-[selected=true]:text-brand-blue-700 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground",a),...b})}},25297:(a,b,c)=>{"use strict";c.d(b,{$:()=>i});var d=c(48249);c(67484);var e=c(21654),f=c(43980),g=c(14490);let h=(0,e.F)("inline-flex shrink-0 items-center justify-center gap-2 whitespace-nowrap transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 font-semibold [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-[0_10px_18px_rgba(53,87,190,0.18)] hover:bg-brand-blue-700",destructive:"bg-destructive text-destructive-foreground hover:bg-danger/90",outline:"border border-border bg-background text-foreground hover:bg-brand-blue-100 hover:text-brand-blue-700",secondary:"bg-secondary text-secondary-foreground hover:bg-surface-strong",ghost:"text-brand-blue-700 hover:bg-brand-blue-100 hover:text-brand-blue-700",accent:"bg-accent text-accent-foreground hover:bg-kiwi-700 hover:text-white",link:"text-brand-blue-700 underline-offset-4 hover:underline"},size:{default:"h-10 rounded-full px-5 text-[0.95rem]",xs:"h-6 gap-1 rounded-full px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-8 rounded-full px-3.5 text-sm",lg:"h-11 rounded-full px-6 text-[0.98rem]",icon:"size-10 rounded-full","icon-xs":"size-6 rounded-full [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-8 rounded-full","icon-lg":"size-10 rounded-full"}},defaultVariants:{variant:"default",size:"default"}});function i({className:a,variant:b="default",size:c="default",asChild:e=!1,...j}){let k=e?f.bL:"button";return(0,d.jsx)(k,{"data-slot":"button","data-variant":b,"data-size":c,className:(0,g.cn)(h({variant:b,size:c,className:a})),...j})}},32073:(a,b,c)=>{"use strict";c.d(b,{CommandPalette:()=>n});var d=c(48249),e=c(67484),f=c(19099),g=c(45577),h=c(54641),i=c(95581),j=c(24520),k=c(96029),l=c(25250),m=c(45729);function n(){let[a,b]=(0,e.useState)(!1),c=(0,f.useRouter)(),{t:n}=(0,m.B)();function o(a){b(!1),c.push(a)}async function p(){b(!1),await fetch("/api/auth/logout",{method:"POST"}),c.push("/login")}return(0,d.jsxs)(l.Gj,{open:a,onOpenChange:b,children:[(0,d.jsx)(l.G7,{placeholder:n("commandPalette.search")}),(0,d.jsxs)(l.oI,{children:[(0,d.jsx)(l.xL,{children:n("commandPalette.noResults")}),(0,d.jsxs)(l.L$,{heading:n("commandPalette.navigate"),children:[(0,d.jsxs)(l.h_,{onSelect:()=>o("/workflows"),children:[(0,d.jsx)(g.A,{}),(0,d.jsx)("span",{children:n("nav.workflows")})]}),(0,d.jsxs)(l.h_,{onSelect:()=>o("/tasks"),children:[(0,d.jsx)(h.A,{}),(0,d.jsx)("span",{children:n("nav.tasks")})]}),(0,d.jsxs)(l.h_,{onSelect:()=>o("/settings"),children:[(0,d.jsx)(i.A,{}),(0,d.jsx)("span",{children:n("nav.settings")})]})]}),(0,d.jsxs)(l.L$,{heading:n("commandPalette.actions"),children:[(0,d.jsxs)(l.h_,{onSelect:()=>o("/workflows/new"),children:[(0,d.jsx)(j.A,{}),(0,d.jsx)("span",{children:n("commandPalette.newWorkflow")})]}),(0,d.jsxs)(l.h_,{onSelect:()=>p(),children:[(0,d.jsx)(k.A,{}),(0,d.jsx)("span",{children:n("auth.logout")})]})]})]})]})}},35909:(a,b,c)=>{"use strict";c.d(b,{g:()=>h,j:()=>g});var d=c(86935),e=c(69614);let f=new TextEncoder().encode(process.env.JWT_SECRET||"bluekiwi-dev-secret-change-in-production");async function g(a){return new d.P({...a}).setProtectedHeader({alg:"HS256"}).setIssuedAt().setExpirationTime("7d").sign(f)}async function h(a){try{let{payload:b}=await (0,e.V)(a,f);return{userId:b.userId,username:b.username,email:b.email,role:b.role,mustChangePassword:b.mustChangePassword??!1}}catch{return null}}},38393:(a,b,c)=>{"use strict";c.d(b,{Cf:()=>n,Es:()=>p,HM:()=>l,L3:()=>q,c7:()=>o,lG:()=>i,rr:()=>r,zM:()=>j});var d=c(48249);c(67484);var e=c(46674),f=c(83726),g=c(14490),h=c(25297);function i({...a}){return(0,d.jsx)(f.bL,{"data-slot":"dialog",...a})}function j({...a}){return(0,d.jsx)(f.l9,{"data-slot":"dialog-trigger",...a})}function k({...a}){return(0,d.jsx)(f.ZL,{"data-slot":"dialog-portal",...a})}function l({...a}){return(0,d.jsx)(f.bm,{"data-slot":"dialog-close",...a})}function m({className:a,...b}){return(0,d.jsx)(f.hJ,{"data-slot":"dialog-overlay",className:(0,g.cn)("fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0",a),...b})}function n({className:a,children:b,showCloseButton:c=!0,...h}){return(0,d.jsxs)(k,{"data-slot":"dialog-portal",children:[(0,d.jsx)(m,{}),(0,d.jsxs)(f.UC,{"data-slot":"dialog-content",className:(0,g.cn)("fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 overflow-hidden rounded-[1.5rem] border border-border bg-card p-6 shadow-[var(--shadow-soft)] duration-200 outline-none data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 sm:max-w-[28rem]",a),...h,children:[b,c&&(0,d.jsxs)(f.bm,{"data-slot":"dialog-close",className:"absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[(0,d.jsx)(e.A,{}),(0,d.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})}function o({className:a,...b}){return(0,d.jsx)("div",{"data-slot":"dialog-header",className:(0,g.cn)("flex flex-col gap-2 text-center sm:text-left",a),...b})}function p({className:a,showCloseButton:b=!1,children:c,...e}){return(0,d.jsxs)("div",{"data-slot":"dialog-footer",className:(0,g.cn)("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",a),...e,children:[c,b&&(0,d.jsx)(f.bm,{asChild:!0,children:(0,d.jsx)(h.$,{variant:"outline",children:"Close"})})]})}function q({className:a,...b}){return(0,d.jsx)(f.hE,{"data-slot":"dialog-title",className:(0,g.cn)("text-lg leading-none font-semibold",a),...b})}function r({className:a,...b}){return(0,d.jsx)(f.VY,{"data-slot":"dialog-description",className:(0,g.cn)("text-sm text-muted-foreground",a),...b})}},43560:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>l});var d=c(5735),e=c(65573),f=c(91970),g=c(49671),h=c(45078),i=c(15775);function j({children:a,user:b,teamName:c}){return(0,d.jsxs)("div",{className:"flex h-screen overflow-hidden",children:[(0,d.jsx)(g.Sidebar,{user:b,teamName:c}),(0,d.jsxs)("div",{className:"flex flex-1 flex-col overflow-hidden",children:[(0,d.jsx)(h.TopBar,{}),(0,d.jsx)("main",{className:"flex-1 overflow-y-auto",children:a})]}),(0,d.jsx)(i.CommandPalette,{})]})}var k=c(35909);async function l({children:a}){let b=process.env.TEAM_NAME?.trim()||null,c=await (0,e.UL)(),g=c.get("session")?.value,h=g?await (0,k.g)(g):null;return h||(0,f.redirect)("/login"),h.mustChangePassword&&(0,f.redirect)("/change-password"),(0,d.jsx)(j,{user:h,teamName:b,children:a})}},45078:(a,b,c)=>{"use strict";c.d(b,{TopBar:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call TopBar() from the server but TopBar is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/dante/workspace/dante-code/projects/bluekiwi/src/components/layout/top-bar.tsx","TopBar")},49671:(a,b,c)=>{"use strict";c.d(b,{Sidebar:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call Sidebar() from the server but Sidebar is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/dante/workspace/dante-code/projects/bluekiwi/src/components/layout/sidebar.tsx","Sidebar")},55296:(a,b,c)=>{"use strict";c.d(b,{Bc:()=>g,ZI:()=>j,k$:()=>i,m_:()=>h});var d=c(48249);c(67484);var e=c(33159),f=c(14490);function g({delayDuration:a=0,...b}){return(0,d.jsx)(e.Kq,{"data-slot":"tooltip-provider",delayDuration:a,...b})}function h({...a}){return(0,d.jsx)(e.bL,{"data-slot":"tooltip",...a})}function i({...a}){return(0,d.jsx)(e.l9,{"data-slot":"tooltip-trigger",...a})}function j({className:a,sideOffset:b=0,children:c,...g}){return(0,d.jsx)(e.ZL,{children:(0,d.jsxs)(e.UC,{"data-slot":"tooltip-content",sideOffset:b,className:(0,f.cn)("z-50 w-fit origin-(--radix-tooltip-content-transform-origin) animate-in rounded-xl bg-foreground px-3 py-1.5 text-xs text-balance text-background fade-in-0 zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",a),...g,children:[c,(0,d.jsx)(e.i3,{className:"z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground"})]})})}},80601:(a,b,c)=>{Promise.resolve().then(c.bind(c,49671)),Promise.resolve().then(c.bind(c,45078)),Promise.resolve().then(c.bind(c,15775))},82244:(a,b,c)=>{"use strict";c.d(b,{SQ:()=>i,_2:()=>j,mB:()=>k,rI:()=>g,ty:()=>h});var d=c(48249);c(67484);var e=c(44443),f=c(14490);function g({...a}){return(0,d.jsx)(e.bL,{"data-slot":"dropdown-menu",...a})}function h({...a}){return(0,d.jsx)(e.l9,{"data-slot":"dropdown-menu-trigger",...a})}function i({className:a,sideOffset:b=4,...c}){return(0,d.jsx)(e.ZL,{children:(0,d.jsx)(e.UC,{"data-slot":"dropdown-menu-content",sideOffset:b,className:(0,f.cn)("z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-[1.125rem] border border-border bg-popover p-2 text-popover-foreground shadow-card data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",a),...c})})}function j({className:a,inset:b,variant:c="default",...g}){return(0,d.jsx)(e.q7,{"data-slot":"dropdown-menu-item","data-inset":b,"data-variant":c,className:(0,f.cn)("relative flex cursor-default items-center gap-2 rounded-xl px-3 py-2 text-sm outline-hidden select-none focus:bg-brand-blue-100 focus:text-brand-blue-700 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground data-[variant=destructive]:*:[svg]:text-destructive!",a),...g})}function k({className:a,...b}){return(0,d.jsx)(e.wv,{"data-slot":"dropdown-menu-separator",className:(0,f.cn)("-mx-1 my-1 h-px bg-border",a),...b})}},85980:(a,b,c)=>{"use strict";c.d(b,{TopBar:()=>n});var d=c(48249),e=c(2116),f=c.n(e),g=c(19099),h=c(67484),i=c(19794),j=c(54641),k=c(45577),l=c(45729),m=c(25297);function n(){let a=(0,g.usePathname)(),{t:b}=(0,l.B)(),[c,e]=(0,h.useState)(null),n=(0,h.useMemo)(()=>({workflows:b("nav.workflows"),tasks:b("nav.tasks"),credentials:b("nav.credentials"),instructions:b("nav.instructions"),tutorial:b("nav.tutorial"),docs:b("nav.apiDocs"),settings:b("nav.settings"),new:b("nav.new")}),[b]),o=(0,h.useMemo)(()=>{let b=a.split("/").filter(Boolean);return b.map((a,c)=>{let d=`/${b.slice(0,c+1).join("/")}`;return{label:n[a]||a,href:c===b.length-1?void 0:d}})},[a,n]),p=c?.breadcrumbs??o;return a.split("/").filter(Boolean).length<=1?null:(0,d.jsxs)("header",{className:"flex h-12 items-center justify-between border-b border-[var(--border)] bg-[var(--background)] px-4",children:[(0,d.jsxs)("nav",{className:"flex min-w-0 flex-1 items-center gap-1 overflow-hidden text-sm",children:[p.map((a,b)=>(0,d.jsxs)("span",{className:"flex min-w-0 shrink items-center gap-1",children:[b>0&&(0,d.jsx)(i.A,{className:"h-3.5 w-3.5 shrink-0 text-[var(--muted-foreground)]/40"}),a.href?(0,d.jsx)(f(),{href:a.href,className:"max-w-[12rem] truncate text-[var(--muted-foreground)] transition-colors hover:text-[var(--foreground)]",title:a.label,children:a.label}):(0,d.jsx)("span",{className:"max-w-[24rem] truncate font-medium text-[var(--foreground)]",title:a.label,children:a.label})]},b)),0===p.length&&(0,d.jsx)("span",{className:"font-medium text-[var(--foreground)]",children:b("dashboard.title")})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[c?.actionHref&&c.actionLabel&&(0,d.jsx)(m.$,{asChild:!0,variant:"outline",size:"sm",className:"h-8 gap-1.5",children:(0,d.jsxs)(f(),{href:c.actionHref,children:[(0,d.jsx)(j.A,{className:"h-3.5 w-3.5"}),c.actionLabel]})}),a.startsWith("/workflows/")&&!c?.actionHref&&/^\/workflows\/\d+$/.test(a)&&(0,d.jsx)(m.$,{asChild:!0,variant:"outline",size:"sm",className:"h-8 gap-1.5",children:(0,d.jsxs)(f(),{href:"/workflows",children:[(0,d.jsx)(k.A,{className:"h-3.5 w-3.5"}),b("workflows.backToList")]})}),(0,d.jsx)("kbd",{className:"hidden h-6 items-center gap-1 rounded border border-[var(--border)] bg-[var(--muted)] px-2 text-[10px] text-[var(--muted-foreground)] sm:inline-flex",children:"⌘K"})]})]})}}};
1
+ exports.id=4024,exports.ids=[4024],exports.modules={2864:(a,b,c)=>{"use strict";c.d(b,{E:()=>i});var d=c(48249);c(67484);var e=c(21654),f=c(43980),g=c(14490);let h=(0,e.F)("inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-3 py-1 text-xs font-semibold tracking-[0.01em] whitespace-nowrap transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3",{variants:{variant:{default:"border-brand-blue-600/20 bg-brand-blue-100 text-brand-blue-700",accent:"border-brand-kiwi-600/30 bg-brand-kiwi-100 text-brand-kiwi-700",neutral:"border-border bg-brand-surface-soft text-brand-ink-700",success:"border-success/20 bg-success/10 text-success",warning:"border-warning/20 bg-warning/10 text-warning",danger:"border-danger/20 bg-danger/10 text-danger",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40 [a&]:hover:bg-destructive/90",outline:"border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",ghost:"border-transparent [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",link:"border-transparent text-primary underline-offset-4 [a&]:hover:underline"}},defaultVariants:{variant:"default"}});function i({className:a,variant:b,asChild:c=!1,...e}){let j=c?f.bL:"span";return(0,d.jsx)(j,{"data-slot":"badge","data-variant":b,className:(0,g.cn)(h({variant:b}),a),...e})}},9402:(a,b,c)=>{"use strict";c.d(b,{Sidebar:()=>K});var d=c(48249),e=c(67484),f=c(81220),g=c(2116),h=c.n(g),i=c(19099),j=c(45577),k=c(54641),l=c(48684),m=c(80600),n=c(35654),o=c(20150),p=c(31763),q=c(17387),r=c(37436),s=c(95581),t=c(41023),u=c(1619),v=c(67132),w=c(56128),x=c(10636),y=c(33922),z=c(96029),A=c(14490),B=c(2864),C=c(38393),D=c(55296),E=c(859);function F({className:a,orientation:b="horizontal",decorative:c=!0,...e}){return(0,d.jsx)(E.b,{"data-slot":"separator",decorative:c,orientation:b,className:(0,A.cn)("shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",a),...e})}var G=c(82244);function H({href:a,icon:b,label:c,collapsed:e,badge:f,external:g}){let j=(0,i.usePathname)(),k=!g&&(j===a||j.startsWith(a+"/")),l=(0,A.cn)("flex items-center gap-3 rounded-lg px-3 py-2 text-sm transition-colors",k?"bg-[var(--sidebar-accent)] text-[var(--sidebar-accent-foreground)] font-medium":"text-[var(--sidebar-foreground)]/70 hover:bg-[var(--sidebar-accent)]/50 hover:text-[var(--sidebar-foreground)]"),m=(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(b,{className:"h-4 w-4 shrink-0"}),!e&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("span",{className:"flex-1 truncate",children:c}),void 0!==f&&f>0&&(0,d.jsx)(B.E,{variant:"secondary",className:"ml-auto h-5 px-1.5 text-[10px]",children:f})]})]}),n=g?(0,d.jsx)("a",{href:a,target:"_blank",rel:"noopener noreferrer",className:l,children:m}):(0,d.jsx)(h(),{href:a,className:l,children:m});return e?(0,d.jsxs)(D.m_,{delayDuration:0,children:[(0,d.jsx)(D.k$,{asChild:!0,children:n}),(0,d.jsxs)(D.ZI,{side:"right",className:"flex items-center gap-2",children:[c,void 0!==f&&f>0&&(0,d.jsx)(B.E,{variant:"secondary",className:"h-5 px-1.5 text-[10px]",children:f})]})]}):n}var I=c(45729);let J="https://github.com/dandacompany/bluekiwi";function K({user:a,teamName:b}){let c=(0,i.useRouter)(),{t:g,locale:E,setLocale:L}=(0,I.B)(),[M,N]=(0,e.useState)(!1),[O,P]=(0,e.useState)({current:"",hasUpdate:!1,latest:null,releaseUrl:null}),[Q,R]=(0,e.useState)(!1),S=(0,e.useMemo)(()=>[{href:"/workflows",icon:j.A,label:g("nav.workflows")},{href:"/tasks",icon:k.A,label:g("nav.tasks")},{href:"/credentials",icon:l.A,label:g("nav.credentials")},{href:"/instructions",icon:m.A,label:g("nav.instructions")}],[g]),T=(0,e.useMemo)(()=>[{href:"/tutorial",icon:n.A,label:g("nav.tutorial")},{href:"/docs",icon:o.A,label:g("nav.apiDocs")},{href:"https://bluekiwi.work",icon:p.A,label:g("nav.marketplace"),external:!0}],[g]),U=async()=>{await fetch("/api/auth/logout",{method:"POST"}),c.push("/login"),c.refresh()};return(0,d.jsxs)(D.Bc,{children:[(0,d.jsxs)("aside",{className:(0,A.cn)("relative flex h-screen flex-col overflow-visible border-r border-[var(--sidebar-border)] bg-[var(--sidebar-background)] transition-[width] duration-200 ease-in-out",M?"w-14":"w-[220px]"),children:[(0,d.jsx)("button",{onClick:()=>{N(a=>(localStorage.setItem("sidebar-collapsed",JSON.stringify(!a)),!a))},"aria-label":M?"Expand sidebar":"Collapse sidebar",className:"absolute top-12 right-0 z-40 flex h-7 w-7 translate-x-1/2 items-center justify-center rounded-full border border-[var(--sidebar-border)] bg-[var(--sidebar-background)] text-[var(--muted-foreground)] shadow-md transition-colors hover:bg-[var(--sidebar-accent)] hover:text-[var(--sidebar-foreground)]",children:M?(0,d.jsx)(q.A,{className:"h-3.5 w-3.5"}):(0,d.jsx)(r.A,{className:"h-3.5 w-3.5"})}),(0,d.jsx)("div",{className:"flex h-14 items-center gap-2 border-b border-[var(--sidebar-border)] px-3",children:(0,d.jsxs)(h(),{href:"/",className:"flex items-center gap-2",children:[(0,d.jsx)(f.default,{src:"/logo-48.png",alt:"BlueKiwi",className:"h-8 w-8 shrink-0 rounded-lg",width:32,height:32}),!M&&(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsx)("span",{className:"block truncate font-semibold tracking-tight text-[var(--sidebar-foreground)]",children:"BlueKiwi"}),b?(0,d.jsx)("span",{className:"block truncate text-[10px] font-medium text-[var(--muted-foreground)]/85",children:b}):null]})]})}),(0,d.jsxs)("div",{className:"flex-1 overflow-y-auto px-2 py-2",children:[!M&&(0,d.jsx)("p",{className:"px-3 pb-1 pt-2 text-[10px] font-semibold uppercase tracking-wider text-[var(--muted-foreground)]",children:g("nav.main")}),(0,d.jsx)("nav",{className:"flex flex-col gap-0.5",children:S.map(a=>(0,d.jsx)(H,{...a,collapsed:M},a.href))}),!M&&(0,d.jsx)("p",{className:"px-3 pb-1 pt-4 text-[10px] font-semibold uppercase tracking-wider text-[var(--muted-foreground)]",children:g("nav.resources")}),M&&(0,d.jsx)(F,{className:"my-2"}),(0,d.jsx)("nav",{className:"flex flex-col gap-0.5",children:T.map(a=>(0,d.jsx)(H,{...a,collapsed:M,external:a.external},a.href))})]}),(0,d.jsx)("div",{className:"border-t border-[var(--sidebar-border)] px-2 py-2",children:a&&(0,d.jsxs)(G.rI,{children:[(0,d.jsx)(G.ty,{asChild:!0,children:(0,d.jsxs)("button",{className:(0,A.cn)("relative flex w-full items-center gap-2 rounded-lg px-3 py-2 transition-colors hover:bg-[var(--sidebar-accent)]/50",M&&"justify-center"),children:[(0,d.jsx)("div",{className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-full bg-[var(--sidebar-accent)] text-xs font-medium",children:a.username.charAt(0).toUpperCase()}),!M&&(0,d.jsxs)("div",{className:"min-w-0 flex-1 text-left",children:[(0,d.jsx)("p",{className:"truncate text-xs font-medium text-[var(--sidebar-foreground)]",children:a.username}),(0,d.jsx)("p",{className:"truncate text-[10px] text-[var(--muted-foreground)]",children:a.role})]}),O.hasUpdate?(0,d.jsx)("span",{className:"absolute top-1.5 right-1.5 flex h-2.5 w-2.5 rounded-full bg-emerald-500 ring-2 ring-[var(--sidebar-background)]"}):null]})}),(0,d.jsxs)(G.SQ,{side:M?"right":"top",align:"start",className:"w-52",children:[(0,d.jsxs)(G._2,{onClick:()=>c.push("/settings"),children:[(0,d.jsx)(s.A,{className:"mr-2 h-3.5 w-3.5"}),g("nav.settings")]}),(0,d.jsxs)(G._2,{onClick:()=>L("ko"===E?"en":"ko"),children:[(0,d.jsx)(t.A,{className:"mr-2 h-3.5 w-3.5"}),"ko"===E?"English":"한국어"]}),(0,d.jsx)(G.mB,{}),(0,d.jsx)(G._2,{asChild:!0,children:(0,d.jsxs)("a",{href:J,target:"_blank",rel:"noopener noreferrer",className:"flex items-center",children:[(0,d.jsx)(u.A,{className:"mr-2 h-3.5 w-3.5"}),g("nav.github")]})}),(0,d.jsx)(G._2,{asChild:!0,children:(0,d.jsxs)("a",{href:"https://github.com/dandacompany/bluekiwi/blob/main/LICENSE.md",target:"_blank",rel:"noopener noreferrer",className:"flex items-center",children:[(0,d.jsx)(v.A,{className:"mr-2 h-3.5 w-3.5"}),g("nav.license")]})}),(0,d.jsx)(G._2,{asChild:!0,children:(0,d.jsxs)("a",{href:"https://buymeacoffee.com/dante.labs",target:"_blank",rel:"noopener noreferrer",className:"flex items-center",children:[(0,d.jsx)(w.A,{className:"mr-2 h-3.5 w-3.5"}),g("nav.support")]})}),(0,d.jsx)(G._2,{onClick:()=>R(!0),children:O.hasUpdate?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(x.A,{className:"mr-2 h-3.5 w-3.5 text-emerald-500"}),(0,d.jsxs)("span",{className:"flex flex-1 items-center gap-1 text-[11px] font-medium",children:[(0,d.jsxs)("span",{className:"text-muted-foreground line-through",children:["v",O.current]}),(0,d.jsx)("span",{className:"text-emerald-500",children:"→"}),(0,d.jsxs)("span",{className:"rounded-sm bg-emerald-500/15 px-1 py-0.5 font-semibold text-emerald-600 dark:text-emerald-400",children:["v",O.latest]})]}),(0,d.jsx)(B.E,{variant:"success",className:"ml-2 px-2 py-0.5",children:g("nav.updateAvailable")})]}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(y.A,{className:"mr-2 h-3.5 w-3.5 opacity-50"}),(0,d.jsxs)("span",{className:"flex-1 opacity-70",children:[g("nav.version")," v",O.current]})]})}),(0,d.jsx)(G.mB,{}),(0,d.jsxs)(G._2,{onClick:U,children:[(0,d.jsx)(z.A,{className:"mr-2 h-3.5 w-3.5"}),g("auth.logout")]})]})]})})]}),(0,d.jsx)(C.lG,{open:Q,onOpenChange:R,children:(0,d.jsxs)(C.Cf,{children:[(0,d.jsxs)(C.c7,{children:[(0,d.jsx)(C.L3,{children:g("nav.versionDialogTitle")}),(0,d.jsx)(C.rr,{children:O.hasUpdate?g("nav.versionDialogDescUpdate",{current:O.current,latest:O.latest??""}):g("nav.versionDialogDescCurrent",{current:O.current})})]}),(0,d.jsxs)("div",{className:"space-y-4 text-sm",children:[O.hasUpdate?(0,d.jsxs)("div",{className:"rounded-2xl border border-emerald-500/20 bg-emerald-500/10 px-4 py-3",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)(x.A,{className:"h-4 w-4 text-emerald-500"}),(0,d.jsx)("span",{className:"font-medium text-emerald-700 dark:text-emerald-400",children:g("nav.updateAvailable")})]}),(0,d.jsxs)("p",{className:"mt-1 text-xs text-muted-foreground",children:["v",O.current," → v",O.latest]})]}):(0,d.jsx)("div",{className:"rounded-2xl border border-border bg-muted/30 px-4 py-3",children:(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)(y.A,{className:"h-4 w-4 text-muted-foreground"}),(0,d.jsxs)("span",{className:"font-medium",children:[g("nav.version")," v",O.current]})]})}),(0,d.jsxs)("div",{className:"space-y-3",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"font-medium",children:g("nav.updateMethodCliTitle")}),(0,d.jsx)("pre",{className:"mt-1 overflow-x-auto rounded-xl border border-border bg-muted/30 px-3 py-2 font-mono text-xs",children:"bluekiwi upgrade"})]}),(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"font-medium",children:g("nav.updateMethodNpmTitle")}),(0,d.jsx)("pre",{className:"mt-1 overflow-x-auto rounded-xl border border-border bg-muted/30 px-3 py-2 font-mono text-xs",children:"npm install -g bluekiwi@latest"})]}),(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"font-medium",children:g("nav.updateMethodDockerTitle")}),(0,d.jsx)("pre",{className:"mt-1 overflow-x-auto rounded-xl border border-border bg-muted/30 px-3 py-2 font-mono text-xs",children:"docker compose pull && docker compose up -d"})]})]})]}),(0,d.jsxs)(C.Es,{children:[(0,d.jsx)("button",{type:"button",className:"inline-flex h-10 items-center justify-center rounded-2xl border border-border px-4 text-sm font-medium transition-colors hover:bg-accent",onClick:()=>R(!1),children:g("common.close")}),(0,d.jsx)("a",{href:O.releaseUrl??`${J}/releases/tag/v${O.current}`,target:"_blank",rel:"noopener noreferrer",className:"inline-flex h-10 items-center justify-center rounded-2xl bg-primary px-4 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/90",children:g("nav.viewReleaseNotes")})]})]})})]})}},14490:(a,b,c)=>{"use strict";c.d(b,{cn:()=>f});var d=c(99314),e=c(96862);function f(...a){return(0,e.QP)((0,d.$)(a))}},15775:(a,b,c)=>{"use strict";c.d(b,{CommandPalette:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call CommandPalette() from the server but CommandPalette is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/dante/workspace/dante-code/projects/bluekiwi/src/components/shared/command-palette.tsx","CommandPalette")},17049:(a,b,c)=>{Promise.resolve().then(c.bind(c,9402)),Promise.resolve().then(c.bind(c,85980)),Promise.resolve().then(c.bind(c,32073))},25250:(a,b,c)=>{"use strict";c.d(b,{G7:()=>k,Gj:()=>j,L$:()=>n,h_:()=>o,oI:()=>l,xL:()=>m});var d=c(48249);c(67484);var e=c(8900),f=c(10316),g=c(14490),h=c(38393);function i({className:a,...b}){return(0,d.jsx)(e.uB,{"data-slot":"command",className:(0,g.cn)("flex h-full w-full flex-col overflow-hidden rounded-[1.5rem] bg-popover text-popover-foreground",a),...b})}function j({title:a="Command Palette",description:b="Search for a command to run...",children:c,className:e,showCloseButton:f=!0,...k}){return(0,d.jsx)(h.lG,{...k,children:(0,d.jsxs)(h.Cf,{className:(0,g.cn)("overflow-hidden p-0",e),showCloseButton:f,children:[(0,d.jsxs)(h.c7,{className:"sr-only",children:[(0,d.jsx)(h.L3,{children:a}),(0,d.jsx)(h.rr,{children:b})]}),(0,d.jsx)(i,{className:"**:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:c})]})})}function k({className:a,...b}){return(0,d.jsxs)("div",{"data-slot":"command-input-wrapper",className:"flex h-9 items-center gap-2 border-b px-3",children:[(0,d.jsx)(f.A,{className:"size-4 shrink-0 opacity-50"}),(0,d.jsx)(e.uB.Input,{"data-slot":"command-input",className:(0,g.cn)("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",a),...b})]})}function l({className:a,...b}){return(0,d.jsx)(e.uB.List,{"data-slot":"command-list",className:(0,g.cn)("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",a),...b})}function m({...a}){return(0,d.jsx)(e.uB.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...a})}function n({className:a,...b}){return(0,d.jsx)(e.uB.Group,{"data-slot":"command-group",className:(0,g.cn)("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",a),...b})}function o({className:a,...b}){return(0,d.jsx)(e.uB.Item,{"data-slot":"command-item",className:(0,g.cn)("relative flex cursor-default items-center gap-2 rounded-xl px-3 py-2 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-[selected=true]:bg-brand-blue-100 data-[selected=true]:text-brand-blue-700 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground",a),...b})}},25297:(a,b,c)=>{"use strict";c.d(b,{$:()=>i});var d=c(48249);c(67484);var e=c(21654),f=c(43980),g=c(14490);let h=(0,e.F)("inline-flex shrink-0 items-center justify-center gap-2 whitespace-nowrap transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 font-semibold [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-[0_10px_18px_rgba(53,87,190,0.18)] hover:bg-brand-blue-700",destructive:"bg-destructive text-destructive-foreground hover:bg-danger/90",outline:"border border-border bg-background text-foreground hover:bg-brand-blue-100 hover:text-brand-blue-700",secondary:"bg-secondary text-secondary-foreground hover:bg-surface-strong",ghost:"text-brand-blue-700 hover:bg-brand-blue-100 hover:text-brand-blue-700",accent:"bg-accent text-accent-foreground hover:bg-kiwi-700 hover:text-white",link:"text-brand-blue-700 underline-offset-4 hover:underline"},size:{default:"h-10 rounded-full px-5 text-[0.95rem]",xs:"h-6 gap-1 rounded-full px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-8 rounded-full px-3.5 text-sm",lg:"h-11 rounded-full px-6 text-[0.98rem]",icon:"size-10 rounded-full","icon-xs":"size-6 rounded-full [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-8 rounded-full","icon-lg":"size-10 rounded-full"}},defaultVariants:{variant:"default",size:"default"}});function i({className:a,variant:b="default",size:c="default",asChild:e=!1,...j}){let k=e?f.bL:"button";return(0,d.jsx)(k,{"data-slot":"button","data-variant":b,"data-size":c,className:(0,g.cn)(h({variant:b,size:c,className:a})),...j})}},32073:(a,b,c)=>{"use strict";c.d(b,{CommandPalette:()=>n});var d=c(48249),e=c(67484),f=c(19099),g=c(45577),h=c(54641),i=c(95581),j=c(24520),k=c(96029),l=c(25250),m=c(45729);function n(){let[a,b]=(0,e.useState)(!1),c=(0,f.useRouter)(),{t:n}=(0,m.B)();function o(a){b(!1),c.push(a)}async function p(){b(!1),await fetch("/api/auth/logout",{method:"POST"}),c.push("/login")}return(0,d.jsxs)(l.Gj,{open:a,onOpenChange:b,children:[(0,d.jsx)(l.G7,{placeholder:n("commandPalette.search")}),(0,d.jsxs)(l.oI,{children:[(0,d.jsx)(l.xL,{children:n("commandPalette.noResults")}),(0,d.jsxs)(l.L$,{heading:n("commandPalette.navigate"),children:[(0,d.jsxs)(l.h_,{onSelect:()=>o("/workflows"),children:[(0,d.jsx)(g.A,{}),(0,d.jsx)("span",{children:n("nav.workflows")})]}),(0,d.jsxs)(l.h_,{onSelect:()=>o("/tasks"),children:[(0,d.jsx)(h.A,{}),(0,d.jsx)("span",{children:n("nav.tasks")})]}),(0,d.jsxs)(l.h_,{onSelect:()=>o("/settings"),children:[(0,d.jsx)(i.A,{}),(0,d.jsx)("span",{children:n("nav.settings")})]})]}),(0,d.jsxs)(l.L$,{heading:n("commandPalette.actions"),children:[(0,d.jsxs)(l.h_,{onSelect:()=>o("/workflows/new"),children:[(0,d.jsx)(j.A,{}),(0,d.jsx)("span",{children:n("commandPalette.newWorkflow")})]}),(0,d.jsxs)(l.h_,{onSelect:()=>p(),children:[(0,d.jsx)(k.A,{}),(0,d.jsx)("span",{children:n("auth.logout")})]})]})]})]})}},35909:(a,b,c)=>{"use strict";c.d(b,{g:()=>h,j:()=>g});var d=c(86935),e=c(69614);let f=new TextEncoder().encode(process.env.JWT_SECRET||"bluekiwi-dev-secret-change-in-production");async function g(a){return new d.P({...a}).setProtectedHeader({alg:"HS256"}).setIssuedAt().setExpirationTime("7d").sign(f)}async function h(a){try{let{payload:b}=await (0,e.V)(a,f);return{userId:b.userId,username:b.username,email:b.email,role:b.role,mustChangePassword:b.mustChangePassword??!1}}catch{return null}}},38393:(a,b,c)=>{"use strict";c.d(b,{Cf:()=>n,Es:()=>p,HM:()=>l,L3:()=>q,c7:()=>o,lG:()=>i,rr:()=>r,zM:()=>j});var d=c(48249);c(67484);var e=c(46674),f=c(83726),g=c(14490),h=c(25297);function i({...a}){return(0,d.jsx)(f.bL,{"data-slot":"dialog",...a})}function j({...a}){return(0,d.jsx)(f.l9,{"data-slot":"dialog-trigger",...a})}function k({...a}){return(0,d.jsx)(f.ZL,{"data-slot":"dialog-portal",...a})}function l({...a}){return(0,d.jsx)(f.bm,{"data-slot":"dialog-close",...a})}function m({className:a,...b}){return(0,d.jsx)(f.hJ,{"data-slot":"dialog-overlay",className:(0,g.cn)("fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0",a),...b})}function n({className:a,children:b,showCloseButton:c=!0,...h}){return(0,d.jsxs)(k,{"data-slot":"dialog-portal",children:[(0,d.jsx)(m,{}),(0,d.jsxs)(f.UC,{"data-slot":"dialog-content",className:(0,g.cn)("fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 overflow-hidden rounded-[1.5rem] border border-border bg-card p-6 shadow-[var(--shadow-soft)] duration-200 outline-none data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 sm:max-w-[28rem]",a),...h,children:[b,c&&(0,d.jsxs)(f.bm,{"data-slot":"dialog-close",className:"absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[(0,d.jsx)(e.A,{}),(0,d.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})}function o({className:a,...b}){return(0,d.jsx)("div",{"data-slot":"dialog-header",className:(0,g.cn)("flex flex-col gap-2 text-center sm:text-left",a),...b})}function p({className:a,showCloseButton:b=!1,children:c,...e}){return(0,d.jsxs)("div",{"data-slot":"dialog-footer",className:(0,g.cn)("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",a),...e,children:[c,b&&(0,d.jsx)(f.bm,{asChild:!0,children:(0,d.jsx)(h.$,{variant:"outline",children:"Close"})})]})}function q({className:a,...b}){return(0,d.jsx)(f.hE,{"data-slot":"dialog-title",className:(0,g.cn)("text-lg leading-none font-semibold",a),...b})}function r({className:a,...b}){return(0,d.jsx)(f.VY,{"data-slot":"dialog-description",className:(0,g.cn)("text-sm text-muted-foreground",a),...b})}},43560:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>l});var d=c(5735),e=c(65573),f=c(91970),g=c(49671),h=c(45078),i=c(15775);function j({children:a,user:b,teamName:c}){return(0,d.jsxs)("div",{className:"flex h-screen overflow-hidden",children:[(0,d.jsx)(g.Sidebar,{user:b,teamName:c}),(0,d.jsxs)("div",{className:"flex flex-1 flex-col overflow-hidden",children:[(0,d.jsx)(h.TopBar,{}),(0,d.jsx)("main",{className:"flex-1 overflow-y-auto",children:a})]}),(0,d.jsx)(i.CommandPalette,{})]})}var k=c(35909);async function l({children:a}){let b=process.env.TEAM_NAME?.trim()||null,c=await (0,e.UL)(),g=c.get("session")?.value,h=g?await (0,k.g)(g):null;return h||(0,f.redirect)("/login"),h.mustChangePassword&&(0,f.redirect)("/change-password"),(0,d.jsx)(j,{user:h,teamName:b,children:a})}},45078:(a,b,c)=>{"use strict";c.d(b,{TopBar:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call TopBar() from the server but TopBar is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/dante/workspace/dante-code/projects/bluekiwi/src/components/layout/top-bar.tsx","TopBar")},49671:(a,b,c)=>{"use strict";c.d(b,{Sidebar:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call Sidebar() from the server but Sidebar is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/dante/workspace/dante-code/projects/bluekiwi/src/components/layout/sidebar.tsx","Sidebar")},55296:(a,b,c)=>{"use strict";c.d(b,{Bc:()=>g,ZI:()=>j,k$:()=>i,m_:()=>h});var d=c(48249);c(67484);var e=c(33159),f=c(14490);function g({delayDuration:a=0,...b}){return(0,d.jsx)(e.Kq,{"data-slot":"tooltip-provider",delayDuration:a,...b})}function h({...a}){return(0,d.jsx)(e.bL,{"data-slot":"tooltip",...a})}function i({...a}){return(0,d.jsx)(e.l9,{"data-slot":"tooltip-trigger",...a})}function j({className:a,sideOffset:b=0,children:c,...g}){return(0,d.jsx)(e.ZL,{children:(0,d.jsxs)(e.UC,{"data-slot":"tooltip-content",sideOffset:b,className:(0,f.cn)("z-50 w-fit origin-(--radix-tooltip-content-transform-origin) animate-in rounded-xl bg-foreground px-3 py-1.5 text-xs text-balance text-background fade-in-0 zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",a),...g,children:[c,(0,d.jsx)(e.i3,{className:"z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground"})]})})}},80601:(a,b,c)=>{Promise.resolve().then(c.bind(c,49671)),Promise.resolve().then(c.bind(c,45078)),Promise.resolve().then(c.bind(c,15775))},82244:(a,b,c)=>{"use strict";c.d(b,{SQ:()=>i,_2:()=>j,mB:()=>k,rI:()=>g,ty:()=>h});var d=c(48249);c(67484);var e=c(44443),f=c(14490);function g({...a}){return(0,d.jsx)(e.bL,{"data-slot":"dropdown-menu",...a})}function h({...a}){return(0,d.jsx)(e.l9,{"data-slot":"dropdown-menu-trigger",...a})}function i({className:a,sideOffset:b=4,...c}){return(0,d.jsx)(e.ZL,{children:(0,d.jsx)(e.UC,{"data-slot":"dropdown-menu-content",sideOffset:b,className:(0,f.cn)("z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-[1.125rem] border border-border bg-popover p-2 text-popover-foreground shadow-card data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",a),...c})})}function j({className:a,inset:b,variant:c="default",...g}){return(0,d.jsx)(e.q7,{"data-slot":"dropdown-menu-item","data-inset":b,"data-variant":c,className:(0,f.cn)("relative flex cursor-default items-center gap-2 rounded-xl px-3 py-2 text-sm outline-hidden select-none focus:bg-brand-blue-100 focus:text-brand-blue-700 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground data-[variant=destructive]:*:[svg]:text-destructive!",a),...g})}function k({className:a,...b}){return(0,d.jsx)(e.wv,{"data-slot":"dropdown-menu-separator",className:(0,f.cn)("-mx-1 my-1 h-px bg-border",a),...b})}},85980:(a,b,c)=>{"use strict";c.d(b,{TopBar:()=>n});var d=c(48249),e=c(2116),f=c.n(e),g=c(19099),h=c(67484),i=c(19794),j=c(54641),k=c(45577),l=c(45729),m=c(25297);function n(){let a=(0,g.usePathname)(),{t:b}=(0,l.B)(),[c,e]=(0,h.useState)(null),n=(0,h.useMemo)(()=>({workflows:b("nav.workflows"),tasks:b("nav.tasks"),credentials:b("nav.credentials"),instructions:b("nav.instructions"),tutorial:b("nav.tutorial"),docs:b("nav.apiDocs"),settings:b("nav.settings"),new:b("nav.new")}),[b]),o=(0,h.useMemo)(()=>{let b=a.split("/").filter(Boolean);return b.map((a,c)=>{let d=`/${b.slice(0,c+1).join("/")}`;return{label:n[a]||a,href:c===b.length-1?void 0:d}})},[a,n]),p=c?.breadcrumbs??o;return a.split("/").filter(Boolean).length<=1?null:(0,d.jsxs)("header",{className:"flex h-12 items-center justify-between border-b border-[var(--border)] bg-[var(--background)] px-4",children:[(0,d.jsxs)("nav",{className:"flex min-w-0 flex-1 items-center gap-1 overflow-hidden text-sm",children:[p.map((a,b)=>(0,d.jsxs)("span",{className:"flex min-w-0 shrink items-center gap-1",children:[b>0&&(0,d.jsx)(i.A,{className:"h-3.5 w-3.5 shrink-0 text-[var(--muted-foreground)]/40"}),a.href?(0,d.jsx)(f(),{href:a.href,className:"max-w-[12rem] truncate text-[var(--muted-foreground)] transition-colors hover:text-[var(--foreground)]",title:a.label,children:a.label}):(0,d.jsx)("span",{className:"max-w-[24rem] truncate font-medium text-[var(--foreground)]",title:a.label,children:a.label})]},b)),0===p.length&&(0,d.jsx)("span",{className:"font-medium text-[var(--foreground)]",children:b("dashboard.title")})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[c?.actionHref&&c.actionLabel&&(0,d.jsx)(m.$,{asChild:!0,variant:"outline",size:"sm",className:"h-8 gap-1.5",children:(0,d.jsxs)(f(),{href:c.actionHref,children:[(0,d.jsx)(j.A,{className:"h-3.5 w-3.5"}),c.actionLabel]})}),a.startsWith("/workflows/")&&!c?.actionHref&&/^\/workflows\/\d+$/.test(a)&&(0,d.jsx)(m.$,{asChild:!0,variant:"outline",size:"sm",className:"h-8 gap-1.5",children:(0,d.jsxs)(f(),{href:"/workflows",children:[(0,d.jsx)(k.A,{className:"h-3.5 w-3.5"}),b("workflows.backToList")]})}),(0,d.jsx)("kbd",{className:"hidden h-6 items-center gap-1 rounded border border-[var(--border)] bg-[var(--muted)] px-2 text-[10px] text-[var(--muted-foreground)] sm:inline-flex",children:"⌘K"})]})]})}}};
@@ -1 +1 @@
1
- globalThis.__BUILD_MANIFEST={polyfillFiles:["static/chunks/polyfills-42372ed130431b0a.js"],devFiles:[],lowPriorityFiles:["static/hqMZcC_as2uhicKR6YANm/_buildManifest.js","static/hqMZcC_as2uhicKR6YANm/_ssgManifest.js"],rootMainFiles:["static/chunks/webpack-49017e80a77a9442.js","static/chunks/4bd1b696-e356ca5ba0218e27.js","static/chunks/3794-154456079185e990.js","static/chunks/main-app-e972602355b3c35f.js"],rootMainFilesTree:{},pages:{"/_app":[]}};
1
+ globalThis.__BUILD_MANIFEST={polyfillFiles:["static/chunks/polyfills-42372ed130431b0a.js"],devFiles:[],lowPriorityFiles:["static/UVzMOjly0ACJRK3vNndFP/_buildManifest.js","static/UVzMOjly0ACJRK3vNndFP/_ssgManifest.js"],rootMainFiles:["static/chunks/webpack-49017e80a77a9442.js","static/chunks/4bd1b696-e356ca5ba0218e27.js","static/chunks/3794-154456079185e990.js","static/chunks/main-app-e972602355b3c35f.js"],rootMainFilesTree:{},pages:{"/_app":[]}};
@@ -1 +1 @@
1
- <!DOCTYPE html><html lang="ko" class="antialiased"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/css/2bc6b6e35d293c50.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-49017e80a77a9442.js"/><script src="/_next/static/chunks/4bd1b696-e356ca5ba0218e27.js" async=""></script><script src="/_next/static/chunks/3794-154456079185e990.js" async=""></script><script src="/_next/static/chunks/main-app-e972602355b3c35f.js" async=""></script><script src="/_next/static/chunks/7262-cdb2767600e6e41e.js" async=""></script><script src="/_next/static/chunks/2360-3fea55936dac2ff8.js" async=""></script><script src="/_next/static/chunks/app/layout-e3f307ffaa2d11cc.js" async=""></script><meta name="robots" content="noindex"/><title>404: This page could not be found.</title><title>BlueKiwi</title><meta name="description" content="Design reusable workflows, run them from any AI coding agent, and watch every step in real time."/><meta property="og:title" content="BlueKiwi — AI Agent Workflow Engine"/><meta property="og:description" content="Design reusable workflows, run them from any AI coding agent, and watch every step in real time."/><meta property="og:site_name" content="BlueKiwi"/><meta property="og:locale" content="ko_KR"/><meta property="og:image" content="http://localhost:3100/og-cover.png"/><meta property="og:image:width" content="1200"/><meta property="og:image:height" content="630"/><meta property="og:image:alt" content="BlueKiwi — AI Agent Workflow Engine"/><meta property="og:type" content="website"/><meta name="twitter:card" content="summary_large_image"/><meta name="twitter:title" content="BlueKiwi — AI Agent Workflow Engine"/><meta name="twitter:description" content="Design reusable workflows, run them from any AI coding agent, and watch every step in real time."/><meta name="twitter:image" content="http://localhost:3100/og-cover.png"/><link rel="icon" href="/favicon.ico" sizes="32x32"/><link rel="icon" href="/favicon.png" type="image/png" sizes="32x32"/><link rel="icon" href="/icon-192.png" type="image/png" sizes="192x192"/><link rel="icon" href="/icon-512.png" type="image/png" sizes="512x512"/><link rel="apple-touch-icon" href="/apple-touch-icon.png"/><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body class="min-h-screen"><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><!--$--><!--/$--><section aria-label="Notifications alt+T" tabindex="-1" aria-live="polite" aria-relevant="additions text" aria-atomic="false"></section><script src="/_next/static/chunks/webpack-49017e80a77a9442.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[42360,[\"7262\",\"static/chunks/7262-cdb2767600e6e41e.js\",\"2360\",\"static/chunks/2360-3fea55936dac2ff8.js\",\"7177\",\"static/chunks/app/layout-e3f307ffaa2d11cc.js\"],\"I18nProvider\"]\n3:I[57121,[],\"\"]\n4:I[74581,[],\"\"]\n5:I[30852,[\"7262\",\"static/chunks/7262-cdb2767600e6e41e.js\",\"2360\",\"static/chunks/2360-3fea55936dac2ff8.js\",\"7177\",\"static/chunks/app/layout-e3f307ffaa2d11cc.js\"],\"Toaster\"]\n6:I[90484,[],\"OutletBoundary\"]\n7:\"$Sreact.suspense\"\na:I[90484,[],\"ViewportBoundary\"]\nc:I[90484,[],\"MetadataBoundary\"]\ne:I[27123,[],\"default\",1]\n:HL[\"/_next/static/css/2bc6b6e35d293c50.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"c\":[\"\",\"_not-found\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",16],[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/2bc6b6e35d293c50.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"ko\",\"className\":\"antialiased\",\"children\":[\"$\",\"body\",null,{\"className\":\"min-h-screen\",\"children\":[\"$\",\"$L2\",null,{\"children\":[[\"$\",\"$L3\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L4\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}],[\"$\",\"$L5\",null,{\"position\":\"top-right\"}]]}]}]}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L3\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L4\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$L6\",null,{\"children\":[\"$\",\"$7\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@8\"}]}]]}],{},null,false,null]},null,false,\"$@9\"]},null,false,null],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[\"$\",\"$La\",null,{\"children\":\"$Lb\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$Lc\",null,{\"children\":[\"$\",\"$7\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Ld\"}]}]}],null]}],false]],\"m\":\"$undefined\",\"G\":[\"$e\",[]],\"S\":true,\"h\":null,\"s\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"hqMZcC_as2uhicKR6YANm\"}\n"])</script><script>self.__next_f.push([1,"f:[]\n9:\"$Wf\"\n"])</script><script>self.__next_f.push([1,"b:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"10:I[86869,[],\"IconMark\"]\n8:null\n"])</script><script>self.__next_f.push([1,"d:[[\"$\",\"title\",\"0\",{\"children\":\"BlueKiwi\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"Design reusable workflows, run them from any AI coding agent, and watch every step in real time.\"}],[\"$\",\"meta\",\"2\",{\"property\":\"og:title\",\"content\":\"BlueKiwi — AI Agent Workflow Engine\"}],[\"$\",\"meta\",\"3\",{\"property\":\"og:description\",\"content\":\"Design reusable workflows, run them from any AI coding agent, and watch every step in real time.\"}],[\"$\",\"meta\",\"4\",{\"property\":\"og:site_name\",\"content\":\"BlueKiwi\"}],[\"$\",\"meta\",\"5\",{\"property\":\"og:locale\",\"content\":\"ko_KR\"}],[\"$\",\"meta\",\"6\",{\"property\":\"og:image\",\"content\":\"http://localhost:3100/og-cover.png\"}],[\"$\",\"meta\",\"7\",{\"property\":\"og:image:width\",\"content\":\"1200\"}],[\"$\",\"meta\",\"8\",{\"property\":\"og:image:height\",\"content\":\"630\"}],[\"$\",\"meta\",\"9\",{\"property\":\"og:image:alt\",\"content\":\"BlueKiwi — AI Agent Workflow Engine\"}],[\"$\",\"meta\",\"10\",{\"property\":\"og:type\",\"content\":\"website\"}],[\"$\",\"meta\",\"11\",{\"name\":\"twitter:card\",\"content\":\"summary_large_image\"}],[\"$\",\"meta\",\"12\",{\"name\":\"twitter:title\",\"content\":\"BlueKiwi — AI Agent Workflow Engine\"}],[\"$\",\"meta\",\"13\",{\"name\":\"twitter:description\",\"content\":\"Design reusable workflows, run them from any AI coding agent, and watch every step in real time.\"}],[\"$\",\"meta\",\"14\",{\"name\":\"twitter:image\",\"content\":\"http://localhost:3100/og-cover.png\"}],[\"$\",\"link\",\"15\",{\"rel\":\"icon\",\"href\":\"/favicon.ico\",\"sizes\":\"32x32\"}],[\"$\",\"link\",\"16\",{\"rel\":\"icon\",\"href\":\"/favicon.png\",\"type\":\"image/png\",\"sizes\":\"32x32\"}],[\"$\",\"link\",\"17\",{\"rel\":\"icon\",\"href\":\"/icon-192.png\",\"type\":\"image/png\",\"sizes\":\"192x192\"}],[\"$\",\"link\",\"18\",{\"rel\":\"icon\",\"href\":\"/icon-512.png\",\"type\":\"image/png\",\"sizes\":\"512x512\"}],[\"$\",\"link\",\"19\",{\"rel\":\"apple-touch-icon\",\"href\":\"/apple-touch-icon.png\"}],[\"$\",\"$L10\",\"20\",{}]]\n"])</script></body></html>
1
+ <!DOCTYPE html><html lang="ko" class="antialiased"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/css/2bc6b6e35d293c50.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-49017e80a77a9442.js"/><script src="/_next/static/chunks/4bd1b696-e356ca5ba0218e27.js" async=""></script><script src="/_next/static/chunks/3794-154456079185e990.js" async=""></script><script src="/_next/static/chunks/main-app-e972602355b3c35f.js" async=""></script><script src="/_next/static/chunks/7262-cdb2767600e6e41e.js" async=""></script><script src="/_next/static/chunks/2360-3fea55936dac2ff8.js" async=""></script><script src="/_next/static/chunks/app/layout-e3f307ffaa2d11cc.js" async=""></script><meta name="robots" content="noindex"/><title>404: This page could not be found.</title><title>BlueKiwi</title><meta name="description" content="Design reusable workflows, run them from any AI coding agent, and watch every step in real time."/><meta property="og:title" content="BlueKiwi — AI Agent Workflow Engine"/><meta property="og:description" content="Design reusable workflows, run them from any AI coding agent, and watch every step in real time."/><meta property="og:site_name" content="BlueKiwi"/><meta property="og:locale" content="ko_KR"/><meta property="og:image" content="http://localhost:3100/og-cover.png"/><meta property="og:image:width" content="1200"/><meta property="og:image:height" content="630"/><meta property="og:image:alt" content="BlueKiwi — AI Agent Workflow Engine"/><meta property="og:type" content="website"/><meta name="twitter:card" content="summary_large_image"/><meta name="twitter:title" content="BlueKiwi — AI Agent Workflow Engine"/><meta name="twitter:description" content="Design reusable workflows, run them from any AI coding agent, and watch every step in real time."/><meta name="twitter:image" content="http://localhost:3100/og-cover.png"/><link rel="icon" href="/favicon.ico" sizes="32x32"/><link rel="icon" href="/favicon.png" type="image/png" sizes="32x32"/><link rel="icon" href="/icon-192.png" type="image/png" sizes="192x192"/><link rel="icon" href="/icon-512.png" type="image/png" sizes="512x512"/><link rel="apple-touch-icon" href="/apple-touch-icon.png"/><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body class="min-h-screen"><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><!--$--><!--/$--><section aria-label="Notifications alt+T" tabindex="-1" aria-live="polite" aria-relevant="additions text" aria-atomic="false"></section><script src="/_next/static/chunks/webpack-49017e80a77a9442.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[42360,[\"7262\",\"static/chunks/7262-cdb2767600e6e41e.js\",\"2360\",\"static/chunks/2360-3fea55936dac2ff8.js\",\"7177\",\"static/chunks/app/layout-e3f307ffaa2d11cc.js\"],\"I18nProvider\"]\n3:I[57121,[],\"\"]\n4:I[74581,[],\"\"]\n5:I[30852,[\"7262\",\"static/chunks/7262-cdb2767600e6e41e.js\",\"2360\",\"static/chunks/2360-3fea55936dac2ff8.js\",\"7177\",\"static/chunks/app/layout-e3f307ffaa2d11cc.js\"],\"Toaster\"]\n6:I[90484,[],\"OutletBoundary\"]\n7:\"$Sreact.suspense\"\na:I[90484,[],\"ViewportBoundary\"]\nc:I[90484,[],\"MetadataBoundary\"]\ne:I[27123,[],\"default\",1]\n:HL[\"/_next/static/css/2bc6b6e35d293c50.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"c\":[\"\",\"_not-found\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",16],[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/2bc6b6e35d293c50.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"ko\",\"className\":\"antialiased\",\"children\":[\"$\",\"body\",null,{\"className\":\"min-h-screen\",\"children\":[\"$\",\"$L2\",null,{\"children\":[[\"$\",\"$L3\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L4\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}],[\"$\",\"$L5\",null,{\"position\":\"top-right\"}]]}]}]}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L3\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L4\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$L6\",null,{\"children\":[\"$\",\"$7\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@8\"}]}]]}],{},null,false,null]},null,false,\"$@9\"]},null,false,null],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[\"$\",\"$La\",null,{\"children\":\"$Lb\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$Lc\",null,{\"children\":[\"$\",\"$7\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Ld\"}]}]}],null]}],false]],\"m\":\"$undefined\",\"G\":[\"$e\",[]],\"S\":true,\"h\":null,\"s\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"UVzMOjly0ACJRK3vNndFP\"}\n"])</script><script>self.__next_f.push([1,"f:[]\n9:\"$Wf\"\n"])</script><script>self.__next_f.push([1,"b:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"10:I[86869,[],\"IconMark\"]\n8:null\n"])</script><script>self.__next_f.push([1,"d:[[\"$\",\"title\",\"0\",{\"children\":\"BlueKiwi\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"Design reusable workflows, run them from any AI coding agent, and watch every step in real time.\"}],[\"$\",\"meta\",\"2\",{\"property\":\"og:title\",\"content\":\"BlueKiwi — AI Agent Workflow Engine\"}],[\"$\",\"meta\",\"3\",{\"property\":\"og:description\",\"content\":\"Design reusable workflows, run them from any AI coding agent, and watch every step in real time.\"}],[\"$\",\"meta\",\"4\",{\"property\":\"og:site_name\",\"content\":\"BlueKiwi\"}],[\"$\",\"meta\",\"5\",{\"property\":\"og:locale\",\"content\":\"ko_KR\"}],[\"$\",\"meta\",\"6\",{\"property\":\"og:image\",\"content\":\"http://localhost:3100/og-cover.png\"}],[\"$\",\"meta\",\"7\",{\"property\":\"og:image:width\",\"content\":\"1200\"}],[\"$\",\"meta\",\"8\",{\"property\":\"og:image:height\",\"content\":\"630\"}],[\"$\",\"meta\",\"9\",{\"property\":\"og:image:alt\",\"content\":\"BlueKiwi — AI Agent Workflow Engine\"}],[\"$\",\"meta\",\"10\",{\"property\":\"og:type\",\"content\":\"website\"}],[\"$\",\"meta\",\"11\",{\"name\":\"twitter:card\",\"content\":\"summary_large_image\"}],[\"$\",\"meta\",\"12\",{\"name\":\"twitter:title\",\"content\":\"BlueKiwi — AI Agent Workflow Engine\"}],[\"$\",\"meta\",\"13\",{\"name\":\"twitter:description\",\"content\":\"Design reusable workflows, run them from any AI coding agent, and watch every step in real time.\"}],[\"$\",\"meta\",\"14\",{\"name\":\"twitter:image\",\"content\":\"http://localhost:3100/og-cover.png\"}],[\"$\",\"link\",\"15\",{\"rel\":\"icon\",\"href\":\"/favicon.ico\",\"sizes\":\"32x32\"}],[\"$\",\"link\",\"16\",{\"rel\":\"icon\",\"href\":\"/favicon.png\",\"type\":\"image/png\",\"sizes\":\"32x32\"}],[\"$\",\"link\",\"17\",{\"rel\":\"icon\",\"href\":\"/icon-192.png\",\"type\":\"image/png\",\"sizes\":\"192x192\"}],[\"$\",\"link\",\"18\",{\"rel\":\"icon\",\"href\":\"/icon-512.png\",\"type\":\"image/png\",\"sizes\":\"512x512\"}],[\"$\",\"link\",\"19\",{\"rel\":\"apple-touch-icon\",\"href\":\"/apple-touch-icon.png\"}],[\"$\",\"$L10\",\"20\",{}]]\n"])</script></body></html>
@@ -1 +1 @@
1
- <!DOCTYPE html><html id="__next_error__"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-49017e80a77a9442.js"/><script src="/_next/static/chunks/4bd1b696-e356ca5ba0218e27.js" async=""></script><script src="/_next/static/chunks/3794-154456079185e990.js" async=""></script><script src="/_next/static/chunks/main-app-e972602355b3c35f.js" async=""></script><title>500: This page couldn’t load</title><style>:root {--next-error-bg: #fff;--next-error-text: #171717;--next-error-title: #171717;--next-error-message: #171717;--next-error-digest: #666666;--next-error-btn-text: #fff;--next-error-btn-bg: #171717;--next-error-btn-border: none;--next-error-btn-secondary-text: #171717;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);}@media (prefers-color-scheme: dark) {:root {--next-error-bg: #0a0a0a;--next-error-text: #ededed;--next-error-title: #ededed;--next-error-message: #ededed;--next-error-digest: #a0a0a0;--next-error-btn-text: #0a0a0a;--next-error-btn-bg: #ededed;--next-error-btn-border: none;--next-error-btn-secondary-text: #ededed;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);}}body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }</style><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;display:flex;align-items:center;justify-content:center"><div style="margin-top:-32px;max-width:325px;padding:32px 28px;text-align:left"><svg width="32" height="32" viewBox="-0.2 -1.5 32 32" fill="none" style="margin-bottom:24px"><path d="M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z" fill="var(--next-error-title)"></path></svg><h1 style="font-size:24px;font-weight:500;letter-spacing:-0.02em;line-height:32px;margin:0 0 12px 0;color:var(--next-error-title)">This page couldn’t load</h1><p style="font-size:14px;font-weight:400;line-height:21px;margin:0 0 20px 0;color:var(--next-error-message)">A server error occurred. Reload to try again.</p><form style="margin:0"><button type="submit" style="display:inline-flex;align-items:center;justify-content:center;height:32px;padding:0 12px;font-size:14px;font-weight:500;line-height:20px;border-radius:6px;cursor:pointer;color:var(--next-error-btn-text);background:var(--next-error-btn-bg);border:var(--next-error-btn-border)">Reload</button></form></div></div><!--$--><!--/$--><script src="/_next/static/chunks/webpack-49017e80a77a9442.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[57121,[],\"\"]\n3:I[74581,[],\"\"]\n4:I[90484,[],\"OutletBoundary\"]\n5:\"$Sreact.suspense\"\n8:I[90484,[],\"ViewportBoundary\"]\na:I[90484,[],\"MetadataBoundary\"]\nc:I[27123,[],\"default\",1]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"c\":[\"\",\"_global-error\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"_global-error\",{\"children\":[\"__PAGE__\",{}]}]}],[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"html\",null,{\"id\":\"__next_error__\",\"children\":[[\"$\",\"head\",null,{\"children\":[[\"$\",\"title\",null,{\"children\":\"500: This page couldn’t load\"}],[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\":root {--next-error-bg: #fff;--next-error-text: #171717;--next-error-title: #171717;--next-error-message: #171717;--next-error-digest: #666666;--next-error-btn-text: #fff;--next-error-btn-bg: #171717;--next-error-btn-border: none;--next-error-btn-secondary-text: #171717;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);}@media (prefers-color-scheme: dark) {:root {--next-error-bg: #0a0a0a;--next-error-text: #ededed;--next-error-title: #ededed;--next-error-message: #ededed;--next-error-digest: #a0a0a0;--next-error-btn-text: #0a0a0a;--next-error-btn-bg: #ededed;--next-error-btn-border: none;--next-error-btn-secondary-text: #ededed;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);}}body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }\"}}]]}],[\"$\",\"body\",null,{\"children\":[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"display\":\"flex\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"style\":{\"marginTop\":\"-32px\",\"maxWidth\":\"325px\",\"padding\":\"32px 28px\",\"textAlign\":\"left\"},\"children\":[[\"$\",\"svg\",null,{\"width\":\"32\",\"height\":\"32\",\"viewBox\":\"-0.2 -1.5 32 32\",\"fill\":\"none\",\"style\":{\"marginBottom\":\"24px\"},\"children\":[\"$\",\"path\",null,{\"d\":\"M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z\",\"fill\":\"var(--next-error-title)\"}]}],[\"$\",\"h1\",null,{\"style\":{\"fontSize\":\"24px\",\"fontWeight\":500,\"letterSpacing\":\"-0.02em\",\"lineHeight\":\"32px\",\"margin\":\"0 0 12px 0\",\"color\":\"var(--next-error-title)\"},\"children\":\"This page couldn’t load\"}],[\"$\",\"p\",null,{\"style\":{\"fontSize\":\"14px\",\"fontWeight\":400,\"lineHeight\":\"21px\",\"margin\":\"0 0 20px 0\",\"color\":\"var(--next-error-message)\"},\"children\":\"A server error occurred. Reload to try again.\"}],[\"$\",\"form\",null,{\"style\":{\"margin\":0},\"children\":[\"$\",\"button\",null,{\"type\":\"submit\",\"style\":{\"display\":\"inline-flex\",\"alignItems\":\"center\",\"justifyContent\":\"center\",\"height\":\"32px\",\"padding\":\"0 12px\",\"fontSize\":\"14px\",\"fontWeight\":500,\"lineHeight\":\"20px\",\"borderRadius\":\"6px\",\"cursor\":\"pointer\",\"color\":\"var(--next-error-btn-text)\",\"background\":\"var(--next-error-btn-bg)\",\"border\":\"var(--next-error-btn-border)\"},\"children\":\"Reload\"}]}]]}]}]}]]}],null,[\"$\",\"$L4\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@6\"}]}]]}],{},null,false,null]},null,false,\"$@7\"]},null,false,\"$@7\"],[\"$\",\"$1\",\"h\",{\"children\":[null,[\"$\",\"$L8\",null,{\"children\":\"$L9\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$La\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Lb\"}]}]}],null]}],false]],\"m\":\"$undefined\",\"G\":[\"$c\",[]],\"S\":true,\"h\":null,\"s\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"hqMZcC_as2uhicKR6YANm\"}\n"])</script><script>self.__next_f.push([1,"d:[]\n7:\"$Wd\"\n"])</script><script>self.__next_f.push([1,"9:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"6:null\nb:[]\n"])</script></body></html>
1
+ <!DOCTYPE html><html id="__next_error__"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-49017e80a77a9442.js"/><script src="/_next/static/chunks/4bd1b696-e356ca5ba0218e27.js" async=""></script><script src="/_next/static/chunks/3794-154456079185e990.js" async=""></script><script src="/_next/static/chunks/main-app-e972602355b3c35f.js" async=""></script><title>500: This page couldn’t load</title><style>:root {--next-error-bg: #fff;--next-error-text: #171717;--next-error-title: #171717;--next-error-message: #171717;--next-error-digest: #666666;--next-error-btn-text: #fff;--next-error-btn-bg: #171717;--next-error-btn-border: none;--next-error-btn-secondary-text: #171717;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);}@media (prefers-color-scheme: dark) {:root {--next-error-bg: #0a0a0a;--next-error-text: #ededed;--next-error-title: #ededed;--next-error-message: #ededed;--next-error-digest: #a0a0a0;--next-error-btn-text: #0a0a0a;--next-error-btn-bg: #ededed;--next-error-btn-border: none;--next-error-btn-secondary-text: #ededed;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);}}body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }</style><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;display:flex;align-items:center;justify-content:center"><div style="margin-top:-32px;max-width:325px;padding:32px 28px;text-align:left"><svg width="32" height="32" viewBox="-0.2 -1.5 32 32" fill="none" style="margin-bottom:24px"><path d="M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z" fill="var(--next-error-title)"></path></svg><h1 style="font-size:24px;font-weight:500;letter-spacing:-0.02em;line-height:32px;margin:0 0 12px 0;color:var(--next-error-title)">This page couldn’t load</h1><p style="font-size:14px;font-weight:400;line-height:21px;margin:0 0 20px 0;color:var(--next-error-message)">A server error occurred. Reload to try again.</p><form style="margin:0"><button type="submit" style="display:inline-flex;align-items:center;justify-content:center;height:32px;padding:0 12px;font-size:14px;font-weight:500;line-height:20px;border-radius:6px;cursor:pointer;color:var(--next-error-btn-text);background:var(--next-error-btn-bg);border:var(--next-error-btn-border)">Reload</button></form></div></div><!--$--><!--/$--><script src="/_next/static/chunks/webpack-49017e80a77a9442.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[57121,[],\"\"]\n3:I[74581,[],\"\"]\n4:I[90484,[],\"OutletBoundary\"]\n5:\"$Sreact.suspense\"\n8:I[90484,[],\"ViewportBoundary\"]\na:I[90484,[],\"MetadataBoundary\"]\nc:I[27123,[],\"default\",1]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"c\":[\"\",\"_global-error\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"_global-error\",{\"children\":[\"__PAGE__\",{}]}]}],[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"html\",null,{\"id\":\"__next_error__\",\"children\":[[\"$\",\"head\",null,{\"children\":[[\"$\",\"title\",null,{\"children\":\"500: This page couldn’t load\"}],[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\":root {--next-error-bg: #fff;--next-error-text: #171717;--next-error-title: #171717;--next-error-message: #171717;--next-error-digest: #666666;--next-error-btn-text: #fff;--next-error-btn-bg: #171717;--next-error-btn-border: none;--next-error-btn-secondary-text: #171717;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);}@media (prefers-color-scheme: dark) {:root {--next-error-bg: #0a0a0a;--next-error-text: #ededed;--next-error-title: #ededed;--next-error-message: #ededed;--next-error-digest: #a0a0a0;--next-error-btn-text: #0a0a0a;--next-error-btn-bg: #ededed;--next-error-btn-border: none;--next-error-btn-secondary-text: #ededed;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);}}body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }\"}}]]}],[\"$\",\"body\",null,{\"children\":[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"display\":\"flex\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"style\":{\"marginTop\":\"-32px\",\"maxWidth\":\"325px\",\"padding\":\"32px 28px\",\"textAlign\":\"left\"},\"children\":[[\"$\",\"svg\",null,{\"width\":\"32\",\"height\":\"32\",\"viewBox\":\"-0.2 -1.5 32 32\",\"fill\":\"none\",\"style\":{\"marginBottom\":\"24px\"},\"children\":[\"$\",\"path\",null,{\"d\":\"M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z\",\"fill\":\"var(--next-error-title)\"}]}],[\"$\",\"h1\",null,{\"style\":{\"fontSize\":\"24px\",\"fontWeight\":500,\"letterSpacing\":\"-0.02em\",\"lineHeight\":\"32px\",\"margin\":\"0 0 12px 0\",\"color\":\"var(--next-error-title)\"},\"children\":\"This page couldn’t load\"}],[\"$\",\"p\",null,{\"style\":{\"fontSize\":\"14px\",\"fontWeight\":400,\"lineHeight\":\"21px\",\"margin\":\"0 0 20px 0\",\"color\":\"var(--next-error-message)\"},\"children\":\"A server error occurred. Reload to try again.\"}],[\"$\",\"form\",null,{\"style\":{\"margin\":0},\"children\":[\"$\",\"button\",null,{\"type\":\"submit\",\"style\":{\"display\":\"inline-flex\",\"alignItems\":\"center\",\"justifyContent\":\"center\",\"height\":\"32px\",\"padding\":\"0 12px\",\"fontSize\":\"14px\",\"fontWeight\":500,\"lineHeight\":\"20px\",\"borderRadius\":\"6px\",\"cursor\":\"pointer\",\"color\":\"var(--next-error-btn-text)\",\"background\":\"var(--next-error-btn-bg)\",\"border\":\"var(--next-error-btn-border)\"},\"children\":\"Reload\"}]}]]}]}]}]]}],null,[\"$\",\"$L4\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@6\"}]}]]}],{},null,false,null]},null,false,\"$@7\"]},null,false,\"$@7\"],[\"$\",\"$1\",\"h\",{\"children\":[null,[\"$\",\"$L8\",null,{\"children\":\"$L9\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$La\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Lb\"}]}]}],null]}],false]],\"m\":\"$undefined\",\"G\":[\"$c\",[]],\"S\":true,\"h\":null,\"s\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"UVzMOjly0ACJRK3vNndFP\"}\n"])</script><script>self.__next_f.push([1,"d:[]\n7:\"$Wd\"\n"])</script><script>self.__next_f.push([1,"9:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"6:null\nb:[]\n"])</script></body></html>
@@ -1 +1 @@
1
- {"node":{},"edge":{},"encryptionKey":"ID6g2RFA0gjR4zlt3hJhS3X0qiVNpHr2ZfZuCYrLcBI="}
1
+ {"node":{},"edge":{},"encryptionKey":"fk+mQNusAeqhUOAvcxFA2BNETIeR/uw1nQ3ztx38juU="}
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7552],{11105:(e,t,a)=>{a.d(t,{Y:()=>n});let r={OWNERSHIP_REQUIRED:"rbacErrors.ownershipRequired",VISIBILITY_GATE:"rbacErrors.visibilityGate",CREDENTIAL_USE_DENIED:"rbacErrors.credentialUseDenied",CREDENTIAL_REVEAL_DENIED:"rbacErrors.credentialRevealDenied",FOLDER_DEPTH_EXCEEDED:"rbacErrors.folderDepthExceeded",FOLDER_VISIBILITY_INVALID:"rbacErrors.folderVisibilityInvalid",FOLDER_SHARE_DENIED:"rbacErrors.folderShareDenied",FOLDER_NOT_EMPTY:"rbacErrors.folderNotEmpty",INSTRUCTION_IN_USE:"rbacErrors.instructionInUse",CREDENTIAL_IN_USE:"rbacErrors.credentialInUse",NOT_FOUND:"serverErrors.notFound",UNAUTHORIZED:"serverErrors.unauthorized",FORBIDDEN:"serverErrors.forbidden",CONFLICT:"serverErrors.conflict",PRECONDITION_FAILED:"serverErrors.preconditionFailed",VALIDATION_ERROR:"validationErrors.generic",WORKSPACE_MISSING:"serverErrors.myWorkspaceMissing",MY_WORKSPACE_MISSING:"serverErrors.myWorkspaceMissing",VERSION_INACTIVE:"serverErrors.versionInactive",WORKFLOW_CREDENTIAL_SETUP_REQUIRED:"serverErrors.workflowCredentialSetupRequired"};function n(e,t,a){if(!e)return a;let n=e.code;if(n&&r[n]){let a={};if(e.details)for(let[t,r]of Object.entries(e.details))("string"==typeof r||"number"==typeof r)&&(a[t]=r);let o=t(r[n],a);if(o&&o!==r[n])return o}return e.message??a}},13146:(e,t,a)=>{a.d(t,{G7:()=>c,Gj:()=>l,L$:()=>g,h_:()=>m,oI:()=>u,xL:()=>f});var r=a(95155);a(12115);var n=a(34738),o=a(61878),s=a(40980),d=a(42763);function i({className:e,...t}){return(0,r.jsx)(n.uB,{"data-slot":"command",className:(0,s.cn)("flex h-full w-full flex-col overflow-hidden rounded-[1.5rem] bg-popover text-popover-foreground",e),...t})}function l({title:e="Command Palette",description:t="Search for a command to run...",children:a,className:n,showCloseButton:o=!0,...c}){return(0,r.jsxs)(d.lG,{...c,children:[(0,r.jsxs)(d.c7,{className:"sr-only",children:[(0,r.jsx)(d.L3,{children:e}),(0,r.jsx)(d.rr,{children:t})]}),(0,r.jsx)(d.Cf,{className:(0,s.cn)("overflow-hidden p-0",n),showCloseButton:o,children:(0,r.jsx)(i,{className:"**:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:a})})]})}function c({className:e,...t}){return(0,r.jsxs)("div",{"data-slot":"command-input-wrapper",className:"flex h-9 items-center gap-2 border-b px-3",children:[(0,r.jsx)(o.A,{className:"size-4 shrink-0 opacity-50"}),(0,r.jsx)(n.uB.Input,{"data-slot":"command-input",className:(0,s.cn)("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})]})}function u({className:e,...t}){return(0,r.jsx)(n.uB.List,{"data-slot":"command-list",className:(0,s.cn)("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",e),...t})}function f({...e}){return(0,r.jsx)(n.uB.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...e})}function g({className:e,...t}){return(0,r.jsx)(n.uB.Group,{"data-slot":"command-group",className:(0,s.cn)("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t})}function m({className:e,...t}){return(0,r.jsx)(n.uB.Item,{"data-slot":"command-item",className:(0,s.cn)("relative flex cursor-default items-center gap-2 rounded-xl px-3 py-2 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-[selected=true]:bg-brand-blue-100 data-[selected=true]:text-brand-blue-700 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground",e),...t})}},13276:(e,t,a)=>{a.d(t,{$v:()=>x,EO:()=>u,Lt:()=>d,Rx:()=>p,Zr:()=>b,ck:()=>g,r7:()=>m,tv:()=>i,wd:()=>f});var r=a(95155);a(12115);var n=a(86835),o=a(40980),s=a(89239);function d({...e}){return(0,r.jsx)(n.bL,{"data-slot":"alert-dialog",...e})}function i({...e}){return(0,r.jsx)(n.l9,{"data-slot":"alert-dialog-trigger",...e})}function l({...e}){return(0,r.jsx)(n.ZL,{"data-slot":"alert-dialog-portal",...e})}function c({className:e,...t}){return(0,r.jsx)(n.hJ,{"data-slot":"alert-dialog-overlay",className:(0,o.cn)("fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0",e),...t})}function u({className:e,size:t="default",...a}){return(0,r.jsxs)(l,{children:[(0,r.jsx)(c,{}),(0,r.jsx)(n.UC,{"data-slot":"alert-dialog-content","data-size":t,className:(0,o.cn)("group/alert-dialog-content fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-[1.5rem] border border-border bg-card p-6 shadow-[var(--shadow-soft)] duration-200 data-[size=sm]:max-w-xs data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[size=default]:sm:max-w-[28rem]",e),...a})]})}function f({className:e,...t}){return(0,r.jsx)("div",{"data-slot":"alert-dialog-header",className:(0,o.cn)("grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-6 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]",e),...t})}function g({className:e,...t}){return(0,r.jsx)("div",{"data-slot":"alert-dialog-footer",className:(0,o.cn)("flex flex-col-reverse gap-2 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end",e),...t})}function m({className:e,...t}){return(0,r.jsx)(n.hE,{"data-slot":"alert-dialog-title",className:(0,o.cn)("text-lg font-semibold sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2",e),...t})}function x({className:e,...t}){return(0,r.jsx)(n.VY,{"data-slot":"alert-dialog-description",className:(0,o.cn)("text-sm text-muted-foreground",e),...t})}function p({className:e,variant:t="default",size:a="default",...d}){return(0,r.jsx)(s.$,{variant:t,size:a,asChild:!0,children:(0,r.jsx)(n.rc,{"data-slot":"alert-dialog-action",className:(0,o.cn)(e),...d})})}function b({className:e,variant:t="outline",size:a="default",...d}){return(0,r.jsx)(s.$,{variant:t,size:a,asChild:!0,children:(0,r.jsx)(n.ZD,{"data-slot":"alert-dialog-cancel",className:(0,o.cn)(e),...d})})}},18349:(e,t,a)=>{a.d(t,{T:()=>o});var r=a(95155);a(12115);var n=a(40980);function o({className:e,...t}){return(0,r.jsx)("textarea",{"data-slot":"textarea",className:(0,n.cn)("flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:ring-destructive/40",e),...t})}},28367:(e,t,a)=>{a.d(t,{o:()=>s});var r=a(95155),n=a(13276),o=a(42360);function s({target:e,title:t,description:a,confirmLabel:d,cancelLabel:i,onCancel:l,onConfirm:c}){let{t:u}=(0,o.B)();return(0,r.jsx)(n.Lt,{open:null!==e,onOpenChange:e=>{e||l()},children:(0,r.jsxs)(n.EO,{children:[(0,r.jsxs)(n.wd,{children:[(0,r.jsx)(n.r7,{children:t}),(0,r.jsx)(n.$v,{children:a})]}),(0,r.jsxs)(n.ck,{children:[(0,r.jsx)(n.Zr,{children:i??u("common.cancel")}),(0,r.jsx)(n.Rx,{variant:"destructive",onClick:c,children:d??u("common.delete")})]})]})})}},40980:(e,t,a)=>{a.d(t,{cn:()=>o});var r=a(29722),n=a(622);function o(...e){return(0,n.QP)((0,r.$)(e))}},42763:(e,t,a)=>{a.d(t,{Cf:()=>g,Es:()=>x,HM:()=>u,L3:()=>p,c7:()=>m,lG:()=>i,rr:()=>b,zM:()=>l});var r=a(95155);a(12115);var n=a(33210),o=a(19324),s=a(40980),d=a(89239);function i({...e}){return(0,r.jsx)(o.bL,{"data-slot":"dialog",...e})}function l({...e}){return(0,r.jsx)(o.l9,{"data-slot":"dialog-trigger",...e})}function c({...e}){return(0,r.jsx)(o.ZL,{"data-slot":"dialog-portal",...e})}function u({...e}){return(0,r.jsx)(o.bm,{"data-slot":"dialog-close",...e})}function f({className:e,...t}){return(0,r.jsx)(o.hJ,{"data-slot":"dialog-overlay",className:(0,s.cn)("fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0",e),...t})}function g({className:e,children:t,showCloseButton:a=!0,...d}){return(0,r.jsxs)(c,{"data-slot":"dialog-portal",children:[(0,r.jsx)(f,{}),(0,r.jsxs)(o.UC,{"data-slot":"dialog-content",className:(0,s.cn)("fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 overflow-hidden rounded-[1.5rem] border border-border bg-card p-6 shadow-[var(--shadow-soft)] duration-200 outline-none data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 sm:max-w-[28rem]",e),...d,children:[t,a&&(0,r.jsxs)(o.bm,{"data-slot":"dialog-close",className:"absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[(0,r.jsx)(n.A,{}),(0,r.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})}function m({className:e,...t}){return(0,r.jsx)("div",{"data-slot":"dialog-header",className:(0,s.cn)("flex flex-col gap-2 text-center sm:text-left",e),...t})}function x({className:e,showCloseButton:t=!1,children:a,...n}){return(0,r.jsxs)("div",{"data-slot":"dialog-footer",className:(0,s.cn)("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...n,children:[a,t&&(0,r.jsx)(o.bm,{asChild:!0,children:(0,r.jsx)(d.$,{variant:"outline",children:"Close"})})]})}function p({className:e,...t}){return(0,r.jsx)(o.hE,{"data-slot":"dialog-title",className:(0,s.cn)("text-lg leading-none font-semibold",e),...t})}function b({className:e,...t}){return(0,r.jsx)(o.VY,{"data-slot":"dialog-description",className:(0,s.cn)("text-sm text-muted-foreground",e),...t})}},60529:(e,t,a)=>{a.d(t,{p:()=>o});var r=a(95155);a(12115);var n=a(40980);function o({className:e,type:t,...a}){return(0,r.jsx)("input",{type:t,"data-slot":"input",className:(0,n.cn)("h-11 w-full min-w-0 rounded-2xl border border-input bg-background px-4 py-2 text-[0.95rem] text-foreground shadow-none transition-colors outline-none selection:bg-primary selection:text-primary-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-ink-500 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50","focus-visible:border-brand-blue-500 focus-visible:ring-[4px] focus-visible:ring-ring/35","aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40",e),...a})}},81477:(e,t,a)=>{a.d(t,{BT:()=>i,Wu:()=>l,ZB:()=>d,Zp:()=>o,aR:()=>s});var r=a(95155);a(12115);var n=a(40980);function o({className:e,...t}){return(0,r.jsx)("div",{"data-slot":"card",className:(0,n.cn)("flex flex-col rounded-[1.5rem] border border-border bg-card text-card-foreground shadow-card",e),...t})}function s({className:e,...t}){return(0,r.jsx)("div",{"data-slot":"card-header",className:(0,n.cn)("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 p-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",e),...t})}function d({className:e,...t}){return(0,r.jsx)("div",{"data-slot":"card-title",className:(0,n.cn)("leading-none font-semibold",e),...t})}function i({className:e,...t}){return(0,r.jsx)("div",{"data-slot":"card-description",className:(0,n.cn)("text-sm text-muted-foreground",e),...t})}function l({className:e,...t}){return(0,r.jsx)("div",{"data-slot":"card-content",className:(0,n.cn)("px-6 pb-6",e),...t})}},89239:(e,t,a)=>{a.d(t,{$:()=>i});var r=a(95155);a(12115);var n=a(18460),o=a(42442),s=a(40980);let d=(0,n.F)("inline-flex shrink-0 items-center justify-center gap-2 whitespace-nowrap transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 font-semibold [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-[0_10px_18px_rgba(53,87,190,0.18)] hover:bg-brand-blue-700",destructive:"bg-destructive text-destructive-foreground hover:bg-danger/90",outline:"border border-border bg-background text-foreground hover:bg-brand-blue-100 hover:text-brand-blue-700",secondary:"bg-secondary text-secondary-foreground hover:bg-surface-strong",ghost:"text-brand-blue-700 hover:bg-brand-blue-100 hover:text-brand-blue-700",accent:"bg-accent text-accent-foreground hover:bg-kiwi-700 hover:text-white",link:"text-brand-blue-700 underline-offset-4 hover:underline"},size:{default:"h-10 rounded-full px-5 text-[0.95rem]",xs:"h-6 gap-1 rounded-full px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-8 rounded-full px-3.5 text-sm",lg:"h-11 rounded-full px-6 text-[0.98rem]",icon:"size-10 rounded-full","icon-xs":"size-6 rounded-full [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-8 rounded-full","icon-lg":"size-10 rounded-full"}},defaultVariants:{variant:"default",size:"default"}});function i({className:e,variant:t="default",size:a="default",asChild:n=!1,...l}){let c=n?o.bL:"button";return(0,r.jsx)(c,{"data-slot":"button","data-variant":t,"data-size":a,className:(0,s.cn)(d({variant:t,size:a,className:e})),...l})}}}]);
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7552],{11105:(e,t,a)=>{a.d(t,{Y:()=>n});let r={OWNERSHIP_REQUIRED:"rbacErrors.ownershipRequired",VISIBILITY_GATE:"rbacErrors.visibilityGate",CREDENTIAL_USE_DENIED:"rbacErrors.credentialUseDenied",CREDENTIAL_REVEAL_DENIED:"rbacErrors.credentialRevealDenied",FOLDER_DEPTH_EXCEEDED:"rbacErrors.folderDepthExceeded",FOLDER_VISIBILITY_INVALID:"rbacErrors.folderVisibilityInvalid",FOLDER_SHARE_DENIED:"rbacErrors.folderShareDenied",FOLDER_NOT_EMPTY:"rbacErrors.folderNotEmpty",INSTRUCTION_IN_USE:"rbacErrors.instructionInUse",CREDENTIAL_IN_USE:"rbacErrors.credentialInUse",NOT_FOUND:"serverErrors.notFound",UNAUTHORIZED:"serverErrors.unauthorized",FORBIDDEN:"serverErrors.forbidden",CONFLICT:"serverErrors.conflict",PRECONDITION_FAILED:"serverErrors.preconditionFailed",VALIDATION_ERROR:"validationErrors.generic",WORKSPACE_MISSING:"serverErrors.myWorkspaceMissing",MY_WORKSPACE_MISSING:"serverErrors.myWorkspaceMissing",VERSION_INACTIVE:"serverErrors.versionInactive",WORKFLOW_CREDENTIAL_SETUP_REQUIRED:"serverErrors.workflowCredentialSetupRequired"};function n(e,t,a){if(!e)return a;let n=e.code;if(n&&r[n]){let a={};if(e.details)for(let[t,r]of Object.entries(e.details))("string"==typeof r||"number"==typeof r)&&(a[t]=r);let o=t(r[n],a);if(o&&o!==r[n])return o}return e.message??a}},13146:(e,t,a)=>{a.d(t,{G7:()=>c,Gj:()=>l,L$:()=>g,h_:()=>m,oI:()=>u,xL:()=>f});var r=a(95155);a(12115);var n=a(34738),o=a(61878),s=a(40980),d=a(42763);function i({className:e,...t}){return(0,r.jsx)(n.uB,{"data-slot":"command",className:(0,s.cn)("flex h-full w-full flex-col overflow-hidden rounded-[1.5rem] bg-popover text-popover-foreground",e),...t})}function l({title:e="Command Palette",description:t="Search for a command to run...",children:a,className:n,showCloseButton:o=!0,...c}){return(0,r.jsx)(d.lG,{...c,children:(0,r.jsxs)(d.Cf,{className:(0,s.cn)("overflow-hidden p-0",n),showCloseButton:o,children:[(0,r.jsxs)(d.c7,{className:"sr-only",children:[(0,r.jsx)(d.L3,{children:e}),(0,r.jsx)(d.rr,{children:t})]}),(0,r.jsx)(i,{className:"**:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:a})]})})}function c({className:e,...t}){return(0,r.jsxs)("div",{"data-slot":"command-input-wrapper",className:"flex h-9 items-center gap-2 border-b px-3",children:[(0,r.jsx)(o.A,{className:"size-4 shrink-0 opacity-50"}),(0,r.jsx)(n.uB.Input,{"data-slot":"command-input",className:(0,s.cn)("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})]})}function u({className:e,...t}){return(0,r.jsx)(n.uB.List,{"data-slot":"command-list",className:(0,s.cn)("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",e),...t})}function f({...e}){return(0,r.jsx)(n.uB.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...e})}function g({className:e,...t}){return(0,r.jsx)(n.uB.Group,{"data-slot":"command-group",className:(0,s.cn)("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t})}function m({className:e,...t}){return(0,r.jsx)(n.uB.Item,{"data-slot":"command-item",className:(0,s.cn)("relative flex cursor-default items-center gap-2 rounded-xl px-3 py-2 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-[selected=true]:bg-brand-blue-100 data-[selected=true]:text-brand-blue-700 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground",e),...t})}},13276:(e,t,a)=>{a.d(t,{$v:()=>x,EO:()=>u,Lt:()=>d,Rx:()=>p,Zr:()=>b,ck:()=>g,r7:()=>m,tv:()=>i,wd:()=>f});var r=a(95155);a(12115);var n=a(86835),o=a(40980),s=a(89239);function d({...e}){return(0,r.jsx)(n.bL,{"data-slot":"alert-dialog",...e})}function i({...e}){return(0,r.jsx)(n.l9,{"data-slot":"alert-dialog-trigger",...e})}function l({...e}){return(0,r.jsx)(n.ZL,{"data-slot":"alert-dialog-portal",...e})}function c({className:e,...t}){return(0,r.jsx)(n.hJ,{"data-slot":"alert-dialog-overlay",className:(0,o.cn)("fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0",e),...t})}function u({className:e,size:t="default",...a}){return(0,r.jsxs)(l,{children:[(0,r.jsx)(c,{}),(0,r.jsx)(n.UC,{"data-slot":"alert-dialog-content","data-size":t,className:(0,o.cn)("group/alert-dialog-content fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-[1.5rem] border border-border bg-card p-6 shadow-[var(--shadow-soft)] duration-200 data-[size=sm]:max-w-xs data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[size=default]:sm:max-w-[28rem]",e),...a})]})}function f({className:e,...t}){return(0,r.jsx)("div",{"data-slot":"alert-dialog-header",className:(0,o.cn)("grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-6 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]",e),...t})}function g({className:e,...t}){return(0,r.jsx)("div",{"data-slot":"alert-dialog-footer",className:(0,o.cn)("flex flex-col-reverse gap-2 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end",e),...t})}function m({className:e,...t}){return(0,r.jsx)(n.hE,{"data-slot":"alert-dialog-title",className:(0,o.cn)("text-lg font-semibold sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2",e),...t})}function x({className:e,...t}){return(0,r.jsx)(n.VY,{"data-slot":"alert-dialog-description",className:(0,o.cn)("text-sm text-muted-foreground",e),...t})}function p({className:e,variant:t="default",size:a="default",...d}){return(0,r.jsx)(s.$,{variant:t,size:a,asChild:!0,children:(0,r.jsx)(n.rc,{"data-slot":"alert-dialog-action",className:(0,o.cn)(e),...d})})}function b({className:e,variant:t="outline",size:a="default",...d}){return(0,r.jsx)(s.$,{variant:t,size:a,asChild:!0,children:(0,r.jsx)(n.ZD,{"data-slot":"alert-dialog-cancel",className:(0,o.cn)(e),...d})})}},18349:(e,t,a)=>{a.d(t,{T:()=>o});var r=a(95155);a(12115);var n=a(40980);function o({className:e,...t}){return(0,r.jsx)("textarea",{"data-slot":"textarea",className:(0,n.cn)("flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:ring-destructive/40",e),...t})}},28367:(e,t,a)=>{a.d(t,{o:()=>s});var r=a(95155),n=a(13276),o=a(42360);function s({target:e,title:t,description:a,confirmLabel:d,cancelLabel:i,onCancel:l,onConfirm:c}){let{t:u}=(0,o.B)();return(0,r.jsx)(n.Lt,{open:null!==e,onOpenChange:e=>{e||l()},children:(0,r.jsxs)(n.EO,{children:[(0,r.jsxs)(n.wd,{children:[(0,r.jsx)(n.r7,{children:t}),(0,r.jsx)(n.$v,{children:a})]}),(0,r.jsxs)(n.ck,{children:[(0,r.jsx)(n.Zr,{children:i??u("common.cancel")}),(0,r.jsx)(n.Rx,{variant:"destructive",onClick:c,children:d??u("common.delete")})]})]})})}},40980:(e,t,a)=>{a.d(t,{cn:()=>o});var r=a(29722),n=a(622);function o(...e){return(0,n.QP)((0,r.$)(e))}},42763:(e,t,a)=>{a.d(t,{Cf:()=>g,Es:()=>x,HM:()=>u,L3:()=>p,c7:()=>m,lG:()=>i,rr:()=>b,zM:()=>l});var r=a(95155);a(12115);var n=a(33210),o=a(19324),s=a(40980),d=a(89239);function i({...e}){return(0,r.jsx)(o.bL,{"data-slot":"dialog",...e})}function l({...e}){return(0,r.jsx)(o.l9,{"data-slot":"dialog-trigger",...e})}function c({...e}){return(0,r.jsx)(o.ZL,{"data-slot":"dialog-portal",...e})}function u({...e}){return(0,r.jsx)(o.bm,{"data-slot":"dialog-close",...e})}function f({className:e,...t}){return(0,r.jsx)(o.hJ,{"data-slot":"dialog-overlay",className:(0,s.cn)("fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0",e),...t})}function g({className:e,children:t,showCloseButton:a=!0,...d}){return(0,r.jsxs)(c,{"data-slot":"dialog-portal",children:[(0,r.jsx)(f,{}),(0,r.jsxs)(o.UC,{"data-slot":"dialog-content",className:(0,s.cn)("fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 overflow-hidden rounded-[1.5rem] border border-border bg-card p-6 shadow-[var(--shadow-soft)] duration-200 outline-none data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 sm:max-w-[28rem]",e),...d,children:[t,a&&(0,r.jsxs)(o.bm,{"data-slot":"dialog-close",className:"absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[(0,r.jsx)(n.A,{}),(0,r.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})}function m({className:e,...t}){return(0,r.jsx)("div",{"data-slot":"dialog-header",className:(0,s.cn)("flex flex-col gap-2 text-center sm:text-left",e),...t})}function x({className:e,showCloseButton:t=!1,children:a,...n}){return(0,r.jsxs)("div",{"data-slot":"dialog-footer",className:(0,s.cn)("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...n,children:[a,t&&(0,r.jsx)(o.bm,{asChild:!0,children:(0,r.jsx)(d.$,{variant:"outline",children:"Close"})})]})}function p({className:e,...t}){return(0,r.jsx)(o.hE,{"data-slot":"dialog-title",className:(0,s.cn)("text-lg leading-none font-semibold",e),...t})}function b({className:e,...t}){return(0,r.jsx)(o.VY,{"data-slot":"dialog-description",className:(0,s.cn)("text-sm text-muted-foreground",e),...t})}},60529:(e,t,a)=>{a.d(t,{p:()=>o});var r=a(95155);a(12115);var n=a(40980);function o({className:e,type:t,...a}){return(0,r.jsx)("input",{type:t,"data-slot":"input",className:(0,n.cn)("h-11 w-full min-w-0 rounded-2xl border border-input bg-background px-4 py-2 text-[0.95rem] text-foreground shadow-none transition-colors outline-none selection:bg-primary selection:text-primary-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-ink-500 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50","focus-visible:border-brand-blue-500 focus-visible:ring-[4px] focus-visible:ring-ring/35","aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40",e),...a})}},81477:(e,t,a)=>{a.d(t,{BT:()=>i,Wu:()=>l,ZB:()=>d,Zp:()=>o,aR:()=>s});var r=a(95155);a(12115);var n=a(40980);function o({className:e,...t}){return(0,r.jsx)("div",{"data-slot":"card",className:(0,n.cn)("flex flex-col rounded-[1.5rem] border border-border bg-card text-card-foreground shadow-card",e),...t})}function s({className:e,...t}){return(0,r.jsx)("div",{"data-slot":"card-header",className:(0,n.cn)("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 p-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",e),...t})}function d({className:e,...t}){return(0,r.jsx)("div",{"data-slot":"card-title",className:(0,n.cn)("leading-none font-semibold",e),...t})}function i({className:e,...t}){return(0,r.jsx)("div",{"data-slot":"card-description",className:(0,n.cn)("text-sm text-muted-foreground",e),...t})}function l({className:e,...t}){return(0,r.jsx)("div",{"data-slot":"card-content",className:(0,n.cn)("px-6 pb-6",e),...t})}},89239:(e,t,a)=>{a.d(t,{$:()=>i});var r=a(95155);a(12115);var n=a(18460),o=a(42442),s=a(40980);let d=(0,n.F)("inline-flex shrink-0 items-center justify-center gap-2 whitespace-nowrap transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 font-semibold [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-[0_10px_18px_rgba(53,87,190,0.18)] hover:bg-brand-blue-700",destructive:"bg-destructive text-destructive-foreground hover:bg-danger/90",outline:"border border-border bg-background text-foreground hover:bg-brand-blue-100 hover:text-brand-blue-700",secondary:"bg-secondary text-secondary-foreground hover:bg-surface-strong",ghost:"text-brand-blue-700 hover:bg-brand-blue-100 hover:text-brand-blue-700",accent:"bg-accent text-accent-foreground hover:bg-kiwi-700 hover:text-white",link:"text-brand-blue-700 underline-offset-4 hover:underline"},size:{default:"h-10 rounded-full px-5 text-[0.95rem]",xs:"h-6 gap-1 rounded-full px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-8 rounded-full px-3.5 text-sm",lg:"h-11 rounded-full px-6 text-[0.98rem]",icon:"size-10 rounded-full","icon-xs":"size-6 rounded-full [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-8 rounded-full","icon-lg":"size-10 rounded-full"}},defaultVariants:{variant:"default",size:"default"}});function i({className:e,variant:t="default",size:a="default",asChild:n=!1,...l}){let c=n?o.bL:"button";return(0,r.jsx)(c,{"data-slot":"button","data-variant":t,"data-size":a,className:(0,s.cn)(d({variant:t,size:a,className:e})),...l})}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9243],{9243:(e,t,r)=>{r.d(t,{default:()=>V});var n=r(95155),a=r(12115),s=r(73321),i=r(44923),l=r(87256),o=r(51914),d=r(96035),c=r(5121),u=r(53961),m=r(41585),x=r(65266),h=r(66609),b=r(45160),p=r(89239),f=r(81477),g=r(60529),v=r(18349),j=r(39768),w=r(59883),y=r(33210),N=r(42360);let k={action:u.A,gate:d.A,loop:c.A},_={action:"border-l-[3px] border-l-brand-blue-600",gate:"border-l-[3px] border-l-kiwi-600",loop:"border-l-[3px] border-l-[var(--muted-foreground)]"},$={action:"border-brand-blue-600/20 bg-brand-blue-100 text-brand-blue-700",gate:"border-kiwi-600/30 bg-kiwi-100 text-kiwi-700",loop:"border-[var(--border)] bg-transparent text-[var(--muted-foreground)]"};function C({node:e,index:t,isExpanded:r,onClick:a,onRemove:s}){let{t:i}=(0,N.B)(),{attributes:o,listeners:d,setNodeRef:c,transform:u,transition:x,isDragging:h}=(0,l.gl)({id:e.key}),p={transform:j.Ks.Transform.toString(u),transition:x},f=k[e.node_type],g=e.instruction.length>80?e.instruction.slice(0,80)+"...":e.instruction;return(0,n.jsxs)("div",{ref:c,style:p,className:`group flex items-start gap-2 rounded-lg border bg-[var(--card)] px-3 py-3 ${_[e.node_type]} ${h?"shadow-lg rotate-[1deg] z-10":""} ${r?"ring-2 ring-brand-blue-600/30":""}`,children:[(0,n.jsx)("button",{type:"button",className:"mt-1 cursor-grab touch-none text-[var(--muted-foreground)] hover:text-[var(--foreground)]",...o,...d,children:(0,n.jsx)(w.A,{className:"h-4 w-4"})}),(0,n.jsxs)("button",{type:"button",className:"flex flex-1 flex-col items-start gap-1 text-left",onClick:a,children:[(0,n.jsxs)("div",{className:"flex w-full items-center gap-2",children:[(0,n.jsx)("span",{className:"w-5 text-center font-mono text-xs text-[var(--muted-foreground)]",children:t+1}),(0,n.jsxs)(b.E,{className:$[e.node_type],children:[(0,n.jsx)(f,{className:"h-3.5 w-3.5"}),i(`editor.${e.node_type}`)]}),(0,n.jsx)("span",{className:"truncate text-sm font-medium",children:e.title||i("editor.nodeTitle")}),e.hitl&&(0,n.jsx)(b.E,{variant:"outline",className:"ml-auto border-amber-500 text-amber-700",children:"HITL"}),e.visual_selection&&(0,n.jsx)(b.E,{variant:"outline",className:"border-kiwi-500 text-kiwi-700",children:"Visual"}),e.credential_requirement&&(0,n.jsxs)(b.E,{variant:"outline",className:"border-[var(--destructive)] text-[var(--destructive)]",children:[(0,n.jsx)(m.A,{className:"h-3.5 w-3.5"}),e.credential_requirement.service_name]})]}),g&&!r&&(0,n.jsx)("p",{className:"pl-7 text-xs text-[var(--muted-foreground)] line-clamp-1",children:g})]}),(0,n.jsx)("button",{type:"button",className:"mt-1 text-[var(--muted-foreground)] opacity-0 transition-opacity hover:text-[var(--destructive)] group-hover:opacity-100",onClick:e=>{e.stopPropagation(),s()},"aria-label":i("editor.deleteNode"),children:(0,n.jsx)(y.A,{className:"h-4 w-4"})})]})}var S=r(17243),A=r(48368),R=r(78916),T=r(56558),E=r(21975),I=r(6962),F=r(68459),K=r(28367),O=r(11105);function B({workflowId:e,nodeId:t}){let{t:r}=(0,N.B)(),s=(0,a.useRef)(null),[i,l]=(0,a.useState)(!1),[o,d]=(0,a.useState)([]),[c,u]=(0,a.useState)(!1),[m,x]=(0,a.useState)(!1),[b,f]=(0,a.useState)(!1),[g,v]=(0,a.useState)(null),[j,w]=(0,a.useState)(null),y=`/api/workflows/${e}/node-items/${t}/attachments`,k=(0,a.useCallback)(async()=>{x(!0);try{let e=await fetch(y);if(!e.ok){let t={};try{t=await e.json()}catch{}h.oR.error((0,O.Y)(t.error,r,"Failed to load attachments"));return}let t=await e.json();d(t.data??[]),u(!0)}finally{x(!1)}},[y,r]);(0,a.useEffect)(()=>{d([]),u(!1),l(!1),w(null)},[t,e]),(0,a.useEffect)(()=>{i&&!c&&k()},[i,c,k]);let _=async e=>{let t=e.target.files?.[0];if(e.target.value="",!t)return;let n=new FormData;n.append("file",t),f(!0);try{let e=await fetch(y,{method:"POST",body:n});if(!e.ok){let t={};try{t=await e.json()}catch{}h.oR.error((0,O.Y)(t.error,r,"Failed to upload attachment"));return}h.oR.success("File uploaded"),l(!0),await k()}finally{f(!1)}},$=async e=>{v(e.id);try{let t,n=await fetch(`${y}/${e.id}`);if(!n.ok){let e={};try{e=await n.json()}catch{}h.oR.error((0,O.Y)(e.error,r,"Failed to download attachment"));return}if((n.headers.get("content-type")??"").includes("application/json")){let r=await n.json(),a=r.data?.content??"";t=new Blob([a],{type:r.data?.mime_type??e.mime_type})}else t=await n.blob();let a=window.URL.createObjectURL(t),s=document.createElement("a");s.href=a,s.download=e.filename,document.body.appendChild(s),s.click(),s.remove(),window.URL.revokeObjectURL(a)}finally{v(null)}},C=async()=>{if(!j)return;let e=await fetch(`${y}/${j.id}`,{method:"DELETE"});if(!e.ok){let t={};try{t=await e.json()}catch{}h.oR.error((0,O.Y)(t.error,r,"Failed to delete attachment")),w(null);return}w(null),h.oR.success("File deleted"),await k()};return(0,n.jsxs)("div",{className:"rounded-xl border border-[var(--border)] bg-[var(--card)]",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between gap-3 px-4 py-3",children:[(0,n.jsxs)("button",{type:"button",className:"flex min-w-0 flex-1 items-center gap-2 text-left",onClick:()=>l(e=>!e),children:[(0,n.jsx)(T.A,{className:"h-4 w-4 text-[var(--muted-foreground)]"}),(0,n.jsx)("span",{className:"text-sm font-medium",children:r("editor.attachments")}),o.length>0&&(0,n.jsx)("span",{className:"rounded-full bg-brand-blue-100 px-2 py-0.5 text-xs font-medium text-brand-blue-700",children:o.length})]}),(0,n.jsxs)(p.$,{type:"button",size:"sm",variant:"outline",onClick:()=>{s.current?.click()},disabled:b,children:[(0,n.jsx)(E.A,{className:"h-4 w-4"}),b?r("common.loading"):r("editor.uploadFile")]}),(0,n.jsx)("input",{ref:s,type:"file",className:"hidden",onChange:_})]}),i&&(0,n.jsx)("div",{className:"border-t border-[var(--border)] px-4 py-3",children:m?(0,n.jsx)("p",{className:"text-sm text-[var(--muted-foreground)]",children:r("common.loading")}):0===o.length?(0,n.jsx)("p",{className:"text-sm text-[var(--muted-foreground)]",children:"-"}):(0,n.jsx)("div",{className:"space-y-2",children:o.map(e=>{var t,a;let s=(t=e.mime_type).startsWith("image/")?S.A:t.startsWith("text/")||t.includes("json")||t.includes("xml")||t.includes("yaml")||t.includes("javascript")||t.includes("typescript")?A.A:R.A,i=g===e.id;return(0,n.jsxs)("div",{className:"flex items-center gap-3 rounded-lg border border-[var(--border)] px-3 py-2",children:[(0,n.jsx)("div",{className:"rounded-full bg-surface-soft p-2 text-[var(--muted-foreground)]",children:(0,n.jsx)(s,{className:"h-4 w-4"})}),(0,n.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,n.jsx)("p",{className:"truncate text-sm font-medium",children:e.filename}),(0,n.jsxs)("p",{className:"truncate text-xs text-[var(--muted-foreground)]",children:[(a=e.size_bytes)<1024?`${a} B`:a<1048576?`${(a/1024).toFixed(1)} KB`:`${(a/1024/1024).toFixed(1)} MB`," \xb7"," ",e.mime_type]})]}),(0,n.jsxs)("div",{className:"flex items-center gap-1",children:[(0,n.jsx)(p.$,{type:"button",size:"icon-sm",variant:"ghost","aria-label":"Download",title:"Download",disabled:i,onClick:()=>void $(e),children:(0,n.jsx)(I.A,{className:"h-4 w-4"})}),(0,n.jsx)(p.$,{type:"button",size:"icon-sm",variant:"ghost","aria-label":r("common.delete"),onClick:()=>w(e),children:(0,n.jsx)(F.A,{className:"h-4 w-4 text-[var(--destructive)]"})})]})]},e.id)})})}),(0,n.jsx)(K.o,{target:j,title:r("common.delete"),description:j?`Delete "${j.filename}"?`:r("common.confirm"),onCancel:()=>w(null),onConfirm:()=>void C()})]})}let D={action:"bg-brand-blue-600 text-white",gate:"bg-kiwi-600 text-white",loop:"bg-[var(--muted-foreground)] text-white"},L={action:"bg-brand-blue-600",gate:"bg-kiwi-600",loop:"bg-[var(--muted-foreground)]"};function z({nodes:e,onAddClick:t}){let{t:r}=(0,N.B)(),a=e.filter(e=>"action"===e.node_type).length,s=e.filter(e=>"gate"===e.node_type).length,i=e.filter(e=>"loop"===e.node_type).length;return(0,n.jsxs)("div",{className:"mb-6 rounded-lg border bg-[var(--card)] p-4",children:[(0,n.jsxs)("div",{className:"flex items-center gap-0 overflow-x-auto pb-2",children:[e.map((t,r)=>(0,n.jsxs)("div",{className:"flex items-center",children:[r>0&&(0,n.jsx)("div",{className:`h-0.5 w-6 shrink-0 ${L[e[r-1].node_type]}`}),(0,n.jsx)("div",{className:`flex h-7 w-7 shrink-0 items-center justify-center rounded-full text-xs font-bold ${D[t.node_type]}`,title:`${r+1}. ${t.title||t.node_type}`,children:r+1})]},t.key)),e.length>0&&(0,n.jsx)("div",{className:"h-0.5 w-6 shrink-0 border-t-2 border-dashed border-[var(--muted-foreground)]"}),(0,n.jsx)("button",{type:"button",onClick:t,className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-full border-2 border-dashed border-[var(--muted-foreground)] text-[var(--muted-foreground)] transition-colors hover:border-brand-blue-600 hover:text-brand-blue-600","aria-label":r("editor.addNode"),children:(0,n.jsx)(o.A,{className:"h-3.5 w-3.5"})})]}),(0,n.jsxs)("p",{className:"mt-2 text-xs text-[var(--muted-foreground)]",children:[e.length," steps",a>0&&` \xb7 action(${a})`,s>0&&` \xb7 gate(${s})`,i>0&&` \xb7 loop(${i})`]})]})}var P=r(13146);let W=[{value:"action",labelKey:"editor.action",descKey:"editor.actionDesc",Icon:u.A},{value:"gate",labelKey:"editor.gate",descKey:"editor.gateDesc",Icon:d.A},{value:"loop",labelKey:"editor.loop",descKey:"editor.loopDesc",Icon:c.A}];function q({open:e,onOpenChange:t,onSelect:r}){let{t:s}=(0,N.B)(),[i,l]=(0,a.useState)([]),[o,d]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{if(!e)return;let t=!1;return async function(){d(!0);let e=await fetch("/api/instructions"),r=await e.json();t||(l(r.data??[]),d(!1))}(),()=>{t=!0}},[e]),(0,n.jsxs)(P.Gj,{open:e,onOpenChange:t,title:s("editor.pickerTitle"),description:s("editor.pickerDesc"),children:[(0,n.jsx)(P.G7,{placeholder:s("editor.searchPlaceholder")}),(0,n.jsxs)(P.oI,{children:[(0,n.jsx)(P.xL,{children:s("common.noResults")}),(0,n.jsx)(P.L$,{heading:s("editor.nodeTypes"),children:W.map(e=>(0,n.jsxs)(P.h_,{onSelect:()=>{r({node_type:e.value}),t(!1)},children:[(0,n.jsx)(e.Icon,{className:"h-4 w-4"}),(0,n.jsxs)("div",{className:"flex flex-col",children:[(0,n.jsx)("span",{className:"font-medium",children:s(e.labelKey)}),(0,n.jsx)("span",{className:"text-xs text-[var(--muted-foreground)]",children:s(e.descKey)})]})]},e.value))}),!o&&i.length>0&&(0,n.jsx)(P.L$,{heading:s("editor.savedTemplates"),children:i.map(e=>(0,n.jsxs)(P.h_,{onSelect:()=>{r({node_type:"action",instruction_id:e.id,title:e.title,instruction:e.content}),t(!1)},children:[(0,n.jsx)(A.A,{className:"h-4 w-4"}),(0,n.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col",children:[(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)("span",{className:"truncate font-medium",children:e.title}),(0,n.jsx)(b.E,{className:"border-brand-blue-600/20 bg-brand-blue-100 text-brand-blue-700",variant:"outline",children:s("editor.action")})]}),(0,n.jsx)("span",{className:"truncate text-xs text-[var(--muted-foreground)]",children:e.content.length>60?e.content.slice(0,60)+"...":e.content})]})]},e.id))})]})]})}function U({open:e,onOpenChange:t,instructions:r,onSelect:a,onCreateNew:s}){let{t:i}=(0,N.B)();return(0,n.jsxs)(P.Gj,{open:e,onOpenChange:t,children:[(0,n.jsx)(P.G7,{placeholder:i("editor.searchInstruction")}),(0,n.jsxs)(P.oI,{children:[(0,n.jsx)(P.xL,{children:i("common.noResults")}),(0,n.jsx)(P.L$,{heading:i("editor.savedTemplates"),children:r.map(e=>(0,n.jsxs)(P.h_,{onSelect:()=>{a(e.id),t(!1)},children:[(0,n.jsx)(A.A,{className:"mr-2 h-4 w-4 shrink-0 text-brand-blue-600"}),(0,n.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,n.jsxs)("p",{className:"truncate text-sm font-medium",children:["#",e.id," ",e.title]}),(0,n.jsx)("p",{className:"truncate text-xs text-muted-foreground",children:e.content.slice(0,80)})]})]},e.id))}),(0,n.jsx)(P.L$,{heading:i("common.create"),children:(0,n.jsxs)(P.h_,{onSelect:()=>{s(),t(!1)},children:[(0,n.jsx)(o.A,{className:"mr-2 h-4 w-4 text-brand-blue-600"}),(0,n.jsx)("span",{className:"text-sm font-medium",children:i("editor.createNewInstruction")})]})})]})]})}let G={action:{icon:u.A,label:"Action",border:"border-brand-blue-600",badge:"border-brand-blue-600/20 bg-brand-blue-100 text-brand-blue-700",bg:"bg-brand-blue-100",color:"text-brand-blue-700"},gate:{icon:d.A,label:"Gate",border:"border-kiwi-600",badge:"border-kiwi-600/30 bg-kiwi-100 text-kiwi-700",bg:"bg-kiwi-100",color:"text-kiwi-700"},loop:{icon:c.A,label:"Loop",border:"border-border",badge:"border-border bg-muted text-muted-foreground",bg:"bg-muted",color:"text-muted-foreground"}},M=[{value:"action",labelKey:"editor.action",descKey:"editor.actionDesc"},{value:"gate",labelKey:"editor.gate",descKey:"editor.gateDesc"},{value:"loop",labelKey:"editor.loop",descKey:"editor.loopDesc"}];function J(){return crypto.randomUUID().slice(0,8)}function V({workflowId:e,folderId:t,canEdit:r=!0}){let j=(0,s.useRouter)(),w=(0,s.useSearchParams)(),{t:y}=(0,N.B)(),k=t??(w.get("folder_id")?Number(w.get("folder_id")):null),_=!r,[$,S]=(0,a.useState)(""),[A,R]=(0,a.useState)(""),[T,E]=(0,a.useState)([]),[I,F]=(0,a.useState)(null),[K,O]=(0,a.useState)([]),[D,L]=(0,a.useState)([]),[P,W]=(0,a.useState)(!1),[Z,Y]=(0,a.useState)(!0),[H,Q]=(0,a.useState)(""),[X,ee]=(0,a.useState)(!1),[et,er]=(0,a.useState)(null),[en,ea]=(0,a.useState)(null),[es,ei]=(0,a.useState)(""),[el,eo]=(0,a.useState)(""),[ed,ec]=(0,a.useState)(!1),eu=(0,a.useMemo)(()=>new Map(K.map(e=>[e.id,e])),[K]),em=(0,i.FR)((0,i.MS)(i.AN,{activationConstraint:{distance:5}}),(0,i.MS)(i.uN,{coordinateGetter:l.JR}));(0,a.useEffect)(()=>{fetch("/api/instructions").then(e=>e.json()).then(e=>O(e.data??[])),fetch("/api/credentials").then(e=>e.json()).then(e=>L(e.data??[]))},[]),(0,a.useEffect)(()=>{if(!e)return;let t=!1;return async function(){let r=await fetch(`/api/workflows/${e}`);if(!r.ok)return;let n=(await r.json()).data;t||(S(n.title),R(n.description),Y(!!n.is_active),Q(String(n.version??"")),E(n.nodes.map(e=>({key:J(),dbNodeId:e.id,title:e.title,node_type:e.node_type,source:e.instruction_id?"reference":"inline",instruction:e.instruction,instruction_id:e.instruction_id,credential_id:e.credential_id,credential_requirement:e.credential_requirement_parsed??null,loop_back_to:e.loop_back_to,hitl:e.hitl??!1,visual_selection:e.visual_selection??!1}))))}(),()=>{t=!0}},[e]);let ex=(e,t)=>{E(T.map((r,n)=>n===e?{...r,...t}:r))},eh=async e=>{if(!es.trim())return;ec(!0);let t=await fetch("/api/instructions",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({title:es.trim(),content:el.trim()})});if(t.ok){let r=(await t.json()).data;O(e=>[...e,r]),ex(e,{instruction_id:r.id}),ea(null),ei(""),eo("")}ec(!1)},eb=()=>({title:$,description:A,...k?{folder_id:k}:{},nodes:T.map(e=>({title:e.title,node_type:e.node_type,instruction:"inline"===e.source?e.instruction:"",instruction_id:"reference"===e.source?e.instruction_id:null,credential_id:e.credential_id,credential_requirement:e.credential_requirement,loop_back_to:"loop"===e.node_type?e.loop_back_to:null,hitl:e.hitl,visual_selection:"gate"===e.node_type&&e.visual_selection}))}),ep=async()=>{if($.trim()){W(!0);try{if(!(await fetch("/api/workflows",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(eb())})).ok)return void h.oR.error(y("workflows.publishFailed"));h.oR.success(y("workflows.saved")),j.push(k?`/workflows?folder_id=${k}`:"/workflows")}finally{W(!1)}}},ef=async()=>{if(e&&$.trim()){W(!0);try{if(!(await fetch(`/api/workflows/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(eb())})).ok)return void h.oR.error(y("workflows.publishFailed"));h.oR.success(y("workflows.saved")),j.push(`/workflows/${e}`)}finally{W(!1)}}},eg=async()=>{if(e&&$.trim()){W(!0);try{let t=await fetch(`/api/workflows/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({...eb(),create_new_version:!0})});if(!t.ok)return void h.oR.error(y("workflows.publishFailed"));let r=await t.json(),n=r?.data?.id,a=r?.data?.version;h.oR.success(y("workflows.publishedVersion",{version:a??""})),j.push("number"==typeof n?`/workflows/${n}`:"/workflows")}finally{W(!1)}}},ev=async()=>{e&&((await fetch(`/api/workflows/${e}/activate`,{method:"POST"})).ok?(h.oR.success(y("workflows.activated")),Y(!0)):h.oR.error(y("workflows.activateFailed")))};return(0,n.jsxs)("main",{className:"mx-auto max-w-5xl px-4 py-10",children:[(0,n.jsx)("h1",{className:"mb-6 text-2xl font-bold tracking-tight",children:e?y("editor.editWorkflow"):y("editor.newWorkflow")}),_&&(0,n.jsx)("div",{className:"mb-6 rounded border border-yellow-500/40 bg-yellow-500/10 px-4 py-3 text-sm text-yellow-900 dark:text-yellow-200",children:y("ownership.readOnlyPreview")}),(0,n.jsxs)(f.Zp,{className:"mb-8",children:[(0,n.jsx)(f.aR,{className:"p-5 pb-0",children:(0,n.jsx)(f.ZB,{className:"text-sm",children:y("editor.basicInfo")})}),(0,n.jsx)(f.Wu,{className:"p-5",children:(0,n.jsxs)("div",{className:"grid gap-4",children:[(0,n.jsx)(g.p,{placeholder:y("editor.workflowTitlePlaceholder"),value:$,onChange:e=>S(e.target.value),className:"text-base font-medium",required:!0}),(0,n.jsx)(g.p,{placeholder:y("editor.descriptionPlaceholder"),value:A,onChange:e=>R(e.target.value)})]})})]}),T.length>0&&(0,n.jsx)(z,{nodes:T,onAddClick:()=>ee(!0)}),(0,n.jsxs)("div",{className:"mb-4 flex items-center justify-between",children:[(0,n.jsxs)("h2",{className:"text-lg font-semibold",children:[y("editor.nodes")," (",T.length,")"]}),(0,n.jsxs)(p.$,{onClick:()=>ee(!0),size:"sm",children:[(0,n.jsx)(o.A,{className:"h-4 w-4"}),y("editor.addNode")]})]}),0===T.length?(0,n.jsx)(f.Zp,{className:"border-dashed shadow-none",children:(0,n.jsxs)(f.Wu,{className:"py-12 text-center",children:[(0,n.jsx)("p",{className:"mb-4 text-sm text-[var(--muted-foreground)]",children:y("editor.noNodes")}),(0,n.jsxs)(p.$,{onClick:()=>ee(!0),size:"sm",children:[(0,n.jsx)(o.A,{className:"h-4 w-4"}),y("editor.addFirstNode")]})]})}):(0,n.jsx)(i.Mp,{sensors:em,collisionDetection:i.fp,onDragEnd:e=>{let{active:t,over:r}=e;r&&t.id!==r.id&&(E(e=>{let n=e.findIndex(e=>e.key===t.id),a=e.findIndex(e=>e.key===r.id);return(0,l.be)(e,n,a)}),F(null))},children:(0,n.jsx)(l.gB,{items:T.map(e=>e.key),strategy:l._G,children:(0,n.jsx)("div",{className:"space-y-2",children:T.map((t,r)=>(0,n.jsxs)("div",{children:[(0,n.jsx)(C,{node:t,index:r,isExpanded:I===r,onClick:()=>F(I===r?null:r),onRemove:()=>{E(T.filter((e,t)=>t!==r)),I===r&&F(null)}}),I===r&&(0,n.jsx)(f.Zp,{className:`mt-1 ml-6 border-2 ${G[t.node_type]?.border??"border-border"}`,children:(0,n.jsx)(f.Wu,{className:"p-5",children:(0,n.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,n.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,n.jsx)(g.p,{placeholder:y("editor.nodeTitle"),value:t.title,onChange:e=>ex(r,{title:e.target.value}),className:"h-9 min-w-[220px] flex-1"}),"action"===t.node_type&&(0,n.jsxs)("label",{className:"flex cursor-pointer select-none items-center gap-1.5 text-sm",children:[(0,n.jsx)("input",{type:"checkbox",checked:t.hitl,onChange:e=>ex(r,{hitl:e.target.checked}),className:"h-4 w-4 accent-brand-blue-600"}),(0,n.jsx)("span",{children:"HITL"})]}),"gate"===t.node_type&&(0,n.jsxs)("label",{className:"flex cursor-pointer select-none items-center gap-1.5 text-sm",children:[(0,n.jsx)("input",{type:"checkbox",checked:t.visual_selection,onChange:e=>ex(r,{visual_selection:e.target.checked}),className:"h-4 w-4 accent-amber-500"}),(0,n.jsx)("span",{children:"Visual"})]}),(0,n.jsxs)("select",{value:t.credential_id??"",onChange:e=>ex(r,{credential_id:e.target.value?Number(e.target.value):null}),className:"h-9 w-48 rounded-[var(--radius)] border border-[var(--border)] bg-[var(--card)] px-2 text-sm",title:y("editor.credentialTitle"),children:[(0,n.jsx)("option",{value:"",children:y("editor.noCredential")}),D.map(e=>(0,n.jsx)("option",{value:e.id,children:e.service_name},e.id))]})]}),(0,n.jsxs)("div",{className:"grid gap-3",children:[(0,n.jsx)("div",{className:"flex flex-wrap gap-2",children:M.map(e=>{let a="gate"===e.value?d.A:"loop"===e.value?c.A:u.A,s=t.node_type===e.value,i=G[e.value]?.badge??"";return(0,n.jsxs)(p.$,{type:"button",variant:"outline",size:"sm",onClick:()=>ex(r,{node_type:e.value}),className:s?i:void 0,title:y(e.descKey),children:[(0,n.jsx)(a,{className:"h-4 w-4"}),y(e.labelKey)]},e.value)})}),(0,n.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,n.jsx)(p.$,{type:"button",variant:"outline",size:"sm",onClick:()=>ex(r,{source:"inline",instruction_id:null}),className:"inline"===t.source?"border-brand-blue-600 bg-brand-blue-100 text-brand-blue-700":void 0,children:y("editor.inlineWrite")}),(0,n.jsx)(p.$,{type:"button",variant:"outline",size:"sm",onClick:()=>ex(r,{source:"reference"}),className:"reference"===t.source?"border-brand-blue-600 bg-brand-blue-100 text-brand-blue-700":void 0,children:y("editor.referenceInstruction")})]}),"inline"===t.source?(0,n.jsx)(v.T,{placeholder:y("editor.instructionPlaceholder"),value:t.instruction,onChange:e=>ex(r,{instruction:e.target.value}),rows:4,className:"font-mono"}):(0,n.jsxs)("div",{className:"grid gap-2",children:[(0,n.jsx)(p.$,{variant:"outline",size:"sm",className:"w-full justify-start text-left font-normal",onClick:()=>er(r),children:t.instruction_id?`#${t.instruction_id} ${eu.get(t.instruction_id)?.title??""}`:y("editor.selectInstruction")}),(0,n.jsx)(U,{open:et===r,onOpenChange:e=>{e||er(null)},instructions:K,onSelect:e=>{ea(null),ex(r,{instruction_id:e})},onCreateNew:()=>{ea(r),ei(""),eo("")}}),en===r&&(0,n.jsx)(f.Zp,{className:"border-brand-blue-600 shadow-none",children:(0,n.jsxs)(f.Wu,{className:"grid gap-3 p-4",children:[(0,n.jsx)(g.p,{placeholder:y("editor.instructionTitle"),value:es,onChange:e=>ei(e.target.value)}),(0,n.jsx)(v.T,{placeholder:y("editor.instructionContent"),value:el,onChange:e=>eo(e.target.value),rows:4,className:"font-mono"}),(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)(p.$,{size:"sm",onClick:()=>eh(r),disabled:!es.trim()||ed,children:ed?y("editor.saving"):y("common.create")}),(0,n.jsx)(p.$,{size:"sm",variant:"secondary",type:"button",onClick:()=>ea(null),children:y("common.cancel")})]})]})})]}),"loop"===t.node_type&&(0,n.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,n.jsx)("span",{className:"text-xs text-[var(--muted-foreground)]",children:y("editor.loopBackTo")}),(0,n.jsxs)("select",{value:t.loop_back_to??"",onChange:e=>ex(r,{loop_back_to:e.target.value?Number(e.target.value):null}),className:"h-9 w-56 rounded-[var(--radius)] border border-[var(--border)] bg-[var(--card)] px-2 text-sm",children:[(0,n.jsx)("option",{value:"",children:y("editor.selectStep")}),T.map((e,t)=>(0,n.jsx)("option",{value:t+1,children:y("editor.loopStepOption",{step:t+1,title:T[t].title?`: ${T[t].title}`:""})},t))]})]}),e&&t.dbNodeId&&(0,n.jsx)(B,{workflowId:e,nodeId:t.dbNodeId})]})]})})})]},t.key))})})}),(0,n.jsxs)("div",{className:"mt-8 space-y-3",children:[e&&!Z&&(0,n.jsxs)("div",{className:"flex items-start gap-2 rounded-lg border border-[var(--border)] bg-surface-soft p-3 text-xs text-[var(--muted-foreground)]",children:[(0,n.jsx)(m.A,{className:"mt-0.5 h-4 w-4 shrink-0 text-amber-500"}),(0,n.jsxs)("div",{className:"space-y-1",children:[(0,n.jsxs)("p",{className:"font-medium text-foreground",children:[y("workflows.inactiveBadge")," \xb7 v",H]}),(0,n.jsx)("p",{children:y("workflows.inactiveEditWarning")})]})]}),(0,n.jsxs)("div",{className:"flex flex-wrap gap-3",children:[!e&&(0,n.jsx)(p.$,{type:"button",onClick:ep,disabled:!$.trim()||P||_,title:_?y("ownership.cantEdit"):void 0,children:P?y("editor.saving"):y("common.create")}),e&&Z&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(p.$,{type:"button",onClick:eg,disabled:!$.trim()||P||_,title:_?y("ownership.cantEdit"):void 0,children:[(0,n.jsx)(x.A,{className:"mr-2 h-4 w-4"}),P?y("editor.saving"):y("workflows.publishNewVersion")]}),(0,n.jsxs)(b.E,{variant:"outline",className:"inline-flex items-center self-center text-[11px]",children:[y("workflows.activeBadge")," \xb7 v",H]})]}),e&&!Z&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(p.$,{type:"button",onClick:ef,disabled:!$.trim()||P||_,title:_?y("ownership.cantEdit"):void 0,children:P?y("editor.saving"):y("common.save")}),(0,n.jsx)(p.$,{type:"button",variant:"secondary",onClick:ev,disabled:P||_,title:_?y("ownership.cantEdit"):void 0,children:y("workflows.activate")})]}),(0,n.jsx)(p.$,{type:"button",onClick:()=>j.push(e?`/workflows/${e}`:"/workflows"),variant:"secondary",children:y("editor.cancel")})]})]}),(0,n.jsx)(q,{open:X,onOpenChange:ee,onSelect:e=>{var t;t={node_type:e.node_type,title:e.title??"",instruction:e.instruction??"",instruction_id:e.instruction_id??null,source:e.instruction_id?"reference":"inline"},E([...T,{key:J(),dbNodeId:null,title:"",node_type:"action",source:"inline",instruction:"",instruction_id:null,credential_id:null,credential_requirement:null,loop_back_to:null,hitl:!1,visual_selection:!1,...t}]),F(T.length)}})]})}},45160:(e,t,r)=>{r.d(t,{E:()=>o});var n=r(95155);r(12115);var a=r(18460),s=r(42442),i=r(40980);let l=(0,a.F)("inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-3 py-1 text-xs font-semibold tracking-[0.01em] whitespace-nowrap transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3",{variants:{variant:{default:"border-brand-blue-600/20 bg-brand-blue-100 text-brand-blue-700",accent:"border-brand-kiwi-600/30 bg-brand-kiwi-100 text-brand-kiwi-700",neutral:"border-border bg-brand-surface-soft text-brand-ink-700",success:"border-success/20 bg-success/10 text-success",warning:"border-warning/20 bg-warning/10 text-warning",danger:"border-danger/20 bg-danger/10 text-danger",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40 [a&]:hover:bg-destructive/90",outline:"border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",ghost:"border-transparent [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",link:"border-transparent text-primary underline-offset-4 [a&]:hover:underline"}},defaultVariants:{variant:"default"}});function o({className:e,variant:t,asChild:r=!1,...a}){let d=r?s.bL:"span";return(0,n.jsx)(d,{"data-slot":"badge","data-variant":t,className:(0,i.cn)(l({variant:t}),e),...a})}}}]);
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9243],{9243:(e,t,r)=>{r.d(t,{default:()=>V});var n=r(95155),a=r(12115),s=r(73321),i=r(44923),l=r(87256),o=r(51914),d=r(96035),c=r(5121),u=r(53961),m=r(41585),x=r(65266),h=r(66609),b=r(45160),p=r(89239),f=r(81477),g=r(60529),v=r(18349),j=r(39768),w=r(59883),y=r(33210),N=r(42360);let k={action:u.A,gate:d.A,loop:c.A},_={action:"border-l-[3px] border-l-brand-blue-600",gate:"border-l-[3px] border-l-kiwi-600",loop:"border-l-[3px] border-l-[var(--muted-foreground)]"},$={action:"border-brand-blue-600/20 bg-brand-blue-100 text-brand-blue-700",gate:"border-kiwi-600/30 bg-kiwi-100 text-kiwi-700",loop:"border-[var(--border)] bg-transparent text-[var(--muted-foreground)]"};function C({node:e,index:t,isExpanded:r,onClick:a,onRemove:s}){let{t:i}=(0,N.B)(),{attributes:o,listeners:d,setNodeRef:c,transform:u,transition:x,isDragging:h}=(0,l.gl)({id:e.key}),p={transform:j.Ks.Transform.toString(u),transition:x},f=k[e.node_type],g=e.instruction.length>80?e.instruction.slice(0,80)+"...":e.instruction;return(0,n.jsxs)("div",{ref:c,style:p,className:`group flex items-start gap-2 rounded-lg border bg-[var(--card)] px-3 py-3 ${_[e.node_type]} ${h?"shadow-lg rotate-[1deg] z-10":""} ${r?"ring-2 ring-brand-blue-600/30":""}`,children:[(0,n.jsx)("button",{type:"button",className:"mt-1 cursor-grab touch-none text-[var(--muted-foreground)] hover:text-[var(--foreground)]",...o,...d,children:(0,n.jsx)(w.A,{className:"h-4 w-4"})}),(0,n.jsxs)("button",{type:"button",className:"flex flex-1 flex-col items-start gap-1 text-left",onClick:a,children:[(0,n.jsxs)("div",{className:"flex w-full items-center gap-2",children:[(0,n.jsx)("span",{className:"w-5 text-center font-mono text-xs text-[var(--muted-foreground)]",children:t+1}),(0,n.jsxs)(b.E,{className:$[e.node_type],children:[(0,n.jsx)(f,{className:"h-3.5 w-3.5"}),i(`editor.${e.node_type}`)]}),(0,n.jsx)("span",{className:"truncate text-sm font-medium",children:e.title||i("editor.nodeTitle")}),e.hitl&&(0,n.jsx)(b.E,{variant:"outline",className:"ml-auto border-amber-500 text-amber-700",children:"HITL"}),e.visual_selection&&(0,n.jsx)(b.E,{variant:"outline",className:"border-kiwi-500 text-kiwi-700",children:"Visual"}),e.credential_requirement&&(0,n.jsxs)(b.E,{variant:"outline",className:"border-[var(--destructive)] text-[var(--destructive)]",children:[(0,n.jsx)(m.A,{className:"h-3.5 w-3.5"}),e.credential_requirement.service_name]})]}),g&&!r&&(0,n.jsx)("p",{className:"pl-7 text-xs text-[var(--muted-foreground)] line-clamp-1",children:g})]}),(0,n.jsx)("button",{type:"button",className:"mt-1 text-[var(--muted-foreground)] opacity-0 transition-opacity hover:text-[var(--destructive)] group-hover:opacity-100",onClick:e=>{e.stopPropagation(),s()},"aria-label":i("editor.deleteNode"),children:(0,n.jsx)(y.A,{className:"h-4 w-4"})})]})}var S=r(17243),A=r(48368),R=r(78916),T=r(56558),E=r(21975),I=r(6962),F=r(68459),K=r(28367),O=r(11105);function B({workflowId:e,nodeId:t}){let{t:r}=(0,N.B)(),s=(0,a.useRef)(null),[i,l]=(0,a.useState)(!1),[o,d]=(0,a.useState)([]),[c,u]=(0,a.useState)(!1),[m,x]=(0,a.useState)(!1),[b,f]=(0,a.useState)(!1),[g,v]=(0,a.useState)(null),[j,w]=(0,a.useState)(null),y=`/api/workflows/${e}/node-items/${t}/attachments`,k=(0,a.useCallback)(async()=>{x(!0);try{let e=await fetch(y);if(!e.ok){let t={};try{t=await e.json()}catch{}h.oR.error((0,O.Y)(t.error,r,"Failed to load attachments"));return}let t=await e.json();d(t.data??[]),u(!0)}finally{x(!1)}},[y,r]);(0,a.useEffect)(()=>{d([]),u(!1),l(!1),w(null)},[t,e]),(0,a.useEffect)(()=>{i&&!c&&k()},[i,c,k]);let _=async e=>{let t=e.target.files?.[0];if(e.target.value="",!t)return;let n=new FormData;n.append("file",t),f(!0);try{let e=await fetch(y,{method:"POST",body:n});if(!e.ok){let t={};try{t=await e.json()}catch{}h.oR.error((0,O.Y)(t.error,r,"Failed to upload attachment"));return}h.oR.success("File uploaded"),l(!0),await k()}finally{f(!1)}},$=async e=>{v(e.id);try{let t,n=await fetch(`${y}/${e.id}`);if(!n.ok){let e={};try{e=await n.json()}catch{}h.oR.error((0,O.Y)(e.error,r,"Failed to download attachment"));return}if((n.headers.get("content-type")??"").includes("application/json")){let r=await n.json(),a=r.data?.content??"";t=new Blob([a],{type:r.data?.mime_type??e.mime_type})}else t=await n.blob();let a=window.URL.createObjectURL(t),s=document.createElement("a");s.href=a,s.download=e.filename,document.body.appendChild(s),s.click(),s.remove(),window.URL.revokeObjectURL(a)}finally{v(null)}},C=async()=>{if(!j)return;let e=await fetch(`${y}/${j.id}`,{method:"DELETE"});if(!e.ok){let t={};try{t=await e.json()}catch{}h.oR.error((0,O.Y)(t.error,r,"Failed to delete attachment")),w(null);return}w(null),h.oR.success("File deleted"),await k()};return(0,n.jsxs)("div",{className:"rounded-xl border border-[var(--border)] bg-[var(--card)]",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between gap-3 px-4 py-3",children:[(0,n.jsxs)("button",{type:"button",className:"flex min-w-0 flex-1 items-center gap-2 text-left",onClick:()=>l(e=>!e),children:[(0,n.jsx)(T.A,{className:"h-4 w-4 text-[var(--muted-foreground)]"}),(0,n.jsx)("span",{className:"text-sm font-medium",children:r("editor.attachments")}),o.length>0&&(0,n.jsx)("span",{className:"rounded-full bg-brand-blue-100 px-2 py-0.5 text-xs font-medium text-brand-blue-700",children:o.length})]}),(0,n.jsxs)(p.$,{type:"button",size:"sm",variant:"outline",onClick:()=>{s.current?.click()},disabled:b,children:[(0,n.jsx)(E.A,{className:"h-4 w-4"}),b?r("common.loading"):r("editor.uploadFile")]}),(0,n.jsx)("input",{ref:s,type:"file",className:"hidden",onChange:_})]}),i&&(0,n.jsx)("div",{className:"border-t border-[var(--border)] px-4 py-3",children:m?(0,n.jsx)("p",{className:"text-sm text-[var(--muted-foreground)]",children:r("common.loading")}):0===o.length?(0,n.jsx)("p",{className:"text-sm text-[var(--muted-foreground)]",children:"-"}):(0,n.jsx)("div",{className:"space-y-2",children:o.map(e=>{var t,a;let s=(t=e.mime_type).startsWith("image/")?S.A:t.startsWith("text/")||t.includes("json")||t.includes("xml")||t.includes("yaml")||t.includes("javascript")||t.includes("typescript")?A.A:R.A,i=g===e.id;return(0,n.jsxs)("div",{className:"flex items-center gap-3 rounded-lg border border-[var(--border)] px-3 py-2",children:[(0,n.jsx)("div",{className:"rounded-full bg-surface-soft p-2 text-[var(--muted-foreground)]",children:(0,n.jsx)(s,{className:"h-4 w-4"})}),(0,n.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,n.jsx)("p",{className:"truncate text-sm font-medium",children:e.filename}),(0,n.jsxs)("p",{className:"truncate text-xs text-[var(--muted-foreground)]",children:[(a=e.size_bytes)<1024?`${a} B`:a<1048576?`${(a/1024).toFixed(1)} KB`:`${(a/1024/1024).toFixed(1)} MB`," \xb7"," ",e.mime_type]})]}),(0,n.jsxs)("div",{className:"flex items-center gap-1",children:[(0,n.jsx)(p.$,{type:"button",size:"icon-sm",variant:"ghost","aria-label":"Download",title:"Download",disabled:i,onClick:()=>void $(e),children:(0,n.jsx)(I.A,{className:"h-4 w-4"})}),(0,n.jsx)(p.$,{type:"button",size:"icon-sm",variant:"ghost","aria-label":r("common.delete"),onClick:()=>w(e),children:(0,n.jsx)(F.A,{className:"h-4 w-4 text-[var(--destructive)]"})})]})]},e.id)})})}),(0,n.jsx)(K.o,{target:j,title:r("common.delete"),description:j?`Delete "${j.filename}"?`:r("common.confirm"),onCancel:()=>w(null),onConfirm:()=>void C()})]})}let D={action:"bg-brand-blue-600 text-white",gate:"bg-kiwi-600 text-white",loop:"bg-[var(--muted-foreground)] text-white"},L={action:"bg-brand-blue-600",gate:"bg-kiwi-600",loop:"bg-[var(--muted-foreground)]"};function z({nodes:e,onAddClick:t}){let{t:r}=(0,N.B)(),a=e.filter(e=>"action"===e.node_type).length,s=e.filter(e=>"gate"===e.node_type).length,i=e.filter(e=>"loop"===e.node_type).length;return(0,n.jsxs)("div",{className:"mb-6 rounded-lg border bg-[var(--card)] p-4",children:[(0,n.jsxs)("div",{className:"flex items-center gap-0 overflow-x-auto pb-2",children:[e.map((t,r)=>(0,n.jsxs)("div",{className:"flex items-center",children:[r>0&&(0,n.jsx)("div",{className:`h-0.5 w-6 shrink-0 ${L[e[r-1].node_type]}`}),(0,n.jsx)("div",{className:`flex h-7 w-7 shrink-0 items-center justify-center rounded-full text-xs font-bold ${D[t.node_type]}`,title:`${r+1}. ${t.title||t.node_type}`,children:r+1})]},t.key)),e.length>0&&(0,n.jsx)("div",{className:"h-0.5 w-6 shrink-0 border-t-2 border-dashed border-[var(--muted-foreground)]"}),(0,n.jsx)("button",{type:"button",onClick:t,className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-full border-2 border-dashed border-[var(--muted-foreground)] text-[var(--muted-foreground)] transition-colors hover:border-brand-blue-600 hover:text-brand-blue-600","aria-label":r("editor.addNode"),children:(0,n.jsx)(o.A,{className:"h-3.5 w-3.5"})})]}),(0,n.jsxs)("p",{className:"mt-2 text-xs text-[var(--muted-foreground)]",children:[e.length," steps",a>0&&` \xb7 action(${a})`,s>0&&` \xb7 gate(${s})`,i>0&&` \xb7 loop(${i})`]})]})}var P=r(13146);let W=[{value:"action",labelKey:"editor.action",descKey:"editor.actionDesc",Icon:u.A},{value:"gate",labelKey:"editor.gate",descKey:"editor.gateDesc",Icon:d.A},{value:"loop",labelKey:"editor.loop",descKey:"editor.loopDesc",Icon:c.A}];function q({open:e,onOpenChange:t,onSelect:r}){let{t:s}=(0,N.B)(),[i,l]=(0,a.useState)([]),[o,d]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{if(!e)return;let t=!1;return async function(){d(!0);let e=await fetch("/api/instructions"),r=await e.json();t||(l(r.data??[]),d(!1))}(),()=>{t=!0}},[e]),(0,n.jsxs)(P.Gj,{open:e,onOpenChange:t,title:s("editor.pickerTitle"),description:s("editor.pickerDesc"),children:[(0,n.jsx)(P.G7,{placeholder:s("editor.searchPlaceholder")}),(0,n.jsxs)(P.oI,{children:[(0,n.jsx)(P.xL,{children:s("common.noResults")}),(0,n.jsx)(P.L$,{heading:s("editor.nodeTypes"),children:W.map(e=>(0,n.jsxs)(P.h_,{onSelect:()=>{r({node_type:e.value}),t(!1)},children:[(0,n.jsx)(e.Icon,{className:"h-4 w-4"}),(0,n.jsxs)("div",{className:"flex flex-col",children:[(0,n.jsx)("span",{className:"font-medium",children:s(e.labelKey)}),(0,n.jsx)("span",{className:"text-xs text-[var(--muted-foreground)]",children:s(e.descKey)})]})]},e.value))}),!o&&i.length>0&&(0,n.jsx)(P.L$,{heading:s("editor.savedTemplates"),children:i.map(e=>(0,n.jsxs)(P.h_,{onSelect:()=>{r({node_type:"action",instruction_id:e.id,title:e.title,instruction:e.content}),t(!1)},children:[(0,n.jsx)(A.A,{className:"h-4 w-4"}),(0,n.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col",children:[(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)("span",{className:"truncate font-medium",children:e.title}),(0,n.jsx)(b.E,{className:"border-brand-blue-600/20 bg-brand-blue-100 text-brand-blue-700",variant:"outline",children:s("editor.action")})]}),(0,n.jsx)("span",{className:"truncate text-xs text-[var(--muted-foreground)]",children:e.content.length>60?e.content.slice(0,60)+"...":e.content})]})]},e.id))})]})]})}function U({open:e,onOpenChange:t,instructions:r,onSelect:a,onCreateNew:s}){let{t:i}=(0,N.B)();return(0,n.jsxs)(P.Gj,{open:e,onOpenChange:t,children:[(0,n.jsx)(P.G7,{placeholder:i("editor.searchInstruction")}),(0,n.jsxs)(P.oI,{children:[(0,n.jsx)(P.xL,{children:i("common.noResults")}),(0,n.jsx)(P.L$,{heading:i("editor.savedTemplates"),children:r.map(e=>(0,n.jsxs)(P.h_,{onSelect:()=>{a(e.id),t(!1)},children:[(0,n.jsx)(A.A,{className:"mr-2 h-4 w-4 shrink-0 text-brand-blue-600"}),(0,n.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,n.jsxs)("p",{className:"truncate text-sm font-medium",children:["#",e.id," ",e.title]}),(0,n.jsx)("p",{className:"truncate text-xs text-muted-foreground",children:e.content.slice(0,80)})]})]},e.id))}),(0,n.jsx)(P.L$,{heading:i("common.create"),children:(0,n.jsxs)(P.h_,{onSelect:()=>{s(),t(!1)},children:[(0,n.jsx)(o.A,{className:"mr-2 h-4 w-4 text-brand-blue-600"}),(0,n.jsx)("span",{className:"text-sm font-medium",children:i("editor.createNewInstruction")})]})})]})]})}let G={action:{icon:u.A,label:"Action",border:"border-brand-blue-600",badge:"border-brand-blue-600/20 bg-brand-blue-100 text-brand-blue-700",bg:"bg-brand-blue-100",color:"text-brand-blue-700"},gate:{icon:d.A,label:"Gate",border:"border-kiwi-600",badge:"border-kiwi-600/30 bg-kiwi-100 text-kiwi-700",bg:"bg-kiwi-100",color:"text-kiwi-700"},loop:{icon:c.A,label:"Loop",border:"border-border",badge:"border-border bg-muted text-muted-foreground",bg:"bg-muted",color:"text-muted-foreground"}},M=[{value:"action",labelKey:"editor.action",descKey:"editor.actionDesc"},{value:"gate",labelKey:"editor.gate",descKey:"editor.gateDesc"},{value:"loop",labelKey:"editor.loop",descKey:"editor.loopDesc"}];function J(){return crypto.randomUUID().slice(0,8)}function V({workflowId:e,folderId:t,canEdit:r=!0}){let j=(0,s.useRouter)(),w=(0,s.useSearchParams)(),{t:y}=(0,N.B)(),k=t??(w.get("folder_id")?Number(w.get("folder_id")):null),_=!r,[$,S]=(0,a.useState)(""),[A,R]=(0,a.useState)(""),[T,E]=(0,a.useState)([]),[I,F]=(0,a.useState)(null),[K,O]=(0,a.useState)([]),[D,L]=(0,a.useState)([]),[P,W]=(0,a.useState)(!1),[Z,Y]=(0,a.useState)(!0),[H,Q]=(0,a.useState)(""),[X,ee]=(0,a.useState)(!1),[et,er]=(0,a.useState)(null),[en,ea]=(0,a.useState)(null),[es,ei]=(0,a.useState)(""),[el,eo]=(0,a.useState)(""),[ed,ec]=(0,a.useState)(!1),eu=(0,a.useMemo)(()=>new Map(K.map(e=>[e.id,e])),[K]),em=(0,i.FR)((0,i.MS)(i.AN,{activationConstraint:{distance:5}}),(0,i.MS)(i.uN,{coordinateGetter:l.JR}));(0,a.useEffect)(()=>{fetch("/api/instructions").then(e=>e.json()).then(e=>O(e.data??[])),fetch("/api/credentials").then(e=>e.json()).then(e=>L(e.data??[]))},[]),(0,a.useEffect)(()=>{if(!e)return;let t=!1;return async function(){let r=await fetch(`/api/workflows/${e}`);if(!r.ok)return;let n=(await r.json()).data;t||(S(n.title),R(n.description),Y(!!n.is_active),Q(String(n.version??"")),E(n.nodes.map(e=>({key:J(),dbNodeId:e.id,title:e.title,node_type:e.node_type,source:e.instruction_id?"reference":"inline",instruction:e.instruction,instruction_id:e.instruction_id,credential_id:e.credential_id,credential_requirement:e.credential_requirement_parsed??null,loop_back_to:e.loop_back_to,hitl:e.hitl??!1,visual_selection:e.visual_selection??!1}))))}(),()=>{t=!0}},[e]);let ex=(e,t)=>{E(T.map((r,n)=>n===e?{...r,...t}:r))},eh=async e=>{if(!es.trim())return;ec(!0);let t=await fetch("/api/instructions",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({title:es.trim(),content:el.trim()})});if(t.ok){let r=(await t.json()).data;O(e=>[...e,r]),ex(e,{instruction_id:r.id}),ea(null),ei(""),eo("")}ec(!1)},eb=()=>({title:$,description:A,...k?{folder_id:k}:{},nodes:T.map(e=>({...null!==e.dbNodeId?{id:e.dbNodeId}:{},title:e.title,node_type:e.node_type,instruction:"inline"===e.source?e.instruction:"",instruction_id:"reference"===e.source?e.instruction_id:null,credential_id:e.credential_id,credential_requirement:e.credential_requirement,loop_back_to:"loop"===e.node_type?e.loop_back_to:null,hitl:e.hitl,visual_selection:"gate"===e.node_type&&e.visual_selection}))}),ep=async()=>{if($.trim()){W(!0);try{if(!(await fetch("/api/workflows",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(eb())})).ok)return void h.oR.error(y("workflows.publishFailed"));h.oR.success(y("workflows.saved")),j.push(k?`/workflows?folder_id=${k}`:"/workflows")}finally{W(!1)}}},ef=async()=>{if(e&&$.trim()){W(!0);try{let t=await fetch(`/api/workflows/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(eb())});if(!t.ok){let e=await t.json().catch(()=>null);409===t.status&&e?.error?.message?h.oR.error(e.error.message):h.oR.error(y("workflows.publishFailed"));return}h.oR.success(y("workflows.saved")),j.push(`/workflows/${e}`)}finally{W(!1)}}},eg=async()=>{if(e&&$.trim()){W(!0);try{let t=await fetch(`/api/workflows/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({...eb(),create_new_version:!0})});if(!t.ok)return void h.oR.error(y("workflows.publishFailed"));let r=await t.json(),n=r?.data?.id,a=r?.data?.version;h.oR.success(y("workflows.publishedVersion",{version:a??""})),j.push("number"==typeof n?`/workflows/${n}`:"/workflows")}finally{W(!1)}}},ev=async()=>{e&&((await fetch(`/api/workflows/${e}/activate`,{method:"POST"})).ok?(h.oR.success(y("workflows.activated")),Y(!0)):h.oR.error(y("workflows.activateFailed")))};return(0,n.jsxs)("main",{className:"mx-auto max-w-5xl px-4 py-10",children:[(0,n.jsx)("h1",{className:"mb-6 text-2xl font-bold tracking-tight",children:e?y("editor.editWorkflow"):y("editor.newWorkflow")}),_&&(0,n.jsx)("div",{className:"mb-6 rounded border border-yellow-500/40 bg-yellow-500/10 px-4 py-3 text-sm text-yellow-900 dark:text-yellow-200",children:y("ownership.readOnlyPreview")}),(0,n.jsxs)(f.Zp,{className:"mb-8",children:[(0,n.jsx)(f.aR,{className:"p-5 pb-0",children:(0,n.jsx)(f.ZB,{className:"text-sm",children:y("editor.basicInfo")})}),(0,n.jsx)(f.Wu,{className:"p-5",children:(0,n.jsxs)("div",{className:"grid gap-4",children:[(0,n.jsx)(g.p,{placeholder:y("editor.workflowTitlePlaceholder"),value:$,onChange:e=>S(e.target.value),className:"text-base font-medium",required:!0}),(0,n.jsx)(g.p,{placeholder:y("editor.descriptionPlaceholder"),value:A,onChange:e=>R(e.target.value)})]})})]}),T.length>0&&(0,n.jsx)(z,{nodes:T,onAddClick:()=>ee(!0)}),(0,n.jsxs)("div",{className:"mb-4 flex items-center justify-between",children:[(0,n.jsxs)("h2",{className:"text-lg font-semibold",children:[y("editor.nodes")," (",T.length,")"]}),(0,n.jsxs)(p.$,{onClick:()=>ee(!0),size:"sm",children:[(0,n.jsx)(o.A,{className:"h-4 w-4"}),y("editor.addNode")]})]}),0===T.length?(0,n.jsx)(f.Zp,{className:"border-dashed shadow-none",children:(0,n.jsxs)(f.Wu,{className:"py-12 text-center",children:[(0,n.jsx)("p",{className:"mb-4 text-sm text-[var(--muted-foreground)]",children:y("editor.noNodes")}),(0,n.jsxs)(p.$,{onClick:()=>ee(!0),size:"sm",children:[(0,n.jsx)(o.A,{className:"h-4 w-4"}),y("editor.addFirstNode")]})]})}):(0,n.jsx)(i.Mp,{sensors:em,collisionDetection:i.fp,onDragEnd:e=>{let{active:t,over:r}=e;r&&t.id!==r.id&&(E(e=>{let n=e.findIndex(e=>e.key===t.id),a=e.findIndex(e=>e.key===r.id);return(0,l.be)(e,n,a)}),F(null))},children:(0,n.jsx)(l.gB,{items:T.map(e=>e.key),strategy:l._G,children:(0,n.jsx)("div",{className:"space-y-2",children:T.map((t,r)=>(0,n.jsxs)("div",{children:[(0,n.jsx)(C,{node:t,index:r,isExpanded:I===r,onClick:()=>F(I===r?null:r),onRemove:()=>{E(T.filter((e,t)=>t!==r)),I===r&&F(null)}}),I===r&&(0,n.jsx)(f.Zp,{className:`mt-1 ml-6 border-2 ${G[t.node_type]?.border??"border-border"}`,children:(0,n.jsx)(f.Wu,{className:"p-5",children:(0,n.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,n.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,n.jsx)(g.p,{placeholder:y("editor.nodeTitle"),value:t.title,onChange:e=>ex(r,{title:e.target.value}),className:"h-9 min-w-[220px] flex-1"}),"action"===t.node_type&&(0,n.jsxs)("label",{className:"flex cursor-pointer select-none items-center gap-1.5 text-sm",children:[(0,n.jsx)("input",{type:"checkbox",checked:t.hitl,onChange:e=>ex(r,{hitl:e.target.checked}),className:"h-4 w-4 accent-brand-blue-600"}),(0,n.jsx)("span",{children:"HITL"})]}),"gate"===t.node_type&&(0,n.jsxs)("label",{className:"flex cursor-pointer select-none items-center gap-1.5 text-sm",children:[(0,n.jsx)("input",{type:"checkbox",checked:t.visual_selection,onChange:e=>ex(r,{visual_selection:e.target.checked}),className:"h-4 w-4 accent-amber-500"}),(0,n.jsx)("span",{children:"Visual"})]}),(0,n.jsxs)("select",{value:t.credential_id??"",onChange:e=>ex(r,{credential_id:e.target.value?Number(e.target.value):null}),className:"h-9 w-48 rounded-[var(--radius)] border border-[var(--border)] bg-[var(--card)] px-2 text-sm",title:y("editor.credentialTitle"),children:[(0,n.jsx)("option",{value:"",children:y("editor.noCredential")}),D.map(e=>(0,n.jsx)("option",{value:e.id,children:e.service_name},e.id))]})]}),(0,n.jsxs)("div",{className:"grid gap-3",children:[(0,n.jsx)("div",{className:"flex flex-wrap gap-2",children:M.map(e=>{let a="gate"===e.value?d.A:"loop"===e.value?c.A:u.A,s=t.node_type===e.value,i=G[e.value]?.badge??"";return(0,n.jsxs)(p.$,{type:"button",variant:"outline",size:"sm",onClick:()=>ex(r,{node_type:e.value}),className:s?i:void 0,title:y(e.descKey),children:[(0,n.jsx)(a,{className:"h-4 w-4"}),y(e.labelKey)]},e.value)})}),(0,n.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,n.jsx)(p.$,{type:"button",variant:"outline",size:"sm",onClick:()=>ex(r,{source:"inline",instruction_id:null}),className:"inline"===t.source?"border-brand-blue-600 bg-brand-blue-100 text-brand-blue-700":void 0,children:y("editor.inlineWrite")}),(0,n.jsx)(p.$,{type:"button",variant:"outline",size:"sm",onClick:()=>ex(r,{source:"reference"}),className:"reference"===t.source?"border-brand-blue-600 bg-brand-blue-100 text-brand-blue-700":void 0,children:y("editor.referenceInstruction")})]}),"inline"===t.source?(0,n.jsx)(v.T,{placeholder:y("editor.instructionPlaceholder"),value:t.instruction,onChange:e=>ex(r,{instruction:e.target.value}),rows:4,className:"font-mono"}):(0,n.jsxs)("div",{className:"grid gap-2",children:[(0,n.jsx)(p.$,{variant:"outline",size:"sm",className:"w-full justify-start text-left font-normal",onClick:()=>er(r),children:t.instruction_id?`#${t.instruction_id} ${eu.get(t.instruction_id)?.title??""}`:y("editor.selectInstruction")}),(0,n.jsx)(U,{open:et===r,onOpenChange:e=>{e||er(null)},instructions:K,onSelect:e=>{ea(null),ex(r,{instruction_id:e})},onCreateNew:()=>{ea(r),ei(""),eo("")}}),en===r&&(0,n.jsx)(f.Zp,{className:"border-brand-blue-600 shadow-none",children:(0,n.jsxs)(f.Wu,{className:"grid gap-3 p-4",children:[(0,n.jsx)(g.p,{placeholder:y("editor.instructionTitle"),value:es,onChange:e=>ei(e.target.value)}),(0,n.jsx)(v.T,{placeholder:y("editor.instructionContent"),value:el,onChange:e=>eo(e.target.value),rows:4,className:"font-mono"}),(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)(p.$,{size:"sm",onClick:()=>eh(r),disabled:!es.trim()||ed,children:ed?y("editor.saving"):y("common.create")}),(0,n.jsx)(p.$,{size:"sm",variant:"secondary",type:"button",onClick:()=>ea(null),children:y("common.cancel")})]})]})})]}),"loop"===t.node_type&&(0,n.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,n.jsx)("span",{className:"text-xs text-[var(--muted-foreground)]",children:y("editor.loopBackTo")}),(0,n.jsxs)("select",{value:t.loop_back_to??"",onChange:e=>ex(r,{loop_back_to:e.target.value?Number(e.target.value):null}),className:"h-9 w-56 rounded-[var(--radius)] border border-[var(--border)] bg-[var(--card)] px-2 text-sm",children:[(0,n.jsx)("option",{value:"",children:y("editor.selectStep")}),T.map((e,t)=>(0,n.jsx)("option",{value:t+1,children:y("editor.loopStepOption",{step:t+1,title:T[t].title?`: ${T[t].title}`:""})},t))]})]}),e&&t.dbNodeId&&(0,n.jsx)(B,{workflowId:e,nodeId:t.dbNodeId})]})]})})})]},t.key))})})}),(0,n.jsxs)("div",{className:"mt-8 space-y-3",children:[e&&!Z&&(0,n.jsxs)("div",{className:"flex items-start gap-2 rounded-lg border border-[var(--border)] bg-surface-soft p-3 text-xs text-[var(--muted-foreground)]",children:[(0,n.jsx)(m.A,{className:"mt-0.5 h-4 w-4 shrink-0 text-amber-500"}),(0,n.jsxs)("div",{className:"space-y-1",children:[(0,n.jsxs)("p",{className:"font-medium text-foreground",children:[y("workflows.inactiveBadge")," \xb7 v",H]}),(0,n.jsx)("p",{children:y("workflows.inactiveEditWarning")})]})]}),(0,n.jsxs)("div",{className:"flex flex-wrap gap-3",children:[!e&&(0,n.jsx)(p.$,{type:"button",onClick:ep,disabled:!$.trim()||P||_,title:_?y("ownership.cantEdit"):void 0,children:P?y("editor.saving"):y("common.create")}),e&&Z&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(p.$,{type:"button",onClick:eg,disabled:!$.trim()||P||_,title:_?y("ownership.cantEdit"):void 0,children:[(0,n.jsx)(x.A,{className:"mr-2 h-4 w-4"}),P?y("editor.saving"):y("workflows.publishNewVersion")]}),(0,n.jsxs)(b.E,{variant:"outline",className:"inline-flex items-center self-center text-[11px]",children:[y("workflows.activeBadge")," \xb7 v",H]})]}),e&&!Z&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(p.$,{type:"button",onClick:ef,disabled:!$.trim()||P||_,title:_?y("ownership.cantEdit"):void 0,children:P?y("editor.saving"):y("common.save")}),(0,n.jsx)(p.$,{type:"button",variant:"secondary",onClick:ev,disabled:P||_,title:_?y("ownership.cantEdit"):void 0,children:y("workflows.activate")})]}),(0,n.jsx)(p.$,{type:"button",onClick:()=>j.push(e?`/workflows/${e}`:"/workflows"),variant:"secondary",children:y("editor.cancel")})]})]}),(0,n.jsx)(q,{open:X,onOpenChange:ee,onSelect:e=>{var t;t={node_type:e.node_type,title:e.title??"",instruction:e.instruction??"",instruction_id:e.instruction_id??null,source:e.instruction_id?"reference":"inline"},E([...T,{key:J(),dbNodeId:null,title:"",node_type:"action",source:"inline",instruction:"",instruction_id:null,credential_id:null,credential_requirement:null,loop_back_to:null,hitl:!1,visual_selection:!1,...t}]),F(T.length)}})]})}},45160:(e,t,r)=>{r.d(t,{E:()=>o});var n=r(95155);r(12115);var a=r(18460),s=r(42442),i=r(40980);let l=(0,a.F)("inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-3 py-1 text-xs font-semibold tracking-[0.01em] whitespace-nowrap transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3",{variants:{variant:{default:"border-brand-blue-600/20 bg-brand-blue-100 text-brand-blue-700",accent:"border-brand-kiwi-600/30 bg-brand-kiwi-100 text-brand-kiwi-700",neutral:"border-border bg-brand-surface-soft text-brand-ink-700",success:"border-success/20 bg-success/10 text-success",warning:"border-warning/20 bg-warning/10 text-warning",danger:"border-danger/20 bg-danger/10 text-danger",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40 [a&]:hover:bg-destructive/90",outline:"border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",ghost:"border-transparent [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",link:"border-transparent text-primary underline-offset-4 [a&]:hover:underline"}},defaultVariants:{variant:"default"}});function o({className:e,variant:t,asChild:r=!1,...a}){let d=r?s.bL:"span";return(0,n.jsx)(d,{"data-slot":"badge","data-variant":t,className:(0,i.cn)(l({variant:t}),e),...a})}}}]);