@knoflows/engine 0.1.0-alpha.12 → 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.
- package/dist/engine.js +81 -13
- package/dist/migrations/20260919073531_tense_grey_gargoyle/migration.sql +1 -0
- package/dist/migrations/20260919073531_tense_grey_gargoyle/snapshot.json +1348 -0
- package/dist/migrations/20260919081637_fearless_warlock/migration.sql +1 -0
- package/dist/migrations/20260919081637_fearless_warlock/snapshot.json +1358 -0
- package/package.json +3 -3
- package/static/apple-touch-icon.png +0 -0
- package/static/assets/i18n/en.json +50 -9
- package/static/assets/i18n/es.json +50 -9
- package/static/chunk-1Oqdt_Gp.js +1 -0
- package/static/{chunk-C3Ej8Ue9.js → chunk-1eeePIP1.js} +1 -1
- package/static/chunk-37yFTUcY.js +1 -0
- package/static/chunk-7MZQgksi.js +1 -0
- package/static/chunk-7VyHTRp_.js +1 -0
- package/static/chunk-B0V1VBvY.js +1 -0
- package/static/chunk-BH5zvE8A.js +1 -0
- package/static/chunk-BZxs3wP7.js +1 -0
- package/static/chunk-B_L2A3hm.js +1 -0
- package/static/chunk-BbIC5sO2.js +1 -0
- package/static/chunk-BeWWb9rm.js +1 -0
- package/static/chunk-BnD2l9n3.js +1 -0
- package/static/chunk-Bp8u1CCw.js +1 -0
- package/static/chunk-BpOumnMU.js +1 -0
- package/static/chunk-BuPc66MS.js +1 -0
- package/static/{chunk-CK-2DsDH.js → chunk-C4Ee3umI.js} +1 -1
- package/static/chunk-C5n_oTWP.js +1 -0
- package/static/chunk-CF4gc4Im.js +1 -0
- package/static/chunk-CM8oLO7n.js +1 -0
- package/static/chunk-CXGgR5M1.js +1 -0
- package/static/chunk-CiJRU6lo.js +1 -0
- package/static/chunk-Cn95hfnf.js +1 -0
- package/static/chunk-Cq09TrKP.js +1 -0
- package/static/chunk-Cx2n09Ng.js +1 -0
- package/static/chunk-DFoFQkTa.js +1 -0
- package/static/chunk-DMAf3Qir.js +66 -0
- package/static/chunk-DYARU-G0.js +1 -0
- package/static/chunk-DZhQ2iEt.js +1 -0
- package/static/chunk-D_DUAV49.js +1 -0
- package/static/chunk-DgEO14wO.js +1 -0
- package/static/{chunk-hEYSTlD1.js → chunk-DphMF2VB.js} +1 -1
- package/static/chunk-DxZsQqxS.js +1 -0
- package/static/chunk-GQe0l3Uh.js +1 -0
- package/static/chunk-J9qS04nF.js +1 -0
- package/static/chunk-dOUa0Vhs.js +1 -0
- package/static/chunk-nx1xncBD.js +1 -0
- package/static/chunk-q9oVn_qj.js +5 -0
- package/static/{chunk-BquoV7tV.js → chunk-vYeIWxg4.js} +1 -1
- package/static/chunk-yxqIQom4.js +1 -0
- package/static/favicon-16x16.png +0 -0
- package/static/favicon-32x32.png +0 -0
- package/static/favicon.ico +0 -0
- package/static/favicon.svg +12 -0
- package/static/icon-192.png +0 -0
- package/static/icon-512.png +0 -0
- package/static/index.html +30 -5
- package/static/main-2ZW45HAE.js +248 -0
- package/static/media/inter-latin-400-normal-55WT6UWF.woff2 +0 -0
- package/static/media/inter-latin-400-normal-FR5HOXA4.woff +0 -0
- package/static/media/inter-latin-500-normal-W62DVTXI.woff2 +0 -0
- package/static/media/inter-latin-500-normal-ZNGIZ2YB.woff +0 -0
- package/static/media/inter-latin-600-normal-R6Y2SZCR.woff2 +0 -0
- package/static/media/inter-latin-600-normal-ZYHV6QZT.woff +0 -0
- package/static/media/jetbrains-mono-latin-500-normal-ETEQEOVZ.woff +0 -0
- package/static/media/jetbrains-mono-latin-500-normal-V4XIP5OW.woff2 +0 -0
- package/static/media/space-grotesk-latin-500-normal-GESQWJQV.woff2 +0 -0
- package/static/media/space-grotesk-latin-500-normal-HV4TE4RA.woff +0 -0
- package/static/media/space-grotesk-latin-700-normal-6Z7GHSI6.woff +0 -0
- package/static/media/space-grotesk-latin-700-normal-I3MXRIUZ.woff2 +0 -0
- package/static/nz-theme-dark.css +1 -0
- package/static/nz-theme.css +1 -0
- package/static/styles-JGCTKGGH.css +1 -0
- package/static/chunk--F2Y9kLC.js +0 -1
- package/static/chunk-A3t8CipM.js +0 -1
- package/static/chunk-BAgwFLbm.js +0 -1
- package/static/chunk-BLSuZA6j.js +0 -1
- package/static/chunk-Bc9kVhav.js +0 -1
- package/static/chunk-BdrifDCS.js +0 -66
- package/static/chunk-BkJuaRUH.js +0 -1
- package/static/chunk-BmP-Xct3.js +0 -1
- package/static/chunk-BqB1I-vg.js +0 -1
- package/static/chunk-C5T1qa5G.js +0 -1
- package/static/chunk-CKFZoQzp.js +0 -1
- package/static/chunk-CLNhyiRm.js +0 -1
- package/static/chunk-CN5_Adst.js +0 -1
- package/static/chunk-COSsVdG3.js +0 -1
- package/static/chunk-Cj-KtAk-.js +0 -1
- package/static/chunk-CrD5w72_.js +0 -1
- package/static/chunk-CxBYhrEj.js +0 -1
- package/static/chunk-D5Bqg3D5.js +0 -7
- package/static/chunk-DAfnL0eP.js +0 -1
- package/static/chunk-Dc3mv2RT.js +0 -1
- package/static/chunk-Dc7Nho4-.js +0 -1
- package/static/chunk-Df_jRm7U.js +0 -1
- package/static/chunk-Dl9xoaKd.js +0 -1
- package/static/chunk-DqECIHE5.js +0 -1
- package/static/chunk-Dtfc5XNc.js +0 -1
- package/static/chunk-DxtF2GQ1.js +0 -1
- package/static/chunk-KhdCYqqN.js +0 -1
- package/static/chunk-TkjFi8lV.js +0 -1
- package/static/chunk-UArWmYDU.js +0 -1
- package/static/chunk-WGWZEfc0.js +0 -1
- package/static/chunk-jg6TAN9F.js +0 -1
- package/static/chunk-mb666CWY.js +0 -1
- package/static/chunk-nXCKNQUo.js +0 -1
- package/static/chunk-ndsN8K7Q.js +0 -5
- package/static/chunk-tnTBlRRN.js +0 -1
- package/static/main-RRKPLQCF.js +0 -249
- package/static/styles-6MW3GE4V.css +0 -1
package/static/chunk-DqECIHE5.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {an as YE,ao as uu,ap as pT,av as hT,a0 as $0,aF as Z0,H as Hw,s,r,bM as Le,u as ue,bu as XE,bR as eh,a4 as Mh,q as qo,bz as re,C,c1 as Uo,ck as k8,cl as em,bW as on,cm as ql,Q as QE,cn as fn,co as f1,cp as gn,cq as Xa,cr as Ts,cs as Vs,ch as t4,aC as Tt,aD as Ie,aA as pt$1,aB as Se,d as dd,z as zc,c as t7,Z as y7,ct as Gy,bQ as Ky,aN as nh,h as gh,x as ch,aJ as Ih,ar as _r,aK as qD,aL as WD,aM as ut$1,cu as s0,cc as N7,bN as Sy,F as LD,f as _i,cv as oi,cw as ri,m as bD,g as Kc,cx as Bh,R as Rw,v as vw,E as VD,br as sw,be as cw,p as gI,B as _D,a5 as ah,O as Ow,w as nl,cy as ji,c3 as XI,aq as kt,b as at,cz as Wm,cA as jl,cB as Kg,cC as Yg,cD as kg,cE as kr,cF as xy,aE as ly,aw as Le$1,at as z0,cG as r2,cH as a2,cI as _e,cJ as Fu,cK as vn,cL as He,bx as Er,a_ as j3,l as lh,aO as el,aP as tl,cM as i9,P as Ph,ba as Lw,G as Pu,I as Lu}from'./main-RRKPLQCF.js';var lt=["overlay"];function ct(i,m){if(i&1&&(el(0),vw(1),tl()),i&2){let e=VD(2);gI(),Ph(e.nzTitle);}}function pt(i,m){if(i&1){let e=LD();_i(0,"div",2),oi(function(){Pu(e);let n=VD();return Lu(n.zoomAnimationLeave())}),ri(function(){Pu(e);let n=VD();return Lu(n.zoomAnimationEnter())}),lh(1,"div",3),_i(2,"div",4)(3,"div",5),nh(4,ct,2,1,"ng-container",6),Kc()()();}if(i&2){let e=VD();sw(e.nzOverlayStyle),cw(e._classMap),Mh("ant-tooltip-rtl",e.dir()==="rtl"),ch("nzNoAnimation",!!e.noAnimation?.nzNoAnimation?.()),gI(),sw(e._arrowStyleMap),gI(2),sw(e._contentStyleMap),gI(),ch("nzStringTemplateOutlet",e.nzTitle)("nzStringTemplateOutletContext",e.nzTitleContext);}}var tt=(()=>{class i{componentType;elementRef=C(_r);hostView=C(ji);renderer=C(XI);noAnimation=C(t4,{host:true,optional:true});nzConfigService=C(kt);destroyRef=C(at);platformId=C(Wm);config;visibleChange=new Le;get _title(){return this.title||this.directiveTitle||null}get _content(){return this.content||this.directiveContent||null}get _trigger(){return typeof this.trigger<"u"?this.trigger:"hover"}get _placement(){let e=this.placement;return Array.isArray(e)&&e.length>0?e:typeof e=="string"&&e?[e]:["top"]}get _visible(){return (typeof this.visible<"u"?this.visible:this.internalVisible)||false}get _mouseEnterDelay(){return this.mouseEnterDelay||.15}get _mouseLeaveDelay(){return this.mouseLeaveDelay||.1}get _overlayClassName(){return this.overlayClassName||null}get _overlayStyle(){return this.overlayStyle||null}get _overlayClickable(){return this.overlayClickable??true}internalVisible=false;getProxyPropertyMap(){return {noAnimation:["noAnimation",()=>!!this.noAnimation]}}component;destroy$=new re;triggerDisposables=[];delayTimer;constructor(e){this.componentType=e,this.destroyRef.onDestroy(()=>{this.clearTogglingTimer(),this.removeTriggerListeners();});}ngAfterViewInit(){jl(this.platformId)&&(this.createComponent(),this.registerTriggers());}ngOnChanges(e){let{trigger:t}=e;t&&!t.isFirstChange()&&this.registerTriggers(),this.component&&this.updatePropertiesByChanges(e);}show(){this.component?.show();}hide(){this.component?.hide();}updatePosition(){this.component&&this.component.updatePosition();}createComponent(){let e=this.hostView.createComponent(this.componentType);this.component=e.instance,this.renderer.removeChild(this.renderer.parentNode(this.elementRef.nativeElement),e.location.nativeElement),this.component.setOverlayOrigin(this.origin||this.elementRef),this.initProperties();let t=this.component.nzVisibleChange.pipe(Kg());t.pipe(ue(this.destroyRef)).subscribe(n=>{this.internalVisible=n,this.visibleChange.emit(n);}),t.pipe(on(Boolean),Yg(0,kg),on(()=>!!this.component?.overlay?.overlayRef),ue(this.destroyRef)).subscribe(()=>{this.component?.updatePosition();});}registerTriggers(){let e=this.elementRef.nativeElement,t=this.trigger;if(this.removeTriggerListeners(),t==="hover"){let n;this.triggerDisposables.push(this.renderer.listen(e,"mouseenter",()=>{this.delayEnterLeave(true,true,this._mouseEnterDelay);})),this.triggerDisposables.push(this.renderer.listen(e,"mouseleave",()=>{this.delayEnterLeave(true,false,this._mouseLeaveDelay),this.component?.overlay.overlayRef&&!n&&(n=this.component.overlay.overlayRef.overlayElement,this.triggerDisposables.push(this.renderer.listen(n,"mouseenter",()=>{this.delayEnterLeave(false,true,this._mouseEnterDelay);})),this.triggerDisposables.push(this.renderer.listen(n,"mouseleave",()=>{this.delayEnterLeave(false,false,this._mouseLeaveDelay);})));}));}else t==="focus"?(this.triggerDisposables.push(this.renderer.listen(e,"focusin",()=>this.show())),this.triggerDisposables.push(this.renderer.listen(e,"focusout",()=>this.hide()))):t==="click"&&this.triggerDisposables.push(this.renderer.listen(e,"click",n=>{n.preventDefault(),this.show();}));}updatePropertiesByChanges(e){this.updatePropertiesByKeys(Object.keys(e));}updatePropertiesByKeys(e){let t=r({title:["nzTitle",()=>this._title],directiveTitle:["nzTitle",()=>this._title],content:["nzContent",()=>this._content],directiveContent:["nzContent",()=>this._content],trigger:["nzTrigger",()=>this._trigger],placement:["nzPlacement",()=>this._placement],visible:["nzVisible",()=>this._visible],mouseEnterDelay:["nzMouseEnterDelay",()=>this._mouseEnterDelay],mouseLeaveDelay:["nzMouseLeaveDelay",()=>this._mouseLeaveDelay],overlayClassName:["nzOverlayClassName",()=>this._overlayClassName],overlayStyle:["nzOverlayStyle",()=>this._overlayStyle],overlayClickable:["nzOverlayClickable",()=>this._overlayClickable],arrowPointAtCenter:["nzArrowPointAtCenter",()=>this.arrowPointAtCenter]},this.getProxyPropertyMap());(e||Object.keys(t).filter(n=>!n.startsWith("directive"))).forEach(n=>{if(t[n]){let[o,c]=t[n];this.updateComponentValue(o,c());}}),this.component?.updateByDirective();}initProperties(){this.updatePropertiesByKeys();}updateComponentValue(e,t){typeof t<"u"&&(this.component[e]=t);}delayEnterLeave(e,t,n=-1){this.delayTimer?this.clearTogglingTimer():n>0?this.delayTimer=setTimeout(()=>{this.delayTimer=void 0,t?this.show():this.hide();},n*1e3):t&&e?this.show():this.hide();}removeTriggerListeners(){this.triggerDisposables.forEach(e=>e()),this.triggerDisposables.length=0;}clearTogglingTimer(){this.delayTimer&&(clearTimeout(this.delayTimer),this.delayTimer=void 0);}static \u0275fac=function(t){return new(t||i)(kr(xy))};static \u0275dir=XE({type:i,features:[ly]})}return i})(),mt=(()=>{class i{noAnimation=C(t4,{host:true,optional:true});dir=C(Le$1).valueSignal;cdr=C(z0);elementRef=C(_r);destroyRef=C(at);overlay;nzTitle=null;nzContent=null;nzArrowPointAtCenter=false;nzOverlayClassName;nzOverlayStyle={};nzOverlayClickable=true;nzBackdrop=false;nzMouseEnterDelay;nzMouseLeaveDelay;nzVisibleChange=new re;set nzVisible(e){let t=i9(e);this._visible!==t&&(this._visible=t,this.nzVisibleChange.next(t));}get nzVisible(){return this._visible}_visible=false;set nzTrigger(e){this._trigger=e;}get nzTrigger(){return this._trigger}_trigger="hover";set nzPlacement(e){let t=e.map(n=>r2(_e[n],a2[n]));this._positions=[...t,...Fu];}preferredPlacement="top";origin;_classMap={};_prefix="ant-tooltip";_positions=[...Fu];constructor(){this.destroyRef.onDestroy(()=>{this.nzVisibleChange.complete();});}show(){this.nzVisible||(this.isEmpty()||(this.nzVisible=true,this.nzVisibleChange.next(true),this.cdr.detectChanges()),this.origin&&this.overlay&&this.overlay.overlayRef&&this.overlay.overlayRef.getDirection()==="rtl"&&this.overlay.overlayRef.setDirection("ltr"));}hide(){this.nzVisible&&(this.nzVisible=false,this.nzVisibleChange.next(false),this.cdr.detectChanges());}updateByDirective(){this.updateStyles(),this.cdr.detectChanges(),Promise.resolve().then(()=>{this.updatePosition(),this.updateVisibilityByTitle();});}updatePosition(){this.origin&&this.overlay&&this.overlay.overlayRef&&this.overlay.overlayRef.updatePosition();}onPositionChange(e){this.preferredPlacement=vn(e),this.updateStyles(),this.cdr.detectChanges();}setOverlayOrigin(e){this.origin=e,this.cdr.markForCheck();}onClickOutside(e){if(!this.nzOverlayClickable)return;let t=He(e);!this.origin.nativeElement.contains(t)&&this.nzTrigger!==null&&this.hide();}updateVisibilityByTitle(){this.isEmpty()&&this.hide();}updateStyles(){this._classMap=s(r({},this.transformClassListToMap(this.nzOverlayClassName)),{[`${this._prefix}-placement-${this.preferredPlacement}`]:true});}transformClassListToMap(e){let t={};return (e!==null?e.split(/\s+/):[]).forEach(o=>t[o]=true),t}static \u0275fac=function(t){return new(t||i)};static \u0275dir=XE({type:i,viewQuery:function(t,n){if(t&1&&Ih(lt,5),t&2){let o;qD(o=WD())&&(n.overlay=o.first);}}})}return i})();function ut(i){return i instanceof Er?false:i===""||!j3(i)}var nt=(()=>{class i extends mt{_animationPrefix="ant-zoom-big-fast";nzTitle=null;nzTitleContext=null;nzColor;_arrowStyleMap={};_contentStyleMap={};zoomAnimationEnter=s0(()=>`${this._animationPrefix}-enter ${this._animationPrefix}-enter-active`);zoomAnimationLeave=s0(()=>`${this._animationPrefix}-leave ${this._animationPrefix}-leave-active`);isEmpty(){return ut(this.nzTitle)}updateStyles(){let e=this.nzColor&&N7(this.nzColor);this._classMap=s(r({},this.transformClassListToMap(this.nzOverlayClassName)),{[`${this._prefix}-placement-${this.preferredPlacement}`]:true,[`${this._prefix}-${this.nzColor}`]:e}),this._contentStyleMap={backgroundColor:this.nzColor&&!e?this.nzColor:null},this._arrowStyleMap={"--antd-arrow-background-color":this.nzColor&&!e?this.nzColor:null};}static \u0275fac=(()=>{let e;return function(n){return (e||(e=Sy(i)))(n||i)}})();static \u0275cmp=QE({type:i,selectors:[["nz-tooltip"]],exportAs:["nzTooltipComponent"],features:[eh],decls:2,vars:4,consts:[["overlay","cdkConnectedOverlay"],["cdkConnectedOverlay","","nzConnectedOverlay","",3,"overlayOutsideClick","detach","positionChange","cdkConnectedOverlayOrigin","cdkConnectedOverlayOpen","cdkConnectedOverlayPositions","nzArrowPointAtCenter"],[1,"ant-tooltip",3,"nzNoAnimation"],[1,"ant-tooltip-arrow"],[1,"ant-tooltip-content"],[1,"ant-tooltip-inner"],[4,"nzStringTemplateOutlet","nzStringTemplateOutletContext"]],template:function(t,n){t&1&&(nh(0,pt,5,13,"ng-template",1,0,Lw),gh("overlayOutsideClick",function(c){return n.onClickOutside(c)})("detach",function(){return n.hide()})("positionChange",function(c){return n.onPositionChange(c)})),t&2&&ch("cdkConnectedOverlayOrigin",n.origin)("cdkConnectedOverlayOpen",n._visible)("cdkConnectedOverlayPositions",n._positions)("nzArrowPointAtCenter",n.nzArrowPointAtCenter);},dependencies:[fn,f1,t4,Tt,Ie,gn,Xa],encapsulation:2})}return i})();var dt=["okBtn"],ft=["cancelBtn"];function zt(i,m){i&1&&lh(0,"div",5);}function ht(i,m){if(i&1&&(el(0),lh(1,"nz-icon",17),tl()),i&2){let e=m.$implicit;gI(),ch("nzType",e||"exclamation-circle");}}function vt(i,m){if(i&1&&(_i(0,"span",10),nh(1,ht,2,1,"ng-container",16),Kc()),i&2){let e=VD(2);gI(),ch("nzStringTemplateOutlet",e.nzIcon);}}function yt(i,m){if(i&1&&(el(0),vw(1),tl()),i&2){let e=VD(2);gI(),nl(" ",e.nzTitle," ");}}function gt(i,m){if(i&1){let e=LD();_i(0,"div",4),oi(function(){Pu(e);let n=VD();return Lu(n.zoomAnimationLeave())}),ri(function(){Pu(e);let n=VD();return Lu(n.zoomAnimationEnter())}),bD(1,zt,1,0,"div",5),_i(2,"div",6)(3,"div",7)(4,"div")(5,"div",8)(6,"div",9),bD(7,vt,2,1,"span",10),_i(8,"div",11),nh(9,yt,2,1,"ng-container",12),Kc()(),_i(10,"div",13)(11,"button",14,1),gh("click",function(){Pu(e);let n=VD();return Lu(n.onCancel())}),Bh(13),Rw(14,"nzI18n"),vw(15),Kc(),_i(16,"button",15,2),gh("click",function(){Pu(e);let n=VD();return Lu(n.onConfirm())}),Bh(18),Rw(19,"nzI18n"),vw(20),Kc()()()()()()();}if(i&2){let e=VD();sw(e.nzOverlayStyle),cw(e._classMap),Mh("ant-popover-rtl",e.dir()==="rtl"),ch("cdkTrapFocusAutoCapture",e.nzAutoFocus!==null)("nzNoAnimation",!!e.noAnimation?.nzNoAnimation?.()),gI(),_D(e.nzPopconfirmShowArrow?1:-1),gI(6),_D(e.nzIcon!==null?7:-1),gI(2),ch("nzStringTemplateOutlet",e.nzTitle)("nzStringTemplateOutletContext",e.nzTitleContext),gI(2),ch("nzDanger",e.nzCancelButtonProps()?.nzDanger)("disabled",e.nzCancelButtonProps()?.nzDisabled),ah("cdkFocusInitial",e.nzAutoFocus==="cancel"||null);let t=e.nzCancelText()||Ow(14,22,"Modal.cancelText");gI(4),nl(" ",t," "),gI(),ch("nzType",e.nzOkButtonProps().nzType)("nzDanger",e.nzOkButtonProps().nzDanger)("nzLoading",e.confirmLoading)("disabled",e.nzOkButtonProps().nzDisabled),ah("cdkFocusInitial",e.nzAutoFocus==="ok"||null);let n=e.nzOkText()||Ow(19,24,"Modal.okText");gI(4),nl(" ",n," ");}}var Ct="popconfirm",Cn=(()=>{let i=tt,m,e=[],t=[],n,o=[],c=[];return class he extends i{static{let C=typeof Symbol=="function"&&Symbol.metadata?Object.create(i[Symbol.metadata]??null):void 0;m=[ut$1()],n=[ut$1()],pT(null,null,m,{kind:"field",name:"nzPopconfirmBackdrop",static:false,private:false,access:{has:a=>"nzPopconfirmBackdrop"in a,get:a=>a.nzPopconfirmBackdrop,set:(a,N)=>{a.nzPopconfirmBackdrop=N;}},metadata:C},e,t),pT(null,null,n,{kind:"field",name:"nzAutofocus",static:false,private:false,access:{has:a=>"nzAutofocus"in a,get:a=>a.nzAutofocus,set:(a,N)=>{a.nzAutofocus=N;}},metadata:C},o,c),C&&Object.defineProperty(this,Symbol.metadata,{enumerable:true,configurable:true,writable:true,value:C});}_nzModuleName=Ct;arrowPointAtCenter;title;titleContext=null;directiveTitle;trigger="click";placement="top";origin;mouseEnterDelay;mouseLeaveDelay;overlayClassName;overlayStyle;visible;nzBeforeConfirm;nzIcon;nzCondition=false;nzPopconfirmShowArrow=true;nzPopconfirmBackdrop=hT(this,e,false);nzAutofocus=(hT(this,t),hT(this,o,null));nzOkText=(hT(this,c),$0(null));nzOkType=$0("primary");nzCancelText=$0(null);nzOkButtonProps=$0(null);nzCancelButtonProps=$0(null);nzOkDisabled=$0(false,{transform:Z0});nzOkDanger=$0(false,{transform:Z0});okButtonProps=Hw(()=>s(r({},this.nzOkButtonProps()),{nzType:this.nzOkButtonProps()?.nzType||this.nzOkType()==="danger"?"primary":this.nzOkType(),nzDanger:this.nzOkDanger()||this.nzOkButtonProps()?.nzDanger||this.nzOkType()==="danger",nzDisabled:this.nzOkDisabled()||this.nzOkButtonProps()?.nzDisabled}));cancelButtonProps=Hw(()=>r({},this.nzCancelButtonProps()));directiveContent=null;content=null;overlayClickable;visibleChange=new Le;nzOnCancel=new Le;nzOnConfirm=new Le;getProxyPropertyMap(){return r({nzOkText:["nzOkText",()=>this.nzOkText],nzCancelText:["nzCancelText",()=>this.nzCancelText],nzOkButtonProps:["nzOkButtonProps",()=>this.okButtonProps],nzCancelButtonProps:["nzCancelButtonProps",()=>this.cancelButtonProps],nzBeforeConfirm:["nzBeforeConfirm",()=>this.nzBeforeConfirm],nzCondition:["nzCondition",()=>this.nzCondition],nzIcon:["nzIcon",()=>this.nzIcon],nzPopconfirmShowArrow:["nzPopconfirmShowArrow",()=>this.nzPopconfirmShowArrow],nzPopconfirmBackdrop:["nzBackdrop",()=>this.nzPopconfirmBackdrop],nzPopconfirmContext:["nzTitleContext",()=>this.titleContext],nzAutoFocus:["nzAutoFocus",()=>this.nzAutofocus]},super.getProxyPropertyMap())}constructor(){super(it);}createComponent(){super.createComponent(),this.component.nzOnCancel.pipe(ue(this.destroyRef)).subscribe(()=>{this.nzOnCancel.emit();}),this.component.nzOnConfirm.pipe(ue(this.destroyRef)).subscribe(()=>{this.nzOnConfirm.emit();});}static \u0275fac=function(a){return new(a||he)};static \u0275dir=XE({type:he,selectors:[["","nz-popconfirm",""]],hostVars:2,hostBindings:function(a,N){a&2&&Mh("ant-popover-open",N.visible);},inputs:{arrowPointAtCenter:[2,"nzPopconfirmArrowPointAtCenter","arrowPointAtCenter",Z0],title:[0,"nzPopconfirmTitle","title"],titleContext:[0,"nzPopconfirmTitleContext","titleContext"],directiveTitle:[0,"nz-popconfirm","directiveTitle"],trigger:[0,"nzPopconfirmTrigger","trigger"],placement:[0,"nzPopconfirmPlacement","placement"],origin:[0,"nzPopconfirmOrigin","origin"],mouseEnterDelay:[0,"nzPopconfirmMouseEnterDelay","mouseEnterDelay"],mouseLeaveDelay:[0,"nzPopconfirmMouseLeaveDelay","mouseLeaveDelay"],overlayClassName:[0,"nzPopconfirmOverlayClassName","overlayClassName"],overlayStyle:[0,"nzPopconfirmOverlayStyle","overlayStyle"],visible:[0,"nzPopconfirmVisible","visible"],nzBeforeConfirm:"nzBeforeConfirm",nzIcon:"nzIcon",nzCondition:[2,"nzCondition","nzCondition",Z0],nzPopconfirmShowArrow:[2,"nzPopconfirmShowArrow","nzPopconfirmShowArrow",Z0],nzPopconfirmBackdrop:"nzPopconfirmBackdrop",nzAutofocus:"nzAutofocus",nzOkText:[1,"nzOkText"],nzOkType:[1,"nzOkType"],nzCancelText:[1,"nzCancelText"],nzOkButtonProps:[1,"nzOkButtonProps"],nzCancelButtonProps:[1,"nzCancelButtonProps"],nzOkDisabled:[1,"nzOkDisabled"],nzOkDanger:[1,"nzOkDanger"]},outputs:{visibleChange:"nzPopconfirmVisibleChange",nzOnCancel:"nzOnCancel",nzOnConfirm:"nzOnConfirm"},exportAs:["nzPopconfirm"],features:[eh]})}})(),it=(()=>{class i extends nt{_animationPrefix="ant-zoom-big";okBtn;cancelBtn;nzCondition=false;nzPopconfirmShowArrow=true;nzIcon;nzAutoFocus=null;nzBeforeConfirm=null;nzOkText=qo(null);nzCancelText=qo(null);nzOkButtonProps=qo({nzType:"primary"});nzCancelButtonProps=qo(null);nzOnCancel=new re;nzOnConfirm=new re;_trigger="click";elementFocusedBeforeModalWasOpened=null;document=C(Uo);_prefix="ant-popover";confirmLoading=false;constructor(){super(),this.destroyRef.onDestroy(()=>{this.nzVisibleChange.complete();});}show(){this.nzCondition?this.onConfirm():(this.capturePreviouslyFocusedElement(),super.show());}hide(){super.hide(),this.restoreFocus();}handleConfirm(){this.nzOnConfirm.next(),super.hide();}onCancel(){this.nzOnCancel.next(),super.hide();}onConfirm(){this.nzBeforeConfirm?(this.confirmLoading=true,this.cdr.markForCheck(),k8(this.nzBeforeConfirm()).pipe(em(),on(Boolean),ql(()=>{this.confirmLoading=false,this.cdr.markForCheck();})).subscribe(()=>this.handleConfirm())):this.handleConfirm();}capturePreviouslyFocusedElement(){this.document&&(this.elementFocusedBeforeModalWasOpened=this.document.activeElement);}restoreFocus(){this.elementFocusedBeforeModalWasOpened?.focus();}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=QE({type:i,selectors:[["nz-popconfirm"]],viewQuery:function(t,n){if(t&1&&Ih(dt,5,_r)(ft,5,_r),t&2){let o;qD(o=WD())&&(n.okBtn=o),qD(o=WD())&&(n.cancelBtn=o);}},exportAs:["nzPopconfirmComponent"],features:[eh],decls:2,vars:5,consts:[["overlay","cdkConnectedOverlay"],["cancelBtn",""],["okBtn",""],["cdkConnectedOverlay","","nzConnectedOverlay","",3,"overlayOutsideClick","detach","positionChange","cdkConnectedOverlayHasBackdrop","cdkConnectedOverlayOrigin","cdkConnectedOverlayPositions","cdkConnectedOverlayOpen","nzArrowPointAtCenter"],["cdkTrapFocus","",1,"ant-popover",3,"cdkTrapFocusAutoCapture","nzNoAnimation"],[1,"ant-popover-arrow"],[1,"ant-popover-content"],[1,"ant-popover-inner"],[1,"ant-popover-inner-content"],[1,"ant-popover-message"],[1,"ant-popover-message-icon"],[1,"ant-popover-message-title"],[4,"nzStringTemplateOutlet","nzStringTemplateOutletContext"],[1,"ant-popover-buttons"],["nz-button","","nzSize","small",3,"click","nzDanger","disabled"],["nz-button","","nzSize","small",3,"click","nzType","nzDanger","nzLoading","disabled"],[4,"nzStringTemplateOutlet"],["nzTheme","fill",3,"nzType"]],template:function(t,n){t&1&&(nh(0,gt,21,26,"ng-template",3,0,Lw),gh("overlayOutsideClick",function(c){return n.onClickOutside(c)})("detach",function(){return n.hide()})("positionChange",function(c){return n.onPositionChange(c)})),t&2&&ch("cdkConnectedOverlayHasBackdrop",n.nzBackdrop)("cdkConnectedOverlayOrigin",n.origin)("cdkConnectedOverlayPositions",n._positions)("cdkConnectedOverlayOpen",n._visible)("nzArrowPointAtCenter",n.nzArrowPointAtCenter);},dependencies:[fn,f1,gn,Xa,Ts,Vs,t4,Tt,Ie,pt$1,Se,dd,zc,t7,y7,Gy,Ky],encapsulation:2})}return i})(),_n=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=YE({type:i});static \u0275inj=uu({imports:[it]})}return i})();export{Cn as C,_n as _};
|
package/static/chunk-Dtfc5XNc.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {f}from'./chunk-BAgwFLbm.js';import {u}from'./chunk-CxBYhrEj.js';import {W,I}from'./chunk-CK-2DsDH.js';import {L as Lt,u as ut,p as pc,a as as,d as dc,K as Kl,c as cc,J as Ji,l as ls}from'./chunk-CrD5w72_.js';import'./chunk-hEYSTlD1.js';import {Q as QE,l as lh,C,$,V as Ve,b as at,q as qo,H as Hw,u as ue$1,a9 as Ng,o,M as Mi,L as Ln,d as dd,z as zc,c as t7,Z as y7,K as Kt,f as _i,v as vw,R as Rw,g as Kc,h as gh,m as bD,p as gI,P as Ph,O as Ow,x as ch,w as nl,B as _D,E as VD,N as ND,A as xD,F as LD,a5 as ah,a3 as xw,G as Pu,I as Lu}from'./main-RRKPLQCF.js';var ae=t=>["/jobs",t],se=(t,d)=>d.id;function le(t,d){t&1&&(_i(0,"p",3),vw(1),Rw(2,"transloco"),Kc()),t&2&&(gI(),Ph(Ow(2,1,"common.loading")));}function de(t,d){if(t&1&&(_i(0,"p",4),vw(1),Kc()),t&2){let e=VD();gI(),Ph(e.loadError());}}function ce(t,d){if(t&1&&(_i(0,"p",5),vw(1),Kc()),t&2){let e=VD(2);gI(),Ph(e.actionError());}}function pe(t,d){t&1&&(_i(0,"p",6),vw(1),Rw(2,"transloco"),Kc()),t&2&&(gI(),Ph(Ow(2,1,"worktrees.activeWarning")));}function me(t,d){t&1&&(_i(0,"p",7),vw(1),Rw(2,"transloco"),Kc()),t&2&&(gI(),Ph(Ow(2,1,"worktrees.emptyState")));}function he(t,d){if(t&1){let e=LD();_i(0,"tr")(1,"td")(2,"label",9),gh("nzCheckedChange",function(l){let _=Pu(e).$implicit,oe=VD(3);return Lu(oe.toggleSelected(_.id,l))}),Kc()(),_i(3,"td")(4,"a",10),vw(5),Kc()(),_i(6,"td"),vw(7),Kc(),_i(8,"td"),vw(9),Kc(),_i(10,"td",11),vw(11),Kc(),_i(12,"td")(13,"nz-tag"),vw(14),Rw(15,"transloco"),Kc()(),_i(16,"td"),vw(17),Kc()();}if(t&2){let e=d.$implicit,n=VD(3);ah("data-testid","worktree-row-"+e.id),gI(2),ch("nzChecked",n.isSelected(e.id)),ah("data-testid","worktree-select-"+e.id),gI(2),ch("routerLink",xw(14,ae,e.id)),ah("data-testid","worktree-job-"+e.id),gI(),Ph(e.id),gI(2),Ph(n.repoName(e)),gI(2),Ph(e.branch??"\u2014"),gI(2),Ph(e.worktreePath),gI(2),ah("data-testid","worktree-status-"+e.id),gI(),Ph(Ow(15,12,n.statusKey(e.status))),gI(3),Ph(e.createdAt);}}function ue(t,d){if(t&1&&(_i(0,"nz-table",8)(1,"thead")(2,"tr"),lh(3,"th"),_i(4,"th"),vw(5),Rw(6,"transloco"),Kc(),_i(7,"th"),vw(8),Rw(9,"transloco"),Kc(),_i(10,"th"),vw(11),Rw(12,"transloco"),Kc(),_i(13,"th"),vw(14),Rw(15,"transloco"),Kc(),_i(16,"th"),vw(17),Rw(18,"transloco"),Kc(),_i(19,"th"),vw(20),Rw(21,"transloco"),Kc()()(),_i(22,"tbody"),ND(23,he,18,16,"tr",null,se),Kc()()),t&2){let e=VD(2);ch("nzData",e.jobs())("nzShowPagination",false),gI(5),Ph(Ow(6,8,"worktrees.column.job")),gI(3),Ph(Ow(9,10,"worktrees.column.repository")),gI(3),Ph(Ow(12,12,"worktrees.column.branch")),gI(3),Ph(Ow(15,14,"worktrees.column.path")),gI(3),Ph(Ow(18,16,"worktrees.column.status")),gI(3),Ph(Ow(21,18,"worktrees.column.created")),gI(3),xD(e.jobs());}}function fe(t,d){if(t&1&&(bD(0,ce,2,1,"p",5),bD(1,pe,3,3,"p",6),bD(2,me,3,3,"p",7)(3,ue,25,20,"nz-table",8)),t&2){let e=VD();_D(e.actionError()?0:-1),gI(),_D(e.selectedHasActive()?1:-1),gI(),_D(e.jobs().length===0?2:3);}}var ne=(()=>{class t{constructor(){this.jobsApi=C($),this.reposApi=C(f),this.transloco=C(Ve),this.destroyRef=C(at),this.jobs=qo([]),this.repos=qo([]),this.selectedIds=qo([]),this.loading=qo(true),this.loadError=qo(null),this.actionError=qo(null),this.deleting=qo(false),this.selectedHasActive=Hw(()=>this.selectedJobs().some(e=>!u(e.status))),this.selectedJobs=Hw(()=>{let e=new Set(this.selectedIds());return this.jobs().filter(n=>e.has(n.id))}),this.reload();}statusKey(e){return `jobs.status.${e}`}repoName(e){return this.repos().find(l=>ge(e,l))?.name??"\u2014"}isSelected(e){return this.selectedIds().includes(e)}toggleSelected(e,n){this.selectedIds.update(l=>n?l.includes(e)?l:[...l,e]:l.filter(_=>_!==e)),this.actionError.set(null);}deleteSelected(){if(!(this.deleting()||this.selectedIds().length===0)){if(this.selectedHasActive()){this.actionError.set(this.transloco.translate("worktrees.activeWarning"));return}this.deleting.set(true),this.actionError.set(null),this.jobsApi.deleteWorktrees(this.selectedIds()).pipe(ue$1(this.destroyRef)).subscribe({next:()=>{this.deleting.set(false),this.selectedIds.set([]),this.reload();},error:e=>{this.deleting.set(false),this.actionError.set(this.errorMessage(e,this.transloco.translate("worktrees.deleteFailed")));}});}}reload(){this.loading.set(true),this.loadError.set(null),Ng({jobs:this.jobsApi.list({liveWorktree:true}),repos:this.reposApi.list()}).pipe(ue$1(this.destroyRef)).subscribe({next:({jobs:e,repos:n})=>{this.jobs.set(e),this.repos.set(n),this.loading.set(false);},error:e=>{this.loading.set(false),this.loadError.set(this.errorMessage(e,this.transloco.translate("worktrees.loadFailed")));}});}errorMessage(e,n){return e instanceof o||e instanceof Error?e.message:n}static{this.\u0275fac=function(n){return new(n||t)};}static{this.\u0275cmp=QE({type:t,selectors:[["app-worktree-list"]],decls:11,vars:8,consts:[["data-testid","worktrees-manage",1,"list-page"],[1,"header"],["nz-button","","nzDanger","","type","button","data-testid","delete-worktrees",3,"click","disabled"],["data-testid","loading"],["data-testid","load-error",1,"error"],["data-testid","action-error",1,"error"],["data-testid","active-warning",1,"warn"],["data-testid","empty-state",1,"empty"],["data-testid","worktree-table",3,"nzData","nzShowPagination"],["nz-checkbox","",3,"nzCheckedChange","nzChecked"],[3,"routerLink"],[1,"path-cell"]],template:function(n,l){n&1&&(_i(0,"div",0)(1,"header",1)(2,"h1"),vw(3),Rw(4,"transloco"),Kc(),_i(5,"button",2),gh("click",function(){return l.deleteSelected()}),vw(6),Rw(7,"transloco"),Kc()(),bD(8,le,3,3,"p",3)(9,de,2,1,"p",4)(10,fe,4,3),Kc()),n&2&&(gI(3),Ph(Ow(4,4,"worktrees.title")),gI(2),ch("disabled",l.deleting()||l.selectedIds().length===0),gI(),nl(" ",Ow(7,6,"worktrees.deleteSelected")," "),gI(2),_D(l.loading()?8:l.loadError()?9:10));},dependencies:[Mi,Ln,dd,zc,t7,y7,Lt,ut,pc,as,dc,Kl,cc,Ji,ls,W,I,Kt],styles:[".list-page[_ngcontent-%COMP%]{max-width:72rem;margin:0 auto;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}.error[_ngcontent-%COMP%]{color:#9f1239}.warn[_ngcontent-%COMP%]{color:#92400e}.path-cell[_ngcontent-%COMP%]{overflow-wrap:anywhere;word-break:break-word}"]});}}return t})();function ge(t,d){let e=(t.worktreePath??"").replaceAll("\\","/"),n=d.localPath.replaceAll("\\","/").replace(/\/+$/,""),l=(d.worktreeBasePath??xe(n)).replaceAll("\\","/");return e.startsWith(l)||e.startsWith(n)}function xe(t){let d=t.split("/"),e=d.pop()??"repo";return `${d.join("/")}/${e}-worktrees`}var $e=(()=>{class t{static{this.\u0275fac=function(n){return new(n||t)};}static{this.\u0275cmp=QE({type:t,selectors:[["app-worktrees-manage"]],decls:1,vars:0,template:function(n,l){n&1&&lh(0,"app-worktree-list");},dependencies:[ne],encapsulation:2});}}return t})();export{$e as WorktreesManageComponent};
|
package/static/chunk-DxtF2GQ1.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {X as Xt,Z as Zn,U as Ut}from'./chunk-mb666CWY.js';import {a as ai,z}from'./chunk-WGWZEfc0.js';import {C,V as Ve,bi as U0,a0 as $0,Q as QE,n as n8,am as S4,J as J6,k as k3,d as dd,z as zc,c as t7,Z as y7,K as Kt,f as _i,h as gh,g as Kc,j as oE,v as vw,R as Rw,p as gI,x as ch,y as sE,w as nl,O as Ow,b as at,q as qo,H as Hw,u as ue,r,o,M as Mi,N as ND,m as bD,A as xD,B as _D,ae as Zi,a8 as a,by as re,af as E,i as ie,P as Ph,E as VD,a5 as ah,F as LD,a4 as Mh,U as Lh,G as Pu,I as Lu}from'./main-RRKPLQCF.js';var fe=(()=>{class t{constructor(){this.http=C(Zi),this.baseUrl=`${a.apiBaseUrl}/filesystem`;}browse(e,i){let n=new re;return e!=null&&e.trim()!==""&&(n=n.set("path",e.trim())),i?.mode&&(n=n.set("mode",i.mode)),i?.extensions&&i.extensions.length>0&&(n=n.set("extensions",i.extensions.join(","))),this.http.get(`${this.baseUrl}/browse`,{params:n}).pipe(E())}static{this.\u0275fac=function(i){return new(i||t)};}static{this.\u0275prov=ie({token:t,factory:t.\u0275fac,providedIn:"root"});}}return t})();function R(t){if(!t)return [];if(/^[A-Za-z]:/.test(t)){let r=t.includes("\\")?"\\":"/",m=`${t.slice(0,2)}${r}`,x=t.slice(2).replace(/^[\\/]+/,"").split(/[\\/]/).filter(Boolean),U=[{label:t.slice(0,2),path:m}],f=m;for(let $ of x)f=f.endsWith(r)?f+$:f+r+$,U.push({label:$,path:f});return U}if(t.startsWith("/")){let r=t.split("/").filter(Boolean),m=[{label:"/",path:"/"}],E="";for(let x of r)E+=`/${x}`,m.push({label:x,path:E});return m}let o=t.includes("\\")?"\\":"/",e=t.split(/[\\/]/).filter(Boolean),i=[],n="";for(let r of e)n=n?n+o+r:r,i.push({label:r,path:n});return i}function L(t){let o=R(t);return o.length<2?null:o[o.length-2].path}var _e=(t,o)=>o.path;function xe(t,o){if(t&1){let e=LD();_i(0,"button",7),gh("click",function(){Pu(e);let n=VD().$implicit,r=VD();return Lu(r.loadDir(n.path))}),vw(1),Kc(),_i(2,"span",8),vw(3,"/"),Kc();}if(t&2){let e=VD().$implicit;ah("data-testid","file-browser-crumb-"+e.label),gI(),nl(" ",e.label," ");}}function we(t,o){if(t&1&&(_i(0,"span",6),vw(1),Kc()),t&2){let e=VD().$implicit;ah("data-testid","file-browser-crumb-"+e.label),gI(),Ph(e.label);}}function De(t,o){if(t&1&&bD(0,xe,4,2)(1,we,2,2,"span",6),t&2){let e=o.$index,i=o.$count;_D(e!==i-1?0:1);}}function ye(t,o){t&1&&(_i(0,"p",3),vw(1),Rw(2,"transloco"),Kc()),t&2&&(gI(),Ph(Ow(2,1,"common.loading")));}function ve(t,o){if(t&1&&(_i(0,"p",4),vw(1),Kc()),t&2){let e=VD();gI(),Ph(e.error());}}function Me(t,o){if(t&1){let e=LD();_i(0,"li")(1,"button",9),gh("click",function(){let n=Pu(e),r=VD(2);return Lu(r.loadDir(n))}),vw(2," ../ "),Kc()();}}function ke(t,o){if(t&1){let e=LD();_i(0,"li")(1,"button",10),gh("click",function(){let n=Pu(e).$implicit,r=VD(2);return Lu(r.onEntry(n))}),vw(2),Kc()();}if(t&2){let e=o.$implicit,i=VD(2);gI(),Mh("dir",e.isDirectory)("selected",i.isSelected(e)),ah("data-testid","file-browser-entry-"+e.name),gI(),Lh(" ",e.name,"",e.isDirectory?"/":""," ");}}function Fe(t,o){if(t&1&&(_i(0,"ul",5),bD(1,Me,3,0,"li"),ND(2,ke,3,7,"li",null,_e),Kc()),t&2){let e,i=VD();gI(),_D((e=i.parentDir())?1:-1,e),gI(),xD(i.entries());}}var ge=(()=>{class t{constructor(){this.filesystem=C(fe),this.transloco=C(Ve),this.destroyRef=C(at),this.modalData=C(Ut,{optional:true}),this.path=U0(this.modalData?.path??""),this.mode=$0(this.modalData?.mode??"files"),this.extensions=$0(this.modalData?.extensions??[]),this.currentDir=qo(""),this.entries=qo([]),this.loading=qo(false),this.error=qo(null),this.crumbs=Hw(()=>R(this.currentDir())),this.parentDir=Hw(()=>L(this.currentDir()));}ngOnInit(){this.openAround(this.path());}isSelected(e){return this.mode()==="directories"?e.isDirectory&&e.path===this.path():!e.isDirectory&&e.path===this.path()}onEntry(e){if(e.isDirectory){this.loadDir(e.path);return}this.mode()==="files"&&this.path.set(e.path);}loadDir(e){this.loading.set(true),this.error.set(null),this.filesystem.browse(e,this.browseFilter()).pipe(ue(this.destroyRef)).subscribe({next:i=>this.applyListing(i),error:i=>{this.loading.set(false),this.error.set(this.errorMessage(i,this.transloco.translate("file-browser.loadFailed")));}});}browseFilter(){let e=this.extensions();return r({mode:this.mode()},e.length>0?{extensions:e}:{})}openAround(e){let i=e.trim();if(!i){this.loadDir(void 0);return}this.loading.set(true),this.error.set(null),this.filesystem.browse(i,this.browseFilter()).pipe(ue(this.destroyRef)).subscribe({next:n=>this.applyListing(n),error:()=>this.loadDir(L(i)??void 0)});}applyListing(e){this.currentDir.set(e.path),this.entries.set(e.entries),this.mode()==="directories"&&this.path.set(e.path),this.loading.set(false),this.error.set(null);}errorMessage(e,i){return e instanceof o||e instanceof Error?e.message:i}static{this.\u0275fac=function(i){return new(i||t)};}static{this.\u0275cmp=QE({type:t,selectors:[["app-file-browser"]],inputs:{path:[1,"path"],mode:[1,"mode"],extensions:[1,"extensions"]},outputs:{path:"pathChange"},decls:10,vars:4,consts:[["data-testid","file-browser",1,"file-browser"],["data-testid","file-browser-selected",1,"selected"],["data-testid","file-browser-breadcrumbs",1,"crumbs"],["data-testid","file-browser-loading"],["data-testid","file-browser-error",1,"error"],["data-testid","file-browser-entries",1,"entries"],[1,"current"],["nz-button","","nzType","link","type","button",3,"click"],["aria-hidden","true",1,"sep"],["type","button","data-testid","file-browser-up",1,"entry","dir",3,"click"],["type","button",1,"entry",3,"click"]],template:function(i,n){i&1&&(_i(0,"div",0)(1,"p",1),vw(2),Rw(3,"transloco"),Kc(),_i(4,"nav",2),ND(5,De,2,1,null,null,_e),Kc(),bD(7,ye,3,3,"p",3)(8,ve,2,1,"p",4)(9,Fe,4,1,"ul",5),Kc()),i&2&&(gI(2),nl(" ",n.path()||Ow(3,2,n.mode()==="directories"?"file-browser.emptySelectionDirectory":"file-browser.emptySelection")," "),gI(3),xD(n.crumbs()),gI(2),_D(n.loading()?7:n.error()?8:9));},dependencies:[Mi,dd,zc,t7,Kt],styles:[".file-browser[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.45rem}.selected[_ngcontent-%COMP%]{margin:0;font-size:.85rem;color:#44403c;overflow-wrap:anywhere;word-break:break-word}.crumbs[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:center;gap:.1rem;font-size:.85rem}.crumbs[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{padding-inline:.15rem;height:auto}.sep[_ngcontent-%COMP%]{color:#a8a29e}.current[_ngcontent-%COMP%]{color:#1c1917;font-weight:600}.entries[_ngcontent-%COMP%]{list-style:none;margin:0;padding:.2rem 0;max-height:20rem;overflow:auto;border:1px solid #e7e5e4;background:#fff}.entry[_ngcontent-%COMP%]{display:block;width:100%;text-align:left;border:0;background:transparent;padding:.3rem .6rem;cursor:pointer;font:inherit;color:inherit}.entry[_ngcontent-%COMP%]:hover{background:#f5f5f4}.entry.dir[_ngcontent-%COMP%]{font-weight:600}.entry.selected[_ngcontent-%COMP%]{background:#e7e5e4}.error[_ngcontent-%COMP%]{margin:0;color:#9f1239}"]});}}return t})();var ot=(()=>{class t{constructor(){this.modal=C(Xt),this.transloco=C(Ve),this.path=U0(""),this.mode=$0("files"),this.extensions=$0([]),this.placeholder=$0(void 0);}placeholderText(){return this.placeholder()||this.transloco.translate(this.mode()==="directories"?"path-picker.placeholderDirectory":"path-picker.placeholderFile")}openBrowse(){let e=this.mode(),i=this.modal.create({nzTitle:this.transloco.translate(e==="directories"?"path-picker.modalTitleDirectory":"path-picker.modalTitleFile"),nzContent:ge,nzData:{path:this.path(),mode:e,extensions:this.extensions()},nzWidth:640,nzOkText:this.transloco.translate(e==="directories"?"file-browser.useFolder":"path-picker.selectFile"),nzCancelText:this.transloco.translate("common.cancel"),nzOnOk:()=>{let n=i.getContentComponent();this.path.set(n.path());}});}static{this.\u0275fac=function(i){return new(i||t)};}static{this.\u0275cmp=QE({type:t,selectors:[["app-path-picker"]],inputs:{path:[1,"path"],mode:[1,"mode"],extensions:[1,"extensions"],placeholder:[1,"placeholder"]},outputs:{path:"pathChange"},decls:5,vars:5,consts:[["data-testid","path-picker",1,"path-picker"],["nz-input","","data-testid","path-picker-input",3,"ngModelChange","placeholder","ngModel"],["nz-button","","type","button","data-testid","path-picker-browse",3,"click"]],template:function(i,n){i&1&&(_i(0,"div",0)(1,"input",1),gh("ngModelChange",function(m){return n.path.set(m)}),Kc(),oE(),_i(2,"button",2),gh("click",function(){return n.openBrowse()}),vw(3),Rw(4,"transloco"),Kc()()),i&2&&(gI(),ch("placeholder",n.placeholderText())("ngModel",n.path()),sE(),gI(2),nl(" ",Ow(4,3,"path-picker.browse")," "));},dependencies:[n8,S4,J6,k3,dd,zc,t7,y7,ai,z,Zn,Kt],styles:[".path-picker[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:center}.path-picker[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{flex:1;min-width:0}"]});}}return t})();export{ot as o};
|
package/static/chunk-KhdCYqqN.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {q as qo,H as Hw,a8 as a,i as ie}from'./main-RRKPLQCF.js';var f=(()=>{class e{connect(t){let n=new URLSearchParams;t?.jobId&&n.set("jobId",t.jobId),t?.batchId&&n.set("batchId",t.batchId);let r=n.toString(),p=`${a.apiBaseUrl}/events${r?`?${r}`:""}`,a$1=qo([]),b=Hw(()=>{let o=a$1();return o.length>0?o[o.length-1]:void 0}),s=new EventSource(p);return s.onmessage=o=>{let c;try{c=JSON.parse(o.data);}catch(d){return}a$1.update(d=>[...d,c]);},{events:a$1.asReadonly(),latest:b,close:()=>{s.onmessage=null,s.close();}}}static{this.\u0275fac=function(n){return new(n||e)};}static{this.\u0275prov=ie({token:e,factory:e.\u0275fac,providedIn:"root"});}}return e})();export{f};
|
package/static/chunk-TkjFi8lV.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {an as YE,ao as uu,bp as P1,ap as pT,C,at as z0,aw as Le$1,av as hT,bq as Vt,Q as QE,aC as Tt,aD as Ie$1,b8 as es,aF as Z0,b9 as BD,m as bD,f as _i,g as Kc,B as _D,p as gI,br as sw,a4 as Mh,bs as vh,aK as qD,aL as WD,aM as ut,bt as l9,r,aE as ly,E as VD,aN as nh,x as ch,l as lh,a6 as Nw,bn as $D,N as ND,a7 as MD,A as xD,bu as XE,bv as uh,ag as _h,aO as el,v as vw,aP as tl,P as Ph,bw as rh,aJ as Ih,bx as Er,S as SD}from'./main-RRKPLQCF.js';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 Te=(()=>{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 ye=(()=>{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 l9(t)}getTitleProps(){let t=!!this.nzAvatar,n=!!this.nzParagraph,i="";return !t&&n?i="38%":t&&n&&(i="50%"),r({width:i},this.getProps(this.nzTitle))}getAvatarProps(){let t=this.nzTitle&&!this.nzParagraph?"square":"circle";return r({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(r({},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:[Te,ye],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 Ee(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 we(e,a){e&1&&$D(0);}var Pe=()=>({rows:4});function Be(e,a){if(e&1&&(el(0),vw(1),tl()),e&2){let t=VD(3);gI(),Ph(t.nzTitle);}}function Oe(e,a){if(e&1&&(_i(0,"div",6),nh(1,Be,2,1,"ng-container",9),Kc()),e&2){let t=VD(2);gI(),ch("nzStringTemplateOutlet",t.nzTitle);}}function Fe(e,a){if(e&1&&(el(0),vw(1),tl()),e&2){let t=VD(3);gI(),Ph(t.nzExtra);}}function Le(e,a){if(e&1&&(_i(0,"div",7),nh(1,Fe,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 qe(e,a){if(e&1&&(_i(0,"div",0)(1,"div",5),bD(2,Oe,2,1,"div",6),bD(3,Le,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 je(e,a){}function Re(e,a){if(e&1&&(_i(0,"div",1),nh(1,je,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 Ve(e,a){}function $e(e,a){if(e&1&&(_i(0,"li")(1,"span"),nh(2,Ve,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 Ue(e,a){if(e&1&&(_i(0,"ul",4),ND(1,$e,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,Ee,3,2,"div",1)),n&2&&(_D(i.nzAvatar?0:-1),gI(),_D(i.nzTitle||i.nzDescription?1:-1));},dependencies:[es,Tt,Ie$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 S;qD(S=WD())&&(i.template=S.first);}},exportAs:["nzCardTab"],ngContentSelectors:me,decls:1,vars:0,template:function(n,i){n&1&&(BD(),rh(0,we,1,0,"ng-template"));},encapsulation:2})}return e})(),ze="card",Ke=(()=>{let e,a=[],t=[],n,i=[],S=[],W,Z=[],J=[];return class U{static{let C=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;e=[ut()],n=[ut()],W=[ut()],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:C},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:C},i,S),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:C},Z,J),C&&Object.defineProperty(this,Symbol.metadata,{enumerable:true,configurable:true,writable:true,value:C});}cdr=C(z0);dir=C(Le$1).valueSignal;_nzModuleName=ze;nzBordered=hT(this,a,true);nzLoading=(hT(this,t),false);nzHoverable=hT(this,i,false);nzBodyStyle=(hT(this,S),null);nzCover;nzActions=[];nzType=null;nzSize=hT(this,Z,"default");nzTitle=hT(this,J);nzExtra;listOfNzCardTabComponent;listOfNzCardGridDirective;constructor(){Vt(ze,()=>this.cdr.markForCheck());}static \u0275fac=function(r){return new(r||U)};static \u0275cmp=QE({type:U,selectors:[["nz-card"]],contentQueries:function(r,l,K){if(r&1&&vh(K,Je,5)(K,We,4),r&2){let E;qD(E=WD())&&(l.listOfNzCardTabComponent=E.first),qD(E=WD())&&(l.listOfNzCardGridDirective=E);}},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,qe,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,Ue,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:[Tt,Ie$1,es,pe,ce],encapsulation:2})}})(),Nt=(()=>{class e{static \u0275fac=function(n){return new(n||e)};static \u0275mod=YE({type:e});static \u0275inj=uu({imports:[Ke,Ze,P1]})}return e})();export{Ke as K,Nt as N};
|
package/static/chunk-UArWmYDU.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {$ as $$1,R,y,T,P,q,D,N,w,V,_}from'./chunk-CN5_Adst.js';import {C as Cx,_ as _y,X as Xm}from'./chunk-BdrifDCS.js';import {a as ai,z}from'./chunk-WGWZEfc0.js';import {_ as _n,C as Cn}from'./chunk-DqECIHE5.js';import {C,aj as $,b as at,V as Ve,q as qo,H as Hw,a9 as Ng,u as ue,s,r,ak as Ml,al as Se,aa as Xi,ab as Dg,o,Q as QE,M as Mi,n as n8,am as S4,J as J6,k as k3,d as dd,z as zc,c as t7,Z as y7,X as Xb,e as V5,D as D5,K as Kt$1,f as _i,v as vw,R as Rw,g as Kc,h as gh,m as bD,p as gI,P as Ph,O as Ow,w as nl,B as _D,an as YE,ao as uu,ap as pT,aq as kt$1,ar as _r,as as oe,at as z0,au as a3,av as hT,aw as Le,ax as m1,ay as St,az as c8,aA as pt,aB as Se$1,aC as Tt,aD as Ie,aE as ly,aF as Z0,l as lh,a4 as Mh,x as ch,a5 as ah,aG as Sw,aH as h1,aI as wo,aJ as Ih,aK as qD,aL as WD,E as VD,N as ND,A as xD,F as LD,j as oE,y as sE,aM as ut,aN as nh,S as SD,aO as el,aP as tl,G as Pu,I as Lu}from'./main-RRKPLQCF.js';import {G as Gn,u as un}from'./chunk-BquoV7tV.js';import {W,I}from'./chunk-CK-2DsDH.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-CrD5w72_.js';import'./chunk-hEYSTlD1.js';var yt=["switchElement"];function bt(i,p){i&1&&lh(0,"nz-icon",3);}function Et(i,p){if(i&1&&(el(0),vw(1),tl()),i&2){let e=VD(2);gI(),Ph(e.nzCheckedChildren);}}function It(i,p){if(i&1&&nh(0,Et,2,1,"ng-container",6),i&2){let e=VD();ch("nzStringTemplateOutlet",e.nzCheckedChildren);}}function wt(i,p){if(i&1&&(el(0),vw(1),tl()),i&2){let e=VD(2);gI(),Ph(e.nzUnCheckedChildren);}}function Nt(i,p){if(i&1&&nh(0,wt,2,1,"ng-container",6),i&2){let e=VD();ch("nzStringTemplateOutlet",e.nzUnCheckedChildren);}}var kt="switch",J=(()=>{let i,p=[],e=[];return class K{static{let t=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;i=[ut()],pT(null,null,i,{kind:"field",name:"nzSize",static:false,private:false,access:{has:r=>"nzSize"in r,get:r=>r.nzSize,set:(r,u)=>{r.nzSize=u;}},metadata:t},p,e),t&&Object.defineProperty(this,Symbol.metadata,{enumerable:true,configurable:true,writable:true,value:t});}_nzModuleName=kt;nzConfigService=C(kt$1);el=C(_r).nativeElement;ngZone=C(oe);cdr=C(z0);focusMonitor=C(a3);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(Le).valueSignal;isNzDisableFirstChange=true;size=qo(this.nzSize);formSize=C(m1,{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(){St(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();});}),St(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,u){if(r&1&&Ih(yt,7),r&2){let q;qD(q=WD())&&(u.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:h1,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,u){r&1&&(_i(0,"button",1,0)(2,"span",2),bD(3,bt,1,0,"nz-icon",3),Kc(),_i(4,"span",4),bD(5,It,1,1,"ng-container")(6,Nt,1,1,"ng-container"),Kc(),lh(7,"div",5),Kc()),r&2&&(Mh("ant-switch-checked",u.isChecked)("ant-switch-loading",u.nzLoading)("ant-switch-disabled",u.nzDisabled)("ant-switch-small",u.finalSize()==="small")("ant-switch-rtl",u.dir()==="rtl"),ch("disabled",u.nzDisabled)("nzWaveExtraNode",true),ah("id",u.nzId),gI(3),_D(u.nzLoading?3:-1),gI(2),_D(u.isChecked?5:6));},dependencies:[c8,y7,pt,Se$1,Tt,Ie],encapsulation:2})}})(),ht=(()=>{class i{static \u0275fac=function(o){return new(o||i)};static \u0275mod=YE({type:i});static \u0275inj=uu({imports:[J]})}return i})();var Y=(i,p)=>p.id,Dt=(i,p)=>p.key;function Ot(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 Vt(i,p){i&1&&(_i(0,"p",5),vw(1),Rw(2,"transloco"),Kc()),i&2&&(gI(),Ph(Ow(2,1,"common.loading")));}function Pt(i,p){if(i&1&&(_i(0,"p",6),vw(1),Kc()),i&2){let e=VD();gI(),Ph(e.loadError());}}function At(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 Ft(i,p){if(i&1){let e=LD();_i(0,"tr")(1,"td",10)(2,"span"),vw(3),Kc(),bD(4,At,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,o=VD(2);ah("data-testid","instance-"+e.id),gI(),ah("data-testid",e.id+"-name"),gI(2),Ph(e.displayName),gI(),_D(o.isDefaultAgent(e)?4:-1),gI(2),ah("data-testid",e.id+"-type"),gI(),Ph(Ow(8,15,o.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 Bt(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,Ft,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 Rt(i,p){if(i&1&&(_i(0,"li"),vw(1),Kc()),i&2){let e=p.$implicit;gI(),Ph(e);}}function Lt(i,p){if(i&1&&(_i(0,"section",16)(1,"h3"),vw(2),Rw(3,"transloco"),Kc(),_i(4,"ul"),ND(5,Rt,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 Kt(i,p){if(i&1&&(_i(0,"p",17),vw(1),Kc()),i&2){let e=VD(2);gI(),Ph(e.secretSaveError());}}function qt(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 $t(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,u=VD(2);return Lu(u.setDraftConfig(r.key,t))}),Kc(),oE(),Kc();}if(i&2){let e=p.$implicit,o=VD(2);gI(2),Ph(Ow(3,3,e.labelKey)),gI(2),ch("ngModel",o.configValue(o.draft().config,e.key)),ah("data-testid","provider-config-"+e.key),sE();}}function jt(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 Ut(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 Wt(i,p){if(i&1&&lh(0,"nz-option",24),i&2){let e=p.$implicit;ch("nzValue",e.id)("nzLabel",e.displayName);}}function Zt(i,p){if(i&1&&(_i(0,"p",35),vw(1),Kc()),i&2){let e=VD(3);gI(),Ph(e.modelsError());}}function Ht(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,Ut,1,2,"nz-option",24),ND(7,Wt,1,2,"nz-option",24,Y),Kc(),oE(),bD(9,Zt,2,1,"p",35),_i(10,"p",22),vw(11),Rw(12,"transloco"),Kc()(),_i(13,"label",36)(14,"span"),vw(15),Rw(16,"transloco"),Kc(),_i(17,"nz-switch",37),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,8,"settings.model.label")),gI(2),ch("nzPlaceHolder",Ow(5,10,"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,12,"settings.model.hint")),gI(4),Ph(Ow(16,14,"settings.defaultAgent.toggle")),gI(2),ch("ngModel",e.draft().defaultAgent),sE();}}function Qt(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,Lt,7,3,"section",16),bD(6,Kt,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,qt,2,4,"nz-option",24,Y),Kc(),oE(),Kc(),ND(27,$t,5,5,"label",18,Dt),_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,jt,3,5,"button",27),Kc()(),bD(37,Ht,18,16),_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 Ui=(()=>{class i{constructor(){this.api=C($),this.providersApi=C($$1),this.message=C(Cx),this.destroyRef=C(at),this.transloco=C(Ve),this.loaded=qo({providerInstances:[]}),this.status=qo([]),this.draft=qo(R()),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=y,this.configFields=T,this.typeLabelKey=P,this.isAgent=_y,Ng({settings:this.api.getSettings(),status:this.api.getProviderStatus()}).pipe(ue(this.destroyRef)).subscribe({next:({settings:e,status:o})=>{this.applySettings(e,false),this.status.set(o),this.loading.set(false);},error:e=>{this.loading.set(false),this.loadError.set(this.errorMessage(e,this.transloco.translate("settings.loadFailed")));}});}configValue(e,o){let t=e[o];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(o=>o.id===e):false}canFetchModels(){let e=this.draft();return e.kind==="agent"&&(e.secretValue.trim().length>0||e.originalId!=null)}openCreate(){this.resetModal(R());}openEdit(e){this.resetModal(q(e,this.isDefaultAgent(e)));}closeModal(){this.modalOpen.set(false);}onDisplayNameChange(e){this.draft.update(o=>D(o,e,this.existingIds(o)));}onIdChange(e){this.draft.update(o=>N(o,e));}onTypeChange(e){this.availableModels.set([]),this.modelsError.set(null),this.draft.update(o=>{let t=w(o,e);return t.kind!=="agent"||o.kind==="agent"?t:s(r({},t),{defaultAgent:this.shouldDefaultNewAgent(o)})});}setDraftConfig(e,o){this.draft.update(t=>s(r({},t),{config:s(r({},t.config),{[e]:o})}));}setSecretValue(e){this.draft.update(o=>s(r({},o),{secretValue:e}));}setExpiresOn(e){this.draft.update(o=>s(r({},o),{expiresOn:e}));}setDefaultAgentDraft(e){this.draft.update(o=>s(r({},o),{defaultAgent:e}));}fetchModels(){let e=this.draft();if(e.kind!=="agent"||!this.canFetchModels())return;let o=e.secretValue.trim();this.fetchingModels.set(true),this.modelsError.set(null),this.providersApi.previewModels(o?{type:e.type,apiKey:o}:{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 o=Xm.safeParse(V(e));if(!o.success){this.validationErrors.set(_(o.error));return}this.saving.set(true);let t=o.data,r$1=t.kind==="agent"?{defaultAgent:e.defaultAgent}:{};(e.originalId==null?this.api.createProviderInstance(r(r({},t),r$1)):this.api.updateProviderInstance(e.originalId,r({displayName:t.displayName,config:t.config,secretKey:t.secretKey,expiresOn:t.expiresOn??null},r$1))).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(_t=>Dg({kind:"secret-failed",err:_t}))):Dg({kind:"ok"})}),ue(this.destroyRef)).subscribe({next:T=>{if(this.saving.set(false),T.kind==="secret-failed"){this.draft.update(P=>s(r({},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:o=>this.applySettings(o.settings,o.restartRequired),error:o=>{this.message.error(this.errorMessage(o,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(o=>o.id).filter(o=>o!==e.originalId)}applySettings(e,o){let t=e.providerInstances??[];this.loaded.set(r({providerInstances:t},e.defaultAgentInstanceId?{defaultAgentInstanceId:e.defaultAgentInstanceId}:{})),o&&this.restartRequired.set(true);}refreshStatus(){this.api.getProviderStatus().subscribe({next:e=>this.status.set(e),error:()=>{}});}errorMessage(e,o$1){return e instanceof o||e instanceof Error?e.message:o$1}static{this.\u0275fac=function(o){return new(o||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"],[1,"field","field-switch"],["data-testid","provider-default-agent",3,"ngModelChange","ngModel"]],template:function(o,t){o&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,Ot,3,3,"div",4),bD(13,Vt,3,3,"p",5)(14,Pt,2,1,"p",6)(15,Bt,18,15,"nz-table",7),bD(16,Qt,53,43,"div",8),Kc()),o&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:[Mi,n8,S4,J6,k3,Gn,un,dd,zc,t7,y7,ai,z,_n,Cn,Xb,V5,D5,ht,J,pc,as,dc,Kl,cc,Ji,ls,W,I,Kt$1],styles:[".settings[_ngcontent-%COMP%]{max-width:72rem;margin:0 auto;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}.name-cell[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.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{Ui as ProvidersManageComponent,Ui as SettingsComponent};
|
package/static/chunk-WGWZEfc0.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {an as YE,ao as uu,C,ar as _r,aW as N1,b as at$1,aZ as ga,bL as A,au as a3,cy as ji,ds as bt$1,q as qo,H as Hw,a0 as $0,aF as Z0,aw as Le,b0 as Uw,ax as m1,a$ as za,aT as de,al as Se,cT as mt,b2 as D8,dt as Me,u as ue,W as rd,bB as Gl,b7 as va,b6 as g9,bu as XE,aG as Sw,bb as B1,bc as rD,bd as R4,h as gh,a5 as ah,be as cw,a4 as Mh,b1 as W0,bx as Er,a1 as B0,r,b3 as p9,ak as Ml,a_ as j3,c8 as h9,b5 as Kf,Q as QE,aA as pt,aB as Se$1,d as dd,z as zc,c as t7,Z as y7,b8 as es,b9 as BD,m as bD,aN as nh,ba as Lw,B as _D,aI as wo,bh as Eh,bg as GD,du as G5,dv as p3,dw as zl,dx as $5,am as S4,J as J6,dy as R0,dz as tr,aE as ly,aV as Y0,N as ND,a7 as MD,A as xD,aH as h1,aJ as Ih,aK as qD,aL as WD,bi as U0,E as VD,bk as zD,x as ch,f as _i,g as Kc,p as gI,bn as $D,F as LD,G as Pu,I as Lu,j as oE,y as sE,cx as Bh,dA as Tw,v as vw,P as Ph,l as lh,a3 as xw,dB as Cw,w as nl}from'./main-RRKPLQCF.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(N1,{optional:true});destroyRef=C(at$1);nzFormStatusService=C(ga,{optional:true});inputWrapper=C(dt,{host:true,optional:true});focusMonitor=C(a3);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(bt$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(Le).valueSignal;size=Uw(this.nzSize);formSize=C(m1,{optional:true});formVariant=C(za,{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(()=>D8(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(va),this.feedbackRef.location.nativeElement.classList.add("ant-input-suffix"),this.feedbackRef.setInput("status",this.status());}focus(e){g9(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:B1,useValue:"input"}]),rD([R4])]})}return t})(),rn=(()=>{class t{formBuilder=C(G5);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("",[p3.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:h1,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,$5,S4,J6,R0,tr],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(a3);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(N1,{optional:true});dir=C(Le).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(r({"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"},D8("ant-input-affix-wrapper",this.status(),this.hasFeedback())),p9("ant-input-affix-wrapper",this.variant())));groupWrapperClass=Hw(()=>r(r({"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"},D8("ant-input-group-wrapper",this.status(),this.hasFeedback())),p9("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=j3(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 h9(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();j3(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:B1,useValue:"input"},{provide:dt,useExisting:wo(()=>t)}]),rD([R4])],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:[pt,Se$1,dd,zc,t7,y7,va,es],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};
|
package/static/chunk-jg6TAN9F.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {C,ae as Zi,a8 as a,cg as u,af as E,i as ie}from'./main-RRKPLQCF.js';var U=(()=>{class r{constructor(){this.http=C(Zi),this.baseUrl=`${a.apiBaseUrl}/workflows`;}list(t){return this.http.get(this.baseUrl,{params:u(t)}).pipe(E())}get(t){return this.http.get(`${this.baseUrl}/${encodeURIComponent(t)}`).pipe(E())}create(t){return this.http.post(this.baseUrl,t).pipe(E())}update(t,i){return this.http.patch(`${this.baseUrl}/${encodeURIComponent(t)}`,i).pipe(E())}delete(t){return this.http.delete(`${this.baseUrl}/${encodeURIComponent(t)}`).pipe(E())}static{this.\u0275fac=function(i){return new(i||r)};}static{this.\u0275prov=ie({token:r,factory:r.\u0275fac,providedIn:"root"});}}return r})();export{U};
|
package/static/chunk-mb666CWY.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {C,aY as Ee,aq as kt,aw as Le,bz as re,bA as Vg,bB as Gl,bC as Rt$1,bD as Bu,bE as pn,bF as Ga,bG as Na,bH as t2,bI as K1,bJ as A1,bK as G1,a_ as j3,bL as A,i as ie$1,an as YE,ao as uu,r,bM as Le$1,bN as Sy,Q as QE,aA as pt,aB as Se$1,aC as Tt,aD as Ie,bO as Z4,bP as Da,d as dd,z as zc,c as t7,Z as y7,bQ as Ky,bR as eh,f as _i,R as Rw,m as bD,l as lh,aN as nh,g as Kc,br as sw,be as cw,ag as _h,O as Ow,p as gI,B as _D,x as ch,bc as rD,bS as on,h as gh,a4 as Mh,aJ as Ih,aK as qD,aL as WD,bT as W,bU as We,bV as Ge,bW as on$1,bX as yt$1,bY as im,bZ as Pa,b_ as v,b$ as wr,at as z0,a0 as $0,a1 as B0,c0 as G4,c1 as Uo,as as oe,ar as _r,c2 as i0,c3 as XI,c4 as Gm,b as at,bq as Vt$1,c5 as s9,c6 as x1,ay as St$1,u as ue,bu as XE,c7 as eD,F as LD,aO as el,aP as tl,E as VD,v as vw,a5 as ah,w as nl,G as Pu,I as Lu,c8 as h9,c9 as d9,ca as Aw,N as ND,S as SD,A as xD,cb as vv}from'./main-RRKPLQCF.js';(class n{static formats={B:{max:1024},kB:{max:Math.pow(1024,2),prev:"B"},KB:{max:Math.pow(1024,2),prev:"B"},MB:{max:Math.pow(1024,3),prev:"kB"},GB:{max:Math.pow(1024,4),prev:"MB"},TB:{max:Number.MAX_SAFE_INTEGER,prev:"GB"}};transform(o,e=0,t="B",i){if(!(h9(o)&&h9(e)&&e%1===0&&e>=0))return o;let a=o,r=t;for(;r!=="B";)a*=1024,r=n.formats[r].prev;if(i){let m=n.formats[i],k=d9(n.calculateResult(m,a),e);return n.formatResult(k,i)}for(let m in n.formats)if(n.formats.hasOwnProperty(m)){let k=n.formats[m];if(a<k.max){let kt=d9(n.calculateResult(k,a),e);return n.formatResult(kt,m)}}}static formatResult(o,e){return `${o} ${e}`}static calculateResult(o,e){let t=o.prev?n.formats[o.prev]:void 0;return t?e/t.max:e}static \u0275fac=function(e){return new(e||n)};static \u0275pipe=eD({name:"nzBytes",type:n,pure:true})});var Se=(()=>{class n{transform(e,t="px"){return typeof e=="number"?`${e}${t}`:e}static \u0275fac=function(t){return new(t||n)};static \u0275pipe=eD({name:"nzToCssUnit",type:n,pure:true})}return n})();var Fe=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275mod=YE({type:n});static \u0275inj=uu({})}return n})();function Ot(n,o){if(n&1&&(el(0),lh(1,"nz-icon",2),tl()),n&2){let e=o.$implicit;gI(),ch("nzType",e);}}var gt=["modalElement"];function Dt(n,o){if(n&1){let e=LD();_i(0,"button",16),gh("click",function(){Pu(e);let i=VD();return Lu(i.onCloseClick())}),Kc();}}function xt(n,o){if(n&1&&(el(0),lh(1,"span",12),tl()),n&2){let e=VD();gI(),ch("innerHTML",e.config.nzTitle,vv);}}function Et(n,o){}function Nt(n,o){if(n&1&&lh(0,"div",12),n&2){let e=VD();ch("innerHTML",e.config.nzContent,vv);}}function At(n,o){if(n&1){let e=LD();_i(0,"button",17),gh("click",function(){Pu(e);let i=VD();return Lu(i.onCancel())}),vw(1),Rw(2,"nzI18n"),Kc();}if(n&2){let e=VD();ch("nzLoading",e.config.nzCancelLoading)("disabled",e.config.nzCancelDisabled),ah("cdkFocusInitial",e.config.nzAutofocus==="cancel"||null),gI(),nl(" ",e.config.nzCancelText||Ow(2,4,"Modal.cancelText")," ");}}function St(n,o){if(n&1){let e=LD();_i(0,"button",18),gh("click",function(){Pu(e);let i=VD();return Lu(i.onOk())}),vw(1),Rw(2,"nzI18n"),Kc();}if(n&2){let e=VD();ch("nzType",e.config.nzOkType)("nzLoading",e.config.nzOkLoading)("disabled",e.config.nzOkDisabled)("nzDanger",e.config.nzOkDanger),ah("cdkFocusInitial",e.config.nzAutofocus==="ok"||null),gI(),nl(" ",e.config.nzOkText||Ow(2,6,"Modal.okText")," ");}}var Ft=(n,o)=>({$implicit:n,modalRef:o});function Rt(n,o){if(n&1){let e=LD();_i(0,"button",3),gh("click",function(){let i=Pu(e).$implicit,a=VD(4);return Lu(a.onButtonClick(i))}),vw(1),Kc();}if(n&2){let e=o.$implicit,t=VD(4);ch("hidden",!t.getButtonCallableProp(e,"show"))("nzLoading",t.getButtonCallableProp(e,"loading"))("disabled",t.getButtonCallableProp(e,"disabled"))("nzType",e.type)("nzDanger",e.danger)("nzShape",e.shape)("nzSize",e.size)("nzGhost",e.ghost),gI(),nl(" ",e.label," ");}}function wt(n,o){if(n&1&&ND(0,Rt,2,9,"button",2,SD),n&2){let e=VD(3);xD(e.buttons);}}function Lt(n,o){if(n&1&&lh(0,"div",1),n&2){let e=VD(3);ch("innerHTML",e.config.nzFooter,vv);}}function It(n,o){if(n&1&&(el(0),bD(1,wt,2,0)(2,Lt,1,1,"div",1),tl()),n&2){let e=VD(2);gI(),_D(e.buttons?1:2);}}function Bt(n,o){if(n&1&&nh(0,It,3,1,"ng-container",0),n&2){let e=VD();ch("nzStringTemplateOutlet",e.config.nzFooter)("nzStringTemplateOutletContext",Aw(2,Ft,e.config.nzData,e.modalRef()));}}function Pt(n,o){if(n&1){let e=LD();_i(0,"button",6),gh("click",function(){Pu(e);let i=VD(2);return Lu(i.onCancel())}),vw(1),Rw(2,"nzI18n"),Kc();}if(n&2){let e=VD(2);ch("nzLoading",e.config.nzCancelLoading)("disabled",e.config.nzCancelDisabled),ah("cdkFocusInitial",e.config.nzAutofocus==="cancel"||null),gI(),nl(" ",e.config.nzCancelText||Ow(2,4,"Modal.cancelText")," ");}}function Vt(n,o){if(n&1){let e=LD();_i(0,"button",7),gh("click",function(){Pu(e);let i=VD(2);return Lu(i.onOk())}),vw(1),Rw(2,"nzI18n"),Kc();}if(n&2){let e=VD(2);ch("nzType",e.config.nzOkType)("nzDanger",e.config.nzOkDanger)("nzLoading",e.config.nzOkLoading)("disabled",e.config.nzOkDisabled),ah("cdkFocusInitial",e.config.nzAutofocus==="ok"||null),gI(),nl(" ",e.config.nzOkText||Ow(2,6,"Modal.okText")," ");}}function Wt(n,o){if(n&1&&(bD(0,Pt,3,6,"button",4),bD(1,Vt,3,8,"button",5)),n&2){let e=VD();_D(e.config.nzCancelText!==null?0:-1),gI(),_D(e.config.nzOkText!==null?1:-1);}}function jt(n,o){if(n&1&&(el(0),lh(1,"div",2),tl()),n&2){let e=VD();gI(),ch("innerHTML",e.config.nzTitle,vv);}}function Ht(n,o){if(n&1){let e=LD();_i(0,"button",9),gh("click",function(){Pu(e);let i=VD();return Lu(i.onCloseClick())}),Kc();}}function $t(n,o){if(n&1&&lh(0,"div",10),n&2){let e=VD();_h("cursor",e.config.nzDraggable?"move":"auto");}}function Zt(n,o){}function Kt(n,o){if(n&1&&lh(0,"div",7),n&2){let e=VD();ch("innerHTML",e.config.nzContent,vv);}}function Qt(n,o){if(n&1){let e=LD();_i(0,"div",11),gh("cancelTriggered",function(){Pu(e);let i=VD();return Lu(i.onCloseClick())})("okTriggered",function(){Pu(e);let i=VD();return Lu(i.onOkClick())}),Kc();}if(n&2){let e=VD();ch("modalRef",e.modalRef);}}var zt=()=>{},T=class{nzCentered=false;nzClosable=true;nzOkLoading=false;nzOkDisabled=false;nzCancelDisabled=false;nzCancelLoading=false;nzDraggable=false;nzNoAnimation=false;nzAutofocus="auto";nzMask;nzMaskClosable;nzKeyboard=true;nzZIndex=1e3;nzWidth=520;nzCloseIcon="close";nzOkType="primary";nzOkDanger=false;nzModalType="default";nzOnCancel=zt;nzOnOk=zt;nzData;nzMaskStyle;nzBodyStyle;nzWrapClassName;nzClassName;nzStyle;nzTitle;nzFooter;nzCancelText;nzOkText;nzContent;nzCloseOnNavigation;nzViewContainerRef;nzAfterOpen;nzAfterClose;nzIconType="question-circle";nzDirection},_={enter:"ant-zoom-enter",enterActive:"ant-zoom-enter-active",leave:"ant-zoom-leave",leaveActive:"ant-zoom-leave-active"},I={enter:"ant-fade-enter",enterActive:"ant-fade-enter-active",leave:"ant-fade-leave",leaveActive:"ant-fade-leave-active"},te="ant-modal-mask",ne="modal",Ut=new A(""),we=(()=>{class n{config=C(T);static \u0275fac=function(t){return new(t||n)};static \u0275cmp=QE({type:n,selectors:[["button","nz-modal-close",""]],hostAttrs:["aria-label","Close",1,"ant-modal-close"],exportAs:["nzModalCloseBuiltin"],decls:2,vars:1,consts:[[1,"ant-modal-close-x"],[4,"nzStringTemplateOutlet"],[1,"ant-modal-close-icon",3,"nzType"]],template:function(t,i){t&1&&(_i(0,"span",0),nh(1,Ot,2,1,"ng-container",1),Kc()),t&2&&(gI(),ch("nzStringTemplateOutlet",i.config.nzCloseIcon));},dependencies:[pt,Se$1,Tt,Ie],encapsulation:2})}return n})();function qt(n,o){return r(r({},o),n)}function q(n,o,e){return typeof n>"u"?typeof o>"u"?e:o:n}function Ct(){throw Error("Attempting to attach modal content after content is already attached")}var ht=(()=>{class n extends G4{document=C(Uo);cdr=C(z0);config=C(T);ngZone=C(oe);host=C(_r);focusTrapFactory=C(i0);renderer=C(XI);overlayRef=C(t2);nzConfigService=C(kt);animationType=C(Gm,{optional:true});destroyRef=C(at);portalOutlet;modalElementRef;animationStateChanged=new Le$1;containerClick=new Le$1;cancelTriggered=new Le$1;okTriggered=new Le$1;modalRef;isStringContent=false;dir="ltr";elementFocusedBeforeModalWasOpened=null;focusTrap;mouseDown=false;oldMaskStyle=null;get showMask(){let e=this.nzConfigService.getConfigForComponent(ne)||{};return !!q(this.config.nzMask,e.nzMask,true)}get maskClosable(){let e=this.nzConfigService.getConfigForComponent(ne)||{};return !!q(this.config.nzMaskClosable,e.nzMaskClosable,true)}constructor(){super(),this.dir=this.overlayRef.getDirection(),this.isStringContent=typeof this.config.nzContent=="string",Vt$1(ne,()=>this.updateMaskClassname()),this.destroyRef.onDestroy(()=>{this.setMaskExitAnimationClass(true);});}onContainerClick(e){e.target===e.currentTarget&&!this.mouseDown&&this.showMask&&this.maskClosable&&this.containerClick.emit();}onCloseClick(){this.cancelTriggered.emit();}onOkClick(){this.okTriggered.emit();}markForCheck(){this.cdr.markForCheck();}attachComponentPortal(e){this.portalOutlet.hasAttached()&&Ct(),this.savePreviouslyFocusedElement(),this.setZIndexForBackdrop();let t=this.portalOutlet.attachComponentPortal(e);return this._startEnterAnimation(),t}attachTemplatePortal(e){this.portalOutlet.hasAttached()&&Ct(),this.savePreviouslyFocusedElement(),this.setZIndexForBackdrop();let t=this.portalOutlet.attachTemplatePortal(e);return this._startEnterAnimation(),t}attachStringContent(){this.savePreviouslyFocusedElement(),this.setZIndexForBackdrop(),this._startEnterAnimation();}getNativeElement(){return this.host.nativeElement}animationDisabled(){return this.config.nzNoAnimation||this.animationType==="NoopAnimations"}setModalTransformOrigin(){let e=this.modalElementRef.nativeElement;if(this.elementFocusedBeforeModalWasOpened){let t=this.elementFocusedBeforeModalWasOpened.getBoundingClientRect(),i=s9(this.elementFocusedBeforeModalWasOpened),a=i.left+t.width/2,r=i.top+t.height/2,m=`${a-e.offsetLeft}px ${r-e.offsetTop}px 0px`;this.renderer.setStyle(e,"transform-origin",m);}}savePreviouslyFocusedElement(){this.focusTrap||(this.focusTrap=this.focusTrapFactory.create(this.host.nativeElement)),this.document&&(this.elementFocusedBeforeModalWasOpened=this.document.activeElement,this.host.nativeElement.focus&&this.ngZone.runOutsideAngular(()=>x1(()=>this.host.nativeElement.focus())));}trapFocus(){let e=this.host.nativeElement;if(this.config.nzAutofocus)this.focusTrap.focusInitialElementWhenReady();else {let t=this.document.activeElement;t!==e&&!e.contains(t)&&e.focus();}}restoreFocus(){this.elementFocusedBeforeModalWasOpened?.focus(),this.focusTrap?.destroy();}setEnterInitialClass(){if(this.animationDisabled())return;let e=this.modalElementRef.nativeElement,t=this.overlayRef.backdropElement;e.classList.add(_.enter),t&&t.classList.add(I.enter);}setEnterActiveClass(){if(this.animationDisabled())return;this.setModalTransformOrigin();let e=this.modalElementRef.nativeElement,t=this.overlayRef.backdropElement;e.classList.add(_.enterActive),t&&t.classList.add(I.enterActive);}setExitAnimationClass(){let e=this.modalElementRef.nativeElement;e.classList.add(_.leave),e.classList.add(_.leaveActive),this.setMaskExitAnimationClass();}setMaskExitAnimationClass(e=false){let t=this.overlayRef.backdropElement;if(t){if(this.animationDisabled()||e){t.classList.remove(te);return}t.classList.add(I.leave),t.classList.add(I.leaveActive);}}cleanAnimationClass(){if(this.animationDisabled())return;let e=this.overlayRef.backdropElement,t=this.modalElementRef.nativeElement;e&&(e.classList.remove(I.enter),e.classList.remove(I.enterActive)),t.classList.remove(_.enter),t.classList.remove(_.enterActive),t.classList.remove(_.leave),t.classList.remove(_.leaveActive);}setZIndexForBackdrop(){let e=this.overlayRef.backdropElement;e&&j3(this.config.nzZIndex)&&this.renderer.setStyle(e,"z-index",this.config.nzZIndex);}bindBackdropStyle(){let e=this.overlayRef.backdropElement;if(e){if(this.oldMaskStyle){let t=this.oldMaskStyle;Object.keys(t).forEach(i=>{this.renderer.removeStyle(e,i);}),this.oldMaskStyle=null;}if(this.setZIndexForBackdrop(),typeof this.config.nzMaskStyle=="object"&&Object.keys(this.config.nzMaskStyle).length){let t=r({},this.config.nzMaskStyle);Object.keys(t).forEach(i=>{this.renderer.setStyle(e,i,t[i]);}),this.oldMaskStyle=t;}}}updateMaskClassname(){let e=this.overlayRef.backdropElement;e&&(this.showMask?e.classList.add(te):e.classList.remove(te));}_startEnterAnimation(){if(this.bindBackdropStyle(),this.animationStateChanged.emit("enter-start"),this.animationDisabled())this.trapFocus(),this.animationStateChanged.emit("enter-active");else {this.setEnterInitialClass(),x1(()=>this.setEnterActiveClass());let e=this.modalElementRef.nativeElement,t=()=>{e.removeEventListener("animationend",t),this.trapFocus(),this.cleanAnimationClass(),this.animationStateChanged.emit("enter-active");};e.addEventListener("animationend",t);}}_startLeaveAnimation(e){if(this.animationStateChanged.emit("leave-start"),this.animationDisabled())this.restoreFocus(),e?.(),this.animationStateChanged.emit("leave-active");else {this.setExitAnimationClass();let t=this.modalElementRef.nativeElement,i=()=>{t.removeEventListener("animationend",i),this.restoreFocus(),this.cleanAnimationClass(),e?.(),this.animationStateChanged.emit("leave-active");};t.addEventListener("animationend",i);}}setupMouseListeners(e){St$1(this.host.nativeElement,"mouseup").pipe(ue(this.destroyRef)).subscribe(()=>{this.mouseDown&&setTimeout(()=>{this.mouseDown=false;});}),St$1(e.nativeElement,"mousedown").pipe(ue(this.destroyRef)).subscribe(()=>{this.mouseDown=true;});}static \u0275fac=function(t){return new(t||n)};static \u0275dir=XE({type:n,features:[eh]})}return n})(),yt=(()=>{class n extends ht{set _portalOutlet(e){this.portalOutlet=e;}set _modalElementRef(e){this.modalElementRef=e;}cancelTriggered=new Le$1;okTriggered=new Le$1;ngOnInit(){this.setupMouseListeners(this.modalElementRef);}onCancel(){this.cancelTriggered.emit();}onOk(){this.okTriggered.emit();}static \u0275fac=(()=>{let e;return function(i){return (e||(e=Sy(n)))(i||n)}})();static \u0275cmp=QE({type:n,selectors:[["nz-modal-confirm-container"]],viewQuery:function(t,i){if(t&1&&Ih(Da,7)(gt,7),t&2){let a;qD(a=WD())&&(i._portalOutlet=a.first),qD(a=WD())&&(i._modalElementRef=a.first);}},hostAttrs:["tabindex","-1","role","dialog"],hostVars:8,hostBindings:function(t,i){t&1&&gh("click",function(r){return i.onContainerClick(r)}),t&2&&(cw(i.config.nzWrapClassName?"ant-modal-wrap "+i.config.nzWrapClassName:"ant-modal-wrap"),_h("z-index",i.config.nzZIndex),Mh("ant-modal-wrap-rtl",i.dir==="rtl")("ant-modal-centered",i.config.nzCentered));},outputs:{cancelTriggered:"cancelTriggered",okTriggered:"okTriggered"},exportAs:["nzModalConfirmContainer"],features:[rD([on]),eh],decls:17,vars:16,consts:[["modalElement",""],["role","document",1,"ant-modal"],[1,"ant-modal-content"],["nz-modal-close",""],[1,"ant-modal-body"],[1,"ant-modal-confirm-body-wrapper"],[1,"ant-modal-confirm-body"],[3,"nzType"],[1,"ant-modal-confirm-title"],[4,"nzStringTemplateOutlet"],[1,"ant-modal-confirm-content"],["cdkPortalOutlet",""],[3,"innerHTML"],[1,"ant-modal-confirm-btns"],["nz-button","",3,"nzLoading","disabled"],["nz-button","",3,"nzType","nzLoading","disabled","nzDanger"],["nz-modal-close","",3,"click"],["nz-button","",3,"click","nzLoading","disabled"],["nz-button","",3,"click","nzType","nzLoading","disabled","nzDanger"]],template:function(t,i){t&1&&(_i(0,"div",1,0),Rw(2,"nzToCssUnit"),_i(3,"div",2),bD(4,Dt,1,0,"button",3),_i(5,"div",4)(6,"div",5)(7,"div",6),lh(8,"nz-icon",7),_i(9,"span",8),nh(10,xt,2,1,"ng-container",9),Kc(),_i(11,"div",10),nh(12,Et,0,0,"ng-template",11),bD(13,Nt,1,1,"div",12),Kc()(),_i(14,"div",13),bD(15,At,3,6,"button",14),bD(16,St,3,8,"button",15),Kc()()()()()),t&2&&(sw(i.config.nzStyle),cw(i.config.nzClassName),_h("width",Ow(2,14,i.config?.nzWidth)),gI(4),_D(i.config.nzClosable?4:-1),gI(),sw(i.config.nzBodyStyle),gI(3),ch("nzType",i.config.nzIconType),gI(2),ch("nzStringTemplateOutlet",i.config.nzTitle),gI(3),_D(i.isStringContent?13:-1),gI(2),_D(i.config.nzCancelText!==null?15:-1),gI(),_D(i.config.nzOkText!==null?16:-1));},dependencies:[Fe,pt,Se$1,we,Tt,Ie,Z4,Da,dd,zc,t7,y7,Se,Ky],encapsulation:2})}return n})(),Re=(()=>{class n{cdr=C(z0);config=C(T);modalRef=$0.required();cancelTriggered=B0();okTriggered=B0();buttons=Array.isArray(this.config.nzFooter)?this.config.nzFooter.map(Gt):null;onCancel(){this.cancelTriggered.emit();}onOk(){this.okTriggered.emit();}markForCheck(){this.cdr.markForCheck();}getButtonCallableProp(e,t){let i=e[t],a=this.modalRef().getContentComponent();return typeof i=="function"?i.apply(e,a&&[a]):i}onButtonClick(e){if(!this.getButtonCallableProp(e,"loading")){let i=this.getButtonCallableProp(e,"onClick");e.autoLoading&&wr(i)&&(e.loading=true,i.then(()=>e.loading=false).catch(a=>{throw e.loading=false,a}));}}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=QE({type:n,selectors:[["div","nz-modal-footer",""]],hostAttrs:[1,"ant-modal-footer"],inputs:{modalRef:[1,"modalRef"]},outputs:{cancelTriggered:"cancelTriggered",okTriggered:"okTriggered"},exportAs:["nzModalFooterBuiltin"],decls:2,vars:1,consts:[[4,"nzStringTemplateOutlet","nzStringTemplateOutletContext"],[3,"innerHTML"],["nz-button","",3,"hidden","nzLoading","disabled","nzType","nzDanger","nzShape","nzSize","nzGhost"],["nz-button","",3,"click","hidden","nzLoading","disabled","nzType","nzDanger","nzShape","nzSize","nzGhost"],["nz-button","",3,"nzLoading","disabled"],["nz-button","",3,"nzType","nzDanger","nzLoading","disabled"],["nz-button","",3,"click","nzLoading","disabled"],["nz-button","",3,"click","nzType","nzDanger","nzLoading","disabled"]],template:function(t,i){t&1&&bD(0,Bt,1,5,"ng-container")(1,Wt,2,2),t&2&&_D(i.config.nzFooter?0:1);},dependencies:[Tt,Ie,dd,zc,t7,y7,Ky],encapsulation:2})}return n})();function Gt(n){return r({type:null,size:"default",autoLoading:true,show:true,loading:false,disabled:false},n)}var vt=(()=>{class n{config=C(T);static \u0275fac=function(t){return new(t||n)};static \u0275cmp=QE({type:n,selectors:[["div","nz-modal-title",""]],hostAttrs:[1,"ant-modal-header"],exportAs:["nzModalTitleBuiltin"],decls:2,vars:1,consts:[[1,"ant-modal-title"],[4,"nzStringTemplateOutlet"],[3,"innerHTML"]],template:function(t,i){t&1&&(_i(0,"div",0),nh(1,jt,2,1,"ng-container",1),Kc()),t&2&&(gI(),ch("nzStringTemplateOutlet",i.config.nzTitle));},dependencies:[Tt,Ie],encapsulation:2})}return n})(),Mt=(()=>{class n extends ht{set _portalOutlet(e){this.portalOutlet=e;}set _modalElementRef(e){this.modalElementRef=e;}modalFooter;markForCheck(){super.markForCheck(),this.modalFooter?.markForCheck();}ngOnInit(){this.setupMouseListeners(this.modalElementRef);}onDragEnded(e){let t=this.modalElementRef.nativeElement,i=e.source.getFreeDragPosition(),{top:a,left:r}=getComputedStyle(t);this.renderer.setStyle(t,"top",W((parseFloat(a)||0)+i.y)),this.renderer.setStyle(t,"left",W((parseFloat(r)||0)+i.x)),e.source.reset();}static \u0275fac=(()=>{let e;return function(i){return (e||(e=Sy(n)))(i||n)}})();static \u0275cmp=QE({type:n,selectors:[["nz-modal-container"]],viewQuery:function(t,i){if(t&1&&Ih(Da,7)(gt,7)(Re,5),t&2){let a;qD(a=WD())&&(i._portalOutlet=a.first),qD(a=WD())&&(i._modalElementRef=a.first),qD(a=WD())&&(i.modalFooter=a.first);}},hostAttrs:["tabindex","-1","role","dialog"],hostVars:8,hostBindings:function(t,i){t&1&&gh("click",function(r){return i.onContainerClick(r)}),t&2&&(cw(i.config.nzWrapClassName?"ant-modal-wrap "+i.config.nzWrapClassName:"ant-modal-wrap"),_h("z-index",i.config.nzZIndex),Mh("ant-modal-wrap-rtl",i.dir==="rtl")("ant-modal-centered",i.config.nzCentered));},exportAs:["nzModalContainer"],features:[rD([on]),eh],decls:10,vars:15,consts:[["modalElement",""],["cdkDrag","","cdkDragBoundary",".cdk-overlay-container","role","document",1,"ant-modal",3,"cdkDragEnded","cdkDragDisabled"],[1,"ant-modal-content"],["nz-modal-close",""],["nz-modal-title","","cdkDragHandle","",3,"cursor"],[1,"ant-modal-body"],["cdkPortalOutlet",""],[3,"innerHTML"],["nz-modal-footer","",3,"modalRef"],["nz-modal-close","",3,"click"],["nz-modal-title","","cdkDragHandle",""],["nz-modal-footer","",3,"cancelTriggered","okTriggered","modalRef"]],template:function(t,i){t&1&&(_i(0,"div",1,0),Rw(2,"nzToCssUnit"),gh("cdkDragEnded",function(r){return i.onDragEnded(r)}),_i(3,"div",2),bD(4,Ht,1,0,"button",3),bD(5,$t,1,2,"div",4),_i(6,"div",5),nh(7,Zt,0,0,"ng-template",6),bD(8,Kt,1,1,"div",7),Kc(),bD(9,Qt,1,1,"div",8),Kc()()),t&2&&(sw(i.config.nzStyle),cw(i.config.nzClassName),_h("width",Ow(2,13,i.config?.nzWidth)),ch("cdkDragDisabled",!i.config.nzDraggable),gI(4),_D(i.config.nzClosable?4:-1),gI(),_D(i.config.nzTitle?5:-1),gI(),sw(i.config.nzBodyStyle),gI(2),_D(i.isStringContent?8:-1),gI(),_D(i.config.nzFooter!==null?9:-1));},dependencies:[we,vt,Z4,Da,Re,Fe,We,Ge,Se],encapsulation:2})}return n})(),U={OPEN:0,CLOSING:1,CLOSED:2},b={CANCEL:"cancel",OK:"ok"},ie=class{overlayRef;config;containerInstance;componentInstance=null;componentRef=null;result;state=U.OPEN;afterClose=new re;afterOpen=new re;destroy$=new re;constructor(o,e,t){this.overlayRef=o,this.config=e,this.containerInstance=t,t.animationStateChanged.pipe(on$1(i=>i==="enter-active"),yt$1(1)).subscribe(()=>{this.afterOpen.next(),this.afterOpen.complete(),e.nzAfterOpen instanceof Le$1&&e.nzAfterOpen.emit();}),t.animationStateChanged.pipe(on$1(i=>i==="leave-active"),yt$1(1)).subscribe(()=>this._finishDialogClose()),t.containerClick.pipe(im(this.destroy$)).subscribe(()=>{!this.config.nzCancelLoading&&!this.config.nzOkLoading&&this.trigger(b.CANCEL);}),o.keydownEvents().pipe(on$1(()=>this.config.nzKeyboard&&!this.config.nzCancelLoading&&!this.config.nzOkLoading),on$1(i=>i.keyCode===27&&!Pa(i))).subscribe(i=>{i.preventDefault(),this.trigger(b.CANCEL);}),t.cancelTriggered.pipe(im(this.destroy$)).subscribe(()=>this.trigger(b.CANCEL)),t.okTriggered.pipe(im(this.destroy$)).subscribe(()=>this.trigger(b.OK)),o.detachments().subscribe(()=>{this.afterClose.next(this.result),this.afterClose.complete(),e.nzAfterClose instanceof Le$1&&e.nzAfterClose.emit(this.result),this.componentInstance=null,this.componentRef=null,this.overlayRef.dispose();});}getContentComponent(){return this.componentInstance}getContentComponentRef(){return this.componentRef}getElement(){return this.containerInstance.getNativeElement()}destroy(o){this.close(o);}triggerOk(){return this.trigger(b.OK)}triggerCancel(){return this.trigger(b.CANCEL)}close(o){this.state===U.OPEN&&(this.result=o,this.state=U.CLOSING,this.containerInstance._startLeaveAnimation(()=>{this.overlayRef.detachBackdrop(),this._finishDialogClose();}));}updateConfig(o){Object.assign(this.config,o),this.containerInstance.bindBackdropStyle(),this.containerInstance.markForCheck();}getState(){return this.state}getConfig(){return this.config}getBackdropElement(){return this.overlayRef.backdropElement}trigger(o){return v(this,null,function*(){if(this.state===U.CLOSING)return;let e={[b.OK]:{trigger:this.config.nzOnOk,loadingKey:"nzOkLoading"},[b.CANCEL]:{trigger:this.config.nzOnCancel,loadingKey:"nzCancelLoading"}},{trigger:t,loadingKey:i}=e[o];if(!this.config[i]){if(t instanceof Le$1)t.emit(this.getContentComponent());else if(typeof t=="function"){let a=t(this.getContentComponent());if(wr(a)){this.config[i]=true,this.updateConfig(this.config);let r=false;try{r=yield a;}finally{this.config[i]=false,this.updateConfig(this.config),this.closeWhitResult(r);}}else this.closeWhitResult(a);}}})}closeWhitResult(o){o!==false&&this.close(o);}_finishDialogClose(){this.state=U.CLOSED,this.overlayRef.dispose(),this.destroy$.next();}},Xt=(()=>{class n{injector=C(Ee);nzConfigService=C(kt);directionality=C(Le);parentModal=C(n,{skipSelf:true,optional:true});openModalsAtThisLevel=[];afterAllClosedAtThisLevel=new re;get openModals(){return this.parentModal?this.parentModal.openModals:this.openModalsAtThisLevel}get _afterAllClosed(){let e=this.parentModal;return e?e._afterAllClosed:this.afterAllClosedAtThisLevel}afterAllClose=Vg(()=>this.openModals.length?this._afterAllClosed:this._afterAllClosed.pipe(Gl(void 0)));create(e){return this.open(e.nzContent,e)}closeAll(){this.closeModals(this.openModals);}confirm(e={},t="confirm"){return "nzFooter"in e&&Rt$1(`The Confirm-Modal doesn't support "nzFooter", this property will be ignored.`),"nzWidth"in e||(e.nzWidth=416),"nzMaskClosable"in e||(e.nzMaskClosable=false),e.nzModalType="confirm",e.nzClassName=`ant-modal-confirm ant-modal-confirm-${t} ${e.nzClassName||""}`,this.create(e)}info(e={}){return this.confirmFactory(e,"info")}success(e={}){return this.confirmFactory(e,"success")}error(e={}){return this.confirmFactory(e,"error")}warning(e={}){return this.confirmFactory(e,"warning")}open(e,t){let i=qt(t||{},new T),a=this.createOverlay(i),r=this.attachModalContainer(a,i),m=this.attachModalContent(e,r,a,i);return r.modalRef=m,Bu(a,t?.nzZIndex),this.openModals.push(m),m.afterClose.subscribe(()=>this.removeOpenModal(m)),m}removeOpenModal(e){let t=this.openModals.indexOf(e);t>-1&&(this.openModals.splice(t,1),this.openModals.length||this._afterAllClosed.next());}closeModals(e){let t=e.length;for(;t--;)e[t].close(),this.openModals.length||this._afterAllClosed.next();}createOverlay(e){let t=this.nzConfigService.getConfigForComponent(ne)||{};return pn(this.injector,{hasBackdrop:true,scrollStrategy:Na(this.injector),backdropClass:q(e.nzMask,t.nzMask,true)?te:"",positionStrategy:Ga(this.injector),disposeOnNavigation:q(e.nzCloseOnNavigation,t.nzCloseOnNavigation,true),direction:q(e.nzDirection,t.nzDirection,this.directionality.valueSignal())})}attachModalContainer(e,t){let i=t&&t.nzViewContainerRef&&t.nzViewContainerRef.injector,a=Ee.create({parent:i||this.injector,providers:[{provide:t2,useValue:e},{provide:T,useValue:t}]}),r=t.nzModalType==="confirm"?yt:Mt,m=new K1(r,t.nzViewContainerRef,a);return e.attach(m).instance}attachModalContent(e,t,i,a){let r=new ie(i,a,t);if(A1(e))t.attachTemplatePortal(new G1(e,null,{$implicit:a.nzData,modalRef:r}));else if(j3(e)&&typeof e!="string"){let m=this.createInjector(r,a),k=t.attachComponentPortal(new K1(e,a.nzViewContainerRef,m));r.componentRef=k,r.componentInstance=k.instance;}else t.attachStringContent();return r}createInjector(e,t){let i=t&&t.nzViewContainerRef&&t.nzViewContainerRef.injector;return Ee.create({parent:i||this.injector,providers:[{provide:ie,useValue:e},{provide:Ut,useValue:t.nzData}]})}confirmFactory(e={},t){let i={info:"info-circle",success:"check-circle",error:"close-circle",warning:"exclamation-circle"};return "nzIconType"in e||(e.nzIconType=i[t]),"nzCancelText"in e||(e.nzCancelText=null),this.confirm(e,t)}ngOnDestroy(){this.closeModals(this.openModalsAtThisLevel),this.afterAllClosedAtThisLevel.complete();}static \u0275fac=function(t){return new(t||n)};static \u0275prov=ie$1({token:n,factory:n.\u0275fac})}return n})();var Zn=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275mod=YE({type:n});static \u0275inj=uu({providers:[Xt],imports:[we,Re,vt,Mt,yt]})}return n})();export{Ut as U,Xt as X,Zn as Z,ie as i};
|
package/static/chunk-nXCKNQUo.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {a as ae$1,l as le}from'./chunk-BkJuaRUH.js';import'./chunk-BAgwFLbm.js';import {U}from'./chunk-jg6TAN9F.js';import {C,$ as $$1,T as Ie,V as Ve,a as ae,q as qo,H as Hw,s,r,o,Q as QE,M as Mi,L as Ln,K as Kt,f as _i,v as vw,R as Rw,g as Kc,m as bD,h as gh,N as ND,p as gI,P as Ph,O as Ow,B as _D,w as nl,x as ch,A as xD,E as VD,U as Lh,F as LD,G as Pu,I as Lu}from'./main-RRKPLQCF.js';var L=(t,p)=>p.id;function $(t,p){if(t&1&&(_i(0,"p",3),vw(1),Kc()),t&2){let e=VD();gI(),Ph(e.loadError());}}function z(t,p){if(t&1&&(_i(0,"option",6),vw(1),Kc()),t&2){let e=p.$implicit;ch("value",e.id),gI(),Lh("",e.name," (",e.id,")");}}function H(t,p){if(t&1){let e=LD();_i(0,"label"),vw(1),Rw(2,"transloco"),_i(3,"input",10),Rw(4,"transloco"),gh("input",function(o){Pu(e);let s=VD(2);return Lu(s.setSubjectId(o))}),Kc()();}if(t&2){let e=VD(2);gI(),nl(" ",Ow(2,3,"jobs.start.subjectId")," "),gI(2),ch("value",e.subjectId())("placeholder",Ow(4,5,"jobs.start.subjectIdPlaceholder"));}}function G(t,p){if(t&1){let e=LD();bD(0,H,5,7,"label"),_i(1,"app-workflow-input-form",9),gh("valuesChange",function(o){Pu(e);let s=VD();return Lu(s.inputValues.set(o))}),Kc();}if(t&2){let e=VD();_D(e.needsSubjectId()?0:-1),gI(),ch("fields",p.inputSchema)("values",e.inputValues());}}function K(t,p){if(t&1&&(_i(0,"p",8),vw(1),Kc()),t&2){let e=VD();gI(),Ph(e.actionError());}}var re=(()=>{class t{constructor(){this.workflowsApi=C(U),this.jobsApi=C($$1),this.router=C(Ie),this.transloco=C(Ve),this.route=C(ae),this.workflows=qo([]),this.selectedWorkflowId=qo(""),this.subjectId=qo(""),this.inputValues=qo({}),this.loadError=qo(null),this.actionError=qo(null),this.starting=qo(false),this.selectedWorkflow=Hw(()=>this.workflows().find(e=>e.id===this.selectedWorkflowId())??null),this.needsSubjectId=Hw(()=>{let e=this.selectedWorkflow();return e!=null&&e.appliesTo!=="none"}),this.workflowsApi.list({subjectHandling:"per-subject"}).subscribe({next:e=>{this.workflows.set(e);let n=this.route.snapshot.queryParamMap.get("workflowId"),o=n&&e.some(C=>C.id===n)?n:e[0]?.id;o&&this.selectWorkflow(o);let s=this.route.snapshot.queryParamMap.get("subjectId");s&&this.subjectId.set(s);},error:e=>{this.loadError.set(this.errorMessage(e,this.transloco.translate("jobs.errors.loadWorkflows")));}});}selectWorkflow(e){this.selectedWorkflowId.set(e);let n=this.workflows().find(o=>o.id===e);this.inputValues.set(ae$1(n?.inputSchema??[])),this.actionError.set(null);}onWorkflowChange(e){let n=e.target.value;this.selectWorkflow(n);}setSubjectId(e){this.subjectId.set(e.target.value);}start(){let e=this.selectedWorkflow();if(e){if(this.needsSubjectId()&&!this.subjectId().trim()){this.actionError.set(this.transloco.translate("jobs.errors.subjectIdRequired"));return}this.actionError.set(null),this.starting.set(true),this.jobsApi.start(s(r({workflowId:e.id},this.needsSubjectId()?{subjectId:this.subjectId().trim()}:{}),{inputValues:r({},this.inputValues())})).subscribe({next:n=>{this.starting.set(false),this.router.navigate(["/jobs",n.id]);},error:n=>{this.starting.set(false),this.actionError.set(this.errorMessage(n,this.transloco.translate("jobs.errors.startFailed")));}});}}errorMessage(e,n){return e instanceof o||e instanceof Error?e.message:n}static{this.\u0275fac=function(n){return new(n||t)};}static{this.\u0275cmp=QE({type:t,selectors:[["app-job-runner"]],decls:26,vars:23,consts:[[1,"runner"],["routerLink","/jobs"],[1,"lede"],["data-testid","load-error",1,"error"],["data-testid","start-form",1,"panel"],["data-testid","workflow-select",3,"change","value"],[3,"value"],["data-testid","start-button","type","button",3,"click","disabled"],["data-testid","action-error",1,"error"],[3,"valuesChange","fields","values"],["data-testid","subject-id","type","text",3,"input","value","placeholder"]],template:function(n,o){if(n&1&&(_i(0,"main",0)(1,"a",1),vw(2),Rw(3,"transloco"),Kc(),_i(4,"h1"),vw(5),Rw(6,"transloco"),Kc(),_i(7,"p",2),vw(8),Rw(9,"transloco"),Kc(),bD(10,$,2,1,"p",3),_i(11,"section",4)(12,"h2"),vw(13),Rw(14,"transloco"),Kc(),_i(15,"label"),vw(16),Rw(17,"transloco"),_i(18,"select",5),gh("change",function(C){return o.onWorkflowChange(C)}),ND(19,z,2,3,"option",6,L),Kc()(),bD(21,G,2,3),_i(22,"button",7),gh("click",function(){return o.start()}),vw(23),Rw(24,"transloco"),Kc()(),bD(25,K,2,1,"p",8),Kc()),n&2){let s;gI(2),Ph(Ow(3,11,"jobs.detail.backToStart")),gI(3),Ph(Ow(6,13,"jobs.title")),gI(3),Ph(Ow(9,15,"jobs.lede")),gI(2),_D(o.loadError()?10:-1),gI(3),Ph(Ow(14,17,"jobs.start.heading")),gI(3),nl(" ",Ow(17,19,"jobs.start.workflow")," "),gI(2),ch("value",o.selectedWorkflowId()),gI(),xD(o.workflows()),gI(2),_D((s=o.selectedWorkflow())?21:-1,s),gI(),ch("disabled",o.starting()),gI(),nl(" ",Ow(24,21,o.starting()?"jobs.start.starting":"jobs.start.button")," "),gI(2),_D(o.actionError()?25:-1);}},dependencies:[Mi,Ln,le,Kt],styles:[".runner[_ngcontent-%COMP%]{max-width:52rem;margin:0 auto;padding:1.5rem;color:#1c1917;line-height:1.45}.lede[_ngcontent-%COMP%]{color:#57534e}.panel[_ngcontent-%COMP%]{margin-top:1.25rem;padding:1rem 0;border-top:1px solid #d6d3d1}label[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.35rem;margin:.75rem 0;font-size:.95rem}input[type=text][_ngcontent-%COMP%], select[_ngcontent-%COMP%]{font:inherit;padding:.4rem .5rem;border:1px solid #a8a29e;background:#fff}button[_ngcontent-%COMP%]{font:inherit;margin-top:.5rem;padding:.45rem .9rem;border:1px solid #44403c;background:#f5f5f4;cursor:pointer}button[_ngcontent-%COMP%]:disabled{opacity:.6;cursor:not-allowed}.error[_ngcontent-%COMP%]{color:#9f1239}"]});}}return t})();export{re as JobRunnerComponent};
|
package/static/chunk-ndsN8K7Q.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import {T}from'./chunk-C5T1qa5G.js';import {$ as $$1,B}from'./chunk-CN5_Adst.js';import {C as Cx,M as Mm,h as hy,$ as $y,b as M_}from'./chunk-BdrifDCS.js';import {a as ai,z}from'./chunk-WGWZEfc0.js';import {C,a as ae,T as Ie$1,ah as U,aj as $,b as at,V as Ve$1,aS as O$1,aT as de,al as Se$1,q as qo,H as Hw,u as ue,s,r,o,Q as QE,M as Mi,n as n8,am as S4,J as J6,k as k3,L as Ln,d as dd,z as zc,c as t7,Z as y7,X as Xb,e as V5,D as D5,K as Kt,f as _i,v as vw,g as Kc,R as Rw,h as gh,m as bD,p as gI,P as Ph,O as Ow,x as ch,w as nl,B as _D,E as VD,F as LD,j as oE,N as ND,y as sE,A as xD,S as SD,l as lh,G as Pu,I as Lu,a4 as Mh,a5 as ah,a6 as Nw}from'./main-RRKPLQCF.js';import {U as U$1}from'./chunk-jg6TAN9F.js';import'./chunk-hEYSTlD1.js';var be=()=>[],O=(t,a)=>a.id,Me=(t,a)=>a.name;function Ie(t,a){t&1&&(_i(0,"p",5),vw(1),Rw(2,"transloco"),Kc()),t&2&&(gI(),Ph(Ow(2,1,"common.loading")));}function Ee(t,a){if(t&1&&(_i(0,"p",6),vw(1),Kc()),t&2){let e=VD();gI(),Ph(e.loadError());}}function Ve(t,a){if(t&1&&(_i(0,"li"),vw(1),Kc()),t&2){let e=a.$implicit;gI(),Ph(e);}}function ze(t,a){if(t&1&&(_i(0,"section",7)(1,"h2"),vw(2),Rw(3,"transloco"),Kc(),_i(4,"ul"),ND(5,Ve,2,1,"li",null,SD),Kc()()),t&2){let e=VD(2);gI(2),Ph(Ow(3,1,"views.editor.validation")),gI(3),xD(e.validationErrors());}}function ke(t,a){if(t&1&&lh(0,"nz-option",11),t&2){let e=a.$implicit;ch("nzValue",e.id)("nzLabel",e.name);}}function Pe(t,a){t&1&&(_i(0,"p",13),vw(1),Rw(2,"transloco"),Kc()),t&2&&(gI(),nl(" ",Ow(2,1,"views.editor.noEligibleInstances")," "));}function Se(t,a){t&1&&(_i(0,"p",16),vw(1),Rw(2,"transloco"),Kc()),t&2&&(gI(),nl(" ",Ow(2,1,"views.editor.instanceNeeded")," "));}function Ne(t,a){if(t&1&&lh(0,"nz-option",11),t&2){let e=a.$implicit;ch("nzValue",e.id)("nzLabel",e.displayName);}}function qe(t,a){if(t&1){let e=LD();_i(0,"div",15),bD(1,Se,3,3,"p",16),_i(2,"span"),vw(3),Rw(4,"transloco"),Kc(),_i(5,"nz-select",17),Rw(6,"transloco"),gh("ngModelChange",function(n){Pu(e);let s=VD(3);return Lu(s.onInstanceChange(n))}),ND(7,Ne,1,2,"nz-option",11,O),Kc(),oE(),Kc();}if(t&2){let e=VD(3);Mh("field-attention",e.needsInstanceAttention()),gI(),_D(e.needsInstanceAttention()?1:-1),gI(2),Ph(Ow(4,6,"views.editor.instance")),gI(2),ch("nzPlaceHolder",Ow(6,8,"views.editor.instancePlaceholder"))("ngModel",e.providerInstanceId()),sE(),gI(2),xD(e.eligibleInstances());}}function De(t,a){if(t&1&&bD(0,Pe,3,3,"p",13)(1,qe,9,10,"div",14),t&2){let e=VD(2);_D(e.eligibleInstances().length===0?0:1);}}function Ae(t,a){if(t&1){let e=LD();_i(0,"div",12)(1,"span"),vw(2),Rw(3,"transloco"),Kc(),_i(4,"div",18)(5,"button",19),gh("click",function(){Pu(e);let n=VD(2);return Lu(n.setQueryMode("template"))}),vw(6),Rw(7,"transloco"),Kc(),_i(8,"button",20),gh("click",function(){Pu(e);let n=VD(2);return Lu(n.setQueryMode("raw"))}),vw(9),Rw(10,"transloco"),Kc()()();}if(t&2){let e=VD(2);gI(2),Ph(Ow(3,5,"views.editor.queryMode")),gI(3),ch("nzType",e.queryMode()==="template"?"primary":"default"),gI(),nl(" ",Ow(7,7,"views.editor.queryMode.template")," "),gI(2),ch("nzType",e.queryMode()==="raw"?"primary":"default"),gI(),nl(" ",Ow(10,9,"views.editor.queryMode.raw")," ");}}function Fe(t,a){if(t&1&&lh(0,"nz-option",11),t&2){let e=a.$implicit;ch("nzValue",e.id)("nzLabel",e.label);}}function je(t,a){t&1&&(_i(0,"span",22),vw(1,"*"),Kc());}function Oe(t,a){if(t&1&&lh(0,"nz-option",11),t&2){let e=a.$implicit;ch("nzValue",e)("nzLabel",e);}}function Be(t,a){if(t&1){let e=LD();_i(0,"nz-select",25),gh("ngModelChange",function(n){Pu(e);let s=VD().$implicit,g=VD(4);return Lu(g.setTemplateParam(s.name,n))}),ND(1,Oe,1,2,"nz-option",11,SD),Kc(),oE();}if(t&2){let e=VD().$implicit,i=VD(4);ch("ngModel",i.templateParamValue(e.name)),ah("data-testid","template-param-"+e.name),sE(),gI(),xD(e.options??Nw(2,be));}}function $e(t,a){if(t&1){let e=LD();_i(0,"input",26),gh("ngModelChange",function(n){Pu(e);let s=VD().$implicit,g=VD(4);return Lu(g.setTemplateParam(s.name,n))}),Kc(),oE();}if(t&2){let e=VD().$implicit,i=VD(4);ch("ngModel",i.templateParamValue(e.name)),ah("data-testid","template-param-"+e.name),sE();}}function Le(t,a){if(t&1&&(_i(0,"label",8)(1,"span"),vw(2),bD(3,je,2,0,"span",22),Kc(),bD(4,Be,3,3,"nz-select",23)(5,$e,1,2,"input",24),Kc()),t&2){let e=a.$implicit;gI(2),nl(" ",e.label," "),gI(),_D(e.required?3:-1),gI(),_D(e.type==="select"?4:5);}}function We(t,a){t&1&&ND(0,Le,6,3,"label",8,Me),t&2&&xD(a.params);}function Re(t,a){if(t&1){let e=LD();_i(0,"div",8)(1,"span"),vw(2),Rw(3,"transloco"),Kc(),_i(4,"nz-select",21),gh("ngModelChange",function(n){Pu(e);let s=VD(2);return Lu(s.selectTemplate(n))}),ND(5,Fe,1,2,"nz-option",11,O),Kc(),oE(),Kc(),bD(7,We,2,0);}if(t&2){let e,i=VD(2);gI(2),Ph(Ow(3,3,"views.editor.template")),gI(2),ch("ngModel",i.selectedTemplateId()),sE(),gI(),xD(i.templates()),gI(2),_D((e=i.selectedTemplate())?7:-1,e);}}function Je(t,a){if(t&1){let e=LD();_i(0,"label",8)(1,"span"),vw(2),Rw(3,"transloco"),Kc(),_i(4,"textarea",27),gh("ngModelChange",function(n){Pu(e);let s=VD(2);return Lu(s.queryText.set(n))}),Kc(),oE(),_i(5,"span",28),vw(6),Rw(7,"transloco"),Kc()();}if(t&2){let e=VD(2);gI(2),Ph(Ow(3,3,"views.editor.query")),gI(2),ch("ngModel",e.queryText()),sE(),gI(2),Ph(Ow(7,5,"views.editor.queryHint"));}}function Qe(t,a){if(t&1){let e=LD();bD(0,ze,7,3,"section",7),_i(1,"label",8)(2,"span"),vw(3),Rw(4,"transloco"),Kc(),_i(5,"input",9),gh("ngModelChange",function(n){Pu(e);let s=VD();return Lu(s.name.set(n))}),Kc(),oE(),Kc(),_i(6,"div",8)(7,"span"),vw(8),Rw(9,"transloco"),Kc(),_i(10,"nz-select",10),gh("ngModelChange",function(n){Pu(e);let s=VD();return Lu(s.onWorkflowChange(n))}),ND(11,ke,1,2,"nz-option",11,O),Kc(),oE(),Kc(),bD(13,De,2,1),bD(14,Ae,11,11,"div",12),bD(15,Re,8,5)(16,Je,8,7,"label",8);}if(t&2){let e=VD();_D(e.validationErrors().length>0?0:-1),gI(3),Ph(Ow(4,8,"views.editor.name")),gI(2),ch("ngModel",e.name()),sE(),gI(3),Ph(Ow(9,10,"views.editor.workflow")),gI(2),ch("ngModel",e.workflowId()),sE(),gI(),xD(e.bindableWorkflows()),gI(2),_D(e.selectedWorkflow()&&e.settings()?13:-1),gI(),_D(e.hasTemplates()?14:-1),gI(),_D(e.queryMode()==="template"&&e.hasTemplates()?15:16);}}function Ue(t){let a=t.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,""),e=crypto.randomUUID().slice(0,8);return a.length>0?`${a}-${e}`:`view-${e}`}function Te(t){let a={};for(let e of t.params)a[e.name]=e.type==="select"?e.options?.[0]??"":"";return a}function He(t){let a=t?.trim()??"";return a.length>0?a:null}var bt=(()=>{class t{constructor(){this.route=C(ae),this.router=C(Ie$1),this.viewsApi=C(U),this.workflowsApi=C(U$1),this.settingsApi=C($),this.providersApi=C($$1),this.message=C(Cx),this.destroyRef=C(at),this.transloco=C(Ve$1),this.language=C(O$1),this.routeId=de(this.route.paramMap.pipe(Se$1(e=>e.get("id"))),{initialValue:this.route.snapshot.paramMap.get("id")}),this.name=qo(""),this.workflowId=qo(""),this.providerInstanceId=qo(null),this.workflows=qo([]),this.subjectType=qo(null),this.queryText=qo(`{
|
|
2
|
-
|
|
3
|
-
}`),this.queryMode=qo("template"),this.templates=qo([]),this.selectedTemplateId=qo(null),this.templateParams=qo({}),this.settings=qo(null),this.loadError=qo(null),this.validationErrors=qo([]),this.saving=qo(false),this.loading=qo(true),this.bindableWorkflows=Hw(()=>this.workflows().filter(e=>e.appliesTo!=="none")),this.selectedWorkflow=Hw(()=>this.bindableWorkflows().find(e=>e.id===this.workflowId())??null),this.subjectTypeOptions=Hw(()=>Mm(this.selectedWorkflow()?.appliesTo??"none")),this.eligibleInstances=Hw(()=>B(this.settings(),this.subjectTypeOptions())),this.selectedInstance=Hw(()=>this.eligibleInstances().find(e=>e.id===this.providerInstanceId())??null),this.needsInstanceAttention=Hw(()=>this.selectedWorkflow()!=null&&this.settings()!=null&&this.eligibleInstances().length>0&&this.selectedInstance()==null),this.isNew=Hw(()=>!this.routeId()),this.pageTitle=Hw(()=>(this.language.currentLang(),this.isNew()?this.transloco.translate("views.editor.titleNew"):this.transloco.translate("views.editor.titleEdit",{id:this.routeId()}))),this.selectedTemplate=Hw(()=>this.templates().find(e=>e.id===this.selectedTemplateId())??null),this.hasTemplates=Hw(()=>this.templates().length>0),this.workflowsApi.list().pipe(ue(this.destroyRef)).subscribe({next:e=>this.workflows.set(e),error:e=>{this.workflows.set([]),this.message.error(this.errorMessage(e,this.transloco.translate("views.editor.loadFailed")));}}),this.settingsApi.getSettings().pipe(ue(this.destroyRef)).subscribe({next:e=>{this.settings.set(e),this.refreshTemplates();},error:e=>{this.settings.set(hy),this.refreshTemplates(),this.message.error(this.errorMessage(e,this.transloco.translate("views.editor.loadFailed")));}}),this.route.paramMap.pipe(ue(this.destroyRef)).subscribe(e=>{let i=e.get("id");if(this.validationErrors.set([]),this.loadError.set(null),this.pendingProvenance=void 0,!i){this.name.set(""),this.workflowId.set(""),this.providerInstanceId.set(null),this.subjectType.set(null),this.queryText.set(`{
|
|
4
|
-
|
|
5
|
-
}`),this.queryMode.set("template"),this.selectedTemplateId.set(null),this.templateParams.set({}),this.loading.set(false),this.refreshTemplates();return}this.loading.set(true),this.viewsApi.get(i).subscribe({next:n=>{this.name.set(n.name),this.workflowId.set(n.workflowId),this.providerInstanceId.set(He(n.providerInstanceId)),this.subjectType.set(n.subjectType),this.queryText.set(JSON.stringify(n.query,null,2)),this.pendingProvenance=n.queryTemplate,this.queryMode.set(n.queryTemplate?"template":"raw"),this.loading.set(false),this.refreshTemplates();},error:n=>{this.loading.set(false),this.loadError.set(this.errorMessage(n,this.transloco.translate("views.editor.loadFailed")));}});});}subjectTypeKey(e){return `workflow-editor.subjectType.${e}`}onWorkflowChange(e){this.workflowId.set(e);let i=Mm(this.bindableWorkflows().find(s=>s.id===e)?.appliesTo??"none");this.pendingProvenance=void 0,this.queryMode.set("template"),this.selectedTemplateId.set(null),this.templateParams.set({});let n=B(this.settings(),i);if(n.length===1)this.applyInstance(n[0]);else {let s=this.providerInstanceId(),g=n.find(S=>S.id===s);g?this.applyInstance(g):(this.providerInstanceId.set(null),this.subjectType.set(null));}this.refreshTemplates();}onInstanceChange(e){let i=this.eligibleInstances().find(n=>n.id===e);this.pendingProvenance=void 0,this.queryMode.set("template"),this.selectedTemplateId.set(null),this.templateParams.set({}),i&&this.applyInstance(i),this.refreshTemplates();}applyInstance(e){this.providerInstanceId.set(e.id),$y(e)&&this.subjectType.set(e.subjectType);}setQueryMode(e){this.queryMode.set(e),e==="template"&&!this.selectedTemplateId()&&this.templates()[0]&&this.selectTemplate(this.templates()[0].id);}selectTemplate(e){let i=this.templates().find(n=>n.id===e);this.selectedTemplateId.set(e),this.templateParams.set(i?Te(i):{});}templateParamValue(e){let i=this.templateParams()[e];return i==null?"":String(i)}setTemplateParam(e,i){this.templateParams.set(s(r({},this.templateParams()),{[e]:i}));}save(){if(!this.selectedInstance()){this.validationErrors.set([this.transloco.translate("views.editor.pickInstance")]);return}if(this.queryMode()==="template"&&this.hasTemplates()){this.saveFromTemplate();return}this.saveFromRawJson();}saveFromTemplate(){let e=this.selectedTemplate(),i=this.providerInstanceId();if(!e||!i){this.validationErrors.set([this.transloco.translate("views.editor.pickTemplate")]);return}let n=e.params.filter(s=>{if(!s.required)return false;let g=this.templateParams()[s.name];return g==null||String(g).trim()===""});if(n.length>0){this.validationErrors.set(n.map(s=>this.transloco.translate("views.editor.missingParam",{label:s.label})));return}this.validationErrors.set([]),this.saving.set(true),this.providersApi.resolveQueryTemplate(i,e.id,this.templateParams()).subscribe({next:s=>{this.persist({query:s.query,queryTemplate:{templateId:e.id,params:this.templateParams()}});},error:s=>{this.saving.set(false),this.message.error(this.errorMessage(s,this.transloco.translate("views.editor.resolveFailed")));}});}saveFromRawJson(){let e;try{e=JSON.parse(this.queryText());}catch(i){this.validationErrors.set([this.transloco.translate("views.editor.invalidJson")]);return}if(e===null||typeof e!="object"||Array.isArray(e)){this.validationErrors.set([this.transloco.translate("views.editor.invalidJson")]);return}this.persist({query:e});}persist(e){let i=this.routeId(),n=this.subjectType(),s=r({id:i??Ue(this.name()),name:this.name().trim(),subjectType:n??"",providerInstanceId:this.providerInstanceId()??"",workflowId:this.workflowId(),query:e.query},e.queryTemplate?{queryTemplate:e.queryTemplate}:{}),g=M_.safeParse(s);if(!g.success){this.saving.set(false),this.validationErrors.set(T(g.error));return}this.validationErrors.set([]),this.saving.set(true);let S=g.data;(this.isNew()||!i?this.viewsApi.create(S):this.viewsApi.update(i,S)).subscribe({next:q=>{this.saving.set(false),this.message.success(this.transloco.translate(this.isNew()?"views.editor.created":"views.editor.saved")),this.isNew()&&this.router.navigate(["/views",q.id,"edit"]);},error:q=>{this.saving.set(false),this.message.error(this.errorMessage(q,this.transloco.translate("views.editor.saveFailed")));}});}refreshTemplates(){let e=this.providerInstanceId();if(!e){this.templates.set([]),this.applyLoadedTemplates([]);return}this.providersApi.listQueryTemplates(e).subscribe({next:i=>{this.templates.set(i),this.applyLoadedTemplates(i);},error:()=>{this.templates.set([]),this.applyLoadedTemplates([]);}});}applyLoadedTemplates(e){let i=this.pendingProvenance;if(i){let n=e.find(s=>s.id===i.templateId);n?(this.queryMode.set("template"),this.selectedTemplateId.set(n.id),this.templateParams.set(r(r({},Te(n)),i.params))):(this.queryMode.set("raw"),this.selectedTemplateId.set(null)),this.pendingProvenance=void 0;return}if(this.queryMode()!=="raw"){if(e.length===0){this.queryMode.set("raw"),this.selectedTemplateId.set(null),this.templateParams.set({});return}e.some(n=>n.id===this.selectedTemplateId())||this.selectTemplate(e[0].id);}}errorMessage(e,i){return e instanceof o||e instanceof Error?e.message:i}static{this.\u0275fac=function(i){return new(i||t)};}static{this.\u0275cmp=QE({type:t,selectors:[["app-view-editor"]],decls:15,vars:10,consts:[["data-testid","view-editor",1,"editor"],[1,"header"],[1,"header-actions"],["routerLink","/views"],["nz-button","","nzType","primary","type","button","data-testid","save-button",3,"click","nzLoading","disabled"],["data-testid","loading"],["data-testid","load-error",1,"error"],["data-testid","validation-errors",1,"errors"],[1,"field"],["nz-input","","data-testid","view-name",3,"ngModelChange","ngModel"],["data-testid","view-workflow",3,"ngModelChange","ngModel"],[3,"nzValue","nzLabel"],["data-testid","query-mode-toggle",1,"field"],["data-testid","view-instance-empty",1,"error"],["data-testid","view-instance-field",1,"field",3,"field-attention"],["data-testid","view-instance-field",1,"field"],["data-testid","view-instance-needed",1,"attention"],["data-testid","view-instance",3,"ngModelChange","nzPlaceHolder","ngModel"],[1,"mode-toggle"],["nz-button","","type","button","data-testid","query-mode-template",3,"click","nzType"],["nz-button","","type","button","data-testid","query-mode-raw",3,"click","nzType"],["data-testid","view-template",3,"ngModelChange","ngModel"],[1,"required"],[3,"ngModel"],["nz-input","",3,"ngModel"],[3,"ngModelChange","ngModel"],["nz-input","",3,"ngModelChange","ngModel"],["nz-input","","rows","8","data-testid","view-query",3,"ngModelChange","ngModel"],[1,"hint"]],template:function(i,n){i&1&&(_i(0,"main",0)(1,"header",1)(2,"div")(3,"h1"),vw(4),Kc()(),_i(5,"div",2)(6,"a",3),vw(7),Rw(8,"transloco"),Kc(),_i(9,"button",4),gh("click",function(){return n.save()}),vw(10),Rw(11,"transloco"),Kc()()(),bD(12,Ie,3,3,"p",5)(13,Ee,2,1,"p",6)(14,Qe,17,12),Kc()),i&2&&(gI(4),Ph(n.pageTitle()),gI(3),Ph(Ow(8,6,"views.editor.backToList")),gI(2),ch("nzLoading",n.saving())("disabled",n.loading()||!!n.loadError()),gI(),nl(" ",Ow(11,8,"common.save")," "),gI(2),_D(n.loading()?12:n.loadError()?13:14));},dependencies:[Mi,n8,S4,J6,k3,Ln,dd,zc,t7,y7,ai,z,Xb,V5,D5,Kt],styles:[".editor[_ngcontent-%COMP%]{max-width:40rem;margin:0 auto;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;gap:.75rem;align-items:center}.field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.35rem;margin:.5rem 0}.field[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{font-size:.85rem;color:#57534e}.hint[_ngcontent-%COMP%]{font-size:.8rem;color:#78716c}.field-attention[_ngcontent-%COMP%]{border:1px solid #f59e0b;background:#fffbeb;padding:.75rem 1rem;border-radius:.35rem}.attention[_ngcontent-%COMP%]{margin:0;color:#b45309;font-size:.85rem}.mode-toggle[_ngcontent-%COMP%]{display:flex;gap:.5rem}.required[_ngcontent-%COMP%]{color:#9f1239}.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}textarea[_ngcontent-%COMP%]{font-family:ui-monospace,Consolas,monospace}"]});}}return t})();export{bt as ViewEditorComponent};
|
package/static/chunk-tnTBlRRN.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {U}from'./chunk-jg6TAN9F.js';import {B as Bt}from'./chunk-Df_jRm7U.js';import'./chunk-CK-2DsDH.js';import {L as Lt,u as ut$1,D as Di,m as mn}from'./chunk-CrD5w72_.js';import'./chunk-hEYSTlD1.js';import {C,$,a as ae,V as Ve,b as at$1,q as qo,H as Hw,u as ue,s,r,o,Q as QE,M as Mi,n as n8,J as J6,k as k3,L as Ln,d as dd,z as zc,c as t7,X as Xb,e as V5,D as D5,K as Kt,f as _i,v as vw,R as Rw,g as Kc,h as gh,j as oE,l as lh,N as ND,m as bD,S as SD,p as gI,P as Ph,O as Ow,w as nl,x as ch,y as sE,A as xD,B as _D,E as VD,F as LD,G as Pu,I as Lu}from'./main-RRKPLQCF.js';import'./chunk-CxBYhrEj.js';var st=(e,d)=>d.id;function lt(e,d){if(e&1&&lh(0,"nz-option",10),e&2){let t=d.$implicit;ch("nzValue",t.id)("nzLabel",t.name+" ("+t.id+")");}}function at(e,d){e&1&&(_i(0,"p",11),vw(1),Rw(2,"transloco"),Kc()),e&2&&(gI(),Ph(Ow(2,1,"common.loading")));}function dt(e,d){if(e&1&&(_i(0,"p",12),vw(1),Kc()),e&2){let t=VD();gI(),Ph(t.runningError());}}function pt(e,d){e&1&&(_i(0,"p",13),vw(1),Rw(2,"transloco"),Kc()),e&2&&(gI(),nl(" ",Ow(2,1,"jobs.list.runningEmpty")," "));}function ht(e,d){if(e&1&&lh(0,"app-job-status-table",14),e&2){let t=VD();ch("jobs",t.runningJobs());}}function gt(e,d){if(e&1&&(lh(0,"nz-option",10),Rw(1,"transloco"),Rw(2,"transloco")),e&2){let t=d.$implicit,s=VD();ch("nzValue",t)("nzLabel",t==="all"?Ow(1,2,"jobs.list.filterAll"):Ow(2,4,s.statusKey(t)));}}function mt(e,d){if(e&1&&lh(0,"nz-option",10),e&2){let t=d.$implicit;ch("nzValue",t.id)("nzLabel",t.name+" ("+t.id+")");}}function ct(e,d){e&1&&(_i(0,"p",18),vw(1),Rw(2,"transloco"),Kc()),e&2&&(gI(),Ph(Ow(2,1,"common.loading")));}function ut(e,d){if(e&1&&(_i(0,"p",19),vw(1),Kc()),e&2){let t=VD();gI(),Ph(t.historyError());}}function ft(e,d){e&1&&(_i(0,"p",20),vw(1),Rw(2,"transloco"),Kc()),e&2&&(gI(),nl(" ",Ow(2,1,"jobs.list.historyEmpty")," "));}function yt(e,d){if(e&1){let t=LD();_i(0,"nz-pagination",22),gh("nzPageIndexChange",function(n){Pu(t);let c=VD(2);return Lu(c.setHistoryPage(n))}),Kc();}if(e&2){let t=VD(2);ch("nzPageIndex",t.historyPageIndex())("nzPageSize",t.pageSize)("nzTotal",t.historyTotal());}}function bt(e,d){if(e&1&&(lh(0,"app-job-status-table",14),bD(1,yt,1,3,"nz-pagination",21)),e&2){let t=VD();ch("jobs",t.historyJobs()),gI(),_D(t.historyTotal()>t.pageSize||t.historyPageIndex()>1?1:-1);}}var _t=20,Ct=50,xt=3e3,rt=["completed","failed","cancelled"],Vt=(()=>{class e{constructor(){this.jobsApi=C($),this.workflowsApi=C(U),this.route=C(ae),this.transloco=C(Ve),this.destroyRef=C(at$1),this.pageSize=_t,this.historyStatusOptions=["all",...rt],this.runningJobs=qo([]),this.historyJobs=qo([]),this.workflows=qo([]),this.runningLoading=qo(true),this.historyLoading=qo(true),this.runningError=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 t=(this.historyPageIndex()-1)*this.pageSize,s=this.historyJobs().length;return s<this.pageSize?t+s:t+s+1}),this.pollHandle=null,this.onVisibility=()=>{if(document.hidden){this.stopPolling();return}this.loadRunning({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(this.destroyRef)).subscribe(t=>{let s=t.get("status");s&&rt.includes(s)?this.historyStatusFilter.set(s):this.historyStatusFilter.set("all"),this.historyPageIndex.set(1),this.loadRunning(),this.loadHistory();}),document.addEventListener("visibilitychange",this.onVisibility),this.startPolling();}statusKey(t){return `jobs.status.${t}`}isPolling(){return this.polling()}setHistoryStatusFilter(t){this.historyStatusFilter.set(t),this.historyPageIndex.set(1),this.loadHistory();}setRunningWorkflowId(t){this.runningWorkflowId.set(t),this.loadRunning();}setHistoryWorkflowId(t){this.historyWorkflowId.set(t),this.historyPageIndex.set(1),this.loadHistory();}setShowChildJobs(t){this.showChildJobs.set(t),this.historyPageIndex.set(1),this.loadRunning(),this.loadHistory();}setHistoryPage(t){this.historyPageIndex.set(t),this.loadHistory();}loadWorkflows(){this.workflowsApi.list().pipe(ue(this.destroyRef)).subscribe({next:t=>{this.workflows.set(t);},error:()=>{this.workflows.set([]);}});}loadRunning(t={}){let s$1=this.runningWorkflowId();t.silent||(this.runningLoading.set(true),this.runningError.set(null)),this.jobsApi.list(s(r({terminal:false,topLevelOnly:!this.showChildJobs()},s$1?{workflowId:s$1}:{}),{limit:Ct,offset:0})).pipe(ue(this.destroyRef)).subscribe({next:n=>{this.runningJobs.set(n),this.runningLoading.set(false);},error:n=>{this.runningLoading.set(false),!t.silent&&this.runningError.set(this.errorMessage(n,this.transloco.translate("jobs.list.loadFailed")));}});}loadHistory(t={}){let s$1=this.historyStatusFilter(),n=this.historyWorkflowId();t.silent||(this.historyLoading.set(true),this.historyError.set(null)),this.jobsApi.list(s(r(r({terminal:true,topLevelOnly:!this.showChildJobs()},s$1==="all"?{}:{status:s$1}),n?{workflowId:n}:{}),{limit:this.pageSize,offset:(this.historyPageIndex()-1)*this.pageSize})).pipe(ue(this.destroyRef)).subscribe({next:c=>{this.historyJobs.set(c),this.historyLoading.set(false);},error:c=>{this.historyLoading.set(false),!t.silent&&this.historyError.set(this.errorMessage(c,this.transloco.translate("jobs.list.loadFailed")));}});}startPolling(){this.pollHandle!=null||document.hidden||(this.pollHandle=setInterval(()=>{this.loadRunning({silent:true}),this.loadHistory({silent:true});},xt),this.polling.set(true));}stopPolling(){this.pollHandle!=null&&(clearInterval(this.pollHandle),this.pollHandle=null),this.polling.set(false);}errorMessage(t,s){return t instanceof o||t instanceof Error?t.message:s}static{this.\u0275fac=function(s){return new(s||e)};}static{this.\u0275cmp=QE({type:e,selectors:[["app-job-list"]],decls:56,vars:36,consts:[["data-testid","jobs-list",1,"list-page"],[1,"header"],["nz-button","","nzType","primary","routerLink","/jobs/new","data-testid","start-job"],["nz-checkbox","","data-testid","show-child-jobs",1,"child-toggle",3,"ngModelChange","ngModel"],["data-testid","jobs-running",1,"section"],[1,"section-header"],[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"],["data-testid","jobs-pagination",3,"nzPageIndex","nzPageSize","nzTotal"],["data-testid","jobs-pagination",3,"nzPageIndexChange","nzPageIndex","nzPageSize","nzTotal"]],template:function(s,n){s&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()(),_i(8,"label",3),gh("ngModelChange",function(y){return n.setShowChildJobs(y)}),vw(9),Rw(10,"transloco"),Kc(),oE(),_i(11,"section",4)(12,"header",5)(13,"h2"),vw(14),Rw(15,"transloco"),Kc()(),_i(16,"div",6)(17,"div",7)(18,"span"),vw(19),Rw(20,"transloco"),Kc(),_i(21,"nz-select",8),gh("ngModelChange",function(y){return n.setRunningWorkflowId(y)}),lh(22,"nz-option",9),Rw(23,"transloco"),ND(24,lt,1,2,"nz-option",10,st),Kc(),oE(),Kc()(),bD(26,at,3,3,"p",11)(27,dt,2,1,"p",12)(28,pt,3,3,"p",13)(29,ht,1,1,"app-job-status-table",14),Kc(),_i(30,"section",15)(31,"header",5)(32,"h2"),vw(33),Rw(34,"transloco"),Kc()(),_i(35,"div",6)(36,"div",7)(37,"span"),vw(38),Rw(39,"transloco"),Kc(),_i(40,"nz-select",16),gh("ngModelChange",function(y){return n.setHistoryStatusFilter(y)}),ND(41,gt,3,6,"nz-option",10,SD),Kc(),oE(),Kc(),_i(43,"div",7)(44,"span"),vw(45),Rw(46,"transloco"),Kc(),_i(47,"nz-select",17),gh("ngModelChange",function(y){return n.setHistoryWorkflowId(y)}),lh(48,"nz-option",9),Rw(49,"transloco"),ND(50,mt,1,2,"nz-option",10,st),Kc(),oE(),Kc()(),bD(52,ct,3,3,"p",18)(53,ut,2,1,"p",19)(54,ft,3,3,"p",20)(55,bt,2,2),Kc()()),s&2&&(gI(3),Ph(Ow(4,16,"jobs.list.title")),gI(3),nl(" ",Ow(7,18,"jobs.list.startButton")," "),gI(2),ch("ngModel",n.showChildJobs()),sE(),gI(),nl(" ",Ow(10,20,"jobs.list.showChildJobs")," "),gI(5),Ph(Ow(15,22,"jobs.list.running")),gI(5),Ph(Ow(20,24,"jobs.list.filterByWorkflow")),gI(2),ch("ngModel",n.runningWorkflowId()),sE(),gI(),ch("nzLabel",Ow(23,26,"jobs.list.filterAll")),gI(2),xD(n.workflows()),gI(2),_D(n.runningLoading()?26:n.runningError()?27:n.runningJobs().length===0?28:29),gI(7),Ph(Ow(34,28,"jobs.list.history")),gI(5),Ph(Ow(39,30,"jobs.list.filterByStatus")),gI(2),ch("ngModel",n.historyStatusFilter()),sE(),gI(),xD(n.historyStatusOptions),gI(4),Ph(Ow(46,32,"jobs.list.filterByWorkflow")),gI(2),ch("ngModel",n.historyWorkflowId()),sE(),gI(),ch("nzLabel",Ow(49,34,"jobs.list.filterAll")),gI(2),xD(n.workflows()),gI(2),_D(n.historyLoading()?52:n.historyError()?53:n.historyJobs().length===0?54:55));},dependencies:[Mi,n8,J6,k3,Ln,dd,zc,t7,Lt,ut$1,Di,mn,Xb,V5,D5,Bt,Kt],styles:[".list-page[_ngcontent-%COMP%]{max-width:72rem;margin:0 auto;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}.error[_ngcontent-%COMP%]{color:#9f1239}"]});}}return e})();export{_t as JOB_LIST_PAGE_SIZE,Ct as JOB_RUNNING_LIMIT,xt as JOB_RUNNING_POLL_MS,Vt as JobListComponent,rt as TERMINAL_JOB_STATUSES};
|