@knoflows/engine 0.1.0 → 0.1.1-alpha.1

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 (54) hide show
  1. package/dist/engine.js +19 -19
  2. package/dist/migrations/20260921193000_local_repo_remote/migration.sql +3 -0
  3. package/dist/migrations/20260921193000_local_repo_remote/snapshot.json +1378 -0
  4. package/package.json +1 -1
  5. package/static/assets/i18n/en.json +14 -0
  6. package/static/assets/i18n/es.json +14 -0
  7. package/static/{chunk-BRZ5T52h.js → chunk-1s-6iZs8.js} +1 -1
  8. package/static/{chunk-DSgUAlqN.js → chunk-8INlEe9b.js} +1 -1
  9. package/static/chunk-96ta9Sdz.js +1 -0
  10. package/static/{chunk-7NTQwN96.js → chunk-9I0-e_3z.js} +1 -1
  11. package/static/{chunk-BcQQgpKh.js → chunk-B3UE2A3I.js} +1 -1
  12. package/static/chunk-BDDp2BQi.js +1 -0
  13. package/static/{chunk-Dx92ksvP.js → chunk-BJVGVLQp.js} +1 -1
  14. package/static/{chunk-VXZaUyyE.js → chunk-BZBN-IEB.js} +1 -1
  15. package/static/{chunk-CRGkNzel.js → chunk-Bayax3su.js} +2 -2
  16. package/static/chunk-BbtIjpMQ.js +5 -0
  17. package/static/{chunk-BCHj6l85.js → chunk-BgIY3xBH.js} +1 -1
  18. package/static/{chunk-CPNxRF7A.js → chunk-BrckDrlX.js} +1 -1
  19. package/static/{chunk-CuwZV6XG.js → chunk-Ce3aSFve.js} +1 -1
  20. package/static/{chunk-DvWh-Q5D.js → chunk-CepRGzVJ.js} +1 -1
  21. package/static/{chunk-DEF7Ge5B.js → chunk-CqhV23s2.js} +1 -1
  22. package/static/{chunk-C9PkSfMb.js → chunk-CsJt5dbK.js} +1 -1
  23. package/static/{chunk-BrP_q6LZ.js → chunk-CtFtOXy4.js} +1 -1
  24. package/static/{chunk-BIdwV0jx.js → chunk-CuBg4N16.js} +1 -1
  25. package/static/chunk-D-L7yklF.js +1 -0
  26. package/static/{chunk-ZqQUQSE8.js → chunk-DDkLmxql.js} +1 -1
  27. package/static/{chunk-DAONFRT8.js → chunk-DF1Zujdm.js} +1 -1
  28. package/static/{chunk-Dg-4XevL.js → chunk-DFHhTmIq.js} +1 -1
  29. package/static/{chunk-Bv1r1Ly-.js → chunk-DKjiFhsx.js} +1 -1
  30. package/static/{chunk-hpn_m1ZC.js → chunk-DP75g4hD.js} +1 -1
  31. package/static/chunk-DX21GXyA.js +1 -0
  32. package/static/{chunk-Ysn4Fbgj.js → chunk-DaP135hJ.js} +1 -1
  33. package/static/{chunk-B_R_vsLt.js → chunk-Dgi_aaUY.js} +1 -1
  34. package/static/{chunk-DVJ9L-aC.js → chunk-DiKEYJdn.js} +1 -1
  35. package/static/{chunk-DHC_yfIa.js → chunk-Dl_fBMXY.js} +1 -1
  36. package/static/{chunk-Cvoe3MtC.js → chunk-Dqjhd0t8.js} +1 -1
  37. package/static/{chunk-CV-FUe_H.js → chunk-DuhskOh7.js} +1 -1
  38. package/static/{chunk-5xJXPFlv.js → chunk-DvI50p6W.js} +1 -1
  39. package/static/chunk-Ou4ZHVyl.js +1 -0
  40. package/static/{chunk-D3JZ8ur5.js → chunk-XJrnAloK.js} +3 -3
  41. package/static/{chunk-CLM-K-Vg.js → chunk-djGmnQaE.js} +1 -1
  42. package/static/{chunk-CZoPJsBm.js → chunk-lQWDKNhr.js} +1 -1
  43. package/static/chunk-rTfgntJ9.js +1 -0
  44. package/static/{chunk-xeQj_hSF.js → chunk-wWwVqMLO.js} +1 -1
  45. package/static/{chunk-DyiDg8XX.js → chunk-wqJvNV4X.js} +1 -1
  46. package/static/{chunk-BIL86kgf.js → chunk-wu6SvZ0s.js} +1 -1
  47. package/static/index.html +1 -1
  48. package/static/{main-SI5AKDMC.js → main-Q5LNROCU.js} +1 -1
  49. package/static/chunk--WRMKpmO.js +0 -5
  50. package/static/chunk-BaYdwXIA.js +0 -1
  51. package/static/chunk-C3Xml1YG.js +0 -1
  52. package/static/chunk-DDhSFoAE.js +0 -1
  53. package/static/chunk-DaO-gpzS.js +0 -1
  54. package/static/chunk-pi-mtheN.js +0 -1
