@signalk/freeboard-sk 3.2.0-beta.2 → 3.2.0-beta.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/package.json +2 -2
  2. package/public/3rdpartylicenses.txt +31 -31
  3. package/public/assets/features/chart-sources-1.jpg +0 -0
  4. package/public/assets/features/chart-sources-2.jpg +0 -0
  5. package/public/assets/features/chart-sources-3.jpg +0 -0
  6. package/public/assets/features/chart-sources-4.jpg +0 -0
  7. package/public/assets/features/gpx-export-1.jpg +0 -0
  8. package/public/assets/features/gpx-export-2.jpg +0 -0
  9. package/public/assets/features/track-history-1.jpg +0 -0
  10. package/public/assets/features/track-history-2.jpg +0 -0
  11. package/public/assets/features/track-history-3.jpg +0 -0
  12. package/public/assets/features/vessel-tracks-1.jpg +0 -0
  13. package/public/assets/features/vessel-tracks-2.jpg +0 -0
  14. package/public/assets/features/vessel-tracks-3.jpg +0 -0
  15. package/public/assets/features-corpus.json +1 -1
  16. package/public/assets/help/index.html +65 -90
  17. package/public/{chunk-2SPW2M6P.js → chunk-4DXUR67I.js} +1 -1
  18. package/public/{chunk-B5SN3ZBN.js → chunk-4JRVRHO7.js} +14 -14
  19. package/public/{chunk-T5UYZVNA.js → chunk-4ZE2OKZZ.js} +1 -1
  20. package/public/{chunk-APXAP2M7.js → chunk-6PWYCIYX.js} +1 -1
  21. package/public/chunk-7D3RA76X.js +1 -0
  22. package/public/{chunk-FMYAA5JW.js → chunk-7TRKAN4B.js} +1 -1
  23. package/public/{chunk-OGLYW4PJ.js → chunk-AA62TGOR.js} +1 -1
  24. package/public/chunk-AMDY4THY.js +1 -0
  25. package/public/chunk-BMQUNGKK.js +1 -0
  26. package/public/chunk-CCTZD6S5.js +1 -0
  27. package/public/chunk-HHW5G2CI.js +1 -0
  28. package/public/chunk-IVUSRYQI.js +1 -0
  29. package/public/{chunk-K7PZKJJ7.js → chunk-JEAAYERI.js} +2 -2
  30. package/public/{chunk-J43UG5Q3.js → chunk-KGFHR4JM.js} +2 -2
  31. package/public/chunk-L4FEUXHI.js +4372 -0
  32. package/public/{chunk-XTQIZ74A.js → chunk-N4UL6N3G.js} +1 -1
  33. package/public/{chunk-K2CIRFN7.js → chunk-OPNUYGIO.js} +51 -51
  34. package/public/chunk-P5KVJ35V.js +1 -0
  35. package/public/{chunk-FC62PK2U.js → chunk-PU7NCPYW.js} +5 -5
  36. package/public/{chunk-KNJHWYQ3.js → chunk-TK54SKYF.js} +1 -1
  37. package/public/{chunk-2M5JDEPT.js → chunk-VJLDZ4NI.js} +11 -11
  38. package/public/{chunk-ABEPBSQB.js → chunk-WCLDE6BT.js} +1 -1
  39. package/public/{chunk-TTKT5FKY.js → chunk-WTDLBURC.js} +3 -3
  40. package/public/{chunk-2UND4DAL.js → chunk-WYYDGUIZ.js} +2 -2
  41. package/public/index.html +2 -2
  42. package/public/main-I7SJMW3M.js +468 -0
  43. package/public/styles-YRQUZIIZ.css +1 -0
  44. package/public/worker-3WLRYUBE.js +3 -0
  45. package/public/worker-BFPH3XRP.js +26 -0
  46. package/public/worker-SUE26ZZI.js +12 -0
  47. package/public/chunk-33UDAXN5.js +0 -1
  48. package/public/chunk-3FOJW6X2.js +0 -1
  49. package/public/chunk-CJYO3MRU.js +0 -1
  50. package/public/chunk-FHFMCRY4.js +0 -4197
  51. package/public/chunk-FTLLJC55.js +0 -1
  52. package/public/chunk-QGRCSFIW.js +0 -1
  53. package/public/chunk-UYQ6T6PQ.js +0 -1
  54. package/public/chunk-WHLON3TU.js +0 -1
  55. package/public/main-WJS4CMGQ.js +0 -466
  56. package/public/styles-4PTRKEMS.css +0 -1
  57. package/public/worker-JRN7I6EJ.js +0 -12
  58. package/public/worker-U7H5YFPO.js +0 -3
  59. package/public/worker-WYGJSPFM.js +0 -26
