@knoflows/engine 0.1.0-alpha.14 → 0.1.0-alpha.15

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 (111) hide show
  1. package/dist/engine.js +18 -18
  2. package/dist/migrations/20260919073531_tense_grey_gargoyle/migration.sql +1 -0
  3. package/dist/migrations/20260919073531_tense_grey_gargoyle/snapshot.json +1348 -0
  4. package/dist/migrations/20260919081637_fearless_warlock/migration.sql +1 -0
  5. package/dist/migrations/20260919081637_fearless_warlock/snapshot.json +1358 -0
  6. package/package.json +2 -2
  7. package/static/apple-touch-icon.png +0 -0
  8. package/static/assets/i18n/en.json +23 -6
  9. package/static/assets/i18n/es.json +23 -6
  10. package/static/chunk-1Oqdt_Gp.js +1 -0
  11. package/static/{chunk-BGD9WiFM.js → chunk-1eeePIP1.js} +1 -1
  12. package/static/chunk-37yFTUcY.js +1 -0
  13. package/static/chunk-7MZQgksi.js +1 -0
  14. package/static/chunk-7VyHTRp_.js +1 -0
  15. package/static/chunk-B0V1VBvY.js +1 -0
  16. package/static/chunk-BH5zvE8A.js +1 -0
  17. package/static/chunk-BZxs3wP7.js +1 -0
  18. package/static/chunk-B_L2A3hm.js +1 -0
  19. package/static/chunk-BbIC5sO2.js +1 -0
  20. package/static/chunk-BeWWb9rm.js +1 -0
  21. package/static/chunk-BnD2l9n3.js +1 -0
  22. package/static/chunk-Bp8u1CCw.js +1 -0
  23. package/static/chunk-BpOumnMU.js +1 -0
  24. package/static/chunk-BuPc66MS.js +1 -0
  25. package/static/chunk-C4Ee3umI.js +1 -0
  26. package/static/chunk-C5n_oTWP.js +1 -0
  27. package/static/chunk-CF4gc4Im.js +1 -0
  28. package/static/chunk-CM8oLO7n.js +1 -0
  29. package/static/chunk-CXGgR5M1.js +1 -0
  30. package/static/chunk-CiJRU6lo.js +1 -0
  31. package/static/chunk-Cn95hfnf.js +1 -0
  32. package/static/chunk-Cq09TrKP.js +1 -0
  33. package/static/chunk-Cx2n09Ng.js +1 -0
  34. package/static/chunk-DFoFQkTa.js +1 -0
  35. package/static/chunk-DMAf3Qir.js +66 -0
  36. package/static/chunk-DYARU-G0.js +1 -0
  37. package/static/chunk-DZhQ2iEt.js +1 -0
  38. package/static/chunk-D_DUAV49.js +1 -0
  39. package/static/chunk-DgEO14wO.js +1 -0
  40. package/static/{chunk-CjitpVjI.js → chunk-DphMF2VB.js} +1 -1
  41. package/static/chunk-DxZsQqxS.js +1 -0
  42. package/static/chunk-GQe0l3Uh.js +1 -0
  43. package/static/chunk-J9qS04nF.js +1 -0
  44. package/static/chunk-dOUa0Vhs.js +1 -0
  45. package/static/chunk-nx1xncBD.js +1 -0
  46. package/static/chunk-q9oVn_qj.js +5 -0
  47. package/static/chunk-vYeIWxg4.js +1 -0
  48. package/static/chunk-yxqIQom4.js +1 -0
  49. package/static/favicon-16x16.png +0 -0
  50. package/static/favicon-32x32.png +0 -0
  51. package/static/favicon.ico +0 -0
  52. package/static/favicon.svg +12 -0
  53. package/static/icon-192.png +0 -0
  54. package/static/icon-512.png +0 -0
  55. package/static/index.html +30 -5
  56. package/static/main-2ZW45HAE.js +248 -0
  57. package/static/media/inter-latin-400-normal-55WT6UWF.woff2 +0 -0
  58. package/static/media/inter-latin-400-normal-FR5HOXA4.woff +0 -0
  59. package/static/media/inter-latin-500-normal-W62DVTXI.woff2 +0 -0
  60. package/static/media/inter-latin-500-normal-ZNGIZ2YB.woff +0 -0
  61. package/static/media/inter-latin-600-normal-R6Y2SZCR.woff2 +0 -0
  62. package/static/media/inter-latin-600-normal-ZYHV6QZT.woff +0 -0
  63. package/static/media/jetbrains-mono-latin-500-normal-ETEQEOVZ.woff +0 -0
  64. package/static/media/jetbrains-mono-latin-500-normal-V4XIP5OW.woff2 +0 -0
  65. package/static/media/space-grotesk-latin-500-normal-GESQWJQV.woff2 +0 -0
  66. package/static/media/space-grotesk-latin-500-normal-HV4TE4RA.woff +0 -0
  67. package/static/media/space-grotesk-latin-700-normal-6Z7GHSI6.woff +0 -0
  68. package/static/media/space-grotesk-latin-700-normal-I3MXRIUZ.woff2 +0 -0
  69. package/static/nz-theme-dark.css +1 -0
  70. package/static/nz-theme.css +1 -0
  71. package/static/styles-JGCTKGGH.css +1 -0
  72. package/static/chunk-7nUPxia9.js +0 -1
  73. package/static/chunk-B5OZfu7U.js +0 -1
  74. package/static/chunk-B6yhN6h_.js +0 -1
  75. package/static/chunk-B8xDFyOW.js +0 -1
  76. package/static/chunk-BCQYv6zO.js +0 -1
  77. package/static/chunk-BRQzRdUy.js +0 -1
  78. package/static/chunk-BT1tqKUa.js +0 -1
  79. package/static/chunk-BbMJvJVR.js +0 -5
  80. package/static/chunk-Bdf1gK_x.js +0 -1
  81. package/static/chunk-BgZJenki.js +0 -1
  82. package/static/chunk-BhOOhcFV.js +0 -1
  83. package/static/chunk-BphvnLVV.js +0 -1
  84. package/static/chunk-C4ekQTdr.js +0 -1
  85. package/static/chunk-CMCOXbTF.js +0 -1
  86. package/static/chunk-CVunAaEq.js +0 -1
  87. package/static/chunk-CWPY-qdb.js +0 -1
  88. package/static/chunk-C_RmBwoX.js +0 -1
  89. package/static/chunk-CkEV4Kdw.js +0 -1
  90. package/static/chunk-CmjHhm0_.js +0 -1
  91. package/static/chunk-Cprdc3WE.js +0 -1
  92. package/static/chunk-CsI-lLXP.js +0 -1
  93. package/static/chunk-D1s098WO.js +0 -1
  94. package/static/chunk-D5uYKhQI.js +0 -1
  95. package/static/chunk-DCwYXBAy.js +0 -1
  96. package/static/chunk-DDsAcugC.js +0 -66
  97. package/static/chunk-DWyVd0g2.js +0 -1
  98. package/static/chunk-Dn9gu9_q.js +0 -1
  99. package/static/chunk-Doaes0Yg.js +0 -7
  100. package/static/chunk-Dqf92YVW.js +0 -1
  101. package/static/chunk-Oq0qp-a6.js +0 -1
  102. package/static/chunk-PTPh9FQ2.js +0 -1
  103. package/static/chunk-PfPOHfb1.js +0 -1
  104. package/static/chunk-WIfL3i6D.js +0 -1
  105. package/static/chunk-ZTjXJrt4.js +0 -1
  106. package/static/chunk-bbBn-iZU.js +0 -1
  107. package/static/chunk-gl_-d0La.js +0 -1
  108. package/static/chunk-hTFsYp4X.js +0 -1
  109. package/static/chunk-szOy8Im7.js +0 -1
  110. package/static/main-OG6DVLH6.js +0 -249
  111. package/static/styles-4UB6RUIG.css +0 -1