@@ -1 +1 @@
1
- import {_ as _n,C as Cn}from'./chunk-CPNxRF7A.js';import {C,b6 as U,b7 as m,b8 as y,V as Ve,b as at,q as qo,u as ue,aW as Ng,c as bi,Z as ZE,d as $8,v as v3,Y as pf,a0 as bd,a1 as sp,K as Kt,j as _i,I as Iw,P as Pw,J as Jc,l as _D,o as gI,L as Lh,p as Fw,z as rl,M as MD,H as HD,x as xD,w as lh,B as AD,G as FD,m as mh,D as ch,O as Fu,Q as ju}from'./main-SI5AKDMC.js';import {b}from'./chunk-Dx92ksvP.js';import {W,I}from'./chunk-5xJXPFlv.js';import {p as pc,a as as,d as dc,K as Kl,c as cc,J as Ji,l as ls}from'./chunk-DAONFRT8.js';import'./chunk-CLM-K-Vg.js';function ee(t,p){return [...t.map(i=>({type:"view",id:i.id,name:i.name,workflowId:i.workflowId,subjectType:i.subjectType})),...p.map(i=>({type:"shortcut",id:i.id,name:i.name,workflowId:i.workflowId,subjectType:null}))].sort((i,c)=>i.name.localeCompare(c.name))}var te=(t,p)=>p.type+p.id;function ie(t,p){t&1&&(_i(0,"p",5),Iw(1),Pw(2,"transloco"),Jc()),t&2&&(gI(),Lh(Fw(2,1,"common.loading")));}function ne(t,p){if(t&1&&(_i(0,"p",6),Iw(1),Jc()),t&2){let e=HD();gI(),Lh(e.loadError());}}function oe(t,p){if(t&1&&(_i(0,"p",7),Iw(1),Jc()),t&2){let e=HD(2);gI(),Lh(e.deleteError());}}function ae(t,p){t&1&&(_i(0,"section",8)(1,"p"),Iw(2),Pw(3,"transloco"),Jc(),_i(4,"div",2)(5,"a",10),Iw(6),Pw(7,"transloco"),Jc(),_i(8,"a",11),Iw(9),Pw(10,"transloco"),Jc()()()),t&2&&(gI(2),Lh(Fw(3,3,"manage.views.emptyState")),gI(4),rl(" ",Fw(7,5,"manage.views.createView")," "),gI(3),rl(" ",Fw(10,7,"manage.views.createShortcut")," "));}function re(t,p){if(t&1&&(Iw(0),Pw(1,"transloco")),t&2){let e=HD().$implicit,i=HD(3);rl(" ",Fw(1,1,i.subjectTypeKey(e.subjectType))," ");}}function se(t,p){t&1&&(Iw(0),Pw(1,"transloco")),t&2&&rl(" ",Fw(1,1,"manage.views.noSubjectType")," ");}function de(t,p){if(t&1){let e=FD();_i(0,"tr")(1,"td"),Iw(2),Jc(),_i(3,"td")(4,"nz-tag"),Iw(5),Pw(6,"transloco"),Jc()(),_i(7,"td"),Iw(8),Jc(),_i(9,"td"),_D(10,re,2,3)(11,se,2,3),Jc(),_i(12,"td",12)(13,"a",13),Iw(14),Pw(15,"transloco"),Jc(),_i(16,"button",14),Pw(17,"transloco"),Pw(18,"transloco"),Pw(19,"transloco"),mh("nzOnConfirm",function(){let c=Fu(e).$implicit,v=HD(3);return ju(v.deleteItem(c))}),Iw(20),Pw(21,"transloco"),Jc()()();}if(t&2){let e=p.$implicit,i=HD(3);ch("data-testid","item-"+e.type+"-"+e.id),gI(),ch("data-testid","name-"+e.type+"-"+e.id),gI(),Lh(e.name),gI(2),ch("data-testid","type-"+e.type+"-"+e.id),gI(),Lh(Fw(6,17,i.typeKey(e.type))),gI(2),ch("data-testid","workflow-"+e.type+"-"+e.id),gI(),rl(" ",i.workflowName(e)," "),gI(),ch("data-testid","subject-type-"+e.type+"-"+e.id),gI(),MD(e.subjectType?10:11),gI(3),lh("routerLink",i.editLink(e)),ch("data-testid","edit-"+e.type+"-"+e.id),gI(),rl(" ",Fw(15,19,"manage.views.edit")," "),gI(2),lh("nzPopconfirmTitle",Fw(17,21,i.deleteConfirmKey(e)))("nzOkText",Fw(18,23,"manage.views.delete"))("nzCancelText",Fw(19,25,"common.cancel")),ch("data-testid","delete-"+e.type+"-"+e.id),gI(4),rl(" ",Fw(21,27,"manage.views.delete")," ");}}function pe(t,p){if(t&1&&(_i(0,"nz-table",9)(1,"thead")(2,"tr")(3,"th"),Iw(4),Pw(5,"transloco"),Jc(),_i(6,"th"),Iw(7),Pw(8,"transloco"),Jc(),_i(9,"th"),Iw(10),Pw(11,"transloco"),Jc(),_i(12,"th"),Iw(13),Pw(14,"transloco"),Jc(),_i(15,"th"),Iw(16),Pw(17,"transloco"),Jc()()(),_i(18,"tbody"),xD(19,de,22,29,"tr",null,te),Jc()()),t&2){let e=HD(2);lh("nzData",e.items())("nzFrontPagination",false)("nzShowPagination",false),gI(4),Lh(Fw(5,8,"manage.views.column.name")),gI(3),Lh(Fw(8,10,"manage.views.column.type")),gI(3),Lh(Fw(11,12,"manage.views.column.workflow")),gI(3),Lh(Fw(14,14,"manage.views.column.subjectType")),gI(3),Lh(Fw(17,16,"manage.views.column.actions")),gI(3),AD(e.items());}}function le(t,p){if(t&1&&(_D(0,oe,2,1,"p",7),_D(1,ae,11,9,"section",8)(2,pe,21,18,"nz-table",9)),t&2){let e=HD();MD(e.deleteError()?0:-1),gI(),MD(e.items().length===0?1:2);}}var Pe=(()=>{class t{constructor(){this.viewsApi=C(U),this.shortcutsApi=C(m),this.nav=C(y),this.workflowsApi=C(b),this.transloco=C(Ve),this.destroyRef=C(at),this.items=qo([]),this.workflows=qo([]),this.loading=qo(true),this.loadError=qo(null),this.deleteError=qo(null),this.load();}typeKey(e){return `manage.views.type.${e}`}subjectTypeKey(e){return `workflow-editor.subjectType.${e}`}workflowName(e){return this.workflows().find(i=>i.id===e.workflowId)?.name??e.workflowId}editLink(e){return e.type==="view"?["/views",e.id,"edit"]:["/shortcuts",e.id,"edit"]}deleteConfirmKey(e){return e.type==="view"?"manage.views.deleteConfirmView":"manage.views.deleteConfirmShortcut"}deleteItem(e){this.deleteError.set(null),(e.type==="view"?this.viewsApi.delete(e.id):this.shortcutsApi.delete(e.id)).pipe(ue(this.destroyRef)).subscribe({next:()=>{this.nav.refresh(),this.items.update(c=>c.filter(v=>!(v.type===e.type&&v.id===e.id)));},error:c=>{this.deleteError.set(this.errorMessage(c,this.transloco.translate("manage.views.deleteFailed")));}});}load(){this.loading.set(true),this.loadError.set(null),Ng({views:this.viewsApi.list(),shortcuts:this.shortcutsApi.list(),workflows:this.workflowsApi.list()}).pipe(ue(this.destroyRef)).subscribe({next:({views:e,shortcuts:i,workflows:c})=>{this.items.set(ee(e,i)),this.workflows.set(c),this.loading.set(false);},error:e=>{this.loading.set(false),this.loadError.set(this.errorMessage(e,this.transloco.translate("manage.views.loadFailed")));}});}errorMessage(e,i){return e instanceof bi||e instanceof Error?e.message:i}static{this.\u0275fac=function(i){return new(i||t)};}static{this.\u0275cmp=ZE({type:t,selectors:[["app-views-and-shortcuts-manage"]],decls:15,vars:10,consts:[["data-testid","views-shortcuts-manage",1,"list-page"],[1,"header"],[1,"header-actions"],["nz-button","","nzType","primary","routerLink","/views/new","data-testid","create-view"],["nz-button","","routerLink","/shortcuts/new","data-testid","create-shortcut"],["data-testid","loading"],["data-testid","load-error",1,"error"],["data-testid","delete-error",1,"error"],["data-testid","empty-state",1,"empty"],["data-testid","managed-items",3,"nzData","nzFrontPagination","nzShowPagination"],["nz-button","","nzType","primary","routerLink","/views/new","data-testid","empty-create-view"],["nz-button","","routerLink","/shortcuts/new","data-testid","empty-create-shortcut"],[1,"actions"],["nz-button","","nzType","link",3,"routerLink"],["nz-button","","nzType","link","nzDanger","","type","button","nz-popconfirm","",3,"nzOnConfirm","nzPopconfirmTitle","nzOkText","nzCancelText"]],template:function(i,c){i&1&&(_i(0,"main",0)(1,"header",1)(2,"h1"),Iw(3),Pw(4,"transloco"),Jc(),_i(5,"div",2)(6,"a",3),Iw(7),Pw(8,"transloco"),Jc(),_i(9,"a",4),Iw(10),Pw(11,"transloco"),Jc()()(),_D(12,ie,3,3,"p",5)(13,ne,2,1,"p",6)(14,le,3,2),Jc()),i&2&&(gI(3),Lh(Fw(4,4,"manage.views.title")),gI(4),rl(" ",Fw(8,6,"manage.views.createView")," "),gI(3),rl(" ",Fw(11,8,"manage.views.createShortcut")," "),gI(2),MD(c.loading()?12:c.loadError()?13:14));},dependencies:[$8,v3,pf,bd,sp,_n,Cn,pc,as,dc,Kl,cc,Ji,ls,W,I,Kt],styles:[".list-page[_ngcontent-%COMP%]{padding:1.25rem 1.5rem 3rem;display:flex;flex-direction:column;gap:1rem}.header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;gap:1rem;align-items:flex-start}.header-actions[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:.5rem;justify-content:center}.empty[_ngcontent-%COMP%]{text-align:center;padding:2.5rem 1rem;border:1px dashed #d6d3d1;background:#fff9}.empty[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0 0 1rem;color:#57534e}.error[_ngcontent-%COMP%]{color:#9f1239}.actions[_ngcontent-%COMP%]{white-space:nowrap}[_nghost-%COMP%] .ant-table-tbody>tr>td{white-space:normal;vertical-align:top}"]});}}return t})();export{Pe as ViewsAndShortcutsManageComponent};
1
+ import {_ as _n,C as Cn}from'./chunk-BrckDrlX.js';import {C,b6 as U,b7 as m,b8 as y,V as Ve,b as at,q as qo,u as ue,aW as Ng,c as bi,Z as ZE,d as $8,v as v3,Y as pf,a0 as bd,a1 as sp,K as Kt,j as _i,I as Iw,P as Pw,J as Jc,l as _D,o as gI,L as Lh,p as Fw,z as rl,M as MD,H as HD,x as xD,w as lh,B as AD,G as FD,m as mh,D as ch,O as Fu,Q as ju}from'./main-Q5LNROCU.js';import {b}from'./chunk-BJVGVLQp.js';import {W,I}from'./chunk-DvI50p6W.js';import {p as pc,a as as,d as dc,K as Kl,c as cc,J as Ji,l as ls}from'./chunk-DF1Zujdm.js';import'./chunk-djGmnQaE.js';function ee(t,p){return [...t.map(i=>({type:"view",id:i.id,name:i.name,workflowId:i.workflowId,subjectType:i.subjectType})),...p.map(i=>({type:"shortcut",id:i.id,name:i.name,workflowId:i.workflowId,subjectType:null}))].sort((i,c)=>i.name.localeCompare(c.name))}var te=(t,p)=>p.type+p.id;function ie(t,p){t&1&&(_i(0,"p",5),Iw(1),Pw(2,"transloco"),Jc()),t&2&&(gI(),Lh(Fw(2,1,"common.loading")));}function ne(t,p){if(t&1&&(_i(0,"p",6),Iw(1),Jc()),t&2){let e=HD();gI(),Lh(e.loadError());}}function oe(t,p){if(t&1&&(_i(0,"p",7),Iw(1),Jc()),t&2){let e=HD(2);gI(),Lh(e.deleteError());}}function ae(t,p){t&1&&(_i(0,"section",8)(1,"p"),Iw(2),Pw(3,"transloco"),Jc(),_i(4,"div",2)(5,"a",10),Iw(6),Pw(7,"transloco"),Jc(),_i(8,"a",11),Iw(9),Pw(10,"transloco"),Jc()()()),t&2&&(gI(2),Lh(Fw(3,3,"manage.views.emptyState")),gI(4),rl(" ",Fw(7,5,"manage.views.createView")," "),gI(3),rl(" ",Fw(10,7,"manage.views.createShortcut")," "));}function re(t,p){if(t&1&&(Iw(0),Pw(1,"transloco")),t&2){let e=HD().$implicit,i=HD(3);rl(" ",Fw(1,1,i.subjectTypeKey(e.subjectType))," ");}}function se(t,p){t&1&&(Iw(0),Pw(1,"transloco")),t&2&&rl(" ",Fw(1,1,"manage.views.noSubjectType")," ");}function de(t,p){if(t&1){let e=FD();_i(0,"tr")(1,"td"),Iw(2),Jc(),_i(3,"td")(4,"nz-tag"),Iw(5),Pw(6,"transloco"),Jc()(),_i(7,"td"),Iw(8),Jc(),_i(9,"td"),_D(10,re,2,3)(11,se,2,3),Jc(),_i(12,"td",12)(13,"a",13),Iw(14),Pw(15,"transloco"),Jc(),_i(16,"button",14),Pw(17,"transloco"),Pw(18,"transloco"),Pw(19,"transloco"),mh("nzOnConfirm",function(){let c=Fu(e).$implicit,v=HD(3);return ju(v.deleteItem(c))}),Iw(20),Pw(21,"transloco"),Jc()()();}if(t&2){let e=p.$implicit,i=HD(3);ch("data-testid","item-"+e.type+"-"+e.id),gI(),ch("data-testid","name-"+e.type+"-"+e.id),gI(),Lh(e.name),gI(2),ch("data-testid","type-"+e.type+"-"+e.id),gI(),Lh(Fw(6,17,i.typeKey(e.type))),gI(2),ch("data-testid","workflow-"+e.type+"-"+e.id),gI(),rl(" ",i.workflowName(e)," "),gI(),ch("data-testid","subject-type-"+e.type+"-"+e.id),gI(),MD(e.subjectType?10:11),gI(3),lh("routerLink",i.editLink(e)),ch("data-testid","edit-"+e.type+"-"+e.id),gI(),rl(" ",Fw(15,19,"manage.views.edit")," "),gI(2),lh("nzPopconfirmTitle",Fw(17,21,i.deleteConfirmKey(e)))("nzOkText",Fw(18,23,"manage.views.delete"))("nzCancelText",Fw(19,25,"common.cancel")),ch("data-testid","delete-"+e.type+"-"+e.id),gI(4),rl(" ",Fw(21,27,"manage.views.delete")," ");}}function pe(t,p){if(t&1&&(_i(0,"nz-table",9)(1,"thead")(2,"tr")(3,"th"),Iw(4),Pw(5,"transloco"),Jc(),_i(6,"th"),Iw(7),Pw(8,"transloco"),Jc(),_i(9,"th"),Iw(10),Pw(11,"transloco"),Jc(),_i(12,"th"),Iw(13),Pw(14,"transloco"),Jc(),_i(15,"th"),Iw(16),Pw(17,"transloco"),Jc()()(),_i(18,"tbody"),xD(19,de,22,29,"tr",null,te),Jc()()),t&2){let e=HD(2);lh("nzData",e.items())("nzFrontPagination",false)("nzShowPagination",false),gI(4),Lh(Fw(5,8,"manage.views.column.name")),gI(3),Lh(Fw(8,10,"manage.views.column.type")),gI(3),Lh(Fw(11,12,"manage.views.column.workflow")),gI(3),Lh(Fw(14,14,"manage.views.column.subjectType")),gI(3),Lh(Fw(17,16,"manage.views.column.actions")),gI(3),AD(e.items());}}function le(t,p){if(t&1&&(_D(0,oe,2,1,"p",7),_D(1,ae,11,9,"section",8)(2,pe,21,18,"nz-table",9)),t&2){let e=HD();MD(e.deleteError()?0:-1),gI(),MD(e.items().length===0?1:2);}}var Pe=(()=>{class t{constructor(){this.viewsApi=C(U),this.shortcutsApi=C(m),this.nav=C(y),this.workflowsApi=C(b),this.transloco=C(Ve),this.destroyRef=C(at),this.items=qo([]),this.workflows=qo([]),this.loading=qo(true),this.loadError=qo(null),this.deleteError=qo(null),this.load();}typeKey(e){return `manage.views.type.${e}`}subjectTypeKey(e){return `workflow-editor.subjectType.${e}`}workflowName(e){return this.workflows().find(i=>i.id===e.workflowId)?.name??e.workflowId}editLink(e){return e.type==="view"?["/views",e.id,"edit"]:["/shortcuts",e.id,"edit"]}deleteConfirmKey(e){return e.type==="view"?"manage.views.deleteConfirmView":"manage.views.deleteConfirmShortcut"}deleteItem(e){this.deleteError.set(null),(e.type==="view"?this.viewsApi.delete(e.id):this.shortcutsApi.delete(e.id)).pipe(ue(this.destroyRef)).subscribe({next:()=>{this.nav.refresh(),this.items.update(c=>c.filter(v=>!(v.type===e.type&&v.id===e.id)));},error:c=>{this.deleteError.set(this.errorMessage(c,this.transloco.translate("manage.views.deleteFailed")));}});}load(){this.loading.set(true),this.loadError.set(null),Ng({views:this.viewsApi.list(),shortcuts:this.shortcutsApi.list(),workflows:this.workflowsApi.list()}).pipe(ue(this.destroyRef)).subscribe({next:({views:e,shortcuts:i,workflows:c})=>{this.items.set(ee(e,i)),this.workflows.set(c),this.loading.set(false);},error:e=>{this.loading.set(false),this.loadError.set(this.errorMessage(e,this.transloco.translate("manage.views.loadFailed")));}});}errorMessage(e,i){return e instanceof bi||e instanceof Error?e.message:i}static{this.\u0275fac=function(i){return new(i||t)};}static{this.\u0275cmp=ZE({type:t,selectors:[["app-views-and-shortcuts-manage"]],decls:15,vars:10,consts:[["data-testid","views-shortcuts-manage",1,"list-page"],[1,"header"],[1,"header-actions"],["nz-button","","nzType","primary","routerLink","/views/new","data-testid","create-view"],["nz-button","","routerLink","/shortcuts/new","data-testid","create-shortcut"],["data-testid","loading"],["data-testid","load-error",1,"error"],["data-testid","delete-error",1,"error"],["data-testid","empty-state",1,"empty"],["data-testid","managed-items",3,"nzData","nzFrontPagination","nzShowPagination"],["nz-button","","nzType","primary","routerLink","/views/new","data-testid","empty-create-view"],["nz-button","","routerLink","/shortcuts/new","data-testid","empty-create-shortcut"],[1,"actions"],["nz-button","","nzType","link",3,"routerLink"],["nz-button","","nzType","link","nzDanger","","type","button","nz-popconfirm","",3,"nzOnConfirm","nzPopconfirmTitle","nzOkText","nzCancelText"]],template:function(i,c){i&1&&(_i(0,"main",0)(1,"header",1)(2,"h1"),Iw(3),Pw(4,"transloco"),Jc(),_i(5,"div",2)(6,"a",3),Iw(7),Pw(8,"transloco"),Jc(),_i(9,"a",4),Iw(10),Pw(11,"transloco"),Jc()()(),_D(12,ie,3,3,"p",5)(13,ne,2,1,"p",6)(14,le,3,2),Jc()),i&2&&(gI(3),Lh(Fw(4,4,"manage.views.title")),gI(4),rl(" ",Fw(8,6,"manage.views.createView")," "),gI(3),rl(" ",Fw(11,8,"manage.views.createShortcut")," "),gI(2),MD(c.loading()?12:c.loadError()?13:14));},dependencies:[$8,v3,pf,bd,sp,_n,Cn,pc,as,dc,Kl,cc,Ji,ls,W,I,Kt],styles:[".list-page[_ngcontent-%COMP%]{padding:1.25rem 1.5rem 3rem;display:flex;flex-direction:column;gap:1rem}.header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;gap:1rem;align-items:flex-start}.header-actions[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:.5rem;justify-content:center}.empty[_ngcontent-%COMP%]{text-align:center;padding:2.5rem 1rem;border:1px dashed #d6d3d1;background:#fff9}.empty[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0 0 1rem;color:#57534e}.error[_ngcontent-%COMP%]{color:#9f1239}.actions[_ngcontent-%COMP%]{white-space:nowrap}[_nghost-%COMP%] .ant-table-tbody>tr>td{white-space:normal;vertical-align:top}"]});}}return t})();export{Pe as ViewsAndShortcutsManageComponent};
@@ -1 +1 @@
1
- import {C,b4 as N2,aV as ix,b_ as u,b5 as cx,i as ie}from'./main-SI5AKDMC.js';var U=(()=>{class r{constructor(){this.http=C(N2),this.baseUrl=`${ix.apiBaseUrl}/batches`;}list(t){return this.http.get(this.baseUrl,{params:u(t)}).pipe(cx())}get(t){return this.http.get(`${this.baseUrl}/${encodeURIComponent(t)}`).pipe(cx())}jobs(t){return this.http.get(`${this.baseUrl}/${encodeURIComponent(t)}/jobs`).pipe(cx())}launch(t){return this.http.post(this.baseUrl,t).pipe(cx())}cancel(t){return this.http.post(`${this.baseUrl}/${encodeURIComponent(t)}/cancel`,{}).pipe(cx())}static{this.\u0275fac=function(a){return new(a||r)};}static{this.\u0275prov=ie({token:r,factory:r.\u0275fac,providedIn:"root"});}}return r})();export{U};
1
+ import {C,b4 as N2,aV as ix,b_ as u,b5 as cx,i as ie}from'./main-Q5LNROCU.js';var U=(()=>{class r{constructor(){this.http=C(N2),this.baseUrl=`${ix.apiBaseUrl}/batches`;}list(t){return this.http.get(this.baseUrl,{params:u(t)}).pipe(cx())}get(t){return this.http.get(`${this.baseUrl}/${encodeURIComponent(t)}`).pipe(cx())}jobs(t){return this.http.get(`${this.baseUrl}/${encodeURIComponent(t)}/jobs`).pipe(cx())}launch(t){return this.http.post(this.baseUrl,t).pipe(cx())}cancel(t){return this.http.post(`${this.baseUrl}/${encodeURIComponent(t)}/cancel`,{}).pipe(cx())}static{this.\u0275fac=function(a){return new(a||r)};}static{this.\u0275prov=ie({token:r,factory:r.\u0275fac,providedIn:"root"});}}return r})();export{U};
@@ -1 +1 @@
1
- import {$}from'./chunk-CLM-K-Vg.js';import {s,r as r$1,ch as Sy,i as ie,C,bt as Ee,d5 as go,dg as Ul,dh as Fd,di as kn,aC as zt,bQ as Wr,Z as ZE,c3 as th,j as _i,x as xD,N as ND,J as Jc,aP as Mh,al as Sh,o as gI,B as AD,ap as re,a9 as Z0,be as E3,bR as eD,ae as Le$1,bs as G0,bf as _r,a3 as Ah,a4 as Th,as as st,at as Ee$1,m as mh,l as _D,aw as rh,aQ as aw,aG as lw,M as MD,w as lh,cM as Rw,bH as wh,bI as zD,G as FD,b as at,n as uh,aJ as tl,aK as nl,H as HD,O as Fu,Q as ju,aU as vv}from'./main-SI5AKDMC.js';var ce=["animationElement"],me=(n,o)=>({$implicit:n,data:o});function le(n,o){n&1&&uh(0,"nz-icon",4);}function pe(n,o){n&1&&uh(0,"nz-icon",5);}function de(n,o){n&1&&uh(0,"nz-icon",6);}function he(n,o){n&1&&uh(0,"nz-icon",7);}function fe(n,o){n&1&&uh(0,"nz-icon",8);}function ue(n,o){if(n&1&&(tl(0),uh(1,"span",10),nl()),n&2){let e=HD();gI(),lh("innerHTML",e.instance.content,vv);}}function ge(n,o){if(n&1){let e=FD();_i(0,"nz-message",2),mh("destroyed",function(i){Fu(e);let s=HD();return ju(s.remove(i.id,i.userAction))}),Jc();}if(n&2){let e=o.$implicit;lh("instance",e);}}var ve=0,M=class{container;nzSingletonService=C($);injector=C(Ee);remove(o){this.container&&(o?this.container.remove(o):this.container.removeAll());}getInstanceId(){return `${this.componentPrefix}-${ve++}`}withContainer(o){let e=this.nzSingletonService.getSingletonWithKey(this.componentPrefix);if(e)return e;let t=go(this.injector,{hasBackdrop:false,scrollStrategy:Fd(),positionStrategy:Ul(this.injector)}),i=new kn(o,null,this.injector),s=t.attach(i),re=t.hostElement;return re.style.zIndex="1010",e||(this.container=e=s.instance,this.nzSingletonService.registerSingletonWithKey(this.componentPrefix,e),this.container.afterAllInstancesRemoved.subscribe(()=>{this.container=void 0,this.nzSingletonService.unregisterSingletonWithKey(this.componentPrefix),t.dispose();})),e}},Ce=(()=>{class n{config;instances=[];_afterAllInstancesRemoved=new re;afterAllInstancesRemoved=this._afterAllInstancesRemoved.asObservable();cdr=C(Z0);nzConfigService=C(E3);constructor(){this.subscribeConfigChange();}create(e){let t=this.onCreate(e);return this.instances.length>=this.config.nzMaxStack&&(this.instances=this.instances.slice(1)),this.instances=[...this.instances,t],this.readyInstances(),t}remove(e,t=false){this.instances.map((i,s)=>({index:s,instance:i})).filter(({instance:i})=>i.messageId===e).forEach(({index:i,instance:s})=>{this.instances.splice(i,1),this.instances=[...this.instances],this.onRemove(s,t),this.readyInstances();}),this.instances.length||this.onAllInstancesRemoved();}removeAll(){this.instances.forEach(e=>this.onRemove(e,false)),this.instances=[],this.readyInstances(),this.onAllInstancesRemoved();}onCreate(e){return e.options=this.mergeOptions(e.options),e.onClose=new re,e}onRemove(e,t){e.onClose.next(t),e.onClose.complete();}onAllInstancesRemoved(){this._afterAllInstancesRemoved.next(),this._afterAllInstancesRemoved.complete();}readyInstances(){this.cdr.detectChanges();}mergeOptions(e){let{nzDuration:t,nzAnimate:i,nzPauseOnHover:s}=this.config;return r$1({nzDuration:t,nzAnimate:i,nzPauseOnHover:s},e)}static \u0275fac=function(t){return new(t||n)};static \u0275dir=eD({type:n})}return n})(),ye=(()=>{class n{destroyRef=C(at);elementRef=C(_r);options;autoClose;userAction=false;eraseTimer;eraseTimingStart;eraseTTL;constructor(){this.destroyRef.onDestroy(()=>{this.autoClose&&this.clearEraseTimeout();});}ngOnInit(){this.options=this.instance.options,this.options.nzAnimate&&this._startEnterAnimation(),this.autoClose=this.options.nzDuration>0,this.autoClose&&(this.initErase(),this.startEraseTimeout());}onEnter(){this.autoClose&&this.options.nzPauseOnHover&&(this.clearEraseTimeout(),this.updateTTL());}onLeave(){this.autoClose&&this.options.nzPauseOnHover&&this.startEraseTimeout();}destroy(e=false){this.userAction=e,this.options.nzAnimate?this._startLeaveAnimation(()=>this.destroyed.next({id:this.instance.messageId,userAction:e})):this.destroyed.next({id:this.instance.messageId,userAction:e});}initErase(){this.eraseTTL=this.options.nzDuration,this.eraseTimingStart=Date.now();}updateTTL(){this.autoClose&&(this.eraseTTL-=Date.now()-this.eraseTimingStart);}startEraseTimeout(){this.eraseTTL>0?(this.clearEraseTimeout(),this.eraseTimer=setTimeout(()=>this.destroy(),this.eraseTTL),this.eraseTimingStart=Date.now()):this.destroy();}clearEraseTimeout(){this.eraseTimer!==null&&(clearTimeout(this.eraseTimer),this.eraseTimer=void 0);}_startEnterAnimation(){let e=this.animationElement().nativeElement;e.classList.add(this._animationClassMap.enter);let t=i=>{this.matchAnimationKeyframe(i,this._animationKeyframeMap.enter)&&(e.removeEventListener("animationend",t),e.classList.remove(this._animationClassMap.enter));};e.addEventListener("animationend",t);}_startLeaveAnimation(e){let t=this.animationElement().nativeElement;t.classList.remove(this._animationClassMap.enter),t.classList.add(this._animationClassMap.leave);let i=s=>{this.matchAnimationKeyframe(s,this._animationKeyframeMap.leave)&&(t.removeEventListener("animationend",i),e());};t.addEventListener("animationend",i);}matchAnimationKeyframe(e,t){return typeof t=="string"?e.animationName===t:t.includes(e.animationName)}static \u0275fac=function(t){return new(t||n)};static \u0275dir=eD({type:n})}return n})(),ze=(()=>{class n extends ye{instance;destroyed=new Le$1;index;animationElement=G0.required("animationElement",{read:_r});_animationKeyframeMap={enter:"MessageMoveIn",leave:"MessageMoveOut"};_animationClassMap={enter:"ant-message-move-up-enter",leave:"ant-message-move-up-leave"};static \u0275fac=(()=>{let e;return function(i){return (e||(e=Sy(n)))(i||n)}})();static \u0275cmp=ZE({type:n,selectors:[["nz-message"]],viewQuery:function(t,i){t&1&&wh(i.animationElement,ce,5,_r),t&2&&zD();},inputs:{instance:"instance"},outputs:{destroyed:"destroyed"},exportAs:["nzMessage"],features:[th],decls:10,vars:12,consts:[["animationElement",""],[1,"ant-message-notice",3,"mouseenter","mouseleave"],[1,"ant-message-notice-content"],[1,"ant-message-custom-content"],["nzType","check-circle"],["nzType","info-circle"],["nzType","exclamation-circle"],["nzType","close-circle"],["nzType","loading"],[4,"nzStringTemplateOutlet","nzStringTemplateOutletContext"],[3,"innerHTML"]],template:function(t,i){if(t&1&&(_i(0,"div",1,0),mh("mouseenter",function(){return i.onEnter()})("mouseleave",function(){return i.onLeave()}),_i(2,"div",2)(3,"div",3),_D(4,le,1,0,"nz-icon",4)(5,pe,1,0,"nz-icon",5)(6,de,1,0,"nz-icon",6)(7,he,1,0,"nz-icon",7)(8,fe,1,0,"nz-icon",8),rh(9,ue,2,1,"ng-container",9),Jc()()()),t&2){let s;aw(i.instance.options?.nzStyle),lw(i.instance.options?.nzClass),gI(3),lw("ant-message-"+i.instance.type),gI(),MD((s=i.instance.type)==="success"?4:s==="info"?5:s==="warning"?6:s==="error"?7:s==="loading"?8:-1),gI(5),lh("nzStringTemplateOutlet",i.instance.content)("nzStringTemplateOutletContext",Rw(9,me,i,i.instance.options?.nzData));}},dependencies:[Ah,Th,st,Ee$1],encapsulation:2})}return n})(),f="message",_e={nzAnimate:true,nzDuration:3e3,nzMaxStack:7,nzPauseOnHover:true,nzTop:24,nzDirection:"ltr"},Te=(()=>{class n extends Ce{dir=this.nzConfigService.getConfigForComponent(f)?.nzDirection||"ltr";top;constructor(){super(),this.updateConfig();}subscribeConfigChange(){zt(f,()=>{this.updateConfig(),this.dir=this.nzConfigService.getConfigForComponent(f)?.nzDirection||this.dir;});}updateConfig(){this.config=r$1(r$1(r$1({},_e),this.config),this.nzConfigService.getConfigForComponent(f)),this.top=Wr(this.config.nzTop),this.cdr.markForCheck();}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=ZE({type:n,selectors:[["nz-message-container"]],exportAs:["nzMessageContainer"],features:[th],decls:3,vars:4,consts:[[1,"ant-message"],[3,"instance"],[3,"destroyed","instance"]],template:function(t,i){t&1&&(_i(0,"div",0),xD(1,ge,1,1,"nz-message",1,ND),Jc()),t&2&&(Mh("top",i.top),Sh("ant-message-rtl",i.dir==="rtl"),gI(),AD(i.instances));},dependencies:[ze],encapsulation:2})}return n})(),He=(()=>{class n extends M{componentPrefix="message-";success(e,t){return this.createInstance({type:"success",content:e},t)}error(e,t){return this.createInstance({type:"error",content:e},t)}info(e,t){return this.createInstance({type:"info",content:e},t)}warning(e,t){return this.createInstance({type:"warning",content:e},t)}loading(e,t){return this.createInstance({type:"loading",content:e},t)}create(e,t,i){return this.createInstance({type:e,content:t},i)}createInstance(e,t){return this.container=this.withContainer(Te),this.container.create(s(r$1({},e),{createdAt:new Date,messageId:this.getInstanceId(),options:t}))}static \u0275fac=(()=>{let e;return function(i){return (e||(e=Sy(n)))(i||n)}})();static \u0275prov=ie({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();export{He as H};
1
+ import {$}from'./chunk-djGmnQaE.js';import {s,r as r$1,ch as Sy,i as ie,C,bt as Ee,d5 as go,dg as Ul,dh as Fd,di as kn,aC as zt,bQ as Wr,Z as ZE,c3 as th,j as _i,x as xD,N as ND,J as Jc,aP as Mh,al as Sh,o as gI,B as AD,ap as re,a9 as Z0,be as E3,bR as eD,ae as Le$1,bs as G0,bf as _r,a3 as Ah,a4 as Th,as as st,at as Ee$1,m as mh,l as _D,aw as rh,aQ as aw,aG as lw,M as MD,w as lh,cM as Rw,bH as wh,bI as zD,G as FD,b as at,n as uh,aJ as tl,aK as nl,H as HD,O as Fu,Q as ju,aU as vv}from'./main-Q5LNROCU.js';var ce=["animationElement"],me=(n,o)=>({$implicit:n,data:o});function le(n,o){n&1&&uh(0,"nz-icon",4);}function pe(n,o){n&1&&uh(0,"nz-icon",5);}function de(n,o){n&1&&uh(0,"nz-icon",6);}function he(n,o){n&1&&uh(0,"nz-icon",7);}function fe(n,o){n&1&&uh(0,"nz-icon",8);}function ue(n,o){if(n&1&&(tl(0),uh(1,"span",10),nl()),n&2){let e=HD();gI(),lh("innerHTML",e.instance.content,vv);}}function ge(n,o){if(n&1){let e=FD();_i(0,"nz-message",2),mh("destroyed",function(i){Fu(e);let s=HD();return ju(s.remove(i.id,i.userAction))}),Jc();}if(n&2){let e=o.$implicit;lh("instance",e);}}var ve=0,M=class{container;nzSingletonService=C($);injector=C(Ee);remove(o){this.container&&(o?this.container.remove(o):this.container.removeAll());}getInstanceId(){return `${this.componentPrefix}-${ve++}`}withContainer(o){let e=this.nzSingletonService.getSingletonWithKey(this.componentPrefix);if(e)return e;let t=go(this.injector,{hasBackdrop:false,scrollStrategy:Fd(),positionStrategy:Ul(this.injector)}),i=new kn(o,null,this.injector),s=t.attach(i),re=t.hostElement;return re.style.zIndex="1010",e||(this.container=e=s.instance,this.nzSingletonService.registerSingletonWithKey(this.componentPrefix,e),this.container.afterAllInstancesRemoved.subscribe(()=>{this.container=void 0,this.nzSingletonService.unregisterSingletonWithKey(this.componentPrefix),t.dispose();})),e}},Ce=(()=>{class n{config;instances=[];_afterAllInstancesRemoved=new re;afterAllInstancesRemoved=this._afterAllInstancesRemoved.asObservable();cdr=C(Z0);nzConfigService=C(E3);constructor(){this.subscribeConfigChange();}create(e){let t=this.onCreate(e);return this.instances.length>=this.config.nzMaxStack&&(this.instances=this.instances.slice(1)),this.instances=[...this.instances,t],this.readyInstances(),t}remove(e,t=false){this.instances.map((i,s)=>({index:s,instance:i})).filter(({instance:i})=>i.messageId===e).forEach(({index:i,instance:s})=>{this.instances.splice(i,1),this.instances=[...this.instances],this.onRemove(s,t),this.readyInstances();}),this.instances.length||this.onAllInstancesRemoved();}removeAll(){this.instances.forEach(e=>this.onRemove(e,false)),this.instances=[],this.readyInstances(),this.onAllInstancesRemoved();}onCreate(e){return e.options=this.mergeOptions(e.options),e.onClose=new re,e}onRemove(e,t){e.onClose.next(t),e.onClose.complete();}onAllInstancesRemoved(){this._afterAllInstancesRemoved.next(),this._afterAllInstancesRemoved.complete();}readyInstances(){this.cdr.detectChanges();}mergeOptions(e){let{nzDuration:t,nzAnimate:i,nzPauseOnHover:s}=this.config;return r$1({nzDuration:t,nzAnimate:i,nzPauseOnHover:s},e)}static \u0275fac=function(t){return new(t||n)};static \u0275dir=eD({type:n})}return n})(),ye=(()=>{class n{destroyRef=C(at);elementRef=C(_r);options;autoClose;userAction=false;eraseTimer;eraseTimingStart;eraseTTL;constructor(){this.destroyRef.onDestroy(()=>{this.autoClose&&this.clearEraseTimeout();});}ngOnInit(){this.options=this.instance.options,this.options.nzAnimate&&this._startEnterAnimation(),this.autoClose=this.options.nzDuration>0,this.autoClose&&(this.initErase(),this.startEraseTimeout());}onEnter(){this.autoClose&&this.options.nzPauseOnHover&&(this.clearEraseTimeout(),this.updateTTL());}onLeave(){this.autoClose&&this.options.nzPauseOnHover&&this.startEraseTimeout();}destroy(e=false){this.userAction=e,this.options.nzAnimate?this._startLeaveAnimation(()=>this.destroyed.next({id:this.instance.messageId,userAction:e})):this.destroyed.next({id:this.instance.messageId,userAction:e});}initErase(){this.eraseTTL=this.options.nzDuration,this.eraseTimingStart=Date.now();}updateTTL(){this.autoClose&&(this.eraseTTL-=Date.now()-this.eraseTimingStart);}startEraseTimeout(){this.eraseTTL>0?(this.clearEraseTimeout(),this.eraseTimer=setTimeout(()=>this.destroy(),this.eraseTTL),this.eraseTimingStart=Date.now()):this.destroy();}clearEraseTimeout(){this.eraseTimer!==null&&(clearTimeout(this.eraseTimer),this.eraseTimer=void 0);}_startEnterAnimation(){let e=this.animationElement().nativeElement;e.classList.add(this._animationClassMap.enter);let t=i=>{this.matchAnimationKeyframe(i,this._animationKeyframeMap.enter)&&(e.removeEventListener("animationend",t),e.classList.remove(this._animationClassMap.enter));};e.addEventListener("animationend",t);}_startLeaveAnimation(e){let t=this.animationElement().nativeElement;t.classList.remove(this._animationClassMap.enter),t.classList.add(this._animationClassMap.leave);let i=s=>{this.matchAnimationKeyframe(s,this._animationKeyframeMap.leave)&&(t.removeEventListener("animationend",i),e());};t.addEventListener("animationend",i);}matchAnimationKeyframe(e,t){return typeof t=="string"?e.animationName===t:t.includes(e.animationName)}static \u0275fac=function(t){return new(t||n)};static \u0275dir=eD({type:n})}return n})(),ze=(()=>{class n extends ye{instance;destroyed=new Le$1;index;animationElement=G0.required("animationElement",{read:_r});_animationKeyframeMap={enter:"MessageMoveIn",leave:"MessageMoveOut"};_animationClassMap={enter:"ant-message-move-up-enter",leave:"ant-message-move-up-leave"};static \u0275fac=(()=>{let e;return function(i){return (e||(e=Sy(n)))(i||n)}})();static \u0275cmp=ZE({type:n,selectors:[["nz-message"]],viewQuery:function(t,i){t&1&&wh(i.animationElement,ce,5,_r),t&2&&zD();},inputs:{instance:"instance"},outputs:{destroyed:"destroyed"},exportAs:["nzMessage"],features:[th],decls:10,vars:12,consts:[["animationElement",""],[1,"ant-message-notice",3,"mouseenter","mouseleave"],[1,"ant-message-notice-content"],[1,"ant-message-custom-content"],["nzType","check-circle"],["nzType","info-circle"],["nzType","exclamation-circle"],["nzType","close-circle"],["nzType","loading"],[4,"nzStringTemplateOutlet","nzStringTemplateOutletContext"],[3,"innerHTML"]],template:function(t,i){if(t&1&&(_i(0,"div",1,0),mh("mouseenter",function(){return i.onEnter()})("mouseleave",function(){return i.onLeave()}),_i(2,"div",2)(3,"div",3),_D(4,le,1,0,"nz-icon",4)(5,pe,1,0,"nz-icon",5)(6,de,1,0,"nz-icon",6)(7,he,1,0,"nz-icon",7)(8,fe,1,0,"nz-icon",8),rh(9,ue,2,1,"ng-container",9),Jc()()()),t&2){let s;aw(i.instance.options?.nzStyle),lw(i.instance.options?.nzClass),gI(3),lw("ant-message-"+i.instance.type),gI(),MD((s=i.instance.type)==="success"?4:s==="info"?5:s==="warning"?6:s==="error"?7:s==="loading"?8:-1),gI(5),lh("nzStringTemplateOutlet",i.instance.content)("nzStringTemplateOutletContext",Rw(9,me,i,i.instance.options?.nzData));}},dependencies:[Ah,Th,st,Ee$1],encapsulation:2})}return n})(),f="message",_e={nzAnimate:true,nzDuration:3e3,nzMaxStack:7,nzPauseOnHover:true,nzTop:24,nzDirection:"ltr"},Te=(()=>{class n extends Ce{dir=this.nzConfigService.getConfigForComponent(f)?.nzDirection||"ltr";top;constructor(){super(),this.updateConfig();}subscribeConfigChange(){zt(f,()=>{this.updateConfig(),this.dir=this.nzConfigService.getConfigForComponent(f)?.nzDirection||this.dir;});}updateConfig(){this.config=r$1(r$1(r$1({},_e),this.config),this.nzConfigService.getConfigForComponent(f)),this.top=Wr(this.config.nzTop),this.cdr.markForCheck();}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=ZE({type:n,selectors:[["nz-message-container"]],exportAs:["nzMessageContainer"],features:[th],decls:3,vars:4,consts:[[1,"ant-message"],[3,"instance"],[3,"destroyed","instance"]],template:function(t,i){t&1&&(_i(0,"div",0),xD(1,ge,1,1,"nz-message",1,ND),Jc()),t&2&&(Mh("top",i.top),Sh("ant-message-rtl",i.dir==="rtl"),gI(),AD(i.instances));},dependencies:[ze],encapsulation:2})}return n})(),He=(()=>{class n extends M{componentPrefix="message-";success(e,t){return this.createInstance({type:"success",content:e},t)}error(e,t){return this.createInstance({type:"error",content:e},t)}info(e,t){return this.createInstance({type:"info",content:e},t)}warning(e,t){return this.createInstance({type:"warning",content:e},t)}loading(e,t){return this.createInstance({type:"loading",content:e},t)}create(e,t,i){return this.createInstance({type:e,content:t},i)}createInstance(e,t){return this.container=this.withContainer(Te),this.container.create(s(r$1({},e),{createdAt:new Date,messageId:this.getInstanceId(),options:t}))}static \u0275fac=(()=>{let e;return function(i){return (e||(e=Sy(n)))(i||n)}})();static \u0275prov=ie({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();export{He as H};
@@ -0,0 +1 @@
1
+ import {d as h_,e as U_,P as P_,x as xg,f as e_,j as j_}from'./chunk-XJrnAloK.js';import {C,b4 as N2,aV as ix,b5 as cx,i as ie,s,r as r$1}from'./main-Q5LNROCU.js';var w=(()=>{class e{constructor(){this.http=C(N2),this.baseUrl=`${ix.apiBaseUrl}/providers`;}listQueryTemplates(t){return this.http.get(`${this.baseUrl}/${encodeURIComponent(t)}/query-templates`).pipe(cx())}listExtendedActions(t){return this.http.get(`${this.baseUrl}/${encodeURIComponent(t)}/actions`).pipe(cx())}resolveQueryTemplate(t,i,s){return this.http.post(`${this.baseUrl}/${encodeURIComponent(t)}/query-templates/${encodeURIComponent(i)}/resolve`,{params:s}).pipe(cx())}previewModels(t){return this.http.post(`${this.baseUrl}/preview-models`,t).pipe(cx())}testConnection(t){return this.http.post(`${this.baseUrl}/test-connection`,t).pipe(cx())}static{this.\u0275fac=function(i){return new(i||e)};}static{this.\u0275prov=ie({token:e,factory:e.\u0275fac,providedIn:"root"});}}return e})();var d=[{id:"jira",labelKey:"settings.typeOption.jira",kind:"subject",type:"jira",subjectType:"ticket"},{id:"bitbucket",labelKey:"settings.typeOption.bitbucket",kind:"subject",type:"bitbucket",subjectType:"pull_request"},{id:"github",labelKey:"settings.typeOption.github",kind:"subject",type:"github",subjectType:"ticket"},{id:"confluence",labelKey:"settings.typeOption.confluence",kind:"subject",type:"confluence",subjectType:"documentation"},{id:"manual-ticket",labelKey:"settings.typeOption.manualTicket",kind:"subject",type:"manual",subjectType:"ticket"},{id:"manual-documentation",labelKey:"settings.typeOption.manualDocumentation",kind:"subject",type:"manual",subjectType:"documentation"},{id:"claude",labelKey:"settings.typeOption.claude",kind:"agent",type:"claude"},{id:"cursor",labelKey:"settings.typeOption.cursor",kind:"agent",type:"cursor"}],F=["ticket","pull_request","documentation"];function f(e){return d.find(n=>n.id===e)??d[0]}function T(e){return d.find(t=>t.kind!==e.kind||t.type!==e.type?false:t.kind==="agent"?true:j_(e)&&t.subjectType===e.subjectType)?.id??e.type}function N(e){let n=T(e);return f(n).labelKey}function K(e){return e==="jira"?[{key:"baseUrl",labelKey:"settings.jira.baseUrl"},{key:"email",labelKey:"settings.jira.email"}]:e==="bitbucket"?[{key:"email",labelKey:"settings.bitbucket.email"},{key:"workspace",labelKey:"settings.bitbucket.workspace"}]:e==="github"?[{key:"username",labelKey:"settings.github.username"}]:e==="confluence"?[{key:"baseUrl",labelKey:"settings.confluence.baseUrl"},{key:"email",labelKey:"settings.confluence.email"}]:[]}function P(){let e=d[0];return {originalId:null,id:"",idAutoSync:true,optionId:e.id,kind:e.kind,type:e.type,subjectType:e.subjectType??null,displayName:"",config:{},secretKey:U_("instance",e.kind),secretValue:"",expiresOn:"",knownRepoSlugs:[],defaultAgent:false,maxConcurrent:h_}}function _(e,n=false){let t={};for(let o of K(e.type)){let r=e.config[o.key];typeof r=="string"&&(t[o.key]=r);}if(P_(e)){let o=e.config.model;typeof o=="string"&&o.trim()&&(t.model=o.trim());}let i=T(e),s=f(i);return {originalId:e.id,id:e.id,idAutoSync:false,optionId:i,kind:s.kind,type:s.type,subjectType:s.subjectType??null,displayName:e.displayName,config:t,secretKey:e.secretKey,secretValue:"",expiresOn:e.expiresOn??"",knownRepoSlugs:e.type==="bitbucket"?xg(e.config):[],defaultAgent:s.kind==="agent"?n:false,maxConcurrent:P_(e)?e.maxConcurrent??h_:h_}}function q(e,n){let t=f(n);return s(r$1({},e),{optionId:t.id,kind:t.kind,type:t.type,subjectType:t.subjectType??null,config:{},secretKey:U_(e.id||"instance",t.kind),knownRepoSlugs:[],defaultAgent:t.kind==="agent"?e.defaultAgent:false,maxConcurrent:t.kind==="agent"?e.maxConcurrent||h_:e.maxConcurrent})}function D(e,n,t){if(!e.idAutoSync)return s(r$1({},e),{displayName:n});let i=n.trim().length>0?e_(n,t):"";return s(r$1({},e),{displayName:n,id:i,secretKey:U_(i||"instance",e.kind)})}function M(e,n){return s(r$1({},e),{id:n,idAutoSync:false,secretKey:U_(n.trim()||"instance",e.kind)})}function V(e){let n={};for(let r of K(e.type)){let g=(e.config[r.key]??"").trim();g&&(n[r.key]=g);}if(e.type==="bitbucket"){let r=xg({knownRepoSlugs:e.knownRepoSlugs});r.length>0&&(n.knownRepoSlugs=r);}let t=e.id.trim(),i=e.displayName.trim()||t,s=e.secretKey.trim()||U_(t,e.kind),o=e.expiresOn.trim()||void 0;if(e.kind==="agent"){let r=(e.config.model??"").trim();return r&&(n.model=r),r$1({id:t,kind:"agent",type:e.type,displayName:i,config:n,secretKey:s,maxConcurrent:Math.max(1,Math.floor(Number(e.maxConcurrent)||h_))},o?{expiresOn:o}:{})}return r$1({id:t,kind:"subject",type:e.type,subjectType:e.subjectType??"ticket",displayName:i,config:n,secretKey:s},o?{expiresOn:o}:{})}function B(e){return e.issues.map(n=>`${n.path.length>0?n.path.map(String).join("."):"(root)"}: ${n.message}`)}function U(e){return (e?.providerInstances??[]).filter(j_)}function L(e,n){return U(e).filter(t=>j_(t)&&n.includes(t.subjectType))}export{B,D,F,K,L,M,N,P,V,_,d,q,w};
@@ -1 +1 @@
1
- import {a7 as KE,a8 as fu,aA as mT,C,a9 as Z0,b$ as Gm,ab as Oe,aB as yT,ae as Le$1,aC as zt,Z as ZE,a3 as Ah,a4 as Th,as as st,at as Ee,c0 as Mn,ai as ly,av as K0,l as _D,M as MD,aM as Yl,G as FD,j as _i,c1 as tc,J as Jc,H as HD,al as Sh,w as lh,o as gI,aw as rh,m as mh,n as uh,aJ as tl,I as Iw,aK as nl,L as Lh,O as Fu,Q as ju,c2 as ph}from'./main-SI5AKDMC.js';function X(n,i){n&1&&ph(0);}function $(n,i){if(n&1&&rh(0,X,1,0,"ng-container",7),n&2){let e=HD(3);lh("nzStringTemplateOutlet",e.nzIcon);}}function nn(n,i){if(n&1&&uh(0,"nz-icon",6),n&2){let e=HD(3);lh("nzType",e.nzIconType||e.inferredIconType)("nzTheme",e.iconTheme);}}function en(n,i){if(n&1&&(_i(0,"div",2),_D(1,$,1,1,"ng-container")(2,nn,1,2,"nz-icon",6),Jc()),n&2){let e=HD(2);gI(),MD(e.nzIcon?1:2);}}function tn(n,i){if(n&1&&(tl(0),Iw(1),nl()),n&2){let e=HD(4);gI(),Lh(e.nzMessage);}}function on(n,i){if(n&1&&(_i(0,"span",8),rh(1,tn,2,1,"ng-container",7),Jc()),n&2){let e=HD(3);gI(),lh("nzStringTemplateOutlet",e.nzMessage);}}function an(n,i){if(n&1&&(tl(0),Iw(1),nl()),n&2){let e=HD(4);gI(),Lh(e.nzDescription);}}function rn(n,i){if(n&1&&(_i(0,"span",9),rh(1,an,2,1,"ng-container",7),Jc()),n&2){let e=HD(3);gI(),lh("nzStringTemplateOutlet",e.nzDescription);}}function ln(n,i){if(n&1&&(_i(0,"div",3),_D(1,on,2,1,"span",8),_D(2,rn,2,1,"span",9),Jc()),n&2){let e=HD(2);gI(),MD(e.nzMessage?1:-1),gI(),MD(e.nzDescription?2:-1);}}function cn(n,i){if(n&1&&(tl(0),Iw(1),nl()),n&2){let e=HD(3);gI(),Lh(e.nzAction);}}function sn(n,i){if(n&1&&(_i(0,"div",4),rh(1,cn,2,1,"ng-container",7),Jc()),n&2){let e=HD(2);gI(),lh("nzStringTemplateOutlet",e.nzAction);}}function dn(n,i){if(n&1&&(tl(0),_i(1,"span",12),Iw(2),Jc(),nl()),n&2){let e=HD(4);gI(2),Lh(e.nzCloseText);}}function mn(n,i){if(n&1&&rh(0,dn,3,1,"ng-container",7),n&2){let e=HD(3);lh("nzStringTemplateOutlet",e.nzCloseText);}}function pn(n,i){n&1&&uh(0,"nz-icon",11);}function _n(n,i){if(n&1){let e=FD();_i(0,"button",10),mh("click",function(){Fu(e);let z=HD(2);return ju(z.closeAlert())}),_D(1,mn,1,1,"ng-container")(2,pn,1,0,"nz-icon",11),Jc();}if(n&2){let e=HD(2);gI(),MD(e.nzCloseText?1:2);}}function zn(n,i){if(n&1){let e=FD();_i(0,"div",1),tc(function(z){Fu(e);let T=HD();return ju(T.onLeaveAnimationDone(z))}),_D(1,en,3,1,"div",2),_D(2,ln,3,2,"div",3),_D(3,sn,2,1,"div",4),_D(4,_n,3,1,"button",5),Jc();}if(n&2){let e=HD();Sh("ant-alert-rtl",e.dir()==="rtl")("ant-alert-success",e.nzType==="success")("ant-alert-info",e.nzType==="info")("ant-alert-warning",e.nzType==="warning")("ant-alert-error",e.nzType==="error")("ant-alert-no-icon",!e.nzShowIcon)("ant-alert-banner",e.nzBanner)("ant-alert-closable",e.nzCloseable)("ant-alert-with-description",!!e.nzDescription),lh("nzNoAnimation",e.nzNoAnimation),gI(),MD(e.nzShowIcon?1:-1),gI(),MD(e.nzMessage||e.nzDescription?2:-1),gI(),MD(e.nzAction?3:-1),gI(),MD(e.nzCloseable||e.nzCloseText?4:-1);}}var Z="alert",un=(()=>{let n,i=[],e=[],_,z=[],T=[];return class D{static{let r=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;n=[Yl()],_=[Yl()],mT(null,null,n,{kind:"field",name:"nzCloseable",static:false,private:false,access:{has:t=>"nzCloseable"in t,get:t=>t.nzCloseable,set:(t,l)=>{t.nzCloseable=l;}},metadata:r},i,e),mT(null,null,_,{kind:"field",name:"nzShowIcon",static:false,private:false,access:{has:t=>"nzShowIcon"in t,get:t=>t.nzShowIcon,set:(t,l)=>{t.nzShowIcon=l;}},metadata:r},z,T),r&&Object.defineProperty(this,Symbol.metadata,{enumerable:true,configurable:true,writable:true,value:r});}cdr=C(Z0);animationType=C(Gm,{optional:true});dir=C(Oe).valueSignal;_nzModuleName=Z;nzAction=null;nzCloseText=null;nzIconType=null;nzMessage=null;nzDescription=null;nzType="info";nzCloseable=yT(this,i,false);nzShowIcon=(yT(this,e),yT(this,z,false));nzBanner=(yT(this,T),false);nzNoAnimation=false;nzIcon=null;nzOnClose=new Le$1;closed=false;iconTheme="fill";inferredIconType="info-circle";isTypeSet=false;isShowIconSet=false;constructor(){zt(Z,()=>this.cdr.markForCheck());}closeAlert(){this.closed=true,(this.nzNoAnimation||this.animationType==="NoopAnimations")&&this.nzOnClose.emit(true);}onLeaveAnimationDone(r){let t=r.target;if(this.nzNoAnimation||this.animationType==="NoopAnimations"){r.animationComplete();return}t.classList.add("ant-alert-motion-leave","ant-alert-motion-leave-active");let l=()=>{t.removeEventListener("transitionend",l),this.nzOnClose.emit(true),r.animationComplete();};t.addEventListener("transitionend",l);}ngOnChanges(r){let{nzShowIcon:t,nzDescription:l,nzType:J,nzBanner:K}=r;if(t&&(this.isShowIconSet=true),J)switch(this.isTypeSet=true,this.nzType){case "error":this.inferredIconType="close-circle";break;case "success":this.inferredIconType="check-circle";break;case "info":this.inferredIconType="info-circle";break;case "warning":this.inferredIconType="exclamation-circle";break}l&&(this.iconTheme=this.nzDescription?"outline":"fill"),K&&(this.isTypeSet||(this.nzType="warning"),this.isShowIconSet||(this.nzShowIcon=true));}static \u0275fac=function(t){return new(t||D)};static \u0275cmp=ZE({type:D,selectors:[["nz-alert"]],inputs:{nzAction:"nzAction",nzCloseText:"nzCloseText",nzIconType:"nzIconType",nzMessage:"nzMessage",nzDescription:"nzDescription",nzType:"nzType",nzCloseable:[2,"nzCloseable","nzCloseable",K0],nzShowIcon:[2,"nzShowIcon","nzShowIcon",K0],nzBanner:[2,"nzBanner","nzBanner",K0],nzNoAnimation:[2,"nzNoAnimation","nzNoAnimation",K0],nzIcon:"nzIcon"},outputs:{nzOnClose:"nzOnClose"},exportAs:["nzAlert"],features:[ly],decls:1,vars:1,consts:[[1,"ant-alert",3,"nzNoAnimation","ant-alert-rtl","ant-alert-success","ant-alert-info","ant-alert-warning","ant-alert-error","ant-alert-no-icon","ant-alert-banner","ant-alert-closable","ant-alert-with-description"],[1,"ant-alert",3,"nzNoAnimation"],[1,"ant-alert-icon"],[1,"ant-alert-content"],[1,"ant-alert-action"],["type","button","tabindex","0",1,"ant-alert-close-icon"],[3,"nzType","nzTheme"],[4,"nzStringTemplateOutlet"],[1,"ant-alert-message"],[1,"ant-alert-description"],["type","button","tabindex","0",1,"ant-alert-close-icon",3,"click"],["nzType","close"],[1,"ant-alert-close-text"]],template:function(t,l){t&1&&_D(0,zn,5,23,"div",0),t&2&&MD(l.closed?-1:0);},dependencies:[Ah,Th,st,Ee,Mn],encapsulation:2})}})(),Gn=(()=>{class n{static \u0275fac=function(_){return new(_||n)};static \u0275mod=KE({type:n});static \u0275inj=fu({imports:[un]})}return n})();export{Gn as G,un as u};
1
+ import {a7 as KE,a8 as fu,aA as mT,C,a9 as Z0,b$ as Gm,ab as Oe,aB as yT,ae as Le$1,aC as zt,Z as ZE,a3 as Ah,a4 as Th,as as st,at as Ee,c0 as Mn,ai as ly,av as K0,l as _D,M as MD,aM as Yl,G as FD,j as _i,c1 as tc,J as Jc,H as HD,al as Sh,w as lh,o as gI,aw as rh,m as mh,n as uh,aJ as tl,I as Iw,aK as nl,L as Lh,O as Fu,Q as ju,c2 as ph}from'./main-Q5LNROCU.js';function X(n,i){n&1&&ph(0);}function $(n,i){if(n&1&&rh(0,X,1,0,"ng-container",7),n&2){let e=HD(3);lh("nzStringTemplateOutlet",e.nzIcon);}}function nn(n,i){if(n&1&&uh(0,"nz-icon",6),n&2){let e=HD(3);lh("nzType",e.nzIconType||e.inferredIconType)("nzTheme",e.iconTheme);}}function en(n,i){if(n&1&&(_i(0,"div",2),_D(1,$,1,1,"ng-container")(2,nn,1,2,"nz-icon",6),Jc()),n&2){let e=HD(2);gI(),MD(e.nzIcon?1:2);}}function tn(n,i){if(n&1&&(tl(0),Iw(1),nl()),n&2){let e=HD(4);gI(),Lh(e.nzMessage);}}function on(n,i){if(n&1&&(_i(0,"span",8),rh(1,tn,2,1,"ng-container",7),Jc()),n&2){let e=HD(3);gI(),lh("nzStringTemplateOutlet",e.nzMessage);}}function an(n,i){if(n&1&&(tl(0),Iw(1),nl()),n&2){let e=HD(4);gI(),Lh(e.nzDescription);}}function rn(n,i){if(n&1&&(_i(0,"span",9),rh(1,an,2,1,"ng-container",7),Jc()),n&2){let e=HD(3);gI(),lh("nzStringTemplateOutlet",e.nzDescription);}}function ln(n,i){if(n&1&&(_i(0,"div",3),_D(1,on,2,1,"span",8),_D(2,rn,2,1,"span",9),Jc()),n&2){let e=HD(2);gI(),MD(e.nzMessage?1:-1),gI(),MD(e.nzDescription?2:-1);}}function cn(n,i){if(n&1&&(tl(0),Iw(1),nl()),n&2){let e=HD(3);gI(),Lh(e.nzAction);}}function sn(n,i){if(n&1&&(_i(0,"div",4),rh(1,cn,2,1,"ng-container",7),Jc()),n&2){let e=HD(2);gI(),lh("nzStringTemplateOutlet",e.nzAction);}}function dn(n,i){if(n&1&&(tl(0),_i(1,"span",12),Iw(2),Jc(),nl()),n&2){let e=HD(4);gI(2),Lh(e.nzCloseText);}}function mn(n,i){if(n&1&&rh(0,dn,3,1,"ng-container",7),n&2){let e=HD(3);lh("nzStringTemplateOutlet",e.nzCloseText);}}function pn(n,i){n&1&&uh(0,"nz-icon",11);}function _n(n,i){if(n&1){let e=FD();_i(0,"button",10),mh("click",function(){Fu(e);let z=HD(2);return ju(z.closeAlert())}),_D(1,mn,1,1,"ng-container")(2,pn,1,0,"nz-icon",11),Jc();}if(n&2){let e=HD(2);gI(),MD(e.nzCloseText?1:2);}}function zn(n,i){if(n&1){let e=FD();_i(0,"div",1),tc(function(z){Fu(e);let T=HD();return ju(T.onLeaveAnimationDone(z))}),_D(1,en,3,1,"div",2),_D(2,ln,3,2,"div",3),_D(3,sn,2,1,"div",4),_D(4,_n,3,1,"button",5),Jc();}if(n&2){let e=HD();Sh("ant-alert-rtl",e.dir()==="rtl")("ant-alert-success",e.nzType==="success")("ant-alert-info",e.nzType==="info")("ant-alert-warning",e.nzType==="warning")("ant-alert-error",e.nzType==="error")("ant-alert-no-icon",!e.nzShowIcon)("ant-alert-banner",e.nzBanner)("ant-alert-closable",e.nzCloseable)("ant-alert-with-description",!!e.nzDescription),lh("nzNoAnimation",e.nzNoAnimation),gI(),MD(e.nzShowIcon?1:-1),gI(),MD(e.nzMessage||e.nzDescription?2:-1),gI(),MD(e.nzAction?3:-1),gI(),MD(e.nzCloseable||e.nzCloseText?4:-1);}}var Z="alert",un=(()=>{let n,i=[],e=[],_,z=[],T=[];return class D{static{let r=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;n=[Yl()],_=[Yl()],mT(null,null,n,{kind:"field",name:"nzCloseable",static:false,private:false,access:{has:t=>"nzCloseable"in t,get:t=>t.nzCloseable,set:(t,l)=>{t.nzCloseable=l;}},metadata:r},i,e),mT(null,null,_,{kind:"field",name:"nzShowIcon",static:false,private:false,access:{has:t=>"nzShowIcon"in t,get:t=>t.nzShowIcon,set:(t,l)=>{t.nzShowIcon=l;}},metadata:r},z,T),r&&Object.defineProperty(this,Symbol.metadata,{enumerable:true,configurable:true,writable:true,value:r});}cdr=C(Z0);animationType=C(Gm,{optional:true});dir=C(Oe).valueSignal;_nzModuleName=Z;nzAction=null;nzCloseText=null;nzIconType=null;nzMessage=null;nzDescription=null;nzType="info";nzCloseable=yT(this,i,false);nzShowIcon=(yT(this,e),yT(this,z,false));nzBanner=(yT(this,T),false);nzNoAnimation=false;nzIcon=null;nzOnClose=new Le$1;closed=false;iconTheme="fill";inferredIconType="info-circle";isTypeSet=false;isShowIconSet=false;constructor(){zt(Z,()=>this.cdr.markForCheck());}closeAlert(){this.closed=true,(this.nzNoAnimation||this.animationType==="NoopAnimations")&&this.nzOnClose.emit(true);}onLeaveAnimationDone(r){let t=r.target;if(this.nzNoAnimation||this.animationType==="NoopAnimations"){r.animationComplete();return}t.classList.add("ant-alert-motion-leave","ant-alert-motion-leave-active");let l=()=>{t.removeEventListener("transitionend",l),this.nzOnClose.emit(true),r.animationComplete();};t.addEventListener("transitionend",l);}ngOnChanges(r){let{nzShowIcon:t,nzDescription:l,nzType:J,nzBanner:K}=r;if(t&&(this.isShowIconSet=true),J)switch(this.isTypeSet=true,this.nzType){case "error":this.inferredIconType="close-circle";break;case "success":this.inferredIconType="check-circle";break;case "info":this.inferredIconType="info-circle";break;case "warning":this.inferredIconType="exclamation-circle";break}l&&(this.iconTheme=this.nzDescription?"outline":"fill"),K&&(this.isTypeSet||(this.nzType="warning"),this.isShowIconSet||(this.nzShowIcon=true));}static \u0275fac=function(t){return new(t||D)};static \u0275cmp=ZE({type:D,selectors:[["nz-alert"]],inputs:{nzAction:"nzAction",nzCloseText:"nzCloseText",nzIconType:"nzIconType",nzMessage:"nzMessage",nzDescription:"nzDescription",nzType:"nzType",nzCloseable:[2,"nzCloseable","nzCloseable",K0],nzShowIcon:[2,"nzShowIcon","nzShowIcon",K0],nzBanner:[2,"nzBanner","nzBanner",K0],nzNoAnimation:[2,"nzNoAnimation","nzNoAnimation",K0],nzIcon:"nzIcon"},outputs:{nzOnClose:"nzOnClose"},exportAs:["nzAlert"],features:[ly],decls:1,vars:1,consts:[[1,"ant-alert",3,"nzNoAnimation","ant-alert-rtl","ant-alert-success","ant-alert-info","ant-alert-warning","ant-alert-error","ant-alert-no-icon","ant-alert-banner","ant-alert-closable","ant-alert-with-description"],[1,"ant-alert",3,"nzNoAnimation"],[1,"ant-alert-icon"],[1,"ant-alert-content"],[1,"ant-alert-action"],["type","button","tabindex","0",1,"ant-alert-close-icon"],[3,"nzType","nzTheme"],[4,"nzStringTemplateOutlet"],[1,"ant-alert-message"],[1,"ant-alert-description"],["type","button","tabindex","0",1,"ant-alert-close-icon",3,"click"],["nzType","close"],[1,"ant-alert-close-text"]],template:function(t,l){t&1&&_D(0,zn,5,23,"div",0),t&2&&MD(l.closed?-1:0);},dependencies:[Ah,Th,st,Ee,Mn],encapsulation:2})}})(),Gn=(()=>{class n{static \u0275fac=function(_){return new(_||n)};static \u0275mod=KE({type:n});static \u0275inj=fu({imports:[un]})}return n})();export{Gn as G,un as u};
@@ -1 +1 @@
1
- import {a as ae,l as le}from'./chunk-DvWh-Q5D.js';import {H as He}from'./chunk-hpn_m1ZC.js';import {C,$ as $$1,b0 as jn,R as J1,V as Ve,s,r as r$1,c as bi,i as ie,b2 as Le,b3 as Wn,q as qo,U as Uw,Z as ZE,d as $8,Y as pf,a0 as bd,a1 as sp,a2 as fp,K as Kt,j as _i,l as _D,m as mh,I as Iw,P as Pw,J as Jc,o as gI,M as MD,w as lh,z as rl,p as Fw,G as FD,H as HD,L as Lh,O as Fu,Q as ju}from'./main-SI5AKDMC.js';import {b}from'./chunk-Dx92ksvP.js';import {a as ai,z}from'./chunk-BIL86kgf.js';function M(e){return e.inputSchema.filter(a=>a.required)}function A(e,a){return e.appliesTo!=="none"&&!a.subjectId?.trim()}function Y(e,a){return A(e,a)||M(e).length>0}function x(e,a){return e.appliesTo==="none"?void 0:a.subjectId?.trim()||void 0}function et(e,a){if(e&1){let t=FD();_i(0,"label",1)(1,"span"),Iw(2),Pw(3,"transloco"),Jc(),_i(4,"input",7),Pw(5,"transloco"),mh("input",function(o){Fu(t);let n=HD();return ju(n.setSubjectId(o))}),Jc()();}if(e&2){let t=HD();gI(2),Lh(Fw(3,3,"jobs.start.subjectId")),gI(2),lh("value",t.subjectId())("placeholder",Fw(5,5,"jobs.start.subjectIdPlaceholder"));}}function it(e,a){if(e&1){let t=FD();_i(0,"app-workflow-input-form",8),mh("valuesChange",function(o){Fu(t);let n=HD();return ju(n.inputValues.set(o))}),Jc();}if(e&2){let t=HD();lh("fields",t.requiredFields())("values",t.inputValues());}}function ot(e,a){if(e&1&&(_i(0,"p",3),Iw(1),Jc()),e&2){let t=HD();gI(),Lh(t.actionError());}}var $=(()=>{class e{constructor(){this.jobsApi=C($$1),this.router=C(J1),this.transloco=C(Ve),this.modalRef=C(Le),this.data=C(Wn),this.subjectId=qo(this.data.subjectId??""),this.inputValues=qo(ae(M(this.data.workflow))),this.starting=qo(false),this.actionError=qo(null),this.showSubjectPicker=Uw(()=>A(this.data.workflow,this.context())),this.requiredFields=Uw(()=>M(this.data.workflow));}setSubjectId(t){this.subjectId.set(t.target.value);}start(){let t=this.data.workflow;if(this.showSubjectPicker()&&!this.subjectId().trim()){this.actionError.set(this.transloco.translate("jobs.errors.subjectIdRequired"));return}let i={workflowId:t.id,subjectId:this.subjectId().trim()||this.data.subjectId},o=x(t,i);this.actionError.set(null),this.starting.set(true),this.jobsApi.start(s(r$1({workflowId:t.id},o?{subjectId:o}:{}),{inputValues:r$1({},this.inputValues())})).subscribe({next:n=>{this.starting.set(false),this.modalRef.close(),this.router.navigate(["/jobs",n.id]);},error:n=>{this.starting.set(false),this.actionError.set(this.errorMessage(n,this.transloco.translate("jobs.errors.startFailed")));}});}cancel(){this.modalRef.close();}context(){return {workflowId:this.data.workflow.id,subjectId:this.data.subjectId}}errorMessage(t,i){return t instanceof bi||t instanceof Error?t.message:i}static{this.\u0275fac=function(i){return new(i||e)};}static{this.\u0275cmp=ZE({type:e,selectors:[["app-start-job-modal"]],decls:11,vars:12,consts:[["data-testid","start-job-modal"],[1,"field"],[3,"fields","values"],["data-testid","action-error",1,"error"],[1,"dialog-actions"],["nz-button","","type","button","data-testid","start-job-cancel",3,"click","disabled"],["nz-button","","nzType","primary","type","button","data-testid","start-button",3,"click","nzLoading","disabled"],["nz-input","","data-testid","subject-id","type","text",3,"input","value","placeholder"],[3,"valuesChange","fields","values"]],template:function(i,o){i&1&&(_i(0,"div",0),_D(1,et,6,7,"label",1),_D(2,it,1,2,"app-workflow-input-form",2),_D(3,ot,2,1,"p",3),_i(4,"div",4)(5,"button",5),mh("click",function(){return o.cancel()}),Iw(6),Pw(7,"transloco"),Jc(),_i(8,"button",6),mh("click",function(){return o.start()}),Iw(9),Pw(10,"transloco"),Jc()()()),i&2&&(gI(),MD(o.showSubjectPicker()?1:-1),gI(),MD(o.requiredFields().length>0?2:-1),gI(),MD(o.actionError()?3:-1),gI(2),lh("disabled",o.starting()),gI(),rl(" ",Fw(7,8,"common.cancel")," "),gI(2),lh("nzLoading",o.starting())("disabled",o.starting()),gI(),rl(" ",Fw(10,10,o.starting()?"jobs.start.starting":"jobs.start.button")," "));},dependencies:[$8,pf,bd,sp,fp,ai,z,le,Kt],styles:[".field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.35rem;margin:0 0 1rem}.field[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{font-size:.85rem}.error[_ngcontent-%COMP%]{color:#9f1239;margin:0 0 1rem}.dialog-actions[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:.5rem;margin-top:.5rem}"]});}}return e})();var At=(()=>{class e{constructor(){this.workflowsApi=C(b),this.jobsApi=C($$1),this.modal=C(jn),this.router=C(J1),this.transloco=C(Ve),this.message=C(He);}start(t){this.workflowsApi.get(t.workflowId).subscribe({next:i=>{if(!Y(i,t)){this.launch(i,t,{});return}this.modal.create({nzTitle:this.transloco.translate("jobs.start.heading"),nzContent:$,nzData:{workflow:i,subjectId:t.subjectId},nzFooter:null});},error:i=>{this.message.error(this.errorMessage(i,this.transloco.translate("jobs.errors.loadWorkflows")));}});}launch(t,i,o){let n=x(t,i);this.jobsApi.start(s(r$1({workflowId:t.id},n?{subjectId:n}:{}),{inputValues:o})).subscribe({next:k=>{this.router.navigate(["/jobs",k.id]);},error:k=>{this.message.error(this.errorMessage(k,this.transloco.translate("jobs.errors.startFailed")));}});}errorMessage(t,i){return t instanceof bi||t instanceof Error?t.message:i}static{this.\u0275fac=function(i){return new(i||e)};}static{this.\u0275prov=ie({token:e,factory:e.\u0275fac,providedIn:"root"});}}return e})();export{At as A};
1
+ import {a as ae,l as le}from'./chunk-CepRGzVJ.js';import {H as He}from'./chunk-DP75g4hD.js';import {C,$ as $$1,b0 as jn,R as J1,V as Ve,s,r as r$1,c as bi,i as ie,b2 as Le,b3 as Wn,q as qo,U as Uw,Z as ZE,d as $8,Y as pf,a0 as bd,a1 as sp,a2 as fp,K as Kt,j as _i,l as _D,m as mh,I as Iw,P as Pw,J as Jc,o as gI,M as MD,w as lh,z as rl,p as Fw,G as FD,H as HD,L as Lh,O as Fu,Q as ju}from'./main-Q5LNROCU.js';import {b}from'./chunk-BJVGVLQp.js';import {a as ai,z}from'./chunk-wu6SvZ0s.js';function M(e){return e.inputSchema.filter(a=>a.required)}function A(e,a){return e.appliesTo!=="none"&&!a.subjectId?.trim()}function Y(e,a){return A(e,a)||M(e).length>0}function x(e,a){return e.appliesTo==="none"?void 0:a.subjectId?.trim()||void 0}function et(e,a){if(e&1){let t=FD();_i(0,"label",1)(1,"span"),Iw(2),Pw(3,"transloco"),Jc(),_i(4,"input",7),Pw(5,"transloco"),mh("input",function(o){Fu(t);let n=HD();return ju(n.setSubjectId(o))}),Jc()();}if(e&2){let t=HD();gI(2),Lh(Fw(3,3,"jobs.start.subjectId")),gI(2),lh("value",t.subjectId())("placeholder",Fw(5,5,"jobs.start.subjectIdPlaceholder"));}}function it(e,a){if(e&1){let t=FD();_i(0,"app-workflow-input-form",8),mh("valuesChange",function(o){Fu(t);let n=HD();return ju(n.inputValues.set(o))}),Jc();}if(e&2){let t=HD();lh("fields",t.requiredFields())("values",t.inputValues());}}function ot(e,a){if(e&1&&(_i(0,"p",3),Iw(1),Jc()),e&2){let t=HD();gI(),Lh(t.actionError());}}var $=(()=>{class e{constructor(){this.jobsApi=C($$1),this.router=C(J1),this.transloco=C(Ve),this.modalRef=C(Le),this.data=C(Wn),this.subjectId=qo(this.data.subjectId??""),this.inputValues=qo(ae(M(this.data.workflow))),this.starting=qo(false),this.actionError=qo(null),this.showSubjectPicker=Uw(()=>A(this.data.workflow,this.context())),this.requiredFields=Uw(()=>M(this.data.workflow));}setSubjectId(t){this.subjectId.set(t.target.value);}start(){let t=this.data.workflow;if(this.showSubjectPicker()&&!this.subjectId().trim()){this.actionError.set(this.transloco.translate("jobs.errors.subjectIdRequired"));return}let i={workflowId:t.id,subjectId:this.subjectId().trim()||this.data.subjectId},o=x(t,i);this.actionError.set(null),this.starting.set(true),this.jobsApi.start(s(r$1({workflowId:t.id},o?{subjectId:o}:{}),{inputValues:r$1({},this.inputValues())})).subscribe({next:n=>{this.starting.set(false),this.modalRef.close(),this.router.navigate(["/jobs",n.id]);},error:n=>{this.starting.set(false),this.actionError.set(this.errorMessage(n,this.transloco.translate("jobs.errors.startFailed")));}});}cancel(){this.modalRef.close();}context(){return {workflowId:this.data.workflow.id,subjectId:this.data.subjectId}}errorMessage(t,i){return t instanceof bi||t instanceof Error?t.message:i}static{this.\u0275fac=function(i){return new(i||e)};}static{this.\u0275cmp=ZE({type:e,selectors:[["app-start-job-modal"]],decls:11,vars:12,consts:[["data-testid","start-job-modal"],[1,"field"],[3,"fields","values"],["data-testid","action-error",1,"error"],[1,"dialog-actions"],["nz-button","","type","button","data-testid","start-job-cancel",3,"click","disabled"],["nz-button","","nzType","primary","type","button","data-testid","start-button",3,"click","nzLoading","disabled"],["nz-input","","data-testid","subject-id","type","text",3,"input","value","placeholder"],[3,"valuesChange","fields","values"]],template:function(i,o){i&1&&(_i(0,"div",0),_D(1,et,6,7,"label",1),_D(2,it,1,2,"app-workflow-input-form",2),_D(3,ot,2,1,"p",3),_i(4,"div",4)(5,"button",5),mh("click",function(){return o.cancel()}),Iw(6),Pw(7,"transloco"),Jc(),_i(8,"button",6),mh("click",function(){return o.start()}),Iw(9),Pw(10,"transloco"),Jc()()()),i&2&&(gI(),MD(o.showSubjectPicker()?1:-1),gI(),MD(o.requiredFields().length>0?2:-1),gI(),MD(o.actionError()?3:-1),gI(2),lh("disabled",o.starting()),gI(),rl(" ",Fw(7,8,"common.cancel")," "),gI(2),lh("nzLoading",o.starting())("disabled",o.starting()),gI(),rl(" ",Fw(10,10,o.starting()?"jobs.start.starting":"jobs.start.button")," "));},dependencies:[$8,pf,bd,sp,fp,ai,z,le,Kt],styles:[".field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.35rem;margin:0 0 1rem}.field[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{font-size:.85rem}.error[_ngcontent-%COMP%]{color:#9f1239;margin:0 0 1rem}.dialog-actions[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:.5rem;margin-top:.5rem}"]});}}return e})();var At=(()=>{class e{constructor(){this.workflowsApi=C(b),this.jobsApi=C($$1),this.modal=C(jn),this.router=C(J1),this.transloco=C(Ve),this.message=C(He);}start(t){this.workflowsApi.get(t.workflowId).subscribe({next:i=>{if(!Y(i,t)){this.launch(i,t,{});return}this.modal.create({nzTitle:this.transloco.translate("jobs.start.heading"),nzContent:$,nzData:{workflow:i,subjectId:t.subjectId},nzFooter:null});},error:i=>{this.message.error(this.errorMessage(i,this.transloco.translate("jobs.errors.loadWorkflows")));}});}launch(t,i,o){let n=x(t,i);this.jobsApi.start(s(r$1({workflowId:t.id},n?{subjectId:n}:{}),{inputValues:o})).subscribe({next:k=>{this.router.navigate(["/jobs",k.id]);},error:k=>{this.message.error(this.errorMessage(k,this.transloco.translate("jobs.errors.startFailed")));}});}errorMessage(t,i){return t instanceof bi||t instanceof Error?t.message:i}static{this.\u0275fac=function(i){return new(i||e)};}static{this.\u0275prov=ie({token:e,factory:e.\u0275fac,providedIn:"root"});}}return e})();export{At as A};
@@ -1 +1 @@
1
- import {H as H$,Y as Y$}from'./chunk-D3JZ8ur5.js';import {s,r as r$1,t as t$1}from'./main-SI5AKDMC.js';var y=["agent","interaction","shell","extract","git","provider_action","sub_workflow","loop"];function I(){return {name:"",appliesTo:"none",subjectHandling:"per-subject",inputSchema:[],steps:[],notificationPolicy:{triggers:[]}}}function d(){return crypto.randomUUID()}function _(t,e){return t.map(n=>{let r=s(r$1({},n),{_key:d(),_idAutoSync:e.idAutoSync});return n.type==="loop"?s(r$1({},r),{steps:_(n.steps,e)}):r})}function h(t,e){let n=e?.id??"",r=e?.name??"",i={_key:e?.key??d(),_idAutoSync:e?.idAutoSync??true};switch(t){case "agent":return r$1({type:t,id:n,name:r,objective:"",outputFormat:"free_text"},i);case "interaction":return r$1({type:t,id:n,name:r,interaction:"questionnaire"},i);case "shell":return r$1({type:t,id:n,name:r,command:""},i);case "extract":return r$1({type:t,id:n,name:r,source:"",onNoMatch:"fail"},i);case "git":return r$1({type:t,id:n,name:r,operation:"create_worktree",params:{}},i);case "provider_action":return r$1({type:t,id:n,name:r,action:"get_subject",params:{}},i);case "sub_workflow":return r$1({type:t,id:n,name:r,workflowId:"",forEach:"selection"},i);case "loop":return r$1({type:t,id:n,name:r,steps:[],until:{type:"field_empty",stepId:"",field:""},maxIterations:3,onMaxIterations:{action:"fail"}},i)}}function b(){return {name:"",label:"",type:"string",required:false}}function A(t){return t?Object.entries(t).map(([e,n])=>({key:e,value:n==null?"":String(n)})):[]}function j(t){let e={};for(let n of t){let r=n.key.trim();r&&(e[r]=n.value);}return e}function T(t){return t.issues.map(e=>`${e.path.length>0?e.path.map(String).join("."):"(root)"}: ${e.message}`)}function m(t){let i=t,{_key:e,_idAutoSync:n}=i,r=t$1(i,["_key","_idAutoSync"]);return r.type==="loop"?s(r$1({},r),{steps:r.steps.map(a=>m(a))}):r}function v(t,e={}){let n=t.steps.map(x=>{let u=m(x);if(!u.id){let p=u,{id:g}=p;return t$1(p,["id"])}return u}),a=t,{id:r}=a,i=t$1(a,["id"]);return e.omitWorkflowId||!r?s(r$1({},i),{steps:n}):s(r$1({},i),{id:r,steps:n})}function E(t,e,n){if(!t._idAutoSync)return s(r$1({},t),{name:e});let r=H$(n);t.id&&r.delete(t.id);let i=e.trim().length>0?Y$(e,r):"";return s(r$1({},t),{name:e,id:i})}function P(t,e){return s(r$1({},t),{id:e,_idAutoSync:false})}export{A,E,I,P,T,_,b,h,j,v,y};
1
+ import {l as t_,f as e_}from'./chunk-XJrnAloK.js';import {s,r as r$1,t as t$1}from'./main-Q5LNROCU.js';var y=["agent","interaction","shell","extract","git","provider_action","sub_workflow","loop"];function I(){return {name:"",appliesTo:"none",subjectHandling:"per-subject",inputSchema:[],steps:[],notificationPolicy:{triggers:[]}}}function d(){return crypto.randomUUID()}function _(t,e){return t.map(n=>{let r=s(r$1({},n),{_key:d(),_idAutoSync:e.idAutoSync});return n.type==="loop"?s(r$1({},r),{steps:_(n.steps,e)}):r})}function h(t,e){let n=e?.id??"",r=e?.name??"",i={_key:e?.key??d(),_idAutoSync:e?.idAutoSync??true};switch(t){case "agent":return r$1({type:t,id:n,name:r,objective:"",outputFormat:"free_text"},i);case "interaction":return r$1({type:t,id:n,name:r,interaction:"questionnaire"},i);case "shell":return r$1({type:t,id:n,name:r,command:""},i);case "extract":return r$1({type:t,id:n,name:r,source:"",onNoMatch:"fail"},i);case "git":return r$1({type:t,id:n,name:r,operation:"create_worktree",params:{}},i);case "provider_action":return r$1({type:t,id:n,name:r,action:"get_subject",params:{}},i);case "sub_workflow":return r$1({type:t,id:n,name:r,workflowId:"",forEach:"selection"},i);case "loop":return r$1({type:t,id:n,name:r,steps:[],until:{type:"field_empty",stepId:"",field:""},maxIterations:3,onMaxIterations:{action:"fail"}},i)}}function b(){return {name:"",label:"",type:"string",required:false}}function A(t){return t?Object.entries(t).map(([e,n])=>({key:e,value:n==null?"":String(n)})):[]}function j(t){let e={};for(let n of t){let r=n.key.trim();r&&(e[r]=n.value);}return e}function T(t){return t.issues.map(e=>`${e.path.length>0?e.path.map(String).join("."):"(root)"}: ${e.message}`)}function m(t){let i=t,{_key:e,_idAutoSync:n}=i,r=t$1(i,["_key","_idAutoSync"]);return r.type==="loop"?s(r$1({},r),{steps:r.steps.map(a=>m(a))}):r}function v(t,e={}){let n=t.steps.map(x=>{let u=m(x);if(!u.id){let p=u,{id:g}=p;return t$1(p,["id"])}return u}),a=t,{id:r}=a,i=t$1(a,["id"]);return e.omitWorkflowId||!r?s(r$1({},i),{steps:n}):s(r$1({},i),{id:r,steps:n})}function E(t,e,n){if(!t._idAutoSync)return s(r$1({},t),{name:e});let r=t_(n);t.id&&r.delete(t.id);let i=e.trim().length>0?e_(e,r):"";return s(r$1({},t),{name:e,id:i})}function P(t,e){return s(r$1({},t),{id:e,_idAutoSync:false})}export{A,E,I,P,T,_,b,h,j,v,y};
@@ -1 +1 @@
1
- import {w as we}from'./chunk-CuwZV6XG.js';import {_ as _n}from'./chunk-CPNxRF7A.js';import {C,b7 as m,b8 as y,$,R as J1,V as Ve,b as at,q as qo,U as Uw,u as ue,aW as Ng,c as bi,Z as ZE,d as $8,v as v3,Y as pf,a0 as bd,a1 as sp,K as Kt,j as _i,I as Iw,P as Pw,J as Jc,l as _D,o as gI,L as Lh,p as Fw,z as rl,M as MD,H as HD,G as FD,m as mh,w as lh,O as Fu,Q as ju}from'./main-SI5AKDMC.js';import {b}from'./chunk-Dx92ksvP.js';import'./chunk-DAONFRT8.js';import'./chunk-CLM-K-Vg.js';function G(i,b){i&1&&(_i(0,"p",3),Iw(1),Pw(2,"transloco"),Jc()),i&2&&(gI(),Lh(Fw(2,1,"common.loading")));}function H(i,b){if(i&1&&(_i(0,"p",4),Iw(1),Jc()),i&2){let t=HD();gI(),Lh(t.loadError());}}function K(i,b){if(i&1&&(_i(0,"p",5),Iw(1),Jc()),i&2){let t=HD(2);gI(),Lh(t.actionError());}}function Q(i,b){i&1&&(_i(0,"section",6)(1,"p"),Iw(2),Pw(3,"transloco"),Jc(),_i(4,"a",8),Iw(5),Pw(6,"transloco"),Jc()()),i&2&&(gI(2),Lh(Fw(3,2,"shortcuts.list.emptyState")),gI(3),rl(" ",Fw(6,4,"shortcuts.list.emptyCreateButton")," "));}function X(i,b){if(i&1){let t=FD();_i(0,"app-runnable-items-table",9),mh("rowAction",function(e){Fu(t);let c=HD(2);return ju(c.onRowAction(e))}),Jc();}if(i&2){let t=HD(2);lh("rows",t.rows())("selectable",false)("showRowAction",true);}}function Y(i,b){if(i&1&&(_D(0,K,2,1,"p",5),_D(1,Q,7,6,"section",6)(2,X,1,3,"app-runnable-items-table",7)),i&2){let t=HD();MD(t.actionError()?0:-1),gI(),MD(t.shortcuts().length===0?1:2);}}var bt=(()=>{class i{constructor(){this.shortcutsApi=C(m),this.nav=C(y),this.workflowsApi=C(b),this.jobsApi=C($),this.router=C(J1),this.transloco=C(Ve),this.destroyRef=C(at),this.shortcuts=qo([]),this.workflows=qo([]),this.jobsById=qo({}),this.loading=qo(true),this.loadError=qo(null),this.actionError=qo(null),this.rows=Uw(()=>{let t=this.jobsById(),o=this.workflows();return this.shortcuts().map(e=>({id:e.id,primaryLabel:e.name,subtitle:o.find(c=>c.id===e.workflowId)?.name,latestJob:e.lastJobId?t[e.lastJobId]??null:null}))}),this.load();}onRowAction(t){let o=this.shortcuts().find(e=>e.id===t);o&&(this.actionError.set(null),this.jobsApi.start({workflowId:o.workflowId,inputValues:o.inputValues}).pipe(ue(this.destroyRef)).subscribe({next:e=>{this.shortcutsApi.update(o.id,{lastJobId:e.id}).pipe(ue(this.destroyRef)).subscribe({next:c=>{this.shortcuts.update(q=>q.map(C=>C.id===c.id?c:C)),this.router.navigate(["/jobs",e.id]);},error:()=>{this.router.navigate(["/jobs",e.id]);}});},error:e=>{this.actionError.set(this.errorMessage(e,this.transloco.translate("shortcuts.list.runFailed")));}}));}deleteShortcut(t){this.actionError.set(null),this.shortcutsApi.delete(t).pipe(ue(this.destroyRef)).subscribe({next:()=>{this.nav.refresh(),this.shortcuts.update(o=>o.filter(e=>e.id!==t));},error:o=>{this.actionError.set(this.errorMessage(o,this.transloco.translate("shortcuts.list.deleteFailed")));}});}load(){this.loading.set(true),this.loadError.set(null),Ng({shortcuts:this.shortcutsApi.list(),workflows:this.workflowsApi.list()}).pipe(ue(this.destroyRef)).subscribe({next:({shortcuts:t,workflows:o})=>{this.shortcuts.set(t),this.workflows.set(o),this.loading.set(false),this.loadLatestJobs(t);},error:t=>{this.loading.set(false),this.loadError.set(this.errorMessage(t,this.transloco.translate("shortcuts.list.loadFailed")));}});}loadLatestJobs(t){let o=t.map(e=>e.lastJobId).filter(e=>e!=null);if(o.length===0){this.jobsById.set({});return}Ng(Object.fromEntries(o.map(e=>[e,this.jobsApi.get(e)]))).pipe(ue(this.destroyRef)).subscribe({next:e=>this.jobsById.set(e),error:()=>this.jobsById.set({})});}errorMessage(t,o){return t instanceof bi||t instanceof Error?t.message:o}static{this.\u0275fac=function(o){return new(o||i)};}static{this.\u0275cmp=ZE({type:i,selectors:[["app-shortcut-list"]],decls:11,vars:7,consts:[["data-testid","shortcuts-list",1,"list-page"],[1,"header"],["nz-button","","nzType","primary","routerLink","/shortcuts/new","data-testid","create-shortcut"],["data-testid","loading"],["data-testid","load-error",1,"error"],["data-testid","action-error",1,"error"],["data-testid","empty-state",1,"empty"],[3,"rows","selectable","showRowAction"],["nz-button","","nzType","primary","routerLink","/shortcuts/new","data-testid","empty-create"],[3,"rowAction","rows","selectable","showRowAction"]],template:function(o,e){o&1&&(_i(0,"main",0)(1,"header",1)(2,"h1"),Iw(3),Pw(4,"transloco"),Jc(),_i(5,"a",2),Iw(6),Pw(7,"transloco"),Jc()(),_D(8,G,3,3,"p",3)(9,H,2,1,"p",4)(10,Y,3,2),Jc()),o&2&&(gI(3),Lh(Fw(4,3,"shortcuts.list.title")),gI(3),rl(" ",Fw(7,5,"shortcuts.list.createButton")," "),gI(2),MD(e.loading()?8:e.loadError()?9:10));},dependencies:[$8,v3,pf,bd,sp,_n,we,Kt],styles:[".list-page[_ngcontent-%COMP%]{padding:1.25rem 1.5rem 3rem;display:flex;flex-direction:column;gap:1rem}.header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;gap:1rem;align-items:flex-start}.empty[_ngcontent-%COMP%]{text-align:center;padding:2.5rem 1rem;border:1px dashed #d6d3d1;background:#fff9}.empty[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0 0 1rem;color:#57534e}.error[_ngcontent-%COMP%]{color:#9f1239}"]});}}return i})();export{bt as ShortcutListComponent};
1
+ import {w as we}from'./chunk-Ce3aSFve.js';import {_ as _n}from'./chunk-BrckDrlX.js';import {C,b7 as m,b8 as y,$,R as J1,V as Ve,b as at,q as qo,U as Uw,u as ue,aW as Ng,c as bi,Z as ZE,d as $8,v as v3,Y as pf,a0 as bd,a1 as sp,K as Kt,j as _i,I as Iw,P as Pw,J as Jc,l as _D,o as gI,L as Lh,p as Fw,z as rl,M as MD,H as HD,G as FD,m as mh,w as lh,O as Fu,Q as ju}from'./main-Q5LNROCU.js';import {b}from'./chunk-BJVGVLQp.js';import'./chunk-DF1Zujdm.js';import'./chunk-djGmnQaE.js';function G(i,b){i&1&&(_i(0,"p",3),Iw(1),Pw(2,"transloco"),Jc()),i&2&&(gI(),Lh(Fw(2,1,"common.loading")));}function H(i,b){if(i&1&&(_i(0,"p",4),Iw(1),Jc()),i&2){let t=HD();gI(),Lh(t.loadError());}}function K(i,b){if(i&1&&(_i(0,"p",5),Iw(1),Jc()),i&2){let t=HD(2);gI(),Lh(t.actionError());}}function Q(i,b){i&1&&(_i(0,"section",6)(1,"p"),Iw(2),Pw(3,"transloco"),Jc(),_i(4,"a",8),Iw(5),Pw(6,"transloco"),Jc()()),i&2&&(gI(2),Lh(Fw(3,2,"shortcuts.list.emptyState")),gI(3),rl(" ",Fw(6,4,"shortcuts.list.emptyCreateButton")," "));}function X(i,b){if(i&1){let t=FD();_i(0,"app-runnable-items-table",9),mh("rowAction",function(e){Fu(t);let c=HD(2);return ju(c.onRowAction(e))}),Jc();}if(i&2){let t=HD(2);lh("rows",t.rows())("selectable",false)("showRowAction",true);}}function Y(i,b){if(i&1&&(_D(0,K,2,1,"p",5),_D(1,Q,7,6,"section",6)(2,X,1,3,"app-runnable-items-table",7)),i&2){let t=HD();MD(t.actionError()?0:-1),gI(),MD(t.shortcuts().length===0?1:2);}}var bt=(()=>{class i{constructor(){this.shortcutsApi=C(m),this.nav=C(y),this.workflowsApi=C(b),this.jobsApi=C($),this.router=C(J1),this.transloco=C(Ve),this.destroyRef=C(at),this.shortcuts=qo([]),this.workflows=qo([]),this.jobsById=qo({}),this.loading=qo(true),this.loadError=qo(null),this.actionError=qo(null),this.rows=Uw(()=>{let t=this.jobsById(),o=this.workflows();return this.shortcuts().map(e=>({id:e.id,primaryLabel:e.name,subtitle:o.find(c=>c.id===e.workflowId)?.name,latestJob:e.lastJobId?t[e.lastJobId]??null:null}))}),this.load();}onRowAction(t){let o=this.shortcuts().find(e=>e.id===t);o&&(this.actionError.set(null),this.jobsApi.start({workflowId:o.workflowId,inputValues:o.inputValues}).pipe(ue(this.destroyRef)).subscribe({next:e=>{this.shortcutsApi.update(o.id,{lastJobId:e.id}).pipe(ue(this.destroyRef)).subscribe({next:c=>{this.shortcuts.update(q=>q.map(C=>C.id===c.id?c:C)),this.router.navigate(["/jobs",e.id]);},error:()=>{this.router.navigate(["/jobs",e.id]);}});},error:e=>{this.actionError.set(this.errorMessage(e,this.transloco.translate("shortcuts.list.runFailed")));}}));}deleteShortcut(t){this.actionError.set(null),this.shortcutsApi.delete(t).pipe(ue(this.destroyRef)).subscribe({next:()=>{this.nav.refresh(),this.shortcuts.update(o=>o.filter(e=>e.id!==t));},error:o=>{this.actionError.set(this.errorMessage(o,this.transloco.translate("shortcuts.list.deleteFailed")));}});}load(){this.loading.set(true),this.loadError.set(null),Ng({shortcuts:this.shortcutsApi.list(),workflows:this.workflowsApi.list()}).pipe(ue(this.destroyRef)).subscribe({next:({shortcuts:t,workflows:o})=>{this.shortcuts.set(t),this.workflows.set(o),this.loading.set(false),this.loadLatestJobs(t);},error:t=>{this.loading.set(false),this.loadError.set(this.errorMessage(t,this.transloco.translate("shortcuts.list.loadFailed")));}});}loadLatestJobs(t){let o=t.map(e=>e.lastJobId).filter(e=>e!=null);if(o.length===0){this.jobsById.set({});return}Ng(Object.fromEntries(o.map(e=>[e,this.jobsApi.get(e)]))).pipe(ue(this.destroyRef)).subscribe({next:e=>this.jobsById.set(e),error:()=>this.jobsById.set({})});}errorMessage(t,o){return t instanceof bi||t instanceof Error?t.message:o}static{this.\u0275fac=function(o){return new(o||i)};}static{this.\u0275cmp=ZE({type:i,selectors:[["app-shortcut-list"]],decls:11,vars:7,consts:[["data-testid","shortcuts-list",1,"list-page"],[1,"header"],["nz-button","","nzType","primary","routerLink","/shortcuts/new","data-testid","create-shortcut"],["data-testid","loading"],["data-testid","load-error",1,"error"],["data-testid","action-error",1,"error"],["data-testid","empty-state",1,"empty"],[3,"rows","selectable","showRowAction"],["nz-button","","nzType","primary","routerLink","/shortcuts/new","data-testid","empty-create"],[3,"rowAction","rows","selectable","showRowAction"]],template:function(o,e){o&1&&(_i(0,"main",0)(1,"header",1)(2,"h1"),Iw(3),Pw(4,"transloco"),Jc(),_i(5,"a",2),Iw(6),Pw(7,"transloco"),Jc()(),_D(8,G,3,3,"p",3)(9,H,2,1,"p",4)(10,Y,3,2),Jc()),o&2&&(gI(3),Lh(Fw(4,3,"shortcuts.list.title")),gI(3),rl(" ",Fw(7,5,"shortcuts.list.createButton")," "),gI(2),MD(e.loading()?8:e.loadError()?9:10));},dependencies:[$8,v3,pf,bd,sp,_n,we,Kt],styles:[".list-page[_ngcontent-%COMP%]{padding:1.25rem 1.5rem 3rem;display:flex;flex-direction:column;gap:1rem}.header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;gap:1rem;align-items:flex-start}.empty[_ngcontent-%COMP%]{text-align:center;padding:2.5rem 1rem;border:1px dashed #d6d3d1;background:#fff9}.empty[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0 0 1rem;color:#57534e}.error[_ngcontent-%COMP%]{color:#9f1239}"]});}}return i})();export{bt as ShortcutListComponent};
@@ -1 +1 @@
1
- import {aZ as H,Z as ZE,a_ as D6,v as v3,a$ as Yc,a3 as Ah,a4 as Th,K as Kt,j as _i,x as xD,J as Jc,n as uh,o as gI,B as AD,I as Iw,P as Pw,aH as QD,H as HD,w as lh,E as Aw,aR as xw,D as ch,z as rl,p as Fw}from'./main-SI5AKDMC.js';var A=e=>["/manage",e],z=()=>({exact:true}),K=(e,i)=>i.path;function L(e,i){if(e&1&&(_i(0,"a",3,0),uh(2,"span",4),Iw(3),Pw(4,"transloco"),Jc()),e&2){let t=i.$implicit,n=QD(1),r=HD();lh("routerLink",Aw(8,A,t.path))("routerLinkActiveOptions",xw(10,z)),ch("data-testid","manage-tab-"+t.path),gI(2),lh("nzType",t.icon)("nzTheme",r.navIconTheme(n.isActive,t.icon)),gI(),rl(" ",Fw(4,6,t.labelKey)," ");}}var I=[{path:"workflows",labelKey:"manage.tab.workflows",icon:"partition"},{path:"views",labelKey:"manage.tab.views",icon:"appstore"},{path:"providers",labelKey:"manage.tab.providers",icon:"api"},{path:"context-files",labelKey:"manage.tab.contextFiles",icon:"file"},{path:"local-repositories",labelKey:"manage.tab.localRepositories",icon:"database"},{path:"worktrees",labelKey:"manage.tab.worktrees",icon:"deployment-unit"},{path:"preferences",labelKey:"manage.tab.preferences",icon:"setting"}],B=(()=>{class e{constructor(){this.tabs=I,this.navIconTheme=H;}static{this.\u0275fac=function(n){return new(n||e)};}static{this.\u0275cmp=ZE({type:e,selectors:[["app-manage-shell"]],decls:5,vars:0,consts:[["rla","routerLinkActive"],["data-testid","manage-shell",1,"manage-shell"],["data-testid","manage-tabs","role","tablist",1,"manage-tabs"],["role","tab","routerLinkActive","active",3,"routerLink","routerLinkActiveOptions"],["nz-icon","",1,"tab-icon",3,"nzType","nzTheme"]],template:function(n,r){n&1&&(_i(0,"section",1)(1,"nav",2),xD(2,L,5,11,"a",3,K),Jc(),uh(4,"router-outlet"),Jc()),n&2&&(gI(2),AD(r.tabs));},dependencies:[D6,v3,Yc,Ah,Th,Kt],styles:[".manage-shell[_ngcontent-%COMP%]{display:flex;flex-direction:column;min-height:100%}.manage-tabs[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:.25rem;padding:.5rem 1.5rem 0;border-bottom:1px solid var(--knoflows-border, #e1dacb);background:var(--knoflows-surface, #fff)}.manage-tabs[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.4rem;padding:.65rem .9rem;color:var(--knoflows-text-secondary, inherit);text-decoration:none;border-bottom:2px solid transparent;margin-bottom:-1px}.tab-icon[_ngcontent-%COMP%]{font-size:16px;color:currentColor}.manage-tabs[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{color:var(--knoflows-text, inherit)}.manage-tabs[_ngcontent-%COMP%] a.active[_ngcontent-%COMP%]{color:var(--knoflows-link, inherit);font-weight:600;border-bottom-color:var(--knoflows-link, currentColor)}"]});}}return e})();export{I as MANAGE_TABS,B as ManageShellComponent};
1
+ import {aZ as H,Z as ZE,a_ as D6,v as v3,a$ as Yc,a3 as Ah,a4 as Th,K as Kt,j as _i,x as xD,J as Jc,n as uh,o as gI,B as AD,I as Iw,P as Pw,aH as QD,H as HD,w as lh,E as Aw,aR as xw,D as ch,z as rl,p as Fw}from'./main-Q5LNROCU.js';var A=e=>["/manage",e],z=()=>({exact:true}),K=(e,i)=>i.path;function L(e,i){if(e&1&&(_i(0,"a",3,0),uh(2,"span",4),Iw(3),Pw(4,"transloco"),Jc()),e&2){let t=i.$implicit,n=QD(1),r=HD();lh("routerLink",Aw(8,A,t.path))("routerLinkActiveOptions",xw(10,z)),ch("data-testid","manage-tab-"+t.path),gI(2),lh("nzType",t.icon)("nzTheme",r.navIconTheme(n.isActive,t.icon)),gI(),rl(" ",Fw(4,6,t.labelKey)," ");}}var I=[{path:"workflows",labelKey:"manage.tab.workflows",icon:"partition"},{path:"views",labelKey:"manage.tab.views",icon:"appstore"},{path:"providers",labelKey:"manage.tab.providers",icon:"api"},{path:"context-files",labelKey:"manage.tab.contextFiles",icon:"file"},{path:"local-repositories",labelKey:"manage.tab.localRepositories",icon:"database"},{path:"worktrees",labelKey:"manage.tab.worktrees",icon:"deployment-unit"},{path:"preferences",labelKey:"manage.tab.preferences",icon:"setting"}],B=(()=>{class e{constructor(){this.tabs=I,this.navIconTheme=H;}static{this.\u0275fac=function(n){return new(n||e)};}static{this.\u0275cmp=ZE({type:e,selectors:[["app-manage-shell"]],decls:5,vars:0,consts:[["rla","routerLinkActive"],["data-testid","manage-shell",1,"manage-shell"],["data-testid","manage-tabs","role","tablist",1,"manage-tabs"],["role","tab","routerLinkActive","active",3,"routerLink","routerLinkActiveOptions"],["nz-icon","",1,"tab-icon",3,"nzType","nzTheme"]],template:function(n,r){n&1&&(_i(0,"section",1)(1,"nav",2),xD(2,L,5,11,"a",3,K),Jc(),uh(4,"router-outlet"),Jc()),n&2&&(gI(2),AD(r.tabs));},dependencies:[D6,v3,Yc,Ah,Th,Kt],styles:[".manage-shell[_ngcontent-%COMP%]{display:flex;flex-direction:column;min-height:100%}.manage-tabs[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:.25rem;padding:.5rem 1.5rem 0;border-bottom:1px solid var(--knoflows-border, #e1dacb);background:var(--knoflows-surface, #fff)}.manage-tabs[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.4rem;padding:.65rem .9rem;color:var(--knoflows-text-secondary, inherit);text-decoration:none;border-bottom:2px solid transparent;margin-bottom:-1px}.tab-icon[_ngcontent-%COMP%]{font-size:16px;color:currentColor}.manage-tabs[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{color:var(--knoflows-text, inherit)}.manage-tabs[_ngcontent-%COMP%] a.active[_ngcontent-%COMP%]{color:var(--knoflows-link, inherit);font-weight:600;border-bottom-color:var(--knoflows-link, currentColor)}"]});}}return e})();export{I as MANAGE_TABS,B as ManageShellComponent};
@@ -1 +1 @@
1
- import {U as Uy}from'./chunk-D3JZ8ur5.js';function p(t){switch(t){case "completed":return "success";case "failed":return "error";case "waiting_for_human":case "waiting_for_children":return "info";case "pending":case "cancelled":return "muted";case "planning":case "implementing":case "testing":return "primary"}}function d(t){switch(t){case "completed":return "success";case "failed":return "error";case "completed_with_issues":case "cancelled":return "warning";default:return null}}function m(t){switch(t){case "completed":return "success";case "failed":return "error";case "queued":case "waiting_for_children":return "info";case "running":return "primary";case "pending":case "skipped":return "muted"}}function a(t,e){if(!(!t||e==="dark"))switch(t){case "success":return "success";case "warning":return "warning";case "error":return "error";case "info":case "primary":case "muted":return}}function f(t,e){return !t||e!=="dark"&&!(t==="info"||t==="primary"||t==="muted")?"":`knoflows-tag-${t}`}function x(t,e){return f(p(t),e)}function h(t,e){return a(p(t),e)}function y(t,e){return f(d(t),e)}function S(t,e){return a(d(t),e)}function T(t,e){return f(m(t),e)}function _(t,e){return a(m(t),e)}var g=new Set(["completed","failed","cancelled"]);function C(t){return t==="agent"||t==="shell"||t==="git"||t==="provider_action"}function w(t){return g.has(t)}function I(t){let e=t.stepHistory.find(r=>r.status==="running");if(e)return e;let n=t.stepHistory.find(r=>r.status==="queued");if(n)return n;if((t.status==="waiting_for_human"||t.status==="waiting_for_children")&&t.currentStepExecutionId){let r=t.stepHistory.find(i=>i.id===t.currentStepExecutionId);if(r)return r}return w(t.status)&&t.stepHistory.length>0?t.stepHistory[t.stepHistory.length-1]??null:null}function k(t,e){let n=new Map;for(let r of e)n.set(r.stepDefinitionId,r);return t.map(r=>{let i=n.get(r.id)??null;return {definition:r,execution:i,reached:i!=null}})}function O(t){if(!t)return null;if(t.mode==="single"){let n=t.subject;return `${n.id} \xB7 ${n.title}`}let e=t.subjects.length;if(e===0)return null;if(e===1){let n=t.subjects[0];return `${n.id} \xB7 ${n.title}`}return `${e} subjects`}function b(t){let e=t.workflowSnapshot?.name??t.workflowId;return t.subjectContext?t.subjectContext.mode==="single"?`${e} \u2014 ${t.subjectContext.subject.title}`:`${e} \u2014 ${t.subjectContext.subjects.length} items`:e}function v(t,e,n,r){let i=t.findIndex(s=>s.id===n);if(!(i<0))for(let s=i-1;s>=0;s-=1){let o=t[s];if(o.type!=="agent")continue;let c=e.find(u=>u.stepDefinitionId===o.id);if(c?.output!==void 0)return c.output;if(Object.prototype.hasOwnProperty.call(r.context,o.id))return r.context[o.id]}}function D(t){let e=t.waitingEvent;if(e&&e.questions.length>0)return e.questions;let n=e?.data??t.selectedOutput??t.priorOutput,r=Uy(t.interaction,n);return r.length>0?r:e?.data!=null?[JSON.stringify(e.data,null,2)]:[]}function E(t){return t.waitingEvent?.data??t.selectedOutput??t.priorOutput}function H(t){if(!t||typeof t!="object")return [];let e=t.questions;if(!Array.isArray(e))return [];let n=new Set,r=[];return e.forEach((i,s)=>{let o="",c="";if(typeof i=="string")c=i.trim();else if(i&&typeof i=="object"){let u=i;typeof u.prompt=="string"&&(c=u.prompt.trim()),typeof u.id=="string"&&(o=u.id.trim());}if(c){if(!o){let u=`q${s+1}`;for(;n.has(u);)u=`${u}_${s}`;o=u;}n.add(o),r.push({id:o,prompt:c});}}),r}function A(t,e){return t.every(n=>(e[n.id]??"").trim()!=="")}function P(t,e,n){let r={};for(let s of t)r[s.id]=(e[s.id]??"").trim();let i=n.trim();return i&&(r.additionalComments=i),r}function J(t,e){let n=e.trim();return n?{approved:t,comment:n}:{approved:t}}export{A,C,D,E,H,I,J,O,P,S,T,_,b,h,k,v,w,x,y};
1
+ import {T as Ty}from'./chunk-XJrnAloK.js';function p(t){switch(t){case "completed":return "success";case "failed":return "error";case "waiting_for_human":case "waiting_for_children":return "info";case "pending":case "cancelled":return "muted";case "planning":case "implementing":case "testing":return "primary"}}function d(t){switch(t){case "completed":return "success";case "failed":return "error";case "completed_with_issues":case "cancelled":return "warning";default:return null}}function m(t){switch(t){case "completed":return "success";case "failed":return "error";case "queued":case "waiting_for_children":return "info";case "running":return "primary";case "pending":case "skipped":return "muted"}}function a(t,e){if(!(!t||e==="dark"))switch(t){case "success":return "success";case "warning":return "warning";case "error":return "error";case "info":case "primary":case "muted":return}}function f(t,e){return !t||e!=="dark"&&!(t==="info"||t==="primary"||t==="muted")?"":`knoflows-tag-${t}`}function x(t,e){return f(p(t),e)}function h(t,e){return a(p(t),e)}function y(t,e){return f(d(t),e)}function S(t,e){return a(d(t),e)}function T(t,e){return f(m(t),e)}function _(t,e){return a(m(t),e)}var g=new Set(["completed","failed","cancelled"]);function C(t){return t==="agent"||t==="shell"||t==="git"||t==="provider_action"}function w(t){return g.has(t)}function I(t){let e=t.stepHistory.find(r=>r.status==="running");if(e)return e;let n=t.stepHistory.find(r=>r.status==="queued");if(n)return n;if((t.status==="waiting_for_human"||t.status==="waiting_for_children")&&t.currentStepExecutionId){let r=t.stepHistory.find(i=>i.id===t.currentStepExecutionId);if(r)return r}return w(t.status)&&t.stepHistory.length>0?t.stepHistory[t.stepHistory.length-1]??null:null}function k(t,e){let n=new Map;for(let r of e)n.set(r.stepDefinitionId,r);return t.map(r=>{let i=n.get(r.id)??null;return {definition:r,execution:i,reached:i!=null}})}function O(t){if(!t)return null;if(t.mode==="single"){let n=t.subject;return `${n.id} \xB7 ${n.title}`}let e=t.subjects.length;if(e===0)return null;if(e===1){let n=t.subjects[0];return `${n.id} \xB7 ${n.title}`}return `${e} subjects`}function b(t){let e=t.workflowSnapshot?.name??t.workflowId;return t.subjectContext?t.subjectContext.mode==="single"?`${e} \u2014 ${t.subjectContext.subject.title}`:`${e} \u2014 ${t.subjectContext.subjects.length} items`:e}function v(t,e,n,r){let i=t.findIndex(s=>s.id===n);if(!(i<0))for(let s=i-1;s>=0;s-=1){let o=t[s];if(o.type!=="agent")continue;let c=e.find(u=>u.stepDefinitionId===o.id);if(c?.output!==void 0)return c.output;if(Object.prototype.hasOwnProperty.call(r.context,o.id))return r.context[o.id]}}function D(t){let e=t.waitingEvent;if(e&&e.questions.length>0)return e.questions;let n=e?.data??t.selectedOutput??t.priorOutput,r=Ty(t.interaction,n);return r.length>0?r:e?.data!=null?[JSON.stringify(e.data,null,2)]:[]}function E(t){return t.waitingEvent?.data??t.selectedOutput??t.priorOutput}function H(t){if(!t||typeof t!="object")return [];let e=t.questions;if(!Array.isArray(e))return [];let n=new Set,r=[];return e.forEach((i,s)=>{let o="",c="";if(typeof i=="string")c=i.trim();else if(i&&typeof i=="object"){let u=i;typeof u.prompt=="string"&&(c=u.prompt.trim()),typeof u.id=="string"&&(o=u.id.trim());}if(c){if(!o){let u=`q${s+1}`;for(;n.has(u);)u=`${u}_${s}`;o=u;}n.add(o),r.push({id:o,prompt:c});}}),r}function A(t,e){return t.every(n=>(e[n.id]??"").trim()!=="")}function P(t,e,n){let r={};for(let s of t)r[s.id]=(e[s.id]??"").trim();let i=n.trim();return i&&(r.additionalComments=i),r}function J(t,e){let n=e.trim();return n?{approved:t,comment:n}:{approved:t}}export{A,C,D,E,H,I,J,O,P,S,T,_,b,h,k,v,w,x,y};
@@ -1 +1 @@
1
- import {a7 as KE,a8 as fu,C,bV as XI,bf as _r,ab as Oe,ae as Le$1,bW as Bl,bX as _l,Z as ZE,a3 as Ah,a4 as Th,ai as ly,av as K0,aj as $D,ak as UD,l as _D,o as gI,M as MD,m as mh,aP as Mh,al as Sh,bY as qn,bZ as $n,G as FD,j as _i,J as Jc,O as Fu,H as HD,Q as ju}from'./main-SI5AKDMC.js';var V=["*"];function x(o,A){if(o&1){let n=FD();_i(0,"nz-icon",1),mh("click",function(e){Fu(n);let i=HD();return ju(i.closeTag(e))}),Jc();}}var I=(()=>{class o{renderer=C(XI);el=C(_r).nativeElement;dir=C(Oe).valueSignal;nzMode="default";nzColor;nzChecked=false;nzBordered=true;nzOnClose=new Le$1;nzCheckedChange=new Le$1;isPresetColor=false;updateCheckedStatus(){this.nzMode==="checkable"&&(this.nzChecked=!this.nzChecked,this.nzCheckedChange.emit(this.nzChecked));}closeTag(n){this.nzOnClose.emit(n),n.defaultPrevented||this.renderer.removeChild(this.renderer.parentNode(this.el),this.el);}clearPresetColor(){let n=new RegExp(`(ant-tag-(?:${[...qn,...$n].join("|")}))`,"g"),t=this.el.classList.toString(),e=[],i=n.exec(t);for(;i!==null;)e.push(i[1]),i=n.exec(t);this.el.classList.remove(...e);}setPresetColor(){this.clearPresetColor(),this.nzColor?this.isPresetColor=Bl(this.nzColor)||_l(this.nzColor):this.isPresetColor=false,this.isPresetColor&&this.el.classList.add(`ant-tag-${this.nzColor}`);}ngOnChanges(n){let{nzColor:t}=n;t&&this.setPresetColor();}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=ZE({type:o,selectors:[["nz-tag"]],hostAttrs:[1,"ant-tag"],hostVars:12,hostBindings:function(t,e){t&1&&mh("click",function(){return e.updateCheckedStatus()}),t&2&&(Mh("background-color",e.isPresetColor?"":e.nzColor),Sh("ant-tag-has-color",e.nzColor&&!e.isPresetColor)("ant-tag-checkable",e.nzMode==="checkable")("ant-tag-checkable-checked",e.nzChecked)("ant-tag-rtl",e.dir()==="rtl")("ant-tag-borderless",!e.nzBordered));},inputs:{nzMode:"nzMode",nzColor:"nzColor",nzChecked:[2,"nzChecked","nzChecked",K0],nzBordered:[2,"nzBordered","nzBordered",K0]},outputs:{nzOnClose:"nzOnClose",nzCheckedChange:"nzCheckedChange"},exportAs:["nzTag"],features:[ly],ngContentSelectors:V,decls:2,vars:1,consts:[["nzType","close","tabindex","-1",1,"ant-tag-close-icon"],["nzType","close","tabindex","-1",1,"ant-tag-close-icon",3,"click"]],template:function(t,e){t&1&&($D(),UD(0),_D(1,x,1,0,"nz-icon",0)),t&2&&(gI(),MD(e.nzMode==="closeable"?1:-1));},dependencies:[Ah,Th],encapsulation:2})}return o})(),W=(()=>{class o{static \u0275fac=function(t){return new(t||o)};static \u0275mod=KE({type:o});static \u0275inj=fu({imports:[I]})}return o})();export{I,W};
1
+ import {a7 as KE,a8 as fu,C,bV as XI,bf as _r,ab as Oe,ae as Le$1,bW as Bl,bX as _l,Z as ZE,a3 as Ah,a4 as Th,ai as ly,av as K0,aj as $D,ak as UD,l as _D,o as gI,M as MD,m as mh,aP as Mh,al as Sh,bY as qn,bZ as $n,G as FD,j as _i,J as Jc,O as Fu,H as HD,Q as ju}from'./main-Q5LNROCU.js';var V=["*"];function x(o,A){if(o&1){let n=FD();_i(0,"nz-icon",1),mh("click",function(e){Fu(n);let i=HD();return ju(i.closeTag(e))}),Jc();}}var I=(()=>{class o{renderer=C(XI);el=C(_r).nativeElement;dir=C(Oe).valueSignal;nzMode="default";nzColor;nzChecked=false;nzBordered=true;nzOnClose=new Le$1;nzCheckedChange=new Le$1;isPresetColor=false;updateCheckedStatus(){this.nzMode==="checkable"&&(this.nzChecked=!this.nzChecked,this.nzCheckedChange.emit(this.nzChecked));}closeTag(n){this.nzOnClose.emit(n),n.defaultPrevented||this.renderer.removeChild(this.renderer.parentNode(this.el),this.el);}clearPresetColor(){let n=new RegExp(`(ant-tag-(?:${[...qn,...$n].join("|")}))`,"g"),t=this.el.classList.toString(),e=[],i=n.exec(t);for(;i!==null;)e.push(i[1]),i=n.exec(t);this.el.classList.remove(...e);}setPresetColor(){this.clearPresetColor(),this.nzColor?this.isPresetColor=Bl(this.nzColor)||_l(this.nzColor):this.isPresetColor=false,this.isPresetColor&&this.el.classList.add(`ant-tag-${this.nzColor}`);}ngOnChanges(n){let{nzColor:t}=n;t&&this.setPresetColor();}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=ZE({type:o,selectors:[["nz-tag"]],hostAttrs:[1,"ant-tag"],hostVars:12,hostBindings:function(t,e){t&1&&mh("click",function(){return e.updateCheckedStatus()}),t&2&&(Mh("background-color",e.isPresetColor?"":e.nzColor),Sh("ant-tag-has-color",e.nzColor&&!e.isPresetColor)("ant-tag-checkable",e.nzMode==="checkable")("ant-tag-checkable-checked",e.nzChecked)("ant-tag-rtl",e.dir()==="rtl")("ant-tag-borderless",!e.nzBordered));},inputs:{nzMode:"nzMode",nzColor:"nzColor",nzChecked:[2,"nzChecked","nzChecked",K0],nzBordered:[2,"nzBordered","nzBordered",K0]},outputs:{nzOnClose:"nzOnClose",nzCheckedChange:"nzCheckedChange"},exportAs:["nzTag"],features:[ly],ngContentSelectors:V,decls:2,vars:1,consts:[["nzType","close","tabindex","-1",1,"ant-tag-close-icon"],["nzType","close","tabindex","-1",1,"ant-tag-close-icon",3,"click"]],template:function(t,e){t&1&&($D(),UD(0),_D(1,x,1,0,"nz-icon",0)),t&2&&(gI(),MD(e.nzMode==="closeable"?1:-1));},dependencies:[Ah,Th],encapsulation:2})}return o})(),W=(()=>{class o{static \u0275fac=function(t){return new(t||o)};static \u0275mod=KE({type:o});static \u0275inj=fu({imports:[I]})}return o})();export{I,W};
@@ -0,0 +1 @@
1
+ import {A as At}from'./chunk-Dgi_aaUY.js';import'./chunk-CepRGzVJ.js';import {l}from'./chunk-D19C8Gcb.js';import {I,_,b as b$1,v,T,y,h,E,P,A,j}from'./chunk-DiKEYJdn.js';import {w,F,L}from'./chunk-DX21GXyA.js';import {H as He}from'./chunk-DP75g4hD.js';import {z as ze,S as St}from'./chunk-CtFtOXy4.js';import {f}from'./chunk-96ta9Sdz.js';import {o as ot$2}from'./chunk-CuBg4N16.js';import'./chunk-BrckDrlX.js';import {f as f$1}from'./chunk-8INlEe9b.js';import {C,a as C1,R as J1,b as at,V as Ve,bo as O,bp as de,ba as Se,q as qo$1,U as Uw,u as ue,s,r as r$1,c as bi$1,Z as ZE,d as $8,e as al,bb as er$1,f as rl,g as $i$1,v as v3,Y as pf,a0 as bd,a1 as sp,a2 as fp,h as ex,F as Fm,A as Am,K as Kt,j as _i$1,I as Iw,J as Jc,P as Pw,l as _D,m as mh,o as gI,L as Lh,p as Fw,M as MD,w as lh,z as rl$1,b0 as jn$1,a5 as q0,a6 as U0,T as id,t as t$1,bq as Ja,b1 as ts,x as xD,D as ch,B as AD,G as FD,H as HD,k as iE,N as ND,aO as SD,y as aE,a7 as KE,a8 as fu,aE as J0,av as K0,br as pn,bs as G0,bf as _r$1,bt as Ee,bg as Ci$1,ab as Oe,bu as ml,aD as Nr,bh as Bt,bv as pl,bw as Gw,bx as z0,by as Qr,bz as tl,bA as kr,bB as Xf,W as qw,bC as il,a3 as Ah,a4 as Th,bD as hl,au as w5,aj as $D,aw as rh,aT as Vw,bj as Nw,bk as St$1,bE as fn,bl as wo$1,bF as oD,bG as ir$1,aG as lw,bH as wh,bI as zD,bJ as Dh,bK as W0,bm as Xc,bL as yh,bn as el,al as Sh,n as uh,az as jw,E as Aw,aH as QD,O as Fu,Q as ju,bM as Hh,bN as Vh,ak as UD,aL as Fh,aR as xw,bO as Tw}from'./main-Q5LNROCU.js';import {b}from'./chunk-BJVGVLQp.js';import {N as Nt,K as Ke}from'./chunk-BgIY3xBH.js';import {G as Gn$1,u as un}from'./chunk-DaP135hJ.js';import {a as ai$1,z,o as ot$1,b as at$1,i as it$1,r as rt}from'./chunk-wu6SvZ0s.js';import {W,I as I$1}from'./chunk-DvI50p6W.js';import {w as w_,A as Ad,c as c_,n as ng,i as im,G as G_,a as nm,J as J_,F as F_,k as kg,U as Uu,j as j_}from'./chunk-XJrnAloK.js';import {L as Lt,u as ut}from'./chunk-DF1Zujdm.js';import'./chunk-djGmnQaE.js';var Dn=["input"],Ln=["inputNumberHost"],On=[[["","nzInputAddonBefore",""]],[["","nzInputAddonAfter",""]],[["","nzInputPrefix",""]],[["","nzInputSuffix",""]],[["","nzInputNumberUpIcon",""]],[["","nzInputNumberDownIcon",""]]],Wn=["[nzInputAddonBefore]","[nzInputAddonAfter]","[nzInputPrefix]","[nzInputSuffix]","[nzInputNumberUpIcon]","[nzInputNumberDownIcon]"];function jn(i,l){}function Rn(i,l){if(i&1&&rh(0,jn,0,0,"ng-template",8),i&2){HD();let e=QD(4);lh("ngTemplateOutlet",e);}}function Kn(i,l){}function Hn(i,l){if(i&1&&rh(0,Kn,0,0,"ng-template",8),i&2){HD();let e=QD(8);lh("ngTemplateOutlet",e);}}function qn(i,l){}function Gn(i,l){if(i&1&&rh(0,qn,0,0,"ng-template",8),i&2){HD();let e=QD(12);lh("ngTemplateOutlet",e);}}function Un(i,l){if(i&1&&Iw(0),i&2){let e=HD(3);Lh(e.nzAddonBefore());}}function Jn(i,l){i&1&&(_i$1(0,"div",10),UD(1,0,null,Un,1,1),Jc());}function Zn(i,l){}function Qn(i,l){if(i&1&&rh(0,Zn,0,0,"ng-template",8),i&2){HD(2);let e=QD(6);lh("ngTemplateOutlet",e);}}function Yn(i,l){}function Xn(i,l){if(i&1&&rh(0,Yn,0,0,"ng-template",8),i&2){HD(2);let e=QD(10);lh("ngTemplateOutlet",e);}}function ei(i,l){if(i&1&&Iw(0),i&2){let e=HD(3);Lh(e.nzAddonAfter());}}function ti(i,l){i&1&&(_i$1(0,"div",10),UD(1,1,null,ei,1,1),Jc());}function ni(i,l){if(i&1&&(_i$1(0,"div",9),_D(1,Jn,3,0,"div",10),_D(2,Qn,1,1,null,8)(3,Xn,1,1,null,8),_D(4,ti,3,0,"div",10),Jc()),i&2){let e=HD();gI(),MD(e.hasAddonBefore()?1:-1),gI(),MD(e.hasAffix()?2:3),gI(2),MD(e.hasAddonAfter()?4:-1);}}function ii(i,l){}function oi(i,l){if(i&1&&(_i$1(0,"div"),rh(1,ii,0,0,"ng-template",8),Jc()),i&2){let e=HD(),t=QD(8);lw(e.affixWrapperClass()),gI(),lh("ngTemplateOutlet",t);}}function ri(i,l){if(i&1&&Iw(0),i&2){let e=HD(3);Lh(e.nzPrefix());}}function ai(i,l){i&1&&(_i$1(0,"span",11),UD(1,2,null,ri,1,1),Jc());}function si(i,l){}function li(i,l){if(i&1&&Iw(0),i&2){let e=HD(3);Lh(e.nzSuffix());}}function pi(i,l){if(i&1&&uh(0,"nz-form-item-feedback-icon",13),i&2){let e=HD(3);lh("status",e.finalStatus());}}function di(i,l){if(i&1&&(_i$1(0,"span",12),UD(1,3,null,li,1,1),_D(3,pi,1,1,"nz-form-item-feedback-icon",13),Jc()),i&2){let e=HD(2);gI(3),MD(e.hasFeedback()&&e.finalStatus()?3:-1);}}function ci(i,l){if(i&1&&(_D(0,ai,3,0,"span",11),rh(1,si,0,0,"ng-template",8),_D(2,di,4,1,"span",12)),i&2){let e=HD(),t=QD(10);MD(e.hasPrefix()?0:-1),gI(),lh("ngTemplateOutlet",t),gI(),MD(e.hasSuffix()?2:-1);}}function _i(i,l){}function mi(i,l){if(i&1&&(_i$1(0,"div",null,5),rh(2,_i,0,0,"ng-template",8),Jc()),i&2){let e=HD(),t=QD(12);lw(e.inputNumberClass()),gI(2),lh("ngTemplateOutlet",t);}}function ui(i,l){i&1&&uh(0,"nz-icon",20);}function Ci(i,l){i&1&&uh(0,"nz-icon",21);}function xi(i,l){if(i&1){let e=FD();_i$1(0,"div",17,7),mh("mouseup",function(){Fu(e);let n=HD(2);return ju(n.stopAutoStep())})("mouseleave",function(){Fu(e);let n=HD(2);return ju(n.stopAutoStep())}),_i$1(2,"span",18),mh("mousedown",function(n){Fu(e);let o=HD(2);return ju(o.onStepMouseDown(n,true))}),UD(3,4,null,ui,1,0),Jc(),_i$1(5,"span",19),mh("mousedown",function(n){Fu(e);let o=HD(2);return ju(o.onStepMouseDown(n,false))}),UD(6,5,null,Ci,1,0),Jc()();}if(i&2){let e=HD(2);gI(2),Sh("ant-input-number-handler-up-disabled",e.upDisabled()),ch("aria-disabled",e.upDisabled()),gI(3),Sh("ant-input-number-handler-down-disabled",e.downDisabled()),ch("aria-disabled",e.downDisabled());}}function fi(i,l){if(i&1){let e=FD();_D(0,xi,8,6,"div",14),_i$1(1,"div",15)(2,"input",16,6),mh("input",function(){Fu(e);let n=QD(3),o=HD();return ju(o.onInput(n.value))})("wheel",function(n){Fu(e);let o=HD();return ju(o.onWheel(n))}),Jc()();}if(i&2){let e=HD();MD(e.nzControls()?0:-1),gI(2),lh("value",e.displayValue())("placeholder",e.nzPlaceHolder()??"")("disabled",e.finalDisabled())("readOnly",e.nzReadOnly()),ch("aria-valuemin",e.nzMin())("aria-valuemax",e.nzMax())("id",e.nzId())("step",e.nzStep())("value",e.displayValue());}}var ot=(()=>{class i{nzId=q0(null);nzSize=q0("default");nzPlaceHolder=q0(null);nzStatus=q0("");nzVariant=q0();nzStep=q0(1,{transform:J0});nzMin=q0(Number.MIN_SAFE_INTEGER,{transform:J0});nzMax=q0(Number.MAX_SAFE_INTEGER,{transform:J0});nzPrecision=q0(null);nzParser=q0();nzFormatter=q0();nzDisabled=q0(false,{transform:K0});nzReadOnly=q0(false,{transform:K0});nzAutoFocus=q0(false,{transform:K0});nzKeyboard=q0(true,{transform:K0});nzControls=q0(true,{transform:K0});nzChangeOnWheel=q0(true,{transform:K0});nzPrefix=q0();nzSuffix=q0();nzAddonBefore=q0();nzAddonAfter=q0();nzBlur=U0();nzFocus=U0();nzOnStep=U0();onChange=()=>{};onTouched=()=>{};isDisabledFirstChange=true;compactSize=C(pn,{optional:true});inputRef=G0.required("input");hostRef=G0("inputNumberHost");elementRef=C(_r$1);injector=C(Ee);focusMonitor=C(Ci$1);directionality=C(Oe);nzFormStatusService=C(ml,{optional:true});autoStepTimer=null;defaultFormatter=e=>{let t=this.nzPrecision();return Nr(t)?e.toFixed(t):e.toString()};value=qo$1(null);displayValue=qo$1("");formSize=C(Bt,{optional:true});formVariant=C(pl,{optional:true});dir=C(Oe).valueSignal;focused=qo$1(false);hasFeedback=qo$1(false);finalStatus=Gw(()=>this.nzStatus());finalDisabled=Gw(()=>this.nzDisabled());prefix=z0(ot$1);suffix=z0(at$1);addonBefore=z0(it$1);addonAfter=z0(rt);hasPrefix=Uw(()=>!!this.nzPrefix()||!!this.prefix());hasSuffix=Uw(()=>!!this.nzSuffix()||!!this.suffix()||this.hasFeedback());hasAffix=Uw(()=>this.hasPrefix()||this.hasSuffix());hasAddonBefore=Uw(()=>!!this.nzAddonBefore()||!!this.addonBefore());hasAddonAfter=Uw(()=>!!this.nzAddonAfter()||!!this.addonAfter());hasAddon=Uw(()=>this.hasAddonBefore()||this.hasAddonAfter());class=Uw(()=>this.hasAddon()?this.groupWrapperClass():this.hasAffix()?this.affixWrapperClass():this.inputNumberClass());inputNumberClass=Uw(()=>r$1(r$1({"ant-input-number":true,"ant-input-number-lg":this.finalSize()==="large","ant-input-number-sm":this.finalSize()==="small","ant-input-number-disabled":this.finalDisabled(),"ant-input-number-readonly":this.nzReadOnly(),"ant-input-number-focused":this.focused(),"ant-input-number-rtl":this.dir()==="rtl","ant-input-number-in-form-item":!!this.nzFormStatusService,"ant-input-number-out-of-range":this.value()!==null&&!it(this.value(),this.nzMin(),this.nzMax())},tl("ant-input-number",this.finalVariant())),Qr("ant-input-number",this.finalStatus(),this.hasFeedback())));affixWrapperClass=Uw(()=>r$1(r$1({"ant-input-number-affix-wrapper":true,"ant-input-number-affix-wrapper-disabled":this.finalDisabled(),"ant-input-number-affix-wrapper-readonly":this.nzReadOnly(),"ant-input-number-affix-wrapper-focused":this.focused(),"ant-input-number-affix-wrapper-rtl":this.dir()==="rtl"},Qr("ant-input-number-affix-wrapper",this.finalStatus(),this.hasFeedback())),tl("ant-input-number-affix-wrapper",this.finalVariant())));groupWrapperClass=Uw(()=>r$1(r$1({"ant-input-number-group-wrapper":true,"ant-input-number-group-wrapper-rtl":this.dir()==="rtl"},Qr("ant-input-number-group-wrapper",this.finalStatus(),this.hasFeedback())),tl("ant-input-number-group-wrapper",this.finalVariant())));finalSize=Uw(()=>this.formSize?.()?this.formSize():this.compactSize?this.compactSize():this.nzSize());finalVariant=Uw(()=>this.nzVariant()||this.formVariant?.()||"outlined");upDisabled=Uw(()=>!kr(this.value())&&this.value()>=this.nzMax());downDisabled=Uw(()=>!kr(this.value())&&this.value()<=this.nzMin());constructor(){let e=C(at);Xf(()=>{let t=this.hostRef(),n=t||this.elementRef;this.focusMonitor.monitor(n,true).pipe(ue(e)).subscribe(o=>{qw(()=>{this.focused.set(!!o),o?this.nzFocus.emit():(this.fixValue(),this.onTouched(),this.nzBlur.emit());});}),e.onDestroy(()=>{this.focusMonitor.stopMonitoring(n);});}),this.nzFormStatusService?.formStatusChanges.pipe(ue()).subscribe(({status:t,hasFeedback:n})=>{this.finalStatus.set(t),this.hasFeedback.set(n);});}ngOnInit(){this.nzAutoFocus()&&Xf(()=>this.focus(),{injector:this.injector});}writeValue(e){kr(e)&&(e=null),qw(()=>{this.value.set(e),this.setValue(e);});}registerOnChange(e){this.onChange=e;}registerOnTouched(e){this.onTouched=e;}setDisabledState(e){qw(()=>{this.finalDisabled.set(this.isDisabledFirstChange&&this.nzDisabled()||e);}),this.isDisabledFirstChange=false;}focus(e){il(this.inputRef().nativeElement,e);}blur(){this.inputRef().nativeElement.blur();}step(e,t,n){if(t&&this.upDisabled()||!t&&this.downDisabled())return;let o=e.shiftKey?this.nzStep()*10:this.nzStep();t||(o=-o);let T=10**vn(o),J=bn((Math.round((this.value()||0)*T)+Math.round(o*T))/T,this.nzMin(),this.nzMax(),this.nzPrecision());this.setValue(J),this.nzOnStep.emit({type:t?"up":"down",value:this.value(),offset:this.nzStep(),emitter:n}),this.focus();}setValue(e){let t=this.nzFormatter()??this.defaultFormatter,n=this.nzPrecision();Nr(n)&&(e&&=+e.toFixed(n));let o=kr(e)?"":t(e);this.displayValue.set(o),this.updateValue(e);}setValueByTyping(e){if(this.displayValue.set(e),e===""){this.updateValue(null);return}let n=(this.nzParser()??hn)(e);if(bi(e)||Number.isNaN(n))return;let o=this.nzFormatter();if(o){let d=o(n);this.displayValue.set(d);}it(n,this.nzMin(),this.nzMax())&&this.updateValue(n);}updateValue(e){this.value()!==e&&(this.value.set(e),this.onChange(e));}fixValue(){let e=this.displayValue();if(e==="")return;let n=(this.nzParser()??hn)(e);if(Number.isNaN(n))n=this.value();else {let o=this.nzPrecision();Nr(o)&&vn(n)!==o&&(n=+n.toFixed(o)),it(n,this.nzMin(),this.nzMax())||(n=bn(n,this.nzMin(),this.nzMax(),o));}this.setValue(n);}stopAutoStep(){this.autoStepTimer!==null&&(clearTimeout(this.autoStepTimer),this.autoStepTimer=null);}onStepMouseDown(e,t){e.preventDefault(),this.stopAutoStep(),this.step(e,t,"handler");let n=()=>{this.step(e,t,"handler"),this.autoStepTimer=setTimeout(n,gi);};this.autoStepTimer=setTimeout(n,hi);}onKeyDown(e){switch(e.keyCode){case 38:e.preventDefault(),this.nzKeyboard()&&this.step(e,true,"keyboard");break;case 40:e.preventDefault(),this.nzKeyboard()&&this.step(e,false,"keyboard");break;case 13:this.fixValue();break}}onInput(e){this.setValueByTyping(e);}onWheel(e){this.finalDisabled()||this.nzReadOnly()||!this.nzChangeOnWheel()||(e.preventDefault(),this.step(e,e.deltaY<0,"wheel"));}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=ZE({type:i,selectors:[["nz-input-number"]],contentQueries:function(t,n,o){t&1&&Dh(o,n.prefix,ot$1,5)(o,n.suffix,at$1,5)(o,n.addonBefore,it$1,5)(o,n.addonAfter,rt,5),t&2&&zD(4);},viewQuery:function(t,n){t&1&&wh(n.inputRef,Dn,5)(n.hostRef,Ln,5),t&2&&zD(2);},hostVars:2,hostBindings:function(t,n){t&1&&mh("keydown",function(d){return n.onKeyDown(d)}),t&2&&lw(n.class());},inputs:{nzId:[1,"nzId"],nzSize:[1,"nzSize"],nzPlaceHolder:[1,"nzPlaceHolder"],nzStatus:[1,"nzStatus"],nzVariant:[1,"nzVariant"],nzStep:[1,"nzStep"],nzMin:[1,"nzMin"],nzMax:[1,"nzMax"],nzPrecision:[1,"nzPrecision"],nzParser:[1,"nzParser"],nzFormatter:[1,"nzFormatter"],nzDisabled:[1,"nzDisabled"],nzReadOnly:[1,"nzReadOnly"],nzAutoFocus:[1,"nzAutoFocus"],nzKeyboard:[1,"nzKeyboard"],nzControls:[1,"nzControls"],nzChangeOnWheel:[1,"nzChangeOnWheel"],nzPrefix:[1,"nzPrefix"],nzSuffix:[1,"nzSuffix"],nzAddonBefore:[1,"nzAddonBefore"],nzAddonAfter:[1,"nzAddonAfter"]},outputs:{nzBlur:"nzBlur",nzFocus:"nzFocus",nzOnStep:"nzOnStep"},exportAs:["nzInputNumber"],features:[Nw([{provide:St$1,useExisting:wo$1(()=>i),multi:true},{provide:fn,useValue:"input-number"}]),oD([ir$1])],ngContentSelectors:Wn,decls:13,vars:1,consts:[["inputNumberWithAddonInner",""],["inputNumberWithAffix",""],["inputNumberWithAffixInner",""],["inputNumber",""],["inputNumberInner",""],["inputNumberHost",""],["input",""],["handlers",""],[3,"ngTemplateOutlet"],[1,"ant-input-number-wrapper","ant-input-number-group"],[1,"ant-input-number-group-addon"],[1,"ant-input-number-prefix"],[1,"ant-input-number-suffix"],[3,"status"],[1,"ant-input-number-handler-wrap"],[1,"ant-input-number-input-wrap"],["autocomplete","off","role","spinbutton",1,"ant-input-number-input",3,"input","wheel","value","placeholder","disabled","readOnly"],[1,"ant-input-number-handler-wrap",3,"mouseup","mouseleave"],["role","button","unselectable","on",1,"ant-input-number-handler","ant-input-number-handler-up",3,"mousedown"],["role","button","unselectable","on",1,"ant-input-number-handler","ant-input-number-handler-down",3,"mousedown"],["nzType","up",1,"ant-input-number-handler-up-inner"],["nzType","down",1,"ant-input-number-handler-down-inner"]],template:function(t,n){t&1&&($D(On),_D(0,Rn,1,1,null,8)(1,Hn,1,1,null,8)(2,Gn,1,1,null,8),rh(3,ni,5,3,"ng-template",null,0,Vw)(5,oi,2,3,"ng-template",null,1,Vw)(7,ci,3,3,"ng-template",null,2,Vw)(9,mi,3,3,"ng-template",null,3,Vw)(11,fi,4,10,"ng-template",null,4,Vw)),t&2&&MD(n.hasAddon()?0:n.hasAffix()?1:2);},dependencies:[Ah,Th,hl,w5],encapsulation:2})}return i})(),gi=200,hi=600;function hn(i){let l=i.trim().replace(/,/g,"").replace(/。/g,".");return l.length?+l:NaN}function it(i,l,e){return i>=l&&i<=e}function bn(i,l,e,t=null){if(t===null)return i<l?l:i>e?e:i;let n=+i.toFixed(t),o=Math.pow(10,t);return n<l?Math.ceil(l*o)/o:n>e?Math.floor(e*o)/o:n}function vn(i){return i.toString().split(".")[1]?.length||0}function bi(i){return /[.。](\d*0)?$/.test(i.toString())}var wn=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=KE({type:i});static \u0275inj=fu({imports:[ot]})}return i})();var wi=(i,l)=>l.id;function Si(i,l){if(i&1&&uh(0,"nz-option",2),i&2){let e=l.$implicit;lh("nzValue",e.id)("nzLabel",e.name);}}var Sn=(()=>{class i{constructor(){this.reposApi=C(f$1),this.destroyRef=C(at),this.path=W0(""),this.repoSelected=U0(),this.repos=qo$1([]),this.selectedCatalogId=Uw(()=>{let e=this.path();return this.repos().find(t=>t.localPath===e)?.id??null}),this.reposApi.list().pipe(ue(this.destroyRef)).subscribe({next:e=>this.repos.set(e),error:()=>this.repos.set([])});}onCatalogSelect(e){if(!e)return;let t=this.repos().find(n=>n.id===e);t&&this.repoSelected.emit(t);}static{this.\u0275fac=function(t){return new(t||i)};}static{this.\u0275cmp=ZE({type:i,selectors:[["app-repo-path-picker"]],inputs:{path:[1,"path"]},outputs:{path:"pathChange",repoSelected:"repoSelected"},decls:7,vars:8,consts:[["data-testid","repo-path-picker",1,"repo-path-picker"],["data-testid","repo-path-catalog",1,"catalog",3,"ngModelChange","ngModel","nzPlaceHolder"],[3,"nzValue","nzLabel"],["mode","directories",3,"pathChange","path","browseLabel"]],template:function(t,n){t&1&&(_i$1(0,"div",0)(1,"nz-select",1),Pw(2,"transloco"),mh("ngModelChange",function(d){return n.onCatalogSelect(d)}),xD(3,Si,1,2,"nz-option",2,wi),Jc(),iE(),_i$1(5,"app-path-picker",3),Pw(6,"transloco"),mh("pathChange",function(d){return n.path.set(d)}),Jc()()),t&2&&(gI(),lh("ngModel",n.selectedCatalogId())("nzPlaceHolder",Fw(2,4,"step-list.createWorktree.catalogPlaceholder")),aE(),gI(2),AD(n.repos()),gI(2),lh("path",n.path())("browseLabel",Fw(6,6,"step-list.createWorktree.browseManually")));},dependencies:[$8,al,rl,$i$1,ex,Fm,Am,ot$2,Kt],styles:["[_nghost-%COMP%]{display:block}.repo-path-picker[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.catalog[_ngcontent-%COMP%]{width:100%}"]});}}return i})();var yi=i=>({action:i}),zi=i=>({fields:i}),yn=(i,l)=>l.token,Mi=(i,l)=>l.subjectType,Ei=(i,l)=>l.id+l.name;function ki(i,l){i&1&&(Xc(0,"p",7),Iw(1),Pw(2,"transloco"),el()),i&2&&(gI(),rl$1(" ",Fw(2,1,"step-list.availableParameters.subWorkflowForEach")," "));}function Ti(i,l){if(i&1){let e=FD();Xc(0,"li")(1,"span",13),Iw(2),el(),Xc(3,"button",14),yh("click",function(){let n=Fu(e).$implicit,o=HD(3);return ju(o.copyToken(n.token))}),Iw(4),el()();}if(i&2){let e=l.$implicit,t=HD(3);gI(2),Lh(e.label),gI(),Sh("copied",t.copiedToken()===e.token),ch("data-testid","copy-token")("data-token",e.token),gI(),rl$1(" ",e.token," ");}}function Ii(i,l){if(i&1&&(Xc(0,"div",8)(1,"h5"),Iw(2),Pw(3,"transloco"),el(),Xc(4,"ul"),xD(5,Ti,5,6,"li",null,yn),el()()),i&2){let e=HD(2);gI(2),Lh(Fw(3,1,"step-list.availableParameters.inputs")),gI(3),AD(e.inputEntries());}}function Ni(i,l){if(i&1&&(Xc(0,"p",16),Iw(1),Pw(2,"transloco"),el()),i&2){let e=HD().$implicit;gI(),Lh(Fw(2,1,e.typeKey));}}function Fi(i,l){if(i&1){let e=FD();Xc(0,"li")(1,"button",14),yh("click",function(){let n=Fu(e).$implicit,o=HD(4);return ju(o.copyToken(n.token))}),Iw(2),el()();}if(i&2){let e=l.$implicit,t=HD(4);gI(),Sh("copied",t.copiedToken()===e.token),ch("data-testid","copy-token")("data-token",e.token),gI(),rl$1(" ",e.token," ");}}function Pi(i,l){if(i&1&&(_D(0,Ni,3,3,"p",16),Xc(1,"ul"),xD(2,Fi,3,5,"li",null,yn),el()),i&2){let e=l.$implicit,t=HD(3);MD(t.subjectGroups().length>1?0:-1),gI(2),AD(e.tokens);}}function Vi(i,l){if(i&1&&(Xc(0,"div",9)(1,"h5",15),Iw(2),Pw(3,"transloco"),el(),xD(4,Pi,4,1,null,null,Mi),el()),i&2){let e=HD(2);gI(2),Fh(" ",Fw(3,2,"step-list.availableParameters.subject")," (",e.subjectTypeHeading(),") "),gI(2),AD(e.subjectGroups());}}function Ai(i,l){i&1&&(Xc(0,"p",11),Iw(1),Pw(2,"transloco"),el()),i&2&&(gI(),rl$1(" ",Fw(2,1,"step-list.availableParameters.noPrevious")," "));}function $i(i,l){i&1&&(Xc(0,"span",19),Iw(1),Pw(2,"transloco"),el()),i&2&&(gI(),rl$1(" ",Fw(2,1,"step-list.availableParameters.loopOverwrite")," "));}function Bi(i,l){i&1&&(Xc(0,"p",5),Iw(1),Pw(2,"transloco"),el()),i&2&&(gI(),Lh(Fw(2,1,"step-list.availableParameters.missingId")));}function Di(i,l){if(i&1){let e=FD();Xc(0,"button",14),yh("click",function(){let n=Fu(e).$implicit,o=HD(5);return ju(o.copyToken(n))}),Iw(1),el();}if(i&2){let e=l.$implicit,t=HD(5);Sh("copied",t.copiedToken()===e),ch("data-testid","copy-token")("data-token",e),gI(),rl$1(" ",e," ");}}function Li(i,l){if(i&1&&(Xc(0,"div",20),xD(1,Di,2,5,"button",25,ND),el()),i&2){let e=HD().$implicit;gI(),AD(e.tokens);}}function Oi(i,l){if(i&1&&(Xc(0,"p",21),Iw(1),Pw(2,"transloco"),el()),i&2){let e=HD().$implicit;gI(),rl$1(" ",jw(2,1,"step-list.availableParameters.providerOpaque",Aw(4,yi,e.actionLabel))," ");}}function Wi(i,l){i&1&&(Xc(0,"p",21),Iw(1),Pw(2,"transloco"),el()),i&2&&(gI(),rl$1(" ",Fw(2,1,"step-list.availableParameters.interactionOpaque")," "));}function ji(i,l){if(i&1&&(Xc(0,"p",22),Iw(1),Pw(2,"transloco"),el()),i&2){let e=HD().$implicit,t=HD(3);gI(),rl$1(" ",jw(2,1,"step-list.availableParameters.arrayOf",Aw(4,zi,t.arrayFields(e)))," ");}}function Ri(i,l){i&1&&(Xc(0,"p",23),Iw(1),Pw(2,"transloco"),el()),i&2&&(gI(),rl$1(" ",Fw(2,1,"step-list.availableParameters.subjectTypeUnion")," "));}function Ki(i,l){i&1&&(Xc(0,"p",24),Iw(1),Pw(2,"transloco"),el()),i&2&&(gI(),rl$1(" ",Fw(2,1,"step-list.availableParameters.noOutput")," "));}function Hi(i,l){if(i&1&&(Xc(0,"li",17),Pw(1,"transloco"),Xc(2,"div",18)(3,"span",13),Iw(4),el(),_D(5,$i,3,3,"span",19),el(),_D(6,Bi,3,3,"p",5),_D(7,Li,3,0,"div",20),_D(8,Oi,3,6,"p",21),_D(9,Wi,3,3,"p",21),_D(10,ji,3,6,"p",22),_D(11,Ri,3,3,"p",23),_D(12,Ki,3,3,"p",24),el()),i&2){let e=l.$implicit;ch("data-testid","previous-step-"+e.id)("title",e.inLoop?Fw(1,11,"step-list.availableParameters.loopOverwrite"):null),gI(4),Lh(e.name||e.id),gI(),MD(e.inLoop?5:-1),gI(),MD(e.id?-1:6),gI(),MD(e.tokens.length>0?7:-1),gI(),MD(e.shape.opaque&&e.isProvider?8:-1),gI(),MD(e.shape.opaque&&e.isInteraction?9:-1),gI(),MD(e.shape.isArray&&(e.shape.fields?.length??0)>0?10:-1),gI(),MD(e.shape.fieldsDependOnSubjectType?11:-1),gI(),MD(!e.shape.opaque&&(e.shape.fields?.length??0)===0&&!e.shape.isScalar?12:-1);}}function qi(i,l){if(i&1&&(Xc(0,"ul",12),xD(1,Hi,13,13,"li",17,Ei),el()),i&2){let e=HD(2);gI(),AD(e.previousEntries());}}function Gi(i,l){if(i&1&&(Xc(0,"div",4)(1,"p",5),Iw(2),Pw(3,"transloco"),el(),Xc(4,"p",6),Iw(5),Pw(6,"transloco"),el(),_D(7,ki,3,3,"p",7),_D(8,Ii,7,3,"div",8),_D(9,Vi,6,4,"div",9),Xc(10,"div",10)(11,"h5"),Iw(12),Pw(13,"transloco"),el(),_D(14,Ai,3,3,"p",11)(15,qi,3,0,"ul",12),el()()),i&2){let e=HD();gI(2),Lh(Fw(3,7,"step-list.availableParameters.hint")),gI(3),rl$1(" ",Fw(6,9,"step-list.availableParameters.condition")," "),gI(2),MD(e.currentStepType()==="sub_workflow"?7:-1),gI(),MD(e.inputEntries().length>0?8:-1),gI(),MD(e.subjectGroups().length>0?9:-1),gI(3),Lh(Fw(13,11,"step-list.availableParameters.previous")),gI(2),MD(e.previousEntries().length===0?14:15);}}var zn=(()=>{class i{constructor(){this.transloco=C(Ve),this.inputSchema=q0([]),this.appliesTo=q0("none"),this.previousSteps=q0([]),this.currentStepType=q0(null),this.expanded=qo$1(false),this.copiedToken=qo$1(null),this.inputEntries=Uw(()=>this.inputSchema().map(e=>({label:e.label.trim()||e.name,name:e.name.trim()})).filter(e=>e.name.length>0).map(e=>({label:e.label,token:nm(e.name)}))),this.subjectGroups=Uw(()=>J_(this.appliesTo()).map(e=>({subjectType:e.subjectType,typeKey:`workflow-editor.subjectType.${e.subjectType}`,tokens:e.fields.map(t=>({field:t,token:nm(`subject.${t}`)}))}))),this.previousEntries=Uw(()=>this.previousSteps().map(({step:e,inLoop:t})=>{let n=e;return {name:n.name,id:n.id,inLoop:t,shape:kg(n,this.appliesTo()),tokens:F_(n,this.appliesTo()),actionLabel:Ui(n),isProvider:n.type==="provider_action",isInteraction:n.type==="interaction"}}));}toggleExpanded(){this.expanded.update(e=>!e);}subjectTypeHeading(){return this.subjectGroups().map(e=>this.transloco.translate(e.typeKey)).join(", ")}arrayFields(e){return (e.shape.fields??[]).join(", ")}copyToken(e){let t=navigator.clipboard;if(!t?.writeText){this.copiedToken.set(e);return}t.writeText(e).then(()=>this.copiedToken.set(e),()=>this.copiedToken.set(e));}static{this.\u0275fac=function(t){return new(t||i)};}static{this.\u0275cmp=ZE({type:i,selectors:[["app-available-parameters"]],inputs:{inputSchema:[1,"inputSchema"],appliesTo:[1,"appliesTo"],previousSteps:[1,"previousSteps"],currentStepType:[1,"currentStepType"]},decls:8,vars:8,consts:[["data-testid","available-parameters",1,"available-parameters"],["type","button","data-testid","available-parameters-toggle",1,"panel-toggle",3,"click"],["aria-hidden","true",1,"chevron"],[1,"panel-title"],["data-testid","available-parameters-body",1,"panel-body"],[1,"hint"],["data-testid","step-condition-note",1,"hint"],["data-testid","sub-workflow-foreach-note",1,"hint"],["data-testid","available-parameters-inputs",1,"group"],["data-testid","available-parameters-subject",1,"group"],["data-testid","available-parameters-previous",1,"group"],["data-testid","available-parameters-no-previous",1,"hint"],[1,"previous-list"],[1,"entry-label"],["type","button",1,"param-token",3,"click"],["data-testid","available-parameters-subject-heading"],[1,"subject-type"],[1,"previous-entry"],[1,"previous-heading"],["data-testid","loop-overwrite-note",1,"loop-note"],[1,"token-row"],["data-testid","opaque-note",1,"hint"],["data-testid","array-note",1,"hint"],["data-testid","subject-type-union-note",1,"hint"],["data-testid","no-output-note",1,"hint"],["type","button",1,"param-token",3,"copied"]],template:function(t,n){t&1&&(Xc(0,"section",0)(1,"button",1),yh("click",function(){return n.toggleExpanded()}),Xc(2,"span",2),Iw(3),el(),Xc(4,"span",3),Iw(5),Pw(6,"transloco"),el()(),_D(7,Gi,16,13,"div",4),el()),t&2&&(Sh("expanded",n.expanded()),gI(),ch("aria-expanded",n.expanded()),gI(2),Lh(n.expanded()?"\u25BE":"\u25B8"),gI(2),Lh(Fw(6,6,"step-list.availableParameters.title")),gI(2),MD(n.expanded()?7:-1));},dependencies:[Kt],styles:[".available-parameters[_ngcontent-%COMP%]{margin:.85rem 0 .25rem;padding:.35rem .65rem;border:1px solid #e7e5e4;border-radius:.5rem;background:#fafaf9}.available-parameters.expanded[_ngcontent-%COMP%]{padding:.65rem .75rem .75rem}.panel-toggle[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.4rem;width:100%;margin:0;padding:.2rem 0;border:0;background:transparent;cursor:pointer;text-align:left;color:inherit}.chevron[_ngcontent-%COMP%]{color:#78716c;font-size:.85rem;width:.9rem}.available-parameters[_ngcontent-%COMP%] h5[_ngcontent-%COMP%]{margin:0 0 .35rem}.panel-title[_ngcontent-%COMP%]{font-size:.95rem;font-weight:600}.panel-body[_ngcontent-%COMP%]{margin-top:.5rem}.available-parameters[_ngcontent-%COMP%] h5[_ngcontent-%COMP%]{font-size:.8rem;text-transform:uppercase;letter-spacing:.03em;color:#57534e}.hint[_ngcontent-%COMP%]{margin:0 0 .5rem;font-size:.8rem;color:#78716c}.group[_ngcontent-%COMP%]{margin-top:.65rem}.group[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:.35rem .5rem}.previous-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.65rem}.previous-entry[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.3rem}.previous-heading[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:.35rem .65rem;align-items:baseline}.entry-label[_ngcontent-%COMP%]{font-size:.85rem;font-weight:600;color:#44403c}.loop-note[_ngcontent-%COMP%]{font-size:.75rem;color:#78716c}.subject-type[_ngcontent-%COMP%]{margin:.35rem 0 .2rem;font-size:.8rem;color:#57534e}.token-row[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:.35rem}.param-token[_ngcontent-%COMP%]{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:.75rem;line-height:1.2;padding:.15rem .45rem;border:1px solid #d6d3d1;border-radius:.3rem;background:#fff;color:#1c1917;cursor:pointer}.param-token[_ngcontent-%COMP%]:hover{border-color:#a8a29e}.param-token.copied[_ngcontent-%COMP%]{border-color:#57534e;background:#e7e5e4}"]});}}return i})();function Ui(i){return i.type!=="provider_action"?"":i.extendedAction?.actionId??i.action}function Ji(i,l){if(i&1&&(uh(0,"nz-option",3),Pw(1,"transloco")),i&2){let e=l.$implicit,t=HD();lh("nzValue",e)("nzLabel",Fw(1,2,t.typeKey(e)));}}function Zi(i,l){if(i&1){let e=FD();_i$1(0,"label",1)(1,"span"),Iw(2),Pw(3,"transloco"),Jc(),_i$1(4,"input",4),mh("ngModelChange",function(n){Fu(e);let o=HD();return ju(o.setValue(n))}),Jc(),iE(),Jc();}if(i&2){let e=HD();gI(2),Lh(Fw(3,3,"step-list.fieldCondition.value")),gI(2),lh("ngModel",e.valueText()),ch("data-testid",e.testIdPrefix()+"-value"),aE();}}var Qi=["field_empty","field_equals"],Mn=(()=>{class i{constructor(){this.condition=q0.required(),this.testIdPrefix=q0("field-condition"),this.conditionChange=U0(),this.conditionTypes=Qi;}typeKey(e){return `step-list.untilType.${e}`}valueText(){let e=this.condition();return e.type!=="field_equals"?"":Xi(e.value)}setType(e){let t=this.condition();if(e==="field_empty"){this.conditionChange.emit({type:e,stepId:t.stepId,field:t.field});return}let n=t.type==="field_equals"?t.value:"";this.conditionChange.emit({type:e,stepId:t.stepId,field:t.field,value:n});}setField(e,t){this.conditionChange.emit(s(r$1({},this.condition()),{[e]:t}));}setValue(e){let t=this.condition();t.type==="field_equals"&&this.conditionChange.emit(s(r$1({},t),{value:Yi(e)}));}static{this.\u0275fac=function(t){return new(t||i)};}static{this.\u0275cmp=ZE({type:i,selectors:[["app-field-condition-editor"]],inputs:{condition:[1,"condition"],testIdPrefix:[1,"testIdPrefix"]},outputs:{conditionChange:"conditionChange"},decls:19,vars:17,consts:[[1,"field-grid"],[1,"field"],[3,"ngModelChange","ngModel"],[3,"nzValue","nzLabel"],["nz-input","",3,"ngModelChange","ngModel"]],template:function(t,n){t&1&&(_i$1(0,"div",0)(1,"div",1)(2,"span"),Iw(3),Pw(4,"transloco"),Jc(),_i$1(5,"nz-select",2),mh("ngModelChange",function(d){return n.setType(d)}),xD(6,Ji,2,4,"nz-option",3,ND),Jc(),iE(),Jc(),_i$1(8,"label",1)(9,"span"),Iw(10),Pw(11,"transloco"),Jc(),_i$1(12,"input",4),mh("ngModelChange",function(d){return n.setField("stepId",d)}),Jc(),iE(),Jc(),_i$1(13,"label",1)(14,"span"),Iw(15),Pw(16,"transloco"),Jc(),_i$1(17,"input",4),mh("ngModelChange",function(d){return n.setField("field",d)}),Jc(),iE(),Jc(),_D(18,Zi,5,5,"label",1),Jc()),t&2&&(ch("data-testid",n.testIdPrefix()),gI(3),Lh(Fw(4,11,"step-list.fieldCondition.type")),gI(2),lh("ngModel",n.condition().type),ch("data-testid",n.testIdPrefix()+"-type"),aE(),gI(),AD(n.conditionTypes),gI(4),Lh(Fw(11,13,"step-list.fieldCondition.stepId")),gI(2),lh("ngModel",n.condition().stepId),ch("data-testid",n.testIdPrefix()+"-stepId"),aE(),gI(3),Lh(Fw(16,15,"step-list.fieldCondition.field")),gI(2),lh("ngModel",n.condition().field),ch("data-testid",n.testIdPrefix()+"-field"),aE(),gI(),MD(n.condition().type==="field_equals"?18:-1));},dependencies:[al,er$1,rl,$i$1,ai$1,z,ex,Fm,Am,Kt],styles:[".field-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(auto-fit,minmax(12rem,1fr));gap:.5rem 1rem}.field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.35rem;margin:.65rem 0}.field[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{font-size:.85rem;color:#57534e}"]});}}return i})();function En(){return {type:"field_empty",stepId:"",field:""}}function Yi(i){let l=i.trim();if(l==="")return "";try{return JSON.parse(l)}catch(e){return i}}function Xi(i){if(i===void 0)return "";if(typeof i=="string")try{return JSON.parse(i),JSON.stringify(i)}catch(l){return i}return JSON.stringify(i)}function eo(i,l){if(i&1){let e=FD();_i$1(0,"div",1)(1,"input",3),Hh("ngModelChange",function(n){let o=Fu(e).$implicit;return Tw(o.key,n)||(o.key=n),ju(n)}),mh("ngModelChange",function(){Fu(e);let n=HD();return ju(n.emitRows())}),Jc(),iE(),_i$1(2,"input",4),Hh("ngModelChange",function(n){let o=Fu(e).$implicit;return Tw(o.value,n)||(o.value=n),ju(n)}),mh("ngModelChange",function(){Fu(e);let n=HD();return ju(n.emitRows())}),Jc(),iE(),_i$1(3,"button",5),mh("click",function(){let n=Fu(e).$index,o=HD();return ju(o.remove(n))}),Iw(4,"Remove"),Jc()();}if(i&2){let e=l.$implicit;gI(),Vh("ngModel",e.key),aE(),gI(),Vh("ngModel",e.value),aE();}}var Nn=(()=>{class i{constructor(){this.rows=W0.required();}add(){this.rows.update(e=>[...e,{key:"",value:""}]);}remove(e){this.rows.update(t=>t.filter((n,o)=>o!==e));}emitRows(){this.rows.set(this.rows().map(e=>r$1({},e)));}static{this.\u0275fac=function(t){return new(t||i)};}static{this.\u0275cmp=ZE({type:i,selectors:[["app-key-value-editor"]],inputs:{rows:[1,"rows"]},outputs:{rows:"rowsChange"},decls:5,vars:0,consts:[[1,"kv-editor"],[1,"kv-row"],["nz-button","","nzType","dashed","type","button",3,"click"],["nz-input","","placeholder","key",3,"ngModelChange","ngModel"],["nz-input","","placeholder","value",3,"ngModelChange","ngModel"],["nz-button","","nzType","default","type","button",3,"click"]],template:function(t,n){t&1&&(_i$1(0,"div",0),xD(1,eo,5,2,"div",1,SD),_i$1(3,"button",2),mh("click",function(){return n.add()}),Iw(4,"Add param"),Jc()()),t&2&&(gI(),AD(n.rows()));},dependencies:[al,er$1,rl,$i$1,pf,bd,sp,fp,ai$1,z],styles:[".kv-editor[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.kv-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr auto;gap:.5rem;align-items:center}"]});}}return i})();function $e(i,l){let e=Uu(i);return L(l,e).map(t=>t.id)}function Pn(i,l){return $e(i,l)[0]??""}function Fn(i,l,e){let t=$e(l,e);if(t.includes(i))return null;let n=(e?.providerInstances??[]).find(o=>o.id===i);return n?j_(n)&&Uu(l).includes(n.subjectType)?null:{required:i,active:t[0]??n.id}:{required:i,active:t[0]??""}}function Vn(i,l,e){if(i.extendedAction?.providerId){let t=Fn(i.extendedAction.providerId,l,e);if(t)return t}return i.target?.source?Fn(i.target.source,i.target.subjectType,e):null}function An(i){return i.extendedAction!=null}var $n=()=>[];function io(i,l){return this.trackKey(l)}var he=(i,l)=>l.id,oo=(i,l)=>l.actionId,ro=(i,l)=>l.name;function ao(i,l){if(i&1&&(uh(0,"nz-option",15),Pw(1,"transloco")),i&2){let e=l.$implicit,t=HD(3);lh("nzValue",e)("nzLabel",Fw(1,2,t.stepTypeKey(e)));}}function so(i,l){if(i&1){let e=FD();_i$1(0,"app-field-condition-editor",24),mh("conditionChange",function(n){Fu(e);let o=HD(2).$index,d=HD();return ju(d.patchAt(o,{condition:n}))}),Jc();}if(i&2){let e=HD(2).$index;lh("condition",l)("testIdPrefix","step-condition-"+e);}}function lo(i,l){if(i&1&&(uh(0,"nz-option",15),Pw(1,"transloco")),i&2){let e=l.$implicit,t=HD(4);lh("nzValue",e)("nzLabel",Fw(1,2,t.outputFormatKey(e)));}}function po(i,l){if(i&1&&uh(0,"nz-option",15),i&2){let e=l.$implicit;lh("nzValue",e.id)("nzLabel",e.displayName);}}function co(i,l){if(i&1){let e=FD();_i$1(0,"nz-tag",31),mh("nzOnClose",function(){let n=Fu(e).$implicit,o=HD(3).$index,d=HD();return ju(d.removeContextFile(o,n.id))}),Iw(1),Jc();}if(i&2){let e=l.$implicit;ch("data-testid","context-file-chip-"+e.id),gI(),rl$1(" ",e.name," ");}}function _o(i,l){i&1&&(_i$1(0,"span",29),Iw(1),Pw(2,"transloco"),Jc()),i&2&&(gI(),Lh(Fw(2,1,"step-list.contextFilesEmpty")));}function mo(i,l){if(i&1){let e=FD();_i$1(0,"label",16)(1,"span"),Iw(2),Pw(3,"transloco"),Jc(),_i$1(4,"textarea",25),mh("ngModelChange",function(n){Fu(e);let o=HD(2).$index,d=HD();return ju(d.patchAt(o,{objective:n}))}),Jc(),iE(),Jc(),_i$1(5,"div",16)(6,"span"),Iw(7),Pw(8,"transloco"),Jc(),_i$1(9,"nz-select",26),mh("ngModelChange",function(n){Fu(e);let o=HD(2).$index,d=HD();return ju(d.patchAt(o,{outputFormat:n}))}),xD(10,lo,2,4,"nz-option",15,ND),Jc(),iE(),Jc(),_i$1(12,"div",16)(13,"span"),Iw(14),Pw(15,"transloco"),Jc(),_i$1(16,"nz-select",26),mh("ngModelChange",function(n){Fu(e);let o=HD(2).$index,d=HD();return ju(d.setAgentInstance(o,n))}),uh(17,"nz-option",15),Pw(18,"transloco"),xD(19,po,1,2,"nz-option",15,he),Jc(),iE(),Jc(),_i$1(21,"div",16)(22,"span"),Iw(23),Pw(24,"transloco"),Jc(),_i$1(25,"div",27),xD(26,co,2,2,"nz-tag",28,he,false,_o,3,3,"span",29),Jc(),_i$1(29,"button",30),mh("click",function(){Fu(e);let n=HD(2).$index,o=HD();return ju(o.openContextFilePicker(n))}),Iw(30),Pw(31,"transloco"),Jc()();}if(i&2){let e=HD(2),t=e.$implicit,n=e.$index,o=HD();gI(),ch("data-testid","agent-prompt-label-"+n),gI(),Lh(Fw(3,17,"step-list.objective")),gI(2),lh("ngModel",o.asAgent(t).objective),ch("data-testid","agent-objective-"+n),aE(),gI(3),Lh(Fw(8,19,"step-list.outputFormat.label")),gI(2),lh("ngModel",o.asAgent(t).outputFormat),ch("data-testid","agent-output-"+n),aE(),gI(),AD(o.outputFormats),gI(4),Lh(Fw(15,21,"step-list.agentInstance.label")),gI(2),lh("ngModel",o.asAgent(t).agentInstanceId??null),ch("data-testid","agent-instance-"+n),aE(),gI(),lh("nzValue",null)("nzLabel",Fw(18,23,"step-list.agentInstance.default")),gI(2),AD(o.agentInstanceOptions()),gI(2),ch("data-testid","agent-context-files-"+n),gI(2),Lh(Fw(24,25,"step-list.contextFiles")),gI(3),AD(o.selectedContextFiles(o.asAgent(t))),gI(3),ch("data-testid","select-context-files-"+n),gI(),rl$1(" ",Fw(31,27,"step-list.selectContextFiles")," ");}}function uo(i,l){if(i&1&&(uh(0,"nz-option",15),Pw(1,"transloco")),i&2){let e=l.$implicit,t=HD(4);lh("nzValue",e)("nzLabel",Fw(1,2,t.interactionKey(e)));}}function Co(i,l){if(i&1&&uh(0,"nz-option",15),i&2){let e=l.$implicit;lh("nzValue",e.id)("nzLabel",e.label);}}function xo(i,l){i&1&&(_i$1(0,"p",19),Iw(1),Pw(2,"transloco"),Jc()),i&2&&(gI(),Lh(Fw(2,1,"step-list.sourceStepIds.empty")));}function fo(i,l){i&1&&(_i$1(0,"p",19),Iw(1),Pw(2,"transloco"),Jc()),i&2&&(gI(),Lh(Fw(2,1,"step-list.sourceStepIds.hint")));}function go(i,l){if(i&1){let e=FD();_i$1(0,"div",16)(1,"span"),Iw(2),Pw(3,"transloco"),Jc(),_i$1(4,"nz-select",32),mh("ngModelChange",function(n){Fu(e);let o=HD(3).$index,d=HD();return ju(d.patchAt(o,{sourceStepIds:n}))}),xD(5,Co,1,2,"nz-option",15,he),Jc(),iE(),_D(7,xo,3,3,"p",19)(8,fo,3,3,"p",19),Jc();}if(i&2){let e=HD(3),t=e.$implicit,n=e.$index,o=HD();ch("data-testid","comment-review-sources-"+n),gI(2),Lh(Fw(3,5,"step-list.sourceStepIds.label")),gI(2),lh("ngModel",o.asInteraction(t).sourceStepIds??xw(7,$n)),ch("data-testid","comment-review-source-ids-"+n),aE(),gI(),AD(o.commentSuggestionSources(t)),gI(2),MD(o.commentSuggestionSources(t).length===0?7:8);}}function ho(i,l){if(i&1){let e=FD();_i$1(0,"div",16)(1,"span"),Iw(2),Pw(3,"transloco"),Jc(),_i$1(4,"nz-select",26),mh("ngModelChange",function(n){Fu(e);let o=HD(2).$index,d=HD();return ju(d.onInteractionChange(o,n))}),xD(5,uo,2,4,"nz-option",15,ND),Jc(),iE(),Jc(),_D(7,go,9,8,"div",16);}if(i&2){let e=HD(2),t=e.$implicit,n=e.$index,o=HD();gI(2),Lh(Fw(3,4,"step-list.interaction.label")),gI(2),lh("ngModel",o.asInteraction(t).interaction),ch("data-testid","interaction-type-"+n),aE(),gI(),AD(o.interactions),gI(2),MD(o.asInteraction(t).interaction==="comment_review"?7:-1);}}function bo(i,l){if(i&1){let e=FD();_i$1(0,"label",16)(1,"span"),Iw(2),Pw(3,"transloco"),Jc(),_i$1(4,"textarea",25),mh("ngModelChange",function(n){Fu(e);let o=HD(2).$index,d=HD();return ju(d.patchAt(o,{command:n}))}),Jc(),iE(),Jc();}if(i&2){let e=HD(2),t=e.$implicit,n=e.$index,o=HD();gI(2),Lh(Fw(3,3,"step-list.command")),gI(2),lh("ngModel",o.asShell(t).command),ch("data-testid","shell-command-"+n),aE();}}function vo(i,l){if(i&1&&(uh(0,"nz-option",15),Pw(1,"transloco")),i&2){let e=l.$implicit,t=HD(4);lh("nzValue",e)("nzLabel",Fw(1,2,t.onNoMatchKey(e)));}}function wo(i,l){if(i&1){let e=FD();_i$1(0,"label",16)(1,"span"),Iw(2),Pw(3,"transloco"),Jc(),_i$1(4,"textarea",33),mh("ngModelChange",function(n){Fu(e);let o=HD(2).$index,d=HD();return ju(d.patchAt(o,{source:n}))}),Jc(),iE(),Jc(),_i$1(5,"label",16)(6,"span"),Iw(7),Pw(8,"transloco"),Jc(),_i$1(9,"input",18),mh("ngModelChange",function(n){Fu(e);let o=HD(2).$index,d=HD();return ju(d.patchAt(o,{path:n}))}),Jc(),iE(),Jc(),_i$1(10,"label",16)(11,"span"),Iw(12),Pw(13,"transloco"),Jc(),_i$1(14,"input",18),mh("ngModelChange",function(n){Fu(e);let o=HD(2).$index,d=HD();return ju(d.patchAt(o,{pattern:n}))}),Jc(),iE(),Jc(),_i$1(15,"div",16)(16,"span"),Iw(17),Pw(18,"transloco"),Jc(),_i$1(19,"nz-select",26),mh("ngModelChange",function(n){Fu(e);let o=HD(2).$index,d=HD();return ju(d.patchAt(o,{onNoMatch:n}))}),xD(20,vo,2,4,"nz-option",15,ND),Jc(),iE(),Jc();}if(i&2){let e=HD(2),t=e.$implicit,n=e.$index,o=HD();gI(2),Lh(Fw(3,12,"step-list.extract.source")),gI(2),lh("ngModel",o.asExtract(t).source),ch("data-testid","extract-source-"+n),aE(),gI(3),Lh(Fw(8,14,"step-list.extract.path")),gI(2),lh("ngModel",o.asExtract(t).path??""),ch("data-testid","extract-path-"+n),aE(),gI(3),Lh(Fw(13,16,"step-list.extract.pattern")),gI(2),lh("ngModel",o.asExtract(t).pattern??""),ch("data-testid","extract-pattern-"+n),aE(),gI(3),Lh(Fw(18,18,"step-list.extract.onNoMatch")),gI(2),lh("ngModel",o.asExtract(t).onNoMatch),ch("data-testid","extract-on-no-match-"+n),aE(),gI(),AD(o.extractOnNoMatchActions);}}function So(i,l){if(i&1&&(uh(0,"nz-option",15),Pw(1,"transloco")),i&2){let e=l.$implicit,t=HD(4);lh("nzValue",e)("nzLabel",Fw(1,2,t.gitOperationKey(e)));}}function yo(i,l){if(i&1){let e=FD();_i$1(0,"div",16)(1,"span"),Iw(2),Pw(3,"transloco"),Jc(),_i$1(4,"app-repo-path-picker",38),mh("pathChange",function(n){Fu(e);let o=HD(4).$index,d=HD();return ju(d.setGitParam(o,"repoPath",n))})("repoSelected",function(n){Fu(e);let o=HD(4).$index,d=HD();return ju(d.applyCreateWorktreeCatalogRepo(o,n))}),Jc()();}if(i&2){let e=HD(4),t=e.$implicit,n=e.$index,o=HD();gI(2),Lh(Fw(3,3,"step-list.createWorktree.repoPath")),gI(2),lh("path",o.gitParam(o.asGit(t),"repoPath")),ch("data-testid","git-repo-path-"+n);}}function zo(i,l){if(i&1&&(_i$1(0,"p",19),Iw(1),Pw(2,"transloco"),Jc()),i&2){let e=HD(4).$index;ch("data-testid","git-resolve-from-pr-hint-"+e),gI(),rl$1(" ",Fw(2,2,"step-list.createWorktree.resolveFromPrHint")," ");}}function Mo(i,l){if(i&1){let e=FD();_i$1(0,"label",16)(1,"span"),Iw(2),Pw(3,"transloco"),Jc(),_i$1(4,"input",18),mh("ngModelChange",function(n){Fu(e);let o=HD(4).$index,d=HD();return ju(d.setGitParam(o,"baseBranch",n))}),Jc(),iE(),Jc(),_i$1(5,"label",16)(6,"span"),Iw(7),Pw(8,"transloco"),Jc(),_i$1(9,"input",18),mh("ngModelChange",function(n){Fu(e);let o=HD(4).$index,d=HD();return ju(d.setGitParam(o,"branchName",n))}),Jc(),iE(),Jc();}if(i&2){let e=HD(4),t=e.$implicit,n=e.$index,o=HD();gI(2),Lh(Fw(3,6,"step-list.createWorktree.baseBranch")),gI(2),lh("ngModel",o.gitParam(o.asGit(t),"baseBranch")),ch("data-testid","git-base-branch-"+n),aE(),gI(3),Lh(Fw(8,8,"step-list.createWorktree.branchName")),gI(2),lh("ngModel",o.gitParam(o.asGit(t),"branchName")),ch("data-testid","git-branch-name-"+n),aE();}}function Eo(i,l){if(i&1){let e=FD();_i$1(0,"label",16)(1,"span"),Iw(2),Pw(3,"transloco"),Jc(),_i$1(4,"input",18),mh("ngModelChange",function(n){Fu(e);let o=HD(4).$index,d=HD();return ju(d.setGitParam(o,"branch",n))}),Jc(),iE(),Jc();}if(i&2){let e=HD(4),t=e.$implicit,n=e.$index,o=HD();gI(2),Lh(Fw(3,3,"step-list.createWorktree.branch")),gI(2),lh("ngModel",o.gitParam(o.asGit(t),"branch")),ch("data-testid","git-branch-"+n),aE();}}function ko(i,l){if(i&1){let e=FD();_i$1(0,"div",16)(1,"span"),Iw(2),Pw(3,"transloco"),Jc(),_i$1(4,"nz-select",26),mh("ngModelChange",function(n){Fu(e);let o=HD(3).$index,d=HD();return ju(d.setCreateWorktreeMode(o,n))}),uh(5,"nz-option",34),Pw(6,"transloco"),uh(7,"nz-option",35),Pw(8,"transloco"),Jc(),iE(),Jc(),_i$1(9,"div",16)(10,"span"),Iw(11),Pw(12,"transloco"),Jc(),_i$1(13,"nz-select",26),mh("ngModelChange",function(n){Fu(e);let o=HD(3).$index,d=HD();return ju(d.setCreateWorktreeRepoSource(o,n))}),uh(14,"nz-option",36),Pw(15,"transloco"),uh(16,"nz-option",37),Pw(17,"transloco"),Jc(),iE(),Jc(),_D(18,yo,5,5,"div",16)(19,zo,3,4,"p",19),_D(20,Mo,10,10)(21,Eo,5,5,"label",16);}if(i&2){let e=HD(3),t=e.$implicit,n=e.$index,o=HD();gI(2),Lh(Fw(3,12,"step-list.createWorktree.mode")),gI(2),lh("ngModel",o.createWorktreeMode(o.asGit(t))),ch("data-testid","git-worktree-mode-"+n),aE(),gI(),lh("nzLabel",Fw(6,14,"step-list.createWorktree.newBranch")),gI(2),lh("nzLabel",Fw(8,16,"step-list.createWorktree.existingBranch")),gI(4),Lh(Fw(12,18,"step-list.createWorktree.repoSource")),gI(2),lh("ngModel",o.createWorktreeRepoSource(o.asGit(t))),ch("data-testid","git-worktree-repo-source-"+n),aE(),gI(),lh("nzLabel",Fw(15,20,"step-list.createWorktree.repoPathPick")),gI(2),lh("nzLabel",Fw(17,22,"step-list.createWorktree.resolveFromPr")),gI(2),MD(o.createWorktreeRepoSource(o.asGit(t))==="path"?18:19),gI(2),MD(o.createWorktreeMode(o.asGit(t))==="new-branch"?20:21);}}function To(i,l){if(i&1){let e=FD();_i$1(0,"div",16)(1,"span"),Iw(2),Pw(3,"transloco"),Jc(),_i$1(4,"app-key-value-editor",39),mh("rowsChange",function(n){Fu(e);let o=HD(3),d=o.$implicit,T=o.$index,J=HD();return ju(J.onParamRowsChange(T,d,n))}),Jc()();}if(i&2){let e=HD(3).$implicit,t=HD();gI(2),Lh(Fw(3,2,"step-list.params")),gI(2),lh("rows",t.paramRows(e));}}function Io(i,l){if(i&1){let e=FD();_i$1(0,"div",16)(1,"span"),Iw(2),Pw(3,"transloco"),Jc(),_i$1(4,"nz-select",26),mh("ngModelChange",function(n){Fu(e);let o=HD(2).$index,d=HD();return ju(d.patchAt(o,{operation:n}))}),xD(5,So,2,4,"nz-option",15,ND),Jc(),iE(),Jc(),_D(7,ko,22,24)(8,To,5,4,"div",16);}if(i&2){let e=HD(2),t=e.$implicit,n=e.$index,o=HD();gI(2),Lh(Fw(3,4,"step-list.operation")),gI(2),lh("ngModel",o.asGit(t).operation),ch("data-testid","git-operation-"+n),aE(),gI(),AD(o.gitOperations),gI(2),MD(o.asGit(t).operation==="create_worktree"?7:8);}}function No(i,l){if(i&1&&uh(0,"nz-alert",40),i&2){let e=HD(3).$index;lh("nzMessage",l),ch("data-testid","extended-action-mismatch-"+e);}}function Fo(i,l){if(i&1&&(uh(0,"nz-option",15),Pw(1,"transloco")),i&2){let e=l.$implicit,t=HD(5);lh("nzValue",e)("nzLabel",Fw(1,2,t.subjectTypeKey(e)));}}function Po(i,l){if(i&1&&uh(0,"nz-option",15),i&2){let e=l.$implicit;lh("nzValue",e.id)("nzLabel",e.displayName);}}function Vo(i,l){if(i&1){let e=FD();_i$1(0,"div",16)(1,"span"),Iw(2),Pw(3,"transloco"),Jc(),_i$1(4,"nz-select",26),mh("ngModelChange",function(n){Fu(e);let o=HD(3).$index,d=HD();return ju(d.setTargetSubjectType(o,n))}),xD(5,Fo,2,4,"nz-option",15,ND),Jc(),iE(),Jc(),_i$1(7,"div",16)(8,"span"),Iw(9),Pw(10,"transloco"),Jc(),_i$1(11,"nz-select",43),Pw(12,"transloco"),mh("ngModelChange",function(n){Fu(e);let o=HD(3).$index,d=HD();return ju(d.setTargetSource(o,n))}),xD(13,Po,1,2,"nz-option",15,he),Jc(),iE(),Jc(),_i$1(15,"label",16)(16,"span"),Iw(17),Pw(18,"transloco"),Jc(),_i$1(19,"input",18),mh("ngModelChange",function(n){Fu(e);let o=HD(3).$index,d=HD();return ju(d.setTargetSubjectId(o,n))}),Jc(),iE(),_i$1(20,"span",19),Iw(21),Pw(22,"transloco"),Jc()();}if(i&2){let e=l,t=HD(3),n=t.$implicit,o=t.$index,d=HD();gI(2),Lh(Fw(3,11,"step-list.target.subjectType")),gI(2),lh("ngModel",e.subjectType),ch("data-testid","provider-action-target-type-"+o),aE(),gI(),AD(d.targetSubjectTypes),gI(4),Lh(Fw(10,13,"step-list.target.source")),gI(2),lh("ngModel",e.source||null)("nzPlaceHolder",Fw(12,15,"step-list.target.sourcePlaceholder")),ch("data-testid","provider-action-target-source-"+o),aE(),gI(2),AD(d.targetInstanceOptions(d.asProvider(n))),gI(4),Lh(Fw(18,17,"step-list.target.subjectId")),gI(2),lh("ngModel",e.subjectId),ch("data-testid","provider-action-target-id-"+o),aE(),gI(2),Lh(Fw(22,19,"step-list.target.subjectIdHint"));}}function Ao(i,l){if(i&1&&uh(0,"nz-option",15),i&2){let e=l.$implicit,t=HD(5);lh("nzValue",e)("nzLabel",t.providerLabel(e));}}function $o(i,l){if(i&1&&uh(0,"nz-option",15),i&2){let e=l.$implicit;lh("nzValue",e.actionId)("nzLabel",e.label);}}function Bo(i,l){i&1&&(_i$1(0,"span",19),Iw(1),Pw(2,"transloco"),Jc()),i&2&&(gI(),Lh(Fw(2,1,"step-list.extendedAction.empty")));}function Do(i,l){i&1&&(_i$1(0,"span",44),Iw(1,"*"),Jc());}function Lo(i,l){if(i&1&&uh(0,"nz-option",15),i&2){let e=l.$implicit;lh("nzValue",e)("nzLabel",e);}}function Oo(i,l){if(i&1){let e=FD();_i$1(0,"nz-select",26),mh("ngModelChange",function(n){Fu(e);let o=HD().$implicit,d=HD(5).$index,T=HD();return ju(T.setExtendedParam(d,o.name,n))}),xD(1,Lo,1,2,"nz-option",15,ND),Jc(),iE();}if(i&2){let e=HD().$implicit,t=HD(5),n=t.$implicit,o=t.$index,d=HD();lh("ngModel",d.extendedParamValue(d.asProvider(n),e.name)),ch("data-testid","extended-action-param-"+e.name+"-"+o),aE(),gI(),AD(e.options??xw(2,$n));}}function Wo(i,l){if(i&1){let e=FD();_i$1(0,"input",18),mh("ngModelChange",function(n){Fu(e);let o=HD().$implicit,d=HD(5).$index,T=HD();return ju(T.setExtendedParam(d,o.name,n))}),Jc(),iE();}if(i&2){let e=HD().$implicit,t=HD(5),n=t.$implicit,o=t.$index,d=HD();lh("ngModel",d.extendedParamValue(d.asProvider(n),e.name)),ch("data-testid","extended-action-param-"+e.name+"-"+o),aE();}}function jo(i,l){if(i&1&&(_i$1(0,"label",16)(1,"span"),Iw(2),_D(3,Do,2,0,"span",44),Jc(),_D(4,Oo,3,3,"nz-select",45)(5,Wo,1,2,"input",46),Jc()),i&2){let e=l.$implicit;gI(2),rl$1(" ",e.label," "),gI(),MD(e.required?3:-1),gI(),MD(e.type==="select"?4:5);}}function Ro(i,l){i&1&&xD(0,jo,6,3,"label",16,ro),i&2&&AD(l.params);}function Ko(i,l){if(i&1){let e=FD();_i$1(0,"div",16)(1,"span"),Iw(2),Pw(3,"transloco"),Jc(),_i$1(4,"nz-select",26),mh("ngModelChange",function(n){Fu(e);let o=HD(3).$index,d=HD();return ju(d.setExtendedProvider(o,n))}),xD(5,Ao,1,2,"nz-option",15,ND),Jc(),iE(),Jc(),_i$1(7,"div",16)(8,"span"),Iw(9),Pw(10,"transloco"),Jc(),_i$1(11,"nz-select",43),Pw(12,"transloco"),mh("ngModelChange",function(n){Fu(e);let o=HD(3).$index,d=HD();return ju(d.setExtendedAction(o,n))}),xD(13,$o,1,2,"nz-option",15,oo),Jc(),iE(),_D(15,Bo,3,3,"span",19),Jc(),_D(16,Ro,2,0);}if(i&2){let e,t=HD(3),n=t.$implicit,o=t.$index,d=HD();gI(2),Lh(Fw(3,9,"step-list.extendedAction.provider")),gI(2),lh("ngModel",d.asProvider(n).extendedAction?.providerId),ch("data-testid","extended-action-provider-"+o),aE(),gI(),AD(d.extendedProviderOptions()),gI(4),Lh(Fw(10,11,"step-list.extendedAction.action")),gI(2),lh("ngModel",d.asProvider(n).extendedAction?.actionId||null)("nzPlaceHolder",Fw(12,13,"step-list.extendedAction.none")),ch("data-testid","extended-action-id-"+o),aE(),gI(2),AD(d.extendedDescriptors(d.asProvider(n))),gI(2),MD(d.extendedDescriptors(d.asProvider(n)).length===0?15:-1),gI(),MD((e=d.selectedExtendedDescriptor(d.asProvider(n)))?16:-1,e);}}function Ho(i,l){if(i&1&&(uh(0,"nz-option",15),Pw(1,"transloco")),i&2){let e=l.$implicit,t=HD(5);lh("nzValue",e)("nzLabel",Fw(1,2,t.providerActionKey(e)));}}function qo(i,l){if(i&1){let e=FD();_i$1(0,"div",16)(1,"span"),Iw(2),Pw(3,"transloco"),Jc(),_i$1(4,"nz-select",26),mh("ngModelChange",function(n){Fu(e);let o=HD(3).$index,d=HD();return ju(d.patchAt(o,{action:n}))}),xD(5,Ho,2,4,"nz-option",15,ND),Jc(),iE(),Jc(),_i$1(7,"div",16)(8,"span"),Iw(9),Pw(10,"transloco"),Jc(),_i$1(11,"app-key-value-editor",39),mh("rowsChange",function(n){Fu(e);let o=HD(3),d=o.$implicit,T=o.$index,J=HD();return ju(J.onParamRowsChange(T,d,n))}),Jc()();}if(i&2){let e=HD(3),t=e.$implicit,n=e.$index,o=HD();gI(2),Lh(Fw(3,5,"step-list.action")),gI(2),lh("ngModel",o.asProvider(t).action),ch("data-testid","provider-action-"+n),aE(),gI(),AD(o.providerActions),gI(4),Lh(Fw(10,7,"step-list.params")),gI(2),lh("rows",o.paramRows(t));}}function Go(i,l){if(i&1){let e=FD();_D(0,No,1,2,"nz-alert",40),_i$1(1,"label",22),mh("ngModelChange",function(n){Fu(e);let o=HD(2).$index,d=HD();return ju(d.setTargetEnabled(o,n))}),Iw(2),Pw(3,"transloco"),Jc(),iE(),_D(4,Vo,23,21),_i$1(5,"div",16)(6,"span"),Iw(7),Pw(8,"transloco"),Jc(),_i$1(9,"nz-select",26),mh("ngModelChange",function(n){Fu(e);let o=HD(2).$index,d=HD();return ju(d.setActionMode(o,n))}),uh(10,"nz-option",41),Pw(11,"transloco"),uh(12,"nz-option",42),Pw(13,"transloco"),Jc(),iE(),Jc(),_D(14,Ko,17,15)(15,qo,12,9);}if(i&2){let e,t,n=HD(2),o=n.$implicit,d=n.$index,T=HD();MD((e=T.mismatchWarning(T.asProvider(o)))?0:-1,e),gI(),lh("ngModel",T.hasTarget(o)),ch("data-testid","provider-action-target-toggle-"+d),aE(),gI(),rl$1(" ",Fw(3,11,"step-list.target.toggle")," "),gI(2),MD((t=T.asProvider(o).target)?4:-1,t),gI(3),Lh(Fw(8,13,"step-list.extendedAction.mode")),gI(2),lh("ngModel",T.isExtended(o)?"extended":"portable"),ch("data-testid","provider-action-mode-"+d),aE(),gI(),lh("nzLabel",Fw(11,15,"step-list.extendedAction.portable")),gI(2),lh("nzLabel",Fw(13,17,"step-list.extendedAction.extended")),gI(2),MD(T.isExtended(o)?14:15);}}function Uo(i,l){if(i&1&&uh(0,"nz-option",15),i&2){let e=l.$implicit,t=HD(4);lh("nzValue",e.id)("nzLabel",t.workflowOptionLabel(e));}}function Jo(i,l){if(i&1){let e=FD();_i$1(0,"label",16)(1,"span"),Iw(2),Pw(3,"transloco"),Jc(),_i$1(4,"input",18),mh("ngModelChange",function(n){Fu(e);let o=HD(3).$index,d=HD();return ju(d.setSubWorkflowSource(o,n))}),Jc(),iE(),_i$1(5,"p",19),Iw(6),Pw(7,"transloco"),Jc()();}if(i&2){let e=HD(3),t=e.$implicit,n=e.$index,o=HD();gI(2),Lh(Fw(3,4,"step-list.forEach.sourcePath")),gI(2),lh("ngModel",o.subWorkflowSource(t)),ch("data-testid","sub-workflow-foreach-source-"+n),aE(),gI(2),Lh(Fw(7,6,"step-list.forEach.sourceHint"));}}function Zo(i,l){if(i&1){let e=FD();_i$1(0,"div",16)(1,"span"),Iw(2),Pw(3,"transloco"),Jc(),_i$1(4,"nz-select",47),mh("ngModelChange",function(n){Fu(e);let o=HD(2).$index,d=HD();return ju(d.patchAt(o,{workflowId:n}))}),xD(5,Uo,1,2,"nz-option",15,he),Jc(),iE(),Jc(),_i$1(7,"div",16)(8,"span"),Iw(9),Pw(10,"transloco"),Jc(),_i$1(11,"nz-select",26),mh("ngModelChange",function(n){Fu(e);let o=HD(2).$index,d=HD();return ju(d.setSubWorkflowForEachMode(o,n))}),uh(12,"nz-option",48),Pw(13,"transloco"),uh(14,"nz-option",49),Pw(15,"transloco"),Jc(),iE(),Jc(),_D(16,Jo,8,8,"label",16);}if(i&2){let e=HD(2),t=e.$implicit,n=e.$index,o=HD();gI(2),Lh(Fw(3,9,"step-list.workflowId")),gI(2),lh("ngModel",o.asSubWorkflow(t).workflowId),ch("data-testid","sub-workflow-id-"+n),aE(),gI(),AD(o.childWorkflowOptions(t)),gI(4),Lh(Fw(10,11,"step-list.forEach")),gI(2),lh("ngModel",o.subWorkflowForEachMode(t)),ch("data-testid","sub-workflow-foreach-mode-"+n),aE(),gI(),lh("nzLabel",Fw(13,13,"step-list.forEach.selection")),gI(2),lh("nzLabel",Fw(15,15,"step-list.forEach.source")),gI(2),MD(o.subWorkflowForEachMode(t)==="source"?16:-1);}}function Qo(i,l){if(i&1&&(uh(0,"nz-option",15),Pw(1,"transloco")),i&2){let e=l.$implicit,t=HD(4);lh("nzValue",e)("nzLabel",Fw(1,2,t.onMaxIterationsKey(e)));}}function Yo(i,l){if(i&1){let e=FD();_i$1(0,"app-field-condition-editor",24),mh("conditionChange",function(n){Fu(e);let o=HD(2).$index,d=HD();return ju(d.patchAt(o,{until:n}))}),Jc(),_i$1(1,"div",50)(2,"label",16)(3,"span"),Iw(4),Pw(5,"transloco"),Jc(),_i$1(6,"nz-input-number",51),mh("ngModelChange",function(n){Fu(e);let o=HD(2).$index,d=HD();return ju(d.patchAt(o,{maxIterations:n??0}))}),Jc(),iE(),Jc(),_i$1(7,"div",16)(8,"span"),Iw(9),Pw(10,"transloco"),Jc(),_i$1(11,"nz-select",26),mh("ngModelChange",function(n){Fu(e);let o=HD(2).$index,d=HD();return ju(d.patchAt(o,{onMaxIterations:{action:n}}))}),xD(12,Qo,2,4,"nz-option",15,ND),Jc(),iE(),Jc()(),_i$1(14,"div",52)(15,"h4"),Iw(16),Pw(17,"transloco"),Jc(),_i$1(18,"app-step-list",53),mh("stepsChange",function(n){Fu(e);let o=HD(2).$index,d=HD();return ju(d.setNestedSteps(o,n))}),Jc()();}if(i&2){let e=HD(2),t=e.$implicit,n=e.$index,o=HD();lh("condition",o.asLoop(t).until)("testIdPrefix","loop-until-"+n),gI(4),Lh(Fw(5,18,"step-list.maxIterations")),gI(2),lh("ngModel",o.asLoop(t).maxIterations)("nzMin",0),ch("data-testid","loop-max-"+n),aE(),gI(3),Lh(Fw(10,20,"step-list.onMaxIterations.action")),gI(2),lh("ngModel",o.asLoop(t).onMaxIterations.action),ch("data-testid","loop-on-max-"+n),aE(),gI(),AD(o.maxIterationActions),gI(2),ch("data-testid","loop-nested-"+n),gI(2),Lh(Fw(17,22,"step-list.nestedSteps")),gI(2),lh("steps",o.asLoop(t).steps)("rootSteps",o.effectiveRoot())("availableWorkflows",o.availableWorkflows())("appliesTo",o.appliesTo())("inputSchema",o.inputSchema())("settings",o.settings())("depth",o.depth()+1);}}function Xo(i,l){if(i&1){let e=FD();_i$1(0,"div",12)(1,"div",13)(2,"nz-select",14),mh("ngModelChange",function(n){Fu(e);let o=HD().$index,d=HD();return ju(d.changeType(o,n))}),xD(3,ao,2,4,"nz-option",15,ND),Jc(),iE(),Jc(),_i$1(5,"label",16)(6,"span"),Iw(7),Pw(8,"transloco"),Jc(),_i$1(9,"input",17),mh("ngModelChange",function(n){Fu(e);let o=HD().$index,d=HD();return ju(d.onNameChange(o,n))}),Jc(),iE(),Jc(),_i$1(10,"label",16)(11,"span"),Iw(12),Pw(13,"transloco"),Jc(),_i$1(14,"input",18),mh("ngModelChange",function(n){Fu(e);let o=HD().$index,d=HD();return ju(d.onIdChange(o,n))}),Jc(),iE(),_i$1(15,"p",19),Iw(16),Pw(17,"transloco"),Jc()(),uh(18,"app-available-parameters",20),_i$1(19,"section",21)(20,"label",22),mh("ngModelChange",function(n){Fu(e);let o=HD().$index,d=HD();return ju(d.setConditionEnabled(o,n))}),Iw(21),Pw(22,"transloco"),Jc(),iE(),_i$1(23,"p",19),Iw(24),Pw(25,"transloco"),Jc(),_D(26,so,1,2,"app-field-condition-editor",23),Jc(),_D(27,mo,32,29)(28,ho,8,6)(29,bo,5,5,"label",16)(30,wo,22,20)(31,Io,9,6)(32,Go,16,19)(33,Zo,17,17)(34,Yo,19,24),Jc();}if(i&2){let e,t,n=HD(),o=n.$implicit,d=n.$index,T=HD();ch("data-testid","step-body-"+d),gI(2),lh("ngModel",o.type),ch("data-testid","step-type-"+d),aE(),gI(),AD(T.stepTypes),gI(4),Lh(Fw(8,21,"step-list.name")),gI(2),lh("ngModel",o.name),ch("data-testid","step-name-"+d),aE(),gI(3),Lh(Fw(13,23,"step-list.id")),gI(2),lh("ngModel",o.id),ch("data-testid","step-id-"+d),aE(),gI(2),Lh(Fw(17,25,"step-list.idHint")),gI(2),lh("inputSchema",T.inputSchema())("appliesTo",T.appliesTo())("previousSteps",T.previousFor(o))("currentStepType",o.type),gI(),ch("data-testid","step-condition-"+d),gI(),lh("ngModel",!!o.condition),ch("data-testid","step-condition-toggle-"+d),aE(),gI(),rl$1(" ",Fw(22,27,"step-list.condition.title")," "),gI(3),Lh(Fw(25,29,"step-list.condition.hint")),gI(2),MD((e=o.condition)?26:-1,e),gI(),MD((t=o.type)==="agent"?27:t==="interaction"?28:t==="shell"?29:t==="extract"?30:t==="git"?31:t==="provider_action"?32:t==="sub_workflow"?33:t==="loop"?34:-1);}}function er(i,l){if(i&1){let e=FD();_i$1(0,"nz-card",3)(1,"div",4),mh("click",function(){let n=Fu(e).$implicit,o=HD();return ju(o.toggleExpanded(n))}),_i$1(2,"div",5)(3,"span",6),Iw(4),Jc(),_i$1(5,"span",7),Iw(6),Pw(7,"transloco"),Jc(),_i$1(8,"span",8),Iw(9),Pw(10,"transloco"),Jc()(),_i$1(11,"div",9),mh("click",function(n){return n.stopPropagation()}),_i$1(12,"button",10),mh("click",function(){let n=Fu(e).$index,o=HD();return ju(o.moveUp(n))}),Iw(13),Pw(14,"transloco"),Jc(),_i$1(15,"button",10),mh("click",function(){let n=Fu(e).$index,o=HD();return ju(o.moveDown(n))}),Iw(16),Pw(17,"transloco"),Jc(),_i$1(18,"button",11),mh("click",function(){let n=Fu(e).$index,o=HD();return ju(o.removeStep(n))}),Iw(19),Pw(20,"transloco"),Jc()()(),_D(21,Xo,35,31,"div",12),Jc();}if(i&2){let e=l.$implicit,t=l.$index,n=HD();Sh("step-card-expanded",n.isExpanded(e)),ch("data-testid","step-card-"+t),gI(),ch("data-testid","step-header-"+t),gI(3),Lh(n.isExpanded(e)?"\u25BE":"\u25B8"),gI(),ch("data-testid","step-header-name-"+t),gI(),rl$1(" ",e.name||Fw(7,18,"step-list.unnamed")," "),gI(2),ch("data-testid","step-type-label-"+t),gI(),rl$1(" ",Fw(10,20,n.stepTypeKey(e.type))," "),gI(3),lh("disabled",t===0),ch("data-testid","move-up-"+t),gI(),rl$1(" ",Fw(14,22,"step-list.moveUp")," "),gI(2),lh("disabled",t===n.steps().length-1),ch("data-testid","move-down-"+t),gI(),rl$1(" ",Fw(17,24,"step-list.moveDown")," "),gI(2),ch("data-testid","remove-"+t),gI(),rl$1(" ",Fw(20,26,"step-list.remove")," "),gI(2),MD(n.isExpanded(e)?21:-1);}}var Bn=(()=>{class i{constructor(){this.transloco=C(Ve),this.language=C(O),this.providersApi=C(w),this.contextFilesApi=C(ze),this.modal=C(jn$1),this.steps=q0.required(),this.rootSteps=q0([]),this.availableWorkflows=q0([]),this.appliesTo=q0("none"),this.inputSchema=q0([]),this.settings=q0(w_),this.depth=q0(0),this.stepsChange=U0(),this.stepTypes=y,this.outputFormats=["questionnaire","confirmation","comment_suggestions","free_text"],this.interactions=["questionnaire","confirmation","comment_review"],this.gitOperations=["create_worktree","checkout","create_branch","commit","push"],this.providerActions=["get_subject","get_comments","post_comment","update_status","get_content"],this.maxIterationActions=["fail","continue","ask_human"],this.extractOnNoMatchActions=["fail","empty","ask_human"],this.expandedKey=qo$1(null),this.contextFiles=qo$1([]),this.paramRowsByStepKey=new Map,this.actionsByProvider=new Map,this.loadingActions=new Set,this.targetSubjectTypes=F,this.contextFilesApi.list().pipe(ue()).subscribe({next:e=>this.contextFiles.set(e),error:()=>this.contextFiles.set([])}),id(()=>{for(let e of this.steps())e.type==="provider_action"&&e.extendedAction?.providerId&&this.ensureActionsLoaded(e.extendedAction.providerId);});}stepTypeKey(e){return `step-list.stepType.${e}`}outputFormatKey(e){return `step-list.outputFormat.${e}`}interactionKey(e){return `step-list.interaction.${e}`}gitOperationKey(e){return `step-list.gitOperation.${e}`}providerActionKey(e){return `step-list.providerAction.${e}`}onMaxIterationsKey(e){return `step-list.onMaxIterations.${e}`}onNoMatchKey(e){return `step-list.onNoMatch.${e}`}workflowOptionLabel(e){return this.language.currentLang(),this.transloco.translate("step-list.workflowOption",{name:e.name,id:e.id})}effectiveRoot(){let e=this.rootSteps();return e.length>0?e:this.steps()}previousFor(e){return im(this.effectiveRoot(),e)}commentSuggestionSources(e){return G_(this.effectiveRoot(),e).filter(t=>!!t.id).map(t=>({id:t.id,label:t.name?.trim()?`${t.name} (${t.id})`:t.id}))}onInteractionChange(e,t){if(t==="comment_review"){let n=this.asInteraction(this.steps()[e]);this.patchAt(e,{interaction:t,sourceStepIds:n.sourceStepIds??[]});return}this.patchAt(e,{interaction:t,sourceStepIds:void 0});}trackKey(e){return e._key}isExpanded(e){return this.expandedKey()===e._key}toggleExpanded(e){this.expandedKey.update(t=>t===e._key?null:e._key);}addStep(){this.emit([...this.steps(),h("agent")]);}removeStep(e){let t=this.steps()[e];t&&this.paramRowsByStepKey.delete(t._key),this.emit(this.steps().filter((n,o)=>o!==e));}moveUp(e){if(e<=0)return;let t=[...this.steps()],n=t[e-1];t[e-1]=t[e],t[e]=n,this.emit(t);}moveDown(e){if(e>=this.steps().length-1)return;let t=[...this.steps()],n=t[e+1];t[e+1]=t[e],t[e]=n,this.emit(t);}changeType(e,t){let n=this.steps()[e];if(!n||n.type===t)return;this.paramRowsByStepKey.delete(n._key);let o=h(t,{id:n.id,name:n.name,idAutoSync:n._idAutoSync,key:n._key});this.replaceAt(e,n.condition?s(r$1({},o),{condition:n.condition}):o);}patchAt(e,t){let n=this.steps()[e];n&&this.replaceAt(e,r$1(r$1({},n),t));}onNameChange(e,t){let n=this.steps()[e];n&&this.replaceAt(e,E(n,t,this.effectiveRoot()));}onIdChange(e,t){let n=this.steps()[e];n&&this.replaceAt(e,P(n,t));}setNestedSteps(e,t){let n=this.steps()[e];!n||n.type!=="loop"||this.replaceAt(e,s(r$1({},n),{steps:t}));}asAgent(e){return e}asInteraction(e){return e}asShell(e){return e}asExtract(e){return e}asGit(e){return e}createWorktreeMode(e){return e.params?.mode==="existing-branch"?"existing-branch":"new-branch"}createWorktreeRepoSource(e){return e.params?.resolveRepoFromSubject===true?"from-pr":"path"}gitParam(e,t){let n=e.params?.[t];return typeof n=="string"?n:""}setGitParam(e,t,n){let o=this.steps()[e];!o||o.type!=="git"||(this.paramRowsByStepKey.delete(o._key),this.patchAt(e,{params:s(r$1({},o.params),{[t]:n})}));}applyCreateWorktreeCatalogRepo(e,t){let n=this.steps()[e];if(!n||n.type!=="git")return;this.paramRowsByStepKey.delete(n._key);let o=s(r$1({},n.params),{repoPath:t.localPath});delete o.resolveRepoFromSubject;let d=this.gitParam(n,"baseBranch").trim(),T=t.defaultBranch?.trim();!d&&T&&(o.baseBranch=T),this.patchAt(e,{params:o});}setCreateWorktreeRepoSource(e,t){let n=this.steps()[e];if(!n||n.type!=="git")return;this.paramRowsByStepKey.delete(n._key);let o=r$1({},n.params);t==="from-pr"?(o.resolveRepoFromSubject=true,delete o.repoPath):delete o.resolveRepoFromSubject,this.patchAt(e,{params:o});}setCreateWorktreeMode(e,t){let n=this.steps()[e];if(!n||n.type!=="git")return;let o=n.params?.resolveRepoFromSubject===true,d=this.gitParam(n,"repoPath");this.paramRowsByStepKey.delete(n._key);let T=o?{resolveRepoFromSubject:true}:{repoPath:d};if(t==="existing-branch"){this.patchAt(e,{params:s(r$1({mode:"existing-branch"},T),{branch:this.gitParam(n,"branch")||this.gitParam(n,"branchName")})});return}this.patchAt(e,{params:s(r$1({},T),{baseBranch:this.gitParam(n,"baseBranch"),branchName:this.gitParam(n,"branchName")||this.gitParam(n,"branch")})});}asProvider(e){return e}asSubWorkflow(e){return e}subWorkflowForEachMode(e){return typeof this.asSubWorkflow(e).forEach=="object"?"source":"selection"}setSubWorkflowForEachMode(e,t){if(t==="selection"){this.patchAt(e,{forEach:"selection"});return}let n=this.asSubWorkflow(this.steps()[e]),o=typeof n.forEach=="object"?n.forEach.source:"";this.patchAt(e,{forEach:{source:o}});}subWorkflowSource(e){let t=this.asSubWorkflow(e).forEach;return typeof t=="object"?t.source:""}setSubWorkflowSource(e,t){this.patchAt(e,{forEach:{source:t}});}childWorkflowOptions(e){let t=this.availableWorkflows();return this.subWorkflowForEachMode(e)!=="source"?t:t.filter(n=>n.appliesTo==="none")}asLoop(e){return e}paramRows(e){let t=this.paramRowsByStepKey.get(e._key);if(!t){let n=e.type==="git"||e.type==="provider_action"?e.params:void 0;t=A(n),this.paramRowsByStepKey.set(e._key,t);}return t}onParamRowsChange(e,t,n){this.paramRowsByStepKey.set(t._key,n),this.patchAt(e,{params:j(n)});}isExtended(e){return e.type==="provider_action"&&An(this.asProvider(e))}setActionMode(e,t){let n=this.asProvider(this.steps()[e]);if(t==="portable"){let d=n,{extendedAction:T}=d,J=t$1(d,["extendedAction"]);this.replaceAt(e,J);return}let o=Pn(this.appliesTo(),this.settings());this.patchAt(e,{extendedAction:{providerId:o,actionId:"",params:{}}}),this.ensureActionsLoaded(o);}extendedProviderOptions(){return $e(this.appliesTo(),this.settings())}providerLabel(e){return (this.settings().providerInstances??[]).find(n=>n.id===e)?.displayName||e}agentInstanceOptions(){return (this.settings().providerInstances??[]).filter(e=>e.kind==="agent")}setAgentInstance(e,t){this.patchAt(e,{agentInstanceId:t||void 0});}selectedContextFiles(e){let t=e.contextFileIds??[],n=this.contextFiles();return t.map(o=>n.find(d=>d.id===o)??{id:o,name:o,tier:"user",path:""})}removeContextFile(e,t){let n=this.asAgent(this.steps()[e]);this.patchAt(e,{contextFileIds:(n.contextFileIds??[]).filter(o=>o!==t)});}openContextFilePicker(e){let t=this.asAgent(this.steps()[e]),n=this.modal.create({nzTitle:this.transloco.translate("context-files.selectTitle"),nzContent:St,nzData:{selectionMode:true,selectedIds:[...t.contextFileIds??[]]},nzWidth:800,nzOnOk:()=>{let o=n.getContentComponent();this.patchAt(e,{contextFileIds:o.currentSelectedIds()}),this.contextFilesApi.list().subscribe({next:d=>this.contextFiles.set(d)});}});}setExtendedProvider(e,t){this.patchAt(e,{extendedAction:{providerId:t,actionId:"",params:{}}}),this.ensureActionsLoaded(t);}setExtendedAction(e,t){let n=this.asProvider(this.steps()[e]),o=this.extendedDescriptors(n).find(d=>d.actionId===t);this.patchAt(e,{extendedAction:{providerId:n.extendedAction?.providerId??"",actionId:t,params:o?tr(o):{}}});}setExtendedParam(e,t,n){let d=this.asProvider(this.steps()[e]).extendedAction;d&&this.patchAt(e,{extendedAction:s(r$1({},d),{params:s(r$1({},d.params??{}),{[t]:n})})});}extendedParamValue(e,t){let n=e.extendedAction?.params?.[t];return n==null?"":String(n)}extendedDescriptors(e){let t=e.extendedAction?.providerId;return t?this.actionsByProvider.get(t)??[]:[]}selectedExtendedDescriptor(e){let t=e.extendedAction?.actionId;if(t)return this.extendedDescriptors(e).find(n=>n.actionId===t)}mismatchWarning(e){let t=Vn(e,this.appliesTo(),this.settings());return t?(this.language.currentLang(),this.transloco.translate("step-list.extendedAction.mismatch",t)):null}hasTarget(e){return e.type==="provider_action"&&this.asProvider(e).target!=null}setTargetEnabled(e,t){let n=this.asProvider(this.steps()[e]);if(!t){let o=n,{target:d}=o,T=t$1(o,["target"]);this.replaceAt(e,T);return}this.patchAt(e,{target:{subjectType:"ticket",source:"",subjectId:""}});}setTargetSubjectType(e,t){let n=this.asProvider(this.steps()[e]);this.patchAt(e,{target:{subjectType:t,source:"",subjectId:n.target?.subjectId??""}});}setTargetSource(e,t){let n=this.asProvider(this.steps()[e]);n.target&&this.patchAt(e,{target:s(r$1({},n.target),{source:t})});}setTargetSubjectId(e,t){let n=this.asProvider(this.steps()[e]);n.target&&this.patchAt(e,{target:s(r$1({},n.target),{subjectId:t})});}targetInstanceOptions(e){let t=e.target?.subjectType;return t?L(this.settings(),[t]):[]}setConditionEnabled(e,t){if(t){let n=this.steps()[e];this.patchAt(e,{condition:n?.condition??En()});return}this.patchAt(e,{condition:void 0});}subjectTypeKey(e){return `workflow-editor.subjectType.${e}`}ensureActionsLoaded(e){!e||this.actionsByProvider.has(e)||this.loadingActions.has(e)||(this.loadingActions.add(e),this.providersApi.listExtendedActions(e).subscribe({next:t=>{this.loadingActions.delete(e),this.actionsByProvider.set(e,t);},error:()=>{this.loadingActions.delete(e),this.actionsByProvider.set(e,[]);}}));}replaceAt(e,t){this.emit(this.steps().map((n,o)=>o===e?t:n));}emit(e){this.stepsChange.emit(e);}static{this.\u0275fac=function(t){return new(t||i)};}static{this.\u0275cmp=ZE({type:i,selectors:[["app-step-list"]],inputs:{steps:[1,"steps"],rootSteps:[1,"rootSteps"],availableWorkflows:[1,"availableWorkflows"],appliesTo:[1,"appliesTo"],inputSchema:[1,"inputSchema"],settings:[1,"settings"],depth:[1,"depth"]},outputs:{stepsChange:"stepsChange"},decls:6,vars:4,consts:[["data-testid","step-list",1,"step-list"],[1,"step-card",3,"step-card-expanded"],["nz-button","","nzType","dashed","nzBlock","","type","button","data-testid","add-step",3,"click"],[1,"step-card"],[1,"step-header",3,"click"],[1,"step-header-meta"],["aria-hidden","true",1,"step-chevron"],[1,"step-name-preview"],[1,"step-type"],[1,"step-header-actions",3,"click"],["nz-button","","type","button",3,"click","disabled"],["nz-button","","nzDanger","","type","button",3,"click"],[1,"step-body"],[1,"step-toolbar"],[1,"type-select",3,"ngModelChange","ngModel"],[3,"nzValue","nzLabel"],[1,"field"],["nz-input","","required","",3,"ngModelChange","ngModel"],["nz-input","",3,"ngModelChange","ngModel"],[1,"hint"],[3,"inputSchema","appliesTo","previousSteps","currentStepType"],[1,"condition-section"],["nz-checkbox","",3,"ngModelChange","ngModel"],[3,"condition","testIdPrefix"],[3,"conditionChange","condition","testIdPrefix"],["nz-input","","rows","3",3,"ngModelChange","ngModel"],[3,"ngModelChange","ngModel"],[1,"context-file-chips"],["nzMode","closeable"],["data-testid","context-files-empty",1,"hint"],["nz-button","","type","button",3,"click"],["nzMode","closeable",3,"nzOnClose"],["nzMode","multiple",3,"ngModelChange","ngModel"],["nz-input","","rows","2",3,"ngModelChange","ngModel"],["nzValue","new-branch",3,"nzLabel"],["nzValue","existing-branch",3,"nzLabel"],["nzValue","path",3,"nzLabel"],["nzValue","from-pr",3,"nzLabel"],[3,"pathChange","repoSelected","path"],[3,"rowsChange","rows"],["nzType","warning","nzShowIcon","",1,"mismatch",3,"nzMessage"],["nzValue","portable",3,"nzLabel"],["nzValue","extended",3,"nzLabel"],[3,"ngModelChange","ngModel","nzPlaceHolder"],[1,"required"],[3,"ngModel"],["nz-input","",3,"ngModel"],["nzShowSearch","","nzAllowClear","",3,"ngModelChange","ngModel"],["nzValue","selection",3,"nzLabel"],["nzValue","source",3,"nzLabel"],[1,"field-grid"],[3,"ngModelChange","ngModel","nzMin"],[1,"nested"],[3,"stepsChange","steps","rootSteps","availableWorkflows","appliesTo","inputSchema","settings","depth"]],template:function(t,n){t&1&&(_i$1(0,"div",0),xD(1,er,22,28,"nz-card",1,io,true),_i$1(3,"button",2),mh("click",function(){return n.addStep()}),Iw(4),Pw(5,"transloco"),Jc()()),t&2&&(ch("data-depth",n.depth()),gI(),AD(n.steps()),gI(3),rl$1(" ",Fw(5,2,"step-list.addStep")," "));},dependencies:[i,$8,al,er$1,rl,Ja,$i$1,pf,bd,sp,fp,Nt,Ke,Lt,ut,ai$1,z,wn,ot,ts,ex,Fm,Am,Gn$1,un,W,I$1,Nn,Mn,zn,Sn,Kt],styles:[".step-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.75rem}.step-card[_ngcontent-%COMP%]{background:#fff}.step-header[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:.75rem;cursor:pointer;-webkit-user-select:none;user-select:none}.step-header-meta[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;min-width:0}.step-chevron[_ngcontent-%COMP%]{color:#78716c;font-size:.85rem;width:.9rem}.step-type[_ngcontent-%COMP%]{font-size:.75rem;font-weight:600;letter-spacing:.02em;text-transform:uppercase;color:#57534e;background:#f5f5f4;border-radius:999px;padding:.15rem .55rem}.step-name-preview[_ngcontent-%COMP%]{font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.step-header-actions[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:.5rem}.step-body[_ngcontent-%COMP%]{margin-top:.75rem;padding-top:.75rem;border-top:1px solid #e7e5e4}.step-toolbar[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:.5rem;margin-bottom:.75rem;align-items:center}.type-select[_ngcontent-%COMP%]{min-width:11rem}.field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.35rem;margin:.65rem 0}.field[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{font-size:.85rem;color:#57534e}.field-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(auto-fit,minmax(12rem,1fr));gap:.5rem 1rem}.hint[_ngcontent-%COMP%]{margin:0;font-size:.8rem;color:#78716c}.mismatch[_ngcontent-%COMP%]{margin:.5rem 0}.required[_ngcontent-%COMP%]{color:#b91c1c}.nested[_ngcontent-%COMP%]{margin-top:.75rem;padding:.75rem;border-left:3px solid #d6d3d1;background:#fafaf9}.nested[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{margin:0 0 .5rem}.condition-section[_ngcontent-%COMP%]{margin:.75rem 0;padding-top:.5rem}.condition-section[_ngcontent-%COMP%] .hint[_ngcontent-%COMP%]{margin:.35rem 0 0}.context-file-chips[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:.35rem;align-items:center;margin:.35rem 0}"]});}}return i})();function tr(i){let l={};for(let e of i.params)l[e.name]=e.type==="select"?e.options?.[0]??"":"";return l}var nr=i=>({ids:i});function ir(i,l){if(i&1){let e=FD();_i$1(0,"button",10),mh("click",function(){Fu(e);let n=HD();return ju(n.exportWorkflow())}),Iw(1),Pw(2,"transloco"),Jc();}if(i&2){let e=HD();lh("disabled",e.loading()||!!e.loadError()),gI(),rl$1(" ",Fw(2,2,"workflow-editor.export")," ");}}function or(i,l){if(i&1){let e=FD();_i$1(0,"button",11),mh("click",function(){Fu(e);let n=HD();return ju(n.startWorkflow())}),Iw(1),Pw(2,"transloco"),Jc();}i&2&&(gI(),rl$1(" ",Fw(2,1,"workflow-editor.start")," "));}function rr(i,l){i&1&&(_i$1(0,"p",8),Iw(1),Pw(2,"transloco"),Jc()),i&2&&(gI(),Lh(Fw(2,1,"workflow-editor.loading")));}function ar(i,l){if(i&1&&(_i$1(0,"p",9),Iw(1),Jc()),i&2){let e=HD();gI(),Lh(e.loadError());}}function sr(i,l){if(i&1&&(_i$1(0,"li"),Iw(1),Jc()),i&2){let e=l.$implicit;gI(),Lh(e);}}function lr(i,l){if(i&1&&(_i$1(0,"section",12)(1,"h2"),Iw(2),Pw(3,"transloco"),Jc(),_i$1(4,"ul"),xD(5,sr,2,1,"li",null,ND),Jc()()),i&2){let e=HD(2);gI(2),Lh(Fw(3,1,"workflow-editor.validation")),gI(3),AD(e.validationErrors());}}function pr(i,l){if(i&1&&(uh(0,"nz-option",18),Pw(1,"transloco")),i&2){let e=l.$implicit,t=HD(2);lh("nzValue",e)("nzLabel",Fw(1,2,t.subjectTypeKey(e)));}}function dr(i,l){if(i&1&&(uh(0,"nz-option",20),Pw(1,"transloco")),i&2){let e=l.$implicit,t=HD(2);lh("nzValue",e)("nzLabel",Fw(1,3,t.subjectHandlingKey(e)))("nzDisabled",e==="collection"&&t.appliesToValue()==="none");}}function cr(i,l){if(i&1&&(uh(0,"nz-option",18),Pw(1,"transloco")),i&2){let e=l.$implicit,t=HD(3);lh("nzValue",e)("nzLabel",Fw(1,2,t.inputTypeKey(e)));}}function _r(i,l){if(i&1){let e=FD();_i$1(0,"div",23)(1,"label",15)(2,"span"),Iw(3),Pw(4,"transloco"),Jc(),_i$1(5,"input",27),mh("ngModelChange",function(n){let o=Fu(e).$index,d=HD(2);return ju(d.patchInputField(o,{name:n}))}),Jc(),iE(),Jc(),_i$1(6,"label",15)(7,"span"),Iw(8),Pw(9,"transloco"),Jc(),_i$1(10,"input",27),mh("ngModelChange",function(n){let o=Fu(e).$index,d=HD(2);return ju(d.patchInputField(o,{label:n}))}),Jc(),iE(),Jc(),_i$1(11,"div",15)(12,"span"),Iw(13),Pw(14,"transloco"),Jc(),_i$1(15,"nz-select",28),mh("ngModelChange",function(n){let o=Fu(e).$index,d=HD(2);return ju(d.patchInputField(o,{type:n}))}),xD(16,cr,2,4,"nz-option",18,ND),Jc(),iE(),Jc(),_i$1(18,"label",29),mh("ngModelChange",function(n){let o=Fu(e).$index,d=HD(2);return ju(d.patchInputField(o,{required:n}))}),Iw(19),Pw(20,"transloco"),Jc(),iE(),_i$1(21,"button",30),mh("click",function(){let n=Fu(e).$index,o=HD(2);return ju(o.removeInputField(n))}),Iw(22),Pw(23,"transloco"),Jc()();}if(i&2){let e=l.$implicit,t=l.$index,n=HD(2);ch("data-testid","input-field-"+t),gI(3),Lh(Fw(4,10,"workflow-editor.fieldName")),gI(2),lh("ngModel",e.name),aE(),gI(3),Lh(Fw(9,12,"workflow-editor.fieldLabel")),gI(2),lh("ngModel",e.label),aE(),gI(3),Lh(Fw(14,14,"workflow-editor.fieldType")),gI(2),lh("ngModel",e.type),aE(),gI(),AD(n.inputFieldTypes),gI(2),lh("ngModel",e.required),aE(),gI(),rl$1(" ",Fw(20,16,"workflow-editor.required")," "),gI(3),rl$1(" ",Fw(23,18,"workflow-editor.remove")," ");}}function mr(i,l){if(i&1&&(_i$1(0,"p",25),Iw(1),Pw(2,"transloco"),Jc()),i&2){let e=HD(2);gI(),rl$1(" ",jw(2,1,"workflow-editor.duplicateStepIds",Aw(4,nr,e.duplicateStepIds().join(", ")))," ");}}function ur(i,l){if(i&1){let e=FD();_D(0,lr,7,3,"section",12),_i$1(1,"nz-card",13),Pw(2,"transloco"),_i$1(3,"div",14)(4,"label",15)(5,"span"),Iw(6),Pw(7,"transloco"),Jc(),_i$1(8,"input",16),mh("ngModelChange",function(n){Fu(e);let o=HD();return ju(o.patchWorkflow({name:n}))}),Jc(),iE(),Jc(),_i$1(9,"div",15)(10,"span"),Iw(11),Pw(12,"transloco"),Jc(),_i$1(13,"nz-select",17),mh("ngModelChange",function(n){Fu(e);let o=HD();return ju(o.setAppliesTo(n))}),xD(14,pr,2,4,"nz-option",18,ND),Jc(),iE(),Jc(),_i$1(16,"div",15)(17,"span"),Iw(18),Pw(19,"transloco"),Jc(),_i$1(20,"nz-select",19),mh("ngModelChange",function(n){Fu(e);let o=HD();return ju(o.patchWorkflow({subjectHandling:n}))}),xD(21,dr,2,5,"nz-option",20,ND),Jc(),iE(),_i$1(23,"p",21),Iw(24),Pw(25,"transloco"),Jc()()(),_i$1(26,"label",15)(27,"span"),Iw(28),Pw(29,"transloco"),Jc(),_i$1(30,"textarea",22),mh("ngModelChange",function(n){Fu(e);let o=HD();return ju(o.patchWorkflow({description:n||void 0}))}),Jc(),iE(),Jc()(),_i$1(31,"nz-card",13),Pw(32,"transloco"),xD(33,_r,24,20,"div",23,SD),_i$1(35,"button",24),mh("click",function(){Fu(e);let n=HD();return ju(n.addInputField())}),Iw(36),Pw(37,"transloco"),Jc()(),_i$1(38,"nz-card",13),Pw(39,"transloco"),_D(40,mr,3,6,"p",25),_i$1(41,"app-step-list",26),mh("stepsChange",function(n){Fu(e);let o=HD();return ju(o.onStepsChange(n))}),Jc()();}if(i&2){let e=HD();MD(e.validationErrors().length>0?0:-1),gI(),lh("nzTitle",Fw(2,21,"workflow-editor.basics")),gI(5),Lh(Fw(7,23,"workflow-editor.name")),gI(2),lh("ngModel",e.workflow().name),aE(),gI(3),Lh(Fw(12,25,"workflow-editor.appliesTo")),gI(2),lh("ngModel",e.appliesToValue()),aE(),gI(),AD(e.subjectTypes),gI(4),Lh(Fw(19,27,"workflow-editor.subjectHandling.label")),gI(2),lh("ngModel",e.workflow().subjectHandling),aE(),gI(),AD(e.subjectHandlingOptions),gI(3),rl$1(" ",Fw(25,29,e.subjectHandlingHelpKey())," "),gI(4),Lh(Fw(29,31,"workflow-editor.description")),gI(2),lh("ngModel",e.workflow().description??""),aE(),gI(),lh("nzTitle",Fw(32,33,"workflow-editor.inputSchema")),gI(2),AD(e.workflow().inputSchema),gI(3),rl$1(" ",Fw(37,35,"workflow-editor.addInputField")," "),gI(2),lh("nzTitle",Fw(39,37,"workflow-editor.steps")),gI(2),MD(e.duplicateStepIds().length>0?40:-1),gI(),lh("steps",e.workflow().steps)("rootSteps",e.workflow().steps)("availableWorkflows",e.availableWorkflows())("appliesTo",e.workflow().appliesTo)("inputSchema",e.workflow().inputSchema)("settings",e.settings());}}var Cs=(()=>{class i{constructor(){this.route=C(C1),this.router=C(J1),this.workflowsApi=C(b),this.settingsApi=C(f),this.message=C(He),this.destroyRef=C(at),this.transloco=C(Ve),this.language=C(O),this.startJob=C(At),this.routeId=de(this.route.paramMap.pipe(Se(e=>e.get("id"))),{initialValue:this.route.snapshot.paramMap.get("id")}),this.workflow=qo$1(I()),this.availableWorkflows=qo$1([]),this.settings=qo$1(w_),this.loadError=qo$1(null),this.validationErrors=qo$1([]),this.duplicateStepIds=qo$1([]),this.saving=qo$1(false),this.loading=qo$1(true),this.isNew=Uw(()=>!this.routeId()),this.canStart=Uw(()=>!this.isNew()&&!this.loading()&&!this.loadError()&&this.workflow().subjectHandling==="per-subject"),this.pageTitle=Uw(()=>(this.language.currentLang(),this.isNew()?this.transloco.translate("workflow-editor.titleNew"):this.transloco.translate("workflow-editor.titleEdit",{name:this.workflow().name.trim()}))),this.subjectTypes=["none","ticket","pull_request","documentation"],this.subjectHandlingOptions=["per-subject","collection"],this.inputFieldTypes=["string","number","boolean","select","localRepository"],this.workflowsApi.list().pipe(ue(this.destroyRef)).subscribe({next:e=>this.availableWorkflows.set(e),error:()=>{}}),this.settingsApi.getSettings().pipe(ue(this.destroyRef)).subscribe({next:e=>this.settings.set(e),error:()=>{}}),this.route.paramMap.pipe(ue(this.destroyRef)).subscribe(e=>{let t=e.get("id");if(this.validationErrors.set([]),this.duplicateStepIds.set([]),this.loadError.set(null),!t){this.workflow.set(I()),this.loading.set(false);return}this.loading.set(true),this.workflowsApi.get(t).subscribe({next:n=>{this.workflow.set(s(r$1({},structuredClone(n)),{steps:_(n.steps,{idAutoSync:false})})),this.loading.set(false);},error:n=>{this.loading.set(false),this.loadError.set(this.errorMessage(n,`Failed to load workflow ${t}`));}});});}subjectTypeKey(e){return `workflow-editor.subjectType.${e}`}subjectHandlingKey(e){return `workflow-editor.subjectHandling.${e}`}subjectHandlingHelpKey(){return `workflow-editor.subjectHandling.help.${this.workflow().subjectHandling}`}inputTypeKey(e){return `workflow-editor.inputType.${e}`}patchWorkflow(e){this.workflow.update(t=>r$1(r$1({},t),e));}setAppliesTo(e){if(e==="none"){this.patchWorkflow({appliesTo:e,subjectHandling:"per-subject"});return}this.patchWorkflow({appliesTo:e});}appliesToValue(){let e=this.workflow().appliesTo;return Array.isArray(e)?e[0]??"none":e}onStepsChange(e){this.patchWorkflow({steps:e}),this.duplicateStepIds.set(Ad(e));}addInputField(){this.patchWorkflow({inputSchema:[...this.workflow().inputSchema,b$1()]});}removeInputField(e){this.patchWorkflow({inputSchema:this.workflow().inputSchema.filter((t,n)=>n!==e)});}patchInputField(e,t){let n=this.workflow().inputSchema.map((o,d)=>d===e?r$1(r$1({},o),t):o);this.patchWorkflow({inputSchema:n});}save(){let e=this.workflow(),t=Ad(e.steps);if(this.duplicateStepIds.set(t),t.length>0){this.validationErrors.set([this.transloco.translate("workflow-editor.duplicateStepIds",{ids:t.join(", ")})]);return}let n=v(e,{omitWorkflowId:this.isNew()}),o=c_.safeParse(n);if(!o.success){this.validationErrors.set(T(o.error));return}this.validationErrors.set([]),this.saving.set(true);let d=o.data,T$1=this.routeId();(this.isNew()||!T$1?this.workflowsApi.create(d):this.workflowsApi.update(T$1,s(r$1({},d),{id:T$1}))).subscribe({next:me=>{this.saving.set(false),this.workflow.set(s(r$1({},structuredClone(me)),{steps:_(me.steps,{idAutoSync:false})})),this.message.success(this.isNew()?"Workflow created":"Workflow saved"),this.isNew()&&this.router.navigate(["/workflows",me.id,"edit"]);},error:me=>{this.saving.set(false),this.message.error(this.errorMessage(me,"Save failed"));}});}startWorkflow(){let e=this.routeId();!e||!this.canStart()||this.startJob.start({workflowId:e});}exportWorkflow(){let e=this.routeId();e&&this.workflowsApi.exportDefinition(e).subscribe({next:t=>{l(`${ng(t.name)}.json`,JSON.stringify(t,null,2),"application/json");},error:t=>{this.message.error(this.errorMessage(t,this.transloco.translate("workflow-editor.exportFailed")));}});}errorMessage(e,t){return e instanceof bi$1||e instanceof Error?e.message:t}static{this.\u0275fac=function(t){return new(t||i)};}static{this.\u0275cmp=ZE({type:i,selectors:[["app-workflow-editor"]],decls:17,vars:12,consts:[["data-testid","workflow-editor",1,"editor"],[1,"header"],["data-testid","page-title"],[1,"header-actions"],["routerLink","/workflows","data-testid","back-to-workflows"],["nz-button","","type","button","data-testid","export-workflow",3,"disabled"],["nz-button","","type","button","data-testid","start-workflow"],["nz-button","","nzType","primary","type","button","data-testid","save-button",3,"click","nzLoading","disabled"],["data-testid","loading"],["data-testid","load-error",1,"error"],["nz-button","","type","button","data-testid","export-workflow",3,"click","disabled"],["nz-button","","type","button","data-testid","start-workflow",3,"click"],["data-testid","validation-errors",1,"errors"],[3,"nzTitle"],[1,"grid"],[1,"field"],["nz-input","","data-testid","workflow-name",3,"ngModelChange","ngModel"],["data-testid","workflow-applies-to",3,"ngModelChange","ngModel"],[3,"nzValue","nzLabel"],["data-testid","workflow-subject-handling",3,"ngModelChange","ngModel"],[3,"nzValue","nzLabel","nzDisabled"],["data-testid","workflow-subject-handling-help",1,"help"],["nz-input","","rows","2","data-testid","workflow-description",3,"ngModelChange","ngModel"],[1,"input-field-row"],["nz-button","","nzType","dashed","type","button",3,"click"],["data-testid","duplicate-step-ids",1,"error"],[3,"stepsChange","steps","rootSteps","availableWorkflows","appliesTo","inputSchema","settings"],["nz-input","",3,"ngModelChange","ngModel"],[3,"ngModelChange","ngModel"],["nz-checkbox","",3,"ngModelChange","ngModel"],["nz-button","","nzDanger","","type","button",3,"click"]],template:function(t,n){t&1&&(_i$1(0,"main",0)(1,"header",1)(2,"div")(3,"h1",2),Iw(4),Jc()(),_i$1(5,"div",3)(6,"a",4),Iw(7),Pw(8,"transloco"),Jc(),_D(9,ir,3,4,"button",5),_D(10,or,3,3,"button",6),_i$1(11,"button",7),mh("click",function(){return n.save()}),Iw(12),Pw(13,"transloco"),Jc()()(),_D(14,rr,3,3,"p",8)(15,ar,2,1,"p",9)(16,ur,42,39),Jc()),t&2&&(gI(4),Lh(n.pageTitle()),gI(3),Lh(Fw(8,8,"workflow-editor.backToWorkflows")),gI(2),MD(n.isNew()?-1:9),gI(),MD(n.canStart()?10:-1),gI(),lh("nzLoading",n.saving())("disabled",n.loading()||!!n.loadError()),gI(),rl$1(" ",Fw(13,10,"common.save")," "),gI(2),MD(n.loading()?14:n.loadError()?15:16));},dependencies:[$8,al,er$1,rl,$i$1,v3,pf,bd,sp,fp,Nt,Ke,Lt,ut,ai$1,z,ex,Fm,Am,Bn,Kt],styles:[".editor[_ngcontent-%COMP%]{padding:1.25rem 1.5rem 3rem;display:flex;flex-direction:column;gap:1rem}.header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;gap:1rem;align-items:flex-start}.header-actions[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:.75rem;align-items:center}.lede[_ngcontent-%COMP%]{margin:.25rem 0 0;color:#57534e}.grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(auto-fit,minmax(12rem,1fr));gap:.75rem 1rem}.field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.35rem;margin:.5rem 0}.field[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{font-size:.85rem;color:#57534e}.help[_ngcontent-%COMP%]{margin:0;font-size:.8rem;color:#78716c}.checkbox-row[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:.75rem;margin-bottom:.5rem}.input-field-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr 8rem auto auto;gap:.5rem;align-items:end;margin-bottom:.5rem}.input-field-row[_ngcontent-%COMP%] > .field[_ngcontent-%COMP%]{margin:0}.errors[_ngcontent-%COMP%]{border:1px solid #fecdd3;background:#fff1f2;padding:.75rem 1rem}.errors[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin:0 0 .35rem;font-size:1rem}.error[_ngcontent-%COMP%]{color:#9f1239}"]});}}return i})();export{Cs as WorkflowEditorComponent};