@whoz-oss/coday-factory-cockpit 0.0.0-workstream-forge.310 → 0.0.0-workstream-forge.311
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/browser/chunk-B-EzcDXX.js +1233 -0
- package/browser/{chunk-CYwplJeI.js → chunk-BQ3GOt7z.js} +1 -1
- package/browser/{chunk-CPCXJtgc.js → chunk-BUtEDy1H.js} +1 -1
- package/browser/chunk-BhnF2Pdl.js +1 -0
- package/browser/chunk-BoIoyQI_.js +1 -0
- package/browser/{chunk-el-z4iRF.js → chunk-BwxSG216.js} +2 -2
- package/browser/{chunk-C-qu5lON.js → chunk-By0WSWo6.js} +1 -1
- package/browser/chunk-C4rmKOg_.js +1 -0
- package/browser/{chunk-C4tkfNSW.js → chunk-CJg0Tm8L.js} +1 -1
- package/browser/chunk-CXvDK4lS.js +1 -0
- package/browser/chunk-CakYLeOn.js +281 -0
- package/browser/chunk-DQMbATrJ.js +1 -0
- package/browser/{chunk-BlZk5vZF.js → chunk-DrKVRVS8.js} +1 -1
- package/browser/{chunk-D9qJN01e.js → chunk-Eq3dGk0b.js} +1 -1
- package/browser/chunk-F7CKvaWy.js +1 -0
- package/browser/chunk-GUKABzYh.js +1 -0
- package/browser/chunk-SCR6FJps.js +1 -0
- package/browser/index.html +1 -1
- package/browser/{main-T4S6RIJZ.js → main-5IVYFXQL.js} +2 -2
- package/package.json +1 -1
- package/browser/chunk-1Psr-icp.js +0 -1
- package/browser/chunk-B_4j4J3_.js +0 -1
- package/browser/chunk-BgFBBwpx.js +0 -1
- package/browser/chunk-CM2lHl3p.js +0 -1
- package/browser/chunk-D7Rw3ZfK.js +0 -1513
- package/browser/chunk-Dedq0OWd.js +0 -1
- package/browser/chunk-Dl4d2552.js +0 -1
- package/browser/chunk-DtYNvLBh.js +0 -1
- package/browser/chunk-KRWk__j_.js +0 -1
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
import {h,p as pn$1,Q as Qe$1,l as lT,P,I,aN as mU,bA as wt,y as yb,$ as $s,x as xe,N as Nt,H as HW,U as UW,bB as zM,a as Pt,b as It,M as Me,S as Se,bC as bi$1,Y as Y8,Z as Z8,bD as Bi$2,bE as U,bF as le,bG as Ai$1,bH as ai$1,W as Wr,c as Hr,d as ce,o as ot,m as ma,V as VC,e as Id,f as ey,j as Yg,g as eC,i as ci$1,bI as wd,by as $g,bJ as Cd,k as eT,r as ri,n as Zg,q as Sd,t as tC,u as ui$1,s as hy,v as oT,aU as KC,ar as Ey,bK as _t,bL as se,aS as iy,aT as vC,as as vb,aw as yr,ax as XW,aA as M,bM as dt,aY as Cn$1,b1 as Z,bN as Pv,bO as Jb,av as qe$1,aD as Ec,aE as A,bP as po,b7 as Oe,bQ as _t$1,a1 as y$1,ba as rt,br as ya,bb as wt$1,X as he,_ as ce$1,a0 as no,b4 as Ly,bh as uf,bg as ue$1,bR as N3,bi as so,bj as Ht,bk as pb,a2 as sr,bS as dn,a3 as ot$1,bT as fn,L as It$1,z as ir,bU as pm,bV as Kr,bW as Qg,O as Oy,aM as cy,D as pC,R as QC,bo as bC,bd as ny,be as gC,bf as yC,aP as Bt,bX as Fy,b5 as iM,bY as De,bZ as A$1,b_ as K,b$ as Pe$2,c0 as O,bl as ka,b2 as Er,c1 as ut,c2 as bn$1,c3 as Re,c4 as Z$1,c5 as Qb,c6 as eD,c7 as Kb,c8 as Yb,c9 as Yr,ca as Wr$1,cb as pn$2,a8 as di$1,cc as Zl,bs as rh}from'./main-5IVYFXQL.js';import {y as yt,O as Oi$1,B as Bi$1}from'./chunk-B-EzcDXX.js';import {B as Be$1,P as Pe$1}from'./chunk-CJg0Tm8L.js';import {y}from'./chunk-BhnF2Pdl.js';var Ln=[[["caption"]],[["colgroup"],["col"]],"*"],jn=["caption","colgroup, col","*"];function Un(t,o){t&1&&ot$1(0,2);}function $n(t,o){t&1&&(ma(0,"thead",0),Qg(1,1),Id(),ma(2,"tbody",0),Qg(3,2)(4,3),Id(),ma(5,"tfoot",0),Qg(6,4),Id());}function Vn(t,o){t&1&&Qg(0,1)(1,2)(2,3)(3,4);}var N=new y$1("CDK_TABLE");var Ie=(()=>{class t{template=h(Wr$1);static \u0275fac=function(n){return new(n||t)};static \u0275dir=rt({type:t,selectors:[["","cdkCellDef",""]]})}return t})(),Ne=(()=>{class t{template=h(Wr$1);static \u0275fac=function(n){return new(n||t)};static \u0275dir=rt({type:t,selectors:[["","cdkHeaderCellDef",""]]})}return t})(),_n=(()=>{class t{template=h(Wr$1);static \u0275fac=function(n){return new(n||t)};static \u0275dir=rt({type:t,selectors:[["","cdkFooterCellDef",""]]})}return t})(),G=(()=>{class t{_table=h(N,{optional:true});_hasStickyChanged=false;get name(){return this._name}set name(e){this._setNameInput(e);}_name;get sticky(){return this._sticky}set sticky(e){e!==this._sticky&&(this._sticky=e,this._hasStickyChanged=true);}_sticky=false;get stickyEnd(){return this._stickyEnd}set stickyEnd(e){e!==this._stickyEnd&&(this._stickyEnd=e,this._hasStickyChanged=true);}_stickyEnd=false;cell;headerCell;footerCell;cssClassFriendlyName;_columnCssClassName;hasStickyChanged(){let e=this._hasStickyChanged;return this.resetStickyChanged(),e}resetStickyChanged(){this._hasStickyChanged=false;}_updateColumnCssClassName(){this._columnCssClassName=[`cdk-column-${this.cssClassFriendlyName}`];}_setNameInput(e){e&&(this._name=e,this.cssClassFriendlyName=e.replace(/[^a-z0-9_-]/gi,"-"),this._updateColumnCssClassName());}static \u0275fac=function(n){return new(n||t)};static \u0275dir=rt({type:t,selectors:[["","cdkColumnDef",""]],contentQueries:function(n,i,r){if(n&1&&ny(r,Ie,5)(r,Ne,5)(r,_n,5),n&2){let a;gC(a=yC())&&(i.cell=a.first),gC(a=yC())&&(i.headerCell=a.first),gC(a=yC())&&(i.footerCell=a.first);}},inputs:{name:[0,"cdkColumnDef","name"],sticky:[2,"sticky","sticky",wt$1],stickyEnd:[2,"stickyEnd","stickyEnd",wt$1]}})}return t})(),Pe=class{constructor(o,e){e.nativeElement.classList.add(...o._columnCssClassName);}},yn=(()=>{class t extends Pe{constructor(){super(h(G),h(ue$1));}static \u0275fac=function(n){return new(n||t)};static \u0275dir=rt({type:t,selectors:[["cdk-header-cell"],["th","cdk-header-cell",""]],hostAttrs:["role","columnheader",1,"cdk-header-cell"],features:[Kr]})}return t})();var wn=(()=>{class t extends Pe{constructor(){let e=h(G),n=h(ue$1);super(e,n);let i=e._table?._getCellRole();i&&n.nativeElement.setAttribute("role",i);}static \u0275fac=function(n){return new(n||t)};static \u0275dir=rt({type:t,selectors:[["cdk-cell"],["td","cdk-cell",""]],hostAttrs:[1,"cdk-cell"],features:[Kr]})}return t})();var Ve=(()=>{class t{template=h(Wr$1);_differs=h(Fy);columns;_columnsDiffer;ngOnChanges(e){if(!this._columnsDiffer){let n=e.columns&&e.columns.currentValue||[];this._columnsDiffer=this._differs.find(n).create(),this._columnsDiffer.diff(n);}}getColumnsDiff(){return this._columnsDiffer.diff(this.columns)}extractCellTemplate(e){return this instanceof Ce?e.headerCell.template:this instanceof qe?e.footerCell.template:e.cell.template}static \u0275fac=function(n){return new(n||t)};static \u0275dir=rt({type:t,features:[ya]})}return t})(),Ce=(()=>{class t extends Ve{_table=h(N,{optional:true});_hasStickyChanged=false;get sticky(){return this._sticky}set sticky(e){e!==this._sticky&&(this._sticky=e,this._hasStickyChanged=true);}_sticky=false;ngOnChanges(e){super.ngOnChanges(e);}hasStickyChanged(){let e=this._hasStickyChanged;return this.resetStickyChanged(),e}resetStickyChanged(){this._hasStickyChanged=false;}static \u0275fac=(()=>{let e;return function(i){return (e||(e=pm(t)))(i||t)}})();static \u0275dir=rt({type:t,selectors:[["","cdkHeaderRowDef",""]],inputs:{columns:[0,"cdkHeaderRowDef","columns"],sticky:[2,"cdkHeaderRowDefSticky","sticky",wt$1]},features:[Kr,ya]})}return t})(),qe=(()=>{class t extends Ve{_table=h(N,{optional:true});_hasStickyChanged=false;get sticky(){return this._sticky}set sticky(e){e!==this._sticky&&(this._sticky=e,this._hasStickyChanged=true);}_sticky=false;ngOnChanges(e){super.ngOnChanges(e);}hasStickyChanged(){let e=this._hasStickyChanged;return this.resetStickyChanged(),e}resetStickyChanged(){this._hasStickyChanged=false;}static \u0275fac=(()=>{let e;return function(i){return (e||(e=pm(t)))(i||t)}})();static \u0275dir=rt({type:t,selectors:[["","cdkFooterRowDef",""]],inputs:{columns:[0,"cdkFooterRowDef","columns"],sticky:[2,"cdkFooterRowDefSticky","sticky",wt$1]},features:[Kr,ya]})}return t})(),He=(()=>{class t extends Ve{_table=h(N,{optional:true});when;static \u0275fac=(()=>{let e;return function(i){return (e||(e=pm(t)))(i||t)}})();static \u0275dir=rt({type:t,selectors:[["","cdkRowDef",""]],inputs:{columns:[0,"cdkRowDefColumns","columns"],when:[0,"cdkRowDefWhen","when"]},features:[Kr]})}return t})(),te=(()=>{class t{_viewContainer=h(Yr);cells;context;static mostRecentCellOutlet=null;constructor(){t.mostRecentCellOutlet=this;}ngOnDestroy(){t.mostRecentCellOutlet===this&&(t.mostRecentCellOutlet=null);}static \u0275fac=function(n){return new(n||t)};static \u0275dir=rt({type:t,selectors:[["","cdkCellOutlet",""]]})}return t})(),Qe=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275cmp=xe({type:t,selectors:[["cdk-header-row"],["tr","cdk-header-row",""]],hostAttrs:["role","row",1,"cdk-header-row"],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(n,i){n&1&&Qg(0,0);},dependencies:[te],encapsulation:2,changeDetection:1})}return t})();var We=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275cmp=xe({type:t,selectors:[["cdk-row"],["tr","cdk-row",""]],hostAttrs:["role","row",1,"cdk-row"],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(n,i){n&1&&Qg(0,0);},dependencies:[te],encapsulation:2,changeDetection:1})}return t})(),Ae=(()=>{class t{templateRef=h(Wr$1);_contentClassNames=["cdk-no-data-row","cdk-row"];_cellClassNames=["cdk-cell","cdk-no-data-cell"];_cellSelector="td, cdk-cell, [cdk-cell], .cdk-cell";static \u0275fac=function(n){return new(n||t)};static \u0275dir=rt({type:t,selectors:[["ng-template","cdkNoDataRow",""]]})}return t})(),pn=["top","bottom","left","right"],$e=class{_isNativeHtmlTable;_stickCellCss;_isBrowser;_needsPositionStickyOnElement;direction;_positionListener;_tableInjector;_elemSizeCache=new WeakMap;_resizeObserver=globalThis?.ResizeObserver?new globalThis.ResizeObserver(o=>this._updateCachedSizes(o)):null;_updatedStickyColumnsParamsToReplay=[];_stickyColumnsReplayTimeout=null;_cachedCellWidths=[];_borderCellCss;_destroyed=false;constructor(o,e,n=true,i=true,r,a,d){this._isNativeHtmlTable=o,this._stickCellCss=e,this._isBrowser=n,this._needsPositionStickyOnElement=i,this.direction=r,this._positionListener=a,this._tableInjector=d,this._borderCellCss={top:`${e}-border-elem-top`,bottom:`${e}-border-elem-bottom`,left:`${e}-border-elem-left`,right:`${e}-border-elem-right`};}clearStickyPositioning(o,e){(e.includes("left")||e.includes("right"))&&this._removeFromStickyColumnReplayQueue(o);let n=[];for(let i of o)i.nodeType===i.ELEMENT_NODE&&n.push(i,...Array.from(i.children));Zl({write:()=>{for(let i of n)this._removeStickyStyle(i,e);}},{injector:this._tableInjector});}updateStickyColumns(o,e,n,i=true,r=true){if(!o.length||!this._isBrowser||!(e.some(O=>O)||n.some(O=>O))){this._positionListener?.stickyColumnsUpdated({sizes:[]}),this._positionListener?.stickyEndColumnsUpdated({sizes:[]});return}let a=o[0],d=a.children.length,f=this.direction==="rtl",h=f?"right":"left",g=f?"left":"right",_=e.lastIndexOf(true),w=n.indexOf(true),C,Je,et;r&&this._updateStickyColumnReplayQueue({rows:[...o],stickyStartStates:[...e],stickyEndStates:[...n]}),Zl({earlyRead:()=>{C=this._getCellWidths(a,i),Je=this._getStickyStartColumnPositions(C,e),et=this._getStickyEndColumnPositions(C,n);},write:()=>{for(let O of o)for(let E=0;E<d;E++){let tt=O.children[E];e[E]&&this._addStickyStyle(tt,h,Je[E],E===_),n[E]&&this._addStickyStyle(tt,g,et[E],E===w);}this._positionListener&&C.some(O=>!!O)&&(this._positionListener.stickyColumnsUpdated({sizes:_===-1?[]:C.slice(0,_+1).map((O,E)=>e[E]?O:null)}),this._positionListener.stickyEndColumnsUpdated({sizes:w===-1?[]:C.slice(w).map((O,E)=>n[E+w]?O:null).reverse()}));}},{injector:this._tableInjector});}stickRows(o,e,n){if(!this._isBrowser)return;let i=n==="bottom"?o.slice().reverse():o,r=n==="bottom"?e.slice().reverse():e,a=[],d=[],f=[];Zl({earlyRead:()=>{for(let h=0,g=0;h<i.length;h++){if(!r[h])continue;a[h]=g;let _=i[h];f[h]=this._isNativeHtmlTable?Array.from(_.children):[_];let w=this._retrieveElementSize(_).height;g+=w,d[h]=w;}},write:()=>{let h=r.lastIndexOf(true);for(let g=0;g<i.length;g++){if(!r[g])continue;let _=a[g],w=g===h;for(let C of f[g])this._addStickyStyle(C,n,_,w);}n==="top"?this._positionListener?.stickyHeaderRowsUpdated({sizes:d,offsets:a,elements:f}):this._positionListener?.stickyFooterRowsUpdated({sizes:d,offsets:a,elements:f});}},{injector:this._tableInjector});}updateStickyFooterContainer(o,e){this._isNativeHtmlTable&&Zl({write:()=>{let n=o.querySelector("tfoot");n&&(e.some(i=>!i)?this._removeStickyStyle(n,["bottom"]):this._addStickyStyle(n,"bottom",0,false));}},{injector:this._tableInjector});}destroy(){this._stickyColumnsReplayTimeout&&clearTimeout(this._stickyColumnsReplayTimeout),this._resizeObserver?.disconnect(),this._destroyed=true;}_removeStickyStyle(o,e){if(!o.classList.contains(this._stickCellCss))return;for(let i of e)o.style[i]="",o.classList.remove(this._borderCellCss[i]);pn.some(i=>e.indexOf(i)===-1&&o.style[i])?o.style.zIndex=this._getCalculatedZIndex(o):(o.style.zIndex="",this._needsPositionStickyOnElement&&(o.style.position=""),o.classList.remove(this._stickCellCss));}_addStickyStyle(o,e,n,i){o.classList.add(this._stickCellCss),i&&o.classList.add(this._borderCellCss[e]),o.style[e]=`${n}px`,o.style.zIndex=this._getCalculatedZIndex(o),this._needsPositionStickyOnElement&&(o.style.cssText+="position: -webkit-sticky; position: sticky; ");}_getCalculatedZIndex(o){let e={top:100,bottom:10,left:1,right:1},n=0;for(let i of pn)o.style[i]&&(n+=e[i]);return n?`${n}`:""}_getCellWidths(o,e=true){if(!e&&this._cachedCellWidths.length)return this._cachedCellWidths;let n=[],i=o.children;for(let r=0;r<i.length;r++){let a=i[r];n.push(this._retrieveElementSize(a).width);}return this._cachedCellWidths=n,n}_getStickyStartColumnPositions(o,e){let n=[],i=0;for(let r=0;r<o.length;r++)e[r]&&(n[r]=i,i+=o[r]);return n}_getStickyEndColumnPositions(o,e){let n=[],i=0;for(let r=o.length;r>0;r--)e[r]&&(n[r]=i,i+=o[r]);return n}_retrieveElementSize(o){let e=this._elemSizeCache.get(o);if(e)return e;let n=o.getBoundingClientRect(),i={width:n.width,height:n.height};return this._resizeObserver&&(this._elemSizeCache.set(o,i),this._resizeObserver.observe(o,{box:"border-box"})),i}_updateStickyColumnReplayQueue(o){this._removeFromStickyColumnReplayQueue(o.rows),this._stickyColumnsReplayTimeout||this._updatedStickyColumnsParamsToReplay.push(o);}_removeFromStickyColumnReplayQueue(o){let e=new Set(o);for(let n of this._updatedStickyColumnsParamsToReplay)n.rows=n.rows.filter(i=>!e.has(i));this._updatedStickyColumnsParamsToReplay=this._updatedStickyColumnsParamsToReplay.filter(n=>!!n.rows.length);}_updateCachedSizes(o){let e=false;for(let n of o){let i=n.borderBoxSize?.length?{width:n.borderBoxSize[0].inlineSize,height:n.borderBoxSize[0].blockSize}:{width:n.contentRect.width,height:n.contentRect.height};i.width!==this._elemSizeCache.get(n.target)?.width&&qn(n.target)&&(e=true),this._elemSizeCache.set(n.target,i);}e&&this._updatedStickyColumnsParamsToReplay.length&&(this._stickyColumnsReplayTimeout&&clearTimeout(this._stickyColumnsReplayTimeout),this._stickyColumnsReplayTimeout=setTimeout(()=>{if(!this._destroyed){for(let n of this._updatedStickyColumnsParamsToReplay)this.updateStickyColumns(n.rows,n.stickyStartStates,n.stickyEndStates,true,false);this._updatedStickyColumnsParamsToReplay=[],this._stickyColumnsReplayTimeout=null;}},0));}};function qn(t){return ["cdk-cell","cdk-header-cell","cdk-footer-cell"].some(o=>t.classList.contains(o))}var ye=new y$1("STICKY_POSITIONING_LISTENER");var Ke=(()=>{class t{viewContainer=h(Yr);elementRef=h(ue$1);constructor(){let e=h(N);e._rowOutlet=this,e._outletAssigned();}static \u0275fac=function(n){return new(n||t)};static \u0275dir=rt({type:t,selectors:[["","rowOutlet",""]]})}return t})(),Ye=(()=>{class t{viewContainer=h(Yr);elementRef=h(ue$1);constructor(){let e=h(N);e._headerRowOutlet=this,e._outletAssigned();}static \u0275fac=function(n){return new(n||t)};static \u0275dir=rt({type:t,selectors:[["","headerRowOutlet",""]]})}return t})(),Ge=(()=>{class t{viewContainer=h(Yr);elementRef=h(ue$1);constructor(){let e=h(N);e._footerRowOutlet=this,e._outletAssigned();}static \u0275fac=function(n){return new(n||t)};static \u0275dir=rt({type:t,selectors:[["","footerRowOutlet",""]]})}return t})(),Xe=(()=>{class t{viewContainer=h(Yr);elementRef=h(ue$1);constructor(){let e=h(N);e._noDataRowOutlet=this,e._outletAssigned();}static \u0275fac=function(n){return new(n||t)};static \u0275dir=rt({type:t,selectors:[["","noDataRowOutlet",""]]})}return t})(),Ze=(()=>{class t{_differs=h(Fy);_changeDetectorRef=h(Ly);_elementRef=h(ue$1);_dir=h(iM,{optional:true});_platform=h(De);_viewRepeater;_viewportRuler=h(A$1);_injector=h(K);_virtualScrollViewport=h(Pe$2,{optional:true,host:true});_positionListener=h(ye,{optional:true})||h(ye,{optional:true,skipSelf:true});_document=h(O);_data;_renderedRange;_onDestroy=new Z;_renderRows;_renderChangeSubscription=null;_columnDefsByName=new Map;_rowDefs;_headerRowDefs;_footerRowDefs;_dataDiffer;_defaultRowDef=null;_customColumnDefs=new Set;_customRowDefs=new Set;_customHeaderRowDefs=new Set;_customFooterRowDefs=new Set;_customNoDataRow=null;_headerRowDefChanged=true;_footerRowDefChanged=true;_stickyColumnStylesNeedReset=true;_forceRecalculateCellWidths=true;_cachedRenderRowsMap=new Map;_isNativeHtmlTable;_stickyStyler;stickyCssClass="cdk-table-sticky";needsPositionStickyOnElement=true;_isServer;_isShowingNoDataRow=false;_hasAllOutlets=false;_hasInitialized=false;_headerRowStickyUpdates=new Z;_footerRowStickyUpdates=new Z;_disableVirtualScrolling=false;_getCellRole(){if(this._cellRoleInternal===void 0){let e=this._elementRef.nativeElement.getAttribute("role");return e==="grid"||e==="treegrid"?"gridcell":"cell"}return this._cellRoleInternal}_cellRoleInternal=void 0;get trackBy(){return this._trackByFn}set trackBy(e){this._trackByFn=e;}_trackByFn;get dataSource(){return this._dataSource}set dataSource(e){this._dataSource!==e&&(this._switchDataSource(e),this._changeDetectorRef.markForCheck());}_dataSource;_dataSourceChanges=new Z;_dataStream=new Z;get multiTemplateDataRows(){return this._multiTemplateDataRows}set multiTemplateDataRows(e){this._multiTemplateDataRows=e,this._rowOutlet&&this._rowOutlet.viewContainer.length&&(this._forceRenderDataRows(),this.updateStickyColumnStyles());}_multiTemplateDataRows=false;get fixedLayout(){return this._virtualScrollEnabled()?true:this._fixedLayout}set fixedLayout(e){this._fixedLayout=e,this._forceRecalculateCellWidths=true,this._stickyColumnStylesNeedReset=true;}_fixedLayout=false;recycleRows=false;contentChanged=new Oe;viewChange=new Cn$1({start:0,end:Number.MAX_VALUE});_rowOutlet;_headerRowOutlet;_footerRowOutlet;_noDataRowOutlet;_contentColumnDefs;_contentRowDefs;_contentHeaderRowDefs;_contentFooterRowDefs;_noDataRow;get renderedRows(){return this._renderRows}constructor(){h(new ka("role"),{optional:true})||this._elementRef.nativeElement.setAttribute("role","table"),this._isServer=!this._platform.isBrowser,this._isNativeHtmlTable=this._elementRef.nativeElement.nodeName==="TABLE",this._dataDiffer=this._differs.find([]).create((n,i)=>this.trackBy?this.trackBy(i.dataIndex,i.data):i);}ngOnInit(){this._setupStickyStyler(),this._viewportRuler.change().pipe(Er(this._onDestroy)).subscribe(()=>{this._forceRecalculateCellWidths=true;});}ngAfterContentInit(){this._viewRepeater=this.recycleRows||this._virtualScrollEnabled()?new ut:new bn$1,this._virtualScrollEnabled()&&this._setupVirtualScrolling(this._virtualScrollViewport),this._hasInitialized=true;}ngAfterContentChecked(){this._canRender()&&this._render();}ngOnDestroy(){this._stickyStyler?.destroy(),[this._rowOutlet?.viewContainer,this._headerRowOutlet?.viewContainer,this._footerRowOutlet?.viewContainer,this._cachedRenderRowsMap,this._customColumnDefs,this._customRowDefs,this._customHeaderRowDefs,this._customFooterRowDefs,this._columnDefsByName].forEach(e=>{e?.clear();}),this._headerRowDefs=[],this._footerRowDefs=[],this._defaultRowDef=null,this._headerRowStickyUpdates.complete(),this._footerRowStickyUpdates.complete(),this._onDestroy.next(),this._onDestroy.complete(),Re(this.dataSource)&&this.dataSource.disconnect(this);}renderRows(){this._renderRows=this._getAllRenderRows();let e=this._dataDiffer.diff(this._renderRows);if(!e){this._updateNoDataRow(),this.contentChanged.next();return}let n=this._rowOutlet.viewContainer;this._viewRepeater.applyChanges(e,n,(i,r,a)=>this._getEmbeddedViewArgs(i.item,a),i=>i.item.data,i=>{i.operation===Z$1.INSERTED&&i.context&&this._renderCellTemplateForItem(i.record.item.rowDef,i.context);}),this._updateRowIndexContext(),e.forEachIdentityChange(i=>{let r=n.get(i.currentIndex);r.context.$implicit=i.item.data;}),this._updateNoDataRow(),this.contentChanged.next(),this.updateStickyColumnStyles();}addColumnDef(e){this._customColumnDefs.add(e);}removeColumnDef(e){this._customColumnDefs.delete(e);}addRowDef(e){this._customRowDefs.add(e);}removeRowDef(e){this._customRowDefs.delete(e);}addHeaderRowDef(e){this._customHeaderRowDefs.add(e),this._headerRowDefChanged=true;}removeHeaderRowDef(e){this._customHeaderRowDefs.delete(e),this._headerRowDefChanged=true;}addFooterRowDef(e){this._customFooterRowDefs.add(e),this._footerRowDefChanged=true;}removeFooterRowDef(e){this._customFooterRowDefs.delete(e),this._footerRowDefChanged=true;}setNoDataRow(e){this._customNoDataRow=e;}updateStickyHeaderRowStyles(){let e=this._getRenderedRows(this._headerRowOutlet);if(this._isNativeHtmlTable){let i=gn(this._headerRowOutlet,"thead");i&&(i.style.display=e.length?"":"none");}let n=this._headerRowDefs.map(i=>i.sticky);this._stickyStyler.clearStickyPositioning(e,["top"]),this._stickyStyler.stickRows(e,n,"top"),this._headerRowDefs.forEach(i=>i.resetStickyChanged());}updateStickyFooterRowStyles(){let e=this._getRenderedRows(this._footerRowOutlet);if(this._isNativeHtmlTable){let i=gn(this._footerRowOutlet,"tfoot");i&&(i.style.display=e.length?"":"none");}let n=this._footerRowDefs.map(i=>i.sticky);this._stickyStyler.clearStickyPositioning(e,["bottom"]),this._stickyStyler.stickRows(e,n,"bottom"),this._stickyStyler.updateStickyFooterContainer(this._elementRef.nativeElement,n),this._footerRowDefs.forEach(i=>i.resetStickyChanged());}updateStickyColumnStyles(){let e=this._getRenderedRows(this._headerRowOutlet),n=this._getRenderedRows(this._rowOutlet),i=this._getRenderedRows(this._footerRowOutlet);(this._isNativeHtmlTable&&!this.fixedLayout||this._stickyColumnStylesNeedReset)&&(this._stickyStyler.clearStickyPositioning([...e,...n,...i],["left","right"]),this._stickyColumnStylesNeedReset=false),e.forEach((r,a)=>{this._addStickyColumnStyles([r],this._headerRowDefs[a]);}),this._rowDefs.forEach(r=>{let a=[];for(let d=0;d<n.length;d++)this._renderRows[d].rowDef===r&&a.push(n[d]);this._addStickyColumnStyles(a,r);}),i.forEach((r,a)=>{this._addStickyColumnStyles([r],this._footerRowDefs[a]);}),Array.from(this._columnDefsByName.values()).forEach(r=>r.resetStickyChanged());}stickyColumnsUpdated(e){this._positionListener?.stickyColumnsUpdated(e);}stickyEndColumnsUpdated(e){this._positionListener?.stickyEndColumnsUpdated(e);}stickyHeaderRowsUpdated(e){this._headerRowStickyUpdates.next(e),this._positionListener?.stickyHeaderRowsUpdated(e);}stickyFooterRowsUpdated(e){this._footerRowStickyUpdates.next(e),this._positionListener?.stickyFooterRowsUpdated(e);}_outletAssigned(){!this._hasAllOutlets&&this._rowOutlet&&this._headerRowOutlet&&this._footerRowOutlet&&this._noDataRowOutlet&&(this._hasAllOutlets=true,this._canRender()&&this._render());}_canRender(){return this._hasAllOutlets&&this._hasInitialized}_render(){this._cacheRowDefs(),this._cacheColumnDefs(),!this._headerRowDefs.length&&!this._footerRowDefs.length&&this._rowDefs.length;let n=this._renderUpdatedColumns()||this._headerRowDefChanged||this._footerRowDefChanged;this._stickyColumnStylesNeedReset=this._stickyColumnStylesNeedReset||n,this._forceRecalculateCellWidths=n,this._headerRowDefChanged&&(this._forceRenderHeaderRows(),this._headerRowDefChanged=false),this._footerRowDefChanged&&(this._forceRenderFooterRows(),this._footerRowDefChanged=false),this.dataSource&&this._rowDefs.length>0&&!this._renderChangeSubscription?this._observeRenderChanges():this._stickyColumnStylesNeedReset&&this.updateStickyColumnStyles(),this._checkStickyStates();}_getAllRenderRows(){if(!Array.isArray(this._data)||!this._renderedRange)return [];let e=[],n=Math.min(this._data.length,this._renderedRange.end),i=this._cachedRenderRowsMap;this._cachedRenderRowsMap=new Map;for(let r=this._renderedRange.start;r<n;r++){let a=this._data[r],d=this._getRenderRowsForData(a,r,i.get(a));this._cachedRenderRowsMap.has(a)||this._cachedRenderRowsMap.set(a,new WeakMap);for(let f=0;f<d.length;f++){let h=d[f],g=this._cachedRenderRowsMap.get(h.data);g.has(h.rowDef)?g.get(h.rowDef).push(h):g.set(h.rowDef,[h]),e.push(h);}}return e}_getRenderRowsForData(e,n,i){return this._getRowDefs(e,n).map(a=>{let d=i&&i.has(a)?i.get(a):[];if(d.length){let f=d.shift();return f.dataIndex=n,f}else return {data:e,rowDef:a,dataIndex:n}})}_cacheColumnDefs(){this._columnDefsByName.clear(),Fe(this._getOwnDefs(this._contentColumnDefs),this._customColumnDefs).forEach(n=>{this._columnDefsByName.has(n.name),this._columnDefsByName.set(n.name,n);});}_cacheRowDefs(){this._headerRowDefs=Fe(this._getOwnDefs(this._contentHeaderRowDefs),this._customHeaderRowDefs),this._footerRowDefs=Fe(this._getOwnDefs(this._contentFooterRowDefs),this._customFooterRowDefs),this._rowDefs=Fe(this._getOwnDefs(this._contentRowDefs),this._customRowDefs);let e=this._rowDefs.filter(n=>!n.when);this._defaultRowDef=e[0];}_renderUpdatedColumns(){let e=(a,d)=>{let f=!!d.getColumnsDiff();return a||f},n=this._rowDefs.reduce(e,false);n&&this._forceRenderDataRows();let i=this._headerRowDefs.reduce(e,false);i&&this._forceRenderHeaderRows();let r=this._footerRowDefs.reduce(e,false);return r&&this._forceRenderFooterRows(),n||i||r}_switchDataSource(e){this._data=[],Re(this.dataSource)&&this.dataSource.disconnect(this),this._renderChangeSubscription&&(this._renderChangeSubscription.unsubscribe(),this._renderChangeSubscription=null),e||(this._dataDiffer&&this._dataDiffer.diff([]),this._rowOutlet&&this._rowOutlet.viewContainer.clear()),this._dataSource=e;}_observeRenderChanges(){if(!this.dataSource)return;let e;Re(this.dataSource)?e=this.dataSource.connect(this):Qb(this.dataSource)?e=this.dataSource:Array.isArray(this.dataSource)&&(e=qe$1(this.dataSource)),this._renderChangeSubscription=Ec([e,this.viewChange]).pipe(Er(this._onDestroy)).subscribe(([n,i])=>{this._data=n||[],this._renderedRange=i,this._dataStream.next(n),this.renderRows();});}_forceRenderHeaderRows(){this._headerRowOutlet.viewContainer.length>0&&this._headerRowOutlet.viewContainer.clear(),this._headerRowDefs.forEach((e,n)=>this._renderRow(this._headerRowOutlet,e,n)),this.updateStickyHeaderRowStyles();}_forceRenderFooterRows(){this._footerRowOutlet.viewContainer.length>0&&this._footerRowOutlet.viewContainer.clear(),this._footerRowDefs.forEach((e,n)=>this._renderRow(this._footerRowOutlet,e,n)),this.updateStickyFooterRowStyles();}_addStickyColumnStyles(e,n){let i=Array.from(n?.columns||[]).map(d=>{let f=this._columnDefsByName.get(d);return f}),r=i.map(d=>d.sticky),a=i.map(d=>d.stickyEnd);this._stickyStyler.updateStickyColumns(e,r,a,!this.fixedLayout||this._forceRecalculateCellWidths);}_getRenderedRows(e){let n=[];for(let i=0;i<e.viewContainer.length;i++){let r=e.viewContainer.get(i);n.push(r.rootNodes[0]);}return n}_getRowDefs(e,n){if(this._rowDefs.length===1)return [this._rowDefs[0]];let i=[];if(this.multiTemplateDataRows)i=this._rowDefs.filter(r=>!r.when||r.when(n,e));else {let r=this._rowDefs.find(a=>a.when&&a.when(n,e))||this._defaultRowDef;r&&i.push(r);}return i.length,i}_getEmbeddedViewArgs(e,n){let i=e.rowDef,r={$implicit:e.data};return {templateRef:i.template,context:r,index:n}}_renderRow(e,n,i,r={}){let a=e.viewContainer.createEmbeddedView(n.template,r,i);return this._renderCellTemplateForItem(n,r),a}_renderCellTemplateForItem(e,n){for(let i of this._getCellTemplates(e))te.mostRecentCellOutlet&&te.mostRecentCellOutlet._viewContainer.createEmbeddedView(i,n);this._changeDetectorRef.markForCheck();}_updateRowIndexContext(){let e=this._rowOutlet.viewContainer;for(let n=0,i=e.length;n<i;n++){let a=e.get(n).context;a.count=i,a.first=n===0,a.last=n===i-1,a.even=n%2===0,a.odd=!a.even,this.multiTemplateDataRows?(a.dataIndex=this._renderRows[n].dataIndex,a.renderIndex=n):a.index=this._renderRows[n].dataIndex;}}_getCellTemplates(e){return !e||!e.columns?[]:Array.from(e.columns,n=>{let i=this._columnDefsByName.get(n);return e.extractCellTemplate(i)})}_forceRenderDataRows(){this._dataDiffer.diff([]),this._rowOutlet.viewContainer.clear(),this.renderRows();}_checkStickyStates(){let e=(n,i)=>n||i.hasStickyChanged();this._headerRowDefs.reduce(e,false)&&this.updateStickyHeaderRowStyles(),this._footerRowDefs.reduce(e,false)&&this.updateStickyFooterRowStyles(),Array.from(this._columnDefsByName.values()).reduce(e,false)&&(this._stickyColumnStylesNeedReset=true,this.updateStickyColumnStyles());}_setupStickyStyler(){let e=this._dir?this._dir.value:"ltr",n=this._injector;this._stickyStyler=new $e(this._isNativeHtmlTable,this.stickyCssClass,this._platform.isBrowser,this.needsPositionStickyOnElement,e,this,n),(this._dir?this._dir.change:qe$1()).pipe(Er(this._onDestroy)).subscribe(i=>{this._stickyStyler.direction=i,this.updateStickyColumnStyles();});}_setupVirtualScrolling(e){let n=typeof requestAnimationFrame<"u"?Kb:Yb;this.viewChange.next({start:0,end:0}),e.renderedRangeStream.pipe(eD(0,n),Er(this._onDestroy)).subscribe(this.viewChange),e.attach({dataStream:this._dataStream,measureRangeSize:(i,r)=>this._measureRangeSize(i,r)}),Ec([e.renderedContentOffset,this._headerRowStickyUpdates]).pipe(Er(this._onDestroy)).subscribe(([i,r])=>{if(!(!r.sizes||!r.offsets||!r.elements))for(let a=0;a<r.elements.length;a++){let d=r.elements[a];if(d){let f=r.offsets[a],h=i!==0?Math.max(i-f,f):-f;for(let g of d)g.style.top=`${-h}px`;}}}),Ec([e.renderedContentOffset,this._footerRowStickyUpdates]).pipe(Er(this._onDestroy)).subscribe(([i,r])=>{if(!(!r.sizes||!r.offsets||!r.elements))for(let a=0;a<r.elements.length;a++){let d=r.elements[a];if(d)for(let f of d)f.style.bottom=`${i+r.offsets[a]}px`;}});}_getOwnDefs(e){return e.filter(n=>!n._table||n._table===this)}_updateNoDataRow(){let e=this._customNoDataRow||this._noDataRow;if(!e)return;let n=this._rowOutlet.viewContainer.length===0;if(n===this._isShowingNoDataRow)return;let i=this._noDataRowOutlet.viewContainer;if(n){let r=i.createEmbeddedView(e.templateRef),a=r.rootNodes[0];if(r.rootNodes.length===1&&a?.nodeType===this._document.ELEMENT_NODE){a.setAttribute("role","row"),a.classList.add(...e._contentClassNames);let d=a.querySelectorAll(e._cellSelector);for(let f=0;f<d.length;f++)d[f].classList.add(...e._cellClassNames);}}else i.clear();this._isShowingNoDataRow=n,this._changeDetectorRef.markForCheck();}_measureRangeSize(e,n){if(e.start>=e.end||n!=="vertical")return 0;let i=this.viewChange.value,r=this._rowOutlet.viewContainer;e.start<i.start||e.end>i.end;let a=e.start-i.start,d=e.end-e.start,f,h;for(let w=0;w<d;w++){let C=r.get(w+a);if(C&&C.rootNodes.length){f=h=C.rootNodes[0];break}}for(let w=d-1;w>-1;w--){let C=r.get(w+a);if(C&&C.rootNodes.length){h=C.rootNodes[C.rootNodes.length-1];break}}let g=f?.getBoundingClientRect?.(),_=h?.getBoundingClientRect?.();return g&&_?_.bottom-g.top:0}_virtualScrollEnabled(){return !this._disableVirtualScrolling&&this._virtualScrollViewport!=null}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=xe({type:t,selectors:[["cdk-table"],["table","cdk-table",""]],contentQueries:function(n,i,r){if(n&1&&ny(r,Ae,5)(r,G,5)(r,He,5)(r,Ce,5)(r,qe,5),n&2){let a;gC(a=yC())&&(i._noDataRow=a.first),gC(a=yC())&&(i._contentColumnDefs=a),gC(a=yC())&&(i._contentRowDefs=a),gC(a=yC())&&(i._contentHeaderRowDefs=a),gC(a=yC())&&(i._contentFooterRowDefs=a);}},hostAttrs:[1,"cdk-table"],hostVars:2,hostBindings:function(n,i){n&2&&It$1("cdk-table-fixed-layout",i.fixedLayout);},inputs:{trackBy:"trackBy",dataSource:"dataSource",multiTemplateDataRows:[2,"multiTemplateDataRows","multiTemplateDataRows",wt$1],fixedLayout:[2,"fixedLayout","fixedLayout",wt$1],recycleRows:[2,"recycleRows","recycleRows",wt$1]},outputs:{contentChanged:"contentChanged"},exportAs:["cdkTable"],features:[Ey([{provide:N,useExisting:t},{provide:ye,useValue:null}])],ngContentSelectors:jn,decls:5,vars:2,consts:[["role","rowgroup"],["headerRowOutlet",""],["rowOutlet",""],["noDataRowOutlet",""],["footerRowOutlet",""]],template:function(n,i){n&1&&(sr(Ln),ot$1(0),ot$1(1,1),ci$1(2,Un,1,0),ci$1(3,$n,7,0)(4,Vn,4,0)),n&2&&(ri(2),ui$1(i._isServer?2:-1),ri(),ui$1(i._isNativeHtmlTable?3:4));},dependencies:[Ye,Ke,Xe,Ge],styles:[`.cdk-table-fixed-layout {
|
|
2
|
+
table-layout: fixed;
|
|
3
|
+
}
|
|
4
|
+
`],encapsulation:2,changeDetection:1})}return t})();function Fe(t,o){return t.concat(Array.from(o))}function gn(t,o){let e=o.toUpperCase(),n=t.viewContainer.element.nativeElement;for(;n;){let i=n.nodeType===1?n.nodeName:null;if(i===e)return n;if(i==="TABLE")break;n=n.parentNode;}return null}var Cn=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=he({type:t});static \u0275inj=ce$1({imports:[Bt]})}return t})();var Qn=["*",[["","matSortHeaderIcon",""]]],Wn=["*","[matSortHeaderIcon]"];function Kn(t,o){t&1&&(rh(),dn(0,"svg",3),pn$2(1,"path",4),fn());}function Yn(t,o){t&1&&(dn(0,"div",2),ot$1(1,1,null,Kn,2,0),fn());}var vn=new y$1("MAT_SORT_DEFAULT_OPTIONS"),ue=(()=>{class t{_defaultOptions;_initializedStream=new po(1);sortables=new Map;_stateChanges=new Z;active;start="asc";get direction(){return this._direction}set direction(e){this._direction=e;}_direction="";disableClear;disabled=false;sortChange=new Oe;initialized=this._initializedStream;constructor(e){this._defaultOptions=e;}register(e){this.sortables.set(e.id,e);}deregister(e){this.sortables.delete(e.id);}sort(e){this.active!=e.id?(this.active=e.id,this.direction=e.start?e.start:this.start):this.direction=this.getNextSortDirection(e),this.sortChange.emit({active:this.active,direction:this.direction});}getNextSortDirection(e){if(!e)return "";let n=e?.disableClear??this.disableClear??!!this._defaultOptions?.disableClear,i=Gn(e.start||this.start,n),r=i.indexOf(this.direction)+1;return r>=i.length&&(r=0),i[r]}ngOnInit(){this._initializedStream.next();}ngOnChanges(){this._stateChanges.next();}ngOnDestroy(){this._stateChanges.complete(),this._initializedStream.complete();}static \u0275fac=function(n){return new(n||t)(_t$1(vn,8))};static \u0275dir=rt({type:t,selectors:[["","matSort",""]],hostAttrs:[1,"mat-sort"],inputs:{active:[0,"matSortActive","active"],start:[0,"matSortStart","start"],direction:[0,"matSortDirection","direction"],disableClear:[2,"matSortDisableClear","disableClear",wt$1],disabled:[2,"matSortDisabled","disabled",wt$1]},outputs:{sortChange:"matSortChange"},exportAs:["matSort"],features:[ya]})}return t})();function Gn(t,o){let e=["asc","desc"];return t=="desc"&&e.reverse(),o||e.push(""),e}var Dn=(()=>{class t{_sort=h(ue,{optional:true});_columnDef=h(G,{optional:true});_changeDetectorRef=h(Ly);_focusMonitor=h(uf);_elementRef=h(ue$1);_ariaDescriber=h(N3,{optional:true});_renderChanges;_animationsDisabled=so();_recentlyCleared=Qe$1(null);_sortButton;id;arrowPosition="after";start;disabled=false;get sortActionDescription(){return this._sortActionDescription}set sortActionDescription(e){this._updateSortActionDescription(e);}_sortActionDescription="Sort";disableClear;constructor(){h(Ht).load(pb);let e=h(vn,{optional:true});this._sort,e?.arrowPosition&&(this.arrowPosition=e?.arrowPosition);}ngOnInit(){!this.id&&this._columnDef&&(this.id=this._columnDef.name),this._sort.register(this),this._renderChanges=Jb(this._sort._stateChanges,this._sort.sortChange).subscribe(()=>this._changeDetectorRef.markForCheck()),this._sortButton=this._elementRef.nativeElement.querySelector(".mat-sort-header-container"),this._updateSortActionDescription(this._sortActionDescription);}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,true).subscribe(()=>{Promise.resolve().then(()=>this._recentlyCleared.set(null));});}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef),this._sort.deregister(this),this._renderChanges?.unsubscribe(),this._sortButton&&this._ariaDescriber?.removeDescription(this._sortButton,this._sortActionDescription);}_toggleOnInteraction(){if(!this._isDisabled()){let e=this._isSorted(),n=this._sort.direction;this._sort.sort(this),this._recentlyCleared.set(e&&!this._isSorted()?n:null);}}_handleKeydown(e){(e.keyCode===32||e.keyCode===13)&&(e.preventDefault(),this._toggleOnInteraction());}_isSorted(){return this._sort.active==this.id&&(this._sort.direction==="asc"||this._sort.direction==="desc")}_isDisabled(){return this._sort.disabled||this.disabled}_getAriaSortAttribute(){return this._isSorted()?this._sort.direction=="asc"?"ascending":"descending":"none"}_renderArrow(){return !this._isDisabled()||this._isSorted()}_updateSortActionDescription(e){this._sortButton&&(this._ariaDescriber?.removeDescription(this._sortButton,this._sortActionDescription),this._ariaDescriber?.describe(this._sortButton,e)),this._sortActionDescription=e;}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=xe({type:t,selectors:[["","mat-sort-header",""]],hostAttrs:[1,"mat-sort-header"],hostVars:3,hostBindings:function(n,i){n&1&&ey("click",function(){return i._toggleOnInteraction()})("keydown",function(a){return i._handleKeydown(a)})("mouseleave",function(){return i._recentlyCleared.set(null)}),n&2&&(ir("aria-sort",i._getAriaSortAttribute()),It$1("mat-sort-header-disabled",i._isDisabled()));},inputs:{id:[0,"mat-sort-header","id"],arrowPosition:"arrowPosition",start:"start",disabled:[2,"disabled","disabled",wt$1],sortActionDescription:"sortActionDescription",disableClear:[2,"disableClear","disableClear",wt$1]},exportAs:["matSortHeader"],ngContentSelectors:Wn,decls:4,vars:17,consts:[[1,"mat-sort-header-container","mat-focus-indicator"],[1,"mat-sort-header-content"],[1,"mat-sort-header-arrow"],["viewBox","0 -960 960 960","focusable","false","aria-hidden","true"],["d","M440-240v-368L296-464l-56-56 240-240 240 240-56 56-144-144v368h-80Z"]],template:function(n,i){n&1&&(sr(Qn),dn(0,"div",0)(1,"div",1),ot$1(2),fn(),ci$1(3,Yn,3,0,"div",2),fn()),n&2&&(It$1("mat-sort-header-sorted",i._isSorted())("mat-sort-header-position-before",i.arrowPosition==="before")("mat-sort-header-descending",i._sort.direction==="desc")("mat-sort-header-ascending",i._sort.direction==="asc")("mat-sort-header-recently-cleared-ascending",i._recentlyCleared()==="asc")("mat-sort-header-recently-cleared-descending",i._recentlyCleared()==="desc")("mat-sort-header-animations-disabled",i._animationsDisabled),ir("tabindex",i._isDisabled()?null:0)("role",i._isDisabled()?null:"button"),ri(3),ui$1(i._renderArrow()?3:-1));},styles:[`.mat-sort-header {
|
|
5
|
+
cursor: pointer;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.mat-sort-header-disabled {
|
|
9
|
+
cursor: default;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.mat-sort-header-container {
|
|
13
|
+
display: flex;
|
|
14
|
+
align-items: center;
|
|
15
|
+
letter-spacing: normal;
|
|
16
|
+
outline: 0;
|
|
17
|
+
}
|
|
18
|
+
[mat-sort-header].cdk-keyboard-focused .mat-sort-header-container, [mat-sort-header].cdk-program-focused .mat-sort-header-container {
|
|
19
|
+
border-bottom: var(--mat-focus-indicator-fallback-border-style, solid) 1px currentColor;
|
|
20
|
+
}
|
|
21
|
+
.mat-sort-header-container::before {
|
|
22
|
+
margin: calc(calc(var(--mat-focus-indicator-border-width, 3px) + 4px) * -1);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.mat-sort-header-content {
|
|
26
|
+
display: flex;
|
|
27
|
+
align-items: center;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.mat-sort-header-position-before {
|
|
31
|
+
flex-direction: row-reverse;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
@keyframes _mat-sort-header-recently-cleared-ascending {
|
|
35
|
+
from {
|
|
36
|
+
transform: translateY(0);
|
|
37
|
+
opacity: 1;
|
|
38
|
+
}
|
|
39
|
+
to {
|
|
40
|
+
transform: translateY(-25%);
|
|
41
|
+
opacity: 0;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
@keyframes _mat-sort-header-recently-cleared-descending {
|
|
45
|
+
from {
|
|
46
|
+
transform: translateY(0) rotate(180deg);
|
|
47
|
+
opacity: 1;
|
|
48
|
+
}
|
|
49
|
+
to {
|
|
50
|
+
transform: translateY(25%) rotate(180deg);
|
|
51
|
+
opacity: 0;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
.mat-sort-header-arrow {
|
|
55
|
+
height: 12px;
|
|
56
|
+
width: 12px;
|
|
57
|
+
position: relative;
|
|
58
|
+
transition: transform 225ms cubic-bezier(0.4, 0, 0.2, 1), opacity 225ms cubic-bezier(0.4, 0, 0.2, 1);
|
|
59
|
+
opacity: 0;
|
|
60
|
+
overflow: visible;
|
|
61
|
+
color: var(--mat-sort-arrow-color, var(--mat-sys-on-surface));
|
|
62
|
+
}
|
|
63
|
+
.mat-sort-header.cdk-keyboard-focused .mat-sort-header-arrow, .mat-sort-header.cdk-program-focused .mat-sort-header-arrow, .mat-sort-header:hover .mat-sort-header-arrow {
|
|
64
|
+
opacity: 0.54;
|
|
65
|
+
}
|
|
66
|
+
.mat-sort-header .mat-sort-header-sorted .mat-sort-header-arrow {
|
|
67
|
+
opacity: 1;
|
|
68
|
+
}
|
|
69
|
+
.mat-sort-header-descending .mat-sort-header-arrow {
|
|
70
|
+
transform: rotate(180deg);
|
|
71
|
+
}
|
|
72
|
+
.mat-sort-header-recently-cleared-ascending .mat-sort-header-arrow {
|
|
73
|
+
transform: translateY(-25%);
|
|
74
|
+
}
|
|
75
|
+
.mat-sort-header-recently-cleared-ascending .mat-sort-header-arrow {
|
|
76
|
+
transition: none;
|
|
77
|
+
animation: _mat-sort-header-recently-cleared-ascending 225ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
|
|
78
|
+
}
|
|
79
|
+
.mat-sort-header-recently-cleared-descending .mat-sort-header-arrow {
|
|
80
|
+
transition: none;
|
|
81
|
+
animation: _mat-sort-header-recently-cleared-descending 225ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
|
|
82
|
+
}
|
|
83
|
+
.mat-sort-header-animations-disabled .mat-sort-header-arrow {
|
|
84
|
+
transition-duration: 0ms;
|
|
85
|
+
animation-duration: 0ms;
|
|
86
|
+
}
|
|
87
|
+
.mat-sort-header-arrow > svg, .mat-sort-header-arrow [matSortHeaderIcon] {
|
|
88
|
+
width: 24px;
|
|
89
|
+
height: 24px;
|
|
90
|
+
fill: currentColor;
|
|
91
|
+
position: absolute;
|
|
92
|
+
top: 50%;
|
|
93
|
+
left: 50%;
|
|
94
|
+
margin: -12px 0 0 -12px;
|
|
95
|
+
transform: translateZ(0);
|
|
96
|
+
}
|
|
97
|
+
.mat-sort-header-arrow, [dir=rtl] .mat-sort-header-position-before .mat-sort-header-arrow {
|
|
98
|
+
margin: 0 0 0 6px;
|
|
99
|
+
}
|
|
100
|
+
.mat-sort-header-position-before .mat-sort-header-arrow, [dir=rtl] .mat-sort-header-arrow {
|
|
101
|
+
margin: 0 6px 0 0;
|
|
102
|
+
}
|
|
103
|
+
`],encapsulation:2})}return t})(),bn=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=he({type:t});static \u0275inj=ce$1({imports:[no]})}return t})();var Zn=[[["caption"]],[["colgroup"],["col"]],"*"],Jn=["caption","colgroup, col","*"];function ei(t,o){t&1&&ot$1(0,2);}function ti(t,o){t&1&&(ma(0,"thead",0),Qg(1,1),Id(),ma(2,"tbody",2),Qg(3,3)(4,4),Id(),ma(5,"tfoot",0),Qg(6,5),Id());}function ni(t,o){t&1&&Qg(0,1)(1,3)(2,4)(3,5);}var Rn=(()=>{class t extends Ze{stickyCssClass="mat-mdc-table-sticky";needsPositionStickyOnElement=false;static \u0275fac=(()=>{let e;return function(i){return (e||(e=pm(t)))(i||t)}})();static \u0275cmp=xe({type:t,selectors:[["mat-table"],["table","mat-table",""]],hostAttrs:[1,"mat-mdc-table","mdc-data-table__table"],hostVars:2,hostBindings:function(n,i){n&2&&It$1("mat-table-fixed-layout",i.fixedLayout);},exportAs:["matTable"],features:[Ey([{provide:Ze,useExisting:t},{provide:N,useExisting:t},{provide:ye,useValue:null}]),Kr],ngContentSelectors:Jn,decls:5,vars:2,consts:[["role","rowgroup"],["headerRowOutlet",""],["role","rowgroup",1,"mdc-data-table__content"],["rowOutlet",""],["noDataRowOutlet",""],["footerRowOutlet",""]],template:function(n,i){n&1&&(sr(Zn),ot$1(0),ot$1(1,1),ci$1(2,ei,1,0),ci$1(3,ti,7,0)(4,ni,4,0)),n&2&&(ri(2),ui$1(i._isServer?2:-1),ri(),ui$1(i._isNativeHtmlTable?3:4));},dependencies:[Ye,Ke,Xe,Ge],styles:[`.mat-mdc-table-sticky {
|
|
104
|
+
position: sticky !important;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
mat-table {
|
|
108
|
+
display: block;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
mat-header-row {
|
|
112
|
+
min-height: var(--mat-table-header-container-height, 56px);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
mat-row {
|
|
116
|
+
min-height: var(--mat-table-row-item-container-height, 52px);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
mat-footer-row {
|
|
120
|
+
min-height: var(--mat-table-footer-container-height, 52px);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
mat-row, mat-header-row, mat-footer-row {
|
|
124
|
+
display: flex;
|
|
125
|
+
border-width: 0;
|
|
126
|
+
border-bottom-width: 1px;
|
|
127
|
+
border-style: solid;
|
|
128
|
+
align-items: center;
|
|
129
|
+
box-sizing: border-box;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
mat-cell:first-of-type, mat-header-cell:first-of-type, mat-footer-cell:first-of-type {
|
|
133
|
+
padding-left: 24px;
|
|
134
|
+
}
|
|
135
|
+
[dir=rtl] mat-cell:first-of-type:not(:only-of-type), [dir=rtl] mat-header-cell:first-of-type:not(:only-of-type), [dir=rtl] mat-footer-cell:first-of-type:not(:only-of-type) {
|
|
136
|
+
padding-left: 0;
|
|
137
|
+
padding-right: 24px;
|
|
138
|
+
}
|
|
139
|
+
mat-cell:last-of-type, mat-header-cell:last-of-type, mat-footer-cell:last-of-type {
|
|
140
|
+
padding-right: 24px;
|
|
141
|
+
}
|
|
142
|
+
[dir=rtl] mat-cell:last-of-type:not(:only-of-type), [dir=rtl] mat-header-cell:last-of-type:not(:only-of-type), [dir=rtl] mat-footer-cell:last-of-type:not(:only-of-type) {
|
|
143
|
+
padding-right: 0;
|
|
144
|
+
padding-left: 24px;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
mat-cell, mat-header-cell, mat-footer-cell {
|
|
148
|
+
flex: 1;
|
|
149
|
+
display: flex;
|
|
150
|
+
align-items: center;
|
|
151
|
+
overflow: hidden;
|
|
152
|
+
word-wrap: break-word;
|
|
153
|
+
min-height: inherit;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.mat-mdc-table {
|
|
157
|
+
min-width: 100%;
|
|
158
|
+
border: 0;
|
|
159
|
+
border-spacing: 0;
|
|
160
|
+
table-layout: auto;
|
|
161
|
+
white-space: normal;
|
|
162
|
+
background-color: var(--mat-table-background-color, var(--mat-sys-surface));
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.mat-table-fixed-layout {
|
|
166
|
+
table-layout: fixed;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.mdc-data-table__cell {
|
|
170
|
+
box-sizing: border-box;
|
|
171
|
+
overflow: hidden;
|
|
172
|
+
text-align: start;
|
|
173
|
+
text-overflow: ellipsis;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.mdc-data-table__cell,
|
|
177
|
+
.mdc-data-table__header-cell {
|
|
178
|
+
padding: 0 16px;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.mat-mdc-header-row {
|
|
182
|
+
-moz-osx-font-smoothing: grayscale;
|
|
183
|
+
-webkit-font-smoothing: antialiased;
|
|
184
|
+
height: var(--mat-table-header-container-height, 56px);
|
|
185
|
+
color: var(--mat-table-header-headline-color, var(--mat-sys-on-surface, rgba(0, 0, 0, 0.87)));
|
|
186
|
+
font-family: var(--mat-table-header-headline-font, var(--mat-sys-title-small-font, Roboto, sans-serif));
|
|
187
|
+
line-height: var(--mat-table-header-headline-line-height, var(--mat-sys-title-small-line-height));
|
|
188
|
+
font-size: var(--mat-table-header-headline-size, var(--mat-sys-title-small-size, 14px));
|
|
189
|
+
font-weight: var(--mat-table-header-headline-weight, var(--mat-sys-title-small-weight, 500));
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.mat-mdc-row {
|
|
193
|
+
height: var(--mat-table-row-item-container-height, 52px);
|
|
194
|
+
color: var(--mat-table-row-item-label-text-color, var(--mat-sys-on-surface, rgba(0, 0, 0, 0.87)));
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.mat-mdc-row,
|
|
198
|
+
.mdc-data-table__content {
|
|
199
|
+
-moz-osx-font-smoothing: grayscale;
|
|
200
|
+
-webkit-font-smoothing: antialiased;
|
|
201
|
+
font-family: var(--mat-table-row-item-label-text-font, var(--mat-sys-body-medium-font, Roboto, sans-serif));
|
|
202
|
+
line-height: var(--mat-table-row-item-label-text-line-height, var(--mat-sys-body-medium-line-height));
|
|
203
|
+
font-size: var(--mat-table-row-item-label-text-size, var(--mat-sys-body-medium-size, 14px));
|
|
204
|
+
font-weight: var(--mat-table-row-item-label-text-weight, var(--mat-sys-body-medium-weight));
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.mat-mdc-footer-row {
|
|
208
|
+
-moz-osx-font-smoothing: grayscale;
|
|
209
|
+
-webkit-font-smoothing: antialiased;
|
|
210
|
+
height: var(--mat-table-footer-container-height, 52px);
|
|
211
|
+
color: var(--mat-table-row-item-label-text-color, var(--mat-sys-on-surface, rgba(0, 0, 0, 0.87)));
|
|
212
|
+
font-family: var(--mat-table-footer-supporting-text-font, var(--mat-sys-body-medium-font, Roboto, sans-serif));
|
|
213
|
+
line-height: var(--mat-table-footer-supporting-text-line-height, var(--mat-sys-body-medium-line-height));
|
|
214
|
+
font-size: var(--mat-table-footer-supporting-text-size, var(--mat-sys-body-medium-size, 14px));
|
|
215
|
+
font-weight: var(--mat-table-footer-supporting-text-weight, var(--mat-sys-body-medium-weight));
|
|
216
|
+
letter-spacing: var(--mat-table-footer-supporting-text-tracking, var(--mat-sys-body-medium-tracking));
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
.mat-mdc-header-cell {
|
|
220
|
+
border-bottom-color: var(--mat-table-row-item-outline-color, var(--mat-sys-outline, rgba(0, 0, 0, 0.12)));
|
|
221
|
+
border-bottom-width: var(--mat-table-row-item-outline-width, 1px);
|
|
222
|
+
border-bottom-style: solid;
|
|
223
|
+
letter-spacing: var(--mat-table-header-headline-tracking, var(--mat-sys-title-small-tracking));
|
|
224
|
+
font-weight: inherit;
|
|
225
|
+
line-height: inherit;
|
|
226
|
+
box-sizing: border-box;
|
|
227
|
+
text-overflow: ellipsis;
|
|
228
|
+
overflow: hidden;
|
|
229
|
+
outline: none;
|
|
230
|
+
text-align: start;
|
|
231
|
+
}
|
|
232
|
+
.mdc-data-table__row:last-child > .mat-mdc-header-cell {
|
|
233
|
+
border-bottom: none;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
.mat-mdc-cell {
|
|
237
|
+
border-bottom-color: var(--mat-table-row-item-outline-color, var(--mat-sys-outline, rgba(0, 0, 0, 0.12)));
|
|
238
|
+
border-bottom-width: var(--mat-table-row-item-outline-width, 1px);
|
|
239
|
+
border-bottom-style: solid;
|
|
240
|
+
letter-spacing: var(--mat-table-row-item-label-text-tracking, var(--mat-sys-body-medium-tracking));
|
|
241
|
+
line-height: inherit;
|
|
242
|
+
}
|
|
243
|
+
.mdc-data-table__row:last-child > .mat-mdc-cell {
|
|
244
|
+
border-bottom: none;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
.mat-mdc-footer-cell {
|
|
248
|
+
letter-spacing: var(--mat-table-row-item-label-text-tracking, var(--mat-sys-body-medium-tracking));
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
mat-row.mat-mdc-row,
|
|
252
|
+
mat-header-row.mat-mdc-header-row,
|
|
253
|
+
mat-footer-row.mat-mdc-footer-row {
|
|
254
|
+
border-bottom: none;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
.mat-mdc-table tbody,
|
|
258
|
+
.mat-mdc-table tfoot,
|
|
259
|
+
.mat-mdc-table thead,
|
|
260
|
+
.mat-mdc-cell,
|
|
261
|
+
.mat-mdc-footer-cell,
|
|
262
|
+
.mat-mdc-header-row,
|
|
263
|
+
.mat-mdc-row,
|
|
264
|
+
.mat-mdc-footer-row,
|
|
265
|
+
.mat-mdc-table .mat-mdc-header-cell {
|
|
266
|
+
background: inherit;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
.mat-mdc-table mat-header-row.mat-mdc-header-row,
|
|
270
|
+
.mat-mdc-table mat-row.mat-mdc-row,
|
|
271
|
+
.mat-mdc-table mat-footer-row.mat-mdc-footer-cell {
|
|
272
|
+
height: unset;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
mat-header-cell.mat-mdc-header-cell,
|
|
276
|
+
mat-cell.mat-mdc-cell,
|
|
277
|
+
mat-footer-cell.mat-mdc-footer-cell {
|
|
278
|
+
align-self: stretch;
|
|
279
|
+
}
|
|
280
|
+
`],encapsulation:2,changeDetection:1})}return t})(),Sn=(()=>{class t extends Ie{static \u0275fac=(()=>{let e;return function(i){return (e||(e=pm(t)))(i||t)}})();static \u0275dir=rt({type:t,selectors:[["","matCellDef",""]],features:[Ey([{provide:Ie,useExisting:t}]),Kr]})}return t})(),kn=(()=>{class t extends Ne{static \u0275fac=(()=>{let e;return function(i){return (e||(e=pm(t)))(i||t)}})();static \u0275dir=rt({type:t,selectors:[["","matHeaderCellDef",""]],features:[Ey([{provide:Ne,useExisting:t}]),Kr]})}return t})();var xn=(()=>{class t extends G{get name(){return this._name}set name(e){this._setNameInput(e);}_updateColumnCssClassName(){super._updateColumnCssClassName(),this._columnCssClassName.push(`mat-column-${this.cssClassFriendlyName}`);}static \u0275fac=(()=>{let e;return function(i){return (e||(e=pm(t)))(i||t)}})();static \u0275dir=rt({type:t,selectors:[["","matColumnDef",""]],inputs:{name:[0,"matColumnDef","name"]},features:[Ey([{provide:G,useExisting:t}]),Kr]})}return t})(),Mn=(()=>{class t extends yn{static \u0275fac=(()=>{let e;return function(i){return (e||(e=pm(t)))(i||t)}})();static \u0275dir=rt({type:t,selectors:[["mat-header-cell"],["th","mat-header-cell",""]],hostAttrs:["role","columnheader",1,"mat-mdc-header-cell","mdc-data-table__header-cell"],features:[Kr]})}return t})();var En=(()=>{class t extends wn{static \u0275fac=(()=>{let e;return function(i){return (e||(e=pm(t)))(i||t)}})();static \u0275dir=rt({type:t,selectors:[["mat-cell"],["td","mat-cell",""]],hostAttrs:[1,"mat-mdc-cell","mdc-data-table__cell"],features:[Kr]})}return t})();var Tn=(()=>{class t extends Ce{static \u0275fac=(()=>{let e;return function(i){return (e||(e=pm(t)))(i||t)}})();static \u0275dir=rt({type:t,selectors:[["","matHeaderRowDef",""]],inputs:{columns:[0,"matHeaderRowDef","columns"],sticky:[2,"matHeaderRowDefSticky","sticky",wt$1]},features:[Ey([{provide:Ce,useExisting:t}]),Kr]})}return t})();var On=(()=>{class t extends He{static \u0275fac=(()=>{let e;return function(i){return (e||(e=pm(t)))(i||t)}})();static \u0275dir=rt({type:t,selectors:[["","matRowDef",""]],inputs:{columns:[0,"matRowDefColumns","columns"],when:[0,"matRowDefWhen","when"]},features:[Ey([{provide:He,useExisting:t}]),Kr]})}return t})(),Fn=(()=>{class t extends Qe{static \u0275fac=(()=>{let e;return function(i){return (e||(e=pm(t)))(i||t)}})();static \u0275cmp=xe({type:t,selectors:[["mat-header-row"],["tr","mat-header-row",""]],hostAttrs:["role","row",1,"mat-mdc-header-row","mdc-data-table__header-row"],exportAs:["matHeaderRow"],features:[Ey([{provide:Qe,useExisting:t}]),Kr],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(n,i){n&1&&Qg(0,0);},dependencies:[te],encapsulation:2,changeDetection:1})}return t})();var Pn=(()=>{class t extends We{static \u0275fac=(()=>{let e;return function(i){return (e||(e=pm(t)))(i||t)}})();static \u0275cmp=xe({type:t,selectors:[["mat-row"],["tr","mat-row",""]],hostAttrs:["role","row",1,"mat-mdc-row","mdc-data-table__row"],exportAs:["matRow"],features:[Ey([{provide:We,useExisting:t}]),Kr],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(n,i){n&1&&Qg(0,0);},dependencies:[te],encapsulation:2,changeDetection:1})}return t})(),In=(()=>{class t extends Ae{_cellSelector="td, mat-cell, [mat-cell], .mat-cell";constructor(){super(),this._contentClassNames.push("mat-mdc-no-data-row","mat-mdc-row","mdc-data-table__row"),this._cellClassNames.push("mat-mdc-cell","mdc-data-table__cell","mat-no-data-cell");}static \u0275fac=function(n){return new(n||t)};static \u0275dir=rt({type:t,selectors:[["ng-template","matNoDataRow",""]],features:[Ey([{provide:Ae,useExisting:t}]),Kr]})}return t})();var Nn=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=he({type:t});static \u0275inj=ce$1({imports:[Cn,no]})}return t})(),ii=9007199254740991,Be=class extends dt{_data;_renderData=new Cn$1([]);_filter=new Cn$1("");_internalPageChanges=new Z;_renderChangesSubscription=null;filteredData;get data(){return this._data.value}set data(o){o=Array.isArray(o)?o:[],this._data.next(o),this._renderChangesSubscription||this._filterData(o);}get filter(){return this._filter.value}set filter(o){this._filter.next(o),this._renderChangesSubscription||this._filterData(this.data);}get sort(){return this._sort}set sort(o){this._sort=o,this._updateChangeSubscription();}_sort;get paginator(){return this._paginator}set paginator(o){this._paginator=o,this._updateChangeSubscription();}_paginator;sortingDataAccessor=(o,e)=>{let n=o[e];if(Pv(n)){let i=Number(n);return i<ii?i:n}return n};sortData=(o,e)=>{let n=e.active,i=e.direction;return !n||i==""?o:o.sort((r,a)=>{let d=this.sortingDataAccessor(r,n),f=this.sortingDataAccessor(a,n),h=typeof d,g=typeof f;h!==g&&(h==="number"&&(d+=""),g==="number"&&(f+=""));let _=0;return d!=null&&f!=null?d>f?_=1:d<f&&(_=-1):d!=null?_=1:f!=null&&(_=-1),_*(i=="asc"?1:-1)})};filterPredicate=(o,e)=>{let n=e.trim().toLowerCase();return Object.values(o).some(i=>`${i}`.toLowerCase().includes(n))};constructor(o=[]){super(),this._data=new Cn$1(o),this._updateChangeSubscription();}_updateChangeSubscription(){let o=this._sort?Jb(this._sort.sortChange,this._sort.initialized):qe$1(null),e=this._paginator?Jb(this._paginator.page,this._internalPageChanges,this._paginator.initialized):qe$1(null),n=this._data,i=Ec([n,this._filter]).pipe(A(([d])=>this._filterData(d))),r=Ec([i,o]).pipe(A(([d])=>this._orderData(d))),a=Ec([r,e]).pipe(A(([d])=>this._pageData(d)));this._renderChangesSubscription?.unsubscribe(),this._renderChangesSubscription=a.subscribe(d=>this._renderData.next(d));}_filterData(o){return this.filteredData=this.filter==null||this.filter===""?o:o.filter(e=>this.filterPredicate(e,this.filter)),this.paginator&&this._updatePaginator(this.filteredData.length),this.filteredData}_orderData(o){return this.sort?this.sortData(o.slice(),this.sort):o}_pageData(o){if(!this.paginator)return o;let e=this.paginator.pageIndex*this.paginator.pageSize;return o.slice(e,e+this.paginator.pageSize)}_updatePaginator(o){Promise.resolve().then(()=>{let e=this.paginator;if(e&&(e.length=o,e.pageIndex>0)){let n=Math.ceil(e.length/e.pageSize)-1||0,i=Math.min(e.pageIndex,n);i!==e.pageIndex&&(e.pageIndex=i,this._internalPageChanges.next());}});}connect(){return this._renderChangesSubscription||this._updateChangeSubscription(),this._renderData}disconnect(){this._renderChangesSubscription?.unsubscribe(),this._renderChangesSubscription=null;}};var ve=class t{api=h(vb);namespaces=Qe$1([]);loading=Qe$1(false);error=Qe$1(null);loadNamespaces(){this.loading.set(true),this.error.set(null),this.api.getNamespaces().pipe(yr(()=>this.loading.set(false))).subscribe({next:o=>this.namespaces.set(XW(o)),error:o=>{this.namespaces.set([]),this.error.set(o);}});}static \u0275fac=function(e){return new(e||t)};static \u0275prov=M({token:t,factory:t.\u0275fac})};var Hn=(t,o)=>o.key;function ai(t,o){if(t&1&&pn$2(0,"span",3),t&2){let e=o.$implicit;di$1("seg--"+e.tone),cy("flex-grow",e.ratio),It$1("running",e.status==="running")("skipped",e.status==="skipped");}}function si(t,o){t&1&&VC(0," \xB7 ");}function li(t,o){if(t&1&&(dn(0,"span"),VC(1),fn(),ci$1(2,si,1,0)),t&2){let e=o.$implicit,n=o.$index,i=o.$count;It$1("current",e.status==="running"),ri(),hy(e.key),ri(),ui$1(n!==i-1?2:-1);}}function ci(t,o){if(t&1&&(dn(0,"span",2),eC(1,li,3,4,null,null,Hn),fn()),t&2){let e=pC();ri(),tC(e.phases());}}var ze=class t{phases=Oy.required();height=Oy(8);showLegend=Oy(true);ariaLabel=lT(()=>"Phases: "+this.phases().map(o=>o.status==="running"?`${o.key} running`:o.status==="waiting_human"?`${o.key} waiting for human`:o.status==="failed"?`${o.key} failed`:o.status==="indeterminate"?`${o.key} indeterminate`:o.status==="cancelled"?`${o.key} cancelled`:o.status==="pending"?`${o.key} waiting`:o.status==="skipped"?`${o.key} skipped, not executed`:`${o.key} completed`).join(", "));static \u0275fac=function(e){return new(e||t)};static \u0275cmp=xe({type:t,selectors:[["sf-phase-bar"]],inputs:{phases:[1,"phases"],height:[1,"height"],showLegend:[1,"showLegend"]},decls:4,vars:4,consts:[["role","img",1,"bar"],[1,"seg",3,"class","running","skipped","flex-grow"],[1,"legend"],[1,"seg"]],template:function(e,n){e&1&&(dn(0,"div",0),eC(1,ai,1,8,"span",1,Hn),fn(),ci$1(3,ci,3,0,"span",2)),e&2&&(cy("height",n.height(),"px"),ir("aria-label",n.ariaLabel()),ri(),tC(n.phases()),ri(2),ui$1(n.showLegend()?3:-1));},styles:["[_nghost-%COMP%]{display:flex;align-items:center;gap:12px}.bar[_ngcontent-%COMP%]{flex:1;display:flex;gap:3px}.seg[_ngcontent-%COMP%]{min-width:4px;border-radius:var(--radius-sm, 0)}.seg--amber[_ngcontent-%COMP%]{background:var(--color-warning)}.seg--violet[_ngcontent-%COMP%]{background:var(--color-accent-700)}.seg--green[_ngcontent-%COMP%]{background:var(--color-success)}.seg--cyan[_ngcontent-%COMP%]{background:var(--color-accent)}.seg.running[_ngcontent-%COMP%]{background:repeating-linear-gradient(135deg,var(--color-accent) 0 6px,var(--color-accent-700) 6px 12px)}.seg.skipped[_ngcontent-%COMP%]{background:var(--sf-outline-strong);opacity:.55}.legend[_ngcontent-%COMP%]{font-family:var(--sf-mono);font-size:12px;color:var(--sf-text-muted);white-space:nowrap}.legend[_ngcontent-%COMP%] .current[_ngcontent-%COMP%]{color:var(--color-accent-700)}"]})};var di=()=>[10,25,50],Bn=t=>["/sessions",t],zn=t=>({namespaceId:t}),mi=(t,o)=>o.id,ui=(t,o)=>o.name;function fi(t,o){if(t&1&&(ma(0,"mat-option",18),VC(1),Id()),t&2){let e=o.$implicit;Zg("value",e.id),ri(),hy(e.name);}}function hi(t,o){t&1&&(ma(0,"mat-hint"),VC(1,"Loading\u2026"),Id());}function pi(t,o){if(t&1&&(ma(0,"mat-hint",19),VC(1),Id()),t&2){let e=pC();ri(),hy(e.namespacesError());}}function gi(t,o){t&1&&(ma(0,"th",50),VC(1,"Run"),Id());}function _i(t,o){if(t&1&&(ma(0,"td",51)(1,"a",52),VC(2),Id(),ma(3,"span",53),VC(4),Id()()),t&2){let e=o.$implicit;ri(),Zg("routerLink",QC(4,Bn,e.id))("queryParams",QC(6,zn,e.namespaceId)),ri(),hy(e.title),ri(2),hy(e.id);}}function yi(t,o){t&1&&(ma(0,"th",54),VC(1,"Namespace"),Id());}function wi(t,o){if(t&1&&(ma(0,"td",55),VC(1),Id()),t&2){let e=o.$implicit;ri(),hy(e.namespaceId??"\u2014");}}function Ci(t,o){t&1&&(ma(0,"th",54),VC(1,"Project \u203A branch"),Id());}function vi(t,o){if(t&1&&VC(0),t&2){let e=pC().$implicit;Sd(" \u203A ",e.branch," ");}}function Di(t,o){if(t&1&&(ma(0,"td",55),VC(1),ci$1(2,vi,1,1),Id()),t&2){let e=o.$implicit;It$1("cyan",e.branch),ri(),Sd(" ",e.project," "),ri(),ui$1(e.branch?2:-1);}}function bi(t,o){t&1&&(ma(0,"th",50),VC(1,"Status"),Id());}function Ri(t,o){t&1&&(ma(0,"sf-status-chip",56),VC(1,"completed / stopped"),Id());}function Si(t,o){t&1&&(ma(0,"sf-status-chip",57),VC(1,"in progress"),Id());}function ki(t,o){if(t&1&&(ma(0,"td",51),ci$1(1,Ri,2,0,"sf-status-chip",56)(2,Si,2,0,"sf-status-chip",57),Id()),t&2){let e=o.$implicit;ri(),ui$1(e.status==="destroyed"?1:2);}}function xi(t,o){t&1&&(ma(0,"th",54),VC(1,"Phases"),Id());}function Mi(t,o){if(t&1&&Yg(0,"sf-phase-bar",58),t&2){let e=pC().$implicit;Zg("phases",e.phases)("height",6)("showLegend",false);}}function Ei(t,o){t&1&&(ma(0,"span",4),VC(1,"\u2014"),Id());}function Ti(t,o){if(t&1&&(ma(0,"td",51),ci$1(1,Mi,1,3,"sf-phase-bar",58)(2,Ei,2,0,"span",4),Id()),t&2){let e=o.$implicit;ri(),ui$1(e.phases.length?1:2);}}function Oi(t,o){t&1&&(ma(0,"th",59),VC(1,"Cost"),Id());}function Fi(t,o){if(t&1&&(ma(0,"td",60),VC(1),eT(2,"usd"),Id()),t&2){let e=o.$implicit;It$1("zero",e.cost===0),ri(),Sd(" ",oT(2,3,e.cost,4,e.unknownCostCount)," ");}}function Pi(t,o){t&1&&(ma(0,"th",54)(1,"span",61),VC(2,"Actions"),Id()());}function Ii(t,o){if(t&1&&(ma(0,"td",51)(1,"button",62)(2,"mat-icon"),VC(3,"more_vert"),Id()(),ma(4,"mat-menu",null,0)(6,"a",63)(7,"mat-icon"),VC(8,"monitoring"),Id(),VC(9,"Open session"),Id(),ma(10,"button",64)(11,"mat-icon"),VC(12,"receipt_long"),Id(),VC(13,"View log"),Id()()()),t&2){let e=o.$implicit,n=bC(5);ri(),Zg("matMenuTriggerFor",n),ri(5),Zg("routerLink",QC(3,Bn,e.id))("queryParams",QC(5,zn,e.namespaceId));}}function Ni(t,o){t&1&&Yg(0,"tr",65);}function Hi(t,o){if(t&1&&Yg(0,"tr",66),t&2){let e=o.$implicit;It$1("row--active",e.status!=="destroyed");}}function Ai(t,o){if(t&1&&(ma(0,"tr",67)(1,"td",68),VC(2,"No run matches these filters."),Id()()),t&2){let e=pC();ri(),ir("colspan",e.columns.length);}}function Bi(t,o){if(t&1&&(ma(0,"li",69)(1,"span",70),VC(2),Id(),ma(3,"span",71),Yg(4,"span",72),Id(),ma(5,"span",73),VC(6),eT(7,"usd"),Id()()),t&2){let e=o.$implicit;It$1("active",e.active),ri(2),hy(e.name),ri(2),cy("width",e.pct,"%"),ri(2),hy(oT(7,6,e.cost,2,e.unknownCostCount));}}var An=class t{historyState=h(ve);store=h(pn$1);columns=["run","namespace","branch","status","phases","cost","actions"];query=Qe$1("");status=Qe$1("all");namespaceId=Qe$1("");namespaces=this.historyState.namespaces;namespacesLoading=this.historyState.loading;namespacesError=lT(()=>this.historyState.error()?"Namespaces unavailable.":null);rows=lT(()=>this.store.runs().map(o=>P(I({},o),{cost:o.status==="destroyed"&&o.finalCostUsd!==void 0?o.finalCostUsd:o.run?o.run.costUsd:o.costUsd,unknownCostCount:o.run?.unknownCostCount??null})));counts=lT(()=>({all:this.rows().length,working:this.rows().filter(o=>o.status!=="destroyed").length,destroyed:this.rows().filter(o=>o.status==="destroyed").length}));filtered=lT(()=>{let o=this.query().trim().toLowerCase(),e=this.status(),n=this.namespaceId();return this.rows().filter(i=>(!n||i.namespaceId===n)&&(e==="all"||(e==="working"?i.status!=="destroyed":i.status==="destroyed"))&&(!o||[i.title,i.branch,i.id,i.run?.workflow].some(r=>r?.toLowerCase().includes(o))))});totalCost=lT(()=>{let o=this.filtered();return o.some(e=>e.cost===null)?null:o.reduce((e,n)=>e+(n.cost??0),0)});totalUnknownCostCount=lT(()=>{let o=this.filtered();return o.some(e=>e.unknownCostCount===null)?null:o.reduce((e,n)=>e+(n.unknownCostCount??0),0)});costBars=lT(()=>{let e=[...this.filtered().filter(i=>i.cost!==null)].sort((i,r)=>r.cost-i.cost),n=Math.max(...e.map(i=>i.cost),1e-4);return e.map(i=>({name:i.title,cost:i.cost,unknownCostCount:i.unknownCostCount,active:i.status!=="destroyed",pct:Math.max(i.cost/n*100,.5)}))});dataSource=new Be([]);sort=mU(ue);paginator=mU(wt);constructor(){h(yb).crumbs.set([{label:"Run history",link:"/history"}]),this.historyState.loadNamespaces(),$s(()=>{this.store.runs().some(o=>o.status==="destroyed")&&this.store.enrichRemovedRunsUsage();}),$s(()=>{this.dataSource.data=this.filtered();}),$s(()=>{this.dataSource.sort=this.sort()??null,this.dataSource.paginator=this.paginator()??null;});}exportCsv(){let o=["run_id;namespace_id;project;branch;status;workflow;cost_usd",...this.filtered().map(n=>[n.id,n.namespaceId??"",n.project,n.branch??"",n.status,n.run?.workflow??n.title,n.cost?.toFixed(4)??""].join(";"))],e=URL.createObjectURL(new Blob([o.join(`
|
|
281
|
+
`)],{type:"text/csv"}));Object.assign(document.createElement("a"),{href:e,download:"runs.csv"}).click(),URL.revokeObjectURL(e);}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=xe({type:t,selectors:[["sf-history-page"]],viewQuery:function(e,n){e&1&&iy(n.sort,ue,5)(n.paginator,wt,5),e&2&&vC(2);},features:[Ey([{provide:se,useClass:_t},ve])],decls:82,vars:20,consts:[["menu","matMenu"],[1,"page"],[1,"page-head"],[1,"titles"],[1,"sf-muted"],["mat-stroked-button","",1,"sf-secondary",3,"click"],[1,"filters"],["appearance","outline","subscriptSizing","dynamic",1,"search"],["matPrefix",""],["matInput","","placeholder","Search run, branch, workflow\u2026","aria-label","Search",3,"input","value"],["aria-label","Filter by status",3,"change","value"],["value","all"],["value","working"],["value","destroyed"],[1,"sf-spacer"],["appearance","outline","subscriptSizing","dynamic",1,"project"],[3,"selectionChange","value"],["value",""],[3,"value"],[1,"hint--error"],[1,"table-wrap","sf-panel"],["mat-table","","matSort","","matSortActive","cost","matSortDirection","desc",3,"dataSource"],["matColumnDef","run"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","namespace"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","","class","mono-cell",4,"matCellDef"],["matColumnDef","branch"],["mat-cell","","class","mono-cell",3,"cyan",4,"matCellDef"],["matColumnDef","status"],["matColumnDef","phases"],["matColumnDef","cost"],["mat-header-cell","","mat-sort-header","","arrowPosition","before","class","num",4,"matHeaderCellDef"],["mat-cell","","class","num mono-cell",3,"zero",4,"matCellDef"],["matColumnDef","actions"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",3,"row--active",4,"matRowDef","matRowDefColumns"],["class","mat-row",4,"matNoDataRow"],[1,"table-foot"],[1,"sf-mono"],["aria-label","Pagination",3,"pageSize","pageSizeOptions"],["aria-labelledby","costs-title",1,"costs","sf-panel"],[1,"costs-head"],["id","costs-title",1,"sf-overline"],[1,"legend"],[1,"sw","sw--active"],[1,"sw"],[1,"bars"],[1,"bar-row",3,"active"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],[1,"name","name--active",3,"routerLink","queryParams"],[1,"sf-id"],["mat-header-cell",""],["mat-cell","",1,"mono-cell"],["tone","neutral","size","sm","dot",""],["tone","blue","size","sm","icon","progress_activity","spin",""],[3,"phases","height","showLegend"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",1,"num"],["mat-cell","",1,"num","mono-cell"],[1,"cdk-visually-hidden"],["mat-icon-button","","aria-label","Actions",3,"matMenuTriggerFor"],["mat-menu-item","",3,"routerLink","queryParams"],["mat-menu-item",""],["mat-header-row",""],["mat-row",""],[1,"mat-row"],[1,"mat-cell","empty"],[1,"bar-row"],[1,"bar-name","sf-ellipsis"],[1,"bar-track"],[1,"bar-fill"],[1,"bar-val"]],template:function(e,n){e&1&&(ma(0,"div",1)(1,"header",2)(2,"div",3)(3,"h1"),VC(4,"Run history"),Id(),ma(5,"p",4),VC(6,"Every Factory run with its cost, status, duration and phases"),Id()(),ma(7,"button",5),ey("click",function(){return n.exportCsv()}),ma(8,"mat-icon"),VC(9,"download"),Id(),VC(10,"Export CSV "),Id()(),ma(11,"div",6)(12,"mat-form-field",7)(13,"mat-icon",8),VC(14,"search"),Id(),ma(15,"input",9),ey("input",function(r){return n.query.set(r.target.value)}),Id()(),ma(16,"mat-chip-listbox",10),ey("change",function(r){return n.status.set(r.value??"all")}),ma(17,"mat-chip-option",11),VC(18),Id(),ma(19,"mat-chip-option",12),VC(20),Id(),ma(21,"mat-chip-option",13),VC(22),Id()(),Yg(23,"span",14),ma(24,"mat-form-field",15)(25,"mat-label"),VC(26,"Namespace"),Id(),ma(27,"mat-select",16),ey("selectionChange",function(r){return n.namespaceId.set(r.value)}),ma(28,"mat-option",17),VC(29,"All"),Id(),eC(30,fi,2,2,"mat-option",18,mi),Id(),ci$1(32,hi,2,0,"mat-hint"),ci$1(33,pi,2,1,"mat-hint",19),Id()(),ma(34,"section",20)(35,"table",21),wd(36,22),$g(37,gi,2,0,"th",23)(38,_i,5,8,"td",24),Cd(),wd(39,25),$g(40,yi,2,0,"th",26)(41,wi,2,1,"td",27),Cd(),wd(42,28),$g(43,Ci,2,0,"th",26)(44,Di,3,4,"td",29),Cd(),wd(45,30),$g(46,bi,2,0,"th",23)(47,ki,3,1,"td",24),Cd(),wd(48,31),$g(49,xi,2,0,"th",26)(50,Ti,3,1,"td",24),Cd(),wd(51,32),$g(52,Oi,2,0,"th",33)(53,Fi,3,7,"td",34),Cd(),wd(54,35),$g(55,Pi,3,0,"th",26)(56,Ii,14,7,"td",24),Cd(),$g(57,Ni,1,0,"tr",36)(58,Hi,1,2,"tr",37)(59,Ai,3,1,"tr",38),Id(),ma(60,"footer",39)(61,"span"),VC(62),ma(63,"b",40),VC(64),eT(65,"usd"),Id()(),Yg(66,"span",14)(67,"mat-paginator",41),Id()(),ma(68,"section",42)(69,"header",43)(70,"h2",44),VC(71,"Cost per run"),Id(),Yg(72,"span",14),ma(73,"span",45),Yg(74,"i",46),VC(75,"active"),Id(),ma(76,"span",45),Yg(77,"i",47),VC(78,"destroyed"),Id()(),ma(79,"ul",48),eC(80,Bi,8,10,"li",49,ui),Id()()()),e&2&&(ri(15),Zg("value",n.query()),ri(),Zg("value",n.status()),ri(2),Sd("All \xB7 ",n.counts().all),ri(2),Sd("In progress \xB7 ",n.counts().working),ri(2),Sd("Completed / Stopped \xB7 ",n.counts().destroyed),ri(5),Zg("value",n.namespaceId()),ri(3),tC(n.namespaces()),ri(2),ui$1(n.namespacesLoading()?32:-1),ri(),ui$1(n.namespacesError()?33:-1),ri(2),Zg("dataSource",n.dataSource),ri(22),Zg("matHeaderRowDef",n.columns),ri(),Zg("matRowDefColumns",n.columns),ri(4),Sd("",n.filtered().length," runs \xB7 cumulative cost "),ri(2),hy(oT(65,15,n.totalCost(),2,n.totalUnknownCostCount())),ri(3),Zg("pageSize",25)("pageSizeOptions",KC(19,di)),ri(13),tC(n.costBars()));},dependencies:[Nt,HW,UW,zM,yt,Oi$1,Bi$1,Pt,It,Me,Se,bi$1,Y8,Z8,Be$1,Pe$1,Bi$2,U,le,Ai$1,ai$1,wt,Wr,Hr,ce,bn,ue,Dn,Nn,Rn,kn,Tn,xn,Sn,On,Mn,En,Fn,Pn,In,y,ze,ot],styles:['@charset "UTF-8";.page[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:18px;max-width:1400px}.page-head[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:16px}.titles[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;gap:4px}h1[_ngcontent-%COMP%]{margin:0;font-family:var(--font-heading);font-size:28px;font-weight:600;letter-spacing:-.01em}.titles[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;font-size:14px}.filters[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px}.search[_ngcontent-%COMP%]{width:380px}.project[_ngcontent-%COMP%]{width:160px}.table-wrap[_ngcontent-%COMP%]{overflow:hidden}table[_ngcontent-%COMP%]{width:100%}th.mat-mdc-header-cell[_ngcontent-%COMP%]{background:var(--color-surface-muted);font-family:var(--font-heading);font-size:11px;font-weight:600;letter-spacing:.12em;text-transform:uppercase}td.mat-mdc-cell[_ngcontent-%COMP%]{height:60px}tr.row--active[_ngcontent-%COMP%]{background:color-mix(in srgb,var(--color-accent) 8%,transparent)}tr.mat-mdc-row[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover)}.name[_ngcontent-%COMP%]{font-family:var(--sf-mono);font-size:13.5px;font-weight:600;color:var(--sf-text-2)}.name--active[_ngcontent-%COMP%]{color:var(--color-accent-700);font-weight:700;text-decoration:none}.name--active[_ngcontent-%COMP%]:hover{text-decoration:underline}.mono-cell[_ngcontent-%COMP%]{font-family:var(--sf-mono);font-size:12.5px;color:var(--sf-text-muted)}.mono-cell.cyan[_ngcontent-%COMP%]{color:var(--sf-secondary)}.run-cell[_ngcontent-%COMP%]{display:inline-flex;gap:8px;white-space:nowrap}td.mat-column-branch[_ngcontent-%COMP%]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:260px}.plain[_ngcontent-%COMP%]{font-family:var(--sf-font);font-size:13px}.num[_ngcontent-%COMP%]{text-align:right}td.num[_ngcontent-%COMP%]{font-size:13.5px;font-weight:600;color:var(--sf-text)}td.num.zero[_ngcontent-%COMP%]{color:var(--sf-text-faint)}sf-phase-bar[_ngcontent-%COMP%]{width:140px}.empty[_ngcontent-%COMP%]{padding:32px;text-align:center;color:var(--sf-text-muted)}.table-foot[_ngcontent-%COMP%]{display:flex;align-items:center;padding-left:20px;font-size:13px;color:var(--sf-text-muted);border-top:1px solid var(--color-divider)}.table-foot[_ngcontent-%COMP%] b[_ngcontent-%COMP%]{color:var(--sf-text)}.costs[_ngcontent-%COMP%]{padding:20px 22px;display:flex;flex-direction:column;gap:14px}.costs-head[_ngcontent-%COMP%]{display:flex;align-items:center;gap:16px}.legend[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px;font-size:12.5px;color:var(--sf-text-muted)}.sw[_ngcontent-%COMP%]{width:10px;height:10px;border-radius:var(--radius-sm, 0);background:var(--color-neutral-500)}.sw--active[_ngcontent-%COMP%]{background:var(--color-accent)}.bars[_ngcontent-%COMP%]{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:9px}.bar-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:330px minmax(0,1fr) 70px;gap:14px;align-items:center;font-family:var(--sf-mono);font-size:12.5px}.bar-name[_ngcontent-%COMP%]{color:var(--sf-text-2)}.bar-track[_ngcontent-%COMP%]{display:flex;height:14px}.bar-fill[_ngcontent-%COMP%]{border-radius:0 var(--radius-sm, 0) var(--radius-sm, 0) 0;background:var(--color-neutral-500)}.bar-val[_ngcontent-%COMP%]{text-align:right}.bar-row.active[_ngcontent-%COMP%] .bar-name[_ngcontent-%COMP%]{color:var(--sf-text)}.bar-row.active[_ngcontent-%COMP%] .bar-fill[_ngcontent-%COMP%]{background:var(--color-accent)}.bar-row.active[_ngcontent-%COMP%] .bar-val[_ngcontent-%COMP%]{color:var(--color-accent-700)}']})};export{An as HistoryPageComponent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {I}from'./chunk-F7CKvaWy.js';import {A}from'./chunk-CXvDK4lS.js';import {e as ee}from'./chunk-Eq3dGk0b.js';import {U}from'./chunk-BQ3GOt7z.js';import {h,ad as Ue$1,Q as Qe$1,cy as Ge$1,aw as yr,y as yb,$ as $s,cz as pi,aC as G,cA as vr,ac as ce,x as xe,cB as Ln,cC as Gn,cD as Un,ai as Xe$1,cE as ln$1,cF as Dt$1,aj as kn,al as qt$1,cG as Ht$1,cH as Gt$1,cI as on$1,H as HW,U as UW,Y as Y8,Z as Z8,N as Nt$1,m as ma,V as VC,e as Id,i as ci,r as ri,n as Zg,u as ui,ar as Ey,f as ey,as as vb,l as lT,P,I as I$1,ax as XW,aA as M,D as pC,A as my,s as hy,j as Yg,cJ as m_,E as aC,a9 as Wp,aa as Gp,aU as KC,z as ir,q as Sd,ap as UI,g as eC,aq as $I,t as tC,aB as gy,bz as Jw,aV as Xw}from'./main-5IVYFXQL.js';import {c}from'./chunk-BUtEDy1H.js';import {J as J$1,Z as Z$1}from'./chunk-DrKVRVS8.js';var K=[{id:"build",label:"Build",hint:"Repository-defined verification. The target repository must declare build in factory/verification.json (Coday: build, lint, tests and OpenAPI)."},{id:"frontend-build",label:"Frontend build",hint:"Factory Nx development build for server-configured buildHosts (default: aphrodite, admin, agentic-studio, copilot-chat). It needs specific server/project configuration and is not ready by default for Coday; use Build."},{id:"frontend-tests",label:"Frontend tests",hint:"Factory-owned Nx frontend-test verifier. It needs PASS-agent ancestor claims.modifiedFiles plus specific server/project configuration and is not ready by default for Coday; use Build."}];function Y(n){return K.some(t=>t.id===n)}function ze(n){return K.find(t=>t.id===n)}function qe(n){return Array.isArray(n.entry)&&typeof n.mission=="string"&&Array.isArray(n.exit)?{entry:[...n.entry],mission:n.mission,exit:[...n.exit]}:null}function ie(n){let t=n.legacyContract;return t?.adoptable&&t.entry&&typeof t.mission=="string"&&t.exit?{entry:[...t.entry],mission:t.mission,exit:[...t.exit]}:null}function He(n){if(!n.mission.trim()||n.mission.length>16e3)return "Prompt must contain 1\u201316,000 characters.";for(let[t,e]of [["Pre-actions",n.entry],["Post-actions",n.exit]])if(e.length>50||e.some(i=>!i.trim()||i.length>4e3))return `${t}: at most 50 actions, each containing 1\u20134,000 characters. Remove empty actions.`;return null}var J=/^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/,Ze=/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)$/;function Ge(n,t=new Set){if(!J.test(n.workflowType??""))return "Workflow type: use 1\u2013128 letters, digits, dots, underscores or hyphens, starting with a letter or digit.";if(!n.title?.trim()||n.title.length>256)return "Workflow name must contain 1\u2013256 characters.";let e=n.steps??[];if(!e.length||e.length>500)return "Add between 1 and 500 blocks.";let i=new Set(e.map(_=>_.id));if(i.size!==e.length)return "Duplicate block IDs are not allowed.";for(let _ of e){if(!J.test(_.id))return `Invalid block ID: ${_.id}`;if(!_.name.trim()||_.name.length>256)return `${_.id}: block name must contain 1\u2013256 characters.`;if(!_.responsibility?.name?.trim())return `${_.id}: ${_.responsibility?.kind==="human"?"enter a human role.":_.responsibility?.kind==="code"?"select a code verifier.":"select an agent."}`;if(_.responsibility?.kind==="code"&&t.has(_.id)&&!Y(_.responsibility.name))return `${_.id}: select a supported code verifier.`;if(_.dependsOn?.some(V=>!i.has(V)))return `${_.id}: missing predecessor.`;if(new Set(_.dependsOn).size!==(_.dependsOn?.length??0))return `${_.id}: duplicate predecessor.`;let N=qe(_);if(N){let V=He(N);if(V)return `${_.id}: ${V}`}}let o=new Set,d=new Set,f=new Map(e.map(_=>[_.id,_]));function b(_){return d.has(_)?true:o.has(_)?false:(d.add(_),f.get(_)?.dependsOn?.some(b)?true:(d.delete(_),o.add(_),false))}if(e.some(_=>b(_.id)))return "Dependency cycle: remove a predecessor connection.";let h=Ke(e);if(h)return h;let R=_=>{let N=new Set([_]),V=true;for(;V;){V=false;for(let I of e)!N.has(I.id)&&I.dependsOn?.some(Q=>N.has(Q))&&(N.add(I.id),V=true);}return N},B=[];for(let _ of e){let N=_.outcomeTransitions,V=N?.pass,I=N?.fail;if(V?.action==="activate"&&(_.decision||!V.target||!i.has(V.target)||V.target===_.id||!e.find(P=>P.id===V.target)?.dependsOn?.includes(_.id)||e.some(P=>P.decision?.routes.some(O=>O.target===V.target))))return `${_.id}: PASS activation must target a non-conditional direct successor of a non-decision step.`;if(I?.action!=="return")continue;if(_.responsibility?.kind!=="agent")return `${_.id}: FAIL return requires an agent step.`;let Q=P=>{if(P===_.id)return true;let O=new Set,A=ae=>O.add(ae)?f.get(ae)?.dependsOn?.some(re=>re===P||A(re))??false:false;return A(_.id)};if(!I.target||!i.has(I.target)||!Q(I.target))return `${_.id}: FAIL return must target this step or an ancestor.`;if(I.maxCycles!==void 0&&(!Number.isInteger(I.maxCycles)||I.maxCycles<1||I.maxCycles>10))return `${_.id}: correction budget must be an integer from 1 to 10.`;let j=R(I.target);for(let P of e.filter(O=>O.decision)){let O=new Set([P.id,...P.decision?.routes.map(A=>A.target)??[],...e.filter(A=>A.join===P.id).map(A=>A.id)]);if([...O].some(A=>j.has(A))&&![...O].every(A=>j.has(A)))return `${_.id}: FAIL return cannot split a conditional-routing region.`}if(e.some(P=>j.has(P.id)&&["Gitay","prepare-work-branch"].includes(P.responsibility?.name??"")))return `${_.id}: FAIL return cannot replay branch initialization.`;let oe=I.maxCycles??2;if(B.some(P=>[...P.scope].some(O=>j.has(O))&&(![...P.scope].every(O=>j.has(O))||![...j].every(O=>P.scope.has(O))||P.maxCycles!==oe)))return `${_.id}: FAIL return overlaps an incompatible correction scope.`;B.push({scope:j,maxCycles:oe});}return null}function Ke(n){let t=n.filter(h=>h.decision),e=n.filter(h=>h.join);if(!t.length&&!e.length)return null;if(t.length!==1||e.length!==1)return "Routing requires exactly one decision and one explicit join.";let i=t[0],o=e[0],d=i.decision;if(i.responsibility?.kind!=="agent"||!["single","multiple"].includes(d.mode))return "Decision requires an agent and single/multiple mode.";let f=d.routes;if(f.length<2||f.length>16||f.some(h=>!J.test(h.name)||!J.test(h.target))||new Set(f.map(h=>h.name)).size!==f.length||new Set(f.map(h=>h.target)).size!==f.length)return "Configure 2\u201316 unique route names and distinct targets.";if(o.join!==i.id||o.id===i.id)return "Join must reference the decision.";let b=f.map(h=>h.target);for(let h of b){let R=n.find(B=>B.id===h);if(!R||[i.id,o.id].includes(h)||R.dependsOn?.length!==1||R.dependsOn[0]!==i.id)return "Each route targets one step depending only on the decision.";if(n.filter(B=>B.dependsOn?.includes(h)).some(B=>B.id!==o.id)||!o.dependsOn?.includes(h))return "Every branch must lead only and directly to the explicit join. Multi-step/nested branches are not supported."}return n.some(h=>h.dependsOn?.includes(i.id)&&!b.includes(h.id)&&h.id!==o.id)?"Decision fanout must use named routes.":null}var Z=class n{api=h(vb);baseline=null;creating=Qe$1(false);editing=Qe$1(false);structureDirty=Qe$1(false);namespaces=Qe$1([]);namespaceId=Qe$1("");agents=Qe$1([]);codeVerificationPresets=K;newCodeStepIds=Qe$1(new Set);agentsLoading=Qe$1(false);discoveryError=Qe$1(null);discoverySequence=0;definition=Qe$1(null);selectedId=Qe$1(null);drafts=Qe$1({});loading=Qe$1(false);saving=Qe$1(false);error=Qe$1(null);saved=Qe$1(null);targetVersion=Qe$1("");selected=lT(()=>this.definition()?.steps?.find(t=>t.id===this.selectedId())??null);draft=lT(()=>{let t=this.selected();return t?this.drafts()[t.id]??qe(t):null});dirty=lT(()=>this.structureDirty()||Object.keys(this.drafts()).length>0||this.targetVersion()!==(this.creating()?"1.0.0":""));validation=lT(()=>{for(let e of Object.values(this.drafts())){let i=He(e);if(i)return i}let t=this.preview();return this.structureDirty()&&t?Ge(t,this.newCodeStepIds()):null});preview=lT(()=>{let t=this.definition();return t?P(I$1({},t),{steps:t.steps?.map(e=>I$1(I$1({},e),this.drafts()[e.id]))}):null});startNew(){this.creating.set(true),this.editing.set(true),this.baseline={schemaVersion:"1",workflowType:"",version:"",title:"",steps:[]},this.definition.set(this.baseline),this.targetVersion.set("1.0.0"),this.newCodeStepIds.set(new Set);}loadDiscovery(){this.api.getNamespaces().subscribe({next:t=>this.namespaces.set(XW(t)),error:t=>this.discoveryError.set(t.message||"Unable to load namespaces.")});}discoverAgents(t){this.namespaceId.set(t),this.agents.set([]),this.discoveryError.set(null);let e=++this.discoverySequence;this.agentsLoading.set(!!t),t&&this.api.getAgents(t).subscribe({next:i=>{e===this.discoverySequence&&(this.agents.set([...new Set(i.map(o=>o.name))].sort()),this.agentsLoading.set(false));},error:i=>{e===this.discoverySequence&&(this.discoveryError.set(i.message||"Unable to discover agents."),this.agentsLoading.set(false));}});}metadata(t,e){t==="workflowType"&&!this.creating()||this.changeDefinition(P(I$1({},this.definition()),{[t]:e}));}addBlock(t="agent"){if(!this.editing()||this.saving())return;let e=this.definition();if(!e||(e.steps?.length??0)>=500)return;let i=1;for(;e.steps?.some(d=>d.id===`step-${i}`);)i++;let o=`step-${i}`;this.changeDefinition(P(I$1({},e),{steps:[...e.steps??[],I$1({id:o,name:`${t==="human"?"Human":t==="code"?"Code":"Agent"} step ${i}`,responsibility:{kind:t,name:""},dependsOn:[]},t==="agent"?{entry:[],mission:"",exit:[]}:{})]})),t==="code"&&this.newCodeStepIds.update(d=>new Set([...d,o])),this.selectedId.set(o);}isNewCodeStep(t){return this.newCodeStepIds().has(t)}canRemoveSelected(){let t=this.selected();return !this.editing()||!t||this.saving()?false:t.responsibility?.kind==="agent"||t.responsibility?.kind==="human"||t.responsibility?.kind==="code"&&(this.isNewCodeStep(t.id)||Y(t.responsibility.name))}setCodeVerification(t){this.selected()?.responsibility?.kind==="code"&&Y(t)&&this.updateBlock({responsibility:{kind:"code",name:t}});}updateBlock(t){let e=this.selected();if(!this.editing()||!e||this.saving())return;let i=t.id??e.id;if(i!==e.id&&(!J.test(i)||this.definition()?.steps?.some(d=>d.id===i))){this.error.set("Block ID must be unique and use 1\u2013128 safe characters, starting with a letter or digit.");return}let o=this.definition()?.steps?.map(d=>I$1(I$1(I$1(P(I$1({},d.id===e.id?P(I$1(I$1({},d),t),{legacyContract:t.responsibility||t.dependsOn||t.name?void 0:d.legacyContract}):d),{dependsOn:(d.id===e.id?t.dependsOn??d.dependsOn:d.dependsOn)?.map(f=>f===e.id?i:f)}),i!==e.id&&d.decision?{decision:P(I$1({},d.decision),{routes:d.decision.routes.map(f=>P(I$1({},f),{target:f.target===e.id?i:f.target}))})}:{}),i!==e.id&&d.join?{join:d.join===e.id?i:d.join}:{}),i!==e.id&&d.outcomeTransitions?{outcomeTransitions:I$1(I$1(I$1({},d.outcomeTransitions),d.outcomeTransitions.pass?.target===e.id?{pass:P(I$1({},d.outcomeTransitions.pass),{target:i})}:{}),d.outcomeTransitions.fail?.target===e.id?{fail:P(I$1({},d.outcomeTransitions.fail),{target:i})}:{})}:{}));if(i!==e.id){let d=I$1({},this.drafts()),f=d[e.id];f&&(d[i]=f,delete d[e.id]),this.drafts.set(d),this.newCodeStepIds.update(b=>{if(!b.has(e.id))return b;let h=new Set(b);return h.delete(e.id),h.add(i),h});}this.changeDefinition(P(I$1({},this.definition()),{steps:o})),this.selectedId.set(i);}setRoutingMode(t){let e=this.selected();if(!(!e||e.responsibility?.kind!=="agent")){if(t===""){this.updateBlock({decision:void 0});return}t!=="single"&&t!=="multiple"||this.updateBlock({decision:{mode:t,routes:e.decision?.routes??[{name:"route-1",target:""},{name:"route-2",target:""}]}});}}canConfigureFailReturn(t=this.selected()){return t?.responsibility?.kind==="agent"}canConfigurePassActivate(t=this.selected()){return !!t&&!t.decision&&this.passActivationTargets(t).length>0}passActivationTargets(t=this.selected()){return !t||t.decision?[]:(this.definition()?.steps??[]).filter(e=>e.dependsOn?.includes(t.id)&&!(this.definition()?.steps??[]).some(i=>i.decision?.routes.some(o=>o.target===e.id)))}updateOutcome(t,e){let i=this.selected();if(!i||t==="fail"&&e==="return"&&!this.canConfigureFailReturn(i)||t==="pass"&&e==="activate"&&!this.canConfigurePassActivate(i))return;let o=i.outcomeTransitions??{};t==="pass"?this.updateBlock({outcomeTransitions:P(I$1({},o),{pass:e==="activate"?{action:"activate"}:{action:"continue"}})}):this.updateBlock({outcomeTransitions:P(I$1({},o),{fail:e==="return"?{action:"return",maxCycles:2}:{action:"block"}})});}updateOutcomeTarget(t,e){let i=this.selected()?.outcomeTransitions;if(!i)return;let o=i[t];o&&this.updateBlock({outcomeTransitions:P(I$1({},i),{[t]:P(I$1({},o),{target:e})})});}updateFailBudget(t){let e=this.selected()?.outcomeTransitions;if(e?.fail?.action!=="return")return;let i=Number(t);this.updateBlock({outcomeTransitions:P(I$1({},e),{fail:P(I$1({},e.fail),{maxCycles:i})})});}updateRoute(t,e,i){let o=this.selected()?.decision;o&&this.updateBlock({decision:P(I$1({},o),{routes:o.routes.map((d,f)=>f===t?P(I$1({},d),{[e]:i}):d)})});}addRoute(){let t=this.selected()?.decision;t&&t.routes.length<16&&this.updateBlock({decision:P(I$1({},t),{routes:[...t.routes,{name:"",target:""}]})});}removeRoute(t){let e=this.selected()?.decision;e&&this.updateBlock({decision:P(I$1({},e),{routes:e.routes.filter((i,o)=>o!==t)})});}setAgent(t){this.selected()?.responsibility?.kind==="agent"&&this.agents().includes(t)&&this.updateBlock({responsibility:{kind:"agent",name:t}});}addHumanContract(){let t=this.selected();this.editing()&&!this.saving()&&t?.responsibility?.kind==="human"&&!this.draft()&&this.setDraft(t.id,{entry:[],mission:t.name,exit:[]});}addExistingCodeInstructions(){let t=this.selected();this.editing()&&!this.saving()&&t?.responsibility?.kind==="code"&&!this.isNewCodeStep(t.id)&&!this.draft()&&this.setDraft(t.id,{entry:[],mission:t.name,exit:[]});}connect(t,e){let i=this.selected();!i||t===i.id||!this.definition()?.steps?.some(o=>o.id===t)||this.updateBlock({dependsOn:e?[...new Set([...i.dependsOn??[],t])]:i.dependsOn?.filter(o=>o!==t)});}removeBlock(){let t=this.selected();if(!this.canRemoveSelected()||!t)return;let e=this.definition()?.steps?.filter(o=>o.id!==t.id).map(o=>P(I$1(I$1(I$1(P(I$1({},o),{dependsOn:o.dependsOn?.filter(d=>d!==t.id)}),o.decision?{decision:P(I$1({},o.decision),{routes:o.decision.routes.filter(d=>d.target!==t.id)})}:{}),o.join===t.id?{join:void 0}:{}),o.outcomeTransitions?{outcomeTransitions:I$1(I$1({},o.outcomeTransitions.pass?.target===t.id?{pass:{action:"continue"}}:o.outcomeTransitions.pass?{pass:o.outcomeTransitions.pass}:{}),o.outcomeTransitions.fail?.target===t.id?{fail:{action:"block"}}:o.outcomeTransitions.fail?{fail:o.outcomeTransitions.fail}:{})}:{}),{legacyContract:o.dependsOn?.includes(t.id)?void 0:o.legacyContract}))??[],i=I$1({},this.drafts());delete i[t.id],this.drafts.set(i),this.newCodeStepIds.update(o=>{let d=new Set(o);return d.delete(t.id),d}),this.changeDefinition(P(I$1({},this.definition()),{steps:e})),this.selectedId.set(e[0]?.id??null);}changeDefinition(t){!this.editing()||this.saving()||(this.definition.set(t),this.structureDirty.set(true),this.saved.set(null),this.error.set(null));}load(t,e){if(!t||!e){this.error.set("Missing route parameters (type or version).");return}this.loading.set(true),this.saved.set(null),this.error.set(null),this.api.getWorkflowDefinition(t,e).pipe(yr(()=>this.loading.set(false))).subscribe({next:i=>{this.baseline=i,this.definition.set(i),this.creating.set(false),this.editing.set(false),this.drafts.set({}),this.structureDirty.set(false),this.selectedId.set(i.steps?.[0]?.id??null),this.targetVersion.set(""),this.newCodeStepIds.set(new Set);},error:i=>this.error.set(i.message||"Unable to load workflow definition.")});}select(t){this.saving()||this.selectedId.set(t);}adopt(){let t=this.selected(),e=t&&ie(t);this.editing()&&t&&e&&!this.saving()&&this.setDraft(t.id,e);}update(t,e){let i=this.selected(),o=this.draft();!this.editing()||!i||!o||this.saving()||this.setDraft(i.id,P(I$1({},o),{[t]:e}));}setDraft(t,e){this.drafts.update(i=>P(I$1({},i),{[t]:e})),this.saved.set(null),this.error.set(null);}edit(){this.definition()&&!this.saving()&&(this.editing.set(true),this.saved.set(null));}cancel(){this.saving()||(this.discard(),this.editing.set(false));}discard(){this.saving()||(this.drafts.set({}),this.definition.set(this.baseline),this.structureDirty.set(false),this.targetVersion.set(this.creating()?"1.0.0":""),this.newCodeStepIds.set(new Set),this.selectedId.set(this.baseline?.steps?.[0]?.id??null),this.error.set(null),this.saved.set(null));}save(){let t=this.definition();if(!this.editing()||!t||!this.dirty()||this.saving())return;let e=this.validation();if(e){this.error.set(e);return}let i=t.workflowType?.trim(),o=this.targetVersion().trim();if(!i||!Ze.test(o)||o===t.version){this.error.set("Choose a new version in MAJOR.MINOR.PATCH format. Existing definitions and active runs are never modified.");return}let d=this.drafts(),f=P(I$1({},t),{version:o,steps:t.steps?.map(b=>{let h=I$1(I$1({},b),d[b.id]);return delete h.legacyContract,h})});this.saving.set(true),this.error.set(null),this.api.createWorkflowDefinition(f).pipe(yr(()=>this.saving.set(false))).subscribe({next:b=>{this.saved.set(`Saved ${b.workflowType}@${b.version} \xB7 hash ${b.definitionHash??"unavailable"}. Original definition and runs unchanged.`);let h=P(I$1({},f),{workflowType:b.workflowType??f.workflowType,version:b.version??f.version});this.baseline=h,this.definition.set(h),this.editing.set(false),this.drafts.set({}),this.structureDirty.set(false),this.creating.set(false),this.newCodeStepIds.set(new Set),this.targetVersion.set("");},error:b=>{let h=b.details?.path;this.error.set(`${b.message||"Save failed."}${h?` (${h})`:""}`);}});}static \u0275fac=function(e){return new(e||n)};static \u0275prov=M({token:n,factory:n.\u0275fac})};var Ye=()=>[],z=(n,t)=>t.id,Qe=(n,t)=>t.name;function Xe(n,t){n&1&&VC(0," New workflow ");}function et(n,t){if(n&1&&VC(0),n&2){let e=pC();my(" ",e.state.definition()?.workflowType||e.workflowType,"@",e.state.definition()?.version||e.version," ");}}function tt(n,t){n&1&&(ma(0,"p",5),VC(1),Id()),n&2&&(ri(),hy(t));}function nt(n,t){n&1&&(ma(0,"div",6),Yg(1,"mat-progress-spinner",9),VC(2," Loading definition\u2026 "),Id());}function it(n,t){n&1&&(ma(0,"div",7),VC(1),Id()),n&2&&(ri(),hy(t));}function ot(n,t){n&1&&(ma(0,"p",8),VC(1),Id()),n&2&&(ri(),hy(t));}function at(n,t){n&1&&(ma(0,"p",19),VC(1),Id()),n&2&&(ri(),hy(t));}function rt(n,t){if(n&1){let e=aC();ma(0,"div")(1,"div",16)(2,"button",17),ey("click",function(){Wp(e);let o=pC(2);return Gp(o.state.edit())}),VC(3," Edit workflow "),Id(),ma(4,"button",18),ey("click",function(){Wp(e);let o=pC(2);return Gp(o.deleteWorkflow())}),ma(5,"mat-icon"),VC(6,"delete_outline"),Id(),VC(7),Id()(),ci(8,at,2,1,"p",19),ma(9,"p",11),VC(10," Read-only definition. Editing saves a new immutable version; existing runs keep their version and hash. "),Id()();}if(n&2){let e,i=pC(),o=pC();ri(2),Zg("disabled",o.deleting()),ri(2),Zg("disabled",o.deleting()),ir("aria-label","Delete workflow "+(i.title||i.workflowType)+" "+i.workflowType+"@"+i.version),ri(3),Sd("",o.deleting()?"Deleting\u2026":"Delete workflow"," "),ri(),ui((e=o.deleteError())?8:-1,e);}}function lt(n,t){if(n&1&&(ma(0,"option",28),VC(1),Id()),n&2){let e=t.$implicit;Zg("value",e.id),ri(),hy(e.name);}}function st(n,t){n&1&&(ma(0,"p",29),VC(1,"Loading agents\u2026"),Id());}function dt(n,t){n&1&&(ma(0,"p",30),VC(1),Id()),n&2&&(ri(),hy(t));}function ct(n,t){n&1&&(ma(0,"p",29),VC(1," No enabled agents discovered. Existing assignments are preserved; choose another namespace or retry. "),Id());}function _t(n,t){if(n&1){let e=aC();ma(0,"fieldset",20)(1,"legend"),VC(2,"Workflow identity"),Id(),ma(3,"div",21)(4,"label"),VC(5,"Workflow type "),ma(6,"input",22),ey("ngModelChange",function(o){Wp(e);let d=pC(2);return Gp(d.state.metadata("workflowType",o))}),Id(),UI(),Id(),ma(7,"label"),VC(8,"Workflow name "),ma(9,"input",23),ey("ngModelChange",function(o){Wp(e);let d=pC(2);return Gp(d.state.metadata("title",o))}),Id(),UI(),Id()(),ma(10,"p",11),VC(11," Schema 1 \xB7 stable workflow type; immutable semantic versions. Agent discovery namespace is not stored in the definition; choose the execution namespace explicitly at launch. "),Id()(),ma(12,"section",24)(13,"h2"),VC(14,"Available agents"),Id(),ma(15,"button",25),ey("click",function(){Wp(e);let o=pC(2);return Gp(o.state.loadDiscovery())}),ma(16,"mat-icon"),VC(17,"refresh"),Id(),VC(18," Load / refresh namespaces "),Id(),ma(19,"p",11),VC(20,"Optional for human-only workflows. Load agents only when assigning an agent step."),Id(),ma(21,"label"),VC(22,"Agent discovery namespace "),ma(23,"select",26),ey("ngModelChange",function(o){Wp(e);let d=pC(2);return Gp(d.state.discoverAgents(o))}),ma(24,"option",27),VC(25,"Select namespace"),Id(),eC(26,lt,2,2,"option",28,z),Id(),UI(),Id(),ci(28,st,2,0,"p",29),ci(29,dt,2,1,"p",30),ci(30,ct,2,0,"p",29),Id();}if(n&2){let e,i=pC(),o=pC();Zg("disabled",o.state.saving()),ri(6),Zg("ngModel",i.workflowType)("readonly",!o.state.creating()),$I(),ri(3),Zg("ngModel",i.title),$I(),ri(6),Zg("disabled",o.state.saving()),ri(8),Zg("ngModel",o.state.namespaceId())("disabled",o.state.saving()),$I(),ri(3),tC(o.state.namespaces()),ri(2),ui(o.state.agentsLoading()?28:-1),ri(),ui((e=o.state.discoveryError())?29:-1,e),ri(),ui(o.state.namespaceId()&&!o.state.agentsLoading()&&!o.state.agents().length?30:-1);}}function pt(n,t){if(n&1){let e=aC();ma(0,"p",11),VC(1," Add agent, human or code steps, then select a step to edit its properties and optional dependencies. Arrows show dependencies. Code steps use a closed verifier list; no shell command can be entered here. "),Id(),ma(2,"div",31)(3,"button",32),ey("click",function(){Wp(e);let o=pC(2);return Gp(o.state.addBlock())}),ma(4,"mat-icon"),VC(5,"smart_toy"),Id(),VC(6," Add agent step "),Id(),ma(7,"button",33),ey("click",function(){Wp(e);let o=pC(2);return Gp(o.state.addBlock("code"))}),ma(8,"mat-icon"),VC(9,"code"),Id(),VC(10," Add code step "),Id(),ma(11,"button",34),ey("click",function(){Wp(e);let o=pC(2);return Gp(o.state.addBlock("human"))}),ma(12,"mat-icon"),VC(13,"person_add"),Id(),VC(14," Add human step "),Id()();}if(n&2){let e=pC(),i=pC();ri(3),Zg("disabled",i.state.saving()||(e.steps?.length??0)>=500),ri(4),Zg("disabled",i.state.saving()||(e.steps?.length??0)>=500),ri(4),Zg("disabled",i.state.saving()||(e.steps?.length??0)>=500);}}function mt(n,t){n&1&&(ma(0,"p",11),VC(1,"Select a step to preview its details below. Arrows show dependencies."),Id());}function ut(n,t){if(n&1&&(ma(0,"li"),VC(1),Id()),n&2){let e=t.$implicit,i=pC(4);ri(),my("",e.name," \u2192 ",i.dependencyLabel(e.target));}}function ft(n,t){if(n&1&&(ma(0,"p"),VC(1),Id(),ma(2,"ul"),eC(3,ut,2,2,"li",null,Qe),Id()),n&2){let e=t;ri(),Sd("Decision: ",e.mode," selection."),ri(2),tC(e.routes);}}function gt(n,t){if(n&1&&(ma(0,"p"),VC(1),Id()),n&2){let e=pC();ri(),Sd("Join: waits for every selected branch of ",e.join," to succeed, plus ordinary dependencies.");}}function Ct(n,t){if(n&1&&VC(0),n&2){let e=pC(4);Sd(" \u2192 ",e.dependencyLabel(t)," ");}}function yt(n,t){if(n&1&&VC(0),n&2){let e=pC(4);Sd(" \u2192 ",e.dependencyLabel(t)," ");}}function xt(n,t){if(n&1&&VC(0),n&2){let e=pC(2);Sd(" \xB7 ",e.outcomeTransitions?.fail?.maxCycles??2," correction cycles ");}}function ht(n,t){if(n&1&&(ma(0,"h3"),VC(1,"After this step"),Id(),ma(2,"p"),VC(3),ci(4,Ct,1,1),Id(),ma(5,"p"),VC(6),ci(7,yt,1,1),ci(8,xt,1,1),Id()),n&2){let e,i,o=pC();ri(3),Sd(" PASS: ",o.outcomeTransitions?.pass?.action??"continue"," "),ri(),ui((e=o.outcomeTransitions?.pass?.target)?4:-1,e),ri(2),Sd(" FAIL: ",o.outcomeTransitions?.fail?.action??"block"," "),ri(),ui((i=o.outcomeTransitions?.fail?.target)?7:-1,i),ri(),ui(o.outcomeTransitions?.fail?.action==="return"?8:-1);}}function bt(n,t){if(n&1&&(ma(0,"option",28),VC(1),Id()),n&2){let e=pC(3);Zg("value",e.responsibility?.name),ri(),Sd(" ",e.responsibility?.name," (existing; not in discovery) ");}}function vt(n,t){if(n&1&&(ma(0,"option",28),VC(1),Id()),n&2){let e=t.$implicit;Zg("value",e),ri(),hy(e);}}function wt(n,t){if(n&1){let e=aC();ma(0,"label"),VC(1,"Agent "),ma(2,"select",58),ey("ngModelChange",function(o){Wp(e);let d=pC(4);return Gp(d.state.setAgent(o))}),ma(3,"option",59),VC(4,"Select an agent"),Id(),ci(5,bt,2,2,"option",28),eC(6,vt,2,2,"option",28,Jw),Id(),UI(),Id(),ma(8,"p",11),VC(9," One agent per block; use separate blocks for multiple agents. Load a namespace above to choose an agent. "),Id();}if(n&2){let e=pC(2),i=pC(2);ri(2),Zg("ngModel",e.responsibility?.name??""),$I(),ri(3),ui(e.responsibility?.name&&!i.state.agents().includes(e.responsibility?.name??"")?5:-1),ri(),tC(i.state.agents());}}function kt(n,t){if(n&1){let e=aC();ma(0,"label"),VC(1,"Human role "),ma(2,"input",60),ey("ngModelChange",function(o){Wp(e);let d=pC(4);return Gp(d.state.updateBlock({responsibility:{kind:"human",name:o}}))}),Id(),UI(),Id(),ma(3,"p",11),VC(4," Waits for human approval. The role is not an AgentOS agent; no discovery is required. "),Id();}if(n&2){let e=pC(2);ri(2),Zg("ngModel",e.responsibility?.name??""),$I();}}function St(n,t){if(n&1&&(ma(0,"option",28),VC(1),Id()),n&2){let e=t.$implicit;Zg("value",e.id),ri(),hy(e.label);}}function Et(n,t){if(n&1){let e=aC();ma(0,"label"),VC(1,"Code verifier "),ma(2,"select",61),ey("ngModelChange",function(o){Wp(e);let d=pC(5);return Gp(d.state.setCodeVerification(o))}),ma(3,"option",59),VC(4,"Select a verifier"),Id(),eC(5,St,2,2,"option",28,z),Id(),UI(),Id(),ma(7,"p",11),VC(8),Id();}if(n&2){let e=pC(3),i=pC(2);ri(2),Zg("ngModel",e.responsibility?.name??""),$I(),ri(3),tC(i.state.codeVerificationPresets),ri(3),hy(i.codeVerificationPreset(e.responsibility?.name)?.hint);}}function Dt(n,t){n&1&&(ma(0,"p",11),VC(1,"This existing code responsibility is read-only."),Id());}function Pt(n,t){if(n&1&&ci(0,Et,9,2)(1,Dt,2,0,"p",11),n&2){let e=pC(2),i=pC(2);ui(i.state.isNewCodeStep(e.id)||i.codeVerificationPreset(e.responsibility?.name)?0:1);}}function Tt(n,t){if(n&1){let e=aC();ma(0,"label"),VC(1,"Route choice mode "),ma(2,"select",62),ey("ngModelChange",function(o){Wp(e);let d=pC(4);return Gp(d.state.setRoutingMode(o))}),ma(3,"option",27),VC(4,"No decision"),Id(),ma(5,"option",63),VC(6,"Exactly one route"),Id(),ma(7,"option",64),VC(8,"One or more routes"),Id()(),UI(),Id();}if(n&2){let e=pC(2);ri(2),Zg("ngModel",e.decision?.mode??""),$I();}}function Mt(n,t){if(n&1&&(ma(0,"option",28),VC(1),Id()),n&2){let e=pC().$implicit;Zg("value",e.id),ri(),my("",e.name," (",e.id,")");}}function Wt(n,t){if(n&1&&ci(0,Mt,2,3,"option",28),n&2){let e=t.$implicit,i=pC(4);ui(e.id!==i.id?0:-1);}}function Vt(n,t){if(n&1){let e=aC();ma(0,"label"),VC(1),ma(2,"input",66),ey("ngModelChange",function(o){let d=Wp(e).$index,f=pC(5);return Gp(f.state.updateRoute(d,"name",o))}),Id(),UI(),Id(),ma(3,"label"),VC(4),ma(5,"select",67),ey("ngModelChange",function(o){let d=Wp(e).$index,f=pC(5);return Gp(f.state.updateRoute(d,"target",o))}),ma(6,"option",27),VC(7,"Choose target"),Id(),eC(8,Wt,1,1,null,null,z),Id(),UI(),Id(),ma(10,"button",68),ey("click",function(){let o=Wp(e).$index,d=pC(5);return Gp(d.state.removeRoute(o))}),VC(11," Remove route "),Id();}if(n&2){let e=t.$implicit,i=t.$index,o=pC(4);ri(),Sd("Route ",i+1," name "),ri(),Zg("ngModel",e.name),ir("data-route-name",i),$I(),ri(2),Sd("Route ",i+1," target "),ri(),Zg("ngModel",e.target),ir("data-route-target",i),$I(),ri(3),tC(o.steps),ri(2),ir("aria-label","Remove route "+(i+1));}}function It(n,t){if(n&1){let e=aC();ma(0,"p"),VC(1," Agents submit configured route names in selectedRoutes on PASS. Multiple selection activates the chosen routes, not an additional route. "),Id(),eC(2,Vt,12,7,null,null,Xw),ma(4,"button",65),ey("click",function(){Wp(e);let o=pC(4);return Gp(o.state.addRoute())}),VC(5," Add route "),Id();}if(n&2){let e=t;ri(2),tC(e.routes),ri(2),Zg("disabled",e.routes.length>=16);}}function Ot(n,t){if(n&1&&(ma(0,"option",28),VC(1),Id()),n&2){let e=pC().$implicit;Zg("value",e.id),ri(),hy(e.name);}}function At(n,t){if(n&1&&ci(0,Ot,2,2,"option",28),n&2){let e=t.$implicit,i=pC(2);ui(e.decision&&e.id!==i.id?0:-1);}}function Ft(n,t){n&1&&(ma(0,"option",46),VC(1,"Activate a direct successor"),Id());}function $t(n,t){if(n&1&&(ma(0,"option",28),VC(1),Id()),n&2){let e=t.$implicit;Zg("value",e.id),ri(),my("",e.name," (",e.id,")");}}function Nt(n,t){if(n&1){let e=aC();ma(0,"label"),VC(1,"PASS destination "),ma(2,"select",69),ey("ngModelChange",function(o){Wp(e);let d=pC(5);return Gp(d.state.updateOutcomeTarget("pass",o))}),ma(3,"option",27),VC(4,"Choose direct successor"),Id(),eC(5,$t,2,3,"option",28,z),Id(),UI(),Id();}if(n&2){let e=pC(3),i=pC(2);ri(2),Zg("ngModel",e.outcomeTransitions?.pass?.target??""),$I(),ri(3),tC(i.state.passActivationTargets(e));}}function Rt(n,t){n&1&&(ma(0,"p",11),VC(1," This preserved PASS activation cannot be edited here because Factory only permits a non-decision step to activate a non-conditional direct successor. "),Id());}function Bt(n,t){if(n&1&&ci(0,Nt,7,1,"label")(1,Rt,2,0,"p",11),n&2){let e=pC(2),i=pC(2);ui(i.state.canConfigurePassActivate(e)?0:1);}}function Lt(n,t){n&1&&(ma(0,"option",49),VC(1,"Return for correction (accepted agent FAIL only)"),Id());}function jt(n,t){n&1&&(ma(0,"option",50),VC(1,"Return for correction (preserved; unsupported trigger)"),Id());}function zt(n,t){n&1&&(ma(0,"p",11),VC(1," FAIL return is available only on agent steps with an accepted structured FAIL. Code and human failures block, although those steps can be replayed inside an agent-triggered correction scope. "),Id());}function qt(n,t){if(n&1&&(ma(0,"option",28),VC(1),Id()),n&2){let e=t.$implicit;Zg("value",e.id),ri(),my("",e.name," (",e.id,")");}}function Ht(n,t){if(n&1){let e=aC();ma(0,"label"),VC(1,"Return destination "),ma(2,"select",70),ey("ngModelChange",function(o){Wp(e);let d=pC(4);return Gp(d.state.updateOutcomeTarget("fail",o))}),ma(3,"option",27),VC(4,"Choose step"),Id(),eC(5,qt,2,3,"option",28,z),Id(),UI(),Id(),ma(7,"label"),VC(8,"Correction cycle budget "),ma(9,"input",71),ey("ngModelChange",function(o){Wp(e);let d=pC(4);return Gp(d.state.updateFailBudget(o))}),Id(),UI(),Id();}if(n&2){let e=pC(2),i=pC();ri(2),Zg("ngModel",e.outcomeTransitions?.fail?.target??""),$I(),ri(3),tC(i.steps),ri(4),Zg("ngModel",e.outcomeTransitions?.fail?.maxCycles??2),$I();}}function Ut(n,t){if(n&1&&(ma(0,"option",28),VC(1),Id()),n&2){let e=pC().$implicit;Zg("value",e.id),ri(),my("",e.name," (",e.id,")");}}function Jt(n,t){if(n&1&&ci(0,Ut,2,3,"option",28),n&2){let e=t.$implicit,i=pC(2);ui(e.id!==i.id&&!i.dependsOn?.includes(e.id)?0:-1);}}function Zt(n,t){if(n&1){let e=aC();ma(0,"button",72),ey("click",function(){let o=Wp(e).$implicit,d=pC(4);return Gp(d.state.connect(o,false))}),ma(1,"mat-icon"),VC(2,"close"),Id(),VC(3),Id();}if(n&2){let e=t.$implicit,i=pC(4);ir("data-remove-dependency",e)("aria-label","Remove dependency "+i.dependencyLabel(e)),ri(3),Sd(" ",i.dependencyLabel(e)," ");}}function Gt(n,t){if(n&1){let e=aC();ma(0,"button",73),ey("click",function(){Wp(e);let o=pC(4);return Gp(o.state.removeBlock())}),ma(1,"mat-icon"),VC(2,"delete_outline"),Id(),VC(3," Remove step and its connections "),Id();}}function Kt(n,t){if(n&1){let e=aC();ma(0,"fieldset",36)(1,"legend"),VC(2,"Block properties"),Id(),ma(3,"label"),VC(4,"Block ID (applied on leaving the field) "),ma(5,"input",39),ey("change",function(o){Wp(e);let d=pC(3);return Gp(d.state.updateBlock({id:o.target.value}))}),Id()(),ma(6,"label"),VC(7,"Block name "),ma(8,"input",40),ey("ngModelChange",function(o){Wp(e);let d=pC(3);return Gp(d.state.updateBlock({name:o}))}),Id(),UI(),Id(),ci(9,wt,10,2)(10,kt,5,1)(11,Pt,2,1),ma(12,"fieldset",41)(13,"legend"),VC(14,"Conditional routing"),Id(),ci(15,Tt,9,1,"label"),ci(16,It,6,1),ma(17,"label"),VC(18,"Join decision (convergence) "),ma(19,"select",42),ey("ngModelChange",function(o){Wp(e);let d=pC(3);return Gp(d.state.updateBlock({join:o||void 0}))}),ma(20,"option",27),VC(21,"No join"),Id(),eC(22,At,1,1,null,null,z),Id(),UI(),Id(),ma(24,"p",11),VC(25," Initial scope: one decision, 2\u201316 single-step branches, one join. Each branch depends only on the decision and feeds only the join. The join depends on every branch; extra ordinary dependencies still require success. Nested/multi-step routes are rejected. "),Id()(),ma(26,"fieldset",43)(27,"legend"),VC(28,"After this step"),Id(),ma(29,"p",11),VC(30," Standalone execution only. Code/human failures and technical errors cannot trigger automatic return. Parent-Run fragments are not supported. After the budget, human intervention requires an explicitly authorized successor run. "),Id(),ma(31,"p",11),VC(32," PASS activation is limited to an existing direct successor: it never bypasses dependencies or disables other branches. A FAIL return is enforced by Factory and replays the configured target scope. "),Id(),ma(33,"label"),VC(34,"On PASS "),ma(35,"select",44),ey("ngModelChange",function(o){Wp(e);let d=pC(3);return Gp(d.state.updateOutcome("pass",o))}),ma(36,"option",45),VC(37,"Continue dependencies"),Id(),ci(38,Ft,2,0,"option",46),Id(),UI(),Id(),ci(39,Bt,2,1),ma(40,"label"),VC(41,"On FAIL "),ma(42,"select",47),ey("ngModelChange",function(o){Wp(e);let d=pC(3);return Gp(d.state.updateOutcome("fail",o))}),ma(43,"option",48),VC(44,"Block workflow"),Id(),ci(45,Lt,2,0,"option",49)(46,jt,2,0,"option",50),Id(),UI(),Id(),ci(47,zt,2,0,"p",11),ci(48,Ht,10,2),Id(),ma(49,"div",51)(50,"label",52),VC(51,"Dependencies (optional)"),Id(),ma(52,"p",53),VC(53," This step waits for all added steps. Leave empty for an entry step. "),Id(),ma(54,"select",54),ey("change",function(o){return Wp(e),pC(3).state.connect(o.target.value,true),Gp(o.target.value="")}),ma(55,"option",27),VC(56,"Add a dependency\u2026"),Id(),eC(57,Jt,1,1,null,null,z),Id(),ma(59,"div",55),eC(60,Zt,4,3,"button",56,Jw),Id()(),ci(62,Gt,4,0,"button",57),Id();}if(n&2){let e,i=pC(),o=pC(),d=pC();Zg("disabled",d.state.saving()),ri(5),Zg("value",i.id),ri(3),Zg("ngModel",i.name),$I(),ri(),ui(i.responsibility?.kind==="agent"?9:i.responsibility?.kind==="human"?10:i.responsibility?.kind==="code"?11:-1),ri(6),ui(i.responsibility?.kind==="agent"?15:-1),ri(),ui((e=i.decision)?16:-1,e),ri(3),Zg("ngModel",i.join??""),$I(),ri(3),tC(o.steps),ri(13),Zg("ngModel",i.outcomeTransitions?.pass?.action??"continue"),$I(),ri(3),ui(d.state.canConfigurePassActivate(i)?38:-1),ri(),ui(i.outcomeTransitions?.pass?.action==="activate"?39:-1),ri(3),Zg("ngModel",i.outcomeTransitions?.fail?.action??"block"),$I(),ri(3),ui(d.state.canConfigureFailReturn(i)?45:i.outcomeTransitions?.fail?.action==="return"?46:-1),ri(2),ui(d.state.canConfigureFailReturn(i)?-1:47),ri(),ui(i.outcomeTransitions?.fail?.action==="return"&&d.state.canConfigureFailReturn(i)?48:-1),ri(9),tC(o.steps),ri(3),tC(i.dependsOn),ri(2),ui(d.state.canRemoveSelected()?62:-1);}}function Yt(n,t){n&1&&(ma(0,"p",75),VC(1," For human/code steps these fields document intent only. They do not change approval or verifier execution. "),Id());}function Qt(n,t){if(n&1&&(ma(0,"li",76),VC(1),Id()),n&2){let e=t.$implicit;ri(),hy(e);}}function Xt(n,t){n&1&&(ma(0,"p"),VC(1,"None configured."),Id());}function en(n,t){if(n&1&&(ma(0,"li",76),VC(1),Id()),n&2){let e=t.$implicit;ri(),hy(e);}}function tn(n,t){n&1&&(ma(0,"p"),VC(1,"None configured."),Id());}function nn(n,t){if(n&1&&(ma(0,"div",74)(1,"p")(2,"strong"),VC(3,"Agent / responsibility:"),Id(),VC(4),Id(),ci(5,Yt,2,0,"p",75),ma(6,"h3"),VC(7,"Pre-actions"),Id(),ma(8,"ol"),eC(9,Qt,2,1,"li",76,Xw),Id(),ci(11,Xt,2,0,"p"),ma(12,"h3"),VC(13,"Prompt"),Id(),ma(14,"p",76),VC(15),Id(),ma(16,"h3"),VC(17,"Post-actions"),Id(),ma(18,"ol"),eC(19,en,2,1,"li",76,Xw),Id(),ci(21,tn,2,0,"p"),Id()),n&2){let e=pC(),i=pC();ri(4),my(" ",i.responsibility?.name||"Not specified"," (",i.responsibility?.kind||"Not specified",") "),ri(),ui(i.responsibility?.kind!=="agent"?5:-1),ri(4),tC(e.entry),ri(2),ui(e.entry.length?-1:11),ri(4),hy(e.mission),ri(4),tC(e.exit),ri(2),ui(e.exit.length?-1:21);}}function on(n,t){n&1&&(ma(0,"p",75),VC(1," For human/code steps these fields document intent only. They do not change approval or verifier execution. "),Id());}function an(n,t){if(n&1){let e=aC();ma(0,"div",78)(1,"label"),VC(2),ma(3,"textarea",82),ey("ngModelChange",function(o){let d=Wp(e).$index,f=pC(5);return Gp(f.updateAction("entry",d,o))}),Id(),UI(),Id(),ma(4,"button",83),ey("click",function(){let o=Wp(e).$index,d=pC(5);return Gp(d.removeAction("entry",o))}),VC(5," Remove "),Id()();}if(n&2){let e=t.$implicit,i=t.$index;ri(2),Sd("Pre-action ",i+1," "),ri(),Zg("ngModel",e),ir("data-entry",i),$I(),ri(),ir("aria-label","Remove pre-action "+(i+1));}}function rn(n,t){if(n&1){let e=aC();ma(0,"div",78)(1,"label"),VC(2),ma(3,"textarea",82),ey("ngModelChange",function(o){let d=Wp(e).$index,f=pC(5);return Gp(f.updateAction("exit",d,o))}),Id(),UI(),Id(),ma(4,"button",83),ey("click",function(){let o=Wp(e).$index,d=pC(5);return Gp(d.removeAction("exit",o))}),VC(5," Remove "),Id()();}if(n&2){let e=t.$implicit,i=t.$index;ri(2),Sd("Post-action ",i+1," "),ri(),Zg("ngModel",e),ir("data-exit",i),$I(),ri(),ir("aria-label","Remove post-action "+(i+1));}}function ln(n,t){if(n&1){let e=aC();ci(0,on,2,0,"p",75),ma(1,"fieldset",77)(2,"legend"),VC(3,"Step instructions"),Id(),ma(4,"h3"),VC(5,"Pre-actions"),Id(),ma(6,"p",11),VC(7,"Preparation / input obligations, in order (not executable commands)."),Id(),eC(8,an,6,4,"div",78,Xw),ma(10,"button",79),ey("click",function(){Wp(e);let o=pC(4);return Gp(o.addAction("entry"))}),ma(11,"mat-icon"),VC(12,"add"),Id(),VC(13," Add pre-action "),Id(),ma(14,"h3")(15,"label",80),VC(16,"Prompt"),Id()(),ma(17,"p",11),VC(18),Id(),ma(19,"textarea",81),ey("ngModelChange",function(o){Wp(e);let d=pC(4);return Gp(d.state.update("mission",o))}),Id(),UI(),ma(20,"h3"),VC(21,"Post-actions"),Id(),ma(22,"p",11),VC(23,"Output / deliverable obligations, in order."),Id(),eC(24,rn,6,4,"div",78,Xw),ma(26,"button",79),ey("click",function(){Wp(e);let o=pC(4);return Gp(o.addAction("exit"))}),ma(27,"mat-icon"),VC(28,"add"),Id(),VC(29," Add post-action "),Id()();}if(n&2){let e=pC(),i=pC(),o=pC(2);ui(i.responsibility?.kind!=="agent"?0:-1),ri(),Zg("disabled",o.state.saving()),ri(7),tC(e.entry),ri(2),Zg("disabled",e.entry.length>=50),ri(8),Sd(" ",i.responsibility?.kind==="agent"?"What the agent must do. Replaces legacy Factory business instructions for this step.":"Optional documentation of intent. Human approval and code verification are unchanged; this is not executed as an agent prompt."," "),ri(),Zg("ngModel",e.mission),$I(),ri(5),tC(e.exit),ri(2),Zg("disabled",e.exit.length>=50);}}function sn(n,t){if(n&1&&ci(0,nn,22,6,"div",74)(1,ln,30,6),n&2){let e=pC(3);ui(e.state.editing()?1:0);}}function dn(n,t){n&1&&(ma(0,"p",11),VC(1),Id()),n&2&&(ri(),hy(t.hint));}function cn(n,t){if(n&1&&(ma(0,"p",84),VC(1),Id()),n&2){let e=pC(2);ri(),Sd(" Existing code responsibility \u201C",e.responsibility?.name||"unnamed","\u201D is preserved read-only. It is outside this editor's closed verifier list and may not be a verification step. ");}}function _n(n,t){if(n&1){let e=aC();ma(0,"button",86),ey("click",function(){Wp(e);let o=pC(4);return Gp(o.state.addExistingCodeInstructions())}),ma(1,"mat-icon"),VC(2,"notes"),Id(),VC(3," Add optional instructions "),Id();}if(n&2){let e=pC(4);Zg("disabled",e.state.saving());}}function pn(n,t){if(n&1&&(ma(0,"section",37)(1,"h3"),VC(2,"Code verification"),Id(),ma(3,"p"),VC(4," This code step selects a Factory verifier. It does not execute authored shell commands, and its entry, mission and exit text is intent-only documentation. "),Id(),ci(5,dn,2,1,"p",11)(6,cn,2,1,"p",84),ci(7,_n,4,1,"button",85),Id()),n&2){let e,i=pC(),o=pC(2);ri(5),ui((e=o.codeVerificationPreset(i.responsibility?.name))?5:6,e),ri(2),ui(o.state.editing()&&!o.state.isNewCodeStep(i.id)?7:-1);}}function mn(n,t){if(n&1){let e=aC();ma(0,"button",89),ey("click",function(){Wp(e);let o=pC(4);return Gp(o.state.addHumanContract())}),ma(1,"mat-icon"),VC(2,"notes"),Id(),VC(3," Add optional instructions "),Id();}if(n&2){let e=pC(4);Zg("disabled",e.state.saving());}}function un(n,t){if(n&1&&(ma(0,"p",87),VC(1," This human step uses the existing approval or verification implementation, not an agent prompt. "),Id(),ci(2,mn,4,1,"button",88)),n&2){let e=pC(3);ri(2),ui(e.state.editing()?2:-1);}}function fn(n,t){if(n&1){let e=aC();ma(0,"button",92),ey("click",function(){Wp(e);let o=pC(5);return Gp(o.state.adopt())}),VC(1," Adopt explicit instructions "),Id();}if(n&2){let e=pC(5);Zg("disabled",e.state.saving());}}function gn(n,t){if(n&1&&(ma(0,"p"),VC(1," Adoption copies the generic legacy obligations into editable actions and uses the step name as the initial prompt. Review and refine it before saving. Plugin context and Factory's technical result protocol remain. "),Id(),ci(2,fn,2,1,"button",91)),n&2){let e=pC(4);ri(2),ui(e.state.editing()?2:-1);}}function Cn(n,t){n&1&&(ma(0,"p",90),VC(1," Automatic adoption unavailable: runtime-derived branch/review obligations or non-agent execution cannot safely be replaced with a static prompt. Keep this step legacy pending a backend context/adoption decision. "),Id());}function yn(n,t){if(n&1&&(ma(0,"div",38)(1,"div")(2,"h3"),VC(3,"Legacy instructions \u2014 not an empty prompt"),Id(),ma(4,"p"),VC(5," Factory currently generates hidden business instructions from the agent name and dependency position, plus plugin context. The exact text is available in a dispatched run's selected attempt mandate. "),Id(),ma(6,"p"),VC(7),Id(),ci(8,gn,3,1)(9,Cn,2,0,"p",90),Id()()),n&2){let e=pC(),i=pC(2);ri(7),Sd(" ",e.legacyContract?.summary||"Legacy contract metadata unavailable or changed locally. Reload the saved definition before adoption."," "),ri(),ui(i.legacyAdoption(e)?8:9);}}function xn(n,t){if(n&1&&(ma(0,"section",13)(1,"h2"),VC(2),Id(),ma(3,"p",35),VC(4),Id(),ma(5,"p"),VC(6),Id(),ci(7,ft,5,1),ci(8,gt,2,1,"p"),ci(9,ht,9,5),ci(10,Kt,63,15,"fieldset",36),ci(11,sn,2,1)(12,pn,8,2,"section",37)(13,un,3,1)(14,yn,10,2,"div",38),Id()),n&2){let e,i,o=t,d=pC(2);ir("aria-label",d.state.editing()?"Selected step editor":"Selected step preview"),ri(2),hy(o.name),ri(2),gy("",o.id," \xB7 ",o.responsibility?.kind," \xB7 ",o.responsibility?.name),ri(2),Sd("Inputs from dependencies: ",o.dependsOn?.join(", ")||"None (entry step)"),ri(),ui((e=o.decision)?7:-1,e),ri(),ui(o.join?8:-1),ri(),ui(o.outcomeTransitions?.pass||o.outcomeTransitions?.fail?9:-1),ri(),ui(d.state.editing()?10:-1),ri(),ui((i=d.state.draft())?11:o.responsibility?.kind==="code"?12:o.responsibility?.kind==="human"?13:14,i);}}function hn(n,t){n&1&&(ma(0,"p",30),VC(1),Id()),n&2&&(ri(),hy(t));}function bn(n,t){if(n&1){let e=aC();ma(0,"section",14)(1,"h2"),VC(2,"Save workflow definition"),Id(),ma(3,"p"),VC(4," Existing definitions and active pinned runs are never edited. Save this composition as a new immutable version. Plugin routing and untouched step properties are preserved. Saving never starts a run. "),Id(),ma(5,"p",11),VC(6,"Save this workflow first. You can launch a saved version from Launch a run."),Id(),ma(7,"div",21)(8,"label"),VC(9,"Workflow type "),Yg(10,"input",93),Id(),ma(11,"label"),VC(12,"Version "),ma(13,"input",94),ey("ngModelChange",function(o){Wp(e);let d=pC(2);return Gp(d.state.targetVersion.set(o))}),Id(),UI(),Id()(),ci(14,hn,2,1,"p",30),ma(15,"p",29),VC(16),Id(),ma(17,"div",16)(18,"button",95),ey("click",function(){Wp(e);let o=pC(2);return Gp(o.state.save())}),VC(19),Id(),ma(20,"button",96),ey("click",function(){Wp(e);let o=pC(2);return Gp(o.cancel())}),VC(21," Cancel "),Id()(),ma(22,"p",11),VC(23," Prose is not automatically verified. Result submission, authorization, approvals and configured validators remain enforced. Do not put secrets in instructions. "),Id()();}if(n&2){let e,i=pC(),o=pC();ri(10),Zg("value",i.workflowType??""),ri(3),Zg("ngModel",o.state.targetVersion())("disabled",o.state.saving()),$I(),ri(),ui((e=o.state.validation())?14:-1,e),ri(2),Sd(" ",o.state.dirty()?"Unsaved step changes and structure edits (kept when selecting another step).":"No unsaved changes."," "),ri(2),Zg("disabled",!o.state.dirty()||!!o.state.validation()||o.state.saving()),ri(),Sd(" ",o.state.saving()?"Saving\u2026":"Save new version"," "),ri(),Zg("disabled",o.state.saving());}}function vn(n,t){if(n&1){let e=aC();ci(0,rt,11,5,"div"),ci(1,_t,31,10),ma(2,"section",10)(3,"h2"),VC(4,"Workflow steps"),Id(),ci(5,pt,15,3)(6,mt,2,0,"p",11),ma(7,"sf-workflow-definition-diagram",12),ey("selected",function(o){Wp(e);let d=pC();return Gp(d.state.select(o))}),Id()(),ci(8,xn,15,11,"section",13),ci(9,bn,24,8,"section",14),ma(10,"details")(11,"summary"),VC(12,"Definition JSON (read-only reference)"),Id(),ma(13,"pre",15)(14,"code"),VC(15),Id()()();}if(n&2){let e,i=pC();ui(!i.state.editing()&&!i.state.creating()&&!i.state.loading()?0:-1),ri(),ui(i.state.editing()?1:-1),ri(4),ui(i.state.editing()?5:6),ri(2),Zg("steps",i.state.preview()?.steps??KC(9,Ye))("selectedId",i.state.selectedId())("disabled",i.state.saving()),ri(),ui((e=i.state.selected())?8:-1,e),ri(),ui(i.state.editing()?9:-1),ri(6),hy(i.formatJson(t));}}function wn(n){try{return JSON.stringify(n,null,2)}catch{return String(n)}}var Ue=class n{state=h(Z);registry=h(c);dialog=h(ee);destroyRef=h(Ue$1);deleting=Qe$1(false);deleteError=Qe$1(null);deleteWorkflow(){let t=this.state.definition();if(!t||this.state.editing()||this.state.creating()||this.state.loading()||this.deleting())return;let{workflowType:e,version:i}=t;if(!e||!i)return;this.deleting.set(true);let o={title:"Delete workflow",detail:`${t.title||e} \xB7 ${e}@${i}`,message:"Permanently delete this registered version? It will no longer be available for new runs. Runs are not deleted or changed. Deletion is refused if any active or historical run pins this version, including archived or purged runs.",confirmLabel:"Delete workflow",destructive:true};this.dialog.open(I,{data:o,width:"520px",autoFocus:"first-tabbable"}).afterClosed().pipe(Ge$1(1),U(this.destroyRef)).subscribe(d=>{let f=this.state.definition();if(d!==true||f?.workflowType!==e||f?.version!==i||this.state.editing()){this.deleting.set(false);return}this.deleteError.set(null),this.registry.delete(e,i).pipe(yr(()=>this.deleting.set(false)),U(this.destroyRef)).subscribe({next:()=>{this.router.navigate(this.backLink);},error:b=>{this.deleteError.set(`${b.message||"Unable to delete workflow. Nothing was changed."}${b.code?` (${b.code})`:""}`);}});});}backLink=["/workflows"];formatJson=wn;legacyAdoption=ie;codeVerificationPreset=ze;workflowType;version;constructor(){let t=h(yb);$s(()=>{let f=this.state.saved();pi(()=>{let b=this.state.definition();f&&!this.state.editing()&&b&&(t.crumbs.set([{label:"Workflows",link:"/workflows"},{label:`${b.workflowType}@${b.version}`,mono:true}]),this.router.navigate(["/workflows",b.workflowType,b.version],{replaceUrl:true}));});});let e=h(G),i=e.snapshot,o=i.paramMap,d=i.data?.create===true;this.workflowType=o.get("type")??"",this.version=o.get("version")??"",h(yb).crumbs.set([{label:"Workflows",link:"/workflows"},{label:d?"New workflow":`${this.workflowType}@${this.version}`,mono:true}]),d?this.state.startNew():this.state.load(this.workflowType,this.version),e.paramMap?.pipe(vr(1),U()).subscribe(f=>{let b=f.get("type")??"",h=f.get("version")??"",R=this.state.definition();!d&&b&&h&&(R?.workflowType!==b||R?.version!==h)&&(t.crumbs.set([{label:"Workflows",link:"/workflows"},{label:`${b}@${h}`,mono:true}]),this.deleteError.set(null),this.state.load(b,h));});}beforeUnload(t){(this.state.dirty()||this.state.saving())&&t.preventDefault();}canLeave(){return !this.state.saving()&&(!this.state.dirty()||window.confirm("Discard unsaved workflow changes?"))}cancel(){if(this.canLeave()){let t=this.state.creating();this.state.cancel(),t&&this.router.navigate(this.backLink);}}router=h(ce);dependencyLabel(t){let e=this.state.definition()?.steps?.find(i=>i.id===t);return e?`${e.name} (${t})`:t}updateAction(t,e,i){let o=this.state.draft();o&&this.state.update(t,o[t].map((d,f)=>f===e?i:d));}addAction(t){let e=this.state.draft();e&&this.state.update(t,[...e[t],""]);}removeAction(t,e){let i=this.state.draft();i&&this.state.update(t,i[t].filter((o,d)=>d!==e));}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=xe({type:n,selectors:[["sf-workflow-detail-page"]],hostBindings:function(e,i){e&1&&ey("beforeunload",function(d){return i.beforeUnload(d)},m_);},features:[Ey([Z,c])],decls:15,vars:7,consts:[[1,"page"],[1,"page-head"],["mat-stroked-button","","data-workflow-back","",1,"sf-secondary","back-btn",3,"routerLink"],[1,"titles"],["data-workflow-detail-type","",1,"sf-mono"],["data-workflow-detail-title","",1,"sf-muted"],["data-workflow-detail-loading","",1,"state"],["role","alert","data-workflow-detail-error","",1,"banner","banner--warn"],["role","status","data-save-success",""],["diameter","32","mode","indeterminate"],["aria-label","Workflow diagram","data-workflow-diagram",""],[1,"sf-muted"],[3,"selected","steps","selectedId","disabled"],["data-step-contract","",1,"step-contract"],["aria-label","Save step changes",1,"step-contract"],["data-workflow-detail-json","",1,"json-block"],[1,"save-actions"],["mat-flat-button","","data-edit-workflow","",1,"sf-primary",3,"click","disabled"],["mat-stroked-button","","type","button","data-delete-workflow","",1,"sf-danger",3,"click","disabled"],["role","alert","data-delete-error","",1,"banner","banner--warn"],["aria-label","Workflow identity",1,"step-contract",3,"disabled"],[1,"save-fields"],["maxlength","128","data-workflow-type","",3,"ngModelChange","ngModel","readonly"],["maxlength","256","data-workflow-name","",3,"ngModelChange","ngModel"],["aria-label","Agent discovery",1,"step-contract"],["mat-stroked-button","","type","button","data-refresh-namespaces","",1,"sf-secondary","composer-action",3,"click","disabled"],["data-agent-namespace","",3,"ngModelChange","ngModel","disabled"],["value",""],[3,"value"],["role","status"],["role","alert"],[1,"composer-actions"],["mat-stroked-button","","type","button","data-add-block","",1,"sf-secondary","composer-action",3,"click","disabled"],["mat-stroked-button","","type","button","data-add-code-step","",1,"sf-secondary","composer-action",3,"click","disabled"],["mat-stroked-button","","type","button","data-add-human-step","",1,"sf-secondary","composer-action",3,"click","disabled"],[1,"sf-mono"],["aria-label","Block properties",3,"disabled"],["aria-label","Code verification","data-code-verification-info",""],["data-legacy-contract","",1,"banner","banner--warn"],["maxlength","128","data-block-id","",3,"change","value"],["maxlength","256","data-block-name","",3,"ngModelChange","ngModel"],["aria-label","Conditional routing"],["data-join-decision","",3,"ngModelChange","ngModel"],["aria-label","After this step"],["data-outcome-pass","",3,"ngModelChange","ngModel"],["value","continue"],["value","activate"],["data-outcome-fail","",3,"ngModelChange","ngModel"],["value","block"],["value","return"],["value","return","disabled",""],[1,"dependencies"],["for","step-dependency"],["id","dependency-help",1,"sf-muted"],["id","step-dependency","aria-describedby","dependency-help","data-dependency-select","",3,"change"],["aria-label","Selected dependencies",1,"dependency-chips"],["mat-stroked-button","","type","button",1,"sf-secondary","dependency-chip"],["mat-stroked-button","","type","button","data-remove-block","",1,"sf-secondary","composer-action"],["data-block-agent","",3,"ngModelChange","ngModel"],["value","","disabled",""],["placeholder","e.g. Product owner","maxlength","256","data-human-role","",3,"ngModelChange","ngModel"],["data-code-verifier","",3,"ngModelChange","ngModel"],["data-route-mode","",3,"ngModelChange","ngModel"],["value","single"],["value","multiple"],["type","button",3,"click","disabled"],["maxlength","128",3,"ngModelChange","ngModel"],[3,"ngModelChange","ngModel"],["type","button",3,"click"],["data-outcome-pass-target","",3,"ngModelChange","ngModel"],["data-outcome-fail-target","",3,"ngModelChange","ngModel"],["type","number","min","1","max","10","data-outcome-fail-budget","",3,"ngModelChange","ngModel"],["mat-stroked-button","","type","button",1,"sf-secondary","dependency-chip",3,"click"],["mat-stroked-button","","type","button","data-remove-block","",1,"sf-secondary","composer-action",3,"click"],["data-step-preview",""],["role","note"],[1,"prose"],[3,"disabled"],[1,"action-row"],["mat-stroked-button","","type","button",1,"sf-secondary","composer-action",3,"click","disabled"],["for","step-prompt"],["id","step-prompt","rows","8","maxlength","16000","data-step-prompt","",3,"ngModelChange","ngModel"],["rows","2","maxlength","4000",3,"ngModelChange","ngModel"],["mat-stroked-button","","type","button",1,"sf-secondary","composer-action",3,"click"],["role","note","data-unknown-code-verifier",""],["mat-stroked-button","","type","button","data-add-code-instructions","",1,"sf-secondary","composer-action",3,"disabled"],["mat-stroked-button","","type","button","data-add-code-instructions","",1,"sf-secondary","composer-action",3,"click","disabled"],["role","note","data-human-checkpoint",""],["mat-stroked-button","","type","button","data-add-human-contract","",1,"sf-secondary","composer-action",3,"disabled"],["mat-stroked-button","","type","button","data-add-human-contract","",1,"sf-secondary","composer-action",3,"click","disabled"],["data-adoption-blocked",""],["mat-stroked-button","","data-adopt-contract","",3,"disabled"],["mat-stroked-button","","data-adopt-contract","",3,"click","disabled"],["readonly","","data-target-type","",3,"value"],["data-target-version","",3,"ngModelChange","ngModel","disabled"],["mat-flat-button","","data-save-contract","",1,"sf-primary",3,"click","disabled"],["mat-stroked-button","","data-discard-contract","",3,"click","disabled"]],template:function(e,i){if(e&1&&(ma(0,"div",0)(1,"header",1)(2,"a",2)(3,"mat-icon"),VC(4,"arrow_back"),Id(),VC(5," Back "),Id(),ma(6,"div",3)(7,"h1",4),ci(8,Xe,1,0)(9,et,1,2),Id(),ci(10,tt,2,1,"p",5),Id()(),ci(11,nt,3,0,"div",6),ci(12,it,2,1,"div",7),ci(13,ot,2,1,"p",8),ci(14,vn,16,10),Id()),e&2){let o,d,f,b;ri(2),Zg("routerLink",i.backLink),ri(6),ui(i.state.creating()?8:9),ri(2),ui((o=i.state.definition()?.title)?10:-1,o),ri(),ui(i.state.loading()?11:-1),ri(),ui((d=i.state.error())?12:-1,d),ri(),ui((f=i.state.saved())?13:-1,f),ri(),ui((b=i.state.definition())?14:-1,b);}},dependencies:[Ln,Gn,Un,Xe$1,ln$1,Dt$1,kn,qt$1,Ht$1,Gt$1,on$1,HW,UW,Y8,Z8,J$1,Z$1,Nt$1,A],styles:["[_nghost-%COMP%]{display:block;min-width:0}fieldset[_ngcontent-%COMP%]{border:0;padding:0;margin:0;min-width:0}legend[_ngcontent-%COMP%]{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}textarea[_ngcontent-%COMP%], select[_ngcontent-%COMP%], input[_ngcontent-%COMP%]{box-sizing:border-box;width:100%;padding:10px;background:var(--sf-surface-2);color:inherit;border:1px solid var(--sf-outline);border-radius:6px;font:inherit}textarea[_ngcontent-%COMP%]{display:block;resize:vertical}label[_ngcontent-%COMP%]{display:block}.composer-actions[_ngcontent-%COMP%], .dependency-chips[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:10px;margin:12px 0}.composer-action[_ngcontent-%COMP%]{margin-block:4px}.composer-action[_ngcontent-%COMP%], .dependency-chip[_ngcontent-%COMP%]{min-height:40px}button[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--sf-primary, #9fa8ff);outline-offset:3px}.dependencies[_ngcontent-%COMP%]{margin-block:20px}.dependencies[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin-block:6px 10px}select[_ngcontent-%COMP%]:focus-visible, input[_ngcontent-%COMP%]:focus-visible, textarea[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--sf-primary, #9fa8ff);outline-offset:2px}.action-row[_ngcontent-%COMP%]{display:flex;gap:8px;align-items:center;margin-bottom:10px}.action-row[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{flex:1;min-width:0}.save-actions[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:center;gap:12px}.save-fields[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:12px;margin-bottom:12px}.save-fields[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{flex:1 1 180px;min-width:0}button[_ngcontent-%COMP%]{cursor:pointer}button[_ngcontent-%COMP%]:disabled{cursor:default}h2[_ngcontent-%COMP%]{font-size:18px}h3[_ngcontent-%COMP%]{font-size:15px}p[_ngcontent-%COMP%]{line-height:1.5}.prose[_ngcontent-%COMP%]{white-space:pre-wrap;overflow-wrap:anywhere}.step-contract[_ngcontent-%COMP%]{min-width:0;padding:16px;border:1px solid var(--sf-outline);border-radius:8px}.page[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:18px;min-width:0;overflow-wrap:anywhere}.page[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{min-width:0}.page-head[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:16px}.back-btn[_ngcontent-%COMP%]{flex-shrink:0;margin-top:2px}.titles[_ngcontent-%COMP%]{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px}h1[_ngcontent-%COMP%]{margin:0;font-size:22px;font-weight:600;letter-spacing:-.01em;word-break:break-all}.titles[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;font-size:14px}.state[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px}.json-block[_ngcontent-%COMP%]{margin:0;padding:20px 24px;border-radius:var(--radius-md, 0);border:1px solid var(--color-divider);background:var(--color-surface-muted);font-family:var(--sf-mono);font-size:13px;line-height:1.6;overflow-x:auto;overflow-y:auto;max-height:75vh;white-space:pre;tab-size:2}.json-block[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{font:inherit;color:inherit;background:none;padding:0}"]})};export{Ue as WorkflowDetailPageComponent,wn as formatJson};
|