@@ -0,0 +1 @@
1
+ import {X as Xe,b as bt,K as Ke}from'./chunk-BbIC5sO2.js';import {A as At}from'./chunk-BnD2l9n3.js';import {I,_,b as b$1,v,T,y,h,E,P,A,j}from'./chunk-Cn95hfnf.js';import'./chunk-DZhQ2iEt.js';import {$ as $$1,R,B}from'./chunk-DFoFQkTa.js';import {H as He}from'./chunk-BuPc66MS.js';import {z as ze,S as St}from'./chunk-Cq09TrKP.js';import {o as ot$1}from'./chunk-CXGgR5M1.js';import {a as ai$1,z,o as ot,b as at$1,i as it$1,r as rt}from'./chunk-B_L2A3hm.js';import'./chunk-37yFTUcY.js';import {f}from'./chunk-J9qS04nF.js';import {C,a as C1,T as J1,au as $,b as at,V as Ve,b1 as O,b2 as de,aw as Se,q as qo$1,H as Hw,u as ue,s,r as r$1,c as bi$1,Q as QE,d as $8,e as al,ax as er,f as rl,g as $i$1,v as v3,Z 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,k as vw,l as Kc,R as Rw,n as bD,m as gh,w as gI,P as Ph,O as Ow,B as _D,x as ch,z as nl,aj as jn$1,a5 as $0,a6 as B0,W as rd,t as t$1,b3 as Ja,al as ts,N as ND,G as ah,D as xD,L as LD,E as VD,o as oE,S as SD,aq as MD,y as sE,aA as YE,aB as uu,b4 as Y0,aQ as Z0,b5 as pn,b6 as q0,aE as _r,b7 as Ee,aH as Ci$1,aJ as Oe,b8 as ml,b9 as Nr,aK as Bt,ba as pl,bb as Uw,bc as W0,bd as Qr$1,be as tl,bf as kr,bg as Kf,X as Bw,bh as il,a3 as Th,a4 as xh,bi as hl,bj as w5,bk as BD,aY as nh,bl as Lw,aR as Sw,aS as St$1,bm as fn$1,aT as wo$1,bn as rD,bo as ir,bp as cw,bq as Dh,br as GD,bs as Eh,bt as U0,a$ as Jc,bu as mh,b0 as Xc,a8 as Mh,p as lh,a7 as Pw,I as xw,ai as zD,J as Pu$1,M as Lu,bv as Vh,bw as jh,bx as $D,a9 as Lh,aa as Nw,by as ww}from'./main-2ZW45HAE.js';import {b}from'./chunk-CM8oLO7n.js';import {G as Gn$1,u as un}from'./chunk-vYeIWxg4.js';import {$ as $_,b as Ed,a as t_,t as tg,r as rm,N as N_,c as tm,U as U_,P as P_,_ as _g,d as Pu,f as __}from'./chunk-DMAf3Qir.js';import {W,I as I$1}from'./chunk-C4Ee3umI.js';import {L as Lt,u as ut}from'./chunk-yxqIQom4.js';import'./chunk-DphMF2VB.js';var $n=["input"],Bn=["inputNumberHost"],Dn=[[["","nzInputAddonBefore",""]],[["","nzInputAddonAfter",""]],[["","nzInputPrefix",""]],[["","nzInputSuffix",""]],[["","nzInputNumberUpIcon",""]],[["","nzInputNumberDownIcon",""]]],Ln=["[nzInputAddonBefore]","[nzInputAddonAfter]","[nzInputPrefix]","[nzInputSuffix]","[nzInputNumberUpIcon]","[nzInputNumberDownIcon]"];function On(i,l){}function Wn(i,l){if(i&1&&nh(0,On,0,0,"ng-template",8),i&2){VD();let e=zD(4);ch("ngTemplateOutlet",e);}}function jn(i,l){}function Rn(i,l){if(i&1&&nh(0,jn,0,0,"ng-template",8),i&2){VD();let e=zD(8);ch("ngTemplateOutlet",e);}}function Kn(i,l){}function Hn(i,l){if(i&1&&nh(0,Kn,0,0,"ng-template",8),i&2){VD();let e=zD(12);ch("ngTemplateOutlet",e);}}function qn(i,l){if(i&1&&vw(0),i&2){let e=VD(3);Ph(e.nzAddonBefore());}}function Gn(i,l){i&1&&(_i$1(0,"div",10),$D(1,0,null,qn,1,1),Kc());}function Un(i,l){}function Zn(i,l){if(i&1&&nh(0,Un,0,0,"ng-template",8),i&2){VD(2);let e=zD(6);ch("ngTemplateOutlet",e);}}function Qn(i,l){}function Jn(i,l){if(i&1&&nh(0,Qn,0,0,"ng-template",8),i&2){VD(2);let e=zD(10);ch("ngTemplateOutlet",e);}}function Yn(i,l){if(i&1&&vw(0),i&2){let e=VD(3);Ph(e.nzAddonAfter());}}function Xn(i,l){i&1&&(_i$1(0,"div",10),$D(1,1,null,Yn,1,1),Kc());}function ei(i,l){if(i&1&&(_i$1(0,"div",9),bD(1,Gn,3,0,"div",10),bD(2,Zn,1,1,null,8)(3,Jn,1,1,null,8),bD(4,Xn,3,0,"div",10),Kc()),i&2){let e=VD();gI(),_D(e.hasAddonBefore()?1:-1),gI(),_D(e.hasAffix()?2:3),gI(2),_D(e.hasAddonAfter()?4:-1);}}function ti(i,l){}function ni(i,l){if(i&1&&(_i$1(0,"div"),nh(1,ti,0,0,"ng-template",8),Kc()),i&2){let e=VD(),n=zD(8);cw(e.affixWrapperClass()),gI(),ch("ngTemplateOutlet",n);}}function ii(i,l){if(i&1&&vw(0),i&2){let e=VD(3);Ph(e.nzPrefix());}}function oi(i,l){i&1&&(_i$1(0,"span",11),$D(1,2,null,ii,1,1),Kc());}function ai(i,l){}function ri(i,l){if(i&1&&vw(0),i&2){let e=VD(3);Ph(e.nzSuffix());}}function si(i,l){if(i&1&&lh(0,"nz-form-item-feedback-icon",13),i&2){let e=VD(3);ch("status",e.finalStatus());}}function li(i,l){if(i&1&&(_i$1(0,"span",12),$D(1,3,null,ri,1,1),bD(3,si,1,1,"nz-form-item-feedback-icon",13),Kc()),i&2){let e=VD(2);gI(3),_D(e.hasFeedback()&&e.finalStatus()?3:-1);}}function pi(i,l){if(i&1&&(bD(0,oi,3,0,"span",11),nh(1,ai,0,0,"ng-template",8),bD(2,li,4,1,"span",12)),i&2){let e=VD(),n=zD(10);_D(e.hasPrefix()?0:-1),gI(),ch("ngTemplateOutlet",n),gI(),_D(e.hasSuffix()?2:-1);}}function di(i,l){}function ci(i,l){if(i&1&&(_i$1(0,"div",null,5),nh(2,di,0,0,"ng-template",8),Kc()),i&2){let e=VD(),n=zD(12);cw(e.inputNumberClass()),gI(2),ch("ngTemplateOutlet",n);}}function _i(i,l){i&1&&lh(0,"nz-icon",20);}function mi(i,l){i&1&&lh(0,"nz-icon",21);}function ui(i,l){if(i&1){let e=LD();_i$1(0,"div",17,7),gh("mouseup",function(){Pu$1(e);let t=VD(2);return Lu(t.stopAutoStep())})("mouseleave",function(){Pu$1(e);let t=VD(2);return Lu(t.stopAutoStep())}),_i$1(2,"span",18),gh("mousedown",function(t){Pu$1(e);let o=VD(2);return Lu(o.onStepMouseDown(t,true))}),$D(3,4,null,_i,1,0),Kc(),_i$1(5,"span",19),gh("mousedown",function(t){Pu$1(e);let o=VD(2);return Lu(o.onStepMouseDown(t,false))}),$D(6,5,null,mi,1,0),Kc()();}if(i&2){let e=VD(2);gI(2),Mh("ant-input-number-handler-up-disabled",e.upDisabled()),ah("aria-disabled",e.upDisabled()),gI(3),Mh("ant-input-number-handler-down-disabled",e.downDisabled()),ah("aria-disabled",e.downDisabled());}}function xi(i,l){if(i&1){let e=LD();bD(0,ui,8,6,"div",14),_i$1(1,"div",15)(2,"input",16,6),gh("input",function(){Pu$1(e);let t=zD(3),o=VD();return Lu(o.onInput(t.value))})("wheel",function(t){Pu$1(e);let o=VD();return Lu(o.onWheel(t))}),Kc()();}if(i&2){let e=VD();_D(e.nzControls()?0:-1),gI(2),ch("value",e.displayValue())("placeholder",e.nzPlaceHolder()??"")("disabled",e.finalDisabled())("readOnly",e.nzReadOnly()),ah("aria-valuemin",e.nzMin())("aria-valuemax",e.nzMax())("id",e.nzId())("step",e.nzStep())("value",e.displayValue());}}var it=(()=>{class i{nzId=$0(null);nzSize=$0("default");nzPlaceHolder=$0(null);nzStatus=$0("");nzVariant=$0();nzStep=$0(1,{transform:Y0});nzMin=$0(Number.MIN_SAFE_INTEGER,{transform:Y0});nzMax=$0(Number.MAX_SAFE_INTEGER,{transform:Y0});nzPrecision=$0(null);nzParser=$0();nzFormatter=$0();nzDisabled=$0(false,{transform:Z0});nzReadOnly=$0(false,{transform:Z0});nzAutoFocus=$0(false,{transform:Z0});nzKeyboard=$0(true,{transform:Z0});nzControls=$0(true,{transform:Z0});nzChangeOnWheel=$0(true,{transform:Z0});nzPrefix=$0();nzSuffix=$0();nzAddonBefore=$0();nzAddonAfter=$0();nzBlur=B0();nzFocus=B0();nzOnStep=B0();onChange=()=>{};onTouched=()=>{};isDisabledFirstChange=true;compactSize=C(pn,{optional:true});inputRef=q0.required("input");hostRef=q0("inputNumberHost");elementRef=C(_r);injector=C(Ee);focusMonitor=C(Ci$1);directionality=C(Oe);nzFormStatusService=C(ml,{optional:true});autoStepTimer=null;defaultFormatter=e=>{let n=this.nzPrecision();return Nr(n)?e.toFixed(n):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=Uw(()=>this.nzStatus());finalDisabled=Uw(()=>this.nzDisabled());prefix=W0(ot);suffix=W0(at$1);addonBefore=W0(it$1);addonAfter=W0(rt);hasPrefix=Hw(()=>!!this.nzPrefix()||!!this.prefix());hasSuffix=Hw(()=>!!this.nzSuffix()||!!this.suffix()||this.hasFeedback());hasAffix=Hw(()=>this.hasPrefix()||this.hasSuffix());hasAddonBefore=Hw(()=>!!this.nzAddonBefore()||!!this.addonBefore());hasAddonAfter=Hw(()=>!!this.nzAddonAfter()||!!this.addonAfter());hasAddon=Hw(()=>this.hasAddonBefore()||this.hasAddonAfter());class=Hw(()=>this.hasAddon()?this.groupWrapperClass():this.hasAffix()?this.affixWrapperClass():this.inputNumberClass());inputNumberClass=Hw(()=>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&&!nt(this.value(),this.nzMin(),this.nzMax())},tl("ant-input-number",this.finalVariant())),Qr$1("ant-input-number",this.finalStatus(),this.hasFeedback())));affixWrapperClass=Hw(()=>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$1("ant-input-number-affix-wrapper",this.finalStatus(),this.hasFeedback())),tl("ant-input-number-affix-wrapper",this.finalVariant())));groupWrapperClass=Hw(()=>r$1(r$1({"ant-input-number-group-wrapper":true,"ant-input-number-group-wrapper-rtl":this.dir()==="rtl"},Qr$1("ant-input-number-group-wrapper",this.finalStatus(),this.hasFeedback())),tl("ant-input-number-group-wrapper",this.finalVariant())));finalSize=Hw(()=>this.formSize?.()?this.formSize():this.compactSize?this.compactSize():this.nzSize());finalVariant=Hw(()=>this.nzVariant()||this.formVariant?.()||"outlined");upDisabled=Hw(()=>!kr(this.value())&&this.value()>=this.nzMax());downDisabled=Hw(()=>!kr(this.value())&&this.value()<=this.nzMin());constructor(){let e=C(at);Kf(()=>{let n=this.hostRef(),t=n||this.elementRef;this.focusMonitor.monitor(t,true).pipe(ue(e)).subscribe(o=>{Bw(()=>{this.focused.set(!!o),o?this.nzFocus.emit():(this.fixValue(),this.onTouched(),this.nzBlur.emit());});}),e.onDestroy(()=>{this.focusMonitor.stopMonitoring(t);});}),this.nzFormStatusService?.formStatusChanges.pipe(ue()).subscribe(({status:n,hasFeedback:t})=>{this.finalStatus.set(n),this.hasFeedback.set(t);});}ngOnInit(){this.nzAutoFocus()&&Kf(()=>this.focus(),{injector:this.injector});}writeValue(e){kr(e)&&(e=null),Bw(()=>{this.value.set(e),this.setValue(e);});}registerOnChange(e){this.onChange=e;}registerOnTouched(e){this.onTouched=e;}setDisabledState(e){Bw(()=>{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,n,t){if(n&&this.upDisabled()||!n&&this.downDisabled())return;let o=e.shiftKey?this.nzStep()*10:this.nzStep();n||(o=-o);let V=10**hn(o),K=gn((Math.round((this.value()||0)*V)+Math.round(o*V))/V,this.nzMin(),this.nzMax(),this.nzPrecision());this.setValue(K),this.nzOnStep.emit({type:n?"up":"down",value:this.value(),offset:this.nzStep(),emitter:t}),this.focus();}setValue(e){let n=this.nzFormatter()??this.defaultFormatter,t=this.nzPrecision();Nr(t)&&(e&&=+e.toFixed(t));let o=kr(e)?"":n(e);this.displayValue.set(o),this.updateValue(e);}setValueByTyping(e){if(this.displayValue.set(e),e===""){this.updateValue(null);return}let t=(this.nzParser()??fn)(e);if(gi(e)||Number.isNaN(t))return;let o=this.nzFormatter();if(o){let d=o(t);this.displayValue.set(d);}nt(t,this.nzMin(),this.nzMax())&&this.updateValue(t);}updateValue(e){this.value()!==e&&(this.value.set(e),this.onChange(e));}fixValue(){let e=this.displayValue();if(e==="")return;let t=(this.nzParser()??fn)(e);if(Number.isNaN(t))t=this.value();else {let o=this.nzPrecision();Nr(o)&&hn(t)!==o&&(t=+t.toFixed(o)),nt(t,this.nzMin(),this.nzMax())||(t=gn(t,this.nzMin(),this.nzMax(),o));}this.setValue(t);}stopAutoStep(){this.autoStepTimer!==null&&(clearTimeout(this.autoStepTimer),this.autoStepTimer=null);}onStepMouseDown(e,n){e.preventDefault(),this.stopAutoStep(),this.step(e,n,"handler");let t=()=>{this.step(e,n,"handler"),this.autoStepTimer=setTimeout(t,Ci);};this.autoStepTimer=setTimeout(t,fi);}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(n){return new(n||i)};static \u0275cmp=QE({type:i,selectors:[["nz-input-number"]],contentQueries:function(n,t,o){n&1&&Eh(o,t.prefix,ot,5)(o,t.suffix,at$1,5)(o,t.addonBefore,it$1,5)(o,t.addonAfter,rt,5),n&2&&GD(4);},viewQuery:function(n,t){n&1&&Dh(t.inputRef,$n,5)(t.hostRef,Bn,5),n&2&&GD(2);},hostVars:2,hostBindings:function(n,t){n&1&&gh("keydown",function(d){return t.onKeyDown(d)}),n&2&&cw(t.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:[Sw([{provide:St$1,useExisting:wo$1(()=>i),multi:true},{provide:fn$1,useValue:"input-number"}]),rD([ir])],ngContentSelectors:Ln,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(n,t){n&1&&(BD(Dn),bD(0,Wn,1,1,null,8)(1,Rn,1,1,null,8)(2,Hn,1,1,null,8),nh(3,ei,5,3,"ng-template",null,0,Lw)(5,ni,2,3,"ng-template",null,1,Lw)(7,pi,3,3,"ng-template",null,2,Lw)(9,ci,3,3,"ng-template",null,3,Lw)(11,xi,4,10,"ng-template",null,4,Lw)),n&2&&_D(t.hasAddon()?0:t.hasAffix()?1:2);},dependencies:[Th,xh,hl,w5],encapsulation:2})}return i})(),Ci=200,fi=600;function fn(i){let l=i.trim().replace(/,/g,"").replace(/。/g,".");return l.length?+l:NaN}function nt(i,l,e){return i>=l&&i<=e}function gn(i,l,e,n=null){if(n===null)return i<l?l:i>e?e:i;let t=+i.toFixed(n),o=Math.pow(10,n);return t<l?Math.ceil(l*o)/o:t>e?Math.floor(e*o)/o:t}function hn(i){return i.toString().split(".")[1]?.length||0}function gi(i){return /[.。](\d*0)?$/.test(i.toString())}var bn=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=YE({type:i});static \u0275inj=uu({imports:[it]})}return i})();var bi=(i,l)=>l.id;function vi(i,l){if(i&1&&lh(0,"nz-option",2),i&2){let e=l.$implicit;ch("nzValue",e.id)("nzLabel",e.name);}}var wn=(()=>{class i{constructor(){this.reposApi=C(f),this.destroyRef=C(at),this.path=U0(""),this.repoSelected=B0(),this.repos=qo$1([]),this.selectedCatalogId=Hw(()=>{let e=this.path();return this.repos().find(n=>n.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 n=this.repos().find(t=>t.id===e);n&&this.repoSelected.emit(n);}static{this.\u0275fac=function(n){return new(n||i)};}static{this.\u0275cmp=QE({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(n,t){n&1&&(_i$1(0,"div",0)(1,"nz-select",1),Rw(2,"transloco"),gh("ngModelChange",function(d){return t.onCatalogSelect(d)}),ND(3,vi,1,2,"nz-option",2,bi),Kc(),oE(),_i$1(5,"app-path-picker",3),Rw(6,"transloco"),gh("pathChange",function(d){return t.path.set(d)}),Kc()()),n&2&&(gI(),ch("ngModel",t.selectedCatalogId())("nzPlaceHolder",Ow(2,4,"step-list.createWorktree.catalogPlaceholder")),sE(),gI(2),xD(t.repos()),gI(2),ch("path",t.path())("browseLabel",Ow(6,6,"step-list.createWorktree.browseManually")));},dependencies:[$8,al,rl,$i$1,ex,Fm,Am,ot$1,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 wi=i=>({action:i}),Si=i=>({fields:i}),Sn=(i,l)=>l.token,yi=(i,l)=>l.subjectType,zi=(i,l)=>l.id+l.name;function Mi(i,l){if(i&1){let e=LD();Jc(0,"li")(1,"span",11),vw(2),Xc(),Jc(3,"button",12),mh("click",function(){let t=Pu$1(e).$implicit,o=VD(3);return Lu(o.copyToken(t.token))}),vw(4),Xc()();}if(i&2){let e=l.$implicit,n=VD(3);gI(2),Ph(e.label),gI(),Mh("copied",n.copiedToken()===e.token),ah("data-testid","copy-token")("data-token",e.token),gI(),nl(" ",e.token," ");}}function Ei(i,l){if(i&1&&(Jc(0,"div",6)(1,"h5"),vw(2),Rw(3,"transloco"),Xc(),Jc(4,"ul"),ND(5,Mi,5,6,"li",null,Sn),Xc()()),i&2){let e=VD(2);gI(2),Ph(Ow(3,1,"step-list.availableParameters.inputs")),gI(3),xD(e.inputEntries());}}function Ti(i,l){if(i&1&&(Jc(0,"p",14),vw(1),Rw(2,"transloco"),Xc()),i&2){let e=VD().$implicit;gI(),Ph(Ow(2,1,e.typeKey));}}function ki(i,l){if(i&1){let e=LD();Jc(0,"li")(1,"button",12),mh("click",function(){let t=Pu$1(e).$implicit,o=VD(4);return Lu(o.copyToken(t.token))}),vw(2),Xc()();}if(i&2){let e=l.$implicit,n=VD(4);gI(),Mh("copied",n.copiedToken()===e.token),ah("data-testid","copy-token")("data-token",e.token),gI(),nl(" ",e.token," ");}}function Ii(i,l){if(i&1&&(bD(0,Ti,3,3,"p",14),Jc(1,"ul"),ND(2,ki,3,5,"li",null,Sn),Xc()),i&2){let e=l.$implicit,n=VD(3);_D(n.subjectGroups().length>1?0:-1),gI(2),xD(e.tokens);}}function Ni(i,l){if(i&1&&(Jc(0,"div",7)(1,"h5",13),vw(2),Rw(3,"transloco"),Xc(),ND(4,Ii,4,1,null,null,yi),Xc()),i&2){let e=VD(2);gI(2),Lh(" ",Ow(3,2,"step-list.availableParameters.subject")," (",e.subjectTypeHeading(),") "),gI(2),xD(e.subjectGroups());}}function Fi(i,l){i&1&&(Jc(0,"p",9),vw(1),Rw(2,"transloco"),Xc()),i&2&&(gI(),nl(" ",Ow(2,1,"step-list.availableParameters.noPrevious")," "));}function Vi(i,l){i&1&&(Jc(0,"span",17),vw(1),Rw(2,"transloco"),Xc()),i&2&&(gI(),nl(" ",Ow(2,1,"step-list.availableParameters.loopOverwrite")," "));}function Pi(i,l){i&1&&(Jc(0,"p",5),vw(1),Rw(2,"transloco"),Xc()),i&2&&(gI(),Ph(Ow(2,1,"step-list.availableParameters.missingId")));}function Ai(i,l){if(i&1){let e=LD();Jc(0,"button",12),mh("click",function(){let t=Pu$1(e).$implicit,o=VD(5);return Lu(o.copyToken(t))}),vw(1),Xc();}if(i&2){let e=l.$implicit,n=VD(5);Mh("copied",n.copiedToken()===e),ah("data-testid","copy-token")("data-token",e),gI(),nl(" ",e," ");}}function $i(i,l){if(i&1&&(Jc(0,"div",18),ND(1,Ai,2,5,"button",23,SD),Xc()),i&2){let e=VD().$implicit;gI(),xD(e.tokens);}}function Bi(i,l){if(i&1&&(Jc(0,"p",19),vw(1),Rw(2,"transloco"),Xc()),i&2){let e=VD().$implicit;gI(),nl(" ",Pw(2,1,"step-list.availableParameters.providerOpaque",xw(4,wi,e.actionLabel))," ");}}function Di(i,l){i&1&&(Jc(0,"p",19),vw(1),Rw(2,"transloco"),Xc()),i&2&&(gI(),nl(" ",Ow(2,1,"step-list.availableParameters.interactionOpaque")," "));}function Li(i,l){if(i&1&&(Jc(0,"p",20),vw(1),Rw(2,"transloco"),Xc()),i&2){let e=VD().$implicit,n=VD(3);gI(),nl(" ",Pw(2,1,"step-list.availableParameters.arrayOf",xw(4,Si,n.arrayFields(e)))," ");}}function Oi(i,l){i&1&&(Jc(0,"p",21),vw(1),Rw(2,"transloco"),Xc()),i&2&&(gI(),nl(" ",Ow(2,1,"step-list.availableParameters.subjectTypeUnion")," "));}function Wi(i,l){i&1&&(Jc(0,"p",22),vw(1),Rw(2,"transloco"),Xc()),i&2&&(gI(),nl(" ",Ow(2,1,"step-list.availableParameters.noOutput")," "));}function ji(i,l){if(i&1&&(Jc(0,"li",15),Rw(1,"transloco"),Jc(2,"div",16)(3,"span",11),vw(4),Xc(),bD(5,Vi,3,3,"span",17),Xc(),bD(6,Pi,3,3,"p",5),bD(7,$i,3,0,"div",18),bD(8,Bi,3,6,"p",19),bD(9,Di,3,3,"p",19),bD(10,Li,3,6,"p",20),bD(11,Oi,3,3,"p",21),bD(12,Wi,3,3,"p",22),Xc()),i&2){let e=l.$implicit;ah("data-testid","previous-step-"+e.id)("title",e.inLoop?Ow(1,11,"step-list.availableParameters.loopOverwrite"):null),gI(4),Ph(e.name||e.id),gI(),_D(e.inLoop?5:-1),gI(),_D(e.id?-1:6),gI(),_D(e.tokens.length>0?7:-1),gI(),_D(e.shape.opaque&&e.isProvider?8:-1),gI(),_D(e.shape.opaque&&e.isInteraction?9:-1),gI(),_D(e.shape.isArray&&(e.shape.fields?.length??0)>0?10:-1),gI(),_D(e.shape.fieldsDependOnSubjectType?11:-1),gI(),_D(!e.shape.opaque&&(e.shape.fields?.length??0)===0&&!e.shape.isScalar?12:-1);}}function Ri(i,l){if(i&1&&(Jc(0,"ul",10),ND(1,ji,13,13,"li",15,zi),Xc()),i&2){let e=VD(2);gI(),xD(e.previousEntries());}}function Ki(i,l){if(i&1&&(Jc(0,"div",4)(1,"p",5),vw(2),Rw(3,"transloco"),Xc(),bD(4,Ei,7,3,"div",6),bD(5,Ni,6,4,"div",7),Jc(6,"div",8)(7,"h5"),vw(8),Rw(9,"transloco"),Xc(),bD(10,Fi,3,3,"p",9)(11,Ri,3,0,"ul",10),Xc()()),i&2){let e=VD();gI(2),Ph(Ow(3,5,"step-list.availableParameters.hint")),gI(2),_D(e.inputEntries().length>0?4:-1),gI(),_D(e.subjectGroups().length>0?5:-1),gI(3),Ph(Ow(9,7,"step-list.availableParameters.previous")),gI(2),_D(e.previousEntries().length===0?10:11);}}var yn=(()=>{class i{constructor(){this.transloco=C(Ve),this.inputSchema=$0([]),this.appliesTo=$0("none"),this.previousSteps=$0([]),this.expanded=qo$1(false),this.copiedToken=qo$1(null),this.inputEntries=Hw(()=>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:tm(e.name)}))),this.subjectGroups=Hw(()=>U_(this.appliesTo()).map(e=>({subjectType:e.subjectType,typeKey:`workflow-editor.subjectType.${e.subjectType}`,tokens:e.fields.map(n=>({field:n,token:tm(`subject.${n}`)}))}))),this.previousEntries=Hw(()=>this.previousSteps().map(({step:e,inLoop:n})=>{let t=e;return {name:t.name,id:t.id,inLoop:n,shape:_g(t,this.appliesTo()),tokens:P_(t,this.appliesTo()),actionLabel:Hi(t),isProvider:t.type==="provider_action",isInteraction:t.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 n=navigator.clipboard;if(!n?.writeText){this.copiedToken.set(e);return}n.writeText(e).then(()=>this.copiedToken.set(e),()=>this.copiedToken.set(e));}static{this.\u0275fac=function(n){return new(n||i)};}static{this.\u0275cmp=QE({type:i,selectors:[["app-available-parameters"]],inputs:{inputSchema:[1,"inputSchema"],appliesTo:[1,"appliesTo"],previousSteps:[1,"previousSteps"]},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","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(n,t){n&1&&(Jc(0,"section",0)(1,"button",1),mh("click",function(){return t.toggleExpanded()}),Jc(2,"span",2),vw(3),Xc(),Jc(4,"span",3),vw(5),Rw(6,"transloco"),Xc()(),bD(7,Ki,12,9,"div",4),Xc()),n&2&&(Mh("expanded",t.expanded()),gI(),ah("aria-expanded",t.expanded()),gI(2),Ph(t.expanded()?"\u25BE":"\u25B8"),gI(2),Ph(Ow(6,6,"step-list.availableParameters.title")),gI(2),_D(t.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 Hi(i){return i.type!=="provider_action"?"":i.extendedAction?.actionId??i.action}function qi(i,l){if(i&1){let e=LD();_i$1(0,"div",1)(1,"input",3),Vh("ngModelChange",function(t){let o=Pu$1(e).$implicit;return ww(o.key,t)||(o.key=t),Lu(t)}),gh("ngModelChange",function(){Pu$1(e);let t=VD();return Lu(t.emitRows())}),Kc(),oE(),_i$1(2,"input",4),Vh("ngModelChange",function(t){let o=Pu$1(e).$implicit;return ww(o.value,t)||(o.value=t),Lu(t)}),gh("ngModelChange",function(){Pu$1(e);let t=VD();return Lu(t.emitRows())}),Kc(),oE(),_i$1(3,"button",5),gh("click",function(){let t=Pu$1(e).$index,o=VD();return Lu(o.remove(t))}),vw(4,"Remove"),Kc()();}if(i&2){let e=l.$implicit;gI(),jh("ngModel",e.key),sE(),gI(),jh("ngModel",e.value),sE();}}var kn=(()=>{class i{constructor(){this.rows=U0.required();}add(){this.rows.update(e=>[...e,{key:"",value:""}]);}remove(e){this.rows.update(n=>n.filter((t,o)=>o!==e));}emitRows(){this.rows.set(this.rows().map(e=>r$1({},e)));}static{this.\u0275fac=function(n){return new(n||i)};}static{this.\u0275cmp=QE({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(n,t){n&1&&(_i$1(0,"div",0),ND(1,qi,5,2,"div",1,MD),_i$1(3,"button",2),gh("click",function(){return t.add()}),vw(4,"Add param"),Kc()()),n&2&&(gI(),xD(t.rows()));},dependencies:[al,er,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 Ae(i,l){let e=Pu(i);return B(l,e).map(n=>n.id)}function Nn(i,l){return Ae(i,l)[0]??""}function In(i,l,e){let n=Ae(l,e);if(n.includes(i))return null;let t=(e?.providerInstances??[]).find(o=>o.id===i);return t?__(t)&&Pu(l).includes(t.subjectType)?null:{required:i,active:n[0]??t.id}:{required:i,active:n[0]??""}}function Fn(i,l,e){if(i.extendedAction?.providerId){let n=In(i.extendedAction.providerId,l,e);if(n)return n}return i.target?.source?In(i.target.source,i.target.subjectType,e):null}function Vn(i){return i.extendedAction!=null}var Pn=()=>[];function Zi(i,l){return this.trackKey(l)}var he=(i,l)=>l.id,Qi=(i,l)=>l.actionId,Ji=(i,l)=>l.name;function Yi(i,l){if(i&1&&(lh(0,"nz-option",15),Rw(1,"transloco")),i&2){let e=l.$implicit,n=VD(3);ch("nzValue",e)("nzLabel",Ow(1,2,n.stepTypeKey(e)));}}function Xi(i,l){if(i&1&&(lh(0,"nz-option",15),Rw(1,"transloco")),i&2){let e=l.$implicit,n=VD(4);ch("nzValue",e)("nzLabel",Ow(1,2,n.outputFormatKey(e)));}}function eo(i,l){if(i&1&&lh(0,"nz-option",15),i&2){let e=l.$implicit;ch("nzValue",e.id)("nzLabel",e.displayName);}}function to(i,l){if(i&1){let e=LD();_i$1(0,"nz-tag",27),gh("nzOnClose",function(){let t=Pu$1(e).$implicit,o=VD(3).$index,d=VD();return Lu(d.removeContextFile(o,t.id))}),vw(1),Kc();}if(i&2){let e=l.$implicit;ah("data-testid","context-file-chip-"+e.id),gI(),nl(" ",e.name," ");}}function no(i,l){i&1&&(_i$1(0,"span",25),vw(1),Rw(2,"transloco"),Kc()),i&2&&(gI(),Ph(Ow(2,1,"step-list.contextFilesEmpty")));}function io(i,l){if(i&1){let e=LD();_i$1(0,"label",16)(1,"span"),vw(2),Rw(3,"transloco"),Kc(),_i$1(4,"textarea",21),gh("ngModelChange",function(t){Pu$1(e);let o=VD(2).$index,d=VD();return Lu(d.patchAt(o,{objective:t}))}),Kc(),oE(),Kc(),_i$1(5,"div",16)(6,"span"),vw(7),Rw(8,"transloco"),Kc(),_i$1(9,"nz-select",22),gh("ngModelChange",function(t){Pu$1(e);let o=VD(2).$index,d=VD();return Lu(d.patchAt(o,{outputFormat:t}))}),ND(10,Xi,2,4,"nz-option",15,SD),Kc(),oE(),Kc(),_i$1(12,"div",16)(13,"span"),vw(14),Rw(15,"transloco"),Kc(),_i$1(16,"nz-select",22),gh("ngModelChange",function(t){Pu$1(e);let o=VD(2).$index,d=VD();return Lu(d.setAgentInstance(o,t))}),lh(17,"nz-option",15),Rw(18,"transloco"),ND(19,eo,1,2,"nz-option",15,he),Kc(),oE(),Kc(),_i$1(21,"div",16)(22,"span"),vw(23),Rw(24,"transloco"),Kc(),_i$1(25,"div",23),ND(26,to,2,2,"nz-tag",24,he,false,no,3,3,"span",25),Kc(),_i$1(29,"button",26),gh("click",function(){Pu$1(e);let t=VD(2).$index,o=VD();return Lu(o.openContextFilePicker(t))}),vw(30),Rw(31,"transloco"),Kc()();}if(i&2){let e=VD(2),n=e.$implicit,t=e.$index,o=VD();gI(),ah("data-testid","agent-prompt-label-"+t),gI(),Ph(Ow(3,17,"step-list.objective")),gI(2),ch("ngModel",o.asAgent(n).objective),ah("data-testid","agent-objective-"+t),sE(),gI(3),Ph(Ow(8,19,"step-list.outputFormat.label")),gI(2),ch("ngModel",o.asAgent(n).outputFormat),ah("data-testid","agent-output-"+t),sE(),gI(),xD(o.outputFormats),gI(4),Ph(Ow(15,21,"step-list.agentInstance.label")),gI(2),ch("ngModel",o.asAgent(n).agentInstanceId??null),ah("data-testid","agent-instance-"+t),sE(),gI(),ch("nzValue",null)("nzLabel",Ow(18,23,"step-list.agentInstance.default")),gI(2),xD(o.agentInstanceOptions()),gI(2),ah("data-testid","agent-context-files-"+t),gI(2),Ph(Ow(24,25,"step-list.contextFiles")),gI(3),xD(o.selectedContextFiles(o.asAgent(n))),gI(3),ah("data-testid","select-context-files-"+t),gI(),nl(" ",Ow(31,27,"step-list.selectContextFiles")," ");}}function oo(i,l){if(i&1&&(lh(0,"nz-option",15),Rw(1,"transloco")),i&2){let e=l.$implicit,n=VD(4);ch("nzValue",e)("nzLabel",Ow(1,2,n.interactionKey(e)));}}function ao(i,l){if(i&1&&lh(0,"nz-option",15),i&2){let e=l.$implicit;ch("nzValue",e.id)("nzLabel",e.label);}}function ro(i,l){i&1&&(_i$1(0,"p",19),vw(1),Rw(2,"transloco"),Kc()),i&2&&(gI(),Ph(Ow(2,1,"step-list.sourceStepIds.empty")));}function so(i,l){i&1&&(_i$1(0,"p",19),vw(1),Rw(2,"transloco"),Kc()),i&2&&(gI(),Ph(Ow(2,1,"step-list.sourceStepIds.hint")));}function lo(i,l){if(i&1){let e=LD();_i$1(0,"div",16)(1,"span"),vw(2),Rw(3,"transloco"),Kc(),_i$1(4,"nz-select",28),gh("ngModelChange",function(t){Pu$1(e);let o=VD(3).$index,d=VD();return Lu(d.patchAt(o,{sourceStepIds:t}))}),ND(5,ao,1,2,"nz-option",15,he),Kc(),oE(),bD(7,ro,3,3,"p",19)(8,so,3,3,"p",19),Kc();}if(i&2){let e=VD(3),n=e.$implicit,t=e.$index,o=VD();ah("data-testid","comment-review-sources-"+t),gI(2),Ph(Ow(3,5,"step-list.sourceStepIds.label")),gI(2),ch("ngModel",o.asInteraction(n).sourceStepIds??Nw(7,Pn)),ah("data-testid","comment-review-source-ids-"+t),sE(),gI(),xD(o.commentSuggestionSources(n)),gI(2),_D(o.commentSuggestionSources(n).length===0?7:8);}}function po(i,l){if(i&1){let e=LD();_i$1(0,"div",16)(1,"span"),vw(2),Rw(3,"transloco"),Kc(),_i$1(4,"nz-select",22),gh("ngModelChange",function(t){Pu$1(e);let o=VD(2).$index,d=VD();return Lu(d.onInteractionChange(o,t))}),ND(5,oo,2,4,"nz-option",15,SD),Kc(),oE(),Kc(),bD(7,lo,9,8,"div",16);}if(i&2){let e=VD(2),n=e.$implicit,t=e.$index,o=VD();gI(2),Ph(Ow(3,4,"step-list.interaction.label")),gI(2),ch("ngModel",o.asInteraction(n).interaction),ah("data-testid","interaction-type-"+t),sE(),gI(),xD(o.interactions),gI(2),_D(o.asInteraction(n).interaction==="comment_review"?7:-1);}}function co(i,l){if(i&1){let e=LD();_i$1(0,"label",16)(1,"span"),vw(2),Rw(3,"transloco"),Kc(),_i$1(4,"textarea",21),gh("ngModelChange",function(t){Pu$1(e);let o=VD(2).$index,d=VD();return Lu(d.patchAt(o,{command:t}))}),Kc(),oE(),Kc();}if(i&2){let e=VD(2),n=e.$implicit,t=e.$index,o=VD();gI(2),Ph(Ow(3,3,"step-list.command")),gI(2),ch("ngModel",o.asShell(n).command),ah("data-testid","shell-command-"+t),sE();}}function _o(i,l){if(i&1&&(lh(0,"nz-option",15),Rw(1,"transloco")),i&2){let e=l.$implicit,n=VD(4);ch("nzValue",e)("nzLabel",Ow(1,2,n.onNoMatchKey(e)));}}function mo(i,l){if(i&1){let e=LD();_i$1(0,"label",16)(1,"span"),vw(2),Rw(3,"transloco"),Kc(),_i$1(4,"textarea",29),gh("ngModelChange",function(t){Pu$1(e);let o=VD(2).$index,d=VD();return Lu(d.patchAt(o,{source:t}))}),Kc(),oE(),Kc(),_i$1(5,"label",16)(6,"span"),vw(7),Rw(8,"transloco"),Kc(),_i$1(9,"input",18),gh("ngModelChange",function(t){Pu$1(e);let o=VD(2).$index,d=VD();return Lu(d.patchAt(o,{path:t}))}),Kc(),oE(),Kc(),_i$1(10,"label",16)(11,"span"),vw(12),Rw(13,"transloco"),Kc(),_i$1(14,"input",18),gh("ngModelChange",function(t){Pu$1(e);let o=VD(2).$index,d=VD();return Lu(d.patchAt(o,{pattern:t}))}),Kc(),oE(),Kc(),_i$1(15,"div",16)(16,"span"),vw(17),Rw(18,"transloco"),Kc(),_i$1(19,"nz-select",22),gh("ngModelChange",function(t){Pu$1(e);let o=VD(2).$index,d=VD();return Lu(d.patchAt(o,{onNoMatch:t}))}),ND(20,_o,2,4,"nz-option",15,SD),Kc(),oE(),Kc();}if(i&2){let e=VD(2),n=e.$implicit,t=e.$index,o=VD();gI(2),Ph(Ow(3,12,"step-list.extract.source")),gI(2),ch("ngModel",o.asExtract(n).source),ah("data-testid","extract-source-"+t),sE(),gI(3),Ph(Ow(8,14,"step-list.extract.path")),gI(2),ch("ngModel",o.asExtract(n).path??""),ah("data-testid","extract-path-"+t),sE(),gI(3),Ph(Ow(13,16,"step-list.extract.pattern")),gI(2),ch("ngModel",o.asExtract(n).pattern??""),ah("data-testid","extract-pattern-"+t),sE(),gI(3),Ph(Ow(18,18,"step-list.extract.onNoMatch")),gI(2),ch("ngModel",o.asExtract(n).onNoMatch),ah("data-testid","extract-on-no-match-"+t),sE(),gI(),xD(o.extractOnNoMatchActions);}}function uo(i,l){if(i&1&&(lh(0,"nz-option",15),Rw(1,"transloco")),i&2){let e=l.$implicit,n=VD(4);ch("nzValue",e)("nzLabel",Ow(1,2,n.gitOperationKey(e)));}}function xo(i,l){if(i&1){let e=LD();_i$1(0,"label",16)(1,"span"),vw(2),Rw(3,"transloco"),Kc(),_i$1(4,"input",18),gh("ngModelChange",function(t){Pu$1(e);let o=VD(4).$index,d=VD();return Lu(d.setGitParam(o,"baseBranch",t))}),Kc(),oE(),Kc(),_i$1(5,"label",16)(6,"span"),vw(7),Rw(8,"transloco"),Kc(),_i$1(9,"input",18),gh("ngModelChange",function(t){Pu$1(e);let o=VD(4).$index,d=VD();return Lu(d.setGitParam(o,"branchName",t))}),Kc(),oE(),Kc();}if(i&2){let e=VD(4),n=e.$implicit,t=e.$index,o=VD();gI(2),Ph(Ow(3,6,"step-list.createWorktree.baseBranch")),gI(2),ch("ngModel",o.gitParam(o.asGit(n),"baseBranch")),ah("data-testid","git-base-branch-"+t),sE(),gI(3),Ph(Ow(8,8,"step-list.createWorktree.branchName")),gI(2),ch("ngModel",o.gitParam(o.asGit(n),"branchName")),ah("data-testid","git-branch-name-"+t),sE();}}function Co(i,l){if(i&1){let e=LD();_i$1(0,"label",16)(1,"span"),vw(2),Rw(3,"transloco"),Kc(),_i$1(4,"input",18),gh("ngModelChange",function(t){Pu$1(e);let o=VD(4).$index,d=VD();return Lu(d.setGitParam(o,"branch",t))}),Kc(),oE(),Kc();}if(i&2){let e=VD(4),n=e.$implicit,t=e.$index,o=VD();gI(2),Ph(Ow(3,3,"step-list.createWorktree.branch")),gI(2),ch("ngModel",o.gitParam(o.asGit(n),"branch")),ah("data-testid","git-branch-"+t),sE();}}function fo(i,l){if(i&1){let e=LD();_i$1(0,"div",16)(1,"span"),vw(2),Rw(3,"transloco"),Kc(),_i$1(4,"nz-select",22),gh("ngModelChange",function(t){Pu$1(e);let o=VD(3).$index,d=VD();return Lu(d.setCreateWorktreeMode(o,t))}),lh(5,"nz-option",30),Rw(6,"transloco"),lh(7,"nz-option",31),Rw(8,"transloco"),Kc(),oE(),Kc(),_i$1(9,"div",16)(10,"span"),vw(11),Rw(12,"transloco"),Kc(),_i$1(13,"app-repo-path-picker",32),gh("pathChange",function(t){Pu$1(e);let o=VD(3).$index,d=VD();return Lu(d.setGitParam(o,"repoPath",t))})("repoSelected",function(t){Pu$1(e);let o=VD(3).$index,d=VD();return Lu(d.applyCreateWorktreeCatalogRepo(o,t))}),Kc()(),bD(14,xo,10,10)(15,Co,5,5,"label",16);}if(i&2){let e=VD(3),n=e.$implicit,t=e.$index,o=VD();gI(2),Ph(Ow(3,9,"step-list.createWorktree.mode")),gI(2),ch("ngModel",o.createWorktreeMode(o.asGit(n))),ah("data-testid","git-worktree-mode-"+t),sE(),gI(),ch("nzLabel",Ow(6,11,"step-list.createWorktree.newBranch")),gI(2),ch("nzLabel",Ow(8,13,"step-list.createWorktree.existingBranch")),gI(4),Ph(Ow(12,15,"step-list.createWorktree.repoPath")),gI(2),ch("path",o.gitParam(o.asGit(n),"repoPath")),ah("data-testid","git-repo-path-"+t),gI(),_D(o.createWorktreeMode(o.asGit(n))==="new-branch"?14:15);}}function go(i,l){if(i&1){let e=LD();_i$1(0,"div",16)(1,"span"),vw(2),Rw(3,"transloco"),Kc(),_i$1(4,"app-key-value-editor",33),gh("rowsChange",function(t){Pu$1(e);let o=VD(3),d=o.$implicit,V=o.$index,K=VD();return Lu(K.onParamRowsChange(V,d,t))}),Kc()();}if(i&2){let e=VD(3).$implicit,n=VD();gI(2),Ph(Ow(3,2,"step-list.params")),gI(2),ch("rows",n.paramRows(e));}}function ho(i,l){if(i&1){let e=LD();_i$1(0,"div",16)(1,"span"),vw(2),Rw(3,"transloco"),Kc(),_i$1(4,"nz-select",22),gh("ngModelChange",function(t){Pu$1(e);let o=VD(2).$index,d=VD();return Lu(d.patchAt(o,{operation:t}))}),ND(5,uo,2,4,"nz-option",15,SD),Kc(),oE(),Kc(),bD(7,fo,16,17)(8,go,5,4,"div",16);}if(i&2){let e=VD(2),n=e.$implicit,t=e.$index,o=VD();gI(2),Ph(Ow(3,4,"step-list.operation")),gI(2),ch("ngModel",o.asGit(n).operation),ah("data-testid","git-operation-"+t),sE(),gI(),xD(o.gitOperations),gI(2),_D(o.asGit(n).operation==="create_worktree"?7:8);}}function bo(i,l){if(i&1&&lh(0,"nz-alert",34),i&2){let e=VD(3).$index;ch("nzMessage",l),ah("data-testid","extended-action-mismatch-"+e);}}function vo(i,l){if(i&1&&(lh(0,"nz-option",15),Rw(1,"transloco")),i&2){let e=l.$implicit,n=VD(5);ch("nzValue",e)("nzLabel",Ow(1,2,n.subjectTypeKey(e)));}}function wo(i,l){if(i&1&&lh(0,"nz-option",15),i&2){let e=l.$implicit;ch("nzValue",e.id)("nzLabel",e.displayName);}}function So(i,l){if(i&1){let e=LD();_i$1(0,"div",16)(1,"span"),vw(2),Rw(3,"transloco"),Kc(),_i$1(4,"nz-select",22),gh("ngModelChange",function(t){Pu$1(e);let o=VD(3).$index,d=VD();return Lu(d.setTargetSubjectType(o,t))}),ND(5,vo,2,4,"nz-option",15,SD),Kc(),oE(),Kc(),_i$1(7,"div",16)(8,"span"),vw(9),Rw(10,"transloco"),Kc(),_i$1(11,"nz-select",38),Rw(12,"transloco"),gh("ngModelChange",function(t){Pu$1(e);let o=VD(3).$index,d=VD();return Lu(d.setTargetSource(o,t))}),ND(13,wo,1,2,"nz-option",15,he),Kc(),oE(),Kc(),_i$1(15,"label",16)(16,"span"),vw(17),Rw(18,"transloco"),Kc(),_i$1(19,"input",18),gh("ngModelChange",function(t){Pu$1(e);let o=VD(3).$index,d=VD();return Lu(d.setTargetSubjectId(o,t))}),Kc(),oE(),_i$1(20,"span",19),vw(21),Rw(22,"transloco"),Kc()();}if(i&2){let e=l,n=VD(3),t=n.$implicit,o=n.$index,d=VD();gI(2),Ph(Ow(3,11,"step-list.target.subjectType")),gI(2),ch("ngModel",e.subjectType),ah("data-testid","provider-action-target-type-"+o),sE(),gI(),xD(d.targetSubjectTypes),gI(4),Ph(Ow(10,13,"step-list.target.source")),gI(2),ch("ngModel",e.source||null)("nzPlaceHolder",Ow(12,15,"step-list.target.sourcePlaceholder")),ah("data-testid","provider-action-target-source-"+o),sE(),gI(2),xD(d.targetInstanceOptions(d.asProvider(t))),gI(4),Ph(Ow(18,17,"step-list.target.subjectId")),gI(2),ch("ngModel",e.subjectId),ah("data-testid","provider-action-target-id-"+o),sE(),gI(2),Ph(Ow(22,19,"step-list.target.subjectIdHint"));}}function yo(i,l){if(i&1&&lh(0,"nz-option",15),i&2){let e=l.$implicit,n=VD(5);ch("nzValue",e)("nzLabel",n.providerLabel(e));}}function zo(i,l){if(i&1&&lh(0,"nz-option",15),i&2){let e=l.$implicit;ch("nzValue",e.actionId)("nzLabel",e.label);}}function Mo(i,l){i&1&&(_i$1(0,"span",19),vw(1),Rw(2,"transloco"),Kc()),i&2&&(gI(),Ph(Ow(2,1,"step-list.extendedAction.empty")));}function Eo(i,l){i&1&&(_i$1(0,"span",39),vw(1,"*"),Kc());}function To(i,l){if(i&1&&lh(0,"nz-option",15),i&2){let e=l.$implicit;ch("nzValue",e)("nzLabel",e);}}function ko(i,l){if(i&1){let e=LD();_i$1(0,"nz-select",22),gh("ngModelChange",function(t){Pu$1(e);let o=VD().$implicit,d=VD(5).$index,V=VD();return Lu(V.setExtendedParam(d,o.name,t))}),ND(1,To,1,2,"nz-option",15,SD),Kc(),oE();}if(i&2){let e=VD().$implicit,n=VD(5),t=n.$implicit,o=n.$index,d=VD();ch("ngModel",d.extendedParamValue(d.asProvider(t),e.name)),ah("data-testid","extended-action-param-"+e.name+"-"+o),sE(),gI(),xD(e.options??Nw(2,Pn));}}function Io(i,l){if(i&1){let e=LD();_i$1(0,"input",18),gh("ngModelChange",function(t){Pu$1(e);let o=VD().$implicit,d=VD(5).$index,V=VD();return Lu(V.setExtendedParam(d,o.name,t))}),Kc(),oE();}if(i&2){let e=VD().$implicit,n=VD(5),t=n.$implicit,o=n.$index,d=VD();ch("ngModel",d.extendedParamValue(d.asProvider(t),e.name)),ah("data-testid","extended-action-param-"+e.name+"-"+o),sE();}}function No(i,l){if(i&1&&(_i$1(0,"label",16)(1,"span"),vw(2),bD(3,Eo,2,0,"span",39),Kc(),bD(4,ko,3,3,"nz-select",40)(5,Io,1,2,"input",41),Kc()),i&2){let e=l.$implicit;gI(2),nl(" ",e.label," "),gI(),_D(e.required?3:-1),gI(),_D(e.type==="select"?4:5);}}function Fo(i,l){i&1&&ND(0,No,6,3,"label",16,Ji),i&2&&xD(l.params);}function Vo(i,l){if(i&1){let e=LD();_i$1(0,"div",16)(1,"span"),vw(2),Rw(3,"transloco"),Kc(),_i$1(4,"nz-select",22),gh("ngModelChange",function(t){Pu$1(e);let o=VD(3).$index,d=VD();return Lu(d.setExtendedProvider(o,t))}),ND(5,yo,1,2,"nz-option",15,SD),Kc(),oE(),Kc(),_i$1(7,"div",16)(8,"span"),vw(9),Rw(10,"transloco"),Kc(),_i$1(11,"nz-select",38),Rw(12,"transloco"),gh("ngModelChange",function(t){Pu$1(e);let o=VD(3).$index,d=VD();return Lu(d.setExtendedAction(o,t))}),ND(13,zo,1,2,"nz-option",15,Qi),Kc(),oE(),bD(15,Mo,3,3,"span",19),Kc(),bD(16,Fo,2,0);}if(i&2){let e,n=VD(3),t=n.$implicit,o=n.$index,d=VD();gI(2),Ph(Ow(3,9,"step-list.extendedAction.provider")),gI(2),ch("ngModel",d.asProvider(t).extendedAction?.providerId),ah("data-testid","extended-action-provider-"+o),sE(),gI(),xD(d.extendedProviderOptions()),gI(4),Ph(Ow(10,11,"step-list.extendedAction.action")),gI(2),ch("ngModel",d.asProvider(t).extendedAction?.actionId||null)("nzPlaceHolder",Ow(12,13,"step-list.extendedAction.none")),ah("data-testid","extended-action-id-"+o),sE(),gI(2),xD(d.extendedDescriptors(d.asProvider(t))),gI(2),_D(d.extendedDescriptors(d.asProvider(t)).length===0?15:-1),gI(),_D((e=d.selectedExtendedDescriptor(d.asProvider(t)))?16:-1,e);}}function Po(i,l){if(i&1&&(lh(0,"nz-option",15),Rw(1,"transloco")),i&2){let e=l.$implicit,n=VD(5);ch("nzValue",e)("nzLabel",Ow(1,2,n.providerActionKey(e)));}}function Ao(i,l){if(i&1){let e=LD();_i$1(0,"div",16)(1,"span"),vw(2),Rw(3,"transloco"),Kc(),_i$1(4,"nz-select",22),gh("ngModelChange",function(t){Pu$1(e);let o=VD(3).$index,d=VD();return Lu(d.patchAt(o,{action:t}))}),ND(5,Po,2,4,"nz-option",15,SD),Kc(),oE(),Kc(),_i$1(7,"div",16)(8,"span"),vw(9),Rw(10,"transloco"),Kc(),_i$1(11,"app-key-value-editor",33),gh("rowsChange",function(t){Pu$1(e);let o=VD(3),d=o.$implicit,V=o.$index,K=VD();return Lu(K.onParamRowsChange(V,d,t))}),Kc()();}if(i&2){let e=VD(3),n=e.$implicit,t=e.$index,o=VD();gI(2),Ph(Ow(3,5,"step-list.action")),gI(2),ch("ngModel",o.asProvider(n).action),ah("data-testid","provider-action-"+t),sE(),gI(),xD(o.providerActions),gI(4),Ph(Ow(10,7,"step-list.params")),gI(2),ch("rows",o.paramRows(n));}}function $o(i,l){if(i&1){let e=LD();bD(0,bo,1,2,"nz-alert",34),_i$1(1,"label",35),gh("ngModelChange",function(t){Pu$1(e);let o=VD(2).$index,d=VD();return Lu(d.setTargetEnabled(o,t))}),vw(2),Rw(3,"transloco"),Kc(),oE(),bD(4,So,23,21),_i$1(5,"div",16)(6,"span"),vw(7),Rw(8,"transloco"),Kc(),_i$1(9,"nz-select",22),gh("ngModelChange",function(t){Pu$1(e);let o=VD(2).$index,d=VD();return Lu(d.setActionMode(o,t))}),lh(10,"nz-option",36),Rw(11,"transloco"),lh(12,"nz-option",37),Rw(13,"transloco"),Kc(),oE(),Kc(),bD(14,Vo,17,15)(15,Ao,12,9);}if(i&2){let e,n,t=VD(2),o=t.$implicit,d=t.$index,V=VD();_D((e=V.mismatchWarning(V.asProvider(o)))?0:-1,e),gI(),ch("ngModel",V.hasTarget(o)),ah("data-testid","provider-action-target-toggle-"+d),sE(),gI(),nl(" ",Ow(3,11,"step-list.target.toggle")," "),gI(2),_D((n=V.asProvider(o).target)?4:-1,n),gI(3),Ph(Ow(8,13,"step-list.extendedAction.mode")),gI(2),ch("ngModel",V.isExtended(o)?"extended":"portable"),ah("data-testid","provider-action-mode-"+d),sE(),gI(),ch("nzLabel",Ow(11,15,"step-list.extendedAction.portable")),gI(2),ch("nzLabel",Ow(13,17,"step-list.extendedAction.extended")),gI(2),_D(V.isExtended(o)?14:15);}}function Bo(i,l){if(i&1&&lh(0,"nz-option",15),i&2){let e=l.$implicit,n=VD(4);ch("nzValue",e.id)("nzLabel",n.workflowOptionLabel(e));}}function Do(i,l){if(i&1){let e=LD();_i$1(0,"div",16)(1,"span"),vw(2),Rw(3,"transloco"),Kc(),_i$1(4,"nz-select",42),gh("ngModelChange",function(t){Pu$1(e);let o=VD(2).$index,d=VD();return Lu(d.patchAt(o,{workflowId:t}))}),ND(5,Bo,1,2,"nz-option",15,he),Kc(),oE(),Kc(),_i$1(7,"p",16)(8,"span"),vw(9),Rw(10,"transloco"),Kc(),_i$1(11,"code",43),vw(12,"selection"),Kc()();}if(i&2){let e=VD(2),n=e.$implicit,t=e.$index,o=VD();gI(2),Ph(Ow(3,4,"step-list.workflowId")),gI(2),ch("ngModel",o.asSubWorkflow(n).workflowId),ah("data-testid","sub-workflow-id-"+t),sE(),gI(),xD(o.availableWorkflows()),gI(4),Ph(Ow(10,6,"step-list.forEach"));}}function Lo(i,l){if(i&1&&(lh(0,"nz-option",15),Rw(1,"transloco")),i&2){let e=l.$implicit,n=VD(4);ch("nzValue",e)("nzLabel",Ow(1,2,n.untilTypeKey(e)));}}function Oo(i,l){if(i&1){let e=LD();_i$1(0,"label",16)(1,"span"),vw(2),Rw(3,"transloco"),Kc(),_i$1(4,"input",18),gh("ngModelChange",function(t){Pu$1(e);let o=VD(3).$index,d=VD();return Lu(d.setUntilValue(o,t))}),Kc(),oE(),Kc();}if(i&2){let e=VD(3),n=e.$implicit,t=e.$index,o=VD();gI(2),Ph(Ow(3,3,"step-list.until.value")),gI(2),ch("ngModel",o.untilValue(o.asLoop(n))),ah("data-testid","loop-until-value-"+t),sE();}}function Wo(i,l){if(i&1&&(lh(0,"nz-option",15),Rw(1,"transloco")),i&2){let e=l.$implicit,n=VD(4);ch("nzValue",e)("nzLabel",Ow(1,2,n.onMaxIterationsKey(e)));}}function jo(i,l){if(i&1){let e=LD();_i$1(0,"div",44)(1,"div",16)(2,"span"),vw(3),Rw(4,"transloco"),Kc(),_i$1(5,"nz-select",22),gh("ngModelChange",function(t){Pu$1(e);let o=VD(2).$index,d=VD();return Lu(d.setUntilType(o,t))}),ND(6,Lo,2,4,"nz-option",15,SD),Kc(),oE(),Kc(),_i$1(8,"label",16)(9,"span"),vw(10),Rw(11,"transloco"),Kc(),_i$1(12,"input",18),gh("ngModelChange",function(t){Pu$1(e);let o=VD(2).$index,d=VD();return Lu(d.setUntilField(o,"stepId",t))}),Kc(),oE(),Kc(),_i$1(13,"label",16)(14,"span"),vw(15),Rw(16,"transloco"),Kc(),_i$1(17,"input",18),gh("ngModelChange",function(t){Pu$1(e);let o=VD(2).$index,d=VD();return Lu(d.setUntilField(o,"field",t))}),Kc(),oE(),Kc(),bD(18,Oo,5,5,"label",16),_i$1(19,"label",16)(20,"span"),vw(21),Rw(22,"transloco"),Kc(),_i$1(23,"nz-input-number",45),gh("ngModelChange",function(t){Pu$1(e);let o=VD(2).$index,d=VD();return Lu(d.patchAt(o,{maxIterations:t??0}))}),Kc(),oE(),Kc(),_i$1(24,"div",16)(25,"span"),vw(26),Rw(27,"transloco"),Kc(),_i$1(28,"nz-select",22),gh("ngModelChange",function(t){Pu$1(e);let o=VD(2).$index,d=VD();return Lu(d.patchAt(o,{onMaxIterations:{action:t}}))}),ND(29,Wo,2,4,"nz-option",15,SD),Kc(),oE(),Kc()(),_i$1(31,"div",46)(32,"h4"),vw(33),Rw(34,"transloco"),Kc(),_i$1(35,"app-step-list",47),gh("stepsChange",function(t){Pu$1(e);let o=VD(2).$index,d=VD();return Lu(d.setNestedSteps(o,t))}),Kc()();}if(i&2){let e=VD(2),n=e.$implicit,t=e.$index,o=VD();gI(3),Ph(Ow(4,26,"step-list.until.type")),gI(2),ch("ngModel",o.asLoop(n).until.type),ah("data-testid","loop-until-type-"+t),sE(),gI(),xD(o.untilTypes),gI(4),Ph(Ow(11,28,"step-list.until.stepId")),gI(2),ch("ngModel",o.asLoop(n).until.stepId),ah("data-testid","loop-until-stepId-"+t),sE(),gI(3),Ph(Ow(16,30,"step-list.until.field")),gI(2),ch("ngModel",o.asLoop(n).until.field),ah("data-testid","loop-until-field-"+t),sE(),gI(),_D(o.asLoop(n).until.type==="field_equals"?18:-1),gI(3),Ph(Ow(22,32,"step-list.maxIterations")),gI(2),ch("ngModel",o.asLoop(n).maxIterations)("nzMin",0),ah("data-testid","loop-max-"+t),sE(),gI(3),Ph(Ow(27,34,"step-list.onMaxIterations.action")),gI(2),ch("ngModel",o.asLoop(n).onMaxIterations.action),ah("data-testid","loop-on-max-"+t),sE(),gI(),xD(o.maxIterationActions),gI(2),ah("data-testid","loop-nested-"+t),gI(2),Ph(Ow(34,36,"step-list.nestedSteps")),gI(2),ch("steps",o.asLoop(n).steps)("rootSteps",o.effectiveRoot())("availableWorkflows",o.availableWorkflows())("appliesTo",o.appliesTo())("inputSchema",o.inputSchema())("settings",o.settings())("depth",o.depth()+1);}}function Ro(i,l){if(i&1){let e=LD();_i$1(0,"div",12)(1,"div",13)(2,"nz-select",14),gh("ngModelChange",function(t){Pu$1(e);let o=VD().$index,d=VD();return Lu(d.changeType(o,t))}),ND(3,Yi,2,4,"nz-option",15,SD),Kc(),oE(),Kc(),_i$1(5,"label",16)(6,"span"),vw(7),Rw(8,"transloco"),Kc(),_i$1(9,"input",17),gh("ngModelChange",function(t){Pu$1(e);let o=VD().$index,d=VD();return Lu(d.onNameChange(o,t))}),Kc(),oE(),Kc(),_i$1(10,"label",16)(11,"span"),vw(12),Rw(13,"transloco"),Kc(),_i$1(14,"input",18),gh("ngModelChange",function(t){Pu$1(e);let o=VD().$index,d=VD();return Lu(d.onIdChange(o,t))}),Kc(),oE(),_i$1(15,"p",19),vw(16),Rw(17,"transloco"),Kc()(),lh(18,"app-available-parameters",20),bD(19,io,32,29)(20,po,8,6)(21,co,5,5,"label",16)(22,mo,22,20)(23,ho,9,6)(24,$o,16,19)(25,Do,13,8)(26,jo,36,38),Kc();}if(i&2){let e,n=VD(),t=n.$implicit,o=n.$index,d=VD();ah("data-testid","step-body-"+o),gI(2),ch("ngModel",t.type),ah("data-testid","step-type-"+o),sE(),gI(),xD(d.stepTypes),gI(4),Ph(Ow(8,14,"step-list.name")),gI(2),ch("ngModel",t.name),ah("data-testid","step-name-"+o),sE(),gI(3),Ph(Ow(13,16,"step-list.id")),gI(2),ch("ngModel",t.id),ah("data-testid","step-id-"+o),sE(),gI(2),Ph(Ow(17,18,"step-list.idHint")),gI(2),ch("inputSchema",d.inputSchema())("appliesTo",d.appliesTo())("previousSteps",d.previousFor(t)),gI(),_D((e=t.type)==="agent"?19:e==="interaction"?20:e==="shell"?21:e==="extract"?22:e==="git"?23:e==="provider_action"?24:e==="sub_workflow"?25:e==="loop"?26:-1);}}function Ko(i,l){if(i&1){let e=LD();_i$1(0,"nz-card",3)(1,"div",4),gh("click",function(){let t=Pu$1(e).$implicit,o=VD();return Lu(o.toggleExpanded(t))}),_i$1(2,"div",5)(3,"span",6),vw(4),Kc(),_i$1(5,"span",7),vw(6),Rw(7,"transloco"),Kc(),_i$1(8,"span",8),vw(9),Rw(10,"transloco"),Kc()(),_i$1(11,"div",9),gh("click",function(t){return t.stopPropagation()}),_i$1(12,"button",10),gh("click",function(){let t=Pu$1(e).$index,o=VD();return Lu(o.moveUp(t))}),vw(13),Rw(14,"transloco"),Kc(),_i$1(15,"button",10),gh("click",function(){let t=Pu$1(e).$index,o=VD();return Lu(o.moveDown(t))}),vw(16),Rw(17,"transloco"),Kc(),_i$1(18,"button",11),gh("click",function(){let t=Pu$1(e).$index,o=VD();return Lu(o.removeStep(t))}),vw(19),Rw(20,"transloco"),Kc()()(),bD(21,Ro,27,20,"div",12),Kc();}if(i&2){let e=l.$implicit,n=l.$index,t=VD();Mh("step-card-expanded",t.isExpanded(e)),ah("data-testid","step-card-"+n),gI(),ah("data-testid","step-header-"+n),gI(3),Ph(t.isExpanded(e)?"\u25BE":"\u25B8"),gI(),ah("data-testid","step-header-name-"+n),gI(),nl(" ",e.name||Ow(7,18,"step-list.unnamed")," "),gI(2),ah("data-testid","step-type-label-"+n),gI(),nl(" ",Ow(10,20,t.stepTypeKey(e.type))," "),gI(3),ch("disabled",n===0),ah("data-testid","move-up-"+n),gI(),nl(" ",Ow(14,22,"step-list.moveUp")," "),gI(2),ch("disabled",n===t.steps().length-1),ah("data-testid","move-down-"+n),gI(),nl(" ",Ow(17,24,"step-list.moveDown")," "),gI(2),ah("data-testid","remove-"+n),gI(),nl(" ",Ow(20,26,"step-list.remove")," "),gI(2),_D(t.isExpanded(e)?21:-1);}}var An=(()=>{class i{constructor(){this.transloco=C(Ve),this.language=C(O),this.providersApi=C($$1),this.contextFilesApi=C(ze),this.modal=C(jn$1),this.steps=$0.required(),this.rootSteps=$0([]),this.availableWorkflows=$0([]),this.appliesTo=$0("none"),this.inputSchema=$0([]),this.settings=$0($_),this.depth=$0(0),this.stepsChange=B0(),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.untilTypes=["field_empty","field_equals"],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=R,this.contextFilesApi.list().pipe(ue()).subscribe({next:e=>this.contextFiles.set(e),error:()=>this.contextFiles.set([])}),rd(()=>{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}`}untilTypeKey(e){return `step-list.untilType.${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 rm(this.effectiveRoot(),e)}commentSuggestionSources(e){return N_(this.effectiveRoot(),e).filter(n=>!!n.id).map(n=>({id:n.id,label:n.name?.trim()?`${n.name} (${n.id})`:n.id}))}onInteractionChange(e,n){if(n==="comment_review"){let t=this.asInteraction(this.steps()[e]);this.patchAt(e,{interaction:n,sourceStepIds:t.sourceStepIds??[]});return}this.patchAt(e,{interaction:n,sourceStepIds:void 0});}trackKey(e){return e._key}isExpanded(e){return this.expandedKey()===e._key}toggleExpanded(e){this.expandedKey.update(n=>n===e._key?null:e._key);}addStep(){this.emit([...this.steps(),h("agent")]);}removeStep(e){let n=this.steps()[e];n&&this.paramRowsByStepKey.delete(n._key),this.emit(this.steps().filter((t,o)=>o!==e));}moveUp(e){if(e<=0)return;let n=[...this.steps()],t=n[e-1];n[e-1]=n[e],n[e]=t,this.emit(n);}moveDown(e){if(e>=this.steps().length-1)return;let n=[...this.steps()],t=n[e+1];n[e+1]=n[e],n[e]=t,this.emit(n);}changeType(e,n){let t=this.steps()[e];if(!t||t.type===n)return;this.paramRowsByStepKey.delete(t._key);let o=h(n,{id:t.id,name:t.name,idAutoSync:t._idAutoSync,key:t._key});this.replaceAt(e,o);}patchAt(e,n){let t=this.steps()[e];t&&this.replaceAt(e,r$1(r$1({},t),n));}onNameChange(e,n){let t=this.steps()[e];t&&this.replaceAt(e,E(t,n,this.effectiveRoot()));}onIdChange(e,n){let t=this.steps()[e];t&&this.replaceAt(e,P(t,n));}setNestedSteps(e,n){let t=this.steps()[e];!t||t.type!=="loop"||this.replaceAt(e,s(r$1({},t),{steps:n}));}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"}gitParam(e,n){let t=e.params?.[n];return typeof t=="string"?t:""}setGitParam(e,n,t){let o=this.steps()[e];!o||o.type!=="git"||(this.paramRowsByStepKey.delete(o._key),this.patchAt(e,{params:s(r$1({},o.params),{[n]:t})}));}applyCreateWorktreeCatalogRepo(e,n){let t=this.steps()[e];if(!t||t.type!=="git")return;this.paramRowsByStepKey.delete(t._key);let o=s(r$1({},t.params),{repoPath:n.localPath}),d=this.gitParam(t,"baseBranch").trim(),V=n.defaultBranch?.trim();!d&&V&&(o.baseBranch=V),this.patchAt(e,{params:o});}setCreateWorktreeMode(e,n){let t=this.steps()[e];if(!t||t.type!=="git")return;let o=this.gitParam(t,"repoPath");if(this.paramRowsByStepKey.delete(t._key),n==="existing-branch"){this.patchAt(e,{params:{mode:"existing-branch",repoPath:o,branch:this.gitParam(t,"branch")||this.gitParam(t,"branchName")}});return}this.patchAt(e,{params:{repoPath:o,baseBranch:this.gitParam(t,"baseBranch"),branchName:this.gitParam(t,"branchName")||this.gitParam(t,"branch")}});}asProvider(e){return e}asSubWorkflow(e){return e}asLoop(e){return e}paramRows(e){let n=this.paramRowsByStepKey.get(e._key);if(!n){let t=e.type==="git"||e.type==="provider_action"?e.params:void 0;n=A(t),this.paramRowsByStepKey.set(e._key,n);}return n}onParamRowsChange(e,n,t){this.paramRowsByStepKey.set(n._key,t),this.patchAt(e,{params:j(t)});}isExtended(e){return e.type==="provider_action"&&Vn(this.asProvider(e))}setActionMode(e,n){let t=this.asProvider(this.steps()[e]);if(n==="portable"){let d=t,{extendedAction:V}=d,K=t$1(d,["extendedAction"]);this.replaceAt(e,K);return}let o=Nn(this.appliesTo(),this.settings());this.patchAt(e,{extendedAction:{providerId:o,actionId:"",params:{}}}),this.ensureActionsLoaded(o);}extendedProviderOptions(){return Ae(this.appliesTo(),this.settings())}providerLabel(e){return (this.settings().providerInstances??[]).find(t=>t.id===e)?.displayName||e}agentInstanceOptions(){return (this.settings().providerInstances??[]).filter(e=>e.kind==="agent")}setAgentInstance(e,n){this.patchAt(e,{agentInstanceId:n||void 0});}selectedContextFiles(e){let n=e.contextFileIds??[],t=this.contextFiles();return n.map(o=>t.find(d=>d.id===o)??{id:o,name:o,tier:"user",path:""})}removeContextFile(e,n){let t=this.asAgent(this.steps()[e]);this.patchAt(e,{contextFileIds:(t.contextFileIds??[]).filter(o=>o!==n)});}openContextFilePicker(e){let n=this.asAgent(this.steps()[e]),t=this.modal.create({nzTitle:this.transloco.translate("context-files.selectTitle"),nzContent:St,nzData:{selectionMode:true,selectedIds:[...n.contextFileIds??[]]},nzWidth:800,nzOnOk:()=>{let o=t.getContentComponent();this.patchAt(e,{contextFileIds:o.currentSelectedIds()}),this.contextFilesApi.list().subscribe({next:d=>this.contextFiles.set(d)});}});}setExtendedProvider(e,n){this.patchAt(e,{extendedAction:{providerId:n,actionId:"",params:{}}}),this.ensureActionsLoaded(n);}setExtendedAction(e,n){let t=this.asProvider(this.steps()[e]),o=this.extendedDescriptors(t).find(d=>d.actionId===n);this.patchAt(e,{extendedAction:{providerId:t.extendedAction?.providerId??"",actionId:n,params:o?Ho(o):{}}});}setExtendedParam(e,n,t){let d=this.asProvider(this.steps()[e]).extendedAction;d&&this.patchAt(e,{extendedAction:s(r$1({},d),{params:s(r$1({},d.params??{}),{[n]:t})})});}extendedParamValue(e,n){let t=e.extendedAction?.params?.[n];return t==null?"":String(t)}extendedDescriptors(e){let n=e.extendedAction?.providerId;return n?this.actionsByProvider.get(n)??[]:[]}selectedExtendedDescriptor(e){let n=e.extendedAction?.actionId;if(n)return this.extendedDescriptors(e).find(t=>t.actionId===n)}mismatchWarning(e){let n=Fn(e,this.appliesTo(),this.settings());return n?(this.language.currentLang(),this.transloco.translate("step-list.extendedAction.mismatch",n)):null}hasTarget(e){return e.type==="provider_action"&&this.asProvider(e).target!=null}setTargetEnabled(e,n){let t=this.asProvider(this.steps()[e]);if(!n){let o=t,{target:d}=o,V=t$1(o,["target"]);this.replaceAt(e,V);return}this.patchAt(e,{target:{subjectType:"ticket",source:"",subjectId:""}});}setTargetSubjectType(e,n){let t=this.asProvider(this.steps()[e]);this.patchAt(e,{target:{subjectType:n,source:"",subjectId:t.target?.subjectId??""}});}setTargetSource(e,n){let t=this.asProvider(this.steps()[e]);t.target&&this.patchAt(e,{target:s(r$1({},t.target),{source:n})});}setTargetSubjectId(e,n){let t=this.asProvider(this.steps()[e]);t.target&&this.patchAt(e,{target:s(r$1({},t.target),{subjectId:n})});}targetInstanceOptions(e){let n=e.target?.subjectType;return n?B(this.settings(),[n]):[]}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:n=>{this.loadingActions.delete(e),this.actionsByProvider.set(e,n);},error:()=>{this.loadingActions.delete(e),this.actionsByProvider.set(e,[]);}}));}setUntilType(e,n){let t=this.asLoop(this.steps()[e]);if(n==="field_empty"){this.patchAt(e,{until:{type:n,stepId:t.until.stepId,field:t.until.field}});return}let o=t.until.type==="field_equals"?t.until.value:"";this.patchAt(e,{until:{type:n,stepId:t.until.stepId,field:t.until.field,value:o}});}setUntilField(e,n,t){let o=this.asLoop(this.steps()[e]);this.patchAt(e,{until:s(r$1({},o.until),{[n]:t})});}setUntilValue(e,n){let t=this.asLoop(this.steps()[e]);t.until.type==="field_equals"&&this.patchAt(e,{until:s(r$1({},t.until),{value:n})});}untilValue(e){return e.until.type==="field_equals"?String(e.until.value??""):""}replaceAt(e,n){this.emit(this.steps().map((t,o)=>o===e?n:t));}emit(e){this.stepsChange.emit(e);}static{this.\u0275fac=function(n){return new(n||i)};}static{this.\u0275cmp=QE({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"],["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"],[3,"pathChange","repoSelected","path"],[3,"rowsChange","rows"],["nzType","warning","nzShowIcon","",1,"mismatch",3,"nzMessage"],["nz-checkbox","",3,"ngModelChange","ngModel"],["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"],["data-testid","sub-workflow-foreach"],[1,"field-grid"],[3,"ngModelChange","ngModel","nzMin"],[1,"nested"],[3,"stepsChange","steps","rootSteps","availableWorkflows","appliesTo","inputSchema","settings","depth"]],template:function(n,t){n&1&&(_i$1(0,"div",0),ND(1,Ko,22,28,"nz-card",1,Zi,true),_i$1(3,"button",2),gh("click",function(){return t.addStep()}),vw(4),Rw(5,"transloco"),Kc()()),n&2&&(ah("data-depth",t.depth()),gI(),xD(t.steps()),gI(3),nl(" ",Ow(5,2,"step-list.addStep")," "));},dependencies:[i,$8,al,er,rl,Ja,$i$1,pf,bd,sp,fp,bt,Ke,Lt,ut,ai$1,z,bn,it,ts,ex,Fm,Am,Gn$1,un,W,I$1,kn,yn,wn,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}.context-file-chips[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:.35rem;align-items:center;margin:.35rem 0}"]});}}return i})();function Ho(i){let l={};for(let e of i.params)l[e.name]=e.type==="select"?e.options?.[0]??"":"";return l}var qo=i=>({ids:i});function Go(i,l){if(i&1){let e=LD();_i$1(0,"button",10),gh("click",function(){Pu$1(e);let t=VD();return Lu(t.exportWorkflow())}),vw(1),Rw(2,"transloco"),Kc();}if(i&2){let e=VD();ch("disabled",e.loading()||!!e.loadError()),gI(),nl(" ",Ow(2,2,"workflow-editor.export")," ");}}function Uo(i,l){if(i&1){let e=LD();_i$1(0,"button",11),gh("click",function(){Pu$1(e);let t=VD();return Lu(t.startWorkflow())}),vw(1),Rw(2,"transloco"),Kc();}i&2&&(gI(),nl(" ",Ow(2,1,"workflow-editor.start")," "));}function Zo(i,l){i&1&&(_i$1(0,"p",8),vw(1),Rw(2,"transloco"),Kc()),i&2&&(gI(),Ph(Ow(2,1,"workflow-editor.loading")));}function Qo(i,l){if(i&1&&(_i$1(0,"p",9),vw(1),Kc()),i&2){let e=VD();gI(),Ph(e.loadError());}}function Jo(i,l){if(i&1&&(_i$1(0,"li"),vw(1),Kc()),i&2){let e=l.$implicit;gI(),Ph(e);}}function Yo(i,l){if(i&1&&(_i$1(0,"section",12)(1,"h2"),vw(2),Rw(3,"transloco"),Kc(),_i$1(4,"ul"),ND(5,Jo,2,1,"li",null,SD),Kc()()),i&2){let e=VD(2);gI(2),Ph(Ow(3,1,"workflow-editor.validation")),gI(3),xD(e.validationErrors());}}function Xo(i,l){if(i&1&&(lh(0,"nz-option",18),Rw(1,"transloco")),i&2){let e=l.$implicit,n=VD(2);ch("nzValue",e)("nzLabel",Ow(1,2,n.subjectTypeKey(e)));}}function ea(i,l){if(i&1&&(lh(0,"nz-option",20),Rw(1,"transloco")),i&2){let e=l.$implicit,n=VD(2);ch("nzValue",e)("nzLabel",Ow(1,3,n.subjectHandlingKey(e)))("nzDisabled",e==="collection"&&n.appliesToValue()==="none");}}function ta(i,l){if(i&1&&(lh(0,"nz-option",18),Rw(1,"transloco")),i&2){let e=l.$implicit,n=VD(3);ch("nzValue",e)("nzLabel",Ow(1,2,n.inputTypeKey(e)));}}function na(i,l){if(i&1){let e=LD();_i$1(0,"div",23)(1,"label",15)(2,"span"),vw(3),Rw(4,"transloco"),Kc(),_i$1(5,"input",27),gh("ngModelChange",function(t){let o=Pu$1(e).$index,d=VD(2);return Lu(d.patchInputField(o,{name:t}))}),Kc(),oE(),Kc(),_i$1(6,"label",15)(7,"span"),vw(8),Rw(9,"transloco"),Kc(),_i$1(10,"input",27),gh("ngModelChange",function(t){let o=Pu$1(e).$index,d=VD(2);return Lu(d.patchInputField(o,{label:t}))}),Kc(),oE(),Kc(),_i$1(11,"div",15)(12,"span"),vw(13),Rw(14,"transloco"),Kc(),_i$1(15,"nz-select",28),gh("ngModelChange",function(t){let o=Pu$1(e).$index,d=VD(2);return Lu(d.patchInputField(o,{type:t}))}),ND(16,ta,2,4,"nz-option",18,SD),Kc(),oE(),Kc(),_i$1(18,"label",29),gh("ngModelChange",function(t){let o=Pu$1(e).$index,d=VD(2);return Lu(d.patchInputField(o,{required:t}))}),vw(19),Rw(20,"transloco"),Kc(),oE(),_i$1(21,"button",30),gh("click",function(){let t=Pu$1(e).$index,o=VD(2);return Lu(o.removeInputField(t))}),vw(22),Rw(23,"transloco"),Kc()();}if(i&2){let e=l.$implicit,n=l.$index,t=VD(2);ah("data-testid","input-field-"+n),gI(3),Ph(Ow(4,10,"workflow-editor.fieldName")),gI(2),ch("ngModel",e.name),sE(),gI(3),Ph(Ow(9,12,"workflow-editor.fieldLabel")),gI(2),ch("ngModel",e.label),sE(),gI(3),Ph(Ow(14,14,"workflow-editor.fieldType")),gI(2),ch("ngModel",e.type),sE(),gI(),xD(t.inputFieldTypes),gI(2),ch("ngModel",e.required),sE(),gI(),nl(" ",Ow(20,16,"workflow-editor.required")," "),gI(3),nl(" ",Ow(23,18,"workflow-editor.remove")," ");}}function ia(i,l){if(i&1&&(_i$1(0,"p",25),vw(1),Rw(2,"transloco"),Kc()),i&2){let e=VD(2);gI(),nl(" ",Pw(2,1,"workflow-editor.duplicateStepIds",xw(4,qo,e.duplicateStepIds().join(", ")))," ");}}function oa(i,l){if(i&1){let e=LD();bD(0,Yo,7,3,"section",12),_i$1(1,"nz-card",13),Rw(2,"transloco"),_i$1(3,"div",14)(4,"label",15)(5,"span"),vw(6),Rw(7,"transloco"),Kc(),_i$1(8,"input",16),gh("ngModelChange",function(t){Pu$1(e);let o=VD();return Lu(o.patchWorkflow({name:t}))}),Kc(),oE(),Kc(),_i$1(9,"div",15)(10,"span"),vw(11),Rw(12,"transloco"),Kc(),_i$1(13,"nz-select",17),gh("ngModelChange",function(t){Pu$1(e);let o=VD();return Lu(o.setAppliesTo(t))}),ND(14,Xo,2,4,"nz-option",18,SD),Kc(),oE(),Kc(),_i$1(16,"div",15)(17,"span"),vw(18),Rw(19,"transloco"),Kc(),_i$1(20,"nz-select",19),gh("ngModelChange",function(t){Pu$1(e);let o=VD();return Lu(o.patchWorkflow({subjectHandling:t}))}),ND(21,ea,2,5,"nz-option",20,SD),Kc(),oE(),_i$1(23,"p",21),vw(24),Rw(25,"transloco"),Kc()()(),_i$1(26,"label",15)(27,"span"),vw(28),Rw(29,"transloco"),Kc(),_i$1(30,"textarea",22),gh("ngModelChange",function(t){Pu$1(e);let o=VD();return Lu(o.patchWorkflow({description:t||void 0}))}),Kc(),oE(),Kc()(),_i$1(31,"nz-card",13),Rw(32,"transloco"),ND(33,na,24,20,"div",23,MD),_i$1(35,"button",24),gh("click",function(){Pu$1(e);let t=VD();return Lu(t.addInputField())}),vw(36),Rw(37,"transloco"),Kc()(),_i$1(38,"nz-card",13),Rw(39,"transloco"),bD(40,ia,3,6,"p",25),_i$1(41,"app-step-list",26),gh("stepsChange",function(t){Pu$1(e);let o=VD();return Lu(o.onStepsChange(t))}),Kc()();}if(i&2){let e=VD();_D(e.validationErrors().length>0?0:-1),gI(),ch("nzTitle",Ow(2,21,"workflow-editor.basics")),gI(5),Ph(Ow(7,23,"workflow-editor.name")),gI(2),ch("ngModel",e.workflow().name),sE(),gI(3),Ph(Ow(12,25,"workflow-editor.appliesTo")),gI(2),ch("ngModel",e.appliesToValue()),sE(),gI(),xD(e.subjectTypes),gI(4),Ph(Ow(19,27,"workflow-editor.subjectHandling.label")),gI(2),ch("ngModel",e.workflow().subjectHandling),sE(),gI(),xD(e.subjectHandlingOptions),gI(3),nl(" ",Ow(25,29,e.subjectHandlingHelpKey())," "),gI(4),Ph(Ow(29,31,"workflow-editor.description")),gI(2),ch("ngModel",e.workflow().description??""),sE(),gI(),ch("nzTitle",Ow(32,33,"workflow-editor.inputSchema")),gI(2),xD(e.workflow().inputSchema),gI(3),nl(" ",Ow(37,35,"workflow-editor.addInputField")," "),gI(2),ch("nzTitle",Ow(39,37,"workflow-editor.steps")),gI(2),_D(e.duplicateStepIds().length>0?40:-1),gI(),ch("steps",e.workflow().steps)("rootSteps",e.workflow().steps)("availableWorkflows",e.availableWorkflows())("appliesTo",e.workflow().appliesTo)("inputSchema",e.workflow().inputSchema)("settings",e.settings());}}var Qr=(()=>{class i{constructor(){this.route=C(C1),this.router=C(J1),this.workflowsApi=C(b),this.settingsApi=C($),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($_),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=Hw(()=>!this.routeId()),this.canStart=Hw(()=>!this.isNew()&&!this.loading()&&!this.loadError()&&this.workflow().subjectHandling==="per-subject"),this.pageTitle=Hw(()=>(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 n=e.get("id");if(this.validationErrors.set([]),this.duplicateStepIds.set([]),this.loadError.set(null),!n){this.workflow.set(I()),this.loading.set(false);return}this.loading.set(true),this.workflowsApi.get(n).subscribe({next:t=>{this.workflow.set(s(r$1({},structuredClone(t)),{steps:_(t.steps,{idAutoSync:false})})),this.loading.set(false);},error:t=>{this.loading.set(false),this.loadError.set(this.errorMessage(t,`Failed to load workflow ${n}`));}});});}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(n=>r$1(r$1({},n),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(Ed(e));}addInputField(){this.patchWorkflow({inputSchema:[...this.workflow().inputSchema,b$1()]});}removeInputField(e){this.patchWorkflow({inputSchema:this.workflow().inputSchema.filter((n,t)=>t!==e)});}patchInputField(e,n){let t=this.workflow().inputSchema.map((o,d)=>d===e?r$1(r$1({},o),n):o);this.patchWorkflow({inputSchema:t});}save(){let e=this.workflow(),n=Ed(e.steps);if(this.duplicateStepIds.set(n),n.length>0){this.validationErrors.set([this.transloco.translate("workflow-editor.duplicateStepIds",{ids:n.join(", ")})]);return}let t=v(e,{omitWorkflowId:this.isNew()}),o=t_.safeParse(t);if(!o.success){this.validationErrors.set(T(o.error));return}this.validationErrors.set([]),this.saving.set(true);let d=o.data,V=this.routeId();(this.isNew()||!V?this.workflowsApi.create(d):this.workflowsApi.update(V,s(r$1({},d),{id:V}))).subscribe({next:_e=>{this.saving.set(false),this.workflow.set(s(r$1({},structuredClone(_e)),{steps:_(_e.steps,{idAutoSync:false})})),this.message.success(this.isNew()?"Workflow created":"Workflow saved"),this.isNew()&&this.router.navigate(["/workflows",_e.id,"edit"]);},error:_e=>{this.saving.set(false),this.message.error(this.errorMessage(_e,"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:n=>{Xe(`${tg(n.name)}.json`,JSON.stringify(n,null,2),"application/json");},error:n=>{this.message.error(this.errorMessage(n,this.transloco.translate("workflow-editor.exportFailed")));}});}errorMessage(e,n){return e instanceof bi$1||e instanceof Error?e.message:n}static{this.\u0275fac=function(n){return new(n||i)};}static{this.\u0275cmp=QE({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(n,t){n&1&&(_i$1(0,"main",0)(1,"header",1)(2,"div")(3,"h1",2),vw(4),Kc()(),_i$1(5,"div",3)(6,"a",4),vw(7),Rw(8,"transloco"),Kc(),bD(9,Go,3,4,"button",5),bD(10,Uo,3,3,"button",6),_i$1(11,"button",7),gh("click",function(){return t.save()}),vw(12),Rw(13,"transloco"),Kc()()(),bD(14,Zo,3,3,"p",8)(15,Qo,2,1,"p",9)(16,oa,42,39),Kc()),n&2&&(gI(4),Ph(t.pageTitle()),gI(3),Ph(Ow(8,8,"workflow-editor.backToWorkflows")),gI(2),_D(t.isNew()?-1:9),gI(),_D(t.canStart()?10:-1),gI(),ch("nzLoading",t.saving())("disabled",t.loading()||!!t.loadError()),gI(),nl(" ",Ow(13,10,"common.save")," "),gI(2),_D(t.loading()?14:t.loadError()?15:16));},dependencies:[$8,al,er,rl,$i$1,v3,pf,bd,sp,fp,bt,Ke,Lt,ut,ai$1,z,ex,Fm,Am,An,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{Qr as WorkflowEditorComponent};
@@ -0,0 +1 @@
1
+ import {$ as $$1,P,d,T,F,_,w,D,q,M,V}from'./chunk-DFoFQkTa.js';import {H as He}from'./chunk-BuPc66MS.js';import {a as ai,z}from'./chunk-B_L2A3hm.js';import {_ as _n,C as Cn}from'./chunk-37yFTUcY.js';import {C,au as $,b as at,V as Ve,q as qo,H as Hw,ac as Ng,u as ue,s,r as r$1,av as Ml,aw as Se,ad as Xi,ae as Dg,c as bi,Q as QE,d as $8,e as al,ax as er,ay as Jc,f as rl,az as Nc,g as $i,Z as pf,a0 as bd,a1 as sp,a2 as fp,h as ex,F as Fm,A as Am,K as Kt$1,j as _i,k as vw,R as Rw,l as Kc,m as gh,n as bD,w as gI,P as Ph,O as Ow,z as nl,B as _D,aA as YE,aB as uu,aC as pT,aD as E3,aE as _r,aF as oe,aG as z0,aH as Ci,aI as hT,aJ as Oe,aK as Bt$1,aL as el,aM as cl,a3 as Th,a4 as xh,aN as st,aO as Ee,aP as ly,aQ as Z0,p as lh,a8 as Mh,x as ch,G as ah,aR as Sw,aS as St,aT as wo,aU as Ih,aV as qD,aW as WD,E as VD,N as ND,D as xD,L as LD,o as oE,y as sE,aX as Yl,aY as nh,S as SD,aZ as el$1,a_ as tl,J as Pu,M as Lu}from'./main-2ZW45HAE.js';import {G as Gn,u as un}from'./chunk-vYeIWxg4.js';import {y as y_,e as em}from'./chunk-DMAf3Qir.js';import {W,I}from'./chunk-C4Ee3umI.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-yxqIQom4.js';import'./chunk-DphMF2VB.js';var Et=["switchElement"];function It(i,p){i&1&&lh(0,"nz-icon",3);}function wt(i,p){if(i&1&&(el$1(0),vw(1),tl()),i&2){let e=VD(2);gI(),Ph(e.nzCheckedChildren);}}function Nt(i,p){if(i&1&&nh(0,wt,2,1,"ng-container",6),i&2){let e=VD();ch("nzStringTemplateOutlet",e.nzCheckedChildren);}}function kt(i,p){if(i&1&&(el$1(0),vw(1),tl()),i&2){let e=VD(2);gI(),Ph(e.nzUnCheckedChildren);}}function Tt(i,p){if(i&1&&nh(0,kt,2,1,"ng-container",6),i&2){let e=VD();ch("nzStringTemplateOutlet",e.nzUnCheckedChildren);}}var Dt="switch",J=(()=>{let i,p=[],e=[];return class K{static{let t=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;i=[Yl()],pT(null,null,i,{kind:"field",name:"nzSize",static:false,private:false,access:{has:r=>"nzSize"in r,get:r=>r.nzSize,set:(r,f)=>{r.nzSize=f;}},metadata:t},p,e),t&&Object.defineProperty(this,Symbol.metadata,{enumerable:true,configurable:true,writable:true,value:t});}_nzModuleName=Dt;nzConfigService=C(E3);el=C(_r).nativeElement;ngZone=C(oe);cdr=C(z0);focusMonitor=C(Ci);destroyRef=C(at);isChecked=false;onChange=()=>{};onTouched=()=>{};switchElement;nzLoading=false;nzDisabled=false;nzControl=false;nzCheckedChildren=null;nzUnCheckedChildren=null;nzSize=hT(this,p,"default");nzId=(hT(this,e),null);dir=C(Oe).valueSignal;isNzDisableFirstChange=true;size=qo(this.nzSize);formSize=C(Bt$1,{optional:true});finalSize=Hw(()=>this.formSize?.()||this.size());updateValue(t){this.isChecked!==t&&(this.isChecked=t,this.onChange(this.isChecked));}focus(){this.focusMonitor.focusVia(this.switchElement.nativeElement,"keyboard");}blur(){this.switchElement.nativeElement.blur();}constructor(){this.destroyRef.onDestroy(()=>{this.focusMonitor.stopMonitoring(this.switchElement.nativeElement);});}ngOnChanges(t){let{nzSize:r}=t;r&&this.size.set(r.currentValue);}ngOnInit(){el(this.el,"click").pipe(ue(this.destroyRef)).subscribe(t=>{t.preventDefault(),!(this.nzControl||this.nzDisabled||this.nzLoading)&&this.ngZone.run(()=>{this.updateValue(!this.isChecked),this.cdr.markForCheck();});}),el(this.switchElement.nativeElement,"keydown").pipe(ue(this.destroyRef)).subscribe(t=>{if(this.nzControl||this.nzDisabled||this.nzLoading)return;let{keyCode:r}=t;r!==37&&r!==39&&r!==32&&r!==13||(t.preventDefault(),this.ngZone.run(()=>{r===37?this.updateValue(false):r===39?this.updateValue(true):(r===32||r===13)&&this.updateValue(!this.isChecked),this.cdr.markForCheck();}));});}ngAfterViewInit(){this.focusMonitor.monitor(this.switchElement.nativeElement,true).pipe(ue(this.destroyRef)).subscribe(t=>{t||Promise.resolve().then(()=>this.onTouched());});}writeValue(t){this.isChecked=t,this.cdr.markForCheck();}registerOnChange(t){this.onChange=t;}registerOnTouched(t){this.onTouched=t;}setDisabledState(t){this.nzDisabled=this.isNzDisableFirstChange&&this.nzDisabled||t,this.isNzDisableFirstChange=false,this.cdr.markForCheck();}static \u0275fac=function(r){return new(r||K)};static \u0275cmp=QE({type:K,selectors:[["nz-switch"]],viewQuery:function(r,f){if(r&1&&Ih(Et,7),r&2){let q;qD(q=WD())&&(f.switchElement=q.first);}},inputs:{nzLoading:[2,"nzLoading","nzLoading",Z0],nzDisabled:[2,"nzDisabled","nzDisabled",Z0],nzControl:[2,"nzControl","nzControl",Z0],nzCheckedChildren:"nzCheckedChildren",nzUnCheckedChildren:"nzUnCheckedChildren",nzSize:"nzSize",nzId:"nzId"},exportAs:["nzSwitch"],features:[Sw([{provide:St,useExisting:wo(()=>K),multi:true}]),ly],decls:8,vars:15,consts:[["switchElement",""],["nz-wave","","type","button",1,"ant-switch",3,"disabled","nzWaveExtraNode"],[1,"ant-switch-handle"],["nzType","loading",1,"ant-switch-loading-icon"],[1,"ant-switch-inner"],[1,"ant-click-animating-node"],[4,"nzStringTemplateOutlet"]],template:function(r,f){r&1&&(_i(0,"button",1,0)(2,"span",2),bD(3,It,1,0,"nz-icon",3),Kc(),_i(4,"span",4),bD(5,Nt,1,1,"ng-container")(6,Tt,1,1,"ng-container"),Kc(),lh(7,"div",5),Kc()),r&2&&(Mh("ant-switch-checked",f.isChecked)("ant-switch-loading",f.nzLoading)("ant-switch-disabled",f.nzDisabled)("ant-switch-small",f.finalSize()==="small")("ant-switch-rtl",f.dir()==="rtl"),ch("disabled",f.nzDisabled)("nzWaveExtraNode",true),ah("id",f.nzId),gI(3),_D(f.nzLoading?3:-1),gI(2),_D(f.isChecked?5:6));},dependencies:[cl,fp,Th,xh,st,Ee],encapsulation:2})}})(),Ct=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=YE({type:i});static \u0275inj=uu({imports:[J]})}return i})();var Y=(i,p)=>p.id,Vt=(i,p)=>p.key;function Pt(i,p){i&1&&(_i(0,"div",4),lh(1,"nz-alert",9),Rw(2,"transloco"),Kc()),i&2&&(gI(),ch("nzMessage",Ow(2,1,"settings.restartRequired.message")));}function At(i,p){i&1&&(_i(0,"p",5),vw(1),Rw(2,"transloco"),Kc()),i&2&&(gI(),Ph(Ow(2,1,"common.loading")));}function Ft(i,p){if(i&1&&(_i(0,"p",6),vw(1),Kc()),i&2){let e=VD();gI(),Ph(e.loadError());}}function Bt(i,p){if(i&1&&(_i(0,"nz-tag",11),vw(1),Rw(2,"transloco"),Kc()),i&2){let e=VD().$implicit;ah("data-testid",e.id+"-default-chip"),gI(),Ph(Ow(2,2,"settings.defaultAgent.label"));}}function Rt(i,p){if(i&1){let e=LD();_i(0,"tr")(1,"td",10)(2,"span"),vw(3),Kc(),bD(4,Bt,3,4,"nz-tag",11),Kc(),_i(5,"td")(6,"nz-tag"),vw(7),Rw(8,"transloco"),Kc()(),_i(9,"td"),vw(10),Kc(),_i(11,"td",12)(12,"button",13),gh("click",function(){let t=Pu(e).$implicit,r=VD(2);return Lu(r.openEdit(t))}),vw(13),Rw(14,"transloco"),Kc(),_i(15,"button",14),Rw(16,"transloco"),Rw(17,"transloco"),Rw(18,"transloco"),gh("nzOnConfirm",function(){let t=Pu(e).$implicit,r=VD(2);return Lu(r.removeInstance(t.id))}),vw(19),Rw(20,"transloco"),Kc()()();}if(i&2){let e=p.$implicit,n=VD(2);ah("data-testid","instance-"+e.id),gI(),ah("data-testid",e.id+"-name"),gI(2),Ph(e.displayName),gI(),_D(n.isDefaultAgent(e)?4:-1),gI(2),ah("data-testid",e.id+"-type"),gI(),Ph(Ow(8,15,n.typeLabelKey(e))),gI(2),ah("data-testid",e.id+"-expires"),gI(),nl(" ",e.expiresOn??""," "),gI(2),ah("data-testid",e.id+"-edit"),gI(),nl(" ",Ow(14,17,"settings.edit")," "),gI(2),ch("nzPopconfirmTitle",Ow(16,19,"settings.deleteConfirm"))("nzOkText",Ow(17,21,"settings.delete"))("nzCancelText",Ow(18,23,"common.cancel")),ah("data-testid",e.id+"-delete"),gI(4),nl(" ",Ow(20,25,"settings.delete")," ");}}function Lt(i,p){if(i&1&&(_i(0,"nz-table",7)(1,"thead")(2,"tr")(3,"th"),vw(4),Rw(5,"transloco"),Kc(),_i(6,"th"),vw(7),Rw(8,"transloco"),Kc(),_i(9,"th"),vw(10),Rw(11,"transloco"),Kc(),_i(12,"th"),vw(13),Rw(14,"transloco"),Kc()()(),_i(15,"tbody"),ND(16,Rt,21,27,"tr",null,Y),Kc()()),i&2){let e=VD();ch("nzData",e.instances())("nzFrontPagination",false)("nzShowPagination",false),gI(4),Ph(Ow(5,7,"settings.column.displayName")),gI(3),Ph(Ow(8,9,"settings.column.type")),gI(3),Ph(Ow(11,11,"settings.column.expiresOn")),gI(3),Ph(Ow(14,13,"settings.column.actions")),gI(3),xD(e.instances());}}function Kt(i,p){if(i&1&&(_i(0,"li"),vw(1),Kc()),i&2){let e=p.$implicit;gI(),Ph(e);}}function qt(i,p){if(i&1&&(_i(0,"section",16)(1,"h3"),vw(2),Rw(3,"transloco"),Kc(),_i(4,"ul"),ND(5,Kt,2,1,"li",null,SD),Kc()()),i&2){let e=VD(2);gI(2),Ph(Ow(3,1,"settings.validation")),gI(3),xD(e.validationErrors());}}function $t(i,p){if(i&1&&(_i(0,"p",17),vw(1),Kc()),i&2){let e=VD(2);gI(),Ph(e.secretSaveError());}}function jt(i,p){if(i&1&&(lh(0,"nz-option",24),Rw(1,"transloco")),i&2){let e=p.$implicit;ch("nzValue",e.id)("nzLabel",Ow(1,2,e.labelKey));}}function Ut(i,p){if(i&1){let e=LD();_i(0,"label",18)(1,"span"),vw(2),Rw(3,"transloco"),Kc(),_i(4,"input",32),gh("ngModelChange",function(t){let r=Pu(e).$implicit,f=VD(2);return Lu(f.setDraftConfig(r.key,t))}),Kc(),oE(),Kc();}if(i&2){let e=p.$implicit,n=VD(2);gI(2),Ph(Ow(3,3,e.labelKey)),gI(2),ch("ngModel",n.configValue(n.draft().config,e.key)),ah("data-testid","provider-config-"+e.key),sE();}}function Wt(i,p){if(i&1){let e=LD();_i(0,"button",33),gh("click",function(){Pu(e);let t=VD(2);return Lu(t.fetchModels())}),vw(1),Rw(2,"transloco"),Kc();}if(i&2){let e=VD(2);ch("nzLoading",e.fetchingModels())("disabled",!e.canFetchModels()),gI(),nl(" ",Ow(2,3,"settings.model.fetch")," ");}}function Zt(i,p){if(i&1&&lh(0,"nz-option",24),i&2){let e=VD(3);ch("nzValue",e.configValue(e.draft().config,"model"))("nzLabel",e.configValue(e.draft().config,"model"));}}function Ht(i,p){if(i&1&&lh(0,"nz-option",24),i&2){let e=p.$implicit;ch("nzValue",e.id)("nzLabel",e.displayName);}}function Qt(i,p){if(i&1&&(_i(0,"p",35),vw(1),Kc()),i&2){let e=VD(3);gI(),Ph(e.modelsError());}}function Gt(i,p){if(i&1){let e=LD();_i(0,"div",18)(1,"span"),vw(2),Rw(3,"transloco"),Kc(),_i(4,"nz-select",34),Rw(5,"transloco"),gh("ngModelChange",function(t){Pu(e);let r=VD(2);return Lu(r.setDraftConfig("model",t??""))}),bD(6,Zt,1,2,"nz-option",24),ND(7,Ht,1,2,"nz-option",24,Y),Kc(),oE(),bD(9,Qt,2,1,"p",35),_i(10,"p",22),vw(11),Rw(12,"transloco"),Kc()(),_i(13,"label",18)(14,"span"),vw(15),Rw(16,"transloco"),Kc(),_i(17,"input",36),gh("ngModelChange",function(t){Pu(e);let r=VD(2);return Lu(r.setMaxConcurrent(t))}),Kc(),oE(),_i(18,"p",22),vw(19),Rw(20,"transloco"),Kc()(),_i(21,"label",37)(22,"span"),vw(23),Rw(24,"transloco"),Kc(),_i(25,"nz-switch",38),gh("ngModelChange",function(t){Pu(e);let r=VD(2);return Lu(r.setDefaultAgentDraft(t))}),Kc(),oE(),Kc();}if(i&2){let e=VD(2);gI(2),Ph(Ow(3,11,"settings.model.label")),gI(2),ch("nzPlaceHolder",Ow(5,13,"settings.model.placeholder"))("ngModel",e.configValue(e.draft().config,"model")),sE(),gI(2),_D(e.selectedModelMissingFromList()?6:-1),gI(),xD(e.availableModels()),gI(2),_D(e.modelsError()?9:-1),gI(2),Ph(Ow(12,15,"settings.model.hint")),gI(4),Ph(Ow(16,17,"settings.maxConcurrent.label")),gI(2),ch("ngModel",e.draft().maxConcurrent),sE(),gI(2),Ph(Ow(20,19,"settings.maxConcurrent.hint")),gI(4),Ph(Ow(24,21,"settings.defaultAgent.toggle")),gI(2),ch("ngModel",e.draft().defaultAgent),sE();}}function Jt(i,p){if(i&1){let e=LD();_i(0,"div",8)(1,"div",15)(2,"h2"),vw(3),Rw(4,"transloco"),Kc(),bD(5,qt,7,3,"section",16),bD(6,$t,2,1,"p",17),_i(7,"label",18)(8,"span"),vw(9),Rw(10,"transloco"),Kc(),_i(11,"input",19),gh("ngModelChange",function(t){Pu(e);let r=VD();return Lu(r.onDisplayNameChange(t))}),Kc(),oE(),Kc(),_i(12,"label",20)(13,"span"),vw(14),Rw(15,"transloco"),Kc(),_i(16,"input",21),gh("ngModelChange",function(t){Pu(e);let r=VD();return Lu(r.onIdChange(t))}),Kc(),oE(),_i(17,"p",22),vw(18),Rw(19,"transloco"),Kc()(),_i(20,"div",18)(21,"span"),vw(22),Rw(23,"transloco"),Kc(),_i(24,"nz-select",23),gh("ngModelChange",function(t){Pu(e);let r=VD();return Lu(r.onTypeChange(t))}),ND(25,jt,2,4,"nz-option",24,Y),Kc(),oE(),Kc(),ND(27,Ut,5,5,"label",18,Vt),_i(29,"label",18)(30,"span"),vw(31),Rw(32,"transloco"),Kc(),_i(33,"div",25)(34,"input",26),Rw(35,"transloco"),gh("ngModelChange",function(t){Pu(e);let r=VD();return Lu(r.setSecretValue(t))}),Kc(),oE(),bD(36,Wt,3,5,"button",27),Kc()(),bD(37,Gt,26,23),_i(38,"label",18)(39,"span"),vw(40),Rw(41,"transloco"),Kc(),_i(42,"input",28),gh("ngModelChange",function(t){Pu(e);let r=VD();return Lu(r.setExpiresOn(t))}),Kc(),oE(),_i(43,"p",22),vw(44),Rw(45,"transloco"),Kc()(),_i(46,"div",29)(47,"button",30),gh("click",function(){Pu(e);let t=VD();return Lu(t.closeModal())}),vw(48),Rw(49,"transloco"),Kc(),_i(50,"button",31),gh("click",function(){Pu(e);let t=VD();return Lu(t.saveModal())}),vw(51),Rw(52,"transloco"),Kc()()()();}if(i&2){let e=VD();gI(3),nl(" ",Ow(4,21,e.draft().originalId?"settings.editProvider":"settings.addProvider")," "),gI(2),_D(e.validationErrors().length>0?5:-1),gI(),_D(e.secretSaveError()?6:-1),gI(3),Ph(Ow(10,23,"settings.displayName")),gI(2),ch("ngModel",e.draft().displayName),sE(),gI(3),Ph(Ow(15,25,"settings.instanceId")),gI(2),ch("ngModel",e.draft().id),sE(),gI(2),Ph(Ow(19,27,"settings.instanceIdHint")),gI(4),Ph(Ow(23,29,"settings.type.label")),gI(2),ch("ngModel",e.draft().optionId),sE(),gI(),xD(e.typeOptions),gI(2),xD(e.configFields(e.draft().type)),gI(4),Ph(Ow(32,31,"settings.apiKey.label")),gI(3),ch("ngModel",e.draft().secretValue)("placeholder",Ow(35,33,e.draft().originalId?"settings.apiKey.placeholderEdit":"settings.apiKey.placeholderCreate")),sE(),gI(2),_D(e.draft().kind==="agent"?36:-1),gI(),_D(e.draft().kind==="agent"?37:-1),gI(3),Ph(Ow(41,35,"settings.expiresOn.label")),gI(2),ch("ngModel",e.draft().expiresOn),sE(),gI(2),Ph(Ow(45,37,"settings.expiresOn.hint")),gI(4),nl(" ",Ow(49,39,"common.cancel")," "),gI(2),ch("nzLoading",e.saving()),gI(),nl(" ",Ow(52,41,"common.save")," ");}}var Zi=(()=>{class i{constructor(){this.api=C($),this.providersApi=C($$1),this.message=C(He),this.destroyRef=C(at),this.transloco=C(Ve),this.loaded=qo({providerInstances:[]}),this.status=qo([]),this.draft=qo(P()),this.loading=qo(true),this.saving=qo(false),this.loadError=qo(null),this.validationErrors=qo([]),this.secretSaveError=qo(null),this.restartRequired=qo(false),this.modalOpen=qo(false),this.availableModels=qo([]),this.fetchingModels=qo(false),this.modelsError=qo(null),this.instances=Hw(()=>this.loaded().providerInstances??[]),this.typeOptions=d,this.configFields=T,this.typeLabelKey=F,this.isAgent=y_,Ng({settings:this.api.getSettings(),status:this.api.getProviderStatus()}).pipe(ue(this.destroyRef)).subscribe({next:({settings:e,status:n})=>{this.applySettings(e,false),this.status.set(n),this.loading.set(false);},error:e=>{this.loading.set(false),this.loadError.set(this.errorMessage(e,this.transloco.translate("settings.loadFailed")));}});}configValue(e,n){let t=e[n];return typeof t=="string"?t:""}isDefaultAgent(e){return y_(e)&&this.loaded().defaultAgentInstanceId===e.id}selectedModelMissingFromList(){let e=this.configValue(this.draft().config,"model");return e?!this.availableModels().some(n=>n.id===e):false}canFetchModels(){let e=this.draft();return e.kind==="agent"&&(e.secretValue.trim().length>0||e.originalId!=null)}openCreate(){this.resetModal(P());}openEdit(e){this.resetModal(_(e,this.isDefaultAgent(e)));}closeModal(){this.modalOpen.set(false);}onDisplayNameChange(e){this.draft.update(n=>w(n,e,this.existingIds(n)));}onIdChange(e){this.draft.update(n=>D(n,e));}onTypeChange(e){this.availableModels.set([]),this.modelsError.set(null),this.draft.update(n=>{let t=q(n,e);return t.kind!=="agent"||n.kind==="agent"?t:s(r$1({},t),{defaultAgent:this.shouldDefaultNewAgent(n)})});}setDraftConfig(e,n){this.draft.update(t=>s(r$1({},t),{config:s(r$1({},t.config),{[e]:n})}));}setSecretValue(e){this.draft.update(n=>s(r$1({},n),{secretValue:e}));}setExpiresOn(e){this.draft.update(n=>s(r$1({},n),{expiresOn:e}));}setDefaultAgentDraft(e){this.draft.update(n=>s(r$1({},n),{defaultAgent:e}));}setMaxConcurrent(e){let n=typeof e=="number"?e:Number(e),t=Number.isFinite(n)&&n>=1?Math.floor(n):1;this.draft.update(r=>s(r$1({},r),{maxConcurrent:t}));}fetchModels(){let e=this.draft();if(e.kind!=="agent"||!this.canFetchModels())return;let n=e.secretValue.trim();this.fetchingModels.set(true),this.modelsError.set(null),this.providersApi.previewModels(n?{type:e.type,apiKey:n}:{type:e.type,instanceId:e.originalId}).pipe(ue(this.destroyRef)).subscribe({next:t=>{this.availableModels.set(t),this.fetchingModels.set(false);},error:t=>{this.fetchingModels.set(false),this.modelsError.set(this.errorMessage(t,this.transloco.translate("settings.model.fetchFailed")));}});}saveModal(){let e=this.draft();if(this.validationErrors.set([]),this.secretSaveError.set(null),!e.displayName.trim()){this.validationErrors.set([this.transloco.translate("settings.displayNameRequired")]);return}if(e.originalId==null&&!e.secretValue.trim()){this.validationErrors.set([this.transloco.translate("settings.apiKey.required")]);return}let n=em.safeParse(M(e));if(!n.success){this.validationErrors.set(V(n.error));return}this.saving.set(true);let t=n.data,r=t.kind==="agent"?{defaultAgent:e.defaultAgent}:{};(e.originalId==null?this.api.createProviderInstance(r$1(r$1({},t),r)):this.api.updateProviderInstance(e.originalId,r$1(r$1({displayName:t.displayName,config:t.config,secretKey:t.secretKey,expiresOn:t.expiresOn??null},t.kind==="agent"?{maxConcurrent:t.maxConcurrent}:{}),r))).pipe(Ml(T=>{this.applySettings(T.settings,T.restartRequired);let P=e.secretValue.trim();return P?this.api.setSecret(t.secretKey,P).pipe(Se(()=>({kind:"ok"})),Xi(xt=>Dg({kind:"secret-failed",err:xt}))):Dg({kind:"ok"})}),ue(this.destroyRef)).subscribe({next:T=>{if(this.saving.set(false),T.kind==="secret-failed"){this.draft.update(P=>s(r$1({},P),{originalId:t.id,id:t.id,idAutoSync:false,secretKey:t.secretKey})),this.secretSaveError.set(this.errorMessage(T.err,this.transloco.translate("settings.apiKey.setFailedAfterSave"))),this.refreshStatus();return}this.modalOpen.set(false),this.refreshStatus();},error:T=>{this.saving.set(false),this.message.error(this.errorMessage(T,this.transloco.translate("settings.saveFailed")));}});}removeInstance(e){this.api.deleteProviderInstance(e).subscribe({next:n=>this.applySettings(n.settings,n.restartRequired),error:n=>{this.message.error(this.errorMessage(n,this.transloco.translate("settings.saveFailed")));}});}resetModal(e){this.validationErrors.set([]),this.secretSaveError.set(null),this.availableModels.set([]),this.modelsError.set(null),this.fetchingModels.set(false),this.draft.set(e),this.modalOpen.set(true);}shouldDefaultNewAgent(e){return e.originalId&&e.originalId===this.loaded().defaultAgentInstanceId?true:!this.loaded().defaultAgentInstanceId}existingIds(e){return this.instances().map(n=>n.id).filter(n=>n!==e.originalId)}applySettings(e,n){let t=e.providerInstances??[];this.loaded.set(r$1({providerInstances:t},e.defaultAgentInstanceId?{defaultAgentInstanceId:e.defaultAgentInstanceId}:{})),n&&this.restartRequired.set(true);}refreshStatus(){this.api.getProviderStatus().subscribe({next:e=>this.status.set(e),error:()=>{}});}errorMessage(e,n){return e instanceof bi||e instanceof Error?e.message:n}static{this.\u0275fac=function(n){return new(n||i)};}static{this.\u0275cmp=QE({type:i,selectors:[["app-settings"]],decls:17,vars:12,consts:[["data-testid","settings-page",1,"settings"],[1,"header"],[1,"lede"],["nz-button","","nzType","primary","type","button","data-testid","add-provider",3,"click"],["data-testid","restart-required-banner"],["data-testid","loading"],["data-testid","load-error",1,"error"],["data-testid","provider-instances",3,"nzData","nzFrontPagination","nzShowPagination"],["data-testid","provider-modal",1,"modal-backdrop"],["nzType","warning","nzShowIcon","","nzBanner","",3,"nzMessage"],[1,"name-cell"],["nzColor","blue"],[1,"actions"],["nz-button","","nzType","link","type","button",3,"click"],["nz-button","","nzType","link","nzDanger","","type","button","nz-popconfirm","",3,"nzOnConfirm","nzPopconfirmTitle","nzOkText","nzCancelText"],["role","dialog",1,"modal-panel"],["data-testid","validation-errors",1,"errors"],["data-testid","secret-save-error",1,"error"],[1,"field"],["nz-input","","data-testid","provider-display-name",3,"ngModelChange","ngModel"],[1,"field","field-id"],["nz-input","","data-testid","provider-id",3,"ngModelChange","ngModel"],[1,"hint"],["data-testid","provider-type",3,"ngModelChange","ngModel"],[3,"nzValue","nzLabel"],[1,"api-key-row"],["nz-input","","type","password","autocomplete","off","data-testid","provider-api-key",3,"ngModelChange","ngModel","placeholder"],["nz-button","","type","button","data-testid","provider-fetch-models",3,"nzLoading","disabled"],["nz-input","","type","date","data-testid","provider-expires-on",3,"ngModelChange","ngModel"],[1,"modal-actions"],["nz-button","","type","button","data-testid","provider-cancel",3,"click"],["nz-button","","nzType","primary","type","button","data-testid","provider-save",3,"click","nzLoading"],["nz-input","",3,"ngModelChange","ngModel"],["nz-button","","type","button","data-testid","provider-fetch-models",3,"click","nzLoading","disabled"],["data-testid","provider-model","nzAllowClear","",3,"ngModelChange","nzPlaceHolder","ngModel"],["data-testid","provider-models-error",1,"error"],["nz-input","","type","number","min","1","step","1","data-testid","provider-max-concurrent",3,"ngModelChange","ngModel"],[1,"field","field-switch"],["data-testid","provider-default-agent",3,"ngModelChange","ngModel"]],template:function(n,t){n&1&&(_i(0,"main",0)(1,"header",1)(2,"div")(3,"h1"),vw(4),Rw(5,"transloco"),Kc(),_i(6,"p",2),vw(7),Rw(8,"transloco"),Kc()(),_i(9,"button",3),gh("click",function(){return t.openCreate()}),vw(10),Rw(11,"transloco"),Kc()(),bD(12,Pt,3,3,"div",4),bD(13,At,3,3,"p",5)(14,Ft,2,1,"p",6)(15,Lt,18,15,"nz-table",7),bD(16,Jt,53,43,"div",8),Kc()),n&2&&(gI(4),Ph(Ow(5,6,"settings.title")),gI(3),Ph(Ow(8,8,"settings.lede")),gI(3),nl(" ",Ow(11,10,"settings.addProvider")," "),gI(2),_D(t.restartRequired()?12:-1),gI(),_D(t.loading()?13:t.loadError()?14:15),gI(3),_D(t.modalOpen()?16:-1));},dependencies:[$8,al,er,Jc,rl,Nc,$i,Gn,un,pf,bd,sp,fp,ai,z,_n,Cn,ex,Fm,Am,Ct,J,pc,as,dc,Kl,cc,Ji,ls,W,I,Kt$1],styles:[".settings[_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}.lede[_ngcontent-%COMP%]{margin:.25rem 0 0;color:#57534e}.field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.35rem;margin:.5rem 0}.field[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{font-size:.85rem;color:#57534e}.field-id[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{font-family:ui-monospace,Consolas,monospace;font-size:.85rem;color:#57534e}.hint[_ngcontent-%COMP%]{margin:0;font-size:.8rem;color:#78716c}.errors[_ngcontent-%COMP%]{border:1px solid #fecdd3;background:#fff1f2;padding:.75rem 1rem}.errors[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:0 0 .35rem;font-size:1rem}.error[_ngcontent-%COMP%]{color:#9f1239}.actions[_ngcontent-%COMP%]{white-space:nowrap}.api-key-row[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:center}.api-key-row[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{flex:1}.field-switch[_ngcontent-%COMP%]{flex-direction:row;align-items:center;justify-content:space-between}.modal-backdrop[_ngcontent-%COMP%]{position:fixed;inset:0;z-index:1000;display:flex;align-items:flex-start;justify-content:center;padding:4rem 1rem 2rem;background:#1c191759}.modal-panel[_ngcontent-%COMP%]{width:min(32rem,100%);max-height:calc(100vh - 6rem);overflow:auto;background:#fff;border-radius:.5rem;padding:1.25rem 1.5rem 1.5rem;box-shadow:0 10px 30px #1c19172e}.modal-panel[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin:0 0 .75rem;font-size:1.15rem}.modal-actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:.5rem;margin-top:1rem}"]});}}return i})();export{Zi as ProvidersManageComponent,Zi as SettingsComponent};
@@ -0,0 +1 @@
1
+ import {aA as YE,aB as uu,C,aE as _r,b5 as pn,b as at$1,b8 as ml,cr as A,aH as Ci,cc as ji,df as lt$1,q as qo,H as Hw,a5 as $0,aQ as Z0,aJ as Oe,bb as Uw,aK as Bt$1,ba as pl,b2 as de,aw as Se,cz as mt,bd as Qr,dg as Me,u as ue,W as rd,cy as Gl,bi as hl,bh as il,bE as XE,aR as Sw,bm as fn,bn as rD,bo as ir,m as gh,G as ah,bp as cw,a8 as Mh,bc as W0,bH as Er,a6 as B0,r as r$1,be as tl,av as Ml,b9 as Nr,dh as Zr,bg as Kf,Q as QE,a3 as Th,a4 as xh,Z as pf,a0 as bd,a1 as sp,a2 as fp,bj as w5,bk as BD,n as bD,aY as nh,bl as Lw,B as _D,aT as wo,bs as Eh,br as GD,di as tp,dj as Ai,dk as zl,dl as np,ax as er,f as rl,dm as jc,dn as td,aP as ly,b4 as Y0,N as ND,aq as MD,D as xD,aS as St$1,aU as Ih,aV as qD,aW as WD,bt as U0,E as VD,ai as zD,x as ch,j as _i,l as Kc,w as gI,bx as $D,L as LD,J as Pu,M as Lu,o as oE,y as sE,cb as Bh,dp as Tw,k as vw,P as Ph,p as lh,I as xw,dq as Cw,z as nl}from'./main-2ZW45HAE.js';var nt=new A("");var ht=["otpInput"];function gt(t,o){if(t&1){let e=LD();_i(0,"input",2,0),gh("input",function(i){let r=Pu(e).$index,l=VD();return Lu(l.onInput(r,i))})("focus",function(i){Pu(e);let r=VD();return Lu(r.onFocus(i))})("keydown",function(i){let r=Pu(e).$index,l=VD();return Lu(l.onKeyDown(r,i))})("paste",function(i){let r=Pu(e).$index,l=VD();return Lu(l.onPaste(r,i))}),Kc(),oE();}if(t&2){let e=o.$implicit,n=VD();ch("nzSize",n.nzSize)("formControl",e)("nzStatus",n.nzStatus),sE();}}var _t=[[["","nzInputAddonBefore",""]],[["","nzInputAddonAfter",""]],[["","nzInputSearchEnterButton",""]],[["","nzInputPrefix",""]],[["","nzInputSuffix",""]],[["","nzInputClearIcon",""]],[["","nz-input",""]]],vt=["[nzInputAddonBefore]","[nzInputAddonAfter]","[nzInputSearchEnterButton]","[nzInputPrefix]","[nzInputSuffix]","[nzInputClearIcon]","[nz-input]"],Ct=t=>({$implicit:t});function zt(t,o){}function bt(t,o){if(t&1&&nh(0,zt,0,0,"ng-template",4),t&2){VD();let e=zD(4);ch("ngTemplateOutlet",e);}}function yt(t,o){}function Nt(t,o){if(t&1&&nh(0,yt,0,0,"ng-template",4),t&2){VD();let e=zD(8);ch("ngTemplateOutlet",e);}}function Dt(t,o){}function xt(t,o){if(t&1&&nh(0,Dt,0,0,"ng-template",4),t&2){VD();let e=zD(10);ch("ngTemplateOutlet",e);}}function Mt(t,o){if(t&1&&vw(0),t&2){let e=VD(3);Ph(e.nzAddonBefore());}}function St(t,o){t&1&&(_i(0,"span",6),$D(1,0,null,Mt,1,1),Kc());}function It(t,o){}function wt(t,o){if(t&1&&nh(0,It,0,0,"ng-template",4),t&2){VD(2);let e=zD(6);ch("ngTemplateOutlet",e);}}function At(t,o){}function Et(t,o){if(t&1&&nh(0,At,0,0,"ng-template",4),t&2){VD(2);let e=zD(10);ch("ngTemplateOutlet",e);}}function Tt(t,o){if(t&1&&vw(0),t&2){VD(2);let e=Cw(0);nl(" ",e," ");}}function Ft(t,o){t&1&&lh(0,"nz-icon",9);}function Vt(t,o){if(t&1&&bD(0,Tt,1,1)(1,Ft,1,0,"nz-icon",9),t&2){VD();let e=Cw(0);_D(e&&typeof e=="string"?0:1);}}function Rt(t,o){if(t&1){let e=LD();Bh(0),_i(1,"button",8),gh("click",function(i){Pu(e);let r=VD(3);return Lu(r.inputSearchDir.search(i))}),$D(2,2,null,Vt,2,1),Kc();}if(t&2){let e=VD(3),n=Tw(e.inputSearchDir.nzEnterButton()),i=e.inputSearchEnterButton()??n!==false;gI(),ch("nzType",i?"primary":"default")("nzSize",e.size())("nzLoading",e.inputSearchDir.nzLoading());}}function kt(t,o){if(t&1&&vw(0),t&2){let e=VD(3);Ph(e.nzAddonAfter());}}function Pt(t,o){if(t&1&&(_i(0,"span",6),bD(1,Rt,4,4,"button",7),$D(2,1,null,kt,1,1),Kc()),t&2){let e=VD(2);gI(),_D(e.inputSearchDir?1:-1);}}function Ot(t,o){if(t&1&&(_i(0,"span",5),bD(1,St,3,0,"span",6),bD(2,wt,1,1,null,4)(3,Et,1,1,null,4),bD(4,Pt,4,1,"span",6),Kc()),t&2){let e=VD();gI(),_D(e.hasAddonBefore()?1:-1),gI(),_D(e.hasAffix()?2:3),gI(2),_D(e.hasAddonAfter()?4:-1);}}function Bt(t,o){}function Wt(t,o){if(t&1&&(_i(0,"span"),nh(1,Bt,0,0,"ng-template",4),Kc()),t&2){let e=VD(),n=zD(8);cw(e.affixWrapperClass()),gI(),ch("ngTemplateOutlet",n);}}function Lt(t,o){if(t&1&&vw(0),t&2){let e=VD(3);Ph(e.nzPrefix());}}function jt(t,o){t&1&&(_i(0,"span",10),$D(1,3,null,Lt,1,1),Kc());}function $t(t,o){}function qt(t,o){t&1&&lh(0,"nz-icon",17);}function Ut(t,o){if(t&1){let e=LD();_i(0,"span",16),gh("click",function(i){Pu(e);let r=VD(3);return r.clear(),Lu(r.inputSearchDir?.search(i,"clear"))}),$D(1,5,null,qt,1,0),Kc();}if(t&2){let e=VD(3);Mh("ant-input-clear-icon-has-suffix",e.nzSuffix()||e.suffix()||e.hasFeedback()||e.inputPasswordDir?.nzVisibilityToggle())("ant-input-clear-icon-hidden",!e.inputDir().value()||e.disabled()||e.readOnly());}}function Ht(t,o){if(t&1&&(_i(0,"span",13),vw(1),Kc()),t&2){let e=VD(3);gI(),Ph(e.dataCount());}}function Gt(t,o){}function Qt(t,o){if(t&1&&nh(0,Gt,0,0,"ng-template",19),t&2){let e=VD(4);ch("ngTemplateOutlet",o)("ngTemplateOutletContext",xw(2,Ct,e.inputPasswordDir.nzVisible()));}}function Zt(t,o){if(t&1&&lh(0,"nz-icon",20),t&2){let e=VD(4);ch("nzType",e.inputPasswordDir.nzVisible()?"eye":"eye-invisible");}}function Kt(t,o){if(t&1){let e=LD();_i(0,"span",18),gh("click",function(){Pu(e);let i=VD(3);return Lu(i.inputPasswordDir.toggleVisible())}),bD(1,Qt,1,4,null,19)(2,Zt,1,1,"nz-icon",20),Kc();}if(t&2){let e,n=VD(3);gI(),_D((e=n.inputPasswordIconTmpl())?1:2,e);}}function Xt(t,o){if(t&1&&vw(0),t&2){let e=VD(3);Ph(e.nzSuffix());}}function Yt(t,o){if(t&1&&lh(0,"nz-form-item-feedback-icon",15),t&2){let e=VD(3);ch("status",e.status());}}function Jt(t,o){if(t&1&&(_i(0,"span",11),bD(1,Ut,3,4,"span",12),bD(2,Ht,2,1,"span",13),bD(3,Kt,3,1,"span",14),$D(4,4,null,Xt,1,1),bD(6,Yt,1,1,"nz-form-item-feedback-icon",15),Kc()),t&2){let e=VD(2);gI(),_D(e.nzAllowClear()?1:-1),gI(),_D(e.nzShowCount()?2:-1),gI(),_D(e.inputPasswordDir&&e.inputPasswordDir.nzVisibilityToggle()?3:-1),gI(3),_D(e.hasFeedback()&&e.status()?6:-1);}}function en(t,o){if(t&1&&(bD(0,jt,3,0,"span",10),nh(1,$t,0,0,"ng-template",4),bD(2,Jt,7,4,"span",11)),t&2){let e=VD(),n=zD(10);_D(e.hasPrefix()?0:-1),gI(),ch("ngTemplateOutlet",n),gI(),_D(e.hasSuffix()?2:-1);}}function tn(t,o){t&1&&$D(0,6);}var it=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275dir=XE({type:t,selectors:[["","nzInputAddonBefore",""]]})}return t})(),rt=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275dir=XE({type:t,selectors:[["","nzInputAddonAfter",""]]})}return t})(),ot=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275dir=XE({type:t,selectors:[["","nzInputPrefix",""]]})}return t})(),at=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275dir=XE({type:t,selectors:[["","nzInputSuffix",""]]})}return t})(),lt=(()=>{class t{nzVisibilityToggle=$0(true);nzVisible=U0(false);toggleVisible(){this.nzVisible.update(e=>!e);}static \u0275fac=function(n){return new(n||t)};static \u0275dir=XE({type:t,selectors:[["nz-input-password"]],hostAttrs:[1,"ant-input-password"],inputs:{nzVisibilityToggle:[1,"nzVisibilityToggle"],nzVisible:[1,"nzVisible"]},outputs:{nzVisible:"nzVisibleChange"},exportAs:["nzInputPassword"]})}return t})(),st=(()=>{class t{static ngTemplateContextGuard(e,n){return true}static \u0275fac=function(n){return new(n||t)};static \u0275dir=XE({type:t,selectors:[["","nzInputPasswordIcon",""]]})}return t})(),dt=new A(""),ct=new A(""),nn="ant-input",z=(()=>{class t{elementRef=C(_r);compactSize=C(pn,{optional:true});destroyRef=C(at$1);nzFormStatusService=C(ml,{optional:true});inputWrapper=C(dt,{host:true,optional:true});focusMonitor=C(Ci);hostView=C(ji);inputPasswordDir=C(lt,{host:true,optional:true});inputSearchDir=C(ct,{host:true,optional:true});formField=C(nt,{self:true,optional:true});ngControl=C(lt$1,{self:true,optional:true});nativeValue=qo(this.elementRef.nativeElement.value);value=Hw(()=>this.formField?String(this.formField.state().value()??""):this.nativeValue());nzVariant=$0();nzSize=$0("default");nzStatus=$0("");disabled=$0(false,{transform:Z0});readonly=$0(false,{transform:Z0});controlDisabled=qo(false);finalDisabled=Hw(()=>this.formField?this.formField.state().disabled():this.ngControl?this.controlDisabled():this.disabled());dir=C(Oe).valueSignal;size=Uw(this.nzSize);formSize=C(Bt$1,{optional:true});formVariant=C(pl,{optional:true});status=this.nzFormStatusService?de(this.nzFormStatusService.formStatusChanges.pipe(Se(e=>e.status)),{initialValue:""}):this.nzStatus;hasFeedback=de(this.nzFormStatusService?.formStatusChanges.pipe(Se(e=>e.hasFeedback))??mt,{initialValue:false});classes=Hw(()=>Qr(nn,this.status(),this.hasFeedback()));type=Hw(()=>this.inputPasswordDir?this.inputPasswordDir.nzVisible()?"text":"password":this.inputSearchDir?"search":this.elementRef.nativeElement.getAttribute("type")||"text");focused=qo(false);finalSize=Hw(()=>this.formSize?.()?this.formSize():this.compactSize?this.compactSize():this.size());finalVariant=Hw(()=>this.nzVariant()||this.formVariant?.()||"outlined");feedbackRef=null;disabled$=Me(this.finalDisabled);constructor(){this.destroyRef.onDestroy(()=>{this.focusMonitor.stopMonitoring(this.elementRef);}),this.focusMonitor.monitor(this.elementRef,false).pipe(ue()).subscribe(e=>this.focused.set(!!e)),rd(()=>{this.renderFeedbackIcon();});}ngOnInit(){this.ngControl?.statusChanges?.pipe(Gl(null),ue(this.destroyRef)).subscribe(()=>{this.controlDisabled.set(!!this.ngControl.disabled);}),this.ngControl?.valueChanges?.pipe(Gl(this.ngControl?.control?.value),ue(this.destroyRef)).subscribe(e=>{this.nativeValue.set(e??"");});}onInput(e){this.nativeValue.set(e.target.value);}renderFeedbackIcon(){if(!this.status()||!this.hasFeedback()||this.inputWrapper){this.hostView.clear(),this.feedbackRef=null;return}this.feedbackRef=this.feedbackRef||this.hostView.createComponent(hl),this.feedbackRef.location.nativeElement.classList.add("ant-input-suffix"),this.feedbackRef.setInput("status",this.status());}focus(e){il(this.elementRef.nativeElement,e);}blur(){this.elementRef.nativeElement.blur();}static \u0275fac=function(n){return new(n||t)};static \u0275dir=XE({type:t,selectors:[["input","nz-input",""],["textarea","nz-input",""]],hostAttrs:[1,"ant-input"],hostVars:23,hostBindings:function(n,i){n&1&&gh("input",function(l){return i.onInput(l)}),n&2&&(ah("type",i.type())("disabled",i.finalDisabled()||null)("readonly",i.readonly()||null),cw(i.classes()),Mh("ant-input-disabled",i.finalDisabled())("ant-input-outlined",i.finalVariant()==="outlined")("ant-input-borderless",i.finalVariant()==="borderless")("ant-input-filled",i.finalVariant()==="filled")("ant-input-underlined",i.finalVariant()==="underlined")("ant-input-lg",i.finalSize()==="large")("ant-input-sm",i.finalSize()==="small")("ant-input-rtl",i.dir()==="rtl")("ant-input-focused",i.focused()));},inputs:{nzVariant:[1,"nzVariant"],nzSize:[1,"nzSize"],nzStatus:[1,"nzStatus"],disabled:[1,"disabled"],readonly:[1,"readonly"]},exportAs:["nzInput"],features:[Sw([{provide:fn,useValue:"input"}]),rD([ir])]})}return t})(),rn=(()=>{class t{formBuilder=C(tp);destroyRef=C(at$1);otpInputs;nzLength=6;nzSize="default";disabled=false;nzStatus="";nzFormatter=e=>e;nzMask=null;otpArray;internalValue=[];onChangeCallback;onTouched=()=>{};constructor(){this.createFormArray();}ngOnChanges(e){e.nzLength?.currentValue&&this.createFormArray(),e.disabled&&this.setDisabledState(this.disabled);}onInput(e,n){let i=n.target,r=this.otpInputs.toArray()[e+1];i.value&&r?r.nativeElement.focus():r||this.selectInputBox(e);}onFocus(e){e.target.select();}onKeyDown(e,n){let i=this.otpInputs.toArray()[e-1];n.keyCode===8?(n.preventDefault(),this.internalValue[e]="",this.otpArray.at(e).setValue("",{emitEvent:false}),i&&this.selectInputBox(e-1),this.emitValue()):n.keyCode===37?(n.preventDefault(),this.selectInputBox(e-1)):n.keyCode===39&&(n.preventDefault(),this.selectInputBox(e+1));}writeValue(e){if(!e){this.otpArray.reset();return}let n=e.split("");this.internalValue=n,n.forEach((i,r)=>{let l=this.nzFormatter(i),G=this.nzMask?this.nzMask:l;this.otpArray.at(r).setValue(G,{emitEvent:false});});}registerOnChange(e){this.onChangeCallback=e;}registerOnTouched(e){this.onTouched=e;}setDisabledState(e){e?this.otpArray.disable():this.otpArray.enable();}onPaste(e,n){let i=n.clipboardData?.getData("text")||"";if(!i)return;let r=e;for(let l of i.split(""))if(r<this.nzLength){let G=this.nzFormatter(l);this.internalValue[r]=l;let pt=this.nzMask?this.nzMask:G;this.otpArray.at(r).setValue(pt,{emitEvent:false}),r++;}else break;n.preventDefault(),this.selectInputBox(r),this.emitValue();}createFormArray(){this.otpArray=this.formBuilder.array([]),this.internalValue=new Array(this.nzLength).fill("");for(let e=0;e<this.nzLength;e++){let n=this.formBuilder.nonNullable.control("",[Ai.required]);n.valueChanges.pipe(zl(i=>{let r=this.nzFormatter(i);this.internalValue[e]=r,n.setValue(this.nzMask??r,{emitEvent:false}),this.emitValue();}),ue(this.destroyRef)).subscribe(),this.otpArray.push(n);}}emitValue(){let e=this.internalValue.join("");this.onChangeCallback&&this.onChangeCallback(e);}selectInputBox(e){let n=this.otpInputs.toArray();e<=0&&(e=0),e>=n.length&&(e=n.length-1),n[e].nativeElement.select();}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=QE({type:t,selectors:[["nz-input-otp"]],viewQuery:function(n,i){if(n&1&&Ih(ht,5),n&2){let r;qD(r=WD())&&(i.otpInputs=r);}},hostAttrs:[1,"ant-otp"],inputs:{nzLength:[2,"nzLength","nzLength",Y0],nzSize:"nzSize",disabled:[2,"disabled","disabled",Z0],nzStatus:"nzStatus",nzFormatter:"nzFormatter",nzMask:"nzMask"},exportAs:["nzInputOtp"],features:[Sw([{provide:St$1,useExisting:wo(()=>t),multi:true}]),ly],decls:2,vars:0,consts:[["otpInput",""],["nz-input","","type","text","maxlength","1","size","1",1,"ant-otp-input",3,"nzSize","formControl","nzStatus"],["nz-input","","type","text","maxlength","1","size","1",1,"ant-otp-input",3,"input","focus","keydown","paste","nzSize","formControl","nzStatus"]],template:function(n,i){n&1&&ND(0,gt,2,3,"input",1,MD),n&2&&xD(i.otpArray.controls);},dependencies:[z,np,er,rl,jc,td],encapsulation:2})}return t})(),on=(()=>{class t{inputDir=W0.required(z);inputRef=W0.required(z,{read:_r});nzEnterButton=$0(false);nzLoading=$0(false,{transform:Z0});nzSearch=B0();size=Hw(()=>this.inputDir().nzSize());search(e,n="input"){this.nzLoading()||this.nzSearch.emit({value:this.inputRef().nativeElement.value,event:e,source:n});}onEnter(e){e.target===this.inputRef().nativeElement&&this.search(e);}static \u0275fac=function(n){return new(n||t)};static \u0275dir=XE({type:t,selectors:[["nz-input-search"]],contentQueries:function(n,i,r){n&1&&Eh(r,i.inputDir,z,5)(r,i.inputRef,z,5,_r),n&2&&GD(2);},hostAttrs:[1,"ant-input-search"],hostVars:6,hostBindings:function(n,i){n&1&&gh("keydown.enter",function(l){return i.onEnter(l)}),n&2&&Mh("ant-input-search-large",i.size()==="large")("ant-input-search-small",i.size()==="small")("ant-input-search-with-button",i.nzEnterButton()!==false);},inputs:{nzEnterButton:[1,"nzEnterButton"],nzLoading:[1,"nzLoading"]},outputs:{nzSearch:"nzSearch"},exportAs:["nzInputSearch"],features:[Sw([{provide:ct,useExisting:wo(()=>t)}])]})}return t})(),ut=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275dir=XE({type:t,selectors:[["","nzInputSearchEnterButton",""]]})}return t})(),an=(()=>{class t{focusMonitor=C(Ci);inputPasswordDir=C(lt,{self:true,optional:true});inputSearchDir=C(on,{self:true,optional:true});inputRef=W0.required(z,{read:_r});inputDir=W0.required(z);prefix=W0(ot);suffix=W0(at);addonBefore=W0(it);addonAfter=W0(rt);inputPasswordIconTmpl=W0(st,{read:Er});inputSearchEnterButton=W0(ut);nzAllowClear=$0(false,{transform:Z0});nzPrefix=$0();nzSuffix=$0();nzAddonBefore=$0();nzAddonAfter=$0();nzShowCount=$0(false,{transform:Z0});nzCount=$0();nzClear=B0();size=Hw(()=>this.inputDir().nzSize());variant=Hw(()=>this.inputDir().nzVariant());disabled=Hw(()=>this.inputDir().finalDisabled());readOnly=Hw(()=>this.inputDir().readonly());status=Hw(()=>this.inputDir().status());hasFeedback=Hw(()=>this.inputDir().hasFeedback());hasPrefix=Hw(()=>!!this.nzPrefix()||!!this.prefix());hasSuffix=Hw(()=>!!this.nzSuffix()||!!this.suffix()||this.nzAllowClear()||this.hasFeedback()||this.nzShowCount()||this.inputPasswordDir);hasAffix=Hw(()=>this.hasPrefix()||this.hasSuffix());hasAddonBefore=Hw(()=>!!this.nzAddonBefore()||!!this.addonBefore());hasAddonAfter=Hw(()=>!!this.nzAddonAfter()||!!this.addonAfter()||!!this.inputSearchDir);hasAddon=Hw(()=>this.hasAddonBefore()||this.hasAddonAfter());compactSize=C(pn,{optional:true});dir=C(Oe).valueSignal;focused=qo(false);isTextarea=Hw(()=>this.inputRef().nativeElement instanceof HTMLTextAreaElement);finalSize=Hw(()=>this.compactSize?this.compactSize():this.size());class=Hw(()=>this.hasAddon()?this.groupWrapperClass():this.hasAffix()?this.affixWrapperClass():null);affixWrapperClass=Hw(()=>r$1(r$1({"ant-input-affix-wrapper":true,"ant-input-affix-wrapper-lg":this.finalSize()==="large","ant-input-affix-wrapper-sm":this.finalSize()==="small","ant-input-affix-wrapper-disabled":this.disabled(),"ant-input-affix-wrapper-readonly":this.readOnly(),"ant-input-affix-wrapper-focused":this.focused(),"ant-input-affix-wrapper-rtl":this.dir()==="rtl"},Qr("ant-input-affix-wrapper",this.status(),this.hasFeedback())),tl("ant-input-affix-wrapper",this.variant())));groupWrapperClass=Hw(()=>r$1(r$1({"ant-input-group-wrapper":true,"ant-input-group-wrapper-sm":this.finalSize()==="small","ant-input-group-wrapper-lg":this.finalSize()==="large","ant-input-group-wrapper-rtl":this.dir()==="rtl"},Qr("ant-input-group-wrapper",this.status(),this.hasFeedback())),tl("ant-input-group-wrapper",this.variant())));inputValue=de(Me(this.inputDir).pipe(Ml(e=>{let n=e.ngControl;return n?(n.valueChanges??mt).pipe(Gl(n.value)):mt})));formattedValue=Hw(()=>{let e=this.nzCount(),n=this.inputValue(),i=e?.max??0,r=Nr(n)?String(n):"",l=r;return e?.exceedFormatter&&(l=e.exceedFormatter(r,{max:i})),l});computedCount=Hw(()=>{let e=this.nzCount(),n=this.formattedValue(),i=n.length;return e?.strategy&&(i=e.strategy(n)),i});dataCount=Hw(()=>{let e=this.nzCount(),n=this.computedCount(),i=e?.max;return `${n}${i?`/${i}`:""}`});isOutOfRange=Hw(()=>{let n=this.nzCount()?.max;return Zr(n)?this.computedCount()>n:false});constructor(){let e=C(at$1);Kf(()=>{let n=this.inputRef();this.focusMonitor.monitor(n).pipe(ue(e)).subscribe(i=>{this.focused.set(!!i);}),e.onDestroy(()=>{this.focusMonitor.stopMonitoring(n);});}),rd(()=>{if(this.nzCount()){let n=this.inputValue(),i=this.formattedValue();Nr(n)&&i!==n&&this.inputDir().ngControl?.control?.setValue(i);}});}clear(){this.inputDir().ngControl?.control?.setValue(""),this.nzClear.emit();}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=QE({type:t,selectors:[["nz-input-wrapper"],["nz-input-password"],["nz-input-search"]],contentQueries:function(n,i,r){n&1&&Eh(r,i.inputRef,z,5,_r)(r,i.inputDir,z,5)(r,i.prefix,ot,5)(r,i.suffix,at,5)(r,i.addonBefore,it,5)(r,i.addonAfter,rt,5)(r,i.inputPasswordIconTmpl,st,5,Er)(r,i.inputSearchEnterButton,ut,5),n&2&&GD(8);},hostVars:8,hostBindings:function(n,i){n&2&&(cw(i.class()),Mh("ant-input-disabled",i.disabled())("ant-input-out-of-range",i.nzShowCount()&&i.isOutOfRange())("ant-input-affix-wrapper-textarea-with-clear-btn",i.nzAllowClear()&&i.isTextarea()));},inputs:{nzAllowClear:[1,"nzAllowClear"],nzPrefix:[1,"nzPrefix"],nzSuffix:[1,"nzSuffix"],nzAddonBefore:[1,"nzAddonBefore"],nzAddonAfter:[1,"nzAddonAfter"],nzShowCount:[1,"nzShowCount"],nzCount:[1,"nzCount"]},outputs:{nzClear:"nzClear"},exportAs:["nzInputWrapper"],features:[Sw([{provide:fn,useValue:"input"},{provide:dt,useExisting:wo(()=>t)}]),rD([ir])],ngContentSelectors:vt,decls:11,vars:1,consts:[["inputWithAddonInner",""],["inputWithAffix",""],["inputWithAffixInner",""],["input",""],[3,"ngTemplateOutlet"],[1,"ant-input-wrapper","ant-input-group"],[1,"ant-input-group-addon"],["nz-button","","type","button",1,"ant-input-search-button",3,"nzType","nzSize","nzLoading"],["nz-button","","type","button",1,"ant-input-search-button",3,"click","nzType","nzSize","nzLoading"],["nzType","search","nzTheme","outline"],[1,"ant-input-prefix"],[1,"ant-input-suffix"],["role","button","tabindex","-1",1,"ant-input-clear-icon",3,"ant-input-clear-icon-has-suffix","ant-input-clear-icon-hidden"],[1,"ant-input-show-count-suffix"],["role","button","tabindex","-1",1,"ant-input-password-icon"],[3,"status"],["role","button","tabindex","-1",1,"ant-input-clear-icon",3,"click"],["nzType","close-circle","nzTheme","fill"],["role","button","tabindex","-1",1,"ant-input-password-icon",3,"click"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],["nzTheme","outline",3,"nzType"]],template:function(n,i){n&1&&(BD(_t),bD(0,bt,1,1,null,4)(1,Nt,1,1,null,4)(2,xt,1,1,null,4),nh(3,Ot,5,3,"ng-template",null,0,Lw)(5,Wt,2,3,"ng-template",null,1,Lw)(7,en,3,3,"ng-template",null,2,Lw)(9,tn,1,0,"ng-template",null,3,Lw)),n&2&&_D(i.hasAddon()?0:i.hasAffix()?1:2);},dependencies:[Th,xh,pf,bd,sp,fp,hl,w5],encapsulation:2})}return t})();var ai=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=YE({type:t});static \u0275inj=uu({imports:[an,rn]})}return t})();export{ai as a,at as b,it as i,ot as o,rt as r,z};
@@ -0,0 +1 @@
1
+ import {aA as YE,aB as uu,bz as hn,aC as pT,C,aG as z0,aJ as Oe$1,aI as hT,bA as zt,Q as QE,aN as st,aO as Ee$1,bj as w5,aQ as Z0,bk as BD,n as bD,j as _i,l as Kc,B as _D,w as gI,bB as sw,a8 as Mh,bC as vh,aV as qD,aW as WD,aX as Yl,bD as Wr,r as r$1,aP as ly,E as VD,aY as nh,x as ch,p as lh,aa as Nw,bx as $D,N as ND,aq as MD,D as xD,bE as XE,bF as uh,ar as _h,aZ as el,k as vw,a_ as tl,P as Ph,bG as rh,aU as Ih,bH as Er,S as SD}from'./main-2ZW45HAE.js';function Xe(e,a,t){let n=new Blob([a],{type:t}),i=URL.createObjectURL(n),u=document.createElement("a");u.href=i,u.download=e,document.body.appendChild(u),u.click(),u.remove(),URL.revokeObjectURL(i);}var Ce=["*"];function fe(e,a){if(e&1&&(_i(0,"div",0),lh(1,"nz-skeleton-element",4),Kc()),e&2){let t=VD(2);gI(),ch("nzSize",t.avatar.size||"default")("nzShape",t.avatar.shape||"circle");}}function _e(e,a){if(e&1&&lh(0,"h3",5),e&2){let t=VD(2);_h("width",t.toCSSUnit(t.title.width));}}function ve(e,a){if(e&1&&lh(0,"li"),e&2){let t=a.$index,n=VD(3);_h("width",n.toCSSUnit(n.widthList[t]));}}function ge(e,a){if(e&1&&(_i(0,"ul",3),ND(1,ve,1,2,"li",6,SD),Kc()),e&2){let t=VD(2);gI(),xD(t.rowsList);}}function he(e,a){if(e&1&&(bD(0,fe,2,2,"div",0),_i(1,"div",1),bD(2,_e,1,2,"h3",2),bD(3,ge,3,0,"ul",3),Kc()),e&2){let t=VD();_D(t.nzAvatar?0:-1),gI(2),_D(t.nzTitle?2:-1),gI(),_D(t.nzParagraph?3:-1);}}function Se(e,a){e&1&&$D(0);}var ye=(()=>{class e{nzActive=false;nzType;nzBlock=false;static \u0275fac=function(n){return new(n||e)};static \u0275dir=XE({type:e,selectors:[["nz-skeleton-element"]],hostAttrs:[1,"ant-skeleton","ant-skeleton-element"],hostVars:4,hostBindings:function(n,i){n&2&&Mh("ant-skeleton-active",i.nzActive)("ant-skeleton-block",i.nzBlock);},inputs:{nzActive:[2,"nzActive","nzActive",Z0],nzType:"nzType",nzBlock:[2,"nzBlock","nzBlock",Z0]}})}return e})();var Te=(()=>{class e{nzShape="circle";nzSize="default";styleMap={};ngOnChanges(t){if(t.nzSize&&typeof this.nzSize=="number"){let n=`${this.nzSize}px`;this.styleMap={width:n,height:n,"line-height":n};}else this.styleMap={};}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=QE({type:e,selectors:[["nz-skeleton-element","nzType","avatar"]],inputs:{nzShape:"nzShape",nzSize:"nzSize"},features:[ly],decls:1,vars:10,consts:[[1,"ant-skeleton-avatar"]],template:function(n,i){n&1&&uh(0,"span",0),n&2&&(sw(i.styleMap),Mh("ant-skeleton-avatar-square",i.nzShape==="square")("ant-skeleton-avatar-circle",i.nzShape==="circle")("ant-skeleton-avatar-lg",i.nzSize==="large")("ant-skeleton-avatar-sm",i.nzSize==="small"));},encapsulation:2})}return e})();var ce=(()=>{class e{cdr=C(z0);nzActive=false;nzLoading=true;nzRound=false;nzTitle=true;nzAvatar=false;nzParagraph=true;title;avatar;paragraph;rowsList=[];widthList=[];toCSSUnit(t=""){return Wr(t)}getTitleProps(){let t=!!this.nzAvatar,n=!!this.nzParagraph,i="";return !t&&n?i="38%":t&&n&&(i="50%"),r$1({width:i},this.getProps(this.nzTitle))}getAvatarProps(){let t=this.nzTitle&&!this.nzParagraph?"square":"circle";return r$1({shape:t,size:"large"},this.getProps(this.nzAvatar))}getParagraphProps(){let t=!!this.nzAvatar,n=!!this.nzTitle,i={};return (!t||!n)&&(i.width="61%"),!t&&n?i.rows=3:i.rows=2,r$1(r$1({},i),this.getProps(this.nzParagraph))}getProps(t){return t&&typeof t=="object"?t:{}}getWidthList(){let{width:t,rows:n}=this.paragraph,i=[];return t&&Array.isArray(t)?i=t:t&&!Array.isArray(t)&&(i=[],i[n-1]=t),i}updateProps(){this.title=this.getTitleProps(),this.avatar=this.getAvatarProps(),this.paragraph=this.getParagraphProps(),this.rowsList=[...Array(this.paragraph.rows)],this.widthList=this.getWidthList(),this.cdr.markForCheck();}ngOnInit(){this.updateProps();}ngOnChanges(t){(t.nzTitle||t.nzAvatar||t.nzParagraph)&&this.updateProps();}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=QE({type:e,selectors:[["nz-skeleton"]],hostAttrs:[1,"ant-skeleton"],hostVars:6,hostBindings:function(n,i){n&2&&Mh("ant-skeleton-with-avatar",!!i.nzAvatar)("ant-skeleton-active",i.nzActive)("ant-skeleton-round",i.nzRound);},inputs:{nzActive:[2,"nzActive","nzActive",Z0],nzLoading:[2,"nzLoading","nzLoading",Z0],nzRound:[2,"nzRound","nzRound",Z0],nzTitle:"nzTitle",nzAvatar:"nzAvatar",nzParagraph:"nzParagraph"},exportAs:["nzSkeleton"],features:[ly],ngContentSelectors:Ce,decls:2,vars:1,consts:[[1,"ant-skeleton-header"],[1,"ant-skeleton-content"],[1,"ant-skeleton-title",3,"width"],[1,"ant-skeleton-paragraph"],["nzType","avatar",3,"nzSize","nzShape"],[1,"ant-skeleton-title"],[3,"width"]],template:function(n,i){n&1&&(BD(),bD(0,he,4,3)(1,Se,1,0)),n&2&&_D(i.nzLoading?0:1);},dependencies:[ye,Te],encapsulation:2})}return e})(),pe=(()=>{class e{static \u0275fac=function(n){return new(n||e)};static \u0275mod=YE({type:e});static \u0275inj=uu({})}return e})();function Ne(e,a){}function ke(e,a){if(e&1&&(_i(0,"div",0),nh(1,Ne,0,0,"ng-template",2),Kc()),e&2){let t=VD();gI(),ch("ngTemplateOutlet",t.nzAvatar);}}function be(e,a){if(e&1&&(el(0),vw(1),tl()),e&2){let t=VD(3);gI(),Ph(t.nzTitle);}}function Me(e,a){if(e&1&&(_i(0,"div",3),nh(1,be,2,1,"ng-container",5),Kc()),e&2){let t=VD(2);gI(),ch("nzStringTemplateOutlet",t.nzTitle);}}function Ae(e,a){if(e&1&&(el(0),vw(1),tl()),e&2){let t=VD(3);gI(),Ph(t.nzDescription);}}function De(e,a){if(e&1&&(_i(0,"div",4),nh(1,Ae,2,1,"ng-container",5),Kc()),e&2){let t=VD(2);gI(),ch("nzStringTemplateOutlet",t.nzDescription);}}function we(e,a){if(e&1&&(_i(0,"div",1),bD(1,Me,2,1,"div",3),bD(2,De,2,1,"div",4),Kc()),e&2){let t=VD();gI(),_D(t.nzTitle?1:-1),gI(),_D(t.nzDescription?2:-1);}}var me=["*"];function Ee(e,a){e&1&&$D(0);}var Pe=()=>({rows:4});function Oe(e,a){if(e&1&&(el(0),vw(1),tl()),e&2){let t=VD(3);gI(),Ph(t.nzTitle);}}function Be(e,a){if(e&1&&(_i(0,"div",6),nh(1,Oe,2,1,"ng-container",9),Kc()),e&2){let t=VD(2);gI(),ch("nzStringTemplateOutlet",t.nzTitle);}}function Le(e,a){if(e&1&&(el(0),vw(1),tl()),e&2){let t=VD(3);gI(),Ph(t.nzExtra);}}function Fe(e,a){if(e&1&&(_i(0,"div",7),nh(1,Le,2,1,"ng-container",9),Kc()),e&2){let t=VD(2);gI(),ch("nzStringTemplateOutlet",t.nzExtra);}}function He(e,a){}function Ie(e,a){if(e&1&&nh(0,He,0,0,"ng-template",8),e&2){let t=VD(2);ch("ngTemplateOutlet",t.listOfNzCardTabComponent.template);}}function je(e,a){if(e&1&&(_i(0,"div",0)(1,"div",5),bD(2,Be,2,1,"div",6),bD(3,Fe,2,1,"div",7),Kc(),bD(4,Ie,1,1,null,8),Kc()),e&2){let t=VD();gI(2),_D(t.nzTitle?2:-1),gI(),_D(t.nzExtra?3:-1),gI(),_D(t.listOfNzCardTabComponent?4:-1);}}function qe(e,a){}function Re(e,a){if(e&1&&(_i(0,"div",1),nh(1,qe,0,0,"ng-template",8),Kc()),e&2){let t=VD();gI(),ch("ngTemplateOutlet",t.nzCover);}}function Ge(e,a){e&1&&lh(0,"nz-skeleton",3),e&2&&ch("nzActive",true)("nzTitle",false)("nzParagraph",Nw(3,Pe));}function Qe(e,a){e&1&&$D(0);}function Ue(e,a){}function Ve(e,a){if(e&1&&(_i(0,"li")(1,"span"),nh(2,Ue,0,0,"ng-template",8),Kc()()),e&2){let t=a.$implicit,n=a.$count;_h("width",100/n,"%"),gI(2),ch("ngTemplateOutlet",t);}}function $e(e,a){if(e&1&&(_i(0,"ul",4),ND(1,Ve,3,3,"li",10,MD),Kc()),e&2){let t=VD();gI(),xD(t.nzActions);}}var We=(()=>{class e{nzHoverable=true;static \u0275fac=function(n){return new(n||e)};static \u0275dir=XE({type:e,selectors:[["","nz-card-grid",""]],hostAttrs:[1,"ant-card-grid"],hostVars:2,hostBindings:function(n,i){n&2&&Mh("ant-card-hoverable",i.nzHoverable);},inputs:{nzHoverable:[2,"nzHoverable","nzHoverable",Z0]},exportAs:["nzCardGrid"]})}return e})(),Ze=(()=>{class e{nzTitle=null;nzDescription=null;nzAvatar=null;static \u0275fac=function(n){return new(n||e)};static \u0275cmp=QE({type:e,selectors:[["nz-card-meta"]],hostAttrs:[1,"ant-card-meta"],inputs:{nzTitle:"nzTitle",nzDescription:"nzDescription",nzAvatar:"nzAvatar"},exportAs:["nzCardMeta"],decls:2,vars:2,consts:[[1,"ant-card-meta-avatar"],[1,"ant-card-meta-detail"],[3,"ngTemplateOutlet"],[1,"ant-card-meta-title"],[1,"ant-card-meta-description"],[4,"nzStringTemplateOutlet"]],template:function(n,i){n&1&&(bD(0,ke,2,1,"div",0),bD(1,we,3,2,"div",1)),n&2&&(_D(i.nzAvatar?0:-1),gI(),_D(i.nzTitle||i.nzDescription?1:-1));},dependencies:[w5,st,Ee$1],encapsulation:2})}return e})(),Je=(()=>{class e{template;static \u0275fac=function(n){return new(n||e)};static \u0275cmp=QE({type:e,selectors:[["nz-card-tab"]],viewQuery:function(n,i){if(n&1&&Ih(Er,7),n&2){let u;qD(u=WD())&&(i.template=u.first);}},exportAs:["nzCardTab"],ngContentSelectors:me,decls:1,vars:0,template:function(n,i){n&1&&(BD(),rh(0,Ee,1,0,"ng-template"));},encapsulation:2})}return e})(),ze="card",Ke=(()=>{let e,a=[],t=[],n,i=[],u=[],W,Z=[],J=[];return class ${static{let f=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;e=[Yl()],n=[Yl()],W=[Yl()],pT(null,null,e,{kind:"field",name:"nzBordered",static:false,private:false,access:{has:r=>"nzBordered"in r,get:r=>r.nzBordered,set:(r,l)=>{r.nzBordered=l;}},metadata:f},a,t),pT(null,null,n,{kind:"field",name:"nzHoverable",static:false,private:false,access:{has:r=>"nzHoverable"in r,get:r=>r.nzHoverable,set:(r,l)=>{r.nzHoverable=l;}},metadata:f},i,u),pT(null,null,W,{kind:"field",name:"nzSize",static:false,private:false,access:{has:r=>"nzSize"in r,get:r=>r.nzSize,set:(r,l)=>{r.nzSize=l;}},metadata:f},Z,J),f&&Object.defineProperty(this,Symbol.metadata,{enumerable:true,configurable:true,writable:true,value:f});}cdr=C(z0);dir=C(Oe$1).valueSignal;_nzModuleName=ze;nzBordered=hT(this,a,true);nzLoading=(hT(this,t),false);nzHoverable=hT(this,i,false);nzBodyStyle=(hT(this,u),null);nzCover;nzActions=[];nzType=null;nzSize=hT(this,Z,"default");nzTitle=hT(this,J);nzExtra;listOfNzCardTabComponent;listOfNzCardGridDirective;constructor(){zt(ze,()=>this.cdr.markForCheck());}static \u0275fac=function(r){return new(r||$)};static \u0275cmp=QE({type:$,selectors:[["nz-card"]],contentQueries:function(r,l,K){if(r&1&&vh(K,Je,5)(K,We,4),r&2){let w;qD(w=WD())&&(l.listOfNzCardTabComponent=w.first),qD(w=WD())&&(l.listOfNzCardGridDirective=w);}},hostAttrs:[1,"ant-card"],hostVars:16,hostBindings:function(r,l){r&2&&Mh("ant-card-loading",l.nzLoading)("ant-card-bordered",l.nzBordered)("ant-card-hoverable",l.nzHoverable)("ant-card-small",l.nzSize==="small")("ant-card-contain-grid",l.listOfNzCardGridDirective&&l.listOfNzCardGridDirective.length)("ant-card-type-inner",l.nzType==="inner")("ant-card-contain-tabs",!!l.listOfNzCardTabComponent)("ant-card-rtl",l.dir()==="rtl");},inputs:{nzBordered:[2,"nzBordered","nzBordered",Z0],nzLoading:[2,"nzLoading","nzLoading",Z0],nzHoverable:[2,"nzHoverable","nzHoverable",Z0],nzBodyStyle:"nzBodyStyle",nzCover:"nzCover",nzActions:"nzActions",nzType:"nzType",nzSize:"nzSize",nzTitle:"nzTitle",nzExtra:"nzExtra"},exportAs:["nzCard"],ngContentSelectors:me,decls:6,vars:6,consts:[[1,"ant-card-head"],[1,"ant-card-cover"],[1,"ant-card-body"],[3,"nzActive","nzTitle","nzParagraph"],[1,"ant-card-actions"],[1,"ant-card-head-wrapper"],[1,"ant-card-head-title"],[1,"ant-card-extra"],[3,"ngTemplateOutlet"],[4,"nzStringTemplateOutlet"],[3,"width"]],template:function(r,l){r&1&&(BD(),bD(0,je,5,3,"div",0),bD(1,Re,2,1,"div",1),_i(2,"div",2),bD(3,Ge,1,4,"nz-skeleton",3)(4,Qe,1,0),Kc(),bD(5,$e,3,0,"ul",4)),r&2&&(_D(l.nzTitle||l.nzExtra||l.listOfNzCardTabComponent?0:-1),gI(),_D(l.nzCover?1:-1),gI(),sw(l.nzBodyStyle),gI(),_D(l.nzLoading?3:4),gI(2),_D(l.nzActions.length?5:-1));},dependencies:[st,Ee$1,w5,pe,ce],encapsulation:2})}})(),bt=(()=>{class e{static \u0275fac=function(n){return new(n||e)};static \u0275mod=YE({type:e});static \u0275inj=uu({imports:[Ke,Ze,hn]})}return e})();export{Ke as K,Xe as X,bt as b};
@@ -0,0 +1 @@
1
+ import {S as St}from'./chunk-Cq09TrKP.js';import'./chunk-CXGgR5M1.js';import'./chunk-B_L2A3hm.js';import'./chunk-37yFTUcY.js';import {Q as QE,p as lh}from'./main-2ZW45HAE.js';import'./chunk-C4Ee3umI.js';import'./chunk-yxqIQom4.js';import'./chunk-DphMF2VB.js';var c=(()=>{class e{static{this.\u0275fac=function(t){return new(t||e)};}static{this.\u0275cmp=QE({type:e,selectors:[["app-context-files-manage"]],decls:1,vars:0,template:function(t,a){t&1&&lh(0,"app-context-file-list");},dependencies:[St],encapsulation:2});}}return e})();export{c as ContextFilesManageComponent};
@@ -0,0 +1 @@
1
+ import {a as ae,l as le}from'./chunk-DZhQ2iEt.js';import {H as He}from'./chunk-BuPc66MS.js';import {a as ai,z}from'./chunk-B_L2A3hm.js';import {C,$ as $$1,aj as jn,T as J1,V as Ve,s,r as r$1,c as bi,i as ie,am as Le,an as Wn,q as qo,H as Hw,Q as QE,d as $8,Z as pf,a0 as bd,a1 as sp,a2 as fp,K as Kt,j as _i,n as bD,m as gh,k as vw,R as Rw,l as Kc,w as gI,B as _D,x as ch,z as nl,O as Ow,L as LD,E as VD,P as Ph,J as Pu,M as Lu}from'./main-2ZW45HAE.js';import {b}from'./chunk-CM8oLO7n.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=LD();_i(0,"label",1)(1,"span"),vw(2),Rw(3,"transloco"),Kc(),_i(4,"input",7),Rw(5,"transloco"),gh("input",function(o){Pu(t);let n=VD();return Lu(n.setSubjectId(o))}),Kc()();}if(e&2){let t=VD();gI(2),Ph(Ow(3,3,"jobs.start.subjectId")),gI(2),ch("value",t.subjectId())("placeholder",Ow(5,5,"jobs.start.subjectIdPlaceholder"));}}function it(e,a){if(e&1){let t=LD();_i(0,"app-workflow-input-form",8),gh("valuesChange",function(o){Pu(t);let n=VD();return Lu(n.inputValues.set(o))}),Kc();}if(e&2){let t=VD();ch("fields",t.requiredFields())("values",t.inputValues());}}function ot(e,a){if(e&1&&(_i(0,"p",3),vw(1),Kc()),e&2){let t=VD();gI(),Ph(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=Hw(()=>A(this.data.workflow,this.context())),this.requiredFields=Hw(()=>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=QE({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),bD(1,et,6,7,"label",1),bD(2,it,1,2,"app-workflow-input-form",2),bD(3,ot,2,1,"p",3),_i(4,"div",4)(5,"button",5),gh("click",function(){return o.cancel()}),vw(6),Rw(7,"transloco"),Kc(),_i(8,"button",6),gh("click",function(){return o.start()}),vw(9),Rw(10,"transloco"),Kc()()()),i&2&&(gI(),_D(o.showSubjectPicker()?1:-1),gI(),_D(o.requiredFields().length>0?2:-1),gI(),_D(o.actionError()?3:-1),gI(2),ch("disabled",o.starting()),gI(),nl(" ",Ow(7,8,"common.cancel")," "),gI(2),ch("nzLoading",o.starting())("disabled",o.starting()),gI(),nl(" ",Ow(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};
@@ -0,0 +1 @@
1
+ import {w as we}from'./chunk-7MZQgksi.js';import {_ as _n}from'./chunk-37yFTUcY.js';import {C,at as u,$,T as J1,V as Ve,b as at,q as qo,H as Hw,u as ue,ac as Ng,c as bi,Q as QE,d as $8,v as v3,Z as pf,a0 as bd,a1 as sp,K as Kt,j as _i,k as vw,R as Rw,l as Kc,n as bD,w as gI,P as Ph,O as Ow,z as nl,B as _D,E as VD,L as LD,m as gh,x as ch,J as Pu,M as Lu}from'./main-2ZW45HAE.js';import {b}from'./chunk-CM8oLO7n.js';import'./chunk-yxqIQom4.js';import'./chunk-DphMF2VB.js';function q(i,b){i&1&&(_i(0,"p",3),vw(1),Rw(2,"transloco"),Kc()),i&2&&(gI(),Ph(Ow(2,1,"common.loading")));}function G(i,b){if(i&1&&(_i(0,"p",4),vw(1),Kc()),i&2){let t=VD();gI(),Ph(t.loadError());}}function H(i,b){if(i&1&&(_i(0,"p",5),vw(1),Kc()),i&2){let t=VD(2);gI(),Ph(t.actionError());}}function K(i,b){i&1&&(_i(0,"section",6)(1,"p"),vw(2),Rw(3,"transloco"),Kc(),_i(4,"a",8),vw(5),Rw(6,"transloco"),Kc()()),i&2&&(gI(2),Ph(Ow(3,2,"shortcuts.list.emptyState")),gI(3),nl(" ",Ow(6,4,"shortcuts.list.emptyCreateButton")," "));}function Q(i,b){if(i&1){let t=LD();_i(0,"app-runnable-items-table",9),gh("rowAction",function(e){Pu(t);let c=VD(2);return Lu(c.onRowAction(e))}),Kc();}if(i&2){let t=VD(2);ch("rows",t.rows())("selectable",false)("showRowAction",true);}}function X(i,b){if(i&1&&(bD(0,H,2,1,"p",5),bD(1,K,7,6,"section",6)(2,Q,1,3,"app-runnable-items-table",7)),i&2){let t=VD();_D(t.actionError()?0:-1),gI(),_D(t.shortcuts().length===0?1:2);}}var ht=(()=>{class i{constructor(){this.shortcutsApi=C(u),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=Hw(()=>{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(W=>W.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.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=QE({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"),vw(3),Rw(4,"transloco"),Kc(),_i(5,"a",2),vw(6),Rw(7,"transloco"),Kc()(),bD(8,q,3,3,"p",3)(9,G,2,1,"p",4)(10,X,3,2),Kc()),o&2&&(gI(3),Ph(Ow(4,3,"shortcuts.list.title")),gI(3),nl(" ",Ow(7,5,"shortcuts.list.createButton")," "),gI(2),_D(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{ht as ShortcutListComponent};
@@ -0,0 +1 @@
1
+ import {b}from'./chunk-CM8oLO7n.js';import {R as Rt}from'./chunk-Cx2n09Ng.js';import'./chunk-DMAf3Qir.js';import'./chunk-C4Ee3umI.js';import {L as Lt,u as ut,D as Di,m as mn}from'./chunk-yxqIQom4.js';import'./chunk-DphMF2VB.js';import {C,$,a as C1,V as Ve,b as at,q as qo,H as Hw,u as ue$1,s,r as r$1,c as bi,Q as QE,d as $8,e as al,f as rl,g as $i,v as v3,h as ex,F as Fm,A as Am,K as Kt,j as _i,k as vw,R as Rw,l as Kc,m as gh,o as oE,n as bD,p as lh,N as ND,S as SD,w as gI,P as Ph,O as Ow,x as ch,y as sE,z as nl,B as _D,D as xD,E as VD,G as ah,I as xw,L as LD,J as Pu,M as Lu}from'./main-2ZW45HAE.js';import'./chunk-D_DUAV49.js';var re=t=>["/jobs",t],oe=(t,a)=>a.id,ae=(t,a)=>a.jobId+a.stepExecutionId;function le(t,a){t&1&&(_i(0,"p",5),vw(1),Rw(2,"transloco"),Kc()),t&2&&(gI(),Ph(Ow(2,1,"common.loading")));}function de(t,a){if(t&1&&(_i(0,"p",6),vw(1),Kc()),t&2){let e=VD();gI(),Ph(e.queuedError());}}function pe(t,a){t&1&&(_i(0,"p",7),vw(1),Rw(2,"transloco"),Kc()),t&2&&(gI(),nl(" ",Ow(2,1,"jobs.list.queuedEmpty")," "));}function ue(t,a){if(t&1&&(_i(0,"tr")(1,"td")(2,"a",25),vw(3),Kc()(),_i(4,"td",26),vw(5),Kc(),_i(6,"td",27),vw(7),Kc()()),t&2){let e=a.$implicit,s=VD(2);ah("data-testid","queued-row-"+e.jobId),gI(2),ch("routerLink",xw(6,re,e.jobId)),ah("data-testid","queued-job-link-"+e.jobId),gI(),nl(" ",e.jobId," "),gI(2),Ph(e.agentInstanceId),gI(2),Ph(s.queuedWaitLabel(e.enqueuedAt));}}function ce(t,a){if(t&1&&(_i(0,"table",8)(1,"thead")(2,"tr")(3,"th"),vw(4),Rw(5,"transloco"),Kc(),_i(6,"th"),vw(7),Rw(8,"transloco"),Kc(),_i(9,"th"),vw(10),Rw(11,"transloco"),Kc()()(),_i(12,"tbody"),ND(13,ue,8,8,"tr",null,ae),Kc()()),t&2){let e=VD();gI(4),Ph(Ow(5,3,"jobs.table.column.id")),gI(3),Ph(Ow(8,5,"jobs.list.queuedAgent")),gI(3),Ph(Ow(11,7,"jobs.list.queuedWait")),gI(3),xD(e.queuedSteps());}}function he(t,a){if(t&1&&lh(0,"nz-option",14),t&2){let e=a.$implicit;ch("nzValue",e.id)("nzLabel",e.name+" ("+e.id+")");}}function me(t,a){t&1&&(_i(0,"p",15),vw(1),Rw(2,"transloco"),Kc()),t&2&&(gI(),Ph(Ow(2,1,"common.loading")));}function ge(t,a){if(t&1&&(_i(0,"p",16),vw(1),Kc()),t&2){let e=VD();gI(),Ph(e.runningError());}}function fe(t,a){t&1&&(_i(0,"p",17),vw(1),Rw(2,"transloco"),Kc()),t&2&&(gI(),nl(" ",Ow(2,1,"jobs.list.runningEmpty")," "));}function be(t,a){if(t&1&&lh(0,"app-job-status-table",18),t&2){let e=VD();ch("jobs",e.runningJobs());}}function _e(t,a){if(t&1&&(lh(0,"nz-option",14),Rw(1,"transloco"),Rw(2,"transloco")),t&2){let e=a.$implicit,s=VD();ch("nzValue",e)("nzLabel",e==="all"?Ow(1,2,"jobs.list.filterAll"):Ow(2,4,s.statusKey(e)));}}function ye(t,a){if(t&1&&lh(0,"nz-option",14),t&2){let e=a.$implicit;ch("nzValue",e.id)("nzLabel",e.name+" ("+e.id+")");}}function Ce(t,a){t&1&&(_i(0,"p",22),vw(1),Rw(2,"transloco"),Kc()),t&2&&(gI(),Ph(Ow(2,1,"common.loading")));}function xe(t,a){if(t&1&&(_i(0,"p",23),vw(1),Kc()),t&2){let e=VD();gI(),Ph(e.historyError());}}function Me(t,a){t&1&&(_i(0,"p",24),vw(1),Rw(2,"transloco"),Kc()),t&2&&(gI(),nl(" ",Ow(2,1,"jobs.list.historyEmpty")," "));}function ve(t,a){if(t&1){let e=LD();_i(0,"nz-pagination",29),gh("nzPageIndexChange",function(o){Pu(e);let m=VD(2);return Lu(m.setHistoryPage(o))}),Kc();}if(t&2){let e=VD(2);ch("nzPageIndex",e.historyPageIndex())("nzPageSize",e.pageSize)("nzTotal",e.historyTotal());}}function Ie(t,a){if(t&1&&(lh(0,"app-job-status-table",18),bD(1,ve,1,3,"nz-pagination",28)),t&2){let e=VD();ch("jobs",e.historyJobs()),gI(),_D(e.historyTotal()>e.pageSize||e.historyPageIndex()>1?1:-1);}}var we=20,Se=50,Ee=3e3,se=["completed","failed","cancelled"],Qe=(()=>{class t{constructor(){this.jobsApi=C($),this.workflowsApi=C(b),this.route=C(C1),this.transloco=C(Ve),this.destroyRef=C(at),this.pageSize=we,this.historyStatusOptions=["all",...se],this.runningJobs=qo([]),this.queuedSteps=qo([]),this.historyJobs=qo([]),this.workflows=qo([]),this.runningLoading=qo(true),this.queuedLoading=qo(true),this.historyLoading=qo(true),this.runningError=qo(null),this.queuedError=qo(null),this.historyError=qo(null),this.runningWorkflowId=qo(""),this.historyWorkflowId=qo(""),this.historyStatusFilter=qo("all"),this.showChildJobs=qo(false),this.historyPageIndex=qo(1),this.polling=qo(false),this.historyTotal=Hw(()=>{let e=(this.historyPageIndex()-1)*this.pageSize,s=this.historyJobs().length;return s<this.pageSize?e+s:e+s+1}),this.pollHandle=null,this.onVisibility=()=>{if(document.hidden){this.stopPolling();return}this.loadRunning({silent:true}),this.loadQueued({silent:true}),this.loadHistory({silent:true}),this.startPolling();},this.destroyRef.onDestroy(()=>{this.stopPolling(),document.removeEventListener("visibilitychange",this.onVisibility);}),this.loadWorkflows(),this.route.queryParamMap.pipe(ue$1(this.destroyRef)).subscribe(e=>{let s=e.get("status");s&&se.includes(s)?this.historyStatusFilter.set(s):this.historyStatusFilter.set("all"),this.historyPageIndex.set(1),this.loadRunning(),this.loadQueued(),this.loadHistory();}),document.addEventListener("visibilitychange",this.onVisibility),this.startPolling();}statusKey(e){return `jobs.status.${e}`}isPolling(){return this.polling()}setHistoryStatusFilter(e){this.historyStatusFilter.set(e),this.historyPageIndex.set(1),this.loadHistory();}setRunningWorkflowId(e){this.runningWorkflowId.set(e),this.loadRunning();}setHistoryWorkflowId(e){this.historyWorkflowId.set(e),this.historyPageIndex.set(1),this.loadHistory();}setShowChildJobs(e){this.showChildJobs.set(e),this.historyPageIndex.set(1),this.loadRunning(),this.loadHistory();}setHistoryPage(e){this.historyPageIndex.set(e),this.loadHistory();}loadWorkflows(){this.workflowsApi.list().pipe(ue$1(this.destroyRef)).subscribe({next:e=>{this.workflows.set(e);},error:()=>{this.workflows.set([]);}});}loadRunning(e={}){let s$1=this.runningWorkflowId();e.silent||(this.runningLoading.set(true),this.runningError.set(null)),this.jobsApi.list(s(r$1({terminal:false,topLevelOnly:!this.showChildJobs()},s$1?{workflowId:s$1}:{}),{limit:Se,offset:0})).pipe(ue$1(this.destroyRef)).subscribe({next:o=>{this.runningJobs.set(o),this.runningLoading.set(false);},error:o=>{this.runningLoading.set(false),!e.silent&&this.runningError.set(this.errorMessage(o,this.transloco.translate("jobs.list.loadFailed")));}});}queuedWaitLabel(e){let s=Date.now()-Date.parse(e),o=Number.isFinite(s)?Math.max(0,Math.floor(s/1e3)):0;if(o<60)return `${o}s`;let m=Math.floor(o/60);return m<60?`${m}m`:`${Math.floor(m/60)}h`}loadQueued(e={}){e.silent||(this.queuedLoading.set(true),this.queuedError.set(null)),this.jobsApi.listQueued().pipe(ue$1(this.destroyRef)).subscribe({next:s=>{this.queuedSteps.set(s),this.queuedLoading.set(false);},error:s=>{this.queuedLoading.set(false),!e.silent&&this.queuedError.set(this.errorMessage(s,this.transloco.translate("jobs.list.loadFailed")));}});}loadHistory(e={}){let s$1=this.historyStatusFilter(),o=this.historyWorkflowId();e.silent||(this.historyLoading.set(true),this.historyError.set(null)),this.jobsApi.list(s(r$1(r$1({terminal:true,topLevelOnly:!this.showChildJobs()},s$1==="all"?{}:{status:s$1}),o?{workflowId:o}:{}),{limit:this.pageSize,offset:(this.historyPageIndex()-1)*this.pageSize})).pipe(ue$1(this.destroyRef)).subscribe({next:m=>{this.historyJobs.set(m),this.historyLoading.set(false);},error:m=>{this.historyLoading.set(false),!e.silent&&this.historyError.set(this.errorMessage(m,this.transloco.translate("jobs.list.loadFailed")));}});}startPolling(){this.pollHandle!=null||document.hidden||(this.pollHandle=setInterval(()=>{this.loadRunning({silent:true}),this.loadQueued({silent:true}),this.loadHistory({silent:true});},Ee),this.polling.set(true));}stopPolling(){this.pollHandle!=null&&(clearInterval(this.pollHandle),this.pollHandle=null),this.polling.set(false);}errorMessage(e,s){return e instanceof bi||e instanceof Error?e.message:s}static{this.\u0275fac=function(s){return new(s||t)};}static{this.\u0275cmp=QE({type:t,selectors:[["app-job-list"]],decls:62,vars:37,consts:[["data-testid","jobs-list",1,"list-page"],[1,"header"],["nz-checkbox","","data-testid","show-child-jobs",1,"child-toggle",3,"ngModelChange","ngModel"],["data-testid","jobs-queued",1,"section"],[1,"section-header"],["data-testid","queued-loading"],["data-testid","queued-error",1,"error"],["data-testid","queued-empty",1,"section-empty"],["data-testid","jobs-queued-table",1,"queued-table"],["data-testid","jobs-running",1,"section"],[1,"filters"],[1,"field"],["data-testid","running-workflow-filter",3,"ngModelChange","ngModel"],["nzValue","",3,"nzLabel"],[3,"nzValue","nzLabel"],["data-testid","running-loading"],["data-testid","running-error",1,"error"],["data-testid","running-empty",1,"section-empty"],[3,"jobs"],["data-testid","jobs-history",1,"section","section-history"],["data-testid","history-status-filter",3,"ngModelChange","ngModel"],["data-testid","history-workflow-filter",3,"ngModelChange","ngModel"],["data-testid","history-loading"],["data-testid","history-error",1,"error"],["data-testid","history-empty",1,"section-empty"],[3,"routerLink"],["data-testid","queued-agent"],["data-testid","queued-wait"],["data-testid","jobs-pagination",3,"nzPageIndex","nzPageSize","nzTotal"],["data-testid","jobs-pagination",3,"nzPageIndexChange","nzPageIndex","nzPageSize","nzTotal"]],template:function(s,o){s&1&&(_i(0,"main",0)(1,"header",1)(2,"h1"),vw(3),Rw(4,"transloco"),Kc()(),_i(5,"label",2),gh("ngModelChange",function(b){return o.setShowChildJobs(b)}),vw(6),Rw(7,"transloco"),Kc(),oE(),_i(8,"section",3)(9,"header",4)(10,"h2"),vw(11),Rw(12,"transloco"),Kc()(),bD(13,le,3,3,"p",5)(14,de,2,1,"p",6)(15,pe,3,3,"p",7)(16,ce,15,9,"table",8),Kc(),_i(17,"section",9)(18,"header",4)(19,"h2"),vw(20),Rw(21,"transloco"),Kc()(),_i(22,"div",10)(23,"div",11)(24,"span"),vw(25),Rw(26,"transloco"),Kc(),_i(27,"nz-select",12),gh("ngModelChange",function(b){return o.setRunningWorkflowId(b)}),lh(28,"nz-option",13),Rw(29,"transloco"),ND(30,he,1,2,"nz-option",14,oe),Kc(),oE(),Kc()(),bD(32,me,3,3,"p",15)(33,ge,2,1,"p",16)(34,fe,3,3,"p",17)(35,be,1,1,"app-job-status-table",18),Kc(),_i(36,"section",19)(37,"header",4)(38,"h2"),vw(39),Rw(40,"transloco"),Kc()(),_i(41,"div",10)(42,"div",11)(43,"span"),vw(44),Rw(45,"transloco"),Kc(),_i(46,"nz-select",20),gh("ngModelChange",function(b){return o.setHistoryStatusFilter(b)}),ND(47,_e,3,6,"nz-option",14,SD),Kc(),oE(),Kc(),_i(49,"div",11)(50,"span"),vw(51),Rw(52,"transloco"),Kc(),_i(53,"nz-select",21),gh("ngModelChange",function(b){return o.setHistoryWorkflowId(b)}),lh(54,"nz-option",13),Rw(55,"transloco"),ND(56,ye,1,2,"nz-option",14,oe),Kc(),oE(),Kc()(),bD(58,Ce,3,3,"p",22)(59,xe,2,1,"p",23)(60,Me,3,3,"p",24)(61,Ie,2,2),Kc()()),s&2&&(gI(3),Ph(Ow(4,17,"jobs.list.title")),gI(2),ch("ngModel",o.showChildJobs()),sE(),gI(),nl(" ",Ow(7,19,"jobs.list.showChildJobs")," "),gI(5),Ph(Ow(12,21,"jobs.list.queued")),gI(2),_D(o.queuedLoading()?13:o.queuedError()?14:o.queuedSteps().length===0?15:16),gI(7),Ph(Ow(21,23,"jobs.list.running")),gI(5),Ph(Ow(26,25,"jobs.list.filterByWorkflow")),gI(2),ch("ngModel",o.runningWorkflowId()),sE(),gI(),ch("nzLabel",Ow(29,27,"jobs.list.filterAll")),gI(2),xD(o.workflows()),gI(2),_D(o.runningLoading()?32:o.runningError()?33:o.runningJobs().length===0?34:35),gI(7),Ph(Ow(40,29,"jobs.list.history")),gI(5),Ph(Ow(45,31,"jobs.list.filterByStatus")),gI(2),ch("ngModel",o.historyStatusFilter()),sE(),gI(),xD(o.historyStatusOptions),gI(4),Ph(Ow(52,33,"jobs.list.filterByWorkflow")),gI(2),ch("ngModel",o.historyWorkflowId()),sE(),gI(),ch("nzLabel",Ow(55,35,"jobs.list.filterAll")),gI(2),xD(o.workflows()),gI(2),_D(o.historyLoading()?58:o.historyError()?59:o.historyJobs().length===0?60:61));},dependencies:[$8,al,rl,$i,v3,Lt,ut,Di,mn,ex,Fm,Am,Rt,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[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{margin:0}.child-toggle[_ngcontent-%COMP%]{align-self:flex-start}.section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.75rem}.section-history[_ngcontent-%COMP%]{padding-top:1.25rem;border-top:1px solid #e7e5e4}.section-header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin:0;font-size:1.1rem}.filters[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:1rem 1.25rem;align-items:flex-end}.field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.35rem;min-width:12rem;max-width:18rem}.field[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{font-size:.85rem;color:#57534e}.section-empty[_ngcontent-%COMP%]{margin:0;color:#57534e}.queued-table[_ngcontent-%COMP%]{width:100%;border-collapse:collapse}.queued-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%], .queued-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{text-align:left;padding:.5rem .75rem .5rem 0;border-bottom:1px solid #e7e5e4}.queued-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{font-size:.85rem;color:#57534e;font-weight:600}.error[_ngcontent-%COMP%]{color:#9f1239}"]});}}return t})();export{we as JOB_LIST_PAGE_SIZE,Se as JOB_RUNNING_LIMIT,Ee as JOB_RUNNING_POLL_MS,Qe as JobListComponent,se as TERMINAL_JOB_STATUSES};
@@ -0,0 +1 @@
1
+ import {$}from'./chunk-DphMF2VB.js';import {s,r as r$1,c8 as Sy,i as ie,C,b7 as Ee,d0 as go,db as Ul,dc as Fd,dd as kn,bA as zt,bD as Wr,Q as QE,bU as eh,j as _i,N as ND,S as SD,l as Kc,ar as _h,a8 as Mh,w as gI,D as xD,bV as re,aG as z0,aD as E3,bE as XE,bK as Le$1,b6 as q0,aE as _r,a3 as Th,a4 as xh,aN as st,aO as Ee$1,m as gh,n as bD,aY as nh,bB as sw,bp as cw,B as _D,x as ch,cG as Aw,bq as Dh,br as GD,L as LD,b as at,p as lh,aZ as el,a_ as tl,E as VD,J as Pu,M as Lu,de as vv}from'./main-2ZW45HAE.js';var ce=["animationElement"],me=(n,o)=>({$implicit:n,data:o});function le(n,o){n&1&&lh(0,"nz-icon",4);}function pe(n,o){n&1&&lh(0,"nz-icon",5);}function de(n,o){n&1&&lh(0,"nz-icon",6);}function he(n,o){n&1&&lh(0,"nz-icon",7);}function fe(n,o){n&1&&lh(0,"nz-icon",8);}function ue(n,o){if(n&1&&(el(0),lh(1,"span",10),tl()),n&2){let e=VD();gI(),ch("innerHTML",e.instance.content,vv);}}function ge(n,o){if(n&1){let e=LD();_i(0,"nz-message",2),gh("destroyed",function(i){Pu(e);let s=VD();return Lu(s.remove(i.id,i.userAction))}),Kc();}if(n&2){let e=o.$implicit;ch("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=XE({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=XE({type:n})}return n})(),ze=(()=>{class n extends ye{instance;destroyed=new Le$1;index;animationElement=q0.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=QE({type:n,selectors:[["nz-message"]],viewQuery:function(t,i){t&1&&Dh(i.animationElement,ce,5,_r),t&2&&GD();},inputs:{instance:"instance"},outputs:{destroyed:"destroyed"},exportAs:["nzMessage"],features:[eh],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),gh("mouseenter",function(){return i.onEnter()})("mouseleave",function(){return i.onLeave()}),_i(2,"div",2)(3,"div",3),bD(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),nh(9,ue,2,1,"ng-container",9),Kc()()()),t&2){let s;sw(i.instance.options?.nzStyle),cw(i.instance.options?.nzClass),gI(3),cw("ant-message-"+i.instance.type),gI(),_D((s=i.instance.type)==="success"?4:s==="info"?5:s==="warning"?6:s==="error"?7:s==="loading"?8:-1),gI(5),ch("nzStringTemplateOutlet",i.instance.content)("nzStringTemplateOutletContext",Aw(9,me,i,i.instance.options?.nzData));}},dependencies:[Th,xh,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=QE({type:n,selectors:[["nz-message-container"]],exportAs:["nzMessageContainer"],features:[eh],decls:3,vars:4,consts:[[1,"ant-message"],[3,"instance"],[3,"destroyed","instance"]],template:function(t,i){t&1&&(_i(0,"div",0),ND(1,ge,1,1,"nz-message",1,SD),Kc()),t&2&&(_h("top",i.top),Mh("ant-message-rtl",i.dir==="rtl"),gI(),xD(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 {aA as YE,aB as uu,C,bJ as XI,aE as _r,aJ as Oe,bK as Le$1,bL as Bl,bM as _l,Q as QE,a3 as Th,a4 as xh,aP as ly,aQ as Z0,bk as BD,bx as $D,n as bD,w as gI,B as _D,m as gh,ar as _h,a8 as Mh,bN as qn,bO as $n,L as LD,j as _i,l as Kc,J as Pu,E as VD,M as Lu}from'./main-2ZW45HAE.js';var V=["*"];function x(o,A){if(o&1){let n=LD();_i(0,"nz-icon",1),gh("click",function(e){Pu(n);let i=VD();return Lu(i.closeTag(e))}),Kc();}}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=QE({type:o,selectors:[["nz-tag"]],hostAttrs:[1,"ant-tag"],hostVars:12,hostBindings:function(t,e){t&1&&gh("click",function(){return e.updateCheckedStatus()}),t&2&&(_h("background-color",e.isPresetColor?"":e.nzColor),Mh("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",Z0],nzBordered:[2,"nzBordered","nzBordered",Z0]},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&&(BD(),$D(0),bD(1,x,1,0,"nz-icon",0)),t&2&&(gI(),_D(e.nzMode==="closeable"?1:-1));},dependencies:[Th,xh],encapsulation:2})}return o})(),W=(()=>{class o{static \u0275fac=function(t){return new(t||o)};static \u0275mod=YE({type:o});static \u0275inj=uu({imports:[I]})}return o})();export{I,W};