@@ -1,4 +1,4 @@
1
- import{a as It,b as Nt,c as Bt,d as Vt}from"./chunk-KNJHWYQ3.js";import{a as Dt,b as Ft,c as Tt,d as Ot,e as Et,g as Pt}from"./chunk-TTKT5FKY.js";import{a as vt}from"./chunk-XTQIZ74A.js";import{c as pt}from"./chunk-FMYAA5JW.js";import{e as xt,f as bt,i as kt,j as Rt,n as St,o as Mt}from"./chunk-ABEPBSQB.js";import{$ as Ke,$a as ke,$d as gt,Bc as rt,Cb as Ye,Cc as at,Da as W,Dd as dt,Ea as y,Eb as Xe,Fa as C,Ga as De,Gc as st,I as Q,Ia as xe,Ja as be,Jb as ae,Jd as ut,Ka as P,La as s,M as de,Ma as l,Mb as Ge,N as ve,Na as ee,P as d,R as g,Ra as K,Rd as mt,S as w,Sa as Y,Ta as S,Ua as T,V as qe,W as Qe,Wa as k,Wb as Ze,Wd as ft,Xb as te,Y as We,Ya as u,Yb as A,Yd as ht,Za as fe,Zd as _t,_ as j,_a as $,aa as ue,ba as E,bb as L,bc as Je,c as Z,cb as U,d as ze,da as B,ee as wt,f as Le,g as Ue,ga as ie,hb as re,he as yt,i as Ce,ib as q,j as je,ja as c,ka as oe,la as H,lb as f,lc as et,ld as lt,m as ce,mb as R,nb as X,nd as ct,pe as Ct,qa as J,ra as V,sa as me,ta as p,tc as tt,u as $e,uc as he,va as b,vc as nt,wa as z,wb as I,wc as it,xc as ot}from"./chunk-K2CIRFN7.js";import{f as He}from"./chunk-6H3I7D5M.js";var rn=[[["caption"]],[["colgroup"],["col"]],"*"],an=["caption","colgroup, col","*"];function sn(n,o){n&1&&$(0,2)}function ln(n,o){n&1&&(s(0,"thead",0),S(1,1),l(),s(2,"tbody",0),S(3,2)(4,3),l(),s(5,"tfoot",0),S(6,4),l())}function cn(n,o){n&1&&S(0,1)(1,2)(2,3)(3,4)}var N=new ve("CDK_TABLE");var ge=(()=>{class n{template=d(H);constructor(){}static \u0275fac=function(t){return new(t||n)};static \u0275dir=p({type:n,selectors:[["","cdkCellDef",""]]})}return n})(),we=(()=>{class n{template=d(H);constructor(){}static \u0275fac=function(t){return new(t||n)};static \u0275dir=p({type:n,selectors:[["","cdkHeaderCellDef",""]]})}return n})(),Lt=(()=>{class n{template=d(H);constructor(){}static \u0275fac=function(t){return new(t||n)};static \u0275dir=p({type:n,selectors:[["","cdkFooterCellDef",""]]})}return n})(),ne=(()=>{class n{_table=d(N,{optional:!0});_hasStickyChanged=!1;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=!0)}_sticky=!1;get stickyEnd(){return this._stickyEnd}set stickyEnd(e){e!==this._stickyEnd&&(this._stickyEnd=e,this._hasStickyChanged=!0)}_stickyEnd=!1;cell;headerCell;footerCell;cssClassFriendlyName;_columnCssClassName;constructor(){}hasStickyChanged(){let e=this._hasStickyChanged;return this.resetStickyChanged(),e}resetStickyChanged(){this._hasStickyChanged=!1}_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(t){return new(t||n)};static \u0275dir=p({type:n,selectors:[["","cdkColumnDef",""]],contentQueries:function(t,i,r){if(t&1&&ke(r,ge,5)(r,we,5)(r,Lt,5),t&2){let a;L(a=U())&&(i.cell=a.first),L(a=U())&&(i.headerCell=a.first),L(a=U())&&(i.footerCell=a.first)}},inputs:{name:[0,"cdkColumnDef","name"],sticky:[2,"sticky","sticky",A],stickyEnd:[2,"stickyEnd","stickyEnd",A]}})}return n})(),pe=class{constructor(o,e){e.nativeElement.classList.add(...o._columnCssClassName)}},Ut=(()=>{class n extends pe{constructor(){super(d(ne),d(B))}static \u0275fac=function(t){return new(t||n)};static \u0275dir=p({type:n,selectors:[["cdk-header-cell"],["th","cdk-header-cell",""]],hostAttrs:["role","columnheader",1,"cdk-header-cell"],features:[b]})}return n})();var jt=(()=>{class n extends pe{constructor(){let e=d(ne),t=d(B);super(e,t);let i=e._table?._getCellRole();i&&t.nativeElement.setAttribute("role",i)}static \u0275fac=function(t){return new(t||n)};static \u0275dir=p({type:n,selectors:[["cdk-cell"],["td","cdk-cell",""]],hostAttrs:[1,"cdk-cell"],features:[b]})}return n})();var Se=(()=>{class n{template=d(H);_differs=d(te);columns;_columnsDiffer;constructor(){}ngOnChanges(e){if(!this._columnsDiffer){let t=e.columns&&e.columns.currentValue||[];this._columnsDiffer=this._differs.find(t).create(),this._columnsDiffer.diff(t)}}getColumnsDiff(){return this._columnsDiffer.diff(this.columns)}extractCellTemplate(e){return this instanceof le?e.headerCell.template:this instanceof Me?e.footerCell.template:e.cell.template}static \u0275fac=function(t){return new(t||n)};static \u0275dir=p({type:n,features:[ue]})}return n})(),le=(()=>{class n extends Se{_table=d(N,{optional:!0});_hasStickyChanged=!1;get sticky(){return this._sticky}set sticky(e){e!==this._sticky&&(this._sticky=e,this._hasStickyChanged=!0)}_sticky=!1;constructor(){super(d(H),d(te))}ngOnChanges(e){super.ngOnChanges(e)}hasStickyChanged(){let e=this._hasStickyChanged;return this.resetStickyChanged(),e}resetStickyChanged(){this._hasStickyChanged=!1}static \u0275fac=function(t){return new(t||n)};static \u0275dir=p({type:n,selectors:[["","cdkHeaderRowDef",""]],inputs:{columns:[0,"cdkHeaderRowDef","columns"],sticky:[2,"cdkHeaderRowDefSticky","sticky",A]},features:[b,ue]})}return n})(),Me=(()=>{class n extends Se{_table=d(N,{optional:!0});_hasStickyChanged=!1;get sticky(){return this._sticky}set sticky(e){e!==this._sticky&&(this._sticky=e,this._hasStickyChanged=!0)}_sticky=!1;constructor(){super(d(H),d(te))}ngOnChanges(e){super.ngOnChanges(e)}hasStickyChanged(){let e=this._hasStickyChanged;return this.resetStickyChanged(),e}resetStickyChanged(){this._hasStickyChanged=!1}static \u0275fac=function(t){return new(t||n)};static \u0275dir=p({type:n,selectors:[["","cdkFooterRowDef",""]],inputs:{columns:[0,"cdkFooterRowDef","columns"],sticky:[2,"cdkFooterRowDefSticky","sticky",A]},features:[b,ue]})}return n})(),ye=(()=>{class n extends Se{_table=d(N,{optional:!0});when;constructor(){super(d(H),d(te))}static \u0275fac=function(t){return new(t||n)};static \u0275dir=p({type:n,selectors:[["","cdkRowDef",""]],inputs:{columns:[0,"cdkRowDefColumns","columns"],when:[0,"cdkRowDefWhen","when"]},features:[b]})}return n})(),G=(()=>{class n{_viewContainer=d(J);cells;context;static mostRecentCellOutlet=null;constructor(){n.mostRecentCellOutlet=this}ngOnDestroy(){n.mostRecentCellOutlet===this&&(n.mostRecentCellOutlet=null)}static \u0275fac=function(t){return new(t||n)};static \u0275dir=p({type:n,selectors:[["","cdkCellOutlet",""]]})}return n})(),Fe=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275cmp=V({type:n,selectors:[["cdk-header-row"],["tr","cdk-header-row",""]],hostAttrs:["role","row",1,"cdk-header-row"],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(t,i){t&1&&S(0,0)},dependencies:[G],encapsulation:2})}return n})();var Te=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275cmp=V({type:n,selectors:[["cdk-row"],["tr","cdk-row",""]],hostAttrs:["role","row",1,"cdk-row"],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(t,i){t&1&&S(0,0)},dependencies:[G],encapsulation:2})}return n})(),$t=(()=>{class n{templateRef=d(H);_contentClassNames=["cdk-no-data-row","cdk-row"];_cellClassNames=["cdk-cell","cdk-no-data-cell"];_cellSelector="td, cdk-cell, [cdk-cell], .cdk-cell";constructor(){}static \u0275fac=function(t){return new(t||n)};static \u0275dir=p({type:n,selectors:[["ng-template","cdkNoDataRow",""]]})}return n})(),At=["top","bottom","left","right"],Re=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=!1;constructor(o,e,t=!0,i=!0,r,a,m){this._isNativeHtmlTable=o,this._stickCellCss=e,this._isBrowser=t,this._needsPositionStickyOnElement=i,this.direction=r,this._positionListener=a,this._tableInjector=m,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 t=[];for(let i of o)i.nodeType===i.ELEMENT_NODE&&t.push(i,...Array.from(i.children));oe({write:()=>{for(let i of t)this._removeStickyStyle(i,e)}},{injector:this._tableInjector})}updateStickyColumns(o,e,t,i=!0,r=!0){if(!o.length||!this._isBrowser||!(e.some(O=>O)||t.some(O=>O))){this._positionListener?.stickyColumnsUpdated({sizes:[]}),this._positionListener?.stickyEndColumnsUpdated({sizes:[]});return}let a=o[0],m=a.children.length,h=this.direction==="rtl",_=h?"right":"left",v=h?"left":"right",F=e.lastIndexOf(!0),D=t.indexOf(!0),x,Be,Ve;r&&this._updateStickyColumnReplayQueue({rows:[...o],stickyStartStates:[...e],stickyEndStates:[...t]}),oe({earlyRead:()=>{x=this._getCellWidths(a,i),Be=this._getStickyStartColumnPositions(x,e),Ve=this._getStickyEndColumnPositions(x,t)},write:()=>{for(let O of o)for(let M=0;M<m;M++){let Ae=O.children[M];e[M]&&this._addStickyStyle(Ae,_,Be[M],M===F),t[M]&&this._addStickyStyle(Ae,v,Ve[M],M===D)}this._positionListener&&x.some(O=>!!O)&&(this._positionListener.stickyColumnsUpdated({sizes:F===-1?[]:x.slice(0,F+1).map((O,M)=>e[M]?O:null)}),this._positionListener.stickyEndColumnsUpdated({sizes:D===-1?[]:x.slice(D).map((O,M)=>t[M+D]?O:null).reverse()}))}},{injector:this._tableInjector})}stickRows(o,e,t){if(!this._isBrowser)return;let i=t==="bottom"?o.slice().reverse():o,r=t==="bottom"?e.slice().reverse():e,a=[],m=[],h=[];oe({earlyRead:()=>{for(let _=0,v=0;_<i.length;_++){if(!r[_])continue;a[_]=v;let F=i[_];h[_]=this._isNativeHtmlTable?Array.from(F.children):[F];let D=this._retrieveElementSize(F).height;v+=D,m[_]=D}},write:()=>{let _=r.lastIndexOf(!0);for(let v=0;v<i.length;v++){if(!r[v])continue;let F=a[v],D=v===_;for(let x of h[v])this._addStickyStyle(x,t,F,D)}t==="top"?this._positionListener?.stickyHeaderRowsUpdated({sizes:m,offsets:a,elements:h}):this._positionListener?.stickyFooterRowsUpdated({sizes:m,offsets:a,elements:h})}},{injector:this._tableInjector})}updateStickyFooterContainer(o,e){this._isNativeHtmlTable&&oe({write:()=>{let t=o.querySelector("tfoot");t&&(e.some(i=>!i)?this._removeStickyStyle(t,["bottom"]):this._addStickyStyle(t,"bottom",0,!1))}},{injector:this._tableInjector})}destroy(){this._stickyColumnsReplayTimeout&&clearTimeout(this._stickyColumnsReplayTimeout),this._resizeObserver?.disconnect(),this._destroyed=!0}_removeStickyStyle(o,e){if(!o.classList.contains(this._stickCellCss))return;for(let i of e)o.style[i]="",o.classList.remove(this._borderCellCss[i]);At.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,t,i){o.classList.add(this._stickCellCss),i&&o.classList.add(this._borderCellCss[e]),o.style[e]=`${t}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},t=0;for(let i of At)o.style[i]&&(t+=e[i]);return t?`${t}`:""}_getCellWidths(o,e=!0){if(!e&&this._cachedCellWidths.length)return this._cachedCellWidths;let t=[],i=o.children;for(let r=0;r<i.length;r++){let a=i[r];t.push(this._retrieveElementSize(a).width)}return this._cachedCellWidths=t,t}_getStickyStartColumnPositions(o,e){let t=[],i=0;for(let r=0;r<o.length;r++)e[r]&&(t[r]=i,i+=o[r]);return t}_getStickyEndColumnPositions(o,e){let t=[],i=0;for(let r=o.length;r>0;r--)e[r]&&(t[r]=i,i+=o[r]);return t}_retrieveElementSize(o){let e=this._elemSizeCache.get(o);if(e)return e;let t=o.getBoundingClientRect(),i={width:t.width,height:t.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 t of this._updatedStickyColumnsParamsToReplay)t.rows=t.rows.filter(i=>!e.has(i));this._updatedStickyColumnsParamsToReplay=this._updatedStickyColumnsParamsToReplay.filter(t=>!!t.rows.length)}_updateCachedSizes(o){let e=!1;for(let t of o){let i=t.borderBoxSize?.length?{width:t.borderBoxSize[0].inlineSize,height:t.borderBoxSize[0].blockSize}:{width:t.contentRect.width,height:t.contentRect.height};i.width!==this._elemSizeCache.get(t.target)?.width&&dn(t.target)&&(e=!0),this._elemSizeCache.set(t.target,i)}e&&this._updatedStickyColumnsParamsToReplay.length&&(this._stickyColumnsReplayTimeout&&clearTimeout(this._stickyColumnsReplayTimeout),this._stickyColumnsReplayTimeout=setTimeout(()=>{if(!this._destroyed){for(let t of this._updatedStickyColumnsParamsToReplay)this.updateStickyColumns(t.rows,t.stickyStartStates,t.stickyEndStates,!0,!1);this._updatedStickyColumnsParamsToReplay=[],this._stickyColumnsReplayTimeout=null}},0))}};function dn(n){return["cdk-cell","cdk-header-cell","cdk-footer-cell"].some(o=>n.classList.contains(o))}var se=new ve("STICKY_POSITIONING_LISTENER");var Oe=(()=>{class n{viewContainer=d(J);elementRef=d(B);constructor(){let e=d(N);e._rowOutlet=this,e._outletAssigned()}static \u0275fac=function(t){return new(t||n)};static \u0275dir=p({type:n,selectors:[["","rowOutlet",""]]})}return n})(),Ee=(()=>{class n{viewContainer=d(J);elementRef=d(B);constructor(){let e=d(N);e._headerRowOutlet=this,e._outletAssigned()}static \u0275fac=function(t){return new(t||n)};static \u0275dir=p({type:n,selectors:[["","headerRowOutlet",""]]})}return n})(),Pe=(()=>{class n{viewContainer=d(J);elementRef=d(B);constructor(){let e=d(N);e._footerRowOutlet=this,e._outletAssigned()}static \u0275fac=function(t){return new(t||n)};static \u0275dir=p({type:n,selectors:[["","footerRowOutlet",""]]})}return n})(),Ie=(()=>{class n{viewContainer=d(J);elementRef=d(B);constructor(){let e=d(N);e._noDataRowOutlet=this,e._outletAssigned()}static \u0275fac=function(t){return new(t||n)};static \u0275dir=p({type:n,selectors:[["","noDataRowOutlet",""]]})}return n})(),Ne=(()=>{class n{_differs=d(te);_changeDetectorRef=d(Ze);_elementRef=d(B);_dir=d(tt,{optional:!0});_platform=d(et);_viewRepeater;_viewportRuler=d(rt);_injector=d(qe);_virtualScrollViewport=d(at,{optional:!0,host:!0});_positionListener=d(se,{optional:!0})||d(se,{optional:!0,skipSelf:!0});_document=d(Qe);_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=!0;_footerRowDefChanged=!0;_stickyColumnStylesNeedReset=!0;_forceRecalculateCellWidths=!0;_cachedRenderRowsMap=new Map;_isNativeHtmlTable;_stickyStyler;stickyCssClass="cdk-table-sticky";needsPositionStickyOnElement=!0;_isServer;_isShowingNoDataRow=!1;_hasAllOutlets=!1;_hasInitialized=!1;_headerRowStickyUpdates=new Z;_footerRowStickyUpdates=new Z;_disableVirtualScrolling=!1;_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=!1;get fixedLayout(){return this._virtualScrollEnabled()?!0:this._fixedLayout}set fixedLayout(e){this._fixedLayout=e,this._forceRecalculateCellWidths=!0,this._stickyColumnStylesNeedReset=!0}_fixedLayout=!1;recycleRows=!1;contentChanged=new We;viewChange=new ze({start:0,end:Number.MAX_VALUE});_rowOutlet;_headerRowOutlet;_footerRowOutlet;_noDataRowOutlet;_contentColumnDefs;_contentRowDefs;_contentHeaderRowDefs;_contentFooterRowDefs;_noDataRow;constructor(){d(new Ge("role"),{optional:!0})||this._elementRef.nativeElement.setAttribute("role","table"),this._isServer=!this._platform.isBrowser,this._isNativeHtmlTable=this._elementRef.nativeElement.nodeName==="TABLE",this._dataDiffer=this._differs.find([]).create((t,i)=>this.trackBy?this.trackBy(i.dataIndex,i.data):i)}ngOnInit(){this._setupStickyStyler(),this._viewportRuler.change().pipe(Q(this._onDestroy)).subscribe(()=>{this._forceRecalculateCellWidths=!0})}ngAfterContentInit(){this._viewRepeater=this.recycleRows||this._virtualScrollEnabled()?new it:new pt,this._virtualScrollEnabled()&&this._setupVirtualScrolling(this._virtualScrollViewport),this._hasInitialized=!0}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(),he(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 t=this._rowOutlet.viewContainer;this._viewRepeater.applyChanges(e,t,(i,r,a)=>this._getEmbeddedViewArgs(i.item,a),i=>i.item.data,i=>{i.operation===nt.INSERTED&&i.context&&this._renderCellTemplateForItem(i.record.item.rowDef,i.context)}),this._updateRowIndexContext(),e.forEachIdentityChange(i=>{let r=t.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=!0}removeHeaderRowDef(e){this._customHeaderRowDefs.delete(e),this._headerRowDefChanged=!0}addFooterRowDef(e){this._customFooterRowDefs.add(e),this._footerRowDefChanged=!0}removeFooterRowDef(e){this._customFooterRowDefs.delete(e),this._footerRowDefChanged=!0}setNoDataRow(e){this._customNoDataRow=e}updateStickyHeaderRowStyles(){let e=this._getRenderedRows(this._headerRowOutlet);if(this._isNativeHtmlTable){let i=Ht(this._headerRowOutlet,"thead");i&&(i.style.display=e.length?"":"none")}let t=this._headerRowDefs.map(i=>i.sticky);this._stickyStyler.clearStickyPositioning(e,["top"]),this._stickyStyler.stickRows(e,t,"top"),this._headerRowDefs.forEach(i=>i.resetStickyChanged())}updateStickyFooterRowStyles(){let e=this._getRenderedRows(this._footerRowOutlet);if(this._isNativeHtmlTable){let i=Ht(this._footerRowOutlet,"tfoot");i&&(i.style.display=e.length?"":"none")}let t=this._footerRowDefs.map(i=>i.sticky);this._stickyStyler.clearStickyPositioning(e,["bottom"]),this._stickyStyler.stickRows(e,t,"bottom"),this._stickyStyler.updateStickyFooterContainer(this._elementRef.nativeElement,t),this._footerRowDefs.forEach(i=>i.resetStickyChanged())}updateStickyColumnStyles(){let e=this._getRenderedRows(this._headerRowOutlet),t=this._getRenderedRows(this._rowOutlet),i=this._getRenderedRows(this._footerRowOutlet);(this._isNativeHtmlTable&&!this.fixedLayout||this._stickyColumnStylesNeedReset)&&(this._stickyStyler.clearStickyPositioning([...e,...t,...i],["left","right"]),this._stickyColumnStylesNeedReset=!1),e.forEach((r,a)=>{this._addStickyColumnStyles([r],this._headerRowDefs[a])}),this._rowDefs.forEach(r=>{let a=[];for(let m=0;m<t.length;m++)this._renderRows[m].rowDef===r&&a.push(t[m]);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=!0,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 t=this._renderUpdatedColumns()||this._headerRowDefChanged||this._footerRowDefChanged;this._stickyColumnStylesNeedReset=this._stickyColumnStylesNeedReset||t,this._forceRecalculateCellWidths=t,this._headerRowDefChanged&&(this._forceRenderHeaderRows(),this._headerRowDefChanged=!1),this._footerRowDefChanged&&(this._forceRenderFooterRows(),this._footerRowDefChanged=!1),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=[],t=Math.min(this._data.length,this._renderedRange.end),i=this._cachedRenderRowsMap;this._cachedRenderRowsMap=new Map;for(let r=this._renderedRange.start;r<t;r++){let a=this._data[r],m=this._getRenderRowsForData(a,r,i.get(a));this._cachedRenderRowsMap.has(a)||this._cachedRenderRowsMap.set(a,new WeakMap);for(let h=0;h<m.length;h++){let _=m[h],v=this._cachedRenderRowsMap.get(_.data);v.has(_.rowDef)?v.get(_.rowDef).push(_):v.set(_.rowDef,[_]),e.push(_)}}return e}_getRenderRowsForData(e,t,i){return this._getRowDefs(e,t).map(a=>{let m=i&&i.has(a)?i.get(a):[];if(m.length){let h=m.shift();return h.dataIndex=t,h}else return{data:e,rowDef:a,dataIndex:t}})}_cacheColumnDefs(){this._columnDefsByName.clear(),_e(this._getOwnDefs(this._contentColumnDefs),this._customColumnDefs).forEach(t=>{this._columnDefsByName.has(t.name),this._columnDefsByName.set(t.name,t)})}_cacheRowDefs(){this._headerRowDefs=_e(this._getOwnDefs(this._contentHeaderRowDefs),this._customHeaderRowDefs),this._footerRowDefs=_e(this._getOwnDefs(this._contentFooterRowDefs),this._customFooterRowDefs),this._rowDefs=_e(this._getOwnDefs(this._contentRowDefs),this._customRowDefs);let e=this._rowDefs.filter(t=>!t.when);this._defaultRowDef=e[0]}_renderUpdatedColumns(){let e=(a,m)=>{let h=!!m.getColumnsDiff();return a||h},t=this._rowDefs.reduce(e,!1);t&&this._forceRenderDataRows();let i=this._headerRowDefs.reduce(e,!1);i&&this._forceRenderHeaderRows();let r=this._footerRowDefs.reduce(e,!1);return r&&this._forceRenderFooterRows(),t||i||r}_switchDataSource(e){this._data=[],he(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;he(this.dataSource)?e=this.dataSource.connect(this):je(this.dataSource)?e=this.dataSource:Array.isArray(this.dataSource)&&(e=Ce(this.dataSource)),this._renderChangeSubscription=ce([e,this.viewChange]).pipe(Q(this._onDestroy)).subscribe(([t,i])=>{this._data=t||[],this._renderedRange=i,this._dataStream.next(t),this.renderRows()})}_forceRenderHeaderRows(){this._headerRowOutlet.viewContainer.length>0&&this._headerRowOutlet.viewContainer.clear(),this._headerRowDefs.forEach((e,t)=>this._renderRow(this._headerRowOutlet,e,t)),this.updateStickyHeaderRowStyles()}_forceRenderFooterRows(){this._footerRowOutlet.viewContainer.length>0&&this._footerRowOutlet.viewContainer.clear(),this._footerRowDefs.forEach((e,t)=>this._renderRow(this._footerRowOutlet,e,t)),this.updateStickyFooterRowStyles()}_addStickyColumnStyles(e,t){let i=Array.from(t?.columns||[]).map(m=>{let h=this._columnDefsByName.get(m);return h}),r=i.map(m=>m.sticky),a=i.map(m=>m.stickyEnd);this._stickyStyler.updateStickyColumns(e,r,a,!this.fixedLayout||this._forceRecalculateCellWidths)}_getRenderedRows(e){let t=[];for(let i=0;i<e.viewContainer.length;i++){let r=e.viewContainer.get(i);t.push(r.rootNodes[0])}return t}_getRowDefs(e,t){if(this._rowDefs.length===1)return[this._rowDefs[0]];let i=[];if(this.multiTemplateDataRows)i=this._rowDefs.filter(r=>!r.when||r.when(t,e));else{let r=this._rowDefs.find(a=>a.when&&a.when(t,e))||this._defaultRowDef;r&&i.push(r)}return i.length,i}_getEmbeddedViewArgs(e,t){let i=e.rowDef,r={$implicit:e.data};return{templateRef:i.template,context:r,index:t}}_renderRow(e,t,i,r={}){let a=e.viewContainer.createEmbeddedView(t.template,r,i);return this._renderCellTemplateForItem(t,r),a}_renderCellTemplateForItem(e,t){for(let i of this._getCellTemplates(e))G.mostRecentCellOutlet&&G.mostRecentCellOutlet._viewContainer.createEmbeddedView(i,t);this._changeDetectorRef.markForCheck()}_updateRowIndexContext(){let e=this._rowOutlet.viewContainer;for(let t=0,i=e.length;t<i;t++){let a=e.get(t).context;a.count=i,a.first=t===0,a.last=t===i-1,a.even=t%2===0,a.odd=!a.even,this.multiTemplateDataRows?(a.dataIndex=this._renderRows[t].dataIndex,a.renderIndex=t):a.index=this._renderRows[t].dataIndex}}_getCellTemplates(e){return!e||!e.columns?[]:Array.from(e.columns,t=>{let i=this._columnDefsByName.get(t);return e.extractCellTemplate(i)})}_forceRenderDataRows(){this._dataDiffer.diff([]),this._rowOutlet.viewContainer.clear(),this.renderRows()}_checkStickyStates(){let e=(t,i)=>t||i.hasStickyChanged();this._headerRowDefs.reduce(e,!1)&&this.updateStickyHeaderRowStyles(),this._footerRowDefs.reduce(e,!1)&&this.updateStickyFooterRowStyles(),Array.from(this._columnDefsByName.values()).reduce(e,!1)&&(this._stickyColumnStylesNeedReset=!0,this.updateStickyColumnStyles())}_setupStickyStyler(){let e=this._dir?this._dir.value:"ltr",t=this._injector;this._stickyStyler=new Re(this._isNativeHtmlTable,this.stickyCssClass,this._platform.isBrowser,this.needsPositionStickyOnElement,e,this,t),(this._dir?this._dir.change:Ce()).pipe(Q(this._onDestroy)).subscribe(i=>{this._stickyStyler.direction=i,this.updateStickyColumnStyles()})}_setupVirtualScrolling(e){let t=typeof requestAnimationFrame<"u"?Ue:Le;this.viewChange.next({start:0,end:0}),e.renderedRangeStream.pipe($e(0,t),Q(this._onDestroy)).subscribe(this.viewChange),e.attach({dataStream:this._dataStream,measureRangeSize:(i,r)=>this._measureRangeSize(i,r)}),ce([e.renderedContentOffset,this._headerRowStickyUpdates]).pipe(Q(this._onDestroy)).subscribe(([i,r])=>{if(!(!r.sizes||!r.offsets||!r.elements))for(let a=0;a<r.elements.length;a++){let m=r.elements[a];if(m){let h=r.offsets[a],_=i!==0?Math.max(i-h,h):-h;for(let v of m)v.style.top=`${-_}px`}}}),ce([e.renderedContentOffset,this._footerRowStickyUpdates]).pipe(Q(this._onDestroy)).subscribe(([i,r])=>{if(!(!r.sizes||!r.offsets||!r.elements))for(let a=0;a<r.elements.length;a++){let m=r.elements[a];if(m)for(let h of m)h.style.bottom=`${i+r.offsets[a]}px`}})}_getOwnDefs(e){return e.filter(t=>!t._table||t._table===this)}_updateNoDataRow(){let e=this._customNoDataRow||this._noDataRow;if(!e)return;let t=this._rowOutlet.viewContainer.length===0;if(t===this._isShowingNoDataRow)return;let i=this._noDataRowOutlet.viewContainer;if(t){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 m=a.querySelectorAll(e._cellSelector);for(let h=0;h<m.length;h++)m[h].classList.add(...e._cellClassNames)}}else i.clear();this._isShowingNoDataRow=t,this._changeDetectorRef.markForCheck()}_measureRangeSize(e,t){if(e.start>=e.end||t!=="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,m=e.end-e.start,h,_;for(let D=0;D<m;D++){let x=r.get(D+a);if(x&&x.rootNodes.length){h=_=x.rootNodes[0];break}}for(let D=m-1;D>-1;D--){let x=r.get(D+a);if(x&&x.rootNodes.length){_=x.rootNodes[x.rootNodes.length-1];break}}let v=h?.getBoundingClientRect?.(),F=_?.getBoundingClientRect?.();return v&&F?F.bottom-v.top:0}_virtualScrollEnabled(){return!this._disableVirtualScrolling&&this._virtualScrollViewport!=null}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=V({type:n,selectors:[["cdk-table"],["table","cdk-table",""]],contentQueries:function(t,i,r){if(t&1&&ke(r,$t,5)(r,ne,5)(r,ye,5)(r,le,5)(r,Me,5),t&2){let a;L(a=U())&&(i._noDataRow=a.first),L(a=U())&&(i._contentColumnDefs=a),L(a=U())&&(i._contentRowDefs=a),L(a=U())&&(i._contentHeaderRowDefs=a),L(a=U())&&(i._contentFooterRowDefs=a)}},hostAttrs:[1,"cdk-table"],hostVars:2,hostBindings:function(t,i){t&2&&q("cdk-table-fixed-layout",i.fixedLayout)},inputs:{trackBy:"trackBy",dataSource:"dataSource",multiTemplateDataRows:[2,"multiTemplateDataRows","multiTemplateDataRows",A],fixedLayout:[2,"fixedLayout","fixedLayout",A],recycleRows:[2,"recycleRows","recycleRows",A]},outputs:{contentChanged:"contentChanged"},exportAs:["cdkTable"],features:[I([{provide:N,useExisting:n},{provide:se,useValue:null}])],ngContentSelectors:an,decls:5,vars:2,consts:[["role","rowgroup"],["headerRowOutlet",""],["rowOutlet",""],["noDataRowOutlet",""],["footerRowOutlet",""]],template:function(t,i){t&1&&(fe(rn),$(0),$(1,1),y(2,sn,1,0),y(3,ln,7,0)(4,cn,4,0)),t&2&&(c(2),C(i._isServer?2:-1),c(),C(i._isNativeHtmlTable?3:4))},dependencies:[Ee,Oe,Ie,Pe],styles:[`.cdk-table-fixed-layout {
1
+ import{a as It,b as Nt,c as Bt,d as Vt}from"./chunk-TK54SKYF.js";import{a as Mt,b as Ft,c as Tt,d as Ot,e as Et,g as Pt}from"./chunk-WTDLBURC.js";import{a as St}from"./chunk-N4UL6N3G.js";import{e as Ct,f as vt,i as Dt,j as xt,n as bt,o as kt}from"./chunk-WCLDE6BT.js";import{c as Rt}from"./chunk-7TRKAN4B.js";import{$ as Ke,$a as ke,Cc as rt,Da as W,Db as Ye,Dc as at,Ea as y,Ed as dt,Fa as C,Fb as Xe,Ga as De,Hc as st,I as Q,Ia as xe,Ja as be,Ka as P,Kb as ae,Kd as ut,La as s,M as de,Ma as l,Md as mt,N as ve,Na as ee,Nb as Ge,Nd as ft,P as d,R as g,Ra as K,S as w,Sa as Y,Ta as S,Ua as T,V as qe,Vd as ht,W as Qe,Wa as k,Xb as Ze,Y as We,Ya as u,Yb as te,Za as fe,Zb as A,_ as j,_a as $,_d as _t,aa as ue,ae as pt,ba as E,bb as L,c as Z,cb as U,cc as Je,d as ze,da as B,f as Le,fe as gt,g as Ue,ga as ie,hb as re,i as Ce,ib as q,ie as wt,j as je,ja as c,ka as oe,la as H,lb as f,m as ce,mb as R,mc as et,md as lt,nb as X,od as ct,qa as J,qe as yt,ra as V,sa as me,ta as p,u as $e,uc as tt,va as b,vc as he,wa as z,wb as I,wc as nt,xc as it,yc as ot}from"./chunk-OPNUYGIO.js";import{f as He}from"./chunk-6H3I7D5M.js";var rn=[[["caption"]],[["colgroup"],["col"]],"*"],an=["caption","colgroup, col","*"];function sn(n,o){n&1&&$(0,2)}function ln(n,o){n&1&&(s(0,"thead",0),S(1,1),l(),s(2,"tbody",0),S(3,2)(4,3),l(),s(5,"tfoot",0),S(6,4),l())}function cn(n,o){n&1&&S(0,1)(1,2)(2,3)(3,4)}var N=new ve("CDK_TABLE");var ge=(()=>{class n{template=d(H);constructor(){}static \u0275fac=function(t){return new(t||n)};static \u0275dir=p({type:n,selectors:[["","cdkCellDef",""]]})}return n})(),we=(()=>{class n{template=d(H);constructor(){}static \u0275fac=function(t){return new(t||n)};static \u0275dir=p({type:n,selectors:[["","cdkHeaderCellDef",""]]})}return n})(),Lt=(()=>{class n{template=d(H);constructor(){}static \u0275fac=function(t){return new(t||n)};static \u0275dir=p({type:n,selectors:[["","cdkFooterCellDef",""]]})}return n})(),ne=(()=>{class n{_table=d(N,{optional:!0});_hasStickyChanged=!1;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=!0)}_sticky=!1;get stickyEnd(){return this._stickyEnd}set stickyEnd(e){e!==this._stickyEnd&&(this._stickyEnd=e,this._hasStickyChanged=!0)}_stickyEnd=!1;cell;headerCell;footerCell;cssClassFriendlyName;_columnCssClassName;constructor(){}hasStickyChanged(){let e=this._hasStickyChanged;return this.resetStickyChanged(),e}resetStickyChanged(){this._hasStickyChanged=!1}_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(t){return new(t||n)};static \u0275dir=p({type:n,selectors:[["","cdkColumnDef",""]],contentQueries:function(t,i,r){if(t&1&&ke(r,ge,5)(r,we,5)(r,Lt,5),t&2){let a;L(a=U())&&(i.cell=a.first),L(a=U())&&(i.headerCell=a.first),L(a=U())&&(i.footerCell=a.first)}},inputs:{name:[0,"cdkColumnDef","name"],sticky:[2,"sticky","sticky",A],stickyEnd:[2,"stickyEnd","stickyEnd",A]}})}return n})(),pe=class{constructor(o,e){e.nativeElement.classList.add(...o._columnCssClassName)}},Ut=(()=>{class n extends pe{constructor(){super(d(ne),d(B))}static \u0275fac=function(t){return new(t||n)};static \u0275dir=p({type:n,selectors:[["cdk-header-cell"],["th","cdk-header-cell",""]],hostAttrs:["role","columnheader",1,"cdk-header-cell"],features:[b]})}return n})();var jt=(()=>{class n extends pe{constructor(){let e=d(ne),t=d(B);super(e,t);let i=e._table?._getCellRole();i&&t.nativeElement.setAttribute("role",i)}static \u0275fac=function(t){return new(t||n)};static \u0275dir=p({type:n,selectors:[["cdk-cell"],["td","cdk-cell",""]],hostAttrs:[1,"cdk-cell"],features:[b]})}return n})();var Se=(()=>{class n{template=d(H);_differs=d(te);columns;_columnsDiffer;constructor(){}ngOnChanges(e){if(!this._columnsDiffer){let t=e.columns&&e.columns.currentValue||[];this._columnsDiffer=this._differs.find(t).create(),this._columnsDiffer.diff(t)}}getColumnsDiff(){return this._columnsDiffer.diff(this.columns)}extractCellTemplate(e){return this instanceof le?e.headerCell.template:this instanceof Me?e.footerCell.template:e.cell.template}static \u0275fac=function(t){return new(t||n)};static \u0275dir=p({type:n,features:[ue]})}return n})(),le=(()=>{class n extends Se{_table=d(N,{optional:!0});_hasStickyChanged=!1;get sticky(){return this._sticky}set sticky(e){e!==this._sticky&&(this._sticky=e,this._hasStickyChanged=!0)}_sticky=!1;constructor(){super(d(H),d(te))}ngOnChanges(e){super.ngOnChanges(e)}hasStickyChanged(){let e=this._hasStickyChanged;return this.resetStickyChanged(),e}resetStickyChanged(){this._hasStickyChanged=!1}static \u0275fac=function(t){return new(t||n)};static \u0275dir=p({type:n,selectors:[["","cdkHeaderRowDef",""]],inputs:{columns:[0,"cdkHeaderRowDef","columns"],sticky:[2,"cdkHeaderRowDefSticky","sticky",A]},features:[b,ue]})}return n})(),Me=(()=>{class n extends Se{_table=d(N,{optional:!0});_hasStickyChanged=!1;get sticky(){return this._sticky}set sticky(e){e!==this._sticky&&(this._sticky=e,this._hasStickyChanged=!0)}_sticky=!1;constructor(){super(d(H),d(te))}ngOnChanges(e){super.ngOnChanges(e)}hasStickyChanged(){let e=this._hasStickyChanged;return this.resetStickyChanged(),e}resetStickyChanged(){this._hasStickyChanged=!1}static \u0275fac=function(t){return new(t||n)};static \u0275dir=p({type:n,selectors:[["","cdkFooterRowDef",""]],inputs:{columns:[0,"cdkFooterRowDef","columns"],sticky:[2,"cdkFooterRowDefSticky","sticky",A]},features:[b,ue]})}return n})(),ye=(()=>{class n extends Se{_table=d(N,{optional:!0});when;constructor(){super(d(H),d(te))}static \u0275fac=function(t){return new(t||n)};static \u0275dir=p({type:n,selectors:[["","cdkRowDef",""]],inputs:{columns:[0,"cdkRowDefColumns","columns"],when:[0,"cdkRowDefWhen","when"]},features:[b]})}return n})(),G=(()=>{class n{_viewContainer=d(J);cells;context;static mostRecentCellOutlet=null;constructor(){n.mostRecentCellOutlet=this}ngOnDestroy(){n.mostRecentCellOutlet===this&&(n.mostRecentCellOutlet=null)}static \u0275fac=function(t){return new(t||n)};static \u0275dir=p({type:n,selectors:[["","cdkCellOutlet",""]]})}return n})(),Fe=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275cmp=V({type:n,selectors:[["cdk-header-row"],["tr","cdk-header-row",""]],hostAttrs:["role","row",1,"cdk-header-row"],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(t,i){t&1&&S(0,0)},dependencies:[G],encapsulation:2})}return n})();var Te=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275cmp=V({type:n,selectors:[["cdk-row"],["tr","cdk-row",""]],hostAttrs:["role","row",1,"cdk-row"],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(t,i){t&1&&S(0,0)},dependencies:[G],encapsulation:2})}return n})(),$t=(()=>{class n{templateRef=d(H);_contentClassNames=["cdk-no-data-row","cdk-row"];_cellClassNames=["cdk-cell","cdk-no-data-cell"];_cellSelector="td, cdk-cell, [cdk-cell], .cdk-cell";constructor(){}static \u0275fac=function(t){return new(t||n)};static \u0275dir=p({type:n,selectors:[["ng-template","cdkNoDataRow",""]]})}return n})(),At=["top","bottom","left","right"],Re=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=!1;constructor(o,e,t=!0,i=!0,r,a,m){this._isNativeHtmlTable=o,this._stickCellCss=e,this._isBrowser=t,this._needsPositionStickyOnElement=i,this.direction=r,this._positionListener=a,this._tableInjector=m,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 t=[];for(let i of o)i.nodeType===i.ELEMENT_NODE&&t.push(i,...Array.from(i.children));oe({write:()=>{for(let i of t)this._removeStickyStyle(i,e)}},{injector:this._tableInjector})}updateStickyColumns(o,e,t,i=!0,r=!0){if(!o.length||!this._isBrowser||!(e.some(O=>O)||t.some(O=>O))){this._positionListener?.stickyColumnsUpdated({sizes:[]}),this._positionListener?.stickyEndColumnsUpdated({sizes:[]});return}let a=o[0],m=a.children.length,h=this.direction==="rtl",_=h?"right":"left",v=h?"left":"right",F=e.lastIndexOf(!0),D=t.indexOf(!0),x,Be,Ve;r&&this._updateStickyColumnReplayQueue({rows:[...o],stickyStartStates:[...e],stickyEndStates:[...t]}),oe({earlyRead:()=>{x=this._getCellWidths(a,i),Be=this._getStickyStartColumnPositions(x,e),Ve=this._getStickyEndColumnPositions(x,t)},write:()=>{for(let O of o)for(let M=0;M<m;M++){let Ae=O.children[M];e[M]&&this._addStickyStyle(Ae,_,Be[M],M===F),t[M]&&this._addStickyStyle(Ae,v,Ve[M],M===D)}this._positionListener&&x.some(O=>!!O)&&(this._positionListener.stickyColumnsUpdated({sizes:F===-1?[]:x.slice(0,F+1).map((O,M)=>e[M]?O:null)}),this._positionListener.stickyEndColumnsUpdated({sizes:D===-1?[]:x.slice(D).map((O,M)=>t[M+D]?O:null).reverse()}))}},{injector:this._tableInjector})}stickRows(o,e,t){if(!this._isBrowser)return;let i=t==="bottom"?o.slice().reverse():o,r=t==="bottom"?e.slice().reverse():e,a=[],m=[],h=[];oe({earlyRead:()=>{for(let _=0,v=0;_<i.length;_++){if(!r[_])continue;a[_]=v;let F=i[_];h[_]=this._isNativeHtmlTable?Array.from(F.children):[F];let D=this._retrieveElementSize(F).height;v+=D,m[_]=D}},write:()=>{let _=r.lastIndexOf(!0);for(let v=0;v<i.length;v++){if(!r[v])continue;let F=a[v],D=v===_;for(let x of h[v])this._addStickyStyle(x,t,F,D)}t==="top"?this._positionListener?.stickyHeaderRowsUpdated({sizes:m,offsets:a,elements:h}):this._positionListener?.stickyFooterRowsUpdated({sizes:m,offsets:a,elements:h})}},{injector:this._tableInjector})}updateStickyFooterContainer(o,e){this._isNativeHtmlTable&&oe({write:()=>{let t=o.querySelector("tfoot");t&&(e.some(i=>!i)?this._removeStickyStyle(t,["bottom"]):this._addStickyStyle(t,"bottom",0,!1))}},{injector:this._tableInjector})}destroy(){this._stickyColumnsReplayTimeout&&clearTimeout(this._stickyColumnsReplayTimeout),this._resizeObserver?.disconnect(),this._destroyed=!0}_removeStickyStyle(o,e){if(!o.classList.contains(this._stickCellCss))return;for(let i of e)o.style[i]="",o.classList.remove(this._borderCellCss[i]);At.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,t,i){o.classList.add(this._stickCellCss),i&&o.classList.add(this._borderCellCss[e]),o.style[e]=`${t}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},t=0;for(let i of At)o.style[i]&&(t+=e[i]);return t?`${t}`:""}_getCellWidths(o,e=!0){if(!e&&this._cachedCellWidths.length)return this._cachedCellWidths;let t=[],i=o.children;for(let r=0;r<i.length;r++){let a=i[r];t.push(this._retrieveElementSize(a).width)}return this._cachedCellWidths=t,t}_getStickyStartColumnPositions(o,e){let t=[],i=0;for(let r=0;r<o.length;r++)e[r]&&(t[r]=i,i+=o[r]);return t}_getStickyEndColumnPositions(o,e){let t=[],i=0;for(let r=o.length;r>0;r--)e[r]&&(t[r]=i,i+=o[r]);return t}_retrieveElementSize(o){let e=this._elemSizeCache.get(o);if(e)return e;let t=o.getBoundingClientRect(),i={width:t.width,height:t.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 t of this._updatedStickyColumnsParamsToReplay)t.rows=t.rows.filter(i=>!e.has(i));this._updatedStickyColumnsParamsToReplay=this._updatedStickyColumnsParamsToReplay.filter(t=>!!t.rows.length)}_updateCachedSizes(o){let e=!1;for(let t of o){let i=t.borderBoxSize?.length?{width:t.borderBoxSize[0].inlineSize,height:t.borderBoxSize[0].blockSize}:{width:t.contentRect.width,height:t.contentRect.height};i.width!==this._elemSizeCache.get(t.target)?.width&&dn(t.target)&&(e=!0),this._elemSizeCache.set(t.target,i)}e&&this._updatedStickyColumnsParamsToReplay.length&&(this._stickyColumnsReplayTimeout&&clearTimeout(this._stickyColumnsReplayTimeout),this._stickyColumnsReplayTimeout=setTimeout(()=>{if(!this._destroyed){for(let t of this._updatedStickyColumnsParamsToReplay)this.updateStickyColumns(t.rows,t.stickyStartStates,t.stickyEndStates,!0,!1);this._updatedStickyColumnsParamsToReplay=[],this._stickyColumnsReplayTimeout=null}},0))}};function dn(n){return["cdk-cell","cdk-header-cell","cdk-footer-cell"].some(o=>n.classList.contains(o))}var se=new ve("STICKY_POSITIONING_LISTENER");var Oe=(()=>{class n{viewContainer=d(J);elementRef=d(B);constructor(){let e=d(N);e._rowOutlet=this,e._outletAssigned()}static \u0275fac=function(t){return new(t||n)};static \u0275dir=p({type:n,selectors:[["","rowOutlet",""]]})}return n})(),Ee=(()=>{class n{viewContainer=d(J);elementRef=d(B);constructor(){let e=d(N);e._headerRowOutlet=this,e._outletAssigned()}static \u0275fac=function(t){return new(t||n)};static \u0275dir=p({type:n,selectors:[["","headerRowOutlet",""]]})}return n})(),Pe=(()=>{class n{viewContainer=d(J);elementRef=d(B);constructor(){let e=d(N);e._footerRowOutlet=this,e._outletAssigned()}static \u0275fac=function(t){return new(t||n)};static \u0275dir=p({type:n,selectors:[["","footerRowOutlet",""]]})}return n})(),Ie=(()=>{class n{viewContainer=d(J);elementRef=d(B);constructor(){let e=d(N);e._noDataRowOutlet=this,e._outletAssigned()}static \u0275fac=function(t){return new(t||n)};static \u0275dir=p({type:n,selectors:[["","noDataRowOutlet",""]]})}return n})(),Ne=(()=>{class n{_differs=d(te);_changeDetectorRef=d(Ze);_elementRef=d(B);_dir=d(tt,{optional:!0});_platform=d(et);_viewRepeater;_viewportRuler=d(rt);_injector=d(qe);_virtualScrollViewport=d(at,{optional:!0,host:!0});_positionListener=d(se,{optional:!0})||d(se,{optional:!0,skipSelf:!0});_document=d(Qe);_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=!0;_footerRowDefChanged=!0;_stickyColumnStylesNeedReset=!0;_forceRecalculateCellWidths=!0;_cachedRenderRowsMap=new Map;_isNativeHtmlTable;_stickyStyler;stickyCssClass="cdk-table-sticky";needsPositionStickyOnElement=!0;_isServer;_isShowingNoDataRow=!1;_hasAllOutlets=!1;_hasInitialized=!1;_headerRowStickyUpdates=new Z;_footerRowStickyUpdates=new Z;_disableVirtualScrolling=!1;_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=!1;get fixedLayout(){return this._virtualScrollEnabled()?!0:this._fixedLayout}set fixedLayout(e){this._fixedLayout=e,this._forceRecalculateCellWidths=!0,this._stickyColumnStylesNeedReset=!0}_fixedLayout=!1;recycleRows=!1;contentChanged=new We;viewChange=new ze({start:0,end:Number.MAX_VALUE});_rowOutlet;_headerRowOutlet;_footerRowOutlet;_noDataRowOutlet;_contentColumnDefs;_contentRowDefs;_contentHeaderRowDefs;_contentFooterRowDefs;_noDataRow;constructor(){d(new Ge("role"),{optional:!0})||this._elementRef.nativeElement.setAttribute("role","table"),this._isServer=!this._platform.isBrowser,this._isNativeHtmlTable=this._elementRef.nativeElement.nodeName==="TABLE",this._dataDiffer=this._differs.find([]).create((t,i)=>this.trackBy?this.trackBy(i.dataIndex,i.data):i)}ngOnInit(){this._setupStickyStyler(),this._viewportRuler.change().pipe(Q(this._onDestroy)).subscribe(()=>{this._forceRecalculateCellWidths=!0})}ngAfterContentInit(){this._viewRepeater=this.recycleRows||this._virtualScrollEnabled()?new it:new Rt,this._virtualScrollEnabled()&&this._setupVirtualScrolling(this._virtualScrollViewport),this._hasInitialized=!0}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(),he(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 t=this._rowOutlet.viewContainer;this._viewRepeater.applyChanges(e,t,(i,r,a)=>this._getEmbeddedViewArgs(i.item,a),i=>i.item.data,i=>{i.operation===nt.INSERTED&&i.context&&this._renderCellTemplateForItem(i.record.item.rowDef,i.context)}),this._updateRowIndexContext(),e.forEachIdentityChange(i=>{let r=t.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=!0}removeHeaderRowDef(e){this._customHeaderRowDefs.delete(e),this._headerRowDefChanged=!0}addFooterRowDef(e){this._customFooterRowDefs.add(e),this._footerRowDefChanged=!0}removeFooterRowDef(e){this._customFooterRowDefs.delete(e),this._footerRowDefChanged=!0}setNoDataRow(e){this._customNoDataRow=e}updateStickyHeaderRowStyles(){let e=this._getRenderedRows(this._headerRowOutlet);if(this._isNativeHtmlTable){let i=Ht(this._headerRowOutlet,"thead");i&&(i.style.display=e.length?"":"none")}let t=this._headerRowDefs.map(i=>i.sticky);this._stickyStyler.clearStickyPositioning(e,["top"]),this._stickyStyler.stickRows(e,t,"top"),this._headerRowDefs.forEach(i=>i.resetStickyChanged())}updateStickyFooterRowStyles(){let e=this._getRenderedRows(this._footerRowOutlet);if(this._isNativeHtmlTable){let i=Ht(this._footerRowOutlet,"tfoot");i&&(i.style.display=e.length?"":"none")}let t=this._footerRowDefs.map(i=>i.sticky);this._stickyStyler.clearStickyPositioning(e,["bottom"]),this._stickyStyler.stickRows(e,t,"bottom"),this._stickyStyler.updateStickyFooterContainer(this._elementRef.nativeElement,t),this._footerRowDefs.forEach(i=>i.resetStickyChanged())}updateStickyColumnStyles(){let e=this._getRenderedRows(this._headerRowOutlet),t=this._getRenderedRows(this._rowOutlet),i=this._getRenderedRows(this._footerRowOutlet);(this._isNativeHtmlTable&&!this.fixedLayout||this._stickyColumnStylesNeedReset)&&(this._stickyStyler.clearStickyPositioning([...e,...t,...i],["left","right"]),this._stickyColumnStylesNeedReset=!1),e.forEach((r,a)=>{this._addStickyColumnStyles([r],this._headerRowDefs[a])}),this._rowDefs.forEach(r=>{let a=[];for(let m=0;m<t.length;m++)this._renderRows[m].rowDef===r&&a.push(t[m]);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=!0,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 t=this._renderUpdatedColumns()||this._headerRowDefChanged||this._footerRowDefChanged;this._stickyColumnStylesNeedReset=this._stickyColumnStylesNeedReset||t,this._forceRecalculateCellWidths=t,this._headerRowDefChanged&&(this._forceRenderHeaderRows(),this._headerRowDefChanged=!1),this._footerRowDefChanged&&(this._forceRenderFooterRows(),this._footerRowDefChanged=!1),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=[],t=Math.min(this._data.length,this._renderedRange.end),i=this._cachedRenderRowsMap;this._cachedRenderRowsMap=new Map;for(let r=this._renderedRange.start;r<t;r++){let a=this._data[r],m=this._getRenderRowsForData(a,r,i.get(a));this._cachedRenderRowsMap.has(a)||this._cachedRenderRowsMap.set(a,new WeakMap);for(let h=0;h<m.length;h++){let _=m[h],v=this._cachedRenderRowsMap.get(_.data);v.has(_.rowDef)?v.get(_.rowDef).push(_):v.set(_.rowDef,[_]),e.push(_)}}return e}_getRenderRowsForData(e,t,i){return this._getRowDefs(e,t).map(a=>{let m=i&&i.has(a)?i.get(a):[];if(m.length){let h=m.shift();return h.dataIndex=t,h}else return{data:e,rowDef:a,dataIndex:t}})}_cacheColumnDefs(){this._columnDefsByName.clear(),_e(this._getOwnDefs(this._contentColumnDefs),this._customColumnDefs).forEach(t=>{this._columnDefsByName.has(t.name),this._columnDefsByName.set(t.name,t)})}_cacheRowDefs(){this._headerRowDefs=_e(this._getOwnDefs(this._contentHeaderRowDefs),this._customHeaderRowDefs),this._footerRowDefs=_e(this._getOwnDefs(this._contentFooterRowDefs),this._customFooterRowDefs),this._rowDefs=_e(this._getOwnDefs(this._contentRowDefs),this._customRowDefs);let e=this._rowDefs.filter(t=>!t.when);this._defaultRowDef=e[0]}_renderUpdatedColumns(){let e=(a,m)=>{let h=!!m.getColumnsDiff();return a||h},t=this._rowDefs.reduce(e,!1);t&&this._forceRenderDataRows();let i=this._headerRowDefs.reduce(e,!1);i&&this._forceRenderHeaderRows();let r=this._footerRowDefs.reduce(e,!1);return r&&this._forceRenderFooterRows(),t||i||r}_switchDataSource(e){this._data=[],he(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;he(this.dataSource)?e=this.dataSource.connect(this):je(this.dataSource)?e=this.dataSource:Array.isArray(this.dataSource)&&(e=Ce(this.dataSource)),this._renderChangeSubscription=ce([e,this.viewChange]).pipe(Q(this._onDestroy)).subscribe(([t,i])=>{this._data=t||[],this._renderedRange=i,this._dataStream.next(t),this.renderRows()})}_forceRenderHeaderRows(){this._headerRowOutlet.viewContainer.length>0&&this._headerRowOutlet.viewContainer.clear(),this._headerRowDefs.forEach((e,t)=>this._renderRow(this._headerRowOutlet,e,t)),this.updateStickyHeaderRowStyles()}_forceRenderFooterRows(){this._footerRowOutlet.viewContainer.length>0&&this._footerRowOutlet.viewContainer.clear(),this._footerRowDefs.forEach((e,t)=>this._renderRow(this._footerRowOutlet,e,t)),this.updateStickyFooterRowStyles()}_addStickyColumnStyles(e,t){let i=Array.from(t?.columns||[]).map(m=>{let h=this._columnDefsByName.get(m);return h}),r=i.map(m=>m.sticky),a=i.map(m=>m.stickyEnd);this._stickyStyler.updateStickyColumns(e,r,a,!this.fixedLayout||this._forceRecalculateCellWidths)}_getRenderedRows(e){let t=[];for(let i=0;i<e.viewContainer.length;i++){let r=e.viewContainer.get(i);t.push(r.rootNodes[0])}return t}_getRowDefs(e,t){if(this._rowDefs.length===1)return[this._rowDefs[0]];let i=[];if(this.multiTemplateDataRows)i=this._rowDefs.filter(r=>!r.when||r.when(t,e));else{let r=this._rowDefs.find(a=>a.when&&a.when(t,e))||this._defaultRowDef;r&&i.push(r)}return i.length,i}_getEmbeddedViewArgs(e,t){let i=e.rowDef,r={$implicit:e.data};return{templateRef:i.template,context:r,index:t}}_renderRow(e,t,i,r={}){let a=e.viewContainer.createEmbeddedView(t.template,r,i);return this._renderCellTemplateForItem(t,r),a}_renderCellTemplateForItem(e,t){for(let i of this._getCellTemplates(e))G.mostRecentCellOutlet&&G.mostRecentCellOutlet._viewContainer.createEmbeddedView(i,t);this._changeDetectorRef.markForCheck()}_updateRowIndexContext(){let e=this._rowOutlet.viewContainer;for(let t=0,i=e.length;t<i;t++){let a=e.get(t).context;a.count=i,a.first=t===0,a.last=t===i-1,a.even=t%2===0,a.odd=!a.even,this.multiTemplateDataRows?(a.dataIndex=this._renderRows[t].dataIndex,a.renderIndex=t):a.index=this._renderRows[t].dataIndex}}_getCellTemplates(e){return!e||!e.columns?[]:Array.from(e.columns,t=>{let i=this._columnDefsByName.get(t);return e.extractCellTemplate(i)})}_forceRenderDataRows(){this._dataDiffer.diff([]),this._rowOutlet.viewContainer.clear(),this.renderRows()}_checkStickyStates(){let e=(t,i)=>t||i.hasStickyChanged();this._headerRowDefs.reduce(e,!1)&&this.updateStickyHeaderRowStyles(),this._footerRowDefs.reduce(e,!1)&&this.updateStickyFooterRowStyles(),Array.from(this._columnDefsByName.values()).reduce(e,!1)&&(this._stickyColumnStylesNeedReset=!0,this.updateStickyColumnStyles())}_setupStickyStyler(){let e=this._dir?this._dir.value:"ltr",t=this._injector;this._stickyStyler=new Re(this._isNativeHtmlTable,this.stickyCssClass,this._platform.isBrowser,this.needsPositionStickyOnElement,e,this,t),(this._dir?this._dir.change:Ce()).pipe(Q(this._onDestroy)).subscribe(i=>{this._stickyStyler.direction=i,this.updateStickyColumnStyles()})}_setupVirtualScrolling(e){let t=typeof requestAnimationFrame<"u"?Ue:Le;this.viewChange.next({start:0,end:0}),e.renderedRangeStream.pipe($e(0,t),Q(this._onDestroy)).subscribe(this.viewChange),e.attach({dataStream:this._dataStream,measureRangeSize:(i,r)=>this._measureRangeSize(i,r)}),ce([e.renderedContentOffset,this._headerRowStickyUpdates]).pipe(Q(this._onDestroy)).subscribe(([i,r])=>{if(!(!r.sizes||!r.offsets||!r.elements))for(let a=0;a<r.elements.length;a++){let m=r.elements[a];if(m){let h=r.offsets[a],_=i!==0?Math.max(i-h,h):-h;for(let v of m)v.style.top=`${-_}px`}}}),ce([e.renderedContentOffset,this._footerRowStickyUpdates]).pipe(Q(this._onDestroy)).subscribe(([i,r])=>{if(!(!r.sizes||!r.offsets||!r.elements))for(let a=0;a<r.elements.length;a++){let m=r.elements[a];if(m)for(let h of m)h.style.bottom=`${i+r.offsets[a]}px`}})}_getOwnDefs(e){return e.filter(t=>!t._table||t._table===this)}_updateNoDataRow(){let e=this._customNoDataRow||this._noDataRow;if(!e)return;let t=this._rowOutlet.viewContainer.length===0;if(t===this._isShowingNoDataRow)return;let i=this._noDataRowOutlet.viewContainer;if(t){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 m=a.querySelectorAll(e._cellSelector);for(let h=0;h<m.length;h++)m[h].classList.add(...e._cellClassNames)}}else i.clear();this._isShowingNoDataRow=t,this._changeDetectorRef.markForCheck()}_measureRangeSize(e,t){if(e.start>=e.end||t!=="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,m=e.end-e.start,h,_;for(let D=0;D<m;D++){let x=r.get(D+a);if(x&&x.rootNodes.length){h=_=x.rootNodes[0];break}}for(let D=m-1;D>-1;D--){let x=r.get(D+a);if(x&&x.rootNodes.length){_=x.rootNodes[x.rootNodes.length-1];break}}let v=h?.getBoundingClientRect?.(),F=_?.getBoundingClientRect?.();return v&&F?F.bottom-v.top:0}_virtualScrollEnabled(){return!this._disableVirtualScrolling&&this._virtualScrollViewport!=null}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=V({type:n,selectors:[["cdk-table"],["table","cdk-table",""]],contentQueries:function(t,i,r){if(t&1&&ke(r,$t,5)(r,ne,5)(r,ye,5)(r,le,5)(r,Me,5),t&2){let a;L(a=U())&&(i._noDataRow=a.first),L(a=U())&&(i._contentColumnDefs=a),L(a=U())&&(i._contentRowDefs=a),L(a=U())&&(i._contentHeaderRowDefs=a),L(a=U())&&(i._contentFooterRowDefs=a)}},hostAttrs:[1,"cdk-table"],hostVars:2,hostBindings:function(t,i){t&2&&q("cdk-table-fixed-layout",i.fixedLayout)},inputs:{trackBy:"trackBy",dataSource:"dataSource",multiTemplateDataRows:[2,"multiTemplateDataRows","multiTemplateDataRows",A],fixedLayout:[2,"fixedLayout","fixedLayout",A],recycleRows:[2,"recycleRows","recycleRows",A]},outputs:{contentChanged:"contentChanged"},exportAs:["cdkTable"],features:[I([{provide:N,useExisting:n},{provide:se,useValue:null}])],ngContentSelectors:an,decls:5,vars:2,consts:[["role","rowgroup"],["headerRowOutlet",""],["rowOutlet",""],["noDataRowOutlet",""],["footerRowOutlet",""]],template:function(t,i){t&1&&(fe(rn),$(0),$(1,1),y(2,sn,1,0),y(3,ln,7,0)(4,cn,4,0)),t&2&&(c(2),C(i._isServer?2:-1),c(),C(i._isNativeHtmlTable?3:4))},dependencies:[Ee,Oe,Ie,Pe],styles:[`.cdk-table-fixed-layout {
2
2
  table-layout: fixed;
3
3
  }
4
4
  `],encapsulation:2})}return n})();function _e(n,o){return n.concat(Array.from(o))}function Ht(n,o){let e=o.toUpperCase(),t=n.viewContainer.element.nativeElement;for(;t;){let i=t.nodeType===1?t.nodeName:null;if(i===e)return t;if(i==="TABLE")break;t=t.parentNode}return null}var qt=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275mod=me({type:n});static \u0275inj=de({imports:[st]})}return n})();var un=[[["caption"]],[["colgroup"],["col"]],"*"],mn=["caption","colgroup, col","*"];function fn(n,o){n&1&&$(0,2)}function hn(n,o){n&1&&(s(0,"thead",0),S(1,1),l(),s(2,"tbody",2),S(3,3)(4,4),l(),s(5,"tfoot",0),S(6,5),l())}function _n(n,o){n&1&&S(0,1)(1,3)(2,4)(3,5)}var Qt=(()=>{class n extends Ne{stickyCssClass="mat-mdc-table-sticky";needsPositionStickyOnElement=!1;static \u0275fac=(()=>{let e;return function(i){return(e||(e=E(n)))(i||n)}})();static \u0275cmp=V({type:n,selectors:[["mat-table"],["table","mat-table",""]],hostAttrs:[1,"mat-mdc-table","mdc-data-table__table"],hostVars:2,hostBindings:function(t,i){t&2&&q("mat-table-fixed-layout",i.fixedLayout)},exportAs:["matTable"],features:[I([{provide:Ne,useExisting:n},{provide:N,useExisting:n},{provide:se,useValue:null}]),b],ngContentSelectors:mn,decls:5,vars:2,consts:[["role","rowgroup"],["headerRowOutlet",""],["role","rowgroup",1,"mdc-data-table__content"],["rowOutlet",""],["noDataRowOutlet",""],["footerRowOutlet",""]],template:function(t,i){t&1&&(fe(un),$(0),$(1,1),y(2,fn,1,0),y(3,hn,7,0)(4,_n,4,0)),t&2&&(c(2),C(i._isServer?2:-1),c(),C(i._isNativeHtmlTable?3:4))},dependencies:[Ee,Oe,Ie,Pe],styles:[`.mat-mdc-table-sticky {
@@ -178,4 +178,4 @@ mat-cell.mat-mdc-cell,
178
178
  mat-footer-cell.mat-mdc-footer-cell {
179
179
  align-self: stretch;
180
180
  }
181
- `],encapsulation:2})}return n})(),Wt=(()=>{class n extends ge{static \u0275fac=(()=>{let e;return function(i){return(e||(e=E(n)))(i||n)}})();static \u0275dir=p({type:n,selectors:[["","matCellDef",""]],features:[I([{provide:ge,useExisting:n}]),b]})}return n})(),Kt=(()=>{class n extends we{static \u0275fac=(()=>{let e;return function(i){return(e||(e=E(n)))(i||n)}})();static \u0275dir=p({type:n,selectors:[["","matHeaderCellDef",""]],features:[I([{provide:we,useExisting:n}]),b]})}return n})();var Yt=(()=>{class n extends ne{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=E(n)))(i||n)}})();static \u0275dir=p({type:n,selectors:[["","matColumnDef",""]],inputs:{name:[0,"matColumnDef","name"]},features:[I([{provide:ne,useExisting:n}]),b]})}return n})(),Xt=(()=>{class n extends Ut{static \u0275fac=(()=>{let e;return function(i){return(e||(e=E(n)))(i||n)}})();static \u0275dir=p({type:n,selectors:[["mat-header-cell"],["th","mat-header-cell",""]],hostAttrs:["role","columnheader",1,"mat-mdc-header-cell","mdc-data-table__header-cell"],features:[b]})}return n})();var Gt=(()=>{class n extends jt{static \u0275fac=(()=>{let e;return function(i){return(e||(e=E(n)))(i||n)}})();static \u0275dir=p({type:n,selectors:[["mat-cell"],["td","mat-cell",""]],hostAttrs:[1,"mat-mdc-cell","mdc-data-table__cell"],features:[b]})}return n})();var Zt=(()=>{class n extends le{static \u0275fac=(()=>{let e;return function(i){return(e||(e=E(n)))(i||n)}})();static \u0275dir=p({type:n,selectors:[["","matHeaderRowDef",""]],inputs:{columns:[0,"matHeaderRowDef","columns"],sticky:[2,"matHeaderRowDefSticky","sticky",A]},features:[I([{provide:le,useExisting:n}]),b]})}return n})();var Jt=(()=>{class n extends ye{static \u0275fac=(()=>{let e;return function(i){return(e||(e=E(n)))(i||n)}})();static \u0275dir=p({type:n,selectors:[["","matRowDef",""]],inputs:{columns:[0,"matRowDefColumns","columns"],when:[0,"matRowDefWhen","when"]},features:[I([{provide:ye,useExisting:n}]),b]})}return n})(),en=(()=>{class n extends Fe{static \u0275fac=(()=>{let e;return function(i){return(e||(e=E(n)))(i||n)}})();static \u0275cmp=V({type:n,selectors:[["mat-header-row"],["tr","mat-header-row",""]],hostAttrs:["role","row",1,"mat-mdc-header-row","mdc-data-table__header-row"],exportAs:["matHeaderRow"],features:[I([{provide:Fe,useExisting:n}]),b],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(t,i){t&1&&S(0,0)},dependencies:[G],encapsulation:2})}return n})();var tn=(()=>{class n extends Te{static \u0275fac=(()=>{let e;return function(i){return(e||(e=E(n)))(i||n)}})();static \u0275cmp=V({type:n,selectors:[["mat-row"],["tr","mat-row",""]],hostAttrs:["role","row",1,"mat-mdc-row","mdc-data-table__row"],exportAs:["matRow"],features:[I([{provide:Te,useExisting:n}]),b],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(t,i){t&1&&S(0,0)},dependencies:[G],encapsulation:2})}return n})();var nn=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275mod=me({type:n});static \u0275inj=de({imports:[qt,ot]})}return n})();function gn(n,o){n&1&&(s(0,"div",5),f(1,"Loading\u2026"),l())}function wn(n,o){n&1&&(s(0,"div",5)(1,"mat-icon",7),f(2,"tips_and_updates"),l(),s(3,"p"),f(4,"No features have been documented yet."),l()())}function yn(n,o){if(n&1&&(s(0,"figcaption"),f(1),l()),n&2){let e=u(2);c(),R(e.images[0].alt)}}function Cn(n,o){if(n&1){let e=T();s(0,"figure",36),k("click",function(){g(e);let i=u(),r=u(2);return w(r.openViewer(i.images[0].url))})("keydown.enter",function(){g(e);let i=u(),r=u(2);return w(r.openViewer(i.images[0].url))})("keydown.space",function(i){g(e);let r=u();return u(2).openViewer(r.images[0].url),w(i.preventDefault())}),ee(1,"img",37),y(2,yn,2,1,"figcaption"),l()}if(n&2){let e=u(),t=u(2);W("aria-label","Enlarge "+(e.images[0].alt||"screenshot")),c(),P("src",t.resolveShot(e.images[0].url),ie)("alt",e.images[0].alt||""),c(),C(e.images[0].alt?2:-1)}}function vn(n,o){if(n&1&&(s(0,"span",38),f(1),l()),n&2){let e=u(),t=u(2);q("enhanced",e.latestKind==="enhanced"),c(),X(" ",t.sinceLabel(e)," ")}}function Dn(n,o){n&1&&(s(0,"span",30),f(1,"Unreleased"),l())}function xn(n,o){if(n&1&&(s(0,"li"),f(1),l()),n&2){let e=o.$implicit;c(),R(e)}}function bn(n,o){if(n&1){let e=T();s(0,"button",41),k("click",function(){g(e);let i=u(4);return w(i.scrollToHistory())}),f(1),l()}if(n&2){let e=u();c(),X(" +",e.more," more ")}}function kn(n,o){if(n&1&&(s(0,"div",31)(1,"div",39)(2,"mat-icon"),f(3,"tips_and_updates"),l(),s(4,"span"),f(5),l()(),s(6,"ul"),xe(7,xn,2,1,"li",null,De),l(),y(9,bn,2,1,"button",40),l()),n&2){let e=o;c(5),R(e.label),c(2),be(e.shown),c(2),C(e.more?9:-1)}}function Rn(n,o){if(n&1&&(s(0,"figcaption"),f(1),l()),n&2){let e=u().$implicit;c(),R(e.alt)}}function Sn(n,o){if(n&1){let e=T();s(0,"figure",42),k("click",function(){let i=g(e).$implicit,r=u(3);return w(r.openViewer(i.url))})("keydown.enter",function(){let i=g(e).$implicit,r=u(3);return w(r.openViewer(i.url))})("keydown.space",function(i){let r=g(e).$implicit;return u(3).openViewer(r.url),w(i.preventDefault())}),ee(1,"img",37),y(2,Rn,2,1,"figcaption"),l()}if(n&2){let e=o.$implicit,t=u(3);W("aria-label","Enlarge "+(e.alt||"screenshot")),c(),P("src",t.resolveShot(e.url),ie)("alt",e.alt||""),c(),C(e.alt?2:-1)}}function Mn(n,o){if(n&1&&(s(0,"a",47),f(1),l()),n&2){let e=o,t=u(5);P("href",t.prUrl(e),ie),c(),X("#",e)}}function Fn(n,o){if(n&1&&(s(0,"tr")(1,"td",45),f(2),Ye(3,"date"),l(),s(4,"td",46),y(5,Mn,2,2,"a",47),l(),s(6,"td",48),f(7),l()()),n&2){let e,t=o.$implicit;c(2),X(" ",t.date?Xe(3,3,t.date,"mediumDate"):""," "),c(3),C((e=t.pr)?5:-1,e),c(2),R(t.title)}}function Tn(n,o){if(n&1&&(s(0,"div",35)(1,"div",43),f(2,"History"),l(),s(3,"table",44),xe(4,Fn,8,6,"tr",null,De),l()()),n&2){let e=u();c(4),be(e.events)}}function On(n,o){if(n&1&&(s(0,"div",9),y(1,Cn,3,4,"figure",26),s(2,"h2"),f(3),l(),s(4,"div",27)(5,"span",28),f(6),l(),y(7,vn,2,3,"span",29)(8,Dn,2,0,"span",30),l(),y(9,kn,10,2,"div",31),s(10,"div",32)(11,"remark",33),z(12,Sn,3,4,"ng-template",34),l()(),y(13,Tn,6,0,"div",35),l()),n&2){let e,t=o,i=u(2);c(),C(t.images.length?1:-1),c(2),R(t.title),c(2),re("--cat-hue",i.categoryHue(t.category)),c(),R(t.category),c(),C(t.since?7:8),c(2),C((e=t.recentChanges)?9:-1,e),c(2),P("processor",i.mdProcessor)("markdown",t.body),c(2),C(t.events.length?13:-1)}}function En(n,o){n&1&&(s(0,"div",5),f(1,"No matching features."),l())}function Pn(n,o){if(n&1){let e=T();s(0,"button",49),k("click",function(){g(e);let i=u(2);return w(i.query.set(""))}),s(1,"mat-icon"),f(2,"close"),l()()}}function In(n,o){if(n&1){let e=T();s(0,"th",50),k("click",function(){g(e);let i=u(2);return w(i.setSort("category"))})("keydown.enter",function(){g(e);let i=u(2);return w(i.setSort("category"))})("keydown.space",function(i){return g(e),u(2).setSort("category"),w(i.preventDefault())}),f(1," Category "),s(2,"mat-icon",51),f(3),l()()}if(n&2){let e=u(2);W("aria-sort",e.ariaSort("category")),c(3),R(e.sortIcon("category"))}}function Nn(n,o){if(n&1&&(s(0,"td",52)(1,"span",28),f(2),l()()),n&2){let e=o.$implicit,t=u(2);c(),re("--cat-hue",t.categoryHue(e.category)),c(),R(e.category)}}function Bn(n,o){if(n&1){let e=T();s(0,"th",50),k("click",function(){g(e);let i=u(2);return w(i.setSort("title"))})("keydown.enter",function(){g(e);let i=u(2);return w(i.setSort("title"))})("keydown.space",function(i){return g(e),u(2).setSort("title"),w(i.preventDefault())}),f(1," Feature "),s(2,"mat-icon",51),f(3),l()()}if(n&2){let e=u(2);W("aria-sort",e.ariaSort("title")),c(3),R(e.sortIcon("title"))}}function Vn(n,o){if(n&1&&(s(0,"td",52),f(1),l()),n&2){let e=o.$implicit;c(),R(e.title)}}function An(n,o){n&1&&(s(0,"th",53),f(1,"Status"),l())}function Hn(n,o){if(n&1&&(s(0,"span",55),f(1),l()),n&2){let e=u().$implicit;q("enhanced",e.latestKind==="enhanced"),c(),R(e.latestKind==="enhanced"?"Updated":"New")}}function zn(n,o){if(n&1&&(s(0,"td",52),y(1,Hn,2,3,"span",54),l()),n&2){let e=o.$implicit;c(),C(e.latestKind?1:-1)}}function Ln(n,o){if(n&1){let e=T();s(0,"th",50),k("click",function(){g(e);let i=u(2);return w(i.setSort("since"))})("keydown.enter",function(){g(e);let i=u(2);return w(i.setSort("since"))})("keydown.space",function(i){return g(e),u(2).setSort("since"),w(i.preventDefault())}),f(1," Since "),s(2,"mat-icon",51),f(3),l()()}if(n&2){let e=u(2);W("aria-sort",e.ariaSort("since")),c(3),R(e.sortIcon("since"))}}function Un(n,o){if(n&1&&(s(0,"td",52),f(1),l()),n&2){let e=o.$implicit;c(),R(e.since??"\u2014")}}function jn(n,o){n&1&&ee(0,"tr",56)}function $n(n,o){if(n&1){let e=T();s(0,"tr",57),k("click",function(){let i=g(e).$implicit,r=u(2);return w(r.select(i))}),l()}if(n&2){let e=o.$implicit,t=u(2);q("active",t.isActive(e))}}function qn(n,o){n&1&&(s(0,"div",5),f(1,"No matching features."),l())}function Qn(n,o){if(n&1){let e=T();s(0,"div",8),y(1,On,14,10,"div",9)(2,En,2,0,"div",5),l(),s(3,"div",10)(4,"mat-form-field",11)(5,"mat-icon",12),f(6,"search"),l(),s(7,"input",13),k("ngModelChange",function(i){g(e);let r=u();return w(r.query.set(i))}),l(),y(8,Pn,3,0,"button",14),l(),s(9,"div",15)(10,"table",16),K(11,17),z(12,In,4,2,"th",18)(13,Nn,3,3,"td",19),Y(),K(14,20),z(15,Bn,4,2,"th",18)(16,Vn,2,1,"td",19),Y(),K(17,21),z(18,An,2,0,"th",22)(19,zn,2,1,"td",19),Y(),K(20,23),z(21,Ln,4,2,"th",18)(22,Un,2,1,"td",19),Y(),z(23,jn,1,0,"tr",24)(24,$n,1,2,"tr",25),l(),y(25,qn,2,0,"div",5),l()()}if(n&2){let e,t=u();c(),C((e=t.activeFeature())?1:2,e),c(6),P("ngModel",t.query()),c(),C(t.query()?8:-1),c(2),P("dataSource",t.displayed()),c(13),P("matHeaderRowDef",t.columns)("matHeaderRowDefSticky",!0),c(),P("matRowDefColumns",t.columns),c(),C(t.displayed().length===0?25:-1)}}function Wn(n,o){if(n&1){let e=T();s(0,"button",61),k("click",function(i){return g(e),u(2).stepViewer(-1),w(i.stopPropagation())}),s(1,"mat-icon"),f(2,"chevron_left"),l()(),s(3,"button",62),k("click",function(i){return g(e),u(2).stepViewer(1),w(i.stopPropagation())}),s(4,"mat-icon"),f(5,"chevron_right"),l()()}}function Kn(n,o){if(n&1&&(s(0,"figcaption"),f(1),l()),n&2){let e=u();c(),R(e.alt)}}function Yn(n,o){if(n&1){let e=T();s(0,"div",58),k("click",function(){g(e);let i=u();return w(i.closeViewer())}),s(1,"button",59),k("click",function(i){return g(e),u().closeViewer(),w(i.stopPropagation())}),s(2,"mat-icon"),f(3,"close"),l()(),y(4,Wn,6,0),s(5,"figure",60),k("click",function(i){return i.stopPropagation()}),ee(6,"img",37),y(7,Kn,2,1,"figcaption"),l()()}if(n&2){let e=o,t=u();P("cdkTrapFocusAutoCapture",!0),W("aria-label",e.alt||"Image viewer"),c(4),C(t.viewerHasMultiple()?4:-1),c(2),P("src",t.resolveShot(e.url),ie)("alt",e.alt||""),c(),C(e.alt?7:-1)}}var on=class n{mdProcessor=Ot;corpus=d(Vt);dialogRef=d(dt);host=d(B);loading=j(!0);query=j("");sortColumn=j("since");sortDirection=j("desc");selectedId=j(null);all=j([]);columns=["category","title","status","since"];displayed=ae(()=>It(Bt(this.all(),this.query()),this.sortColumn(),this.sortDirection()));activeFeature=ae(()=>{let o=this.displayed(),e=this.selectedId();return o.find(t=>t.id===e)??o[0]??null});viewerIndex=j(null);viewerImage=ae(()=>{let o=this.viewerIndex(),e=this.activeFeature()?.images??[];return o===null?null:e[o]??null});viewerHasMultiple=ae(()=>(this.activeFeature()?.images.length??0)>1);constructor(){Ke(()=>{this.activeFeature(),this.resetDetailsScroll()})}ngOnInit(){return He(this,null,function*(){this.dialogRef.keydownEvents().subscribe(o=>this.handleKey(o)),this.all.set(yield this.corpus.load()),this.loading.set(!1)})}setSort(o){this.sortColumn()===o?this.sortDirection.update(e=>e==="asc"?"desc":"asc"):(this.sortColumn.set(o),this.sortDirection.set(o==="since"?"desc":"asc"))}sortIcon(o){return this.sortColumn()!==o?"":this.sortDirection()==="asc"?"arrow_upward":"arrow_downward"}ariaSort(o){return this.sortColumn()!==o?"none":this.sortDirection()==="asc"?"ascending":"descending"}select(o){this.selectedId.set(o.id)}handleKey(o){if(this.viewerIndex()!==null){o.key==="ArrowLeft"?(o.preventDefault(),this.stepViewer(-1)):o.key==="ArrowRight"?(o.preventDefault(),this.stepViewer(1)):o.key==="Escape"&&(o.preventDefault(),this.closeViewer());return}if(o.key!=="ArrowDown"&&o.key!=="ArrowUp")return;let e=this.displayed();if(e.length===0)return;o.preventDefault();let t=e.findIndex(r=>r.id===this.activeFeature()?.id),i=Nt(t,o.key,e.length);this.selectedId.set(e[i].id),requestAnimationFrame(()=>this.revealRow(i))}resetDetailsScroll(){let o=this.host.nativeElement.querySelector(".details");o&&(o.scrollTop=0)}revealRow(o){let e=this.host.nativeElement,t=e.querySelector(".table-scroll"),i=e.querySelectorAll("tr[mat-row]")[o];if(!t||!i)return;let r=e.querySelector("tr[mat-header-row]")?.offsetHeight??0,a=t.getBoundingClientRect(),m=i.getBoundingClientRect(),h=a.top+r;m.top<h?t.scrollTop-=h-m.top:m.bottom>a.bottom&&(t.scrollTop+=m.bottom-a.bottom)}scrollToHistory(){this.host.nativeElement.querySelector(".pr-history")?.scrollIntoView({behavior:"smooth",block:"start"})}isActive(o){return this.activeFeature()?.id===o.id}sinceLabel(o){return o.since?`${o.latestKind==="enhanced"?"Updated":"New"} in ${o.since}`:"Unreleased"}categoryHue(o){return this.corpus.hueFor(o)}prUrl(o){return`https://github.com/SignalK/freeboard-sk/pull/${o}`}resolveShot(o){return/^(https?:|data:)/i.test(o)?o:`assets/features/${o.replace(/^\/+/,"")}`}openViewer(o){let t=(this.activeFeature()?.images??[]).findIndex(i=>i.url===o);t<0||(this.dialogRef.disableClose=!0,this.viewerIndex.set(t))}closeViewer(){this.viewerIndex.set(null),this.dialogRef.disableClose=!1}stepViewer(o){let e=this.activeFeature()?.images??[],t=this.viewerIndex();t===null||e.length===0||this.viewerIndex.set((t+o+e.length)%e.length)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=V({type:n,selectors:[["fb-feature-browser"]],decls:14,vars:2,consts:[[1,"feature-browser"],[1,"icon-accent"],[1,"title"],[1,"spacer"],["mat-icon-button","","aria-label","Close","matTooltip","Close",3,"click"],[1,"empty"],["role","dialog","aria-modal","true","cdkTrapFocus","",1,"viewer",3,"cdkTrapFocusAutoCapture"],[1,"empty-icon"],[1,"details"],[1,"details-flow"],[1,"list"],["appearance","outline","subscriptSizing","dynamic",1,"search"],["matPrefix",""],["matInput","","placeholder","Search features",3,"ngModelChange","ngModel"],["matSuffix","","mat-icon-button","","aria-label","Clear search"],[1,"table-scroll"],["mat-table","",3,"dataSource"],["matColumnDef","category"],["mat-header-cell","","tabindex","0",3,"click","keydown.enter","keydown.space",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","title"],["matColumnDef","status"],["mat-header-cell","",4,"matHeaderCellDef"],["matColumnDef","since"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",3,"active","click",4,"matRowDef","matRowDefColumns"],["role","button","tabindex","0",1,"shot","lead"],[1,"meta"],[1,"cat-chip"],[1,"since-badge",3,"enhanced"],[1,"since"],[1,"whats-new"],[1,"body"],[3,"processor","markdown"],["remarkTemplate","image"],[1,"pr-history"],["role","button","tabindex","0",1,"shot","lead",3,"click","keydown.enter","keydown.space"],[3,"src","alt"],[1,"since-badge"],[1,"whats-new-title"],["type","button",1,"whats-new-more"],["type","button",1,"whats-new-more",3,"click"],["role","button","tabindex","0",1,"shot",3,"click","keydown.enter","keydown.space"],[1,"pr-history-title"],[1,"pr-table"],[1,"pr-date"],[1,"pr-num"],["target","_blank","rel","noopener",3,"href"],[1,"pr-title"],["matSuffix","","mat-icon-button","","aria-label","Clear search",3,"click"],["mat-header-cell","","tabindex","0",3,"click","keydown.enter","keydown.space"],[1,"sort"],["mat-cell",""],["mat-header-cell",""],[1,"kind-badge",3,"enhanced"],[1,"kind-badge"],["mat-header-row",""],["mat-row","",3,"click"],["role","dialog","aria-modal","true","cdkTrapFocus","",1,"viewer",3,"click","cdkTrapFocusAutoCapture"],["mat-icon-button","","aria-label","Close image viewer",1,"viewer-btn","viewer-close",3,"click"],[1,"viewer-figure",3,"click"],["mat-icon-button","","aria-label","Previous image",1,"viewer-btn","viewer-prev",3,"click"],["mat-icon-button","","aria-label","Next image",1,"viewer-btn","viewer-next",3,"click"]],template:function(e,t){if(e&1&&(s(0,"div",0)(1,"mat-toolbar")(2,"mat-icon",1),f(3,"tips_and_updates"),l(),s(4,"span",2),f(5,"What's New"),l(),ee(6,"span",3),s(7,"button",4),k("click",function(){return t.dialogRef.close()}),s(8,"mat-icon"),f(9,"close"),l()()(),y(10,gn,2,0,"div",5)(11,wn,5,0,"div",5)(12,Qn,26,8),y(13,Yn,8,6,"div",6),l()),e&2){let i;c(10),C(t.loading()?10:t.all().length===0?11:12),c(3),C((i=t.viewerImage())?13:-1,i)}},dependencies:[Ct,gt,wt,yt,ut,Tt,Ft,ft,mt,_t,ht,Rt,kt,xt,bt,Mt,St,nn,Qt,Kt,Zt,Yt,Wt,Jt,Xt,Gt,en,tn,Dt,vt,ct,lt,Pt,Et,Je],styles:[".feature-browser[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;width:100%;height:72vh;max-height:680px}mat-toolbar[_ngcontent-%COMP%]{min-height:48px;height:48px;gap:8px;border-bottom:1px solid var(--mat-sys-outline-variant, #e0e0e0)}mat-toolbar[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-size:1rem;font-weight:500}.spacer[_ngcontent-%COMP%]{flex:1 1 auto}.details[_ngcontent-%COMP%]{flex:1 1 55%;overflow:auto;padding:20px 20px 16px;min-height:0}.details[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin:0 0 10px;font-size:1.3rem;font-weight:500;line-height:1.2}.details[_ngcontent-%COMP%] .meta[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;margin-bottom:14px}.details-flow[_ngcontent-%COMP%]{display:flow-root}.details[_ngcontent-%COMP%] .body[_ngcontent-%COMP%]{line-height:1.6}figure.shot[_ngcontent-%COMP%]{float:right;clear:right;width:46%;max-width:300px;margin:2px 0 12px 16px;cursor:pointer}figure.shot.lead[_ngcontent-%COMP%]{margin-top:0}figure.shot[_ngcontent-%COMP%]:focus-visible, th[mat-header-cell][_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--mat-sys-primary, #415f91);outline-offset:2px}figure.shot[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{display:block;width:100%;height:auto;border-radius:8px;border:1px solid var(--mat-sys-outline-variant, #d8dae0);box-shadow:0 1px 6px #00000024}figure.shot[_ngcontent-%COMP%] figcaption[_ngcontent-%COMP%]{margin-top:4px;font-size:.75rem;font-style:italic;text-align:center;color:var(--mat-sys-on-surface-variant, #6b7079)}.details[_ngcontent-%COMP%] .body[_ngcontent-%COMP%] [_ngcontent-%COMP%]:first-child{margin-top:0}.cat-chip[_ngcontent-%COMP%]{display:inline-block;padding:2px 10px;border-radius:11px;font-size:.72rem;font-weight:500;line-height:1.5;white-space:nowrap;background:hsl(var(--cat-hue, 210) 58% 90%);color:hsl(var(--cat-hue, 210) 42% 30%)}.since-badge[_ngcontent-%COMP%]{font-size:.72rem;font-weight:500;padding:2px 10px;border-radius:11px;white-space:nowrap;background:#e4f4e8;color:#1b5e20}.since-badge.enhanced[_ngcontent-%COMP%]{background:#e2eefc;color:#0d47a1}.details[_ngcontent-%COMP%] .since[_ngcontent-%COMP%]{font-size:.8rem;opacity:.7}.whats-new[_ngcontent-%COMP%]{display:flow-root;margin:0 0 14px;padding:8px 12px;border-radius:8px;border-left:3px solid var(--mat-sys-primary, #415f91);background:var(--mat-sys-primary-container, #d7e2ff);color:var(--mat-sys-on-primary-container, #274777)}.whats-new-title[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px;font-size:.72rem;font-weight:600;letter-spacing:.02em;text-transform:uppercase}.whats-new-title[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:16px;width:16px;height:16px}.whats-new[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{margin:5px 0 0;padding-left:20px;font-size:.85rem;line-height:1.5}.whats-new-more[_ngcontent-%COMP%]{margin-top:5px;padding:0;border:0;background:none;font:inherit;font-size:.8rem;color:inherit;text-decoration:underline;cursor:pointer}.pr-history[_ngcontent-%COMP%]{display:flow-root;margin-top:18px;padding-top:12px;border-top:1px solid var(--mat-sys-outline-variant, #e0e0e0)}.pr-history-title[_ngcontent-%COMP%]{font-size:.72rem;font-weight:600;letter-spacing:.02em;text-transform:uppercase;color:var(--mat-sys-on-surface-variant, #565a63);margin-bottom:6px}.pr-table[_ngcontent-%COMP%]{width:100%;border-collapse:collapse;font-size:.85rem}.pr-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:4px 10px 4px 0;vertical-align:top;border-bottom:1px solid var(--mat-sys-outline-variant, #f0f0f0)}.pr-table[_ngcontent-%COMP%] .pr-date[_ngcontent-%COMP%]{white-space:nowrap;width:1%;color:var(--mat-sys-on-surface-variant, #6b7079)}.pr-table[_ngcontent-%COMP%] .pr-num[_ngcontent-%COMP%]{white-space:nowrap;width:1%}.pr-table[_ngcontent-%COMP%] .pr-num[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:var(--mat-sys-primary, #415f91);text-decoration:none;font-weight:500}.pr-table[_ngcontent-%COMP%] .pr-num[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{text-decoration:underline}.pr-table[_ngcontent-%COMP%] .pr-title[_ngcontent-%COMP%]{width:100%}.list[_ngcontent-%COMP%]{flex:1 1 45%;display:flex;flex-direction:column;min-height:0;border-top:1px solid var(--mat-sys-outline-variant, #e0e0e0)}.list[_ngcontent-%COMP%] .search[_ngcontent-%COMP%]{margin:8px 14px 0}.list[_ngcontent-%COMP%] .search[_ngcontent-%COMP%] .mat-mdc-text-field-wrapper{padding-top:0;padding-bottom:0}.list[_ngcontent-%COMP%] .search[_ngcontent-%COMP%] .mat-mdc-form-field-infix{min-height:38px;padding-top:7px;padding-bottom:7px}.list[_ngcontent-%COMP%] .search[_ngcontent-%COMP%] input.mat-mdc-input-element{font-size:.875rem}.table-scroll[_ngcontent-%COMP%]{flex:1 1 auto;overflow:auto}table[_ngcontent-%COMP%]{width:100%;background:transparent}tr[mat-row][_ngcontent-%COMP%], tr[mat-header-row][_ngcontent-%COMP%]{height:42px}td[mat-cell][_ngcontent-%COMP%], th[mat-header-cell][_ngcontent-%COMP%]{padding-top:4px;padding-bottom:4px;border-bottom-color:var(--mat-sys-outline-variant, #eee)}th[mat-header-cell][_ngcontent-%COMP%]{cursor:pointer;-webkit-user-select:none;user-select:none;white-space:nowrap;font-weight:600;font-size:.72rem;letter-spacing:.02em;text-transform:uppercase;color:var(--mat-sys-on-surface-variant, #565a63);background-color:var(--mat-sys-surface, #fff)}.sort[_ngcontent-%COMP%]{font-size:16px;height:16px;width:16px;vertical-align:middle;opacity:.7}tr[mat-row][_ngcontent-%COMP%]{cursor:pointer;transition:background-color .12s ease}tr[mat-row][_ngcontent-%COMP%]:hover td[_ngcontent-%COMP%]{background:#415f9112}tr[mat-row].active[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{background:var(--mat-sys-primary-container, #d7e2ff);color:var(--mat-sys-on-primary-container, #274777);font-weight:500}tr[mat-row].active[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:first-child{box-shadow:inset 3px 0 0 0 var(--mat-sys-primary, #415f91)}.kind-badge[_ngcontent-%COMP%]{display:inline-block;padding:1px 9px;border-radius:10px;font-size:.7rem;font-weight:500;white-space:nowrap;background:#e4f4e8;color:#1b5e20}.kind-badge.enhanced[_ngcontent-%COMP%]{background:#e2eefc;color:#0d47a1}.empty[_ngcontent-%COMP%]{padding:32px 16px;text-align:center;opacity:.7}.empty[_ngcontent-%COMP%] .empty-icon[_ngcontent-%COMP%]{font-size:40px;height:40px;width:40px;opacity:.5}.viewer[_ngcontent-%COMP%]{position:absolute;inset:0;z-index:1000;display:flex;align-items:center;justify-content:center;padding:44px;background:#000000d1}.viewer-figure[_ngcontent-%COMP%]{margin:0;max-width:100%;max-height:100%;display:flex;flex-direction:column;align-items:center}.viewer-figure[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:100%;max-height:78vh;object-fit:contain;border-radius:4px;box-shadow:0 6px 28px #0000008c}.viewer-figure[_ngcontent-%COMP%] figcaption[_ngcontent-%COMP%]{margin-top:12px;color:#fff;font-size:.85rem;text-align:center}.viewer-btn[_ngcontent-%COMP%]{position:absolute;color:#fff}.viewer-close[_ngcontent-%COMP%]{top:6px;right:6px}.viewer-prev[_ngcontent-%COMP%]{top:50%;left:6px;transform:translateY(-50%)}.viewer-next[_ngcontent-%COMP%]{top:50%;right:6px;transform:translateY(-50%)}.dark-theme[_nghost-%COMP%], .dark-theme [_nghost-%COMP%]{--mat-sys-surface: #181211;--mat-sys-on-surface: #ede0dd;--mat-sys-on-surface-variant: #cabfbc;--mat-sys-outline-variant: #4a4340;--mat-sys-primary: #adc6ff;--mat-sys-primary-container: #2b3b57;--mat-sys-on-primary-container: #d7e2ff}.dark-theme[_nghost-%COMP%] .feature-browser[_ngcontent-%COMP%], .dark-theme [_nghost-%COMP%] .feature-browser[_ngcontent-%COMP%]{color:var(--mat-sys-on-surface)}.dark-theme[_nghost-%COMP%] .details[_ngcontent-%COMP%] .body[_ngcontent-%COMP%] a, .dark-theme [_nghost-%COMP%] .details[_ngcontent-%COMP%] .body[_ngcontent-%COMP%] a{color:var(--mat-sys-primary)}"]})};export{on as FeatureBrowserDialog};
181
+ `],encapsulation:2})}return n})(),Wt=(()=>{class n extends ge{static \u0275fac=(()=>{let e;return function(i){return(e||(e=E(n)))(i||n)}})();static \u0275dir=p({type:n,selectors:[["","matCellDef",""]],features:[I([{provide:ge,useExisting:n}]),b]})}return n})(),Kt=(()=>{class n extends we{static \u0275fac=(()=>{let e;return function(i){return(e||(e=E(n)))(i||n)}})();static \u0275dir=p({type:n,selectors:[["","matHeaderCellDef",""]],features:[I([{provide:we,useExisting:n}]),b]})}return n})();var Yt=(()=>{class n extends ne{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=E(n)))(i||n)}})();static \u0275dir=p({type:n,selectors:[["","matColumnDef",""]],inputs:{name:[0,"matColumnDef","name"]},features:[I([{provide:ne,useExisting:n}]),b]})}return n})(),Xt=(()=>{class n extends Ut{static \u0275fac=(()=>{let e;return function(i){return(e||(e=E(n)))(i||n)}})();static \u0275dir=p({type:n,selectors:[["mat-header-cell"],["th","mat-header-cell",""]],hostAttrs:["role","columnheader",1,"mat-mdc-header-cell","mdc-data-table__header-cell"],features:[b]})}return n})();var Gt=(()=>{class n extends jt{static \u0275fac=(()=>{let e;return function(i){return(e||(e=E(n)))(i||n)}})();static \u0275dir=p({type:n,selectors:[["mat-cell"],["td","mat-cell",""]],hostAttrs:[1,"mat-mdc-cell","mdc-data-table__cell"],features:[b]})}return n})();var Zt=(()=>{class n extends le{static \u0275fac=(()=>{let e;return function(i){return(e||(e=E(n)))(i||n)}})();static \u0275dir=p({type:n,selectors:[["","matHeaderRowDef",""]],inputs:{columns:[0,"matHeaderRowDef","columns"],sticky:[2,"matHeaderRowDefSticky","sticky",A]},features:[I([{provide:le,useExisting:n}]),b]})}return n})();var Jt=(()=>{class n extends ye{static \u0275fac=(()=>{let e;return function(i){return(e||(e=E(n)))(i||n)}})();static \u0275dir=p({type:n,selectors:[["","matRowDef",""]],inputs:{columns:[0,"matRowDefColumns","columns"],when:[0,"matRowDefWhen","when"]},features:[I([{provide:ye,useExisting:n}]),b]})}return n})(),en=(()=>{class n extends Fe{static \u0275fac=(()=>{let e;return function(i){return(e||(e=E(n)))(i||n)}})();static \u0275cmp=V({type:n,selectors:[["mat-header-row"],["tr","mat-header-row",""]],hostAttrs:["role","row",1,"mat-mdc-header-row","mdc-data-table__header-row"],exportAs:["matHeaderRow"],features:[I([{provide:Fe,useExisting:n}]),b],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(t,i){t&1&&S(0,0)},dependencies:[G],encapsulation:2})}return n})();var tn=(()=>{class n extends Te{static \u0275fac=(()=>{let e;return function(i){return(e||(e=E(n)))(i||n)}})();static \u0275cmp=V({type:n,selectors:[["mat-row"],["tr","mat-row",""]],hostAttrs:["role","row",1,"mat-mdc-row","mdc-data-table__row"],exportAs:["matRow"],features:[I([{provide:Te,useExisting:n}]),b],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(t,i){t&1&&S(0,0)},dependencies:[G],encapsulation:2})}return n})();var nn=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275mod=me({type:n});static \u0275inj=de({imports:[qt,ot]})}return n})();function gn(n,o){n&1&&(s(0,"div",5),f(1,"Loading\u2026"),l())}function wn(n,o){n&1&&(s(0,"div",5)(1,"mat-icon",7),f(2,"tips_and_updates"),l(),s(3,"p"),f(4,"No features have been documented yet."),l()())}function yn(n,o){if(n&1&&(s(0,"figcaption"),f(1),l()),n&2){let e=u(2);c(),R(e.images[0].alt)}}function Cn(n,o){if(n&1){let e=T();s(0,"figure",36),k("click",function(){g(e);let i=u(),r=u(2);return w(r.openViewer(i.images[0].url))})("keydown.enter",function(){g(e);let i=u(),r=u(2);return w(r.openViewer(i.images[0].url))})("keydown.space",function(i){g(e);let r=u();return u(2).openViewer(r.images[0].url),w(i.preventDefault())}),ee(1,"img",37),y(2,yn,2,1,"figcaption"),l()}if(n&2){let e=u(),t=u(2);W("aria-label","Enlarge "+(e.images[0].alt||"screenshot")),c(),P("src",t.resolveShot(e.images[0].url),ie)("alt",e.images[0].alt||""),c(),C(e.images[0].alt?2:-1)}}function vn(n,o){if(n&1&&(s(0,"span",38),f(1),l()),n&2){let e=u(),t=u(2);q("enhanced",e.latestKind==="enhanced"),c(),X(" ",t.sinceLabel(e)," ")}}function Dn(n,o){n&1&&(s(0,"span",30),f(1,"Unreleased"),l())}function xn(n,o){if(n&1&&(s(0,"li"),f(1),l()),n&2){let e=o.$implicit;c(),R(e)}}function bn(n,o){if(n&1){let e=T();s(0,"button",41),k("click",function(){g(e);let i=u(4);return w(i.scrollToHistory())}),f(1),l()}if(n&2){let e=u();c(),X(" +",e.more," more ")}}function kn(n,o){if(n&1&&(s(0,"div",31)(1,"div",39)(2,"mat-icon"),f(3,"tips_and_updates"),l(),s(4,"span"),f(5),l()(),s(6,"ul"),xe(7,xn,2,1,"li",null,De),l(),y(9,bn,2,1,"button",40),l()),n&2){let e=o;c(5),R(e.label),c(2),be(e.shown),c(2),C(e.more?9:-1)}}function Rn(n,o){if(n&1&&(s(0,"figcaption"),f(1),l()),n&2){let e=u().$implicit;c(),R(e.alt)}}function Sn(n,o){if(n&1){let e=T();s(0,"figure",42),k("click",function(){let i=g(e).$implicit,r=u(3);return w(r.openViewer(i.url))})("keydown.enter",function(){let i=g(e).$implicit,r=u(3);return w(r.openViewer(i.url))})("keydown.space",function(i){let r=g(e).$implicit;return u(3).openViewer(r.url),w(i.preventDefault())}),ee(1,"img",37),y(2,Rn,2,1,"figcaption"),l()}if(n&2){let e=o.$implicit,t=u(3);W("aria-label","Enlarge "+(e.alt||"screenshot")),c(),P("src",t.resolveShot(e.url),ie)("alt",e.alt||""),c(),C(e.alt?2:-1)}}function Mn(n,o){if(n&1&&(s(0,"a",47),f(1),l()),n&2){let e=o,t=u(5);P("href",t.prUrl(e),ie),c(),X("#",e)}}function Fn(n,o){if(n&1&&(s(0,"tr")(1,"td",45),f(2),Ye(3,"date"),l(),s(4,"td",46),y(5,Mn,2,2,"a",47),l(),s(6,"td",48),f(7),l()()),n&2){let e,t=o.$implicit;c(2),X(" ",t.date?Xe(3,3,t.date,"mediumDate"):""," "),c(3),C((e=t.pr)?5:-1,e),c(2),R(t.title)}}function Tn(n,o){if(n&1&&(s(0,"div",35)(1,"div",43),f(2,"History"),l(),s(3,"table",44),xe(4,Fn,8,6,"tr",null,De),l()()),n&2){let e=u();c(4),be(e.events)}}function On(n,o){if(n&1&&(s(0,"div",9),y(1,Cn,3,4,"figure",26),s(2,"h2"),f(3),l(),s(4,"div",27)(5,"span",28),f(6),l(),y(7,vn,2,3,"span",29)(8,Dn,2,0,"span",30),l(),y(9,kn,10,2,"div",31),s(10,"div",32)(11,"remark",33),z(12,Sn,3,4,"ng-template",34),l()(),y(13,Tn,6,0,"div",35),l()),n&2){let e,t=o,i=u(2);c(),C(t.images.length?1:-1),c(2),R(t.title),c(2),re("--cat-hue",i.categoryHue(t.category)),c(),R(t.category),c(),C(t.since?7:8),c(2),C((e=t.recentChanges)?9:-1,e),c(2),P("processor",i.mdProcessor)("markdown",t.body),c(2),C(t.events.length?13:-1)}}function En(n,o){n&1&&(s(0,"div",5),f(1,"No matching features."),l())}function Pn(n,o){if(n&1){let e=T();s(0,"button",49),k("click",function(){g(e);let i=u(2);return w(i.query.set(""))}),s(1,"mat-icon"),f(2,"close"),l()()}}function In(n,o){if(n&1){let e=T();s(0,"th",50),k("click",function(){g(e);let i=u(2);return w(i.setSort("category"))})("keydown.enter",function(){g(e);let i=u(2);return w(i.setSort("category"))})("keydown.space",function(i){return g(e),u(2).setSort("category"),w(i.preventDefault())}),f(1," Category "),s(2,"mat-icon",51),f(3),l()()}if(n&2){let e=u(2);W("aria-sort",e.ariaSort("category")),c(3),R(e.sortIcon("category"))}}function Nn(n,o){if(n&1&&(s(0,"td",52)(1,"span",28),f(2),l()()),n&2){let e=o.$implicit,t=u(2);c(),re("--cat-hue",t.categoryHue(e.category)),c(),R(e.category)}}function Bn(n,o){if(n&1){let e=T();s(0,"th",50),k("click",function(){g(e);let i=u(2);return w(i.setSort("title"))})("keydown.enter",function(){g(e);let i=u(2);return w(i.setSort("title"))})("keydown.space",function(i){return g(e),u(2).setSort("title"),w(i.preventDefault())}),f(1," Feature "),s(2,"mat-icon",51),f(3),l()()}if(n&2){let e=u(2);W("aria-sort",e.ariaSort("title")),c(3),R(e.sortIcon("title"))}}function Vn(n,o){if(n&1&&(s(0,"td",52),f(1),l()),n&2){let e=o.$implicit;c(),R(e.title)}}function An(n,o){n&1&&(s(0,"th",53),f(1,"Status"),l())}function Hn(n,o){if(n&1&&(s(0,"span",55),f(1),l()),n&2){let e=u().$implicit;q("enhanced",e.latestKind==="enhanced"),c(),R(e.latestKind==="enhanced"?"Updated":"New")}}function zn(n,o){if(n&1&&(s(0,"td",52),y(1,Hn,2,3,"span",54),l()),n&2){let e=o.$implicit;c(),C(e.latestKind?1:-1)}}function Ln(n,o){if(n&1){let e=T();s(0,"th",50),k("click",function(){g(e);let i=u(2);return w(i.setSort("since"))})("keydown.enter",function(){g(e);let i=u(2);return w(i.setSort("since"))})("keydown.space",function(i){return g(e),u(2).setSort("since"),w(i.preventDefault())}),f(1," Since "),s(2,"mat-icon",51),f(3),l()()}if(n&2){let e=u(2);W("aria-sort",e.ariaSort("since")),c(3),R(e.sortIcon("since"))}}function Un(n,o){if(n&1&&(s(0,"td",52),f(1),l()),n&2){let e=o.$implicit;c(),R(e.since??"\u2014")}}function jn(n,o){n&1&&ee(0,"tr",56)}function $n(n,o){if(n&1){let e=T();s(0,"tr",57),k("click",function(){let i=g(e).$implicit,r=u(2);return w(r.select(i))}),l()}if(n&2){let e=o.$implicit,t=u(2);q("active",t.isActive(e))}}function qn(n,o){n&1&&(s(0,"div",5),f(1,"No matching features."),l())}function Qn(n,o){if(n&1){let e=T();s(0,"div",8),y(1,On,14,10,"div",9)(2,En,2,0,"div",5),l(),s(3,"div",10)(4,"mat-form-field",11)(5,"mat-icon",12),f(6,"search"),l(),s(7,"input",13),k("ngModelChange",function(i){g(e);let r=u();return w(r.query.set(i))}),l(),y(8,Pn,3,0,"button",14),l(),s(9,"div",15)(10,"table",16),K(11,17),z(12,In,4,2,"th",18)(13,Nn,3,3,"td",19),Y(),K(14,20),z(15,Bn,4,2,"th",18)(16,Vn,2,1,"td",19),Y(),K(17,21),z(18,An,2,0,"th",22)(19,zn,2,1,"td",19),Y(),K(20,23),z(21,Ln,4,2,"th",18)(22,Un,2,1,"td",19),Y(),z(23,jn,1,0,"tr",24)(24,$n,1,2,"tr",25),l(),y(25,qn,2,0,"div",5),l()()}if(n&2){let e,t=u();c(),C((e=t.activeFeature())?1:2,e),c(6),P("ngModel",t.query()),c(),C(t.query()?8:-1),c(2),P("dataSource",t.displayed()),c(13),P("matHeaderRowDef",t.columns)("matHeaderRowDefSticky",!0),c(),P("matRowDefColumns",t.columns),c(),C(t.displayed().length===0?25:-1)}}function Wn(n,o){if(n&1){let e=T();s(0,"button",61),k("click",function(i){return g(e),u(2).stepViewer(-1),w(i.stopPropagation())}),s(1,"mat-icon"),f(2,"chevron_left"),l()(),s(3,"button",62),k("click",function(i){return g(e),u(2).stepViewer(1),w(i.stopPropagation())}),s(4,"mat-icon"),f(5,"chevron_right"),l()()}}function Kn(n,o){if(n&1&&(s(0,"figcaption"),f(1),l()),n&2){let e=u();c(),R(e.alt)}}function Yn(n,o){if(n&1){let e=T();s(0,"div",58),k("click",function(){g(e);let i=u();return w(i.closeViewer())}),s(1,"button",59),k("click",function(i){return g(e),u().closeViewer(),w(i.stopPropagation())}),s(2,"mat-icon"),f(3,"close"),l()(),y(4,Wn,6,0),s(5,"figure",60),k("click",function(i){return i.stopPropagation()}),ee(6,"img",37),y(7,Kn,2,1,"figcaption"),l()()}if(n&2){let e=o,t=u();P("cdkTrapFocusAutoCapture",!0),W("aria-label",e.alt||"Image viewer"),c(4),C(t.viewerHasMultiple()?4:-1),c(2),P("src",t.resolveShot(e.url),ie)("alt",e.alt||""),c(),C(e.alt?7:-1)}}var on=class n{mdProcessor=Ot;corpus=d(Vt);dialogRef=d(dt);host=d(B);loading=j(!0);query=j("");sortColumn=j("since");sortDirection=j("desc");selectedId=j(null);all=j([]);columns=["category","title","status","since"];displayed=ae(()=>It(Bt(this.all(),this.query()),this.sortColumn(),this.sortDirection()));activeFeature=ae(()=>{let o=this.displayed(),e=this.selectedId();return o.find(t=>t.id===e)??o[0]??null});viewerIndex=j(null);viewerImage=ae(()=>{let o=this.viewerIndex(),e=this.activeFeature()?.images??[];return o===null?null:e[o]??null});viewerHasMultiple=ae(()=>(this.activeFeature()?.images.length??0)>1);constructor(){Ke(()=>{this.activeFeature(),this.resetDetailsScroll()})}ngOnInit(){return He(this,null,function*(){this.dialogRef.keydownEvents().subscribe(o=>this.handleKey(o)),this.all.set(yield this.corpus.load()),this.loading.set(!1)})}setSort(o){this.sortColumn()===o?this.sortDirection.update(e=>e==="asc"?"desc":"asc"):(this.sortColumn.set(o),this.sortDirection.set(o==="since"?"desc":"asc"))}sortIcon(o){return this.sortColumn()!==o?"":this.sortDirection()==="asc"?"arrow_upward":"arrow_downward"}ariaSort(o){return this.sortColumn()!==o?"none":this.sortDirection()==="asc"?"ascending":"descending"}select(o){this.selectedId.set(o.id)}handleKey(o){if(this.viewerIndex()!==null){o.key==="ArrowLeft"?(o.preventDefault(),this.stepViewer(-1)):o.key==="ArrowRight"?(o.preventDefault(),this.stepViewer(1)):o.key==="Escape"&&(o.preventDefault(),this.closeViewer());return}if(o.key!=="ArrowDown"&&o.key!=="ArrowUp")return;let e=this.displayed();if(e.length===0)return;o.preventDefault();let t=e.findIndex(r=>r.id===this.activeFeature()?.id),i=Nt(t,o.key,e.length);this.selectedId.set(e[i].id),requestAnimationFrame(()=>this.revealRow(i))}resetDetailsScroll(){let o=this.host.nativeElement.querySelector(".details");o&&(o.scrollTop=0)}revealRow(o){let e=this.host.nativeElement,t=e.querySelector(".table-scroll"),i=e.querySelectorAll("tr[mat-row]")[o];if(!t||!i)return;let r=e.querySelector("tr[mat-header-row]")?.offsetHeight??0,a=t.getBoundingClientRect(),m=i.getBoundingClientRect(),h=a.top+r;m.top<h?t.scrollTop-=h-m.top:m.bottom>a.bottom&&(t.scrollTop+=m.bottom-a.bottom)}scrollToHistory(){this.host.nativeElement.querySelector(".pr-history")?.scrollIntoView({behavior:"smooth",block:"start"})}isActive(o){return this.activeFeature()?.id===o.id}sinceLabel(o){return o.since?`${o.latestKind==="enhanced"?"Updated":"New"} in ${o.since}`:"Unreleased"}categoryHue(o){return this.corpus.hueFor(o)}prUrl(o){return`https://github.com/SignalK/freeboard-sk/pull/${o}`}resolveShot(o){return/^(https?:|data:)/i.test(o)?o:`assets/features/${o.replace(/^\/+/,"")}`}openViewer(o){let t=(this.activeFeature()?.images??[]).findIndex(i=>i.url===o);t<0||(this.dialogRef.disableClose=!0,this.viewerIndex.set(t))}closeViewer(){this.viewerIndex.set(null),this.dialogRef.disableClose=!1}stepViewer(o){let e=this.activeFeature()?.images??[],t=this.viewerIndex();t===null||e.length===0||this.viewerIndex.set((t+o+e.length)%e.length)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=V({type:n,selectors:[["fb-feature-browser"]],decls:14,vars:2,consts:[[1,"feature-browser"],[1,"icon-accent"],[1,"title"],[1,"spacer"],["mat-icon-button","","aria-label","Close","matTooltip","Close",3,"click"],[1,"empty"],["role","dialog","aria-modal","true","cdkTrapFocus","",1,"viewer",3,"cdkTrapFocusAutoCapture"],[1,"empty-icon"],[1,"details"],[1,"details-flow"],[1,"list"],["appearance","outline","subscriptSizing","dynamic",1,"search"],["matPrefix",""],["matInput","","placeholder","Search features",3,"ngModelChange","ngModel"],["matSuffix","","mat-icon-button","","aria-label","Clear search"],[1,"table-scroll"],["mat-table","",3,"dataSource"],["matColumnDef","category"],["mat-header-cell","","tabindex","0",3,"click","keydown.enter","keydown.space",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","title"],["matColumnDef","status"],["mat-header-cell","",4,"matHeaderCellDef"],["matColumnDef","since"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",3,"active","click",4,"matRowDef","matRowDefColumns"],["role","button","tabindex","0",1,"shot","lead"],[1,"meta"],[1,"cat-chip"],[1,"since-badge",3,"enhanced"],[1,"since"],[1,"whats-new"],[1,"body"],[3,"processor","markdown"],["remarkTemplate","image"],[1,"pr-history"],["role","button","tabindex","0",1,"shot","lead",3,"click","keydown.enter","keydown.space"],[3,"src","alt"],[1,"since-badge"],[1,"whats-new-title"],["type","button",1,"whats-new-more"],["type","button",1,"whats-new-more",3,"click"],["role","button","tabindex","0",1,"shot",3,"click","keydown.enter","keydown.space"],[1,"pr-history-title"],[1,"pr-table"],[1,"pr-date"],[1,"pr-num"],["target","_blank","rel","noopener",3,"href"],[1,"pr-title"],["matSuffix","","mat-icon-button","","aria-label","Clear search",3,"click"],["mat-header-cell","","tabindex","0",3,"click","keydown.enter","keydown.space"],[1,"sort"],["mat-cell",""],["mat-header-cell",""],[1,"kind-badge",3,"enhanced"],[1,"kind-badge"],["mat-header-row",""],["mat-row","",3,"click"],["role","dialog","aria-modal","true","cdkTrapFocus","",1,"viewer",3,"click","cdkTrapFocusAutoCapture"],["mat-icon-button","","aria-label","Close image viewer",1,"viewer-btn","viewer-close",3,"click"],[1,"viewer-figure",3,"click"],["mat-icon-button","","aria-label","Previous image",1,"viewer-btn","viewer-prev",3,"click"],["mat-icon-button","","aria-label","Next image",1,"viewer-btn","viewer-next",3,"click"]],template:function(e,t){if(e&1&&(s(0,"div",0)(1,"mat-toolbar")(2,"mat-icon",1),f(3,"tips_and_updates"),l(),s(4,"span",2),f(5,"What's New"),l(),ee(6,"span",3),s(7,"button",4),k("click",function(){return t.dialogRef.close()}),s(8,"mat-icon"),f(9,"close"),l()()(),y(10,gn,2,0,"div",5)(11,wn,5,0,"div",5)(12,Qn,26,8),y(13,Yn,8,6,"div",6),l()),e&2){let i;c(10),C(t.loading()?10:t.all().length===0?11:12),c(3),C((i=t.viewerImage())?13:-1,i)}},dependencies:[yt,pt,gt,wt,ut,Ft,Mt,_t,ht,ft,mt,xt,Dt,Ct,vt,kt,bt,nn,Qt,Kt,Zt,Yt,Wt,Jt,Xt,Gt,en,tn,Tt,St,ct,lt,Pt,Et,Je],styles:[".feature-browser[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;width:100%;height:72vh;max-height:680px}mat-toolbar[_ngcontent-%COMP%]{min-height:48px;height:48px;gap:8px;border-bottom:1px solid var(--mat-sys-outline-variant, #e0e0e0)}mat-toolbar[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-size:1rem;font-weight:500}.spacer[_ngcontent-%COMP%]{flex:1 1 auto}.details[_ngcontent-%COMP%]{flex:1 1 55%;overflow:auto;padding:20px 20px 16px;min-height:0}.details[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin:0 0 10px;font-size:1.3rem;font-weight:500;line-height:1.2}.details[_ngcontent-%COMP%] .meta[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;margin-bottom:14px}.details-flow[_ngcontent-%COMP%]{display:flow-root}.details[_ngcontent-%COMP%] .body[_ngcontent-%COMP%]{line-height:1.6}figure.shot[_ngcontent-%COMP%]{float:right;clear:right;width:46%;max-width:300px;margin:2px 0 12px 16px;cursor:pointer}figure.shot.lead[_ngcontent-%COMP%]{margin-top:0}figure.shot[_ngcontent-%COMP%]:focus-visible, th[mat-header-cell][_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--mat-sys-primary, #415f91);outline-offset:2px}figure.shot[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{display:block;width:100%;height:auto;border-radius:8px;border:1px solid var(--mat-sys-outline-variant, #d8dae0);box-shadow:0 1px 6px #00000024}figure.shot[_ngcontent-%COMP%] figcaption[_ngcontent-%COMP%]{margin-top:4px;font-size:.75rem;font-style:italic;text-align:center;color:var(--mat-sys-on-surface-variant, #6b7079)}.details[_ngcontent-%COMP%] .body[_ngcontent-%COMP%] [_ngcontent-%COMP%]:first-child{margin-top:0}.cat-chip[_ngcontent-%COMP%]{display:inline-block;padding:2px 10px;border-radius:11px;font-size:.72rem;font-weight:500;line-height:1.5;white-space:nowrap;background:hsl(var(--cat-hue, 210) 58% 90%);color:hsl(var(--cat-hue, 210) 42% 30%)}.since-badge[_ngcontent-%COMP%]{font-size:.72rem;font-weight:500;padding:2px 10px;border-radius:11px;white-space:nowrap;background:#e4f4e8;color:#1b5e20}.since-badge.enhanced[_ngcontent-%COMP%]{background:#e2eefc;color:#0d47a1}.details[_ngcontent-%COMP%] .since[_ngcontent-%COMP%]{font-size:.8rem;opacity:.7}.whats-new[_ngcontent-%COMP%]{display:flow-root;margin:0 0 14px;padding:8px 12px;border-radius:8px;border-left:3px solid var(--mat-sys-primary, #415f91);background:var(--mat-sys-primary-container, #d7e2ff);color:var(--mat-sys-on-primary-container, #274777)}.whats-new-title[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px;font-size:.72rem;font-weight:600;letter-spacing:.02em;text-transform:uppercase}.whats-new-title[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:16px;width:16px;height:16px}.whats-new[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{margin:5px 0 0;padding-left:20px;font-size:.85rem;line-height:1.5}.whats-new-more[_ngcontent-%COMP%]{margin-top:5px;padding:0;border:0;background:none;font:inherit;font-size:.8rem;color:inherit;text-decoration:underline;cursor:pointer}.pr-history[_ngcontent-%COMP%]{display:flow-root;margin-top:18px;padding-top:12px;border-top:1px solid var(--mat-sys-outline-variant, #e0e0e0)}.pr-history-title[_ngcontent-%COMP%]{font-size:.72rem;font-weight:600;letter-spacing:.02em;text-transform:uppercase;color:var(--mat-sys-on-surface-variant, #565a63);margin-bottom:6px}.pr-table[_ngcontent-%COMP%]{width:100%;border-collapse:collapse;font-size:.85rem}.pr-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:4px 10px 4px 0;vertical-align:top;border-bottom:1px solid var(--mat-sys-outline-variant, #f0f0f0)}.pr-table[_ngcontent-%COMP%] .pr-date[_ngcontent-%COMP%]{white-space:nowrap;width:1%;color:var(--mat-sys-on-surface-variant, #6b7079)}.pr-table[_ngcontent-%COMP%] .pr-num[_ngcontent-%COMP%]{white-space:nowrap;width:1%}.pr-table[_ngcontent-%COMP%] .pr-num[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:var(--mat-sys-primary, #415f91);text-decoration:none;font-weight:500}.pr-table[_ngcontent-%COMP%] .pr-num[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{text-decoration:underline}.pr-table[_ngcontent-%COMP%] .pr-title[_ngcontent-%COMP%]{width:100%}.list[_ngcontent-%COMP%]{flex:1 1 45%;display:flex;flex-direction:column;min-height:0;border-top:1px solid var(--mat-sys-outline-variant, #e0e0e0)}.list[_ngcontent-%COMP%] .search[_ngcontent-%COMP%]{margin:8px 14px 0}.list[_ngcontent-%COMP%] .search[_ngcontent-%COMP%] .mat-mdc-text-field-wrapper{padding-top:0;padding-bottom:0}.list[_ngcontent-%COMP%] .search[_ngcontent-%COMP%] .mat-mdc-form-field-infix{min-height:38px;padding-top:7px;padding-bottom:7px}.list[_ngcontent-%COMP%] .search[_ngcontent-%COMP%] input.mat-mdc-input-element{font-size:.875rem}.table-scroll[_ngcontent-%COMP%]{flex:1 1 auto;overflow:auto}table[_ngcontent-%COMP%]{width:100%;background:transparent}tr[mat-row][_ngcontent-%COMP%], tr[mat-header-row][_ngcontent-%COMP%]{height:42px}td[mat-cell][_ngcontent-%COMP%], th[mat-header-cell][_ngcontent-%COMP%]{padding-top:4px;padding-bottom:4px;border-bottom-color:var(--mat-sys-outline-variant, #eee)}th[mat-header-cell][_ngcontent-%COMP%]{cursor:pointer;-webkit-user-select:none;user-select:none;white-space:nowrap;font-weight:600;font-size:.72rem;letter-spacing:.02em;text-transform:uppercase;color:var(--mat-sys-on-surface-variant, #565a63);background-color:var(--mat-sys-surface, #fff)}.sort[_ngcontent-%COMP%]{font-size:16px;height:16px;width:16px;vertical-align:middle;opacity:.7}tr[mat-row][_ngcontent-%COMP%]{cursor:pointer;transition:background-color .12s ease}tr[mat-row][_ngcontent-%COMP%]:hover td[_ngcontent-%COMP%]{background:#415f9112}tr[mat-row].active[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{background:var(--mat-sys-primary-container, #d7e2ff);color:var(--mat-sys-on-primary-container, #274777);font-weight:500}tr[mat-row].active[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:first-child{box-shadow:inset 3px 0 0 0 var(--mat-sys-primary, #415f91)}.kind-badge[_ngcontent-%COMP%]{display:inline-block;padding:1px 9px;border-radius:10px;font-size:.7rem;font-weight:500;white-space:nowrap;background:#e4f4e8;color:#1b5e20}.kind-badge.enhanced[_ngcontent-%COMP%]{background:#e2eefc;color:#0d47a1}.empty[_ngcontent-%COMP%]{padding:32px 16px;text-align:center;opacity:.7}.empty[_ngcontent-%COMP%] .empty-icon[_ngcontent-%COMP%]{font-size:40px;height:40px;width:40px;opacity:.5}.viewer[_ngcontent-%COMP%]{position:absolute;inset:0;z-index:1000;display:flex;align-items:center;justify-content:center;padding:44px;background:#000000d1}.viewer-figure[_ngcontent-%COMP%]{margin:0;max-width:100%;max-height:100%;display:flex;flex-direction:column;align-items:center}.viewer-figure[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:100%;max-height:78vh;object-fit:contain;border-radius:4px;box-shadow:0 6px 28px #0000008c}.viewer-figure[_ngcontent-%COMP%] figcaption[_ngcontent-%COMP%]{margin-top:12px;color:#fff;font-size:.85rem;text-align:center}.viewer-btn[_ngcontent-%COMP%]{position:absolute;color:#fff}.viewer-close[_ngcontent-%COMP%]{top:6px;right:6px}.viewer-prev[_ngcontent-%COMP%]{top:50%;left:6px;transform:translateY(-50%)}.viewer-next[_ngcontent-%COMP%]{top:50%;right:6px;transform:translateY(-50%)}.dark-theme[_nghost-%COMP%], .dark-theme [_nghost-%COMP%]{--mat-sys-surface: #181211;--mat-sys-on-surface: #ede0dd;--mat-sys-on-surface-variant: #cabfbc;--mat-sys-outline-variant: #4a4340;--mat-sys-primary: #adc6ff;--mat-sys-primary-container: #2b3b57;--mat-sys-on-primary-container: #d7e2ff}.dark-theme[_nghost-%COMP%] .feature-browser[_ngcontent-%COMP%], .dark-theme [_nghost-%COMP%] .feature-browser[_ngcontent-%COMP%]{color:var(--mat-sys-on-surface)}.dark-theme[_nghost-%COMP%] .details[_ngcontent-%COMP%] .body[_ngcontent-%COMP%] a, .dark-theme [_nghost-%COMP%] .details[_ngcontent-%COMP%] .body[_ngcontent-%COMP%] a{color:var(--mat-sys-primary)}"]})};export{on as FeatureBrowserDialog};
@@ -1,2 +1,2 @@
1
- import{a as pe}from"./chunk-B5SN3ZBN.js";import{D as re,f as j,g as N,h as Y,i as Z,j as ee,k as te,l as ie,r as oe,w as se,z as le}from"./chunk-FHFMCRY4.js";import{a as H,b as ne,c as ae}from"./chunk-TTKT5FKY.js";import{a as A,b as L}from"./chunk-2UND4DAL.js";import{i as U,j as z,k as q}from"./chunk-2M5JDEPT.js";import"./chunk-FC62PK2U.js";import{a as B}from"./chunk-XTQIZ74A.js";import"./chunk-T5UYZVNA.js";import"./chunk-FMYAA5JW.js";import"./chunk-OGLYW4PJ.js";import{j as J,o as Q}from"./chunk-ABEPBSQB.js";import{Dd as E,Ea as f,Ed as G,Fa as x,Ha as b,Hd as R,Ia as v,Ja as T,Jd as X,Ka as u,La as a,Ma as o,Na as C,P as y,R as d,Rd as O,S as m,Td as W,Ua as _,Wa as h,Wd as V,Ya as p,Yd as F,Zd as K,gb as w,ja as l,lb as r,mb as P,nb as M,oa as D,ob as S,pe as $,ra as I}from"./chunk-K2CIRFN7.js";import{f as k}from"./chunk-6H3I7D5M.js";function de(s,t){if(s&1){let e=_();a(0,"button",11),h("click",function(){d(e);let i=p();return m(i.load())}),a(1,"mat-icon"),r(2,"file_upload"),o(),r(3," \xA0Load "),o()}if(s&2){let e=p();u("disabled",!e.display.loadRoutesOK&&!e.display.loadWaypointsOK&&!e.display.loadTracksOK)}}function me(s,t){s&1&&(a(0,"div",10)(1,"div")(2,"b"),r(3,"Invalid GPX Data:"),o(),C(4,"br")(5,"br"),a(6,"i"),r(7,"Selected file does not contain GPX data or"),C(8,"br"),r(9," does not correctly implement namespaced <extensions> attributes."),o()()())}function ue(s,t){s&1&&C(0,"mat-progress-bar",12)}function he(s,t){if(s&1){let e=_();a(0,"div",23)(1,"div",24),r(2),o(),a(3,"div",25)(4,"mat-checkbox",26,0),h("change",function(){let i=d(e).$index,c=w(5),g=p(4);return m(g.checkWpt(c.checked,i))}),o()()()}if(s&2){let e=t.$implicit,n=t.$index,i=p(4);l(2),P(e.name),l(2),u("checked",i.selWaypoints[n])}}function _e(s,t){if(s&1){let e=_();a(0,"div",13)(1,"mat-expansion-panel",16),h("opened",function(){d(e);let i=p(3);return m(i.display.expand.waypoints=!0)})("closed",function(){d(e);let i=p(3);return m(i.display.expand.waypoints=!1)}),a(2,"mat-expansion-panel-header",17)(3,"mat-panel-title")(4,"mat-icon",18),r(5,"place"),o(),r(6," \xA0\xA0 "),a(7,"b"),r(8,"Waypoints:"),o()(),a(9,"mat-panel-description")(10,"div",5)(11,"span",19),r(12),o(),a(13,"span",20)(14,"mat-checkbox",21),h("change",function(i){d(e);let c=p(3);return m(c.checkWpt(i.checked,-1))})("click",function(i){return i.cancelBubble=!0}),o()()()()(),a(15,"div",22),v(16,he,6,2,"div",23,b),o()()()}if(s&2){let e=p(3);l(),u("expanded",e.display.expand.waypoints),l(11),S(" (",e.display.selCount.waypoints," of ",e.gpxData==null?null:e.gpxData.waypoints.length,") "),l(2),u("indeterminate",e.display.someWptChecked)("checked",e.display.allWaypointsChecked)("disabled",e.gpxData.waypoints.length===0),l(2),T(e.gpxData.waypoints)}}function fe(s,t){if(s&1){let e=_();a(0,"div",23)(1,"div",24),r(2),o(),a(3,"div",25)(4,"mat-checkbox",29,1),h("change",function(){let i=d(e).$index,c=w(5),g=p(4);return m(g.checkRte(c.checked,i))}),o()()()}if(s&2){let e=t.$implicit,n=t.$index,i=p(4);l(2),P(e.name),l(2),u("checked",i.selRoutes[n])}}function xe(s,t){if(s&1){let e=_();a(0,"div",13)(1,"mat-expansion-panel",16),h("opened",function(){d(e);let i=p(3);return m(i.display.expand.routes=!0)})("closed",function(){d(e);let i=p(3);return m(i.display.expand.routes=!1)}),a(2,"mat-expansion-panel-header",17)(3,"mat-panel-title")(4,"mat-icon",27),r(5,"directions"),o(),r(6," \xA0\xA0 "),a(7,"b"),r(8,"Routes:"),o()(),a(9,"mat-panel-description")(10,"div",5)(11,"span",19),r(12),o(),a(13,"span",20)(14,"mat-checkbox",28),h("change",function(i){d(e);let c=p(3);return m(c.checkRte(i.checked,-1))})("click",function(i){return i.cancelBubble=!0}),o()()()()(),a(15,"div",22),v(16,fe,6,2,"div",23,b),o()()()}if(s&2){let e=p(3);l(),u("expanded",e.display.expand.routes),l(11),S(" (",e.display.selCount.routes," of ",e.gpxData==null?null:e.gpxData.routes.length,") "),l(2),u("indeterminate",e.display.someRteChecked)("checked",e.display.allRoutesChecked)("disabled",e.gpxData.routes.length==0),l(2),T(e.gpxData.routes)}}function ye(s,t){if(s&1){let e=_();a(0,"div",23)(1,"div",24),r(2),o(),a(3,"div",25)(4,"mat-checkbox",32,2),h("change",function(){let i=d(e).$index,c=w(5),g=p(4);return m(g.checkTrk(c.checked,i))}),o()()()}if(s&2){let e=t.$implicit,n=t.$index,i=p(4);l(2),P(e.name),l(2),u("checked",i.selTracks[n])}}function ge(s,t){if(s&1){let e=_();a(0,"div",13)(1,"mat-expansion-panel",16),h("opened",function(){d(e);let i=p(3);return m(i.display.expand.tracks=!0)})("closed",function(){d(e);let i=p(3);return m(i.display.expand.tracks=!1)}),a(2,"mat-expansion-panel-header",17)(3,"mat-panel-title")(4,"mat-icon",30),r(5,"show_chart"),o(),r(6," \xA0\xA0 "),a(7,"b"),r(8,"Tracks:"),o()(),a(9,"mat-panel-description")(10,"div",5)(11,"span",19),r(12),o(),a(13,"span",20)(14,"mat-checkbox",31),h("change",function(i){d(e);let c=p(3);return m(c.checkTrk(i.checked,-1))})("click",function(i){return i.cancelBubble=!0}),o()()()()(),a(15,"div",22),v(16,ye,6,2,"div",23,b),o()()()}if(s&2){let e=p(3);l(),u("expanded",e.display.expand.tracks),l(11),S(" (",e.display.selCount.tracks," of ",e.gpxData==null?null:e.gpxData.tracks.length,") "),l(2),u("indeterminate",e.display.someTrkChecked)("checked",e.display.allTracksChecked)("disabled",e.gpxData.tracks.length==0),l(2),T(e.gpxData.tracks)}}function Ce(s,t){if(s&1&&(a(0,"div",13)(1,"div",14)(2,"div"),r(3,"File:"),o(),a(4,"div",15),r(5),o()(),C(6,"mat-divider"),o(),f(7,_e,18,6,"div",13),f(8,xe,18,6,"div",13),f(9,ge,18,6,"div",13)),s&2){let e=p(2);l(5),M(" ",e.data.fileName," "),l(2),x(e.gpxData.waypoints.length!=0?7:-1),l(),x(e.gpxData.routes.length!=0?8:-1),l(),x(e.gpxData.tracks.length!=0&&e.app.featureFlags().resourceTracks?9:-1)}}function ke(s,t){if(s&1&&(a(0,"div",10),f(1,ue,1,0,"mat-progress-bar",12)(2,Ce,10,4),o()),s&2){let e=p();l(),x(e.app.sIsFetching()?1:2)}}var ce=class s{constructor(t){this.data=t}data;gpxData={name:"",routes:[],waypoints:[],tracks:[]};selRoutes=[];selectedRoute=null;selWaypoints=[];selTracks=[];display={notValid:!1,allRoutesChecked:!1,allWaypointsChecked:!1,allTracksChecked:!1,someWptChecked:!1,someRteChecked:!1,someTrkChecked:!1,loadRoutesOK:!1,loadWaypointsOK:!1,loadTracksOK:!1,routeViewer:!1,selCount:{routes:0,waypoints:0,tracks:0},expand:{routes:!1,waypoints:!1,tracks:!1}};errorCount=0;subCount=0;gpx;app=y(le);dialogRef=y(E);skres=y(re);signalk=y(oe);symbols=y(se);ngOnInit(){this.data.fileData=this.data.fileData||null,this.parseGPXData(this.data.fileData)}ngOnDestroy(){this.clear()}load(){this.uploadToServer({rte:{selected:this.selRoutes},wpt:{selected:this.selWaypoints},trk:{selected:this.selTracks}})}parseGPXData(t){return k(this,null,function*(){if(this.display.allRoutesChecked=!1,this.display.loadRoutesOK=!1,this.selRoutes=[],this.display.allWaypointsChecked=!1,this.display.loadWaypointsOK=!1,this.selWaypoints=[],this.display.allTracksChecked=!1,this.display.loadTracksOK=!1,this.selTracks=[],this.display.selCount={routes:0,waypoints:0,tracks:0},this.display.expand={routes:!1,waypoints:!1,tracks:!1},this.display.notValid=!1,this.gpxData=yield this.parseFileData(t),!this.gpxData){console.warn(`Selected file does not contain GPX data or
2
- does not correctly implement namespaced <extensions> attributes`,"Invalid GPX Data:"),this.display.notValid=!0;return}this.gpxData.routes.forEach(()=>{this.selRoutes.push(!1)}),this.selRoutes.length===1&&(this.selRoutes[0]=!0,this.display.allRoutesChecked=!0,this.display.expand.routes=!0,this.display.loadRoutesOK=!0,this.display.selCount.routes=1),this.gpxData.waypoints.forEach(()=>{this.selWaypoints.push(!1)}),this.selWaypoints.length===1&&(this.selWaypoints[0]=!0,this.display.allWaypointsChecked=!0,this.display.expand.waypoints=!0,this.display.loadWaypointsOK=!0,this.display.selCount.waypoints=1),this.gpxData.tracks.forEach(()=>{this.selTracks.push(!1)}),this.selTracks.length===1&&(this.selTracks[0]=!0,this.display.allTracksChecked=!0,this.display.expand.tracks=!0,this.display.loadTracksOK=!0,this.display.selCount.tracks=1)})}checkRte(t,e=-1){let n=0;if(e!==-1){this.selRoutes[e]=t,this.display.loadRoutesOK=t;for(let i of this.selRoutes)i&&n++;this.display.loadRoutesOK=n!==0,this.display.selCount.routes=n,this.display.allRoutesChecked=n===this.selRoutes.length}else{for(let i=0;i<this.selRoutes.length;i++)this.selRoutes[i]=t,this.display.loadRoutesOK=t,this.display.allRoutesChecked=t;this.display.selCount.routes=t?this.selRoutes.length:0}this.display.someRteChecked=!(this.display.allRoutesChecked||n===0)}checkWpt(t,e=-1){let n=0;if(e!==-1){this.selWaypoints[e]=t,this.display.loadWaypointsOK=t;for(let i of this.selWaypoints)i&&n++;this.display.loadWaypointsOK=n!==0,this.display.selCount.waypoints=n,this.display.allWaypointsChecked=n===this.selWaypoints.length}else{for(let i=0;i<this.selWaypoints.length;i++)this.selWaypoints[i]=t,this.display.loadWaypointsOK=t,this.display.allWaypointsChecked=t;this.display.selCount.waypoints=t?this.selWaypoints.length:0}this.display.someWptChecked=!(this.display.allWaypointsChecked||n===0)}checkTrk(t,e=-1){let n=0;if(e!==-1){this.selTracks[e]=t,this.display.loadTracksOK=t;for(let i of this.selTracks)i&&n++;this.display.loadTracksOK=n!==0,this.display.selCount.tracks=n,this.display.allTracksChecked=n===this.selTracks.length}else{for(let i=0;i<this.selTracks.length;i++)this.selTracks[i]=t,this.display.loadTracksOK=t,this.display.allTracksChecked=t;this.display.selCount.tracks=t?this.selTracks.length:0}this.display.someTrkChecked=!(this.display.allTracksChecked||n===0)}clear(){this.gpx=null}parseFileData(t){return k(this,null,function*(){let e={name:"",routes:[],waypoints:[],tracks:[]};if(this.gpx=new pe,this.app.sIsFetching.set(!0),!(yield this.gpx.parse(t)))return this.app.sIsFetching.set(!1),null;let n=1;return this.gpx.rte.forEach(i=>{e.routes.push({name:i.name!==""?i.name:`Rte: ${n}`,description:i.desc?i.desc:i.cmt?i.cmt:"",wptcount:i.rtept.length}),n++}),n=1,this.gpx.wpt.forEach(i=>{e.waypoints.push({name:i.name?i.name:`Wpt: ${n}`,description:i.desc?i.desc:i.cmt?i.cmt:""}),n++}),n=1,this.gpx.trk.forEach(i=>{e.tracks.push({name:i.name?i.name:`Trk: ${n}`,description:i.desc?i.desc:i.cmt?i.cmt:""}),n++}),this.app.sIsFetching.set(!1),e})}uploadToServer(t){return k(this,null,function*(){this.app.sIsFetching.set(!0),this.errorCount=0,this.subCount=0;for(let n=0;n<t.rte.selected.length;n++)t.rte.selected[n]&&this.transformRoute(this.gpx.rte[n]);for(let n=0;n<t.wpt.selected.length;n++)t.wpt.selected[n]&&this.transformWaypoint(this.gpx.wpt[n]);let e=[];for(let n=0;n<t.trk.selected.length;n++)if(t.trk.selected[n]){let i=this.transformTrack(this.gpx.trk[n]);this.subCount++;try{let c=yield this.skres.postToServer("tracks",i);this.subCount--,Math.floor(c.statusCode/100)===2?(e.push(c.id),this.app.debug("SUCCESS: Track added.")):this.errorCount++,this.checkComplete()}catch(c){this.errorCount++,this.subCount--,this.logError(c),this.checkComplete()}}e.length!==0&&this.skres.trackAddFromServer(e)})}errorList=[];logError(t){let e=t.error?t.error.message:t.message;this.errorList.push({status:t.status,message:e})}checkComplete(){this.subCount===0&&(this.app.sIsFetching.set(!1),this.app.saveConfig(),this.dialogRef.close({errCount:this.errorCount,errList:this.errorList}),this.app.debug(`GPXLoad: complete: ${this.errorCount}`))}transformRoute(t){let e=this.skres.buildRoute(t.rtept.map(i=>[i.lon,i.lat])),n=e[1];n.name=t.name??"",n.description=t.desc??"",t.cmt&&(n.feature.properties.cmt=t.cmt),t.src&&(n.feature.properties.src=t.src),t.number&&(n.feature.properties.number=t.number),t.type&&(n.feature.properties.type=t.type),n.feature.properties.coordinatesMeta=[],n.feature.properties.coordinatesMeta=t.rtept.map(i=>{let c={name:i.name??""};return i.cmt&&(c.description=i.cmt),c}),this.subCount++,this.signalk.api.put(this.app.skApiVersion,`/resources/routes/${e[0]}`,e[1]).subscribe(i=>{this.subCount--,Math.floor(i.statusCode/100)===2?(this.app.debug("SUCCESS: Route added."),this.skres.selectionAdd("routes",e[0])):this.errorCount++,this.checkComplete()},i=>{this.errorCount++,this.subCount--,this.logError(i),this.checkComplete()})}transformWaypoint(t){let e=this.skres.buildWaypoint([t.lon,t.lat]),n=e[1];if(t.ele&&n.feature.geometry.coordinates.push(t.ele),t.name&&t.name.length!==0&&(n.name=t.name),t.desc&&t.desc.length!==0&&(n.description=t.desc),t.type&&(n.type=t.type,n.feature.properties.type=t.type),t.cmt&&(n.feature.properties.cmt=t.cmt),t.src&&(n.feature.properties.src=t.src),t.sym){n.feature.properties.sym=t.sym;let i=this.symbols.resolveGpxSym(t.sym);i&&(n.type="waypoint",n.feature.properties.skIcon=i)}this.subCount++,this.signalk.api.put(this.app.skApiVersion,`/resources/waypoints/${e[0]}`,e[1]).subscribe(i=>{this.subCount--,Math.floor(i.statusCode/100)===2?(this.app.debug("SUCCESS: Waypoint added."),this.skres.selectionAdd("waypoints",e[0])):this.errorCount++,this.checkComplete()},i=>{this.errorCount++,this.subCount--,this.logError(i),this.checkComplete()})}transformTrack(t){let e={feature:{type:"Feature",geometry:{type:"MultiLineString",coordinates:[]},properties:{},id:""}};return t.trkseg&&t.trkseg.forEach(n=>{let i=[];n.trkpt.forEach(c=>{i.push([c.lon,c.lat])}),e.feature.geometry.coordinates.push(i)}),t.name&&t.name.length!==0?e.feature.properties.name=t.name:e.feature.properties.name=`gpxtrk #${Math.random().toString().slice(-5)}`,t.desc&&t.desc.length!==0&&(e.feature.properties.description=t.desc),t.cmt&&(e.feature.properties.cmt=t.cmt),t.src&&(e.feature.properties.src=t.src),t.type&&(e.feature.properties.type=t.type),e}static \u0275fac=function(e){return new(e||s)(D(G))};static \u0275cmp=I({type:s,selectors:[["gpxload-dialog"]],decls:13,vars:3,consts:[["wval",""],["rval",""],["tval",""],[1,"gpxload-dialog"],[2,"background-color","transparent"],[2,"display","flex","width","100%"],["mat-raised-button","","matTooltip","Load selected resources","matTooltipPosition","right",2,"width","85px",3,"disabled"],[2,"flex","1 1 auto","text-align","center"],[2,"text-align","right"],["mat-icon-button","",3,"click","disabled"],["mat-dialog-content",""],["mat-raised-button","","matTooltip","Load selected resources","matTooltipPosition","right",2,"width","85px",3,"click","disabled"],["mode","indeterminate"],[1,"card-group"],[2,"display","flex"],[2,"flex","1 1 auto","padding-left","10px","overflow","hidden","display","-webkit-box","-webkit-box-orient","vertical","-webkit-line-clamp","1","line-clamp","1","text-overflow","ellipsis"],[3,"opened","closed","expanded"],[2,"padding","0 12px"],[1,"icon-waypoint"],[1,"pnlSelectedItems"],[1,"pnlSelect"],["matTooltip","Select all Waypoints","matTooltipPosition","before",3,"change","click","indeterminate","checked","disabled"],[1,"list-container-scrollable"],[1,"item-row"],[1,"name"],[1,"check"],["matTooltip","Select Waypoint","matTooltipPosition","below",3,"change","checked"],[1,"icon-route"],["matTooltip","Select all Routes","matTooltipPosition","before",3,"change","click","indeterminate","checked","disabled"],["matTooltip","Select this Route","matTooltipPosition","below",3,"change","checked"],[1,"icon-track"],["matTooltip","Select all Tracks","matTooltipPosition","before",3,"change","click","indeterminate","checked","disabled"],["matTooltip","Select this Track","matTooltipPosition","below",3,"change","checked"]],template:function(e,n){e&1&&(a(0,"div",3)(1,"mat-toolbar",4)(2,"div",5)(3,"div"),f(4,de,4,1,"button",6),o(),a(5,"div",7),r(6,"Import GPX"),o(),a(7,"div",8)(8,"button",9),h("click",function(){return n.dialogRef.close(-1)}),a(9,"mat-icon"),r(10,"close"),o()()()()(),f(11,me,10,0,"div",10)(12,ke,3,1,"div",10),o()),e&2&&(l(4),x(n.app.sIsFetching()?-1:4),l(4),u("disabled",n.app.sIsFetching()),l(3),x(n.display.notValid?11:12))},dependencies:[ae,ne,N,j,X,R,K,F,V,W,O,U,J,Q,L,A,ie,Y,Z,te,ee,q,z,H,B,$],styles:[".gpxload-dialog[_ngcontent-%COMP%]{font-family:roboto;position:relative}.mat-expansion-panel-body[_ngcontent-%COMP%]{padding:0 12px 6px}.card-group-title[_ngcontent-%COMP%]{font-weight:700;font-size:10pt;font-family:Arial,Helvetica,sans-serif;padding:10px 0}.item-row[_ngcontent-%COMP%]{display:flex;width:100%;padding:2px 0}.item-row[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{flex:1 1 auto;overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1;text-overflow:ellipsis;line-height:2.5em}.item-row[_ngcontent-%COMP%] .check[_ngcontent-%COMP%]{text-align:right;padding-right:15px}.pnlSelectedItems[_ngcontent-%COMP%]{display:none;line-height:2.9em}.pnlSelect[_ngcontent-%COMP%]{flex:1 1 auto;padding-left:3px;padding-right:3px;text-align:right}.txtSelect[_ngcontent-%COMP%]{display:none}button[_ngcontent-%COMP%]{min-width:unset;padding:unset}@media only screen and (min-width:400px){.pnlSelectedItems[_ngcontent-%COMP%]{display:inline}}@media only screen and (min-width:475px){.pnlSelectedItems[_ngcontent-%COMP%]{display:inline;line-height:2.9em}.txtSelect[_ngcontent-%COMP%]{display:inline}.pnlSelect[_ngcontent-%COMP%]{flex:1 1 auto;padding-left:20px;padding-right:15px;text-align:right}button[_ngcontent-%COMP%]{min-width:inherit;padding:inherit}}"]})};export{ce as GPXImportDialog};
1
+ import{a as pe}from"./chunk-4JRVRHO7.js";import{K as oe,Sa as re,U as se,V as le,i as q,j as J,k as Q,l as Y,m as Z,q as ne,r as ae}from"./chunk-L4FEUXHI.js";import{a as ee,b as te,c as ie}from"./chunk-WTDLBURC.js";import{j as A,k as L,l as B}from"./chunk-VJLDZ4NI.js";import"./chunk-PU7NCPYW.js";import{a as z}from"./chunk-N4UL6N3G.js";import"./chunk-AA62TGOR.js";import{j as H,o as j}from"./chunk-WCLDE6BT.js";import{a as N,b as U}from"./chunk-WYYDGUIZ.js";import"./chunk-4ZE2OKZZ.js";import"./chunk-7TRKAN4B.js";import{Ea as f,Ed as E,Fa as x,Fd as G,Ha as b,Ia as v,Id as R,Ja as T,Ka as u,Kd as X,La as a,Ma as o,Md as O,Na as C,Nd as W,P as y,R as d,S as m,Ua as _,Vd as V,Wa as h,Xd as F,Ya as p,_d as K,gb as w,ja as l,lb as r,mb as P,nb as M,oa as D,ob as S,qe as $,ra as I}from"./chunk-OPNUYGIO.js";import{f as k}from"./chunk-6H3I7D5M.js";function de(s,t){if(s&1){let e=_();a(0,"button",11),h("click",function(){d(e);let i=p();return m(i.load())}),a(1,"mat-icon"),r(2,"file_upload"),o(),r(3," \xA0Load "),o()}if(s&2){let e=p();u("disabled",!e.display.loadRoutesOK&&!e.display.loadWaypointsOK&&!e.display.loadTracksOK)}}function me(s,t){s&1&&(a(0,"div",10)(1,"div")(2,"b"),r(3,"Invalid GPX Data:"),o(),C(4,"br")(5,"br"),a(6,"i"),r(7,"Selected file does not contain GPX data or"),C(8,"br"),r(9," does not correctly implement namespaced <extensions> attributes."),o()()())}function ue(s,t){s&1&&C(0,"mat-progress-bar",12)}function he(s,t){if(s&1){let e=_();a(0,"div",23)(1,"div",24),r(2),o(),a(3,"div",25)(4,"mat-checkbox",26,0),h("change",function(){let i=d(e).$index,c=w(5),g=p(4);return m(g.checkWpt(c.checked,i))}),o()()()}if(s&2){let e=t.$implicit,n=t.$index,i=p(4);l(2),P(e.name),l(2),u("checked",i.selWaypoints[n])}}function _e(s,t){if(s&1){let e=_();a(0,"div",13)(1,"mat-expansion-panel",16),h("opened",function(){d(e);let i=p(3);return m(i.display.expand.waypoints=!0)})("closed",function(){d(e);let i=p(3);return m(i.display.expand.waypoints=!1)}),a(2,"mat-expansion-panel-header",17)(3,"mat-panel-title")(4,"mat-icon",18),r(5,"place"),o(),r(6," \xA0\xA0 "),a(7,"b"),r(8,"Waypoints:"),o()(),a(9,"mat-panel-description")(10,"div",5)(11,"span",19),r(12),o(),a(13,"span",20)(14,"mat-checkbox",21),h("change",function(i){d(e);let c=p(3);return m(c.checkWpt(i.checked,-1))})("click",function(i){return i.cancelBubble=!0}),o()()()()(),a(15,"div",22),v(16,he,6,2,"div",23,b),o()()()}if(s&2){let e=p(3);l(),u("expanded",e.display.expand.waypoints),l(11),S(" (",e.display.selCount.waypoints," of ",e.gpxData==null?null:e.gpxData.waypoints.length,") "),l(2),u("indeterminate",e.display.someWptChecked)("checked",e.display.allWaypointsChecked)("disabled",e.gpxData.waypoints.length===0),l(2),T(e.gpxData.waypoints)}}function fe(s,t){if(s&1){let e=_();a(0,"div",23)(1,"div",24),r(2),o(),a(3,"div",25)(4,"mat-checkbox",29,1),h("change",function(){let i=d(e).$index,c=w(5),g=p(4);return m(g.checkRte(c.checked,i))}),o()()()}if(s&2){let e=t.$implicit,n=t.$index,i=p(4);l(2),P(e.name),l(2),u("checked",i.selRoutes[n])}}function xe(s,t){if(s&1){let e=_();a(0,"div",13)(1,"mat-expansion-panel",16),h("opened",function(){d(e);let i=p(3);return m(i.display.expand.routes=!0)})("closed",function(){d(e);let i=p(3);return m(i.display.expand.routes=!1)}),a(2,"mat-expansion-panel-header",17)(3,"mat-panel-title")(4,"mat-icon",27),r(5,"directions"),o(),r(6," \xA0\xA0 "),a(7,"b"),r(8,"Routes:"),o()(),a(9,"mat-panel-description")(10,"div",5)(11,"span",19),r(12),o(),a(13,"span",20)(14,"mat-checkbox",28),h("change",function(i){d(e);let c=p(3);return m(c.checkRte(i.checked,-1))})("click",function(i){return i.cancelBubble=!0}),o()()()()(),a(15,"div",22),v(16,fe,6,2,"div",23,b),o()()()}if(s&2){let e=p(3);l(),u("expanded",e.display.expand.routes),l(11),S(" (",e.display.selCount.routes," of ",e.gpxData==null?null:e.gpxData.routes.length,") "),l(2),u("indeterminate",e.display.someRteChecked)("checked",e.display.allRoutesChecked)("disabled",e.gpxData.routes.length==0),l(2),T(e.gpxData.routes)}}function ye(s,t){if(s&1){let e=_();a(0,"div",23)(1,"div",24),r(2),o(),a(3,"div",25)(4,"mat-checkbox",32,2),h("change",function(){let i=d(e).$index,c=w(5),g=p(4);return m(g.checkTrk(c.checked,i))}),o()()()}if(s&2){let e=t.$implicit,n=t.$index,i=p(4);l(2),P(e.name),l(2),u("checked",i.selTracks[n])}}function ge(s,t){if(s&1){let e=_();a(0,"div",13)(1,"mat-expansion-panel",16),h("opened",function(){d(e);let i=p(3);return m(i.display.expand.tracks=!0)})("closed",function(){d(e);let i=p(3);return m(i.display.expand.tracks=!1)}),a(2,"mat-expansion-panel-header",17)(3,"mat-panel-title")(4,"mat-icon",30),r(5,"show_chart"),o(),r(6," \xA0\xA0 "),a(7,"b"),r(8,"Tracks:"),o()(),a(9,"mat-panel-description")(10,"div",5)(11,"span",19),r(12),o(),a(13,"span",20)(14,"mat-checkbox",31),h("change",function(i){d(e);let c=p(3);return m(c.checkTrk(i.checked,-1))})("click",function(i){return i.cancelBubble=!0}),o()()()()(),a(15,"div",22),v(16,ye,6,2,"div",23,b),o()()()}if(s&2){let e=p(3);l(),u("expanded",e.display.expand.tracks),l(11),S(" (",e.display.selCount.tracks," of ",e.gpxData==null?null:e.gpxData.tracks.length,") "),l(2),u("indeterminate",e.display.someTrkChecked)("checked",e.display.allTracksChecked)("disabled",e.gpxData.tracks.length==0),l(2),T(e.gpxData.tracks)}}function Ce(s,t){if(s&1&&(a(0,"div",13)(1,"div",14)(2,"div"),r(3,"File:"),o(),a(4,"div",15),r(5),o()(),C(6,"mat-divider"),o(),f(7,_e,18,6,"div",13),f(8,xe,18,6,"div",13),f(9,ge,18,6,"div",13)),s&2){let e=p(2);l(5),M(" ",e.data.fileName," "),l(2),x(e.gpxData.waypoints.length!=0?7:-1),l(),x(e.gpxData.routes.length!=0?8:-1),l(),x(e.gpxData.tracks.length!=0&&e.app.featureFlags().resourceTracks?9:-1)}}function ke(s,t){if(s&1&&(a(0,"div",10),f(1,ue,1,0,"mat-progress-bar",12)(2,Ce,10,4),o()),s&2){let e=p();l(),x(e.app.sIsFetching()?1:2)}}var ce=class s{constructor(t){this.data=t}data;gpxData={name:"",routes:[],waypoints:[],tracks:[]};selRoutes=[];selectedRoute=null;selWaypoints=[];selTracks=[];display={notValid:!1,allRoutesChecked:!1,allWaypointsChecked:!1,allTracksChecked:!1,someWptChecked:!1,someRteChecked:!1,someTrkChecked:!1,loadRoutesOK:!1,loadWaypointsOK:!1,loadTracksOK:!1,routeViewer:!1,selCount:{routes:0,waypoints:0,tracks:0},expand:{routes:!1,waypoints:!1,tracks:!1}};errorCount=0;subCount=0;gpx;app=y(re);dialogRef=y(E);skres=y(oe);signalk=y(ne);symbols=y(ae);ngOnInit(){this.data.fileData=this.data.fileData||null,this.parseGPXData(this.data.fileData)}ngOnDestroy(){this.clear()}load(){this.uploadToServer({rte:{selected:this.selRoutes},wpt:{selected:this.selWaypoints},trk:{selected:this.selTracks}})}parseGPXData(t){return k(this,null,function*(){if(this.display.allRoutesChecked=!1,this.display.loadRoutesOK=!1,this.selRoutes=[],this.display.allWaypointsChecked=!1,this.display.loadWaypointsOK=!1,this.selWaypoints=[],this.display.allTracksChecked=!1,this.display.loadTracksOK=!1,this.selTracks=[],this.display.selCount={routes:0,waypoints:0,tracks:0},this.display.expand={routes:!1,waypoints:!1,tracks:!1},this.display.notValid=!1,this.gpxData=yield this.parseFileData(t),!this.gpxData){console.warn(`Selected file does not contain GPX data or
2
+ does not correctly implement namespaced <extensions> attributes`,"Invalid GPX Data:"),this.display.notValid=!0;return}this.gpxData.routes.forEach(()=>{this.selRoutes.push(!1)}),this.selRoutes.length===1&&(this.selRoutes[0]=!0,this.display.allRoutesChecked=!0,this.display.expand.routes=!0,this.display.loadRoutesOK=!0,this.display.selCount.routes=1),this.gpxData.waypoints.forEach(()=>{this.selWaypoints.push(!1)}),this.selWaypoints.length===1&&(this.selWaypoints[0]=!0,this.display.allWaypointsChecked=!0,this.display.expand.waypoints=!0,this.display.loadWaypointsOK=!0,this.display.selCount.waypoints=1),this.gpxData.tracks.forEach(()=>{this.selTracks.push(!1)}),this.selTracks.length===1&&(this.selTracks[0]=!0,this.display.allTracksChecked=!0,this.display.expand.tracks=!0,this.display.loadTracksOK=!0,this.display.selCount.tracks=1)})}checkRte(t,e=-1){let n=0;if(e!==-1){this.selRoutes[e]=t,this.display.loadRoutesOK=t;for(let i of this.selRoutes)i&&n++;this.display.loadRoutesOK=n!==0,this.display.selCount.routes=n,this.display.allRoutesChecked=n===this.selRoutes.length}else{for(let i=0;i<this.selRoutes.length;i++)this.selRoutes[i]=t,this.display.loadRoutesOK=t,this.display.allRoutesChecked=t;this.display.selCount.routes=t?this.selRoutes.length:0}this.display.someRteChecked=!(this.display.allRoutesChecked||n===0)}checkWpt(t,e=-1){let n=0;if(e!==-1){this.selWaypoints[e]=t,this.display.loadWaypointsOK=t;for(let i of this.selWaypoints)i&&n++;this.display.loadWaypointsOK=n!==0,this.display.selCount.waypoints=n,this.display.allWaypointsChecked=n===this.selWaypoints.length}else{for(let i=0;i<this.selWaypoints.length;i++)this.selWaypoints[i]=t,this.display.loadWaypointsOK=t,this.display.allWaypointsChecked=t;this.display.selCount.waypoints=t?this.selWaypoints.length:0}this.display.someWptChecked=!(this.display.allWaypointsChecked||n===0)}checkTrk(t,e=-1){let n=0;if(e!==-1){this.selTracks[e]=t,this.display.loadTracksOK=t;for(let i of this.selTracks)i&&n++;this.display.loadTracksOK=n!==0,this.display.selCount.tracks=n,this.display.allTracksChecked=n===this.selTracks.length}else{for(let i=0;i<this.selTracks.length;i++)this.selTracks[i]=t,this.display.loadTracksOK=t,this.display.allTracksChecked=t;this.display.selCount.tracks=t?this.selTracks.length:0}this.display.someTrkChecked=!(this.display.allTracksChecked||n===0)}clear(){this.gpx=null}parseFileData(t){return k(this,null,function*(){let e={name:"",routes:[],waypoints:[],tracks:[]};if(this.gpx=new pe,this.app.sIsFetching.set(!0),!(yield this.gpx.parse(t)))return this.app.sIsFetching.set(!1),null;let n=1;return this.gpx.rte.forEach(i=>{e.routes.push({name:i.name!==""?i.name:`Rte: ${n}`,description:i.desc?i.desc:i.cmt?i.cmt:"",wptcount:i.rtept.length}),n++}),n=1,this.gpx.wpt.forEach(i=>{e.waypoints.push({name:i.name?i.name:`Wpt: ${n}`,description:i.desc?i.desc:i.cmt?i.cmt:""}),n++}),n=1,this.gpx.trk.forEach(i=>{e.tracks.push({name:i.name?i.name:`Trk: ${n}`,description:i.desc?i.desc:i.cmt?i.cmt:""}),n++}),this.app.sIsFetching.set(!1),e})}uploadToServer(t){return k(this,null,function*(){this.app.sIsFetching.set(!0),this.errorCount=0,this.subCount=0;for(let n=0;n<t.rte.selected.length;n++)t.rte.selected[n]&&this.transformRoute(this.gpx.rte[n]);for(let n=0;n<t.wpt.selected.length;n++)t.wpt.selected[n]&&this.transformWaypoint(this.gpx.wpt[n]);let e=[];for(let n=0;n<t.trk.selected.length;n++)if(t.trk.selected[n]){let i=this.transformTrack(this.gpx.trk[n]);this.subCount++;try{let c=yield this.skres.postToServer("tracks",i);this.subCount--,Math.floor(c.statusCode/100)===2?(e.push(c.id),this.app.debug("SUCCESS: Track added.")):this.errorCount++,this.checkComplete()}catch(c){this.errorCount++,this.subCount--,this.logError(c),this.checkComplete()}}e.length!==0&&this.skres.trackAddFromServer(e)})}errorList=[];logError(t){let e=t.error?t.error.message:t.message;this.errorList.push({status:t.status,message:e})}checkComplete(){this.subCount===0&&(this.app.sIsFetching.set(!1),this.app.saveConfig(),this.dialogRef.close({errCount:this.errorCount,errList:this.errorList}),this.app.debug(`GPXLoad: complete: ${this.errorCount}`))}transformRoute(t){let e=this.skres.buildRoute(t.rtept.map(i=>[i.lon,i.lat])),n=e[1];n.name=t.name??"",n.description=t.desc??"",t.cmt&&(n.feature.properties.cmt=t.cmt),t.src&&(n.feature.properties.src=t.src),t.number&&(n.feature.properties.number=t.number),t.type&&(n.feature.properties.type=t.type),n.feature.properties.coordinatesMeta=[],n.feature.properties.coordinatesMeta=t.rtept.map(i=>{let c={name:i.name??""};return i.cmt&&(c.description=i.cmt),c}),this.subCount++,this.signalk.api.put(this.app.skApiVersion,`/resources/routes/${e[0]}`,e[1]).subscribe(i=>{this.subCount--,Math.floor(i.statusCode/100)===2?(this.app.debug("SUCCESS: Route added."),this.skres.selectionAdd("routes",e[0])):this.errorCount++,this.checkComplete()},i=>{this.errorCount++,this.subCount--,this.logError(i),this.checkComplete()})}transformWaypoint(t){let e=this.skres.buildWaypoint([t.lon,t.lat]),n=e[1];if(t.ele&&n.feature.geometry.coordinates.push(t.ele),t.name&&t.name.length!==0&&(n.name=t.name),t.desc&&t.desc.length!==0&&(n.description=t.desc),t.type&&(n.type=t.type,n.feature.properties.type=t.type),t.cmt&&(n.feature.properties.cmt=t.cmt),t.src&&(n.feature.properties.src=t.src),t.sym){n.feature.properties.sym=t.sym;let i=this.symbols.resolveGpxSym(t.sym);i&&(n.type="waypoint",n.feature.properties.skIcon=i)}this.subCount++,this.signalk.api.put(this.app.skApiVersion,`/resources/waypoints/${e[0]}`,e[1]).subscribe(i=>{this.subCount--,Math.floor(i.statusCode/100)===2?(this.app.debug("SUCCESS: Waypoint added."),this.skres.selectionAdd("waypoints",e[0])):this.errorCount++,this.checkComplete()},i=>{this.errorCount++,this.subCount--,this.logError(i),this.checkComplete()})}transformTrack(t){let e={feature:{type:"Feature",geometry:{type:"MultiLineString",coordinates:[]},properties:{},id:""}};return t.trkseg&&t.trkseg.forEach(n=>{let i=[];n.trkpt.forEach(c=>{i.push([c.lon,c.lat])}),e.feature.geometry.coordinates.push(i)}),t.name&&t.name.length!==0?e.feature.properties.name=t.name:e.feature.properties.name=`gpxtrk #${Math.random().toString().slice(-5)}`,t.desc&&t.desc.length!==0&&(e.feature.properties.description=t.desc),t.cmt&&(e.feature.properties.cmt=t.cmt),t.src&&(e.feature.properties.src=t.src),t.type&&(e.feature.properties.type=t.type),e}static \u0275fac=function(e){return new(e||s)(D(G))};static \u0275cmp=I({type:s,selectors:[["gpxload-dialog"]],decls:13,vars:3,consts:[["wval",""],["rval",""],["tval",""],[1,"gpxload-dialog"],[2,"background-color","transparent"],[2,"display","flex","width","100%"],["mat-raised-button","","matTooltip","Load selected resources","matTooltipPosition","right",2,"width","85px",3,"disabled"],[2,"flex","1 1 auto","text-align","center"],[2,"text-align","right"],["mat-icon-button","",3,"click","disabled"],["mat-dialog-content",""],["mat-raised-button","","matTooltip","Load selected resources","matTooltipPosition","right",2,"width","85px",3,"click","disabled"],["mode","indeterminate"],[1,"card-group"],[2,"display","flex"],[2,"flex","1 1 auto","padding-left","10px","overflow","hidden","display","-webkit-box","-webkit-box-orient","vertical","-webkit-line-clamp","1","line-clamp","1","text-overflow","ellipsis"],[3,"opened","closed","expanded"],[2,"padding","0 12px"],[1,"icon-waypoint"],[1,"pnlSelectedItems"],[1,"pnlSelect"],["matTooltip","Select all Waypoints","matTooltipPosition","before",3,"change","click","indeterminate","checked","disabled"],[1,"list-container-scrollable"],[1,"item-row"],[1,"name"],[1,"check"],["matTooltip","Select Waypoint","matTooltipPosition","below",3,"change","checked"],[1,"icon-route"],["matTooltip","Select all Routes","matTooltipPosition","before",3,"change","click","indeterminate","checked","disabled"],["matTooltip","Select this Route","matTooltipPosition","below",3,"change","checked"],[1,"icon-track"],["matTooltip","Select all Tracks","matTooltipPosition","before",3,"change","click","indeterminate","checked","disabled"],["matTooltip","Select this Track","matTooltipPosition","below",3,"change","checked"]],template:function(e,n){e&1&&(a(0,"div",3)(1,"mat-toolbar",4)(2,"div",5)(3,"div"),f(4,de,4,1,"button",6),o(),a(5,"div",7),r(6,"Import GPX"),o(),a(7,"div",8)(8,"button",9),h("click",function(){return n.dialogRef.close(-1)}),a(9,"mat-icon"),r(10,"close"),o()()()()(),f(11,me,10,0,"div",10)(12,ke,3,1,"div",10),o()),e&2&&(l(4),x(n.app.sIsFetching()?-1:4),l(4),u("disabled",n.app.sIsFetching()),l(3),x(n.display.notValid?11:12))},dependencies:[te,ee,le,se,X,R,W,O,K,F,V,A,H,j,U,N,Z,q,J,Y,Q,B,L,ie,z,$],styles:[".gpxload-dialog[_ngcontent-%COMP%]{font-family:roboto;position:relative}.mat-expansion-panel-body[_ngcontent-%COMP%]{padding:0 12px 6px}.card-group-title[_ngcontent-%COMP%]{font-weight:700;font-size:10pt;font-family:Arial,Helvetica,sans-serif;padding:10px 0}.item-row[_ngcontent-%COMP%]{display:flex;width:100%;padding:2px 0}.item-row[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{flex:1 1 auto;overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1;text-overflow:ellipsis;line-height:2.5em}.item-row[_ngcontent-%COMP%] .check[_ngcontent-%COMP%]{text-align:right;padding-right:15px}.pnlSelectedItems[_ngcontent-%COMP%]{display:none;line-height:2.9em}.pnlSelect[_ngcontent-%COMP%]{flex:1 1 auto;padding-left:3px;padding-right:3px;text-align:right}.txtSelect[_ngcontent-%COMP%]{display:none}button[_ngcontent-%COMP%]{min-width:unset;padding:unset}@media only screen and (min-width:400px){.pnlSelectedItems[_ngcontent-%COMP%]{display:inline}}@media only screen and (min-width:475px){.pnlSelectedItems[_ngcontent-%COMP%]{display:inline;line-height:2.9em}.txtSelect[_ngcontent-%COMP%]{display:inline}.pnlSelect[_ngcontent-%COMP%]{flex:1 1 auto;padding-left:20px;padding-right:15px;text-align:right}button[_ngcontent-%COMP%]{min-width:inherit;padding:inherit}}"]})};export{ce as GPXImportDialog};