dealposbooks 5.46.1 → 5.47.0

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 (112) hide show
  1. package/chunk-2RNKYO2Q.js +1 -0
  2. package/{chunk-ICH2UTRM.js → chunk-35UWKNGE.js} +1 -1
  3. package/{chunk-EL5BUFMO.js → chunk-3IEOINKV.js} +1 -1
  4. package/chunk-4X3G6MGP.js +1 -0
  5. package/{chunk-KGQGMXW6.js → chunk-53HJBLFX.js} +1 -1
  6. package/{chunk-EQ4PLHI4.js → chunk-53I5JFOQ.js} +1 -1
  7. package/{chunk-HG5MKVNR.js → chunk-5BXMDXZD.js} +1 -1
  8. package/chunk-5HZBSMCT.js +7 -0
  9. package/{chunk-QKRPHDSG.js → chunk-5JZTWUDG.js} +1 -1
  10. package/chunk-5K3KAKU5.js +1 -0
  11. package/{chunk-SZUKKFRX.js → chunk-5SYYPB6N.js} +1 -1
  12. package/{chunk-MYE27TEJ.js → chunk-5YO43YBO.js} +1 -1
  13. package/{chunk-Z2ADGCWR.js → chunk-6XE7LGUS.js} +1 -1
  14. package/chunk-6ZZZTNIH.js +130 -0
  15. package/{chunk-HXXN64RL.js → chunk-AHX56FH2.js} +1 -1
  16. package/chunk-AXU3K2IY.js +1 -0
  17. package/{chunk-2XUSZCQL.js → chunk-BUDZ3ONE.js} +1 -1
  18. package/{chunk-7UGQCTEO.js → chunk-C3IOIS5V.js} +1 -1
  19. package/chunk-CL4EKWSU.js +1 -0
  20. package/{chunk-A3XYHEBB.js → chunk-CWDU4F7J.js} +1 -1
  21. package/{chunk-LFZCMZAP.js → chunk-CWFLUFKM.js} +1 -1
  22. package/{chunk-YUNKEY4N.js → chunk-DEOAL7PG.js} +1 -1
  23. package/{chunk-6GN3MGBY.js → chunk-DHLFL3KH.js} +1 -1
  24. package/{chunk-NLRLM4WP.js → chunk-DRTMMJ4Q.js} +1 -1
  25. package/{chunk-QXZZJ543.js → chunk-DTFLX2XQ.js} +1 -1
  26. package/{chunk-JYEZYL2U.js → chunk-DU72RNAU.js} +1 -1
  27. package/{chunk-Q5CVMJZC.js → chunk-E4MHRZVH.js} +1 -1
  28. package/{chunk-Y3UB475V.js → chunk-EEJGJ7WF.js} +1 -1
  29. package/chunk-EIV4TELQ.js +1 -0
  30. package/{chunk-DAUF3TQ2.js → chunk-EPLZY6T4.js} +1 -1
  31. package/chunk-EQU7DDK6.js +1 -0
  32. package/chunk-ETFYQ4GV.js +1 -0
  33. package/{chunk-SLUPHKW6.js → chunk-F5CCLXIY.js} +1 -1
  34. package/{chunk-CVL3S2HY.js → chunk-GDQUB54I.js} +1 -1
  35. package/chunk-GJYEM7DL.js +1 -0
  36. package/{chunk-H7Q35Y7G.js → chunk-HQMTUZZQ.js} +1 -1
  37. package/{chunk-BLR3HBYP.js → chunk-HZ7BZ72K.js} +1 -1
  38. package/chunk-IMVMIXVJ.js +1028 -0
  39. package/{chunk-AS6FT6H3.js → chunk-IYFNOI7S.js} +1 -1
  40. package/{chunk-UP67MADL.js → chunk-JOHRJHEX.js} +1 -1
  41. package/{chunk-HAQ36ZI6.js → chunk-JZVNZ3I3.js} +1 -1
  42. package/{chunk-XILZA7G5.js → chunk-L2524E6T.js} +1 -1
  43. package/{chunk-NZN6QJR3.js → chunk-LABWETHZ.js} +1 -1
  44. package/{chunk-6A2KUPOG.js → chunk-LWYAFMN3.js} +1 -1
  45. package/{chunk-R7TX5W65.js → chunk-M3TKVRYP.js} +1 -1
  46. package/{chunk-BPZ7LLVJ.js → chunk-MBJKUKHJ.js} +1 -1
  47. package/chunk-ML5KV2U2.js +1 -0
  48. package/{chunk-G25NFEKL.js → chunk-MT3DTYJO.js} +1 -1
  49. package/{chunk-36OX4S7M.js → chunk-NDLX3ORI.js} +1 -1
  50. package/{chunk-FYFSBGP3.js → chunk-NHHXXJY6.js} +1 -1
  51. package/{chunk-N4JIPI53.js → chunk-NM5M567G.js} +1 -1
  52. package/{chunk-JGRTH5OW.js → chunk-OJ2VC4ER.js} +1 -1
  53. package/chunk-OLLF6BKH.js +1 -0
  54. package/{chunk-GKXIOXWW.js → chunk-OVEQKHUV.js} +2 -2
  55. package/{chunk-IZCYMXSH.js → chunk-OW25MQS7.js} +1 -1
  56. package/{chunk-XD7VHCRC.js → chunk-PKOERZXQ.js} +1 -1
  57. package/{chunk-NCDT6JPP.js → chunk-PTQPB44D.js} +1 -1
  58. package/{chunk-ZYDAEVQY.js → chunk-PXN4RATH.js} +1 -1
  59. package/chunk-Q47KHO2M.js +1 -0
  60. package/{chunk-EB6NEJHF.js → chunk-Q4LKKVQU.js} +1 -1
  61. package/{chunk-VJ3IBUVO.js → chunk-Q7SK53ST.js} +1 -1
  62. package/{chunk-Q24GCSGD.js → chunk-QWTGY7FA.js} +1 -1
  63. package/chunk-RF27SIL3.js +1 -0
  64. package/{chunk-R7N6BWL5.js → chunk-RXOOTYEO.js} +1 -1
  65. package/{chunk-O4TXGGHF.js → chunk-S3FQPUAS.js} +2 -2
  66. package/{chunk-2AAVNIG7.js → chunk-SEXB43QC.js} +1 -1
  67. package/chunk-SN7DLFX2.js +1 -0
  68. package/chunk-SS4J7T3N.js +1 -0
  69. package/{chunk-B54PFCWI.js → chunk-SZAGTA5I.js} +1 -1
  70. package/{chunk-7DYACF4D.js → chunk-T3EH4DR2.js} +1 -1
  71. package/chunk-TUFQ5JVG.js +180 -0
  72. package/{chunk-C2KFSD3V.js → chunk-V4B5LQYD.js} +1 -1
  73. package/{chunk-ARH3WEEF.js → chunk-V4SH72WU.js} +1 -1
  74. package/{chunk-IHZ55QSI.js → chunk-VK3G2VIU.js} +1 -1
  75. package/chunk-VL2HEHI5.js +1 -0
  76. package/{chunk-MOUK63TZ.js → chunk-VSHPIUZM.js} +1 -1
  77. package/{chunk-FXWKWGGZ.js → chunk-VTCV67A4.js} +1 -1
  78. package/{chunk-PQB7CIVB.js → chunk-WFIXL354.js} +1 -1
  79. package/{chunk-6HNKPNHQ.js → chunk-WGJFR6CK.js} +1 -1
  80. package/{chunk-PRW2K6L4.js → chunk-WPMC3LJJ.js} +3 -3
  81. package/{chunk-LWIIL6RI.js → chunk-XDJSQLQN.js} +1 -1
  82. package/{chunk-3GGXPPQT.js → chunk-XPRP6AB4.js} +1 -1
  83. package/{chunk-BPBHYTKN.js → chunk-XT4YHL2M.js} +1 -1
  84. package/{chunk-OVAQBQEJ.js → chunk-YFNWEI3R.js} +1 -1
  85. package/{chunk-MFK5RQPJ.js → chunk-YZTBV6HG.js} +1 -1
  86. package/{chunk-53W5RLOG.js → chunk-ZBO62XAM.js} +2 -2
  87. package/{chunk-KJ2WX3FC.js → chunk-ZMIVD3SF.js} +1 -1
  88. package/chunk-ZUDQOT7C.js +1 -0
  89. package/index.html +2 -2
  90. package/{main-7RGHX2IL.js → main-Q2T6QX2N.js} +1 -1
  91. package/package.json +1 -1
  92. package/chunk-325YO3CB.js +0 -1
  93. package/chunk-56N6E5N3.js +0 -130
  94. package/chunk-CRRQQY3W.js +0 -1
  95. package/chunk-H6HNANYB.js +0 -959
  96. package/chunk-KGTXHU4K.js +0 -1
  97. package/chunk-KYQ3HOYB.js +0 -1
  98. package/chunk-LLPR22QN.js +0 -1
  99. package/chunk-ME7O3OZS.js +0 -7
  100. package/chunk-NID2PW3N.js +0 -1
  101. package/chunk-OBX4APL6.js +0 -1
  102. package/chunk-OKX4P7HR.js +0 -1
  103. package/chunk-SBAIX6FL.js +0 -1
  104. package/chunk-SPFVPLUI.js +0 -1
  105. package/chunk-TOSO7HJJ.js +0 -1
  106. package/chunk-TYVIEINK.js +0 -1
  107. package/chunk-VBCL4G4V.js +0 -1
  108. package/chunk-VGNJD35F.js +0 -70
  109. package/chunk-W4HYYYPX.js +0 -1
  110. package/chunk-Y2PXP5OT.js +0 -180
  111. package/chunk-YM5BXLAN.js +0 -1
  112. package/chunk-YV2QJ63P.js +0 -1
@@ -1,4 +1,4 @@
1
- import{a as Yt,b as ei,c as ti,d as ii,e as oi,f as li}from"./chunk-IHZ55QSI.js";import{a as Zt,b as gi,c as ni}from"./chunk-HAQ36ZI6.js";import{a as kt,b as zt}from"./chunk-OVAQBQEJ.js";import{a as Xt}from"./chunk-A3XYHEBB.js";import{a as qe}from"./chunk-QF4D5YPK.js";import{a as Ot}from"./chunk-VJ3IBUVO.js";import{b as Be,c as Ke,d as Rt,e as Dt,f as Pt,g as Gt,h as Jt}from"./chunk-2AAVNIG7.js";import"./chunk-LFZCMZAP.js";import"./chunk-6A2KUPOG.js";import"./chunk-36OX4S7M.js";import{c as je}from"./chunk-Q5CVMJZC.js";import{a as Vt}from"./chunk-3GGXPPQT.js";import{a as Lt}from"./chunk-MFK5RQPJ.js";import{a as qt,b as Wt}from"./chunk-KJ2WX3FC.js";import{a as $e}from"./chunk-6GN3MGBY.js";import{a as Qe}from"./chunk-Q24GCSGD.js";import{e as Kt,f as $t,g as Ut,h as jt}from"./chunk-Y2PXP5OT.js";import{c as Qt}from"./chunk-VGNJD35F.js";import{a as At,b as Bt}from"./chunk-2XUSZCQL.js";import"./chunk-YV2QJ63P.js";import{i as Mt}from"./chunk-ARH3WEEF.js";import{a as He,b as Ae,i as Ue,p as Nt,w as Ft,x as Ht}from"./chunk-H6HNANYB.js";import"./chunk-2D2YD753.js";import{B as De,Ca as It,Ga as be,L as wt,La as _e,M as Pe,Ma as Fe,P as ie,Q as z,R as fe,S as Ve,Ua as Et,W as vt,X as St,Y as se,_ as ce,na as Ne,qa as xt,ra as V,sa as Oe,w as Ct,y as Me,z as Re}from"./chunk-OIBDX2CA.js";import{d as Tt}from"./chunk-AOOG6YOT.js";import"./chunk-R7TX5W65.js";import"./chunk-2MKKFLNJ.js";import{h as re,j as yt,k as G,l as Le,m as ae,s as me,t as ge}from"./chunk-VZ5CMS5O.js";import"./chunk-F2X3VGZZ.js";import{$b as D,$c as Q,Aa as S,Ba as le,Bb as xe,Cc as pt,Db as p,Dc as ee,Ec as P,Fa as Se,Fc as te,Gc as ht,Ha as X,Hc as ut,I as Ye,Jc as mt,Kb as ne,La as it,Lb as a,Mb as at,Nc as gt,Ob as Z,Pb as j,Pc as ft,Qb as Ie,Rb as Ee,Rc as x,Tb as ke,Ub as ze,Vb as d,Vc as bt,Wb as h,Xb as I,Yb as q,Zb as W,_ as Ce,_b as T,_c as w,ca as we,cd as _t,da as et,ec as k,fb as ot,fc as m,g as J,hb as s,ia as B,kc as _,lc as E,m as Ze,mb as lt,mc as g,nb as N,nc as f,pa as tt,qa as L,qc as Y,ra as M,rc as b,sc as A,tc as ue,ua as ve,wc as st,xb as U,xc as ct,yb as nt,yc as dt,zb as rt}from"./chunk-NMCKMUY4.js";import{a as $,b as he,e as mi}from"./chunk-YQFG5XE2.js";var _i=["colgroup"],yi=["caption"],Ti=["header"],Ci=["body"],wi=["footer"],vi=["summary"],Si=["emptymessage"],xi=["paginatorleft"],Ii=["paginatorright"],Ei=["paginatordropdownitem"],ki=["frozenheader"],zi=["frozenbody"],Li=["frozenfooter"],Mi=["frozencolgroup"],Ri=["loadingicon"],Di=["reorderindicatorupicon"],Pi=["reorderindicatordownicon"],Vi=["sorticon"],Ni=["checkboxicon"],Oi=["headercheckboxicon"],Fi=["togglericon"],Hi=["paginatorfirstpagelinkicon"],Ai=["paginatorlastpagelinkicon"],Bi=["paginatorpreviouspagelinkicon"],Ki=["paginatornextpagelinkicon"],$i=["loader"],Qi=["container"],Ui=["resizeHelper"],ji=["reorderIndicatorUp"],qi=["reorderIndicatorDown"],Wi=["table"],Gi=["scrollableView"],Ji=["scrollableFrozenView"],Xi=(t,r,e,o,i,l)=>({"p-treetable p-component":!0,"p-treetable-gridlines":t,"p-treetable-hoverable-rows":r,"p-treetable-auto-layout":e,"p-treetable-resizable":o,"p-treetable-resizable-fit":i,"p-treetable-flex-scrollable":l}),K=t=>({$implicit:t}),Zi=(t,r)=>({left:t,width:r}),Yi=t=>({width:t});function eo(t,r){if(t&1&&I(0,"i"),t&2){let e=m(2);j("p-treetable-loading-icon pi-spin "+e.loadingIcon)}}function to(t,r){t&1&&I(0,"SpinnerIcon",24),t&2&&a("spin",!0)("styleClass","p-treetable-loading-icon")}function io(t,r){}function oo(t,r){t&1&&p(0,io,0,0,"ng-template")}function lo(t,r){if(t&1&&(d(0,"span",25),p(1,oo,1,0,null,26),h()),t&2){let e=m(3);s(),a("ngTemplateOutlet",e.loadingIconTemplate||e._loadingIconTemplate)}}function no(t,r){if(t&1&&(q(0),p(1,to,1,2,"SpinnerIcon",22)(2,lo,2,1,"span",23),W()),t&2){let e=m(2);s(),a("ngIf",!e.loadingIconTemplate&&!e._loadingIconTemplate),s(),a("ngIf",e.loadingIconTemplate||e._loadingIconTemplate)}}function ro(t,r){if(t&1&&(d(0,"div",18)(1,"div",19),p(2,eo,1,2,"i",20)(3,no,3,2,"ng-container",21),h()()),t&2){let e=m();s(2),a("ngIf",e.loadingIcon),s(),a("ngIf",!e.loadingIcon)}}function ao(t,r){t&1&&T(0)}function so(t,r){if(t&1&&(d(0,"div",27),p(1,ao,1,0,"ng-container",26),h()),t&2){let e=m();s(),a("ngTemplateOutlet",e.captionTemplate||e._captionTemplate)}}function co(t,r){t&1&&T(0)}function po(t,r){if(t&1&&p(0,co,1,0,"ng-container",26),t&2){let e=m(3);a("ngTemplateOutlet",e.paginatorFirstPageLinkIconTemplate||e._paginatorFirstPageLinkIconTemplate)}}function ho(t,r){t&1&&p(0,po,1,1,"ng-template",29)}function uo(t,r){t&1&&T(0)}function mo(t,r){if(t&1&&p(0,uo,1,0,"ng-container",26),t&2){let e=m(3);a("ngTemplateOutlet",e.paginatorPreviousPageLinkIconTemplate||e._paginatorPreviousPageLinkIconTemplate)}}function go(t,r){t&1&&p(0,mo,1,1,"ng-template",30)}function fo(t,r){t&1&&T(0)}function bo(t,r){if(t&1&&p(0,fo,1,0,"ng-container",26),t&2){let e=m(3);a("ngTemplateOutlet",e.paginatorLastPageLinkIconTemplate||e._paginatorLastPageLinkIconTemplate)}}function _o(t,r){t&1&&p(0,bo,1,1,"ng-template",31)}function yo(t,r){t&1&&T(0)}function To(t,r){if(t&1&&p(0,yo,1,0,"ng-container",26),t&2){let e=m(3);a("ngTemplateOutlet",e.paginatorNextPageLinkIconTemplate||e._paginatorNextPageLinkIconTemplate)}}function Co(t,r){t&1&&p(0,To,1,1,"ng-template",32)}function wo(t,r){if(t&1){let e=D();d(0,"p-paginator",28),k("onPageChange",function(i){L(e);let l=m();return M(l.onPageChange(i))}),p(1,ho,1,0,null,21)(2,go,1,0,null,21)(3,_o,1,0,null,21)(4,Co,1,0,null,21),h()}if(t&2){let e,o,i,l=m();a("rows",l.rows)("first",l.first)("totalRecords",l.totalRecords)("pageLinkSize",l.pageLinks)("alwaysShow",l.alwaysShowPaginator)("rowsPerPageOptions",l.rowsPerPageOptions)("templateLeft",(e=l.paginatorLeftTemplate)!==null&&e!==void 0?e:l._paginatorLeftTemplate)("templateRight",(o=l.paginatorRightTemplate)!==null&&o!==void 0?o:l._paginatorRightTemplate)("dropdownAppendTo",l.paginatorDropdownAppendTo)("currentPageReportTemplate",l.currentPageReportTemplate)("showFirstLastIcon",l.showFirstLastIcon)("dropdownItemTemplate",(i=l.paginatorDropdownItemTemplate)!==null&&i!==void 0?i:l._paginatorDropdownItemTemplate)("showCurrentPageReport",l.showCurrentPageReport)("showJumpToPageDropdown",l.showJumpToPageDropdown)("showPageLinks",l.showPageLinks)("styleClass",l.paginatorStyleClass)("locale",l.paginatorLocale),s(),a("ngIf",l.paginatorFirstPageLinkIconTemplate||l._paginatorFirstPageLinkIconTemplate),s(),a("ngIf",l.paginatorPreviousPageLinkIconTemplate||l._paginatorPreviousPageLinkIconTemplate),s(),a("ngIf",l.paginatorLastPageLinkIconTemplate||l._paginatorLastPageLinkIconTemplate),s(),a("ngIf",l.paginatorNextPageLinkIconTemplate||l._paginatorNextPageLinkIconTemplate)}}function vo(t,r){t&1&&T(0)}function So(t,r){t&1&&T(0)}function xo(t,r){t&1&&T(0)}function Io(t,r){if(t&1&&(d(0,"div",33)(1,"table",34,1),p(3,vo,1,0,"ng-container",35),d(4,"thead",36),p(5,So,1,0,"ng-container",35),h(),I(6,"tbody",37),d(7,"tfoot",38),p(8,xo,1,0,"ng-container",35),h()()()),t&2){let e,o=m();s(),a("ngClass",o.tableStyleClass)("ngStyle",o.tableStyle),s(2),a("ngTemplateOutlet",o.colGroupTemplate||o._colGroupTemplate)("ngTemplateOutletContext",P(10,K,o.columns)),s(2),a("ngTemplateOutlet",o.headerTemplate||o._headerTemplate)("ngTemplateOutletContext",P(12,K,o.columns)),s(),a("pTreeTableBody",o.columns)("pTreeTableBodyTemplate",(e=o.bodyTemplate)!==null&&e!==void 0?e:o._bodyTemplate),s(2),a("ngTemplateOutlet",o.footerTemplate||o._footerTemplate)("ngTemplateOutletContext",P(14,K,o.columns))}}function Eo(t,r){if(t&1&&I(0,"div",42,3),t&2){let e=m(2);a("ttScrollableView",e.frozenColumns)("frozen",!0)("ngStyle",P(4,Yi,e.frozenWidth))("scrollHeight",e.scrollHeight)}}function ko(t,r){if(t&1&&(d(0,"div",39),p(1,Eo,2,6,"div",40),I(2,"div",41,2),h()),t&2){let e=m();s(),a("ngIf",e.frozenColumns||e.frozenBodyTemplate||e._frozenBodyTemplate),s(),a("ttScrollableView",e.columns)("frozen",!1)("scrollHeight",e.scrollHeight)("ngStyle",te(5,Zi,e.frozenWidth,"calc(100% - "+e.frozenWidth+")"))}}function zo(t,r){t&1&&T(0)}function Lo(t,r){if(t&1&&p(0,zo,1,0,"ng-container",26),t&2){let e=m(3);a("ngTemplateOutlet",e.paginatorFirstPageLinkIconTemplate||e._paginatorFirstPageLinkIconTemplate)}}function Mo(t,r){t&1&&p(0,Lo,1,1,"ng-template",29)}function Ro(t,r){t&1&&T(0)}function Do(t,r){if(t&1&&p(0,Ro,1,0,"ng-container",26),t&2){let e=m(3);a("ngTemplateOutlet",e.paginatorPreviousPageLinkIconTemplate||e._paginatorPreviousPageLinkIconTemplate)}}function Po(t,r){t&1&&p(0,Do,1,1,"ng-template",30)}function Vo(t,r){t&1&&T(0)}function No(t,r){if(t&1&&p(0,Vo,1,0,"ng-container",26),t&2){let e=m(3);a("ngTemplateOutlet",e.paginatorLastPageLinkIconTemplate||e._paginatorLastPageLinkIconTemplate)}}function Oo(t,r){t&1&&p(0,No,1,1,"ng-template",31)}function Fo(t,r){t&1&&T(0)}function Ho(t,r){if(t&1&&p(0,Fo,1,0,"ng-container",26),t&2){let e=m(3);a("ngTemplateOutlet",e.paginatorNextPageLinkIconTemplate||e._paginatorNextPageLinkIconTemplate)}}function Ao(t,r){t&1&&p(0,Ho,1,1,"ng-template",32)}function Bo(t,r){if(t&1){let e=D();d(0,"p-paginator",43),k("onPageChange",function(i){L(e);let l=m();return M(l.onPageChange(i))}),p(1,Mo,1,0,null,21)(2,Po,1,0,null,21)(3,Oo,1,0,null,21)(4,Ao,1,0,null,21),h()}if(t&2){let e,o,i,l=m();a("rows",l.rows)("first",l.first)("totalRecords",l.totalRecords)("pageLinkSize",l.pageLinks)("alwaysShow",l.alwaysShowPaginator)("rowsPerPageOptions",l.rowsPerPageOptions)("templateLeft",(e=l.paginatorLeftTemplate)!==null&&e!==void 0?e:l._paginatorLeftTemplate)("templateRight",(o=l.paginatorRightTemplate)!==null&&o!==void 0?o:l._paginatorRightTemplate)("dropdownAppendTo",l.paginatorDropdownAppendTo)("currentPageReportTemplate",l.currentPageReportTemplate)("showFirstLastIcon",l.showFirstLastIcon)("dropdownItemTemplate",(i=l.paginatorDropdownItemTemplate)!==null&&i!==void 0?i:l._paginatorDropdownItemTemplate)("showCurrentPageReport",l.showCurrentPageReport)("showJumpToPageDropdown",l.showJumpToPageDropdown)("showPageLinks",l.showPageLinks)("styleClass",l.paginatorStyleClass)("locale",l.paginatorLocale),s(),a("ngIf",l.paginatorFirstPageLinkIconTemplate||l._paginatorFirstPageLinkIconTemplate),s(),a("ngIf",l.paginatorPreviousPageLinkIconTemplate||l._paginatorPreviousPageLinkIconTemplate),s(),a("ngIf",l.paginatorLastPageLinkIconTemplate||l._paginatorLastPageLinkIconTemplate),s(),a("ngIf",l.paginatorNextPageLinkIconTemplate||l._paginatorNextPageLinkIconTemplate)}}function Ko(t,r){t&1&&T(0)}function $o(t,r){if(t&1&&(d(0,"div",44),p(1,Ko,1,0,"ng-container",26),h()),t&2){let e=m();s(),a("ngTemplateOutlet",e.summaryTemplate||e._summaryTemplate)}}function Qo(t,r){t&1&&I(0,"div",45,4)}function Uo(t,r){t&1&&I(0,"ArrowDownIcon")}function jo(t,r){}function qo(t,r){t&1&&p(0,jo,0,0,"ng-template")}function Wo(t,r){if(t&1&&(d(0,"span",46,5),p(2,Uo,1,0,"ArrowDownIcon",21)(3,qo,1,0,null,26),h()),t&2){let e=m();s(2),a("ngIf",!e.reorderIndicatorUpIconTemplate&&!e._reorderIndicatorUpIconTemplate),s(),a("ngTemplateOutlet",e.reorderIndicatorUpIconTemplate||e._reorderIndicatorUpIconTemplate)}}function Go(t,r){t&1&&I(0,"ArrowUpIcon")}function Jo(t,r){}function Xo(t,r){t&1&&p(0,Jo,0,0,"ng-template")}function Zo(t,r){if(t&1&&(d(0,"span",47,6),p(2,Go,1,0,"ArrowUpIcon",21)(3,Xo,1,0,null,26),h()),t&2){let e=m();s(2),a("ngIf",!e.reorderIndicatorDownIconTemplate&&!e._reorderIndicatorDownIconTemplate),s(),a("ngTemplateOutlet",e.reorderIndicatorDownIconTemplate||e._reorderIndicatorDownIconTemplate)}}var Yo=["pTreeTableBody",""],el=(t,r,e,o)=>({$implicit:t,node:r,rowData:e,columns:o}),tl=(t,r)=>({$implicit:t,frozen:r});function il(t,r){t&1&&T(0)}function ol(t,r){if(t&1&&(q(0),p(1,il,1,0,"ng-container",2),W()),t&2){let e=m().$implicit,o=m();s(),a("ngTemplateOutlet",o.template)("ngTemplateOutletContext",ut(2,el,e,e.node,e.node.data,o.columns))}}function ll(t,r){if(t&1&&p(0,ol,2,7,"ng-container",1),t&2){let e=r.$implicit;a("ngIf",e.visible)}}function nl(t,r){t&1&&T(0)}function rl(t,r){if(t&1&&(q(0),p(1,nl,1,0,"ng-container",2),W()),t&2){let e=m();s(),a("ngTemplateOutlet",e.tt.emptyMessageTemplate)("ngTemplateOutletContext",te(2,tl,e.columns,e.frozen))}}var al=["scrollHeader"],sl=["scrollHeaderBox"],cl=["scrollBody"],dl=["scrollTable"],pl=["loadingTable"],hl=["scrollFooter"],ul=["scrollFooterBox"],ml=["scrollableAligner"],gl=["scroller"],fl=["ttScrollableView",""],bl=t=>({height:t}),ai=(t,r)=>({$implicit:t,options:r}),_l=t=>({options:t}),yl=(t,r)=>({"max-height":t,"overflow-y":r}),Tl=()=>({});function Cl(t,r){t&1&&T(0)}function wl(t,r){t&1&&T(0)}function vl(t,r){t&1&&T(0)}function Sl(t,r){if(t&1&&p(0,vl,1,0,"ng-container",14),t&2){let e=r.$implicit,o=r.options;m(2);let i=Y(11);a("ngTemplateOutlet",i)("ngTemplateOutletContext",te(2,ai,e,o))}}function xl(t,r){t&1&&T(0)}function Il(t,r){if(t&1&&p(0,xl,1,0,"ng-container",14),t&2){let e=r.options,o=m(3);a("ngTemplateOutlet",o.tt.loaderTemplate||o.tt._loaderTemplate)("ngTemplateOutletContext",P(2,_l,e))}}function El(t,r){t&1&&(q(0),p(1,Il,1,4,"ng-template",null,5,x),W())}function kl(t,r){if(t&1){let e=D();d(0,"p-scroller",19,3),k("onLazyLoad",function(i){L(e);let l=m();return M(l.tt.onLazyItemLoad(i))}),p(2,Sl,1,5,"ng-template",null,4,x)(4,El,3,0,"ng-container",17),h()}if(t&2){let e=m();Z(P(8,bl,e.tt.scrollHeight!=="flex"?e.tt.scrollHeight:void 0)),a("items",e.tt.serializedValue)("scrollHeight",e.scrollHeight!=="flex"?void 0:"100%")("itemSize",e.tt.virtualScrollItemSize||e.tt._virtualRowHeight)("lazy",e.tt.lazy)("options",e.tt.virtualScrollOptions),s(4),a("ngIf",e.tt.loaderTemplate||e.tt._loaderTemplate)}}function zl(t,r){t&1&&T(0)}function Ll(t,r){if(t&1&&(q(0),d(1,"div",20,6),p(3,zl,1,0,"ng-container",14),h(),W()),t&2){let e=m(),o=Y(11);s(),a("ngStyle",te(3,yl,e.tt.scrollHeight!=="flex"?e.scrollHeight:void 0,!e.frozen&&e.tt.scrollHeight?"scroll":void 0)),s(2),a("ngTemplateOutlet",o)("ngTemplateOutletContext",te(7,ai,e.serializedValue,ee(6,Tl)))}}function Ml(t,r){t&1&&T(0)}function Rl(t,r){t&1&&I(0,"div",24,8)}function Dl(t,r){if(t&1&&(d(0,"table",21,7),p(2,Ml,1,0,"ng-container",14),I(3,"tbody",22),h(),p(4,Rl,2,0,"div",23)),t&2){let e=r.$implicit,o=r.options,i=m();Z(o.contentStyle),j(i.tt.tableStyleClass),a("ngClass",o.contentStyleClass)("ngStyle",i.tt.tableStyle),s(2),a("ngTemplateOutlet",i.frozen?i.tt.frozenColGroupTemplate||i.tt._frozenColGroupTemplate||i.tt.colGroupTemplate||i.tt._colGroupTemplate:i.tt.colGroupTemplate||i.tt._colGroupTemplate)("ngTemplateOutletContext",P(13,K,i.columns)),s(),a("pTreeTableBody",i.columns)("pTreeTableBodyTemplate",i.frozen?i.tt.frozenBodyTemplate||i.tt._frozenBodyTemplate||i.tt.bodyTemplate||i.tt._bodyTemplate:i.tt.bodyTemplate||i.tt._bodyTemplate)("serializedNodes",e)("frozen",i.frozen),s(),a("ngIf",i.frozen)}}function Pl(t,r){t&1&&T(0)}function Vl(t,r){t&1&&T(0)}function Nl(t,r){if(t&1&&(d(0,"div",25,9)(2,"div",26,10)(4,"table",27),p(5,Pl,1,0,"ng-container",14),d(6,"tfoot",28),p(7,Vl,1,0,"ng-container",14),h()()()()),t&2){let e=m();s(4),a("ngClass",e.tt.tableStyleClass)("ngStyle",e.tt.tableStyle),s(),a("ngTemplateOutlet",e.frozen?e.tt.frozenColGroupTemplate||e.tt._frozenColGroupTemplate||e.tt.colGroupTemplate||e.tt._colGroupTemplate:e.tt.colGroupTemplate||e.tt._colGroupTemplate)("ngTemplateOutletContext",P(6,K,e.columns)),s(2),a("ngTemplateOutlet",e.frozen?e.tt.frozenFooterTemplate||e.tt._frozenFooterTemplate||e.tt.footerTemplate||e.tt._footerTemplate:e.tt.footerTemplate||e.tt._footerTemplate)("ngTemplateOutletContext",P(8,K,e.columns))}}function Ol(t,r){t&1&&I(0,"ChevronDownIcon"),t&2&&ne("aria-hidden",!0)}function Fl(t,r){t&1&&I(0,"ChevronRightIcon"),t&2&&ne("aria-hidden",!0)}function Hl(t,r){if(t&1&&(q(0),p(1,Ol,1,1,"ChevronDownIcon",1)(2,Fl,1,1,"ChevronRightIcon",1),W()),t&2){let e=m();s(),a("ngIf",e.rowNode.node.expanded),s(),a("ngIf",!e.rowNode.node.expanded)}}function Al(t,r){}function Bl(t,r){t&1&&p(0,Al,0,0,"ng-template")}var Kl=({dt:t})=>`
1
+ import{a as Yt,b as ei,c as ti,d as ii,e as oi,f as li}from"./chunk-VK3G2VIU.js";import{a as Zt,b as gi,c as ni}from"./chunk-JZVNZ3I3.js";import{a as kt,b as zt}from"./chunk-YFNWEI3R.js";import{a as Xt}from"./chunk-CWDU4F7J.js";import{a as qe}from"./chunk-QF4D5YPK.js";import{a as Ot}from"./chunk-Q7SK53ST.js";import{b as Be,c as Ke,d as Rt,e as Dt,f as Pt,g as Gt,h as Jt}from"./chunk-SEXB43QC.js";import"./chunk-CWFLUFKM.js";import"./chunk-LWYAFMN3.js";import"./chunk-NDLX3ORI.js";import{c as je}from"./chunk-E4MHRZVH.js";import{a as Vt}from"./chunk-XPRP6AB4.js";import{a as Lt}from"./chunk-YZTBV6HG.js";import{a as qt,b as Wt}from"./chunk-ZMIVD3SF.js";import{a as $e}from"./chunk-DHLFL3KH.js";import{a as Qe}from"./chunk-QWTGY7FA.js";import{e as Qt,f as Ut,g as jt}from"./chunk-TUFQ5JVG.js";import"./chunk-ZUDQOT7C.js";import{a as At,b as Bt}from"./chunk-BUDZ3ONE.js";import{a as $t}from"./chunk-SN7DLFX2.js";import{i as Mt}from"./chunk-V4SH72WU.js";import{a as He,b as Ae,i as Ue,p as Nt,w as Ft,x as Ht,z as Kt}from"./chunk-IMVMIXVJ.js";import"./chunk-2D2YD753.js";import{B as De,Ca as It,Ga as be,L as wt,La as _e,M as Pe,Ma as Fe,P as ie,Q as z,R as fe,S as Ve,Ua as Et,W as vt,X as St,Y as se,_ as ce,na as Ne,qa as xt,ra as V,sa as Oe,w as Ct,y as Me,z as Re}from"./chunk-OIBDX2CA.js";import{d as Tt}from"./chunk-AOOG6YOT.js";import"./chunk-M3TKVRYP.js";import"./chunk-2MKKFLNJ.js";import{h as re,j as yt,k as G,l as Le,m as ae,s as me,t as ge}from"./chunk-VZ5CMS5O.js";import"./chunk-F2X3VGZZ.js";import{$b as D,$c as Q,Aa as S,Ba as le,Bb as xe,Cc as pt,Db as p,Dc as ee,Ec as P,Fa as Se,Fc as te,Gc as ht,Ha as X,Hc as ut,I as Ye,Jc as mt,Kb as ne,La as it,Lb as a,Mb as at,Nc as gt,Ob as Z,Pb as j,Pc as ft,Qb as Ie,Rb as Ee,Rc as x,Tb as ke,Ub as ze,Vb as d,Vc as bt,Wb as h,Xb as I,Yb as q,Zb as W,_ as Ce,_b as T,_c as w,ca as we,cd as _t,da as et,ec as k,fb as ot,fc as m,g as J,hb as s,ia as B,kc as _,lc as E,m as Ze,mb as lt,mc as g,nb as N,nc as f,pa as tt,qa as L,qc as Y,ra as M,rc as b,sc as A,tc as ue,ua as ve,wc as st,xb as U,xc as ct,yb as nt,yc as dt,zb as rt}from"./chunk-NMCKMUY4.js";import{a as $,b as he,e as mi}from"./chunk-YQFG5XE2.js";var _i=["colgroup"],yi=["caption"],Ti=["header"],Ci=["body"],wi=["footer"],vi=["summary"],Si=["emptymessage"],xi=["paginatorleft"],Ii=["paginatorright"],Ei=["paginatordropdownitem"],ki=["frozenheader"],zi=["frozenbody"],Li=["frozenfooter"],Mi=["frozencolgroup"],Ri=["loadingicon"],Di=["reorderindicatorupicon"],Pi=["reorderindicatordownicon"],Vi=["sorticon"],Ni=["checkboxicon"],Oi=["headercheckboxicon"],Fi=["togglericon"],Hi=["paginatorfirstpagelinkicon"],Ai=["paginatorlastpagelinkicon"],Bi=["paginatorpreviouspagelinkicon"],Ki=["paginatornextpagelinkicon"],$i=["loader"],Qi=["container"],Ui=["resizeHelper"],ji=["reorderIndicatorUp"],qi=["reorderIndicatorDown"],Wi=["table"],Gi=["scrollableView"],Ji=["scrollableFrozenView"],Xi=(t,r,e,o,i,l)=>({"p-treetable p-component":!0,"p-treetable-gridlines":t,"p-treetable-hoverable-rows":r,"p-treetable-auto-layout":e,"p-treetable-resizable":o,"p-treetable-resizable-fit":i,"p-treetable-flex-scrollable":l}),K=t=>({$implicit:t}),Zi=(t,r)=>({left:t,width:r}),Yi=t=>({width:t});function eo(t,r){if(t&1&&I(0,"i"),t&2){let e=m(2);j("p-treetable-loading-icon pi-spin "+e.loadingIcon)}}function to(t,r){t&1&&I(0,"SpinnerIcon",24),t&2&&a("spin",!0)("styleClass","p-treetable-loading-icon")}function io(t,r){}function oo(t,r){t&1&&p(0,io,0,0,"ng-template")}function lo(t,r){if(t&1&&(d(0,"span",25),p(1,oo,1,0,null,26),h()),t&2){let e=m(3);s(),a("ngTemplateOutlet",e.loadingIconTemplate||e._loadingIconTemplate)}}function no(t,r){if(t&1&&(q(0),p(1,to,1,2,"SpinnerIcon",22)(2,lo,2,1,"span",23),W()),t&2){let e=m(2);s(),a("ngIf",!e.loadingIconTemplate&&!e._loadingIconTemplate),s(),a("ngIf",e.loadingIconTemplate||e._loadingIconTemplate)}}function ro(t,r){if(t&1&&(d(0,"div",18)(1,"div",19),p(2,eo,1,2,"i",20)(3,no,3,2,"ng-container",21),h()()),t&2){let e=m();s(2),a("ngIf",e.loadingIcon),s(),a("ngIf",!e.loadingIcon)}}function ao(t,r){t&1&&T(0)}function so(t,r){if(t&1&&(d(0,"div",27),p(1,ao,1,0,"ng-container",26),h()),t&2){let e=m();s(),a("ngTemplateOutlet",e.captionTemplate||e._captionTemplate)}}function co(t,r){t&1&&T(0)}function po(t,r){if(t&1&&p(0,co,1,0,"ng-container",26),t&2){let e=m(3);a("ngTemplateOutlet",e.paginatorFirstPageLinkIconTemplate||e._paginatorFirstPageLinkIconTemplate)}}function ho(t,r){t&1&&p(0,po,1,1,"ng-template",29)}function uo(t,r){t&1&&T(0)}function mo(t,r){if(t&1&&p(0,uo,1,0,"ng-container",26),t&2){let e=m(3);a("ngTemplateOutlet",e.paginatorPreviousPageLinkIconTemplate||e._paginatorPreviousPageLinkIconTemplate)}}function go(t,r){t&1&&p(0,mo,1,1,"ng-template",30)}function fo(t,r){t&1&&T(0)}function bo(t,r){if(t&1&&p(0,fo,1,0,"ng-container",26),t&2){let e=m(3);a("ngTemplateOutlet",e.paginatorLastPageLinkIconTemplate||e._paginatorLastPageLinkIconTemplate)}}function _o(t,r){t&1&&p(0,bo,1,1,"ng-template",31)}function yo(t,r){t&1&&T(0)}function To(t,r){if(t&1&&p(0,yo,1,0,"ng-container",26),t&2){let e=m(3);a("ngTemplateOutlet",e.paginatorNextPageLinkIconTemplate||e._paginatorNextPageLinkIconTemplate)}}function Co(t,r){t&1&&p(0,To,1,1,"ng-template",32)}function wo(t,r){if(t&1){let e=D();d(0,"p-paginator",28),k("onPageChange",function(i){L(e);let l=m();return M(l.onPageChange(i))}),p(1,ho,1,0,null,21)(2,go,1,0,null,21)(3,_o,1,0,null,21)(4,Co,1,0,null,21),h()}if(t&2){let e,o,i,l=m();a("rows",l.rows)("first",l.first)("totalRecords",l.totalRecords)("pageLinkSize",l.pageLinks)("alwaysShow",l.alwaysShowPaginator)("rowsPerPageOptions",l.rowsPerPageOptions)("templateLeft",(e=l.paginatorLeftTemplate)!==null&&e!==void 0?e:l._paginatorLeftTemplate)("templateRight",(o=l.paginatorRightTemplate)!==null&&o!==void 0?o:l._paginatorRightTemplate)("dropdownAppendTo",l.paginatorDropdownAppendTo)("currentPageReportTemplate",l.currentPageReportTemplate)("showFirstLastIcon",l.showFirstLastIcon)("dropdownItemTemplate",(i=l.paginatorDropdownItemTemplate)!==null&&i!==void 0?i:l._paginatorDropdownItemTemplate)("showCurrentPageReport",l.showCurrentPageReport)("showJumpToPageDropdown",l.showJumpToPageDropdown)("showPageLinks",l.showPageLinks)("styleClass",l.paginatorStyleClass)("locale",l.paginatorLocale),s(),a("ngIf",l.paginatorFirstPageLinkIconTemplate||l._paginatorFirstPageLinkIconTemplate),s(),a("ngIf",l.paginatorPreviousPageLinkIconTemplate||l._paginatorPreviousPageLinkIconTemplate),s(),a("ngIf",l.paginatorLastPageLinkIconTemplate||l._paginatorLastPageLinkIconTemplate),s(),a("ngIf",l.paginatorNextPageLinkIconTemplate||l._paginatorNextPageLinkIconTemplate)}}function vo(t,r){t&1&&T(0)}function So(t,r){t&1&&T(0)}function xo(t,r){t&1&&T(0)}function Io(t,r){if(t&1&&(d(0,"div",33)(1,"table",34,1),p(3,vo,1,0,"ng-container",35),d(4,"thead",36),p(5,So,1,0,"ng-container",35),h(),I(6,"tbody",37),d(7,"tfoot",38),p(8,xo,1,0,"ng-container",35),h()()()),t&2){let e,o=m();s(),a("ngClass",o.tableStyleClass)("ngStyle",o.tableStyle),s(2),a("ngTemplateOutlet",o.colGroupTemplate||o._colGroupTemplate)("ngTemplateOutletContext",P(10,K,o.columns)),s(2),a("ngTemplateOutlet",o.headerTemplate||o._headerTemplate)("ngTemplateOutletContext",P(12,K,o.columns)),s(),a("pTreeTableBody",o.columns)("pTreeTableBodyTemplate",(e=o.bodyTemplate)!==null&&e!==void 0?e:o._bodyTemplate),s(2),a("ngTemplateOutlet",o.footerTemplate||o._footerTemplate)("ngTemplateOutletContext",P(14,K,o.columns))}}function Eo(t,r){if(t&1&&I(0,"div",42,3),t&2){let e=m(2);a("ttScrollableView",e.frozenColumns)("frozen",!0)("ngStyle",P(4,Yi,e.frozenWidth))("scrollHeight",e.scrollHeight)}}function ko(t,r){if(t&1&&(d(0,"div",39),p(1,Eo,2,6,"div",40),I(2,"div",41,2),h()),t&2){let e=m();s(),a("ngIf",e.frozenColumns||e.frozenBodyTemplate||e._frozenBodyTemplate),s(),a("ttScrollableView",e.columns)("frozen",!1)("scrollHeight",e.scrollHeight)("ngStyle",te(5,Zi,e.frozenWidth,"calc(100% - "+e.frozenWidth+")"))}}function zo(t,r){t&1&&T(0)}function Lo(t,r){if(t&1&&p(0,zo,1,0,"ng-container",26),t&2){let e=m(3);a("ngTemplateOutlet",e.paginatorFirstPageLinkIconTemplate||e._paginatorFirstPageLinkIconTemplate)}}function Mo(t,r){t&1&&p(0,Lo,1,1,"ng-template",29)}function Ro(t,r){t&1&&T(0)}function Do(t,r){if(t&1&&p(0,Ro,1,0,"ng-container",26),t&2){let e=m(3);a("ngTemplateOutlet",e.paginatorPreviousPageLinkIconTemplate||e._paginatorPreviousPageLinkIconTemplate)}}function Po(t,r){t&1&&p(0,Do,1,1,"ng-template",30)}function Vo(t,r){t&1&&T(0)}function No(t,r){if(t&1&&p(0,Vo,1,0,"ng-container",26),t&2){let e=m(3);a("ngTemplateOutlet",e.paginatorLastPageLinkIconTemplate||e._paginatorLastPageLinkIconTemplate)}}function Oo(t,r){t&1&&p(0,No,1,1,"ng-template",31)}function Fo(t,r){t&1&&T(0)}function Ho(t,r){if(t&1&&p(0,Fo,1,0,"ng-container",26),t&2){let e=m(3);a("ngTemplateOutlet",e.paginatorNextPageLinkIconTemplate||e._paginatorNextPageLinkIconTemplate)}}function Ao(t,r){t&1&&p(0,Ho,1,1,"ng-template",32)}function Bo(t,r){if(t&1){let e=D();d(0,"p-paginator",43),k("onPageChange",function(i){L(e);let l=m();return M(l.onPageChange(i))}),p(1,Mo,1,0,null,21)(2,Po,1,0,null,21)(3,Oo,1,0,null,21)(4,Ao,1,0,null,21),h()}if(t&2){let e,o,i,l=m();a("rows",l.rows)("first",l.first)("totalRecords",l.totalRecords)("pageLinkSize",l.pageLinks)("alwaysShow",l.alwaysShowPaginator)("rowsPerPageOptions",l.rowsPerPageOptions)("templateLeft",(e=l.paginatorLeftTemplate)!==null&&e!==void 0?e:l._paginatorLeftTemplate)("templateRight",(o=l.paginatorRightTemplate)!==null&&o!==void 0?o:l._paginatorRightTemplate)("dropdownAppendTo",l.paginatorDropdownAppendTo)("currentPageReportTemplate",l.currentPageReportTemplate)("showFirstLastIcon",l.showFirstLastIcon)("dropdownItemTemplate",(i=l.paginatorDropdownItemTemplate)!==null&&i!==void 0?i:l._paginatorDropdownItemTemplate)("showCurrentPageReport",l.showCurrentPageReport)("showJumpToPageDropdown",l.showJumpToPageDropdown)("showPageLinks",l.showPageLinks)("styleClass",l.paginatorStyleClass)("locale",l.paginatorLocale),s(),a("ngIf",l.paginatorFirstPageLinkIconTemplate||l._paginatorFirstPageLinkIconTemplate),s(),a("ngIf",l.paginatorPreviousPageLinkIconTemplate||l._paginatorPreviousPageLinkIconTemplate),s(),a("ngIf",l.paginatorLastPageLinkIconTemplate||l._paginatorLastPageLinkIconTemplate),s(),a("ngIf",l.paginatorNextPageLinkIconTemplate||l._paginatorNextPageLinkIconTemplate)}}function Ko(t,r){t&1&&T(0)}function $o(t,r){if(t&1&&(d(0,"div",44),p(1,Ko,1,0,"ng-container",26),h()),t&2){let e=m();s(),a("ngTemplateOutlet",e.summaryTemplate||e._summaryTemplate)}}function Qo(t,r){t&1&&I(0,"div",45,4)}function Uo(t,r){t&1&&I(0,"ArrowDownIcon")}function jo(t,r){}function qo(t,r){t&1&&p(0,jo,0,0,"ng-template")}function Wo(t,r){if(t&1&&(d(0,"span",46,5),p(2,Uo,1,0,"ArrowDownIcon",21)(3,qo,1,0,null,26),h()),t&2){let e=m();s(2),a("ngIf",!e.reorderIndicatorUpIconTemplate&&!e._reorderIndicatorUpIconTemplate),s(),a("ngTemplateOutlet",e.reorderIndicatorUpIconTemplate||e._reorderIndicatorUpIconTemplate)}}function Go(t,r){t&1&&I(0,"ArrowUpIcon")}function Jo(t,r){}function Xo(t,r){t&1&&p(0,Jo,0,0,"ng-template")}function Zo(t,r){if(t&1&&(d(0,"span",47,6),p(2,Go,1,0,"ArrowUpIcon",21)(3,Xo,1,0,null,26),h()),t&2){let e=m();s(2),a("ngIf",!e.reorderIndicatorDownIconTemplate&&!e._reorderIndicatorDownIconTemplate),s(),a("ngTemplateOutlet",e.reorderIndicatorDownIconTemplate||e._reorderIndicatorDownIconTemplate)}}var Yo=["pTreeTableBody",""],el=(t,r,e,o)=>({$implicit:t,node:r,rowData:e,columns:o}),tl=(t,r)=>({$implicit:t,frozen:r});function il(t,r){t&1&&T(0)}function ol(t,r){if(t&1&&(q(0),p(1,il,1,0,"ng-container",2),W()),t&2){let e=m().$implicit,o=m();s(),a("ngTemplateOutlet",o.template)("ngTemplateOutletContext",ut(2,el,e,e.node,e.node.data,o.columns))}}function ll(t,r){if(t&1&&p(0,ol,2,7,"ng-container",1),t&2){let e=r.$implicit;a("ngIf",e.visible)}}function nl(t,r){t&1&&T(0)}function rl(t,r){if(t&1&&(q(0),p(1,nl,1,0,"ng-container",2),W()),t&2){let e=m();s(),a("ngTemplateOutlet",e.tt.emptyMessageTemplate)("ngTemplateOutletContext",te(2,tl,e.columns,e.frozen))}}var al=["scrollHeader"],sl=["scrollHeaderBox"],cl=["scrollBody"],dl=["scrollTable"],pl=["loadingTable"],hl=["scrollFooter"],ul=["scrollFooterBox"],ml=["scrollableAligner"],gl=["scroller"],fl=["ttScrollableView",""],bl=t=>({height:t}),ai=(t,r)=>({$implicit:t,options:r}),_l=t=>({options:t}),yl=(t,r)=>({"max-height":t,"overflow-y":r}),Tl=()=>({});function Cl(t,r){t&1&&T(0)}function wl(t,r){t&1&&T(0)}function vl(t,r){t&1&&T(0)}function Sl(t,r){if(t&1&&p(0,vl,1,0,"ng-container",14),t&2){let e=r.$implicit,o=r.options;m(2);let i=Y(11);a("ngTemplateOutlet",i)("ngTemplateOutletContext",te(2,ai,e,o))}}function xl(t,r){t&1&&T(0)}function Il(t,r){if(t&1&&p(0,xl,1,0,"ng-container",14),t&2){let e=r.options,o=m(3);a("ngTemplateOutlet",o.tt.loaderTemplate||o.tt._loaderTemplate)("ngTemplateOutletContext",P(2,_l,e))}}function El(t,r){t&1&&(q(0),p(1,Il,1,4,"ng-template",null,5,x),W())}function kl(t,r){if(t&1){let e=D();d(0,"p-scroller",19,3),k("onLazyLoad",function(i){L(e);let l=m();return M(l.tt.onLazyItemLoad(i))}),p(2,Sl,1,5,"ng-template",null,4,x)(4,El,3,0,"ng-container",17),h()}if(t&2){let e=m();Z(P(8,bl,e.tt.scrollHeight!=="flex"?e.tt.scrollHeight:void 0)),a("items",e.tt.serializedValue)("scrollHeight",e.scrollHeight!=="flex"?void 0:"100%")("itemSize",e.tt.virtualScrollItemSize||e.tt._virtualRowHeight)("lazy",e.tt.lazy)("options",e.tt.virtualScrollOptions),s(4),a("ngIf",e.tt.loaderTemplate||e.tt._loaderTemplate)}}function zl(t,r){t&1&&T(0)}function Ll(t,r){if(t&1&&(q(0),d(1,"div",20,6),p(3,zl,1,0,"ng-container",14),h(),W()),t&2){let e=m(),o=Y(11);s(),a("ngStyle",te(3,yl,e.tt.scrollHeight!=="flex"?e.scrollHeight:void 0,!e.frozen&&e.tt.scrollHeight?"scroll":void 0)),s(2),a("ngTemplateOutlet",o)("ngTemplateOutletContext",te(7,ai,e.serializedValue,ee(6,Tl)))}}function Ml(t,r){t&1&&T(0)}function Rl(t,r){t&1&&I(0,"div",24,8)}function Dl(t,r){if(t&1&&(d(0,"table",21,7),p(2,Ml,1,0,"ng-container",14),I(3,"tbody",22),h(),p(4,Rl,2,0,"div",23)),t&2){let e=r.$implicit,o=r.options,i=m();Z(o.contentStyle),j(i.tt.tableStyleClass),a("ngClass",o.contentStyleClass)("ngStyle",i.tt.tableStyle),s(2),a("ngTemplateOutlet",i.frozen?i.tt.frozenColGroupTemplate||i.tt._frozenColGroupTemplate||i.tt.colGroupTemplate||i.tt._colGroupTemplate:i.tt.colGroupTemplate||i.tt._colGroupTemplate)("ngTemplateOutletContext",P(13,K,i.columns)),s(),a("pTreeTableBody",i.columns)("pTreeTableBodyTemplate",i.frozen?i.tt.frozenBodyTemplate||i.tt._frozenBodyTemplate||i.tt.bodyTemplate||i.tt._bodyTemplate:i.tt.bodyTemplate||i.tt._bodyTemplate)("serializedNodes",e)("frozen",i.frozen),s(),a("ngIf",i.frozen)}}function Pl(t,r){t&1&&T(0)}function Vl(t,r){t&1&&T(0)}function Nl(t,r){if(t&1&&(d(0,"div",25,9)(2,"div",26,10)(4,"table",27),p(5,Pl,1,0,"ng-container",14),d(6,"tfoot",28),p(7,Vl,1,0,"ng-container",14),h()()()()),t&2){let e=m();s(4),a("ngClass",e.tt.tableStyleClass)("ngStyle",e.tt.tableStyle),s(),a("ngTemplateOutlet",e.frozen?e.tt.frozenColGroupTemplate||e.tt._frozenColGroupTemplate||e.tt.colGroupTemplate||e.tt._colGroupTemplate:e.tt.colGroupTemplate||e.tt._colGroupTemplate)("ngTemplateOutletContext",P(6,K,e.columns)),s(2),a("ngTemplateOutlet",e.frozen?e.tt.frozenFooterTemplate||e.tt._frozenFooterTemplate||e.tt.footerTemplate||e.tt._footerTemplate:e.tt.footerTemplate||e.tt._footerTemplate)("ngTemplateOutletContext",P(8,K,e.columns))}}function Ol(t,r){t&1&&I(0,"ChevronDownIcon"),t&2&&ne("aria-hidden",!0)}function Fl(t,r){t&1&&I(0,"ChevronRightIcon"),t&2&&ne("aria-hidden",!0)}function Hl(t,r){if(t&1&&(q(0),p(1,Ol,1,1,"ChevronDownIcon",1)(2,Fl,1,1,"ChevronRightIcon",1),W()),t&2){let e=m();s(),a("ngIf",e.rowNode.node.expanded),s(),a("ngIf",!e.rowNode.node.expanded)}}function Al(t,r){}function Bl(t,r){t&1&&p(0,Al,0,0,"ng-template")}var Kl=({dt:t})=>`
2
2
  /* For PrimeNG */
3
3
  .p-treetable {
4
4
  position: relative;
@@ -446,4 +446,4 @@ p-treetable-toggler + p-treetable-checkbox + span,
446
446
  p-tree-table-toggler + p-tree-table-checkbox + span {
447
447
  vertical-align: middle;
448
448
  }
449
- `,$l={root:({instance:t})=>({"p-treetable p-component":!0,"p-treetable-hoverable":t.rowHover||t.selectionMode,"p-treetable-resizable":t.resizableColumns,"p-treetable-resizable-fit":t.resizableColumns&&t.columnResizeMode==="fit","p-treetable-scrollable":t.scrollable,"p-treetable-flex-scrollable":t.scrollable&&t.scrollHeight==="flex","p-treetable-gridlines":t.showGridlines,"p-treetable-sm":t.size==="small","p-treetable-lg":t.size==="large"}),loading:"p-treetable-loading",mask:"p-treetable-mask p-overlay-mask",loadingIcon:"p-treetable-loading-icon",header:"p-treetable-header",paginator:({instance:t})=>"p-treetable-paginator-"+t.paginatorPosition,tableContainer:"p-treetable-table-container",table:({instance:t})=>({"p-treetable-table":!0,"p-treetable-scrollable-table":t.scrollable,"p-treetable-resizable-table":t.resizableColumns,"p-treetable-resizable-table-fit":t.resizableColumns&&t.columnResizeMode==="fit"}),thead:"p-treetable-thead",headerCell:({instance:t})=>({"p-treetable-header-cell":!0,"p-treetable-sortable-column":t.sortable,"p-treetable-resizable-column":t.resizableColumns,"p-treetable-column-sorted":t?.sorted,"p-treetable-frozen-column":t.columnProp("frozen")}),columnResizer:"p-treetable-column-resizer",columnHeaderContent:"p-treetable-column-header-content",columnTitle:"p-treetable-column-title",sortIcon:"p-treetable-sort-icon",pcSortBadge:"p-treetable-sort-badge",tbody:"p-treetable-tbody",row:({instance:t})=>({"p-treetable-row-selected":t.selected}),bodyCell:({instance:t})=>({"p-treetable-frozen-column":t.columnProp("frozen")}),bodyCellContent:({instance:t})=>({"p-treetable-body-cell-content":!0,"p-treetable-body-cell-content-expander":t.columnProp("expander")}),toggler:"p-treetable-body-cell-content-expander",nodeToggleButton:"p-treetable-node-toggle-button",nodeToggleIcon:"p-treetable-node-toggle-icon",pcNodeCheckbox:"p-treetable-node-checkbox",emptyMessage:"p-treetable-empty-message",tfoot:"p-treetable-tfoot",footerCell:({instance:t})=>({"p-treetable-frozen-column":t.columnProp("frozen")}),footer:"p-treetable-footer",columnResizeIndicator:"p-treetable-column-resize-indicator"},Ql={tableContainer:{overflow:"auto"},thead:{position:"sticky"},tfoot:{position:"sticky"}},ri=(()=>{class t extends Et{name="treetable";theme=Kl;classes=$l;inlineStyles=Ql;static \u0275fac=(()=>{let e;return function(i){return(e||(e=ve(t)))(i||t)}})();static \u0275prov=we({token:t,factory:t.\u0275fac})}return t})();var We=(()=>{class t{sortSource=new J;selectionSource=new J;contextMenuSource=new J;uiUpdateSource=new J;totalRecordsSource=new J;sortSource$=this.sortSource.asObservable();selectionSource$=this.selectionSource.asObservable();contextMenuSource$=this.contextMenuSource.asObservable();uiUpdateSource$=this.uiUpdateSource.asObservable();totalRecordsSource$=this.totalRecordsSource.asObservable();onSort(e){this.sortSource.next(e)}onSelectionChange(){this.selectionSource.next(null)}onContextMenu(e){this.contextMenuSource.next(e)}onUIUpdate(e){this.uiUpdateSource.next(e)}onTotalRecordsChange(e){this.totalRecordsSource.next(e)}static \u0275fac=function(o){return new(o||t)};static \u0275prov=we({token:t,factory:t.\u0275fac})}return t})(),oe=(()=>{class t extends He{_componentStyle=B(ri);columns;style;styleClass;tableStyle;tableStyleClass;autoLayout;lazy=!1;lazyLoadOnInit=!0;paginator;rows;first=0;pageLinks=5;rowsPerPageOptions;alwaysShowPaginator=!0;paginatorPosition="bottom";paginatorStyleClass;paginatorDropdownAppendTo;currentPageReportTemplate="{currentPage} of {totalPages}";showCurrentPageReport;showJumpToPageDropdown;showFirstLastIcon=!0;showPageLinks=!0;defaultSortOrder=1;sortMode="single";resetPageOnSort=!0;customSort;selectionMode;contextMenuSelection;contextMenuSelectionMode="separate";dataKey;metaKeySelection=!1;compareSelectionBy="deepEquals";rowHover;loading;loadingIcon;showLoader=!0;scrollable;scrollHeight;virtualScroll;virtualScrollItemSize;virtualScrollOptions;virtualScrollDelay=150;frozenWidth;frozenColumns;resizableColumns;columnResizeMode="fit";reorderableColumns;contextMenu;rowTrackBy=(e,o)=>o;filters={};globalFilterFields;filterDelay=300;filterMode="lenient";filterLocale;paginatorLocale;get totalRecords(){return this._totalRecords}set totalRecords(e){this._totalRecords=e,this.tableService.onTotalRecordsChange(this._totalRecords)}get sortField(){return this._sortField}set sortField(e){this._sortField=e}get sortOrder(){return this._sortOrder}set sortOrder(e){this._sortOrder=e}get multiSortMeta(){return this._multiSortMeta}set multiSortMeta(e){this._multiSortMeta=e}get selection(){return this._selection}set selection(e){this._selection=e}get value(){return this._value}set value(e){this._value=e}get virtualRowHeight(){return this._virtualRowHeight}set virtualRowHeight(e){this._virtualRowHeight=e,console.log("The virtualRowHeight property is deprecated, use virtualScrollItemSize property instead.")}get selectionKeys(){return this._selectionKeys}set selectionKeys(e){this._selectionKeys=e,this.selectionKeysChange.emit(this._selectionKeys)}showGridlines=!1;selectionChange=new S;contextMenuSelectionChange=new S;onFilter=new S;onNodeExpand=new S;onNodeCollapse=new S;onPage=new S;onSort=new S;onLazyLoad=new S;sortFunction=new S;onColResize=new S;onColReorder=new S;onNodeSelect=new S;onNodeUnselect=new S;onContextMenuSelect=new S;onHeaderCheckboxToggle=new S;onEditInit=new S;onEditComplete=new S;onEditCancel=new S;selectionKeysChange=new S;containerViewChild;resizeHelperViewChild;reorderIndicatorUpViewChild;reorderIndicatorDownViewChild;tableViewChild;scrollableViewChild;scrollableFrozenViewChild;_value=[];_virtualRowHeight=28;_selectionKeys;serializedValue;_totalRecords=0;_multiSortMeta;_sortField;_sortOrder=1;filteredNodes;filterTimeout;_colGroupTemplate;colGroupTemplate;_captionTemplate;captionTemplate;_headerTemplate;headerTemplate;_bodyTemplate;bodyTemplate;_footerTemplate;footerTemplate;_summaryTemplate;summaryTemplate;_emptyMessageTemplate;emptyMessageTemplate;_paginatorLeftTemplate;paginatorLeftTemplate;_paginatorRightTemplate;paginatorRightTemplate;_paginatorDropdownItemTemplate;paginatorDropdownItemTemplate;_frozenHeaderTemplate;frozenHeaderTemplate;_frozenBodyTemplate;frozenBodyTemplate;_frozenFooterTemplate;frozenFooterTemplate;_frozenColGroupTemplate;frozenColGroupTemplate;_loadingIconTemplate;loadingIconTemplate;_reorderIndicatorUpIconTemplate;reorderIndicatorUpIconTemplate;_reorderIndicatorDownIconTemplate;reorderIndicatorDownIconTemplate;_sortIconTemplate;sortIconTemplate;_checkboxIconTemplate;checkboxIconTemplate;_headerCheckboxIconTemplate;headerCheckboxIconTemplate;_togglerIconTemplate;togglerIconTemplate;_paginatorFirstPageLinkIconTemplate;paginatorFirstPageLinkIconTemplate;_paginatorLastPageLinkIconTemplate;paginatorLastPageLinkIconTemplate;_paginatorPreviousPageLinkIconTemplate;paginatorPreviousPageLinkIconTemplate;_paginatorNextPageLinkIconTemplate;paginatorNextPageLinkIconTemplate;_loaderTemplate;loaderTemplate;lastResizerHelperX;reorderIconWidth;reorderIconHeight;draggedColumn;dropPosition;preventSelectionSetterPropagation;_selection;selectedKeys={};rowTouched;editingCell;editingCellData;editingCellField;editingCellClick;documentEditListener;initialized;toggleRowIndex;ngOnInit(){super.ngOnInit(),this.lazy&&this.lazyLoadOnInit&&!this.virtualScroll&&this.onLazyLoad.emit(this.createLazyLoadMetadata()),this.initialized=!0}templates;ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"caption":this.captionTemplate=e.template;break;case"header":this.headerTemplate=e.template;break;case"body":this.bodyTemplate=e.template;break;case"footer":this.footerTemplate=e.template;break;case"summary":this.summaryTemplate=e.template;break;case"colgroup":this.colGroupTemplate=e.template;break;case"emptymessage":this.emptyMessageTemplate=e.template;break;case"paginatorleft":this.paginatorLeftTemplate=e.template;break;case"paginatorright":this.paginatorRightTemplate=e.template;break;case"paginatordropdownitem":this.paginatorDropdownItemTemplate=e.template;break;case"frozenheader":this.frozenHeaderTemplate=e.template;break;case"frozenbody":this.frozenBodyTemplate=e.template;break;case"frozenfooter":this.frozenFooterTemplate=e.template;break;case"frozencolgroup":this.frozenColGroupTemplate=e.template;break;case"loadingicon":this.loadingIconTemplate=e.template;break;case"reorderindicatorupicon":this.reorderIndicatorUpIconTemplate=e.template;break;case"reorderindicatordownicon":this.reorderIndicatorDownIconTemplate=e.template;break;case"sorticon":this.sortIconTemplate=e.template;break;case"checkboxicon":this.checkboxIconTemplate=e.template;break;case"headercheckboxicon":this.headerCheckboxIconTemplate=e.template;break;case"togglericon":this.togglerIconTemplate=e.template;break;case"paginatorfirstpagelinkicon":this.paginatorFirstPageLinkIconTemplate=e.template;break;case"paginatorlastpagelinkicon":this.paginatorLastPageLinkIconTemplate=e.template;break;case"paginatorpreviouspagelinkicon":this.paginatorPreviousPageLinkIconTemplate=e.template;break;case"paginatornextpagelinkicon":this.paginatorNextPageLinkIconTemplate=e.template;break;case"loader":this.loaderTemplate=e.template;break}})}filterService=B(be);tableService=B(We);zone=B(le);ngOnChanges(e){super.ngOnChanges(e),e.value&&(this._value=e.value.currentValue,this.lazy||(this.totalRecords=this._value?this._value.length:0,this.sortMode=="single"&&this.sortField?this.sortSingle():this.sortMode=="multiple"&&this.multiSortMeta?this.sortMultiple():this.hasFilter()&&this._filter()),this.updateSerializedValue(),this.tableService.onUIUpdate(this.value)),e.sortField&&(this._sortField=e.sortField.currentValue,(!this.lazy||this.initialized)&&this.sortMode==="single"&&this.sortSingle()),e.sortOrder&&(this._sortOrder=e.sortOrder.currentValue,(!this.lazy||this.initialized)&&this.sortMode==="single"&&this.sortSingle()),e.multiSortMeta&&(this._multiSortMeta=e.multiSortMeta.currentValue,this.sortMode==="multiple"&&this.sortMultiple()),e.selection&&(this._selection=e.selection.currentValue,this.preventSelectionSetterPropagation||(this.updateselectedKeys(),this.tableService.onSelectionChange()),this.preventSelectionSetterPropagation=!1)}updateSerializedValue(){this.serializedValue=[],this.paginator?this.serializePageNodes():this.serializeNodes(null,this.filteredNodes||this.value,0,!0)}serializeNodes(e,o,i,l){if(o&&o.length)for(let n of o){n.parent=e;let c={node:n,parent:e,level:i,visible:l&&(e?e.expanded:!0)};this.serializedValue.push(c),c.visible&&n.expanded&&this.serializeNodes(n,n.children,i+1,c.visible)}}serializePageNodes(){let e=this.filteredNodes||this.value;if(this.serializedValue=[],e&&e.length){let o=this.lazy?0:this.first;for(let i=o;i<o+this.rows;i++){let l=e[i];l&&(this.serializedValue.push({node:l,parent:null,level:0,visible:!0}),this.serializeNodes(l,l.children,1,!0))}}}updateselectedKeys(){if(this.dataKey&&this._selection)if(this.selectedKeys={},Array.isArray(this._selection))for(let e of this._selection)this.selectedKeys[String(V(e.data,this.dataKey))]=1;else this.selectedKeys[String(V(this._selection.data,this.dataKey))]=1}onPageChange(e){this.first=e.first,this.rows=e.rows,this.lazy?this.onLazyLoad.emit(this.createLazyLoadMetadata()):this.serializePageNodes(),this.onPage.emit({first:this.first,rows:this.rows}),this.tableService.onUIUpdate(this.value),this.scrollable&&this.resetScrollTop()}sort(e){let o=e.originalEvent;if(this.sortMode==="single"&&(this._sortOrder=this.sortField===e.field?this.sortOrder*-1:this.defaultSortOrder,this._sortField=e.field,this.sortSingle(),this.resetPageOnSort&&this.scrollable&&this.resetScrollTop()),this.sortMode==="multiple"){let i=o.metaKey||o.ctrlKey,l=this.getSortMeta(e.field);l?i?l.order=l.order*-1:(this._multiSortMeta=[{field:e.field,order:l.order*-1}],this.resetPageOnSort&&this.scrollable&&this.resetScrollTop()):((!i||!this.multiSortMeta)&&(this._multiSortMeta=[],this.resetPageOnSort&&this.scrollable&&this.resetScrollTop()),this.multiSortMeta.push({field:e.field,order:this.defaultSortOrder})),this.sortMultiple()}}sortSingle(){if(this.sortField&&this.sortOrder){this.lazy?this.onLazyLoad.emit(this.createLazyLoadMetadata()):this.value&&(this.sortNodes(this.value),this.hasFilter()&&this._filter());let e={field:this.sortField,order:this.sortOrder};this.onSort.emit(e),this.tableService.onSort(e),this.updateSerializedValue()}}sortNodes(e){if(!(!e||e.length===0)){this.customSort?this.sortFunction.emit({data:e,mode:this.sortMode,field:this.sortField,order:this.sortOrder}):e.sort((o,i)=>{let l=V(o.data,this.sortField),n=V(i.data,this.sortField),c=null;return l==null&&n!=null?c=-1:l!=null&&n==null?c=1:l==null&&n==null?c=0:typeof l=="string"&&typeof n=="string"?c=l.localeCompare(n,void 0,{numeric:!0}):c=l<n?-1:l>n?1:0,this.sortOrder*c});for(let o of e)this.sortNodes(o.children)}}sortMultiple(){this.multiSortMeta&&(this.lazy?this.onLazyLoad.emit(this.createLazyLoadMetadata()):this.value&&(this.sortMultipleNodes(this.value),this.hasFilter()&&this._filter()),this.onSort.emit({multisortmeta:this.multiSortMeta}),this.updateSerializedValue(),this.tableService.onSort(this.multiSortMeta))}sortMultipleNodes(e){if(!(!e||e.length===0)){this.customSort?this.sortFunction.emit({data:this.value,mode:this.sortMode,multiSortMeta:this.multiSortMeta}):e.sort((o,i)=>this.multisortField(o,i,this.multiSortMeta,0));for(let o of e)this.sortMultipleNodes(o.children)}}multisortField(e,o,i,l){if(Ne(this.multiSortMeta)||Ne(i[l]))return 0;let n=V(e.data,i[l].field),c=V(o.data,i[l].field),u=null;if(n==null&&c!=null?u=-1:n!=null&&c==null?u=1:n==null&&c==null&&(u=0),typeof n=="string"||n instanceof String){if(n.localeCompare&&n!=c)return i[l].order*n.localeCompare(c,void 0,{numeric:!0})}else u=n<c?-1:1;return n==c?i.length-1>l?this.multisortField(e,o,i,l+1):0:i[l].order*u}getSortMeta(e){if(this.multiSortMeta&&this.multiSortMeta.length){for(let o=0;o<this.multiSortMeta.length;o++)if(this.multiSortMeta[o].field===e)return this.multiSortMeta[o]}return null}isSorted(e){if(this.sortMode==="single")return this.sortField&&this.sortField===e;if(this.sortMode==="multiple"){let o=!1;if(this.multiSortMeta){for(let i=0;i<this.multiSortMeta.length;i++)if(this.multiSortMeta[i].field==e){o=!0;break}}return o}}createLazyLoadMetadata(){return{first:this.first,rows:this.rows,sortField:this.sortField,sortOrder:this.sortOrder,filters:this.filters,globalFilter:this.filters&&this.filters.global?this.filters.global.value:null,multiSortMeta:this.multiSortMeta,forceUpdate:()=>this.cd.detectChanges()}}onLazyItemLoad(e){this.onLazyLoad.emit(he($($({},this.createLazyLoadMetadata()),e),{rows:e.last-e.first}))}resetScrollTop(){this.virtualScroll?this.scrollToVirtualIndex(0):this.scrollTo({top:0})}scrollToVirtualIndex(e){this.scrollableViewChild&&this.scrollableViewChild.scrollToVirtualIndex(e),this.scrollableFrozenViewChild&&this.scrollableViewChild.scrollToVirtualIndex(e)}scrollTo(e){this.scrollableViewChild&&this.scrollableViewChild.scrollTo(e),this.scrollableFrozenViewChild&&this.scrollableViewChild.scrollTo(e)}isEmpty(){let e=this.filteredNodes||this.value;return e==null||e.length==0}getBlockableElement(){return this.el.nativeElement.children[0]}onColumnResizeBegin(e){let o=ce(this.containerViewChild?.nativeElement).left;this.lastResizerHelperX=e.pageX-o+this.containerViewChild?.nativeElement.scrollLeft,e.preventDefault()}onColumnResize(e){let o=ce(this.containerViewChild?.nativeElement).left;Re(this.containerViewChild?.nativeElement,"p-unselectable-text"),this.resizeHelperViewChild.nativeElement.style.height=this.containerViewChild?.nativeElement.offsetHeight+"px",this.resizeHelperViewChild.nativeElement.style.top="0px",this.resizeHelperViewChild.nativeElement.style.left=e.pageX-o+this.containerViewChild?.nativeElement.scrollLeft+"px",this.resizeHelperViewChild.nativeElement.style.display="block"}onColumnResizeEnd(e,o){let i=this.resizeHelperViewChild.nativeElement.offsetLeft-this.lastResizerHelperX,l=o.offsetWidth,n=l+i,c=o.style.minWidth||15;if(l+i>parseInt(c)){if(this.columnResizeMode==="fit"){let u=o.nextElementSibling;for(;!u.offsetParent;)u=u.nextElementSibling;if(u){let y=u.offsetWidth-i,C=u.style.minWidth||15;if(n>15&&y>parseInt(C))if(this.scrollable){let R=this.findParentScrollableView(o),v=z(R,".p-treetable-scrollable-body table")||z(R,".p-scroller-viewport table"),O=z(R,"table.p-treetable-scrollable-header-table"),F=z(R,"table.p-treetable-scrollable-footer-table"),H=se(o);this.resizeColGroup(O,H,n,y),this.resizeColGroup(v,H,n,y),this.resizeColGroup(F,H,n,y)}else o.style.width=n+"px",u&&(u.style.width=y+"px")}}else if(this.columnResizeMode==="expand")if(this.scrollable){let u=this.findParentScrollableView(o),y=z(u,".p-treetable-scrollable-body")||z(u,".p-scroller-viewport"),C=z(u,".p-treetable-scrollable-header"),R=z(u,".p-treetable-scrollable-footer"),v=z(u,".p-treetable-scrollable-body table")||z(u,".p-scroller-viewport table"),O=z(u,"table.p-treetable-scrollable-header-table"),F=z(u,"table.p-treetable-scrollable-footer-table");v.style.width=v.offsetWidth+i+"px",O.style.width=O.offsetWidth+i+"px",F&&(F.style.width=F.offsetWidth+i+"px");let H=se(o),de=o?v.offsetWidth+i:n,pe=o?O.offsetWidth+i:n,ye=this.containerViewChild?.nativeElement.offsetWidth>=de,Te=(Ge,Je,Xe,ui)=>{Ge&&Je&&(Ge.style.width=ui?Xe+Pe(y)+"px":"auto",Je.style.width=Xe+"px")};Te(y,v,de,ye),Te(C,O,pe,ye),Te(R,F,pe,ye),this.resizeColGroup(O,H,n,null),this.resizeColGroup(v,H,n,null),this.resizeColGroup(F,H,n,null)}else{this.tableViewChild.nativeElement.style.width=this.tableViewChild?.nativeElement.offsetWidth+i+"px",o.style.width=n+"px";let u=this.tableViewChild?.nativeElement.style.width;this.containerViewChild.nativeElement.style.width=u+"px"}this.onColResize.emit({element:o,delta:i})}this.resizeHelperViewChild.nativeElement.style.display="none",De(this.containerViewChild?.nativeElement,"p-unselectable-text")}findParentScrollableView(e){if(e){let o=e.parentElement;for(;o&&!Me(o,"p-treetable-scrollable-view");)o=o.parentElement;return o}else return null}resizeColGroup(e,o,i,l){if(e){let n=e.children[0].nodeName==="COLGROUP"?e.children[0]:null;if(n){let c=n.children[o],u=c.nextElementSibling;c.style.width=i+"px",u&&l&&(u.style.width=l+"px")}else throw"Scrollable tables require a colgroup to support resizable columns"}}onColumnDragStart(e,o){this.reorderIconWidth=St(this.reorderIndicatorUpViewChild?.nativeElement),this.reorderIconHeight=vt(this.reorderIndicatorDownViewChild?.nativeElement),this.draggedColumn=o,e.dataTransfer.setData("text","b")}onColumnDragEnter(e,o){if(this.reorderableColumns&&this.draggedColumn&&o){e.preventDefault();let i=ce(this.containerViewChild?.nativeElement),l=ce(o);if(this.draggedColumn!=o){let n=l.left-i.left,c=i.top-l.top,u=l.left+o.offsetWidth/2;this.reorderIndicatorUpViewChild.nativeElement.style.top=l.top-i.top-(this.reorderIconHeight-1)+"px",this.reorderIndicatorDownViewChild.nativeElement.style.top=l.top-i.top+o.offsetHeight+"px",e.pageX>u?(this.reorderIndicatorUpViewChild.nativeElement.style.left=n+o.offsetWidth-Math.ceil(this.reorderIconWidth/2)+"px",this.reorderIndicatorDownViewChild.nativeElement.style.left=n+o.offsetWidth-Math.ceil(this.reorderIconWidth/2)+"px",this.dropPosition=1):(this.reorderIndicatorUpViewChild.nativeElement.style.left=n-Math.ceil(this.reorderIconWidth/2)+"px",this.reorderIndicatorDownViewChild.nativeElement.style.left=n-Math.ceil(this.reorderIconWidth/2)+"px",this.dropPosition=-1),this.reorderIndicatorUpViewChild.nativeElement.style.display="block",this.reorderIndicatorDownViewChild.nativeElement.style.display="block"}else e.dataTransfer.dropEffect="none"}}onColumnDragLeave(e){this.reorderableColumns&&this.draggedColumn&&(e.preventDefault(),this.reorderIndicatorUpViewChild.nativeElement.style.display="none",this.reorderIndicatorDownViewChild.nativeElement.style.display="none")}onColumnDrop(e,o){if(e.preventDefault(),this.draggedColumn){let i=Ae.indexWithinGroup(this.draggedColumn,"ttreorderablecolumn"),l=Ae.indexWithinGroup(o,"ttreorderablecolumn"),n=i!=l;n&&(l-i==1&&this.dropPosition===-1||i-l==1&&this.dropPosition===1)&&(n=!1),n&&l<i&&this.dropPosition===1&&(l=l+1),n&&l>i&&this.dropPosition===-1&&(l=l-1),n&&(It(this.columns,i,l),this.onColReorder.emit({dragIndex:i,dropIndex:l,columns:this.columns})),this.reorderIndicatorUpViewChild.nativeElement.style.display="none",this.reorderIndicatorDownViewChild.nativeElement.style.display="none",this.draggedColumn.draggable=!1,this.draggedColumn=null,this.dropPosition=null}}handleRowClick(e){let o=e.originalEvent.target.nodeName;if(!(o=="INPUT"||o=="BUTTON"||o=="A"||Me(e.originalEvent.target,"p-clickable"))){if(this.selectionMode){this.preventSelectionSetterPropagation=!0;let i=e.rowNode,l=this.isSelected(i.node),n=this.rowTouched?!1:this.metaKeySelection,c=this.dataKey?String(V(i.node.data,this.dataKey)):null;if(n){let u=e.originalEvent,y=u.metaKey||u.ctrlKey;if(l&&y){if(this.isSingleSelectionMode())this._selection=null,this.selectedKeys={},this.selectionChange.emit(null);else{let C=this.findIndexInSelection(i.node);this._selection=this.selection.filter((R,v)=>v!=C),this.selectionChange.emit(this.selection),c&&delete this.selectedKeys[c]}this.onNodeUnselect.emit({originalEvent:e.originalEvent,node:i.node,type:"row"})}else this.isSingleSelectionMode()?(this._selection=i.node,this.selectionChange.emit(i.node),c&&(this.selectedKeys={},this.selectedKeys[c]=1)):this.isMultipleSelectionMode()&&(y?this._selection=this.selection||[]:(this._selection=[],this.selectedKeys={}),this._selection=[...this.selection,i.node],this.selectionChange.emit(this.selection),c&&(this.selectedKeys[c]=1)),this.onNodeSelect.emit({originalEvent:e.originalEvent,node:i.node,type:"row",index:e.rowIndex})}else if(this.selectionMode==="single")l?(this._selection=null,this.selectedKeys={},this.selectionChange.emit(this.selection),this.onNodeUnselect.emit({originalEvent:e.originalEvent,node:i.node,type:"row"})):(this._selection=i.node,this.selectionChange.emit(this.selection),this.onNodeSelect.emit({originalEvent:e.originalEvent,node:i.node,type:"row",index:e.rowIndex}),c&&(this.selectedKeys={},this.selectedKeys[c]=1));else if(this.selectionMode==="multiple")if(l){let u=this.findIndexInSelection(i.node);this._selection=this.selection.filter((y,C)=>C!=u),this.selectionChange.emit(this.selection),this.onNodeUnselect.emit({originalEvent:e.originalEvent,node:i.node,type:"row"}),c&&delete this.selectedKeys[c]}else this._selection=this.selection?[...this.selection,i.node]:[i.node],this.selectionChange.emit(this.selection),this.onNodeSelect.emit({originalEvent:e.originalEvent,node:i.node,type:"row",index:e.rowIndex}),c&&(this.selectedKeys[c]=1);this.tableService.onSelectionChange()}this.rowTouched=!1}}handleRowTouchEnd(e){this.rowTouched=!0}handleRowRightClick(e){if(this.contextMenu){let o=e.rowNode.node;if(this.contextMenuSelectionMode==="separate")this.contextMenuSelection=o,this.contextMenuSelectionChange.emit(o),this.onContextMenuSelect.emit({originalEvent:e.originalEvent,node:o}),this.contextMenu.show(e.originalEvent),this.tableService.onContextMenu(o);else if(this.contextMenuSelectionMode==="joint"){this.preventSelectionSetterPropagation=!0;let i=this.isSelected(o),l=this.dataKey?String(V(o.data,this.dataKey)):null;i||(this.isSingleSelectionMode()?(this.selection=o,this.selectionChange.emit(o)):this.isMultipleSelectionMode()&&(this.selection=[o],this.selectionChange.emit(this.selection)),l&&(this.selectedKeys[l]=1)),this.contextMenu.show(e.originalEvent),this.onContextMenuSelect.emit({originalEvent:e.originalEvent,node:o})}}}toggleNodeWithCheckbox(e){this.selection=this.selection||[],this.preventSelectionSetterPropagation=!0;let o=e.rowNode.node;this.isSelected(o)?(this.propagateSelectionDown(o,!1),e.rowNode.parent&&this.propagateSelectionUp(o.parent,!1),this.selectionChange.emit(this.selection),this.onNodeUnselect.emit({originalEvent:e,node:o})):(this.propagateSelectionDown(o,!0),e.rowNode.parent&&this.propagateSelectionUp(o.parent,!0),this.selectionChange.emit(this.selection),this.onNodeSelect.emit({originalEvent:e,node:o})),this.tableService.onSelectionChange()}toggleNodesWithCheckbox(e,o){let i=this.filteredNodes||this.value;this._selection=o&&i?i.slice():[],this.toggleAll(o),o||(this._selection=[],this.selectedKeys={}),this.preventSelectionSetterPropagation=!0,this.selectionChange.emit(this._selection),this.tableService.onSelectionChange(),this.onHeaderCheckboxToggle.emit({originalEvent:e,checked:o})}toggleAll(e){let o=this.filteredNodes||this.value;if(this.selectionKeys){if(o&&o.length){for(let i of o)this.propagateDown(i,e);this.selectionKeysChange.emit(this.selectionKeys)}}else if(o&&o.length)for(let i of o)this.propagateSelectionDown(i,e)}propagateSelectionUp(e,o){if(e.children&&e.children.length){let l=0,n=!1,c=this.dataKey?String(V(e.data,this.dataKey)):null;for(let u of e.children)this.isSelected(u)?l++:u.partialSelected&&(n=!0);if(o&&l==e.children.length)this._selection=[...this.selection||[],e],e.partialSelected=!1,c&&(this.selectedKeys[c]=1);else{if(!o){let u=this.findIndexInSelection(e);u>=0&&(this._selection=this.selection.filter((y,C)=>C!=u),c&&delete this.selectedKeys[c])}n||l>0&&l!=e.children.length?e.partialSelected=!0:e.partialSelected=!1}}let i=e.parent;e.checked=o,i&&this.propagateSelectionUp(i,o)}propagateSelectionDown(e,o){let i=this.findIndexInSelection(e),l=this.dataKey?String(V(e.data,this.dataKey)):null;if(o&&i==-1?(this._selection=[...this.selection||[],e],l&&(this.selectedKeys[l]=1)):!o&&i>-1&&(this._selection=this.selection.filter((n,c)=>c!=i),l&&delete this.selectedKeys[l]),e.partialSelected=!1,e.checked=o,e.children&&e.children.length)for(let n of e.children)this.propagateSelectionDown(n,o)}isSelected(e){return e&&this.selection?this.dataKey?e.hasOwnProperty("checked")?e.checked:this.selectedKeys[V(e.data,this.dataKey)]!==void 0:Array.isArray(this.selection)?this.findIndexInSelection(e)>-1:this.equals(e,this.selection):!1}isNodeSelected(e){return this.selectionMode&&this.selectionKeys?this.selectionKeys[this.nodeKey(e)]?.checked===!0:!1}isNodePartialSelected(e){return this.selectionMode&&this.selectionKeys?this.selectionKeys[this.nodeKey(e)]?.partialChecked===!0:!1}nodeKey(e){return V(e,this.dataKey)||V(e?.data,this.dataKey)}toggleCheckbox(e){let{rowNode:o,check:i,originalEvent:l}=e,n=o.node;this.selectionKeys?(this.propagateDown(n,i),n.parent&&this.propagateUp(n.parent,i),this.selectionKeysChange.emit(this.selectionKeys)):this.toggleNodeWithCheckbox({originalEvent:l,rowNode:o}),this.tableService.onSelectionChange()}propagateDown(e,o){if(o?this.selectionKeys[this.nodeKey(e)]={checked:!0,partialChecked:!1}:delete this.selectionKeys[this.nodeKey(e)],e.children&&e.children.length)for(let i of e.children)this.propagateDown(i,o)}propagateUp(e,o){let i=0,l=!1;for(let c of e.children)this.selectionKeys[this.nodeKey(c)]&&this.selectionKeys[this.nodeKey(c)].checked?i++:this.selectionKeys[this.nodeKey(c)]&&this.selectionKeys[this.nodeKey(c)].partialChecked&&(l=!0);o&&i===e.children.length?this.selectionKeys[this.nodeKey(e)]={checked:!0,partialChecked:!1}:(o||delete this.selectionKeys[this.nodeKey(e)],l||i>0&&i!==e.children.length?this.selectionKeys[this.nodeKey(e)]={checked:!1,partialChecked:!0}:this.selectionKeys[this.nodeKey(e)]={checked:!1,partialChecked:!1});let n=e.parent;n&&this.propagateUp(n,o)}findIndexInSelection(e){let o=-1;if(this.selection&&this.selection.length){for(let i=0;i<this.selection.length;i++)if(this.equals(e,this.selection[i])){o=i;break}}return o}isSingleSelectionMode(){return this.selectionMode==="single"}isMultipleSelectionMode(){return this.selectionMode==="multiple"}equals(e,o){return this.compareSelectionBy==="equals"?Oe(e,o):Oe(e.data,o.data,this.dataKey)}filter(e,o,i){this.filterTimeout&&clearTimeout(this.filterTimeout),this.isFilterBlank(e)?this.filters[o]&&delete this.filters[o]:this.filters[o]={value:e,matchMode:i},this.filterTimeout=setTimeout(()=>{this._filter(),this.filterTimeout=null},this.filterDelay)}filterGlobal(e,o){this.filter(e,"global",o)}isFilterBlank(e){return e!=null?!!(typeof e=="string"&&e.trim().length==0||Array.isArray(e)&&e.length==0):!0}_filter(){if(this.lazy)this.onLazyLoad.emit(this.createLazyLoadMetadata());else{if(!this.value)return;if(!this.hasFilter())this.filteredNodes=null,this.paginator&&(this.totalRecords=this.value?this.value.length:0);else{let o;if(this.filters.global){if(!this.columns&&!this.globalFilterFields)throw new Error("Global filtering requires dynamic columns or globalFilterFields to be defined.");o=this.globalFilterFields||this.columns}this.filteredNodes=[];let i=this.filterMode==="strict",l=!1;for(let n of this.value){let c=$({},n),u=!0,y=!1,C;for(let v in this.filters)if(this.filters.hasOwnProperty(v)&&v!=="global"){let O=this.filters[v],F=v,H=O.value,de=O.matchMode||"startsWith",pe=this.filterService.filters[de];if(C={filterField:F,filterValue:H,filterConstraint:pe,isStrictMode:i},(i&&!(this.findFilteredNodes(c,C)||this.isFilterMatched(c,C))||!i&&!(this.isFilterMatched(c,C)||this.findFilteredNodes(c,C)))&&(u=!1),!u)break}if(this.filters.global&&!y&&o){let v=$({},c),O,F=this.filters.global.value,H=this.filterService.filters[this.filters.global.matchMode];C={filterField:O,filterValue:F,filterConstraint:H,isStrictMode:i,globalFilterFieldsArray:o},(i&&(this.findFilteredNodes(v,C)||this.isFilterMatched(v,C))||!i&&(this.isFilterMatched(v,C)||this.findFilteredNodes(v,C)))&&(y=!0,c=v)}let R=u;this.filters.global&&(R=u&&y),R&&this.filteredNodes.push(c),l=l||!u||y||u&&this.filteredNodes.length>0||!y&&this.filteredNodes.length===0}l||(this.filteredNodes=null),this.paginator&&(this.totalRecords=this.filteredNodes?this.filteredNodes.length:this.value?this.value.length:0)}this.cd.markForCheck()}this.first=0;let e=this.filteredNodes||this.value;this.onFilter.emit({filters:this.filters,filteredValue:e}),this.tableService.onUIUpdate(e),this.updateSerializedValue(),this.scrollable&&this.resetScrollTop()}findFilteredNodes(e,o){if(e){let i=!1;if(e.children){let l=[...e.children];e.children=[];for(let n of l){let c=$({},n);this.isFilterMatched(c,o)&&(i=!0,e.children.push(c))}}if(i)return!0}}isFilterMatched(e,o){let{filterField:i,filterValue:l,filterConstraint:n,isStrictMode:c,globalFilterFieldsArray:u}=o,y=!1,C=R=>n(V(e.data,R),l,this.filterLocale);return y=u?.length?u.some(R=>C(R.field||R)):C(i),(!y||c&&!this.isNodeLeaf(e))&&(y=this.findFilteredNodes(e,{filterField:i,filterValue:l,filterConstraint:n,isStrictMode:c,globalFilterFieldsArray:u})||y),y}isNodeLeaf(e){return e.leaf===!1?!1:!(e.children&&e.children.length)}hasFilter(){let e=!0;for(let o in this.filters)if(this.filters.hasOwnProperty(o)){e=!1;break}return!e}reset(){this._sortField=null,this._sortOrder=1,this._multiSortMeta=null,this.tableService.onSort(null),this.filteredNodes=null,this.filters={},this.first=0,this.lazy?this.onLazyLoad.emit(this.createLazyLoadMetadata()):this.totalRecords=this._value?this._value.length:0}updateEditingCell(e,o,i){this.editingCell=e,this.editingCellData=o,this.editingCellField=i,this.bindDocumentEditListener()}isEditingCellValid(){return this.editingCell&&ie(this.editingCell,".ng-invalid.ng-dirty").length===0}bindDocumentEditListener(){this.documentEditListener||(this.documentEditListener=this.renderer.listen(this.document,"click",e=>{this.editingCell&&!this.editingCellClick&&this.isEditingCellValid()&&(De(this.editingCell,"p-cell-editing"),this.editingCell=null,this.onEditComplete.emit({field:this.editingCellField,data:this.editingCellData}),this.editingCellField=null,this.editingCellData=null,this.unbindDocumentEditListener()),this.editingCellClick=!1}))}unbindDocumentEditListener(){this.documentEditListener&&(this.documentEditListener(),this.documentEditListener=null)}ngOnDestroy(){this.unbindDocumentEditListener(),this.editingCell=null,this.editingCellField=null,this.editingCellData=null,this.initialized=null,super.ngOnDestroy()}static \u0275fac=(()=>{let e;return function(i){return(e||(e=ve(t)))(i||t)}})();static \u0275cmp=U({type:t,selectors:[["p-treeTable"],["p-treetable"],["p-tree-table"]],contentQueries:function(o,i,l){if(o&1&&(_(l,_i,4),_(l,yi,4),_(l,Ti,4),_(l,Ci,4),_(l,wi,4),_(l,vi,4),_(l,Si,4),_(l,xi,4),_(l,Ii,4),_(l,Ei,4),_(l,ki,4),_(l,zi,4),_(l,Li,4),_(l,Mi,4),_(l,Ri,4),_(l,Di,4),_(l,Pi,4),_(l,Vi,4),_(l,Ni,4),_(l,Oi,4),_(l,Fi,4),_(l,Hi,4),_(l,Ai,4),_(l,Bi,4),_(l,Ki,4),_(l,$i,4),_(l,_e,4)),o&2){let n;g(n=f())&&(i._colGroupTemplate=n.first),g(n=f())&&(i._captionTemplate=n.first),g(n=f())&&(i._headerTemplate=n.first),g(n=f())&&(i._bodyTemplate=n.first),g(n=f())&&(i._footerTemplate=n.first),g(n=f())&&(i._summaryTemplate=n.first),g(n=f())&&(i._emptyMessageTemplate=n.first),g(n=f())&&(i._paginatorLeftTemplate=n.first),g(n=f())&&(i._paginatorRightTemplate=n.first),g(n=f())&&(i._paginatorDropdownItemTemplate=n.first),g(n=f())&&(i._frozenHeaderTemplate=n.first),g(n=f())&&(i._frozenBodyTemplate=n.first),g(n=f())&&(i._frozenFooterTemplate=n.first),g(n=f())&&(i._frozenColGroupTemplate=n.first),g(n=f())&&(i._loadingIconTemplate=n.first),g(n=f())&&(i._reorderIndicatorUpIconTemplate=n.first),g(n=f())&&(i._reorderIndicatorDownIconTemplate=n.first),g(n=f())&&(i._sortIconTemplate=n.first),g(n=f())&&(i._checkboxIconTemplate=n.first),g(n=f())&&(i._headerCheckboxIconTemplate=n.first),g(n=f())&&(i._togglerIconTemplate=n.first),g(n=f())&&(i._paginatorFirstPageLinkIconTemplate=n.first),g(n=f())&&(i._paginatorLastPageLinkIconTemplate=n.first),g(n=f())&&(i._paginatorPreviousPageLinkIconTemplate=n.first),g(n=f())&&(i._paginatorNextPageLinkIconTemplate=n.first),g(n=f())&&(i._loaderTemplate=n.first),g(n=f())&&(i.templates=n)}},viewQuery:function(o,i){if(o&1&&(E(Qi,5),E(Ui,5),E(ji,5),E(qi,5),E(Wi,5),E(Gi,5),E(Ji,5)),o&2){let l;g(l=f())&&(i.containerViewChild=l.first),g(l=f())&&(i.resizeHelperViewChild=l.first),g(l=f())&&(i.reorderIndicatorUpViewChild=l.first),g(l=f())&&(i.reorderIndicatorDownViewChild=l.first),g(l=f())&&(i.tableViewChild=l.first),g(l=f())&&(i.scrollableViewChild=l.first),g(l=f())&&(i.scrollableFrozenViewChild=l.first)}},inputs:{columns:"columns",style:"style",styleClass:"styleClass",tableStyle:"tableStyle",tableStyleClass:"tableStyleClass",autoLayout:[2,"autoLayout","autoLayout",w],lazy:[2,"lazy","lazy",w],lazyLoadOnInit:[2,"lazyLoadOnInit","lazyLoadOnInit",w],paginator:[2,"paginator","paginator",w],rows:[2,"rows","rows",Q],first:[2,"first","first",Q],pageLinks:[2,"pageLinks","pageLinks",Q],rowsPerPageOptions:"rowsPerPageOptions",alwaysShowPaginator:[2,"alwaysShowPaginator","alwaysShowPaginator",w],paginatorPosition:"paginatorPosition",paginatorStyleClass:"paginatorStyleClass",paginatorDropdownAppendTo:"paginatorDropdownAppendTo",currentPageReportTemplate:"currentPageReportTemplate",showCurrentPageReport:[2,"showCurrentPageReport","showCurrentPageReport",w],showJumpToPageDropdown:[2,"showJumpToPageDropdown","showJumpToPageDropdown",w],showFirstLastIcon:[2,"showFirstLastIcon","showFirstLastIcon",w],showPageLinks:[2,"showPageLinks","showPageLinks",w],defaultSortOrder:[2,"defaultSortOrder","defaultSortOrder",Q],sortMode:"sortMode",resetPageOnSort:[2,"resetPageOnSort","resetPageOnSort",w],customSort:[2,"customSort","customSort",w],selectionMode:"selectionMode",contextMenuSelection:"contextMenuSelection",contextMenuSelectionMode:"contextMenuSelectionMode",dataKey:"dataKey",metaKeySelection:[2,"metaKeySelection","metaKeySelection",w],compareSelectionBy:"compareSelectionBy",rowHover:[2,"rowHover","rowHover",w],loading:[2,"loading","loading",w],loadingIcon:"loadingIcon",showLoader:[2,"showLoader","showLoader",w],scrollable:[2,"scrollable","scrollable",w],scrollHeight:"scrollHeight",virtualScroll:[2,"virtualScroll","virtualScroll",w],virtualScrollItemSize:[2,"virtualScrollItemSize","virtualScrollItemSize",Q],virtualScrollOptions:"virtualScrollOptions",virtualScrollDelay:[2,"virtualScrollDelay","virtualScrollDelay",Q],frozenWidth:"frozenWidth",frozenColumns:"frozenColumns",resizableColumns:[2,"resizableColumns","resizableColumns",w],columnResizeMode:"columnResizeMode",reorderableColumns:[2,"reorderableColumns","reorderableColumns",w],contextMenu:"contextMenu",rowTrackBy:"rowTrackBy",filters:"filters",globalFilterFields:"globalFilterFields",filterDelay:[2,"filterDelay","filterDelay",Q],filterMode:"filterMode",filterLocale:"filterLocale",paginatorLocale:"paginatorLocale",totalRecords:"totalRecords",sortField:"sortField",sortOrder:"sortOrder",multiSortMeta:"multiSortMeta",selection:"selection",value:"value",virtualRowHeight:"virtualRowHeight",selectionKeys:"selectionKeys",showGridlines:[2,"showGridlines","showGridlines",w]},outputs:{selectionChange:"selectionChange",contextMenuSelectionChange:"contextMenuSelectionChange",onFilter:"onFilter",onNodeExpand:"onNodeExpand",onNodeCollapse:"onNodeCollapse",onPage:"onPage",onSort:"onSort",onLazyLoad:"onLazyLoad",sortFunction:"sortFunction",onColResize:"onColResize",onColReorder:"onColReorder",onNodeSelect:"onNodeSelect",onNodeUnselect:"onNodeUnselect",onContextMenuSelect:"onContextMenuSelect",onHeaderCheckboxToggle:"onHeaderCheckboxToggle",onEditInit:"onEditInit",onEditComplete:"onEditComplete",onEditCancel:"onEditCancel",selectionKeysChange:"selectionKeysChange"},standalone:!1,features:[pt([We,ri]),xe,tt],decls:12,vars:21,consts:[["container",""],["table",""],["scrollableView",""],["scrollableFrozenView",""],["resizeHelper",""],["reorderIndicatorUp",""],["reorderIndicatorDown",""],["data-scrollselectors",".p-treetable-scrollable-body",3,"ngStyle","ngClass"],["class","p-treetable-loading",4,"ngIf"],["class","p-treetable-header",4,"ngIf"],["styleClass","p-paginator-top",3,"rows","first","totalRecords","pageLinkSize","alwaysShow","rowsPerPageOptions","templateLeft","templateRight","dropdownAppendTo","currentPageReportTemplate","showFirstLastIcon","dropdownItemTemplate","showCurrentPageReport","showJumpToPageDropdown","showPageLinks","styleClass","locale","onPageChange",4,"ngIf"],["class","p-treetable-wrapper",4,"ngIf"],["class","p-treetable-scrollable-wrapper",4,"ngIf"],["styleClass","p-paginator-bottom",3,"rows","first","totalRecords","pageLinkSize","alwaysShow","rowsPerPageOptions","templateLeft","templateRight","dropdownAppendTo","currentPageReportTemplate","showFirstLastIcon","dropdownItemTemplate","showCurrentPageReport","showJumpToPageDropdown","showPageLinks","styleClass","locale","onPageChange",4,"ngIf"],["class","p-treetable-footer",4,"ngIf"],["class","p-column-resizer-helper","style","display:none",4,"ngIf"],["class","p-treetable-reorder-indicator-up","style","display: none;",4,"ngIf"],["class","p-treetable-reorder-indicator-down","style","display: none;",4,"ngIf"],[1,"p-treetable-loading"],[1,"p-overlay-mask","p-treetable-mask"],[3,"class",4,"ngIf"],[4,"ngIf"],[3,"spin","styleClass",4,"ngIf"],["class","p-treetable-loading-icon",4,"ngIf"],[3,"spin","styleClass"],[1,"p-treetable-loading-icon"],[4,"ngTemplateOutlet"],[1,"p-treetable-header"],["styleClass","p-paginator-top",3,"onPageChange","rows","first","totalRecords","pageLinkSize","alwaysShow","rowsPerPageOptions","templateLeft","templateRight","dropdownAppendTo","currentPageReportTemplate","showFirstLastIcon","dropdownItemTemplate","showCurrentPageReport","showJumpToPageDropdown","showPageLinks","styleClass","locale"],["pTemplate","firstpagelinkicon"],["pTemplate","previouspagelinkicon"],["pTemplate","lastpagelinkicon"],["pTemplate","nextpagelinkicon"],[1,"p-treetable-wrapper"],["role","table",3,"ngClass","ngStyle"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["role","rowgroup",1,"p-treetable-thead"],["role","rowgroup",1,"p-treetable-tbody",3,"pTreeTableBody","pTreeTableBodyTemplate"],["role","rowgroup",1,"p-treetable-tfoot"],[1,"p-treetable-scrollable-wrapper"],["class","p-treetable-scrollable-view p-treetable-frozen-view",3,"ttScrollableView","frozen","ngStyle","scrollHeight",4,"ngIf"],[1,"p-treetable-scrollable-view",3,"ttScrollableView","frozen","scrollHeight","ngStyle"],[1,"p-treetable-scrollable-view","p-treetable-frozen-view",3,"ttScrollableView","frozen","ngStyle","scrollHeight"],["styleClass","p-paginator-bottom",3,"onPageChange","rows","first","totalRecords","pageLinkSize","alwaysShow","rowsPerPageOptions","templateLeft","templateRight","dropdownAppendTo","currentPageReportTemplate","showFirstLastIcon","dropdownItemTemplate","showCurrentPageReport","showJumpToPageDropdown","showPageLinks","styleClass","locale"],[1,"p-treetable-footer"],[1,"p-column-resizer-helper",2,"display","none"],[1,"p-treetable-reorder-indicator-up",2,"display","none"],[1,"p-treetable-reorder-indicator-down",2,"display","none"]],template:function(o,i){o&1&&(d(0,"div",7,0),p(2,ro,4,2,"div",8)(3,so,2,1,"div",9)(4,wo,5,21,"p-paginator",10)(5,Io,9,16,"div",11)(6,ko,4,8,"div",12)(7,Bo,5,21,"p-paginator",13)(8,$o,2,1,"div",14)(9,Qo,2,0,"div",15)(10,Wo,4,2,"span",16)(11,Zo,4,2,"span",17),h()),o&2&&(j(i.styleClass),a("ngStyle",i.style)("ngClass",mt(14,Xi,i.showGridlines,i.rowHover||i.selectionMode==="single"||i.selectionMode==="multiple",i.autoLayout,i.resizableColumns,i.resizableColumns&&i.columnResizeMode==="fit",i.scrollable&&i.scrollHeight==="flex")),s(2),a("ngIf",i.loading&&i.showLoader),s(),a("ngIf",i.captionTemplate||i._captionTemplate),s(),a("ngIf",i.paginator&&(i.paginatorPosition==="top"||i.paginatorPosition=="both")),s(),a("ngIf",!i.scrollable),s(),a("ngIf",i.scrollable),s(),a("ngIf",i.paginator&&(i.paginatorPosition==="bottom"||i.paginatorPosition=="both")),s(),a("ngIf",i.summaryTemplate||i._summaryTemplate),s(),a("ngIf",i.resizableColumns),s(),a("ngIf",i.reorderableColumns),s(),a("ngIf",i.reorderableColumns))},dependencies:()=>[re,G,ae,Le,Gt,_e,Ue,Be,Ke,Ul,si],encapsulation:2})}return t})(),si=(()=>{class t{tt;treeTableService;cd;columns;template;frozen;serializedNodes;scrollerOptions;subscription;constructor(e,o,i){this.tt=e,this.treeTableService=o,this.cd=i,this.subscription=this.tt.tableService.uiUpdateSource$.subscribe(()=>{this.tt.virtualScroll&&this.cd.detectChanges()})}getScrollerOption(e,o){return this.tt.virtualScroll?(o=o||this.scrollerOptions,o?o[e]:null):null}getRowIndex(e){let o=this.getScrollerOption("getItemOptions");return o?o(e).index:e}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}static \u0275fac=function(o){return new(o||t)(N(oe),N(We),N(bt))};static \u0275cmp=U({type:t,selectors:[["","pTreeTableBody",""]],inputs:{columns:[0,"pTreeTableBody","columns"],template:[0,"pTreeTableBodyTemplate","template"],frozen:[2,"frozen","frozen",w],serializedNodes:"serializedNodes",scrollerOptions:"scrollerOptions"},standalone:!1,attrs:Yo,decls:2,vars:3,consts:[["ngFor","",3,"ngForOf","ngForTrackBy"],[4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(o,i){o&1&&p(0,ll,1,1,"ng-template",0)(1,rl,2,5,"ng-container",1),o&2&&(a("ngForOf",i.serializedNodes||i.tt.serializedValue)("ngForTrackBy",i.tt.rowTrackBy),s(),a("ngIf",i.tt.isEmpty()))},dependencies:[yt,G,ae],encapsulation:2})}return t})(),Ul=(()=>{class t{platformId;renderer;tt;el;zone;columns;frozen;scrollHeaderViewChild;scrollHeaderBoxViewChild;scrollBodyViewChild;scrollTableViewChild;scrollLoadingTableViewChild;scrollFooterViewChild;scrollFooterBoxViewChild;scrollableAlignerViewChild;scroller;headerScrollListener;bodyScrollListener;footerScrollListener;frozenSiblingBody;totalRecordsSubscription;_scrollHeight;preventBodyScrollPropagation;get scrollHeight(){return this._scrollHeight}set scrollHeight(e){this._scrollHeight=e,e!=null&&(e.includes("%")||e.includes("calc"))&&console.log('Percentage scroll height calculation is removed in favor of the more performant CSS based flex mode, use scrollHeight="flex" instead.')}constructor(e,o,i,l,n){this.platformId=e,this.renderer=o,this.tt=i,this.el=l,this.zone=n}ngAfterViewInit(){if(ge(this.platformId)){if(this.frozen)this.scrollableAlignerViewChild&&this.scrollableAlignerViewChild.nativeElement&&(this.scrollableAlignerViewChild.nativeElement.style.height=wt()+"px");else{(this.tt.frozenColumns||this.tt.frozenBodyTemplate||this.tt._frozenBodyTemplate)&&Re(this.el.nativeElement,"p-treetable-unfrozen-view");let e=this.el.nativeElement.previousElementSibling;if(e&&(this.tt.virtualScroll?this.frozenSiblingBody=z(e,".p-scroller-viewport"):this.frozenSiblingBody=z(e,".p-treetable-scrollable-body")),this.scrollHeight){let o=Pe();this.scrollHeaderBoxViewChild.nativeElement.style.paddingRight=o+"px",this.scrollFooterBoxViewChild&&this.scrollFooterBoxViewChild.nativeElement&&(this.scrollFooterBoxViewChild.nativeElement.style.paddingRight=o+"px")}}this.bindEvents()}}bindEvents(){ge(this.platformId)&&this.zone.runOutsideAngular(()=>{this.scrollHeaderViewChild&&this.scrollHeaderViewChild.nativeElement&&(this.headerScrollListener=this.renderer.listen(this.scrollHeaderBoxViewChild?.nativeElement,"scroll",this.onHeaderScroll.bind(this))),this.scrollFooterViewChild&&this.scrollFooterViewChild.nativeElement&&(this.footerScrollListener=this.renderer.listen(this.scrollFooterViewChild.nativeElement,"scroll",this.onFooterScroll.bind(this))),this.frozen||(this.tt.virtualScroll?this.bodyScrollListener=this.renderer.listen((this.scroller?.getElementRef()).nativeElement,"scroll",this.onBodyScroll.bind(this)):this.bodyScrollListener=this.renderer.listen(this.scrollBodyViewChild?.nativeElement,"scroll",this.onBodyScroll.bind(this)))})}unbindEvents(){ge(this.platformId)&&(this.scrollHeaderViewChild&&this.scrollHeaderViewChild.nativeElement&&this.headerScrollListener&&(this.headerScrollListener(),this.headerScrollListener=null),this.scrollFooterViewChild&&this.scrollFooterViewChild.nativeElement&&this.footerScrollListener&&(this.footerScrollListener(),this.footerScrollListener=null),this.scrollBodyViewChild&&this.scrollBodyViewChild.nativeElement&&this.bodyScrollListener&&(this.bodyScrollListener(),this.bodyScrollListener=null),this.scroller&&this.scroller.getElementRef()&&this.bodyScrollListener&&(this.bodyScrollListener(),this.bodyScrollListener=null))}onHeaderScroll(){let e=this.scrollHeaderViewChild?.nativeElement.scrollLeft;this.scrollBodyViewChild.nativeElement.scrollLeft=e,this.scrollFooterViewChild&&this.scrollFooterViewChild.nativeElement&&(this.scrollFooterViewChild.nativeElement.scrollLeft=e),this.preventBodyScrollPropagation=!0}onFooterScroll(){let e=this.scrollFooterViewChild?.nativeElement.scrollLeft;this.scrollBodyViewChild.nativeElement.scrollLeft=e,this.scrollHeaderViewChild&&this.scrollHeaderViewChild.nativeElement&&(this.scrollHeaderViewChild.nativeElement.scrollLeft=e),this.preventBodyScrollPropagation=!0}onBodyScroll(e){if(this.preventBodyScrollPropagation){this.preventBodyScrollPropagation=!1;return}this.scrollHeaderViewChild&&this.scrollHeaderViewChild.nativeElement&&(this.scrollHeaderBoxViewChild.nativeElement.style.marginLeft=-1*e.target.scrollLeft+"px"),this.scrollFooterViewChild&&this.scrollFooterViewChild.nativeElement&&(this.scrollFooterBoxViewChild.nativeElement.style.marginLeft=-1*e.target.scrollLeft+"px"),this.frozenSiblingBody&&(this.frozenSiblingBody.scrollTop=e.target.scrollTop)}scrollToVirtualIndex(e){this.scroller&&this.scroller.scrollToIndex(e)}scrollTo(e){this.scroller?this.scroller.scrollTo(e):this.scrollBodyViewChild?.nativeElement.scrollTo?this.scrollBodyViewChild.nativeElement.scrollTo(e):(this.scrollBodyViewChild.nativeElement.scrollLeft=e.left,this.scrollBodyViewChild.nativeElement.scrollTop=e.top)}ngOnDestroy(){this.unbindEvents(),this.frozenSiblingBody=null}static \u0275fac=function(o){return new(o||t)(N(it),N(lt),N(oe),N(Se),N(le))};static \u0275cmp=U({type:t,selectors:[["","ttScrollableView",""]],viewQuery:function(o,i){if(o&1&&(E(al,5),E(sl,5),E(cl,5),E(dl,5),E(pl,5),E(hl,5),E(ul,5),E(ml,5),E(gl,5)),o&2){let l;g(l=f())&&(i.scrollHeaderViewChild=l.first),g(l=f())&&(i.scrollHeaderBoxViewChild=l.first),g(l=f())&&(i.scrollBodyViewChild=l.first),g(l=f())&&(i.scrollTableViewChild=l.first),g(l=f())&&(i.scrollLoadingTableViewChild=l.first),g(l=f())&&(i.scrollFooterViewChild=l.first),g(l=f())&&(i.scrollFooterBoxViewChild=l.first),g(l=f())&&(i.scrollableAlignerViewChild=l.first),g(l=f())&&(i.scroller=l.first)}},inputs:{columns:[0,"ttScrollableView","columns"],frozen:[2,"frozen","frozen",w],scrollHeight:"scrollHeight"},standalone:!1,attrs:fl,decls:13,vars:13,consts:[["scrollHeader",""],["scrollHeaderBox",""],["buildInItems",""],["scroller",""],["content",""],["loader",""],["scrollBody",""],["scrollTable",""],["scrollableAligner",""],["scrollFooter",""],["scrollFooterBox",""],[1,"p-treetable-scrollable-header"],[1,"p-treetable-scrollable-header-box"],[1,"p-treetable-scrollable-header-table",3,"ngClass","ngStyle"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["role","rowgroup",1,"p-treetable-thead"],["styleClass","p-treetable-scrollable-body",3,"items","style","scrollHeight","itemSize","lazy","options","onLazyLoad",4,"ngIf"],[4,"ngIf"],["class","p-treetable-scrollable-footer",4,"ngIf"],["styleClass","p-treetable-scrollable-body",3,"onLazyLoad","items","scrollHeight","itemSize","lazy","options"],[1,"p-treetable-scrollable-body",3,"ngStyle"],["role","table",3,"ngClass","ngStyle"],["role","rowgroup",1,"p-treetable-tbody",3,"pTreeTableBody","pTreeTableBodyTemplate","serializedNodes","frozen"],["style","background-color:transparent",4,"ngIf"],[2,"background-color","transparent"],[1,"p-treetable-scrollable-footer"],[1,"p-treetable-scrollable-footer-box"],[1,"p-treetable-scrollable-footer-table",3,"ngClass","ngStyle"],["role","rowgroup",1,"p-treetable-tfoot"]],template:function(o,i){o&1&&(d(0,"div",11,0)(2,"div",12,1)(4,"table",13),p(5,Cl,1,0,"ng-container",14),d(6,"thead",15),p(7,wl,1,0,"ng-container",14),h()()()(),p(8,kl,5,10,"p-scroller",16)(9,Ll,4,10,"ng-container",17)(10,Dl,5,15,"ng-template",null,2,x)(12,Nl,8,10,"div",18)),o&2&&(s(4),a("ngClass",i.tt.tableStyleClass)("ngStyle",i.tt.tableStyle),s(),a("ngTemplateOutlet",i.frozen?i.tt.frozenColGroupTemplate||i.tt._frozenColGroupTemplate||i.tt.colGroupTemplate||i.tt._colGroupTemplate:i.tt.colGroupTemplate||i.tt._colGroupTemplate)("ngTemplateOutletContext",P(9,K,i.columns)),s(2),a("ngTemplateOutlet",i.frozen?i.tt.frozenHeaderTemplate||i.tt._frozenHeaderTemplate||i.tt.headerTemplate||i.tt._headerTemplate:i.tt.headerTemplate||i.tt._headerTemplate)("ngTemplateOutletContext",P(11,K,i.columns)),s(),a("ngIf",i.tt.virtualScroll),s(),a("ngIf",!i.tt.virtualScroll),s(3),a("ngIf",i.tt.footerTemplate||i.tt._footerTemplate))},dependencies:()=>[re,G,ae,Le,je,si],encapsulation:2})}return t})();var ci=(()=>{class t{tt;el;zone;get level(){return this.rowNode?.level+1}get styleClass(){return this.rowNode?.node.styleClass||""}get expanded(){return this.rowNode?.node.expanded}rowNode;constructor(e,o,i){this.tt=e,this.el=o,this.zone=i}onKeyDown(e){switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e);break;case"ArrowRight":this.onArrowRightKey(e);break;case"ArrowLeft":this.onArrowLeftKey(e);break;case"Tab":this.onTabKey(e);break;case"Home":this.onHomeKey(e);break;case"End":this.onEndKey(e);break;default:break}}onArrowDownKey(e){let o=this.el?.nativeElement?.nextElementSibling;o&&this.focusRowChange(e.currentTarget,o),e.preventDefault()}onArrowUpKey(e){let o=this.el?.nativeElement?.previousElementSibling;o&&this.focusRowChange(e.currentTarget,o),e.preventDefault()}onArrowRightKey(e){let o=e.currentTarget;!(z(o,"button").style.visibility==="hidden")&&!this.expanded&&this.rowNode.node.children&&(this.expand(e),o.tabIndex=-1),e.preventDefault()}onArrowLeftKey(e){let o=this.tt.containerViewChild?.nativeElement,i=ie(o,'[aria-expanded="true"]'),l=i[i.length-1];this.expanded&&this.collapse(e),l&&(this.tt.toggleRowIndex=se(l)),this.restoreFocus(),e.preventDefault()}onHomeKey(e){let o=z(this.tt.containerViewChild?.nativeElement,`tr[aria-level="${this.level}"]`);o&&fe(o),e.preventDefault()}onEndKey(e){let o=ie(this.tt.containerViewChild?.nativeElement,`tr[aria-level="${this.level}"]`),i=o[o.length-1];fe(i),e.preventDefault()}onTabKey(e){let o=this.el.nativeElement?[...ie(this.el.nativeElement.parentNode,"tr")]:void 0;if(o&&xt(o)){let i=o.some(l=>Ve(l,"data-p-highlight")||l.getAttribute("aria-checked")==="true");if(o.forEach(l=>{l.tabIndex=-1}),i){let l=o.filter(n=>Ve(n,"data-p-highlight")||n.getAttribute("aria-checked")==="true");l[0].tabIndex=0;return}o[0].tabIndex=0}}expand(e){this.tt.toggleRowIndex=se(this.el.nativeElement),this.rowNode.node.expanded=!0,this.tt.updateSerializedValue(),this.tt.tableService.onUIUpdate(this.tt.value),this.rowNode.node.children?this.restoreFocus(this.tt.toggleRowIndex+1):this.restoreFocus(),this.tt.onNodeExpand.emit({originalEvent:e,node:this.rowNode.node})}collapse(e){this.rowNode.node.expanded=!1,this.tt.updateSerializedValue(),this.tt.tableService.onUIUpdate(this.tt.value),this.tt.onNodeCollapse.emit({originalEvent:e,node:this.rowNode.node})}focusRowChange(e,o,i){e.tabIndex="-1",o.tabIndex="0",fe(o)}restoreFocus(e){this.zone.runOutsideAngular(()=>{setTimeout(()=>{let o=this.tt.containerViewChild?.nativeElement,i=z(o,".p-treetable-tbody").children[e||this.tt.toggleRowIndex],l=[...ie(o,"tr")];l&&l.forEach(n=>{i.isSameNode(n)||(n.tabIndex=-1)}),i&&(i.tabIndex=0,i.focus())},25)})}static \u0275fac=function(o){return new(o||t)(N(oe),N(Se),N(le))};static \u0275dir=rt({type:t,selectors:[["","ttRow",""]],hostVars:7,hostBindings:function(o,i){o&1&&k("keydown",function(n){return i.onKeyDown(n)}),o&2&&(ne("tabindex","0")("aria-expanded",i.expanded)("aria-level",i.level)("data-pc-section",i.row)("role",i.row),j("p-element "+i.styleClass))},inputs:{rowNode:[0,"ttRow","rowNode"]},standalone:!1})}return t})(),di=(()=>{class t extends He{tt;rowNode;constructor(e){super(),this.tt=e}get toggleButtonAriaLabel(){return this.config.translation?this.rowNode.expanded?this.config.translation.aria.collapseRow:this.config.translation.aria.expandRow:void 0}onClick(e){this.rowNode.node.expanded=!this.rowNode.node.expanded,this.rowNode.node.expanded?this.tt.onNodeExpand.emit({originalEvent:e,node:this.rowNode.node}):this.tt.onNodeCollapse.emit({originalEvent:e,node:this.rowNode.node}),this.tt.updateSerializedValue(),this.tt.tableService.onUIUpdate(this.tt.value),e.preventDefault()}static \u0275fac=function(o){return new(o||t)(N(oe))};static \u0275cmp=U({type:t,selectors:[["p-treeTableToggler"],["p-treetabletoggler"],["p-treetable-toggler"]],inputs:{rowNode:"rowNode"},standalone:!1,features:[xe],decls:3,vars:12,consts:[["type","button","tabindex","-1","pRipple","",1,"p-treetable-toggler",3,"click"],[4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(o,i){o&1&&(d(0,"button",0),k("click",function(n){return i.onClick(n)}),p(1,Hl,3,2,"ng-container",1)(2,Bl,1,0,null,2),h()),o&2&&(at("visibility",i.rowNode.node.leaf===!1||i.rowNode.node.children&&i.rowNode.node.children.length?"visible":"hidden")("margin-inline-start",i.rowNode.level*16+"px"),ne("data-pc-section","rowtoggler")("data-pc-group-section","rowactionbutton")("aria-label",i.toggleButtonAriaLabel),s(),a("ngIf",!i.tt.togglerIconTemplate&&!i.tt._togglerIconTemplate),s(),a("ngTemplateOutlet",i.tt.togglerIconTemplate||i.tt._togglerIconTemplate)("ngTemplateOutletContext",P(10,K,i.rowNode.node.expanded)))},dependencies:()=>[G,ae,Nt,$e,Qe],encapsulation:2})}return t})(),pi=(()=>{class t{static \u0275fac=function(o){return new(o||t)};static \u0275mod=nt({type:t});static \u0275inj=et({imports:[me,Jt,je,Ue,Be,Ke,Rt,Pt,Dt,Lt,Mt,$e,Qe,Vt,Fe,Ct,Fe]})}return t})();var hi=mi(gi());var ql=["#treeTable"],Wl=()=>({width:"30vw"}),Gl=()=>({"1199px":"75vw","575px":"100vw"}),Jl=()=>({height:"calc(100vh - 70px)"}),Xl=t=>({"col-12":t}),Zl=(t,r,e)=>({"bg-gradient-danger":t,"bg-gradient-success":r,"bg-gradient-warning":e});function Yl(t,r){if(t&1){let e=D();d(0,"p-button",17),k("click",function(){L(e);let i=m(2);return M(i.onPrevStep())}),h()}if(t&2){let e=m(2);a("disabled",e.stepActiveIndex()===1)}}function en(t,r){if(t&1){let e=D();d(0,"p-button",18),k("click",function(){L(e);let i=m(2);return M(i.onNextStep())}),h()}if(t&2){let e=m(2);a("disabled",e.stepActiveIndex()===3||!e.COAImportPreview())}}function tn(t,r){if(t&1){let e=D();d(0,"p-button",19),k("click",function(){L(e);let i=m(2);return M(i.onReset())}),h()}}function on(t,r){if(t&1&&p(0,Yl,1,1,"p-button",14)(1,en,1,1,"p-button",15)(2,tn,1,0,"p-button",16),t&2){let e=m();a("ngIf",e.stepActiveIndex()>1),s(),a("ngIf",e.stepActiveIndex()<3),s(),a("ngIf",e.stepActiveIndex()===3)}}function ln(t,r){if(t&1){let e=D();d(0,"POS-uppy",28),k("fileUploaded",function(i){L(e);let l=m(2);return M(l.onFileUploaded(i))})("fileRemoved",function(i){L(e);let l=m(2);return M(l.onFileRemoved(i))}),h(),d(1,"p",29),b(2," Please refer this "),d(3,"a",30),b(4,"article"),h(),b(5," for more information "),h()}if(t&2){let e=m(2);a("uppyCoreConfiguration",e.uppyCore)("dashboardPropsConfiguration",e.dashboardProps)("sampleUrl",e.SAMPLE_URL)}}function nn(t,r){if(t&1){let e=D();d(0,"tr")(1,"th"),b(2,"Type"),h(),d(3,"th"),b(4,"Name"),h(),d(5,"th"),b(6,"Code"),h(),d(7,"th")(8,"div")(9,"span"),b(10,"Status "),h(),d(11,"p-button",33),k("onClick",function(i){L(e),m(4);let l=Y(15);return M(l.toggle(i))}),h()()(),d(12,"th"),b(13,"Message"),h()()}t&2&&(s(11),a("text",!0))}function rn(t,r){if(t&1&&(d(0,"div")(1,"span"),b(2),h(),d(3,"span"),b(4),h()()),t&2){let e=r.$implicit;s(2),A(e.issue),s(2),A(e.solution)}}function an(t,r){if(t&1&&(d(0,"div",40),ke(1,rn,5,2,"div",null,Ee),h()),t&2){let e=m().rowData;s(),ze(e.issues)}}function sn(t,r){if(t&1&&(d(0,"tr",34)(1,"td")(2,"div",35),I(3,"p-treetable-toggler",36)(4,"i"),b(5),gt(6,"truncate"),h()(),d(7,"td"),b(8),h(),d(9,"td"),b(10),h(),d(11,"td",37),b(12),h(),d(13,"td",38),p(14,an,3,0,"div",39),h()()),t&2){let e=r.$implicit,o=r.rowData;a("ttRow",e),s(3),a("rowNode",e),s(),j(o.icon),s(),ue(" ",ft(6,10,o.typeName,40)," "),s(3),A(o.accountName),s(2),A(o.code),s(),a("ngClass",ht(13,Zl,o.action==="Error",o.action==="New",o.action==="Update")),s(),ue(" ",o.action," "),s(2),a("ngIf",o.issues&&o.issues.length)}}function cn(t,r){if(t&1){let e=D();d(0,"p-treetable",32,7),k("onSort",function(i){L(e);let l=m(3);return M(l.onSort(i))}),p(2,nn,14,1,"ng-template",null,3,x)(4,sn,15,17,"ng-template",null,8,x),h()}if(t&2){let e=m(3);a("value",e.COAImportPreviewTreenode)("sortField",e.sortField)("sortOrder",e.sortOrder)}}function dn(t,r){if(t&1&&p(0,cn,6,3,"p-treetable",31),t&2){let e=m(2);Ie(e.COAImportPreview()?0:-1)}}function pn(t,r){t&1&&(d(0,"h5"),b(1,"Successfully Imported"),h())}function hn(t,r){if(t&1&&(d(0,"p-panel")(1,"p-scroll-panel")(2,"div",20)(3,"div",21)(4,"p-stepper",22,6)(6,"p-step-list")(7,"p-step",23)(8,"div",24),I(9,"i",25),d(10,"span"),b(11,"Upload"),h()()(),d(12,"p-step",23)(13,"div",24),I(14,"i",26),d(15,"span"),b(16,"Preview"),h()()(),d(17,"p-step",23)(18,"div",24),I(19,"i",27),d(20,"span"),b(21,"Finish"),h()()()(),d(22,"p-step-panels")(23,"p-step-panel",23),p(24,ln,6,3,"ng-template",null,1,x),h(),d(26,"p-step-panel",23),p(27,dn,1,1,"ng-template",null,1,x),h(),d(29,"p-step-panel",23),p(30,pn,2,0,"ng-template",null,1,x),h()()()()()()()),t&2){let e=m();s(),Z(ee(11,Jl)),s(2),a("ngClass",P(12,Xl,e.stepActiveIndex()===2)),s(),a("linear",!0)("value",e.stepActiveIndex()),s(3),a("value",1),s(5),a("value",2),s(5),a("value",3),s(6),a("value",1),s(3),a("value",2),s(3),a("value",3)}}function un(t,r){if(t&1){let e=D();d(0,"p-button",41),k("onClick",function(){L(e);let i=m();return M(i.summaryDialogVisible.set(!1))}),h()}t&2&&a("rounded",!0)("text",!0)}function mn(t,r){if(t&1&&(d(0,"div",42)(1,"h4",43),b(2,"Import Summary"),h(),d(3,"p",44),b(4),h()()),t&2){let e=m();s(4),ue("(",e.CSVRowCount()," rows ready for import)")}}function gn(t,r){t&1&&(d(0,"div",48)(1,"h4",49),b(2,"New"),h()())}function fn(t,r){t&1&&(d(0,"div",50)(1,"h4",49),b(2,"Updated"),h()())}function bn(t,r){t&1&&(d(0,"div",51)(1,"h4",49),b(2,"Unchanged"),h()())}function _n(t,r){t&1&&(d(0,"div",52)(1,"h4",49),b(2,"Error"),h()())}function yn(t,r){if(t&1&&(d(0,"div",45)(1,"div",46)(2,"p-card"),p(3,gn,3,0,"ng-template",null,3,x),d(5,"div",45)(6,"div",46)(7,"h5",47),b(8),h()()()()()(),I(9,"br"),d(10,"div",45)(11,"div",46)(12,"p-card"),p(13,fn,3,0,"ng-template",null,3,x),d(15,"div",45)(16,"div",46)(17,"h5",47),b(18),h()()()()(),d(19,"div",46)(20,"p-card"),p(21,bn,3,0,"ng-template",null,3,x),d(23,"div",45)(24,"div",46)(25,"h5",47),b(26),h()()()()(),d(27,"div",46)(28,"p-card"),p(29,_n,3,0,"ng-template",null,3,x),d(31,"div",45)(32,"div",46)(33,"h5",47),b(34),h()()()()()()),t&2){let e=m(2);s(8),A(e.COAImportPreview().summary.new),s(10),A(e.COAImportPreview().summary.updated),s(8),A(e.COAImportPreview().summary.noChanges),s(8),A(e.COAImportPreview().summary.error)}}function Tn(t,r){if(t&1&&p(0,yn,35,4),t&2){let e=m();Ie(e.COAImportPreview()?0:-1)}}function Cn(t,r){if(t&1){let e=D();d(0,"p-button",53),k("click",function(){L(e);let i=m();return M(i.summaryDialogVisible.set(!1))}),h(),d(1,"p-button",54),k("click",function(){L(e);let i=m();return M(i.onConfirmImport())}),h()}if(t&2){let e=m();s(),a("disabled",!e.COAImportPreview().canProceed)}}function wn(t,r){if(t&1){let e=D();d(0,"li",13)(1,"input",55),k("change",function(){let i=L(e).$implicit,l=m();return M(l.onChangeStatusFilter(i))}),h(),d(2,"label",56,9),b(4),h()()}if(t&2){let e=r.$implicit,o=r.$index,i=m();s(),a("checked",i.selectedStatuses().includes(e))("value",e)("id",e+"-"+o),s(),a("for",e+"-"+o),s(2),A(e)}}var Dr=(()=>{class t{constructor(){this.service=B(Xt),this.router=B(Tt),this.filterService=B(be),this.stepActiveIndex=X(1),this.COAImportPreview=X(null),this.COAImportPreviewTreenode=[],this.summaryDialogVisible=X(!1),this.CSVRowCount=X(0),this.sortField="",this.sortOrder=1,this.sortableColumns=[{field:"typeName",header:"Type"},{field:"accountName",header:"Name"},{field:"code",header:"Code"},{field:"action",header:"Status"}],this.dashboardProps={inline:!0,width:580,height:350},this.uppyCore={restrictions:{allowedFileTypes:["text/csv","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"]}},this.SAMPLE_URL="https://cdn.dealpos.xyz/books-import-template/ChartOfAccount-New.csv",this.importStatuses=["Unchanged","New","Update","Error"],this.selectedStatuses=X([...this.importStatuses]),_t(()=>{let e=this.COAImportPreview(),o=this.selectedStatuses();if(!e||!Array.isArray(e.dataRow)){this.COAImportPreviewTreenode=[];return}if(!o||o.length===0){this.COAImportPreviewTreenode=[];return}let i=l=>{let n=[];for(let c of l){let u=c.children?i(c.children):[];(o.includes(c.data.action)||u.length>0)&&n.push(he($({},c),{children:u}))}return n};this.COAImportPreviewTreenode=i(e.dataRow)})}onChangeStatusFilter(e){this.selectedStatuses.update(o=>o.includes(e)?o.filter(i=>i!==e):[...o,e])}onFileRemoved(e){console.log("File removed event:",e),this.COAImportPreview.set(null),this.COAImportPreviewTreenode=[]}onNextStep(){if(this.stepActiveIndex()<3&&(this.stepActiveIndex.update(e=>e+1),this.stepActiveIndex()===3)){this.stepActiveIndex.update(()=>this.stepActiveIndex()-1),this.summaryDialogVisible.set(!0);return}}onPrevStep(){this.stepActiveIndex()>1&&this.stepActiveIndex.update(e=>e-1)}onFileUploaded(e){let o=new FormData;if("name"in e&&typeof e.name=="string")hi.default.parse(e,{header:!0,skipEmptyLines:!0,complete:i=>{console.log("CSV Parsing Results:",i),this.CSVRowCount.set(i.data.length)},error:i=>{console.error("Error parsing CSV:",i)}}),o.append("File",e,e.name),this.service.importPreviewChartOfAccounts(o).pipe(qe("Import Preview"),Ce(i=>{this.COAImportPreview.set(i),this.COAImportPreviewTreenode=i.dataRow})).subscribe();else return}getJournalEntryImportCount(){let e=this.COAImportPreview();return e&&e.summary?.total!==void 0?e.summary.total:0}onConfirmImport(){if(this.COAImportPreview()&&this.COAImportPreview().canProceed){let e={cacheKey:this.COAImportPreview().cacheKey};this.service.importConfirmChartOfAccounts(e).pipe(qe("Import Confirm"),Ce(()=>{this.router.navigate(["/pages/chart-of-account/account"]),this.stepActiveIndex.update(o=>o+1),this.summaryDialogVisible.update(o=>!o)}),Ye(o=>(console.error("Error occurred during import confirmation:",o),this.stepActiveIndex.update(i=>i+1),this.summaryDialogVisible.update(i=>!i),Ze(null)))).subscribe()}else{console.error("Cannot proceed with import, JournalEntryImport is not set or canProceed is false.");return}}onReset(){this.stepActiveIndex.set(1),this.COAImportPreview.set(null)}onSort(e){this.sortField=e.field,this.sortOrder=e.order,this.sortTreeNodes(this.COAImportPreviewTreenode,e.field,e.order)}sortTreeNodes(e,o,i){e.sort((l,n)=>{let c=l.data[o],u=n.data[o];return c==null&&u!=null?i:c!=null&&u==null?-i:c==null&&u==null?0:typeof c=="string"&&typeof u=="string"?c.localeCompare(u)*i:c<u?-i:c>u?i:0}),e.forEach(l=>{l.children&&l.children.length>0&&this.sortTreeNodes(l.children,o,i)})}handleKeyboardEvent(e){e.key==="F2"&&this.onConfirmImport()}get hasIssue(){let e=this.COAImportPreview();return e&&Array.isArray(e.dataRow)?e.dataRow.some(o=>{let i=o.issues&&o.issues.length>0,l=o.items&&o.items.some(n=>n.issues&&n.issues.length>0);return i||l}):!1}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275cmp=U({type:t,selectors:[["app-coa-import"]],viewQuery:function(o,i){if(o&1&&E(ql,5),o&2){let l;g(l=f())&&(i.treeTableRef=l.first)}},hostBindings:function(o,i){o&1&&k("keydown",function(n){return i.handleKeyboardEvent(n)},!1,ot)},decls:19,vars:10,consts:[["actionButton",""],["content",""],["closeIconTemplate",""],["header",""],["footer",""],["op",""],["stepper",""],["treeTable",""],["body",""],["label",""],["pageTitle","Chart of Account Import"],["position","center","appendTo","body",3,"visibleChange","modal","visible","breakpoints","draggable","closeIconTemplate","dismissableMask"],[1,"list-group","border-none"],["tabindex","0",1,"list-group-item","d-flex","align-items-center"],["label","Back","severity","secondary","variant","outlined",3,"disabled","click",4,"ngIf"],["label","Next","severity","primary",3,"disabled","click",4,"ngIf"],["label","Finish","severity","primary",3,"click",4,"ngIf"],["label","Back","severity","secondary","variant","outlined",3,"click","disabled"],["label","Next","severity","primary",3,"click","disabled"],["label","Finish","severity","primary",3,"click"],[1,"row","justify-content-center"],[1,"col-6",3,"ngClass"],[1,"basis-[50rem]",3,"linear","value"],[3,"value"],[1,"d-flex","gap-2","align-items-center"],[1,"fa-solid","fa-upload"],[1,"fa-solid","fa-file"],[1,"fa-solid","fa-check"],["subtitle","Accepted file format: .csv & max file size: 1MB",3,"fileUploaded","fileRemoved","uppyCoreConfiguration","dashboardPropsConfiguration","sampleUrl"],[1,"fst-italic"],["href","#","target","_blank",1,"link","link-primary"],["scrollable","","scrollHeight","calc(100vh - 200px)",3,"value","sortField","sortOrder"],["scrollable","","scrollHeight","calc(100vh - 200px)",3,"onSort","value","sortField","sortOrder"],["icon","fa-solid fa-filter",3,"onClick","text"],[3,"ttRow"],[1,"d-flex","align-items-center","gap-2"],[3,"rowNode"],[3,"ngClass"],[1,"p-0"],["class","p-2",4,"ngIf"],[1,"p-2"],["severity","secondary","variant","outlined","icon","fa-solid fa-xmark",3,"onClick","rounded","text"],[1,"d-flex","gap-2","align-items-baseline"],[1,"fs-4","text-white","m-0"],[1,"m-0","fs-3"],[1,"row"],[1,"col"],[1,"fs-2"],[1,"state-new"],[1,"fs-3","m-0"],[1,"state-updated"],[1,"state-unchanged"],[1,"state-error"],["label","Cancel","severity","secondary","variant","outlined",3,"click"],["label","OK (F2)",3,"click","disabled"],["type","checkbox",1,"form-check-input","me-1",3,"change","checked","value","id"],[1,"form-check-label","m-0",3,"for"]],template:function(o,i){if(o&1){let l=D();d(0,"app-main-panel",10),p(1,on,3,3,"ng-template",null,0,x)(3,hn,32,14,"ng-template",null,1,x),h(),d(5,"p-dialog",11),dt("visibleChange",function(c){return L(l),ct(i.summaryDialogVisible,c)||(i.summaryDialogVisible=c),M(c)}),p(6,un,1,2,"ng-template",null,2,x)(8,mn,5,1,"ng-template",null,3,x)(10,Tn,1,1,"ng-template",null,1,x)(12,Cn,2,1,"ng-template",null,4,x),h(),d(14,"p-popover",null,5)(16,"ul",12),ke(17,wn,5,5,"li",13,Ee),h()()}if(o&2){let l=Y(7);s(5),Z(ee(8,Wl)),a("modal",!0),st("visible",i.summaryDialogVisible),a("breakpoints",ee(9,Gl))("draggable",!1)("closeIconTemplate",l)("dismissableMask",!0),s(12),ze(i.importStatuses)}},dependencies:[jt,me,re,G,Bt,At,Zt,Wt,qt,li,oi,Yt,ii,ti,ei,ni,Ht,Ft,pi,oe,di,ci,$t,Kt,Ut,Qt,zt,kt,Ot],styles:["[_nghost-%COMP%]{display:block} .p-stepper{display:flex;flex-direction:column;align-items:center} .p-stepper .p-steplist{width:40vw;min-height:10vh} .p-card{border-radius:4px} .p-card .p-card-header{display:flex;align-items:center;width:100%} .p-card .p-card-header .state-new{width:inherit;padding:.75rem;vertical-align:middle;background:repeating-linear-gradient(-60deg,#beeebb,#beeebb 15px,#afeba8 15px 30px)!important} .p-card .p-card-header .state-updated{width:inherit;padding:.75rem;background:repeating-linear-gradient(-60deg,#fcf3cf,#fcf3cf 15px,#f9e79f 15px 30px)!important} .p-card .p-card-header .state-unchanged{width:inherit;padding:.75rem;border-bottom:1px solid #dee2e6} .p-card .p-card-header .state-error{width:inherit;padding:.75rem;background:repeating-linear-gradient(-60deg,#f8d7da,#f8d7da 15px,#f5c6cb 15px 30px)!important}.list-group[_ngcontent-%COMP%] .list-group-item[_ngcontent-%COMP%]{padding:.5rem 1rem;font-size:.875rem;color:#212529;border:none;background-color:transparent;cursor:pointer}.list-group[_ngcontent-%COMP%] .list-group-item[_ngcontent-%COMP%]:hover{background-color:#f8f9fa}"],changeDetection:0})}}return t})();export{Dr as CoaImportComponent};
449
+ `,$l={root:({instance:t})=>({"p-treetable p-component":!0,"p-treetable-hoverable":t.rowHover||t.selectionMode,"p-treetable-resizable":t.resizableColumns,"p-treetable-resizable-fit":t.resizableColumns&&t.columnResizeMode==="fit","p-treetable-scrollable":t.scrollable,"p-treetable-flex-scrollable":t.scrollable&&t.scrollHeight==="flex","p-treetable-gridlines":t.showGridlines,"p-treetable-sm":t.size==="small","p-treetable-lg":t.size==="large"}),loading:"p-treetable-loading",mask:"p-treetable-mask p-overlay-mask",loadingIcon:"p-treetable-loading-icon",header:"p-treetable-header",paginator:({instance:t})=>"p-treetable-paginator-"+t.paginatorPosition,tableContainer:"p-treetable-table-container",table:({instance:t})=>({"p-treetable-table":!0,"p-treetable-scrollable-table":t.scrollable,"p-treetable-resizable-table":t.resizableColumns,"p-treetable-resizable-table-fit":t.resizableColumns&&t.columnResizeMode==="fit"}),thead:"p-treetable-thead",headerCell:({instance:t})=>({"p-treetable-header-cell":!0,"p-treetable-sortable-column":t.sortable,"p-treetable-resizable-column":t.resizableColumns,"p-treetable-column-sorted":t?.sorted,"p-treetable-frozen-column":t.columnProp("frozen")}),columnResizer:"p-treetable-column-resizer",columnHeaderContent:"p-treetable-column-header-content",columnTitle:"p-treetable-column-title",sortIcon:"p-treetable-sort-icon",pcSortBadge:"p-treetable-sort-badge",tbody:"p-treetable-tbody",row:({instance:t})=>({"p-treetable-row-selected":t.selected}),bodyCell:({instance:t})=>({"p-treetable-frozen-column":t.columnProp("frozen")}),bodyCellContent:({instance:t})=>({"p-treetable-body-cell-content":!0,"p-treetable-body-cell-content-expander":t.columnProp("expander")}),toggler:"p-treetable-body-cell-content-expander",nodeToggleButton:"p-treetable-node-toggle-button",nodeToggleIcon:"p-treetable-node-toggle-icon",pcNodeCheckbox:"p-treetable-node-checkbox",emptyMessage:"p-treetable-empty-message",tfoot:"p-treetable-tfoot",footerCell:({instance:t})=>({"p-treetable-frozen-column":t.columnProp("frozen")}),footer:"p-treetable-footer",columnResizeIndicator:"p-treetable-column-resize-indicator"},Ql={tableContainer:{overflow:"auto"},thead:{position:"sticky"},tfoot:{position:"sticky"}},ri=(()=>{class t extends Et{name="treetable";theme=Kl;classes=$l;inlineStyles=Ql;static \u0275fac=(()=>{let e;return function(i){return(e||(e=ve(t)))(i||t)}})();static \u0275prov=we({token:t,factory:t.\u0275fac})}return t})();var We=(()=>{class t{sortSource=new J;selectionSource=new J;contextMenuSource=new J;uiUpdateSource=new J;totalRecordsSource=new J;sortSource$=this.sortSource.asObservable();selectionSource$=this.selectionSource.asObservable();contextMenuSource$=this.contextMenuSource.asObservable();uiUpdateSource$=this.uiUpdateSource.asObservable();totalRecordsSource$=this.totalRecordsSource.asObservable();onSort(e){this.sortSource.next(e)}onSelectionChange(){this.selectionSource.next(null)}onContextMenu(e){this.contextMenuSource.next(e)}onUIUpdate(e){this.uiUpdateSource.next(e)}onTotalRecordsChange(e){this.totalRecordsSource.next(e)}static \u0275fac=function(o){return new(o||t)};static \u0275prov=we({token:t,factory:t.\u0275fac})}return t})(),oe=(()=>{class t extends He{_componentStyle=B(ri);columns;style;styleClass;tableStyle;tableStyleClass;autoLayout;lazy=!1;lazyLoadOnInit=!0;paginator;rows;first=0;pageLinks=5;rowsPerPageOptions;alwaysShowPaginator=!0;paginatorPosition="bottom";paginatorStyleClass;paginatorDropdownAppendTo;currentPageReportTemplate="{currentPage} of {totalPages}";showCurrentPageReport;showJumpToPageDropdown;showFirstLastIcon=!0;showPageLinks=!0;defaultSortOrder=1;sortMode="single";resetPageOnSort=!0;customSort;selectionMode;contextMenuSelection;contextMenuSelectionMode="separate";dataKey;metaKeySelection=!1;compareSelectionBy="deepEquals";rowHover;loading;loadingIcon;showLoader=!0;scrollable;scrollHeight;virtualScroll;virtualScrollItemSize;virtualScrollOptions;virtualScrollDelay=150;frozenWidth;frozenColumns;resizableColumns;columnResizeMode="fit";reorderableColumns;contextMenu;rowTrackBy=(e,o)=>o;filters={};globalFilterFields;filterDelay=300;filterMode="lenient";filterLocale;paginatorLocale;get totalRecords(){return this._totalRecords}set totalRecords(e){this._totalRecords=e,this.tableService.onTotalRecordsChange(this._totalRecords)}get sortField(){return this._sortField}set sortField(e){this._sortField=e}get sortOrder(){return this._sortOrder}set sortOrder(e){this._sortOrder=e}get multiSortMeta(){return this._multiSortMeta}set multiSortMeta(e){this._multiSortMeta=e}get selection(){return this._selection}set selection(e){this._selection=e}get value(){return this._value}set value(e){this._value=e}get virtualRowHeight(){return this._virtualRowHeight}set virtualRowHeight(e){this._virtualRowHeight=e,console.log("The virtualRowHeight property is deprecated, use virtualScrollItemSize property instead.")}get selectionKeys(){return this._selectionKeys}set selectionKeys(e){this._selectionKeys=e,this.selectionKeysChange.emit(this._selectionKeys)}showGridlines=!1;selectionChange=new S;contextMenuSelectionChange=new S;onFilter=new S;onNodeExpand=new S;onNodeCollapse=new S;onPage=new S;onSort=new S;onLazyLoad=new S;sortFunction=new S;onColResize=new S;onColReorder=new S;onNodeSelect=new S;onNodeUnselect=new S;onContextMenuSelect=new S;onHeaderCheckboxToggle=new S;onEditInit=new S;onEditComplete=new S;onEditCancel=new S;selectionKeysChange=new S;containerViewChild;resizeHelperViewChild;reorderIndicatorUpViewChild;reorderIndicatorDownViewChild;tableViewChild;scrollableViewChild;scrollableFrozenViewChild;_value=[];_virtualRowHeight=28;_selectionKeys;serializedValue;_totalRecords=0;_multiSortMeta;_sortField;_sortOrder=1;filteredNodes;filterTimeout;_colGroupTemplate;colGroupTemplate;_captionTemplate;captionTemplate;_headerTemplate;headerTemplate;_bodyTemplate;bodyTemplate;_footerTemplate;footerTemplate;_summaryTemplate;summaryTemplate;_emptyMessageTemplate;emptyMessageTemplate;_paginatorLeftTemplate;paginatorLeftTemplate;_paginatorRightTemplate;paginatorRightTemplate;_paginatorDropdownItemTemplate;paginatorDropdownItemTemplate;_frozenHeaderTemplate;frozenHeaderTemplate;_frozenBodyTemplate;frozenBodyTemplate;_frozenFooterTemplate;frozenFooterTemplate;_frozenColGroupTemplate;frozenColGroupTemplate;_loadingIconTemplate;loadingIconTemplate;_reorderIndicatorUpIconTemplate;reorderIndicatorUpIconTemplate;_reorderIndicatorDownIconTemplate;reorderIndicatorDownIconTemplate;_sortIconTemplate;sortIconTemplate;_checkboxIconTemplate;checkboxIconTemplate;_headerCheckboxIconTemplate;headerCheckboxIconTemplate;_togglerIconTemplate;togglerIconTemplate;_paginatorFirstPageLinkIconTemplate;paginatorFirstPageLinkIconTemplate;_paginatorLastPageLinkIconTemplate;paginatorLastPageLinkIconTemplate;_paginatorPreviousPageLinkIconTemplate;paginatorPreviousPageLinkIconTemplate;_paginatorNextPageLinkIconTemplate;paginatorNextPageLinkIconTemplate;_loaderTemplate;loaderTemplate;lastResizerHelperX;reorderIconWidth;reorderIconHeight;draggedColumn;dropPosition;preventSelectionSetterPropagation;_selection;selectedKeys={};rowTouched;editingCell;editingCellData;editingCellField;editingCellClick;documentEditListener;initialized;toggleRowIndex;ngOnInit(){super.ngOnInit(),this.lazy&&this.lazyLoadOnInit&&!this.virtualScroll&&this.onLazyLoad.emit(this.createLazyLoadMetadata()),this.initialized=!0}templates;ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"caption":this.captionTemplate=e.template;break;case"header":this.headerTemplate=e.template;break;case"body":this.bodyTemplate=e.template;break;case"footer":this.footerTemplate=e.template;break;case"summary":this.summaryTemplate=e.template;break;case"colgroup":this.colGroupTemplate=e.template;break;case"emptymessage":this.emptyMessageTemplate=e.template;break;case"paginatorleft":this.paginatorLeftTemplate=e.template;break;case"paginatorright":this.paginatorRightTemplate=e.template;break;case"paginatordropdownitem":this.paginatorDropdownItemTemplate=e.template;break;case"frozenheader":this.frozenHeaderTemplate=e.template;break;case"frozenbody":this.frozenBodyTemplate=e.template;break;case"frozenfooter":this.frozenFooterTemplate=e.template;break;case"frozencolgroup":this.frozenColGroupTemplate=e.template;break;case"loadingicon":this.loadingIconTemplate=e.template;break;case"reorderindicatorupicon":this.reorderIndicatorUpIconTemplate=e.template;break;case"reorderindicatordownicon":this.reorderIndicatorDownIconTemplate=e.template;break;case"sorticon":this.sortIconTemplate=e.template;break;case"checkboxicon":this.checkboxIconTemplate=e.template;break;case"headercheckboxicon":this.headerCheckboxIconTemplate=e.template;break;case"togglericon":this.togglerIconTemplate=e.template;break;case"paginatorfirstpagelinkicon":this.paginatorFirstPageLinkIconTemplate=e.template;break;case"paginatorlastpagelinkicon":this.paginatorLastPageLinkIconTemplate=e.template;break;case"paginatorpreviouspagelinkicon":this.paginatorPreviousPageLinkIconTemplate=e.template;break;case"paginatornextpagelinkicon":this.paginatorNextPageLinkIconTemplate=e.template;break;case"loader":this.loaderTemplate=e.template;break}})}filterService=B(be);tableService=B(We);zone=B(le);ngOnChanges(e){super.ngOnChanges(e),e.value&&(this._value=e.value.currentValue,this.lazy||(this.totalRecords=this._value?this._value.length:0,this.sortMode=="single"&&this.sortField?this.sortSingle():this.sortMode=="multiple"&&this.multiSortMeta?this.sortMultiple():this.hasFilter()&&this._filter()),this.updateSerializedValue(),this.tableService.onUIUpdate(this.value)),e.sortField&&(this._sortField=e.sortField.currentValue,(!this.lazy||this.initialized)&&this.sortMode==="single"&&this.sortSingle()),e.sortOrder&&(this._sortOrder=e.sortOrder.currentValue,(!this.lazy||this.initialized)&&this.sortMode==="single"&&this.sortSingle()),e.multiSortMeta&&(this._multiSortMeta=e.multiSortMeta.currentValue,this.sortMode==="multiple"&&this.sortMultiple()),e.selection&&(this._selection=e.selection.currentValue,this.preventSelectionSetterPropagation||(this.updateselectedKeys(),this.tableService.onSelectionChange()),this.preventSelectionSetterPropagation=!1)}updateSerializedValue(){this.serializedValue=[],this.paginator?this.serializePageNodes():this.serializeNodes(null,this.filteredNodes||this.value,0,!0)}serializeNodes(e,o,i,l){if(o&&o.length)for(let n of o){n.parent=e;let c={node:n,parent:e,level:i,visible:l&&(e?e.expanded:!0)};this.serializedValue.push(c),c.visible&&n.expanded&&this.serializeNodes(n,n.children,i+1,c.visible)}}serializePageNodes(){let e=this.filteredNodes||this.value;if(this.serializedValue=[],e&&e.length){let o=this.lazy?0:this.first;for(let i=o;i<o+this.rows;i++){let l=e[i];l&&(this.serializedValue.push({node:l,parent:null,level:0,visible:!0}),this.serializeNodes(l,l.children,1,!0))}}}updateselectedKeys(){if(this.dataKey&&this._selection)if(this.selectedKeys={},Array.isArray(this._selection))for(let e of this._selection)this.selectedKeys[String(V(e.data,this.dataKey))]=1;else this.selectedKeys[String(V(this._selection.data,this.dataKey))]=1}onPageChange(e){this.first=e.first,this.rows=e.rows,this.lazy?this.onLazyLoad.emit(this.createLazyLoadMetadata()):this.serializePageNodes(),this.onPage.emit({first:this.first,rows:this.rows}),this.tableService.onUIUpdate(this.value),this.scrollable&&this.resetScrollTop()}sort(e){let o=e.originalEvent;if(this.sortMode==="single"&&(this._sortOrder=this.sortField===e.field?this.sortOrder*-1:this.defaultSortOrder,this._sortField=e.field,this.sortSingle(),this.resetPageOnSort&&this.scrollable&&this.resetScrollTop()),this.sortMode==="multiple"){let i=o.metaKey||o.ctrlKey,l=this.getSortMeta(e.field);l?i?l.order=l.order*-1:(this._multiSortMeta=[{field:e.field,order:l.order*-1}],this.resetPageOnSort&&this.scrollable&&this.resetScrollTop()):((!i||!this.multiSortMeta)&&(this._multiSortMeta=[],this.resetPageOnSort&&this.scrollable&&this.resetScrollTop()),this.multiSortMeta.push({field:e.field,order:this.defaultSortOrder})),this.sortMultiple()}}sortSingle(){if(this.sortField&&this.sortOrder){this.lazy?this.onLazyLoad.emit(this.createLazyLoadMetadata()):this.value&&(this.sortNodes(this.value),this.hasFilter()&&this._filter());let e={field:this.sortField,order:this.sortOrder};this.onSort.emit(e),this.tableService.onSort(e),this.updateSerializedValue()}}sortNodes(e){if(!(!e||e.length===0)){this.customSort?this.sortFunction.emit({data:e,mode:this.sortMode,field:this.sortField,order:this.sortOrder}):e.sort((o,i)=>{let l=V(o.data,this.sortField),n=V(i.data,this.sortField),c=null;return l==null&&n!=null?c=-1:l!=null&&n==null?c=1:l==null&&n==null?c=0:typeof l=="string"&&typeof n=="string"?c=l.localeCompare(n,void 0,{numeric:!0}):c=l<n?-1:l>n?1:0,this.sortOrder*c});for(let o of e)this.sortNodes(o.children)}}sortMultiple(){this.multiSortMeta&&(this.lazy?this.onLazyLoad.emit(this.createLazyLoadMetadata()):this.value&&(this.sortMultipleNodes(this.value),this.hasFilter()&&this._filter()),this.onSort.emit({multisortmeta:this.multiSortMeta}),this.updateSerializedValue(),this.tableService.onSort(this.multiSortMeta))}sortMultipleNodes(e){if(!(!e||e.length===0)){this.customSort?this.sortFunction.emit({data:this.value,mode:this.sortMode,multiSortMeta:this.multiSortMeta}):e.sort((o,i)=>this.multisortField(o,i,this.multiSortMeta,0));for(let o of e)this.sortMultipleNodes(o.children)}}multisortField(e,o,i,l){if(Ne(this.multiSortMeta)||Ne(i[l]))return 0;let n=V(e.data,i[l].field),c=V(o.data,i[l].field),u=null;if(n==null&&c!=null?u=-1:n!=null&&c==null?u=1:n==null&&c==null&&(u=0),typeof n=="string"||n instanceof String){if(n.localeCompare&&n!=c)return i[l].order*n.localeCompare(c,void 0,{numeric:!0})}else u=n<c?-1:1;return n==c?i.length-1>l?this.multisortField(e,o,i,l+1):0:i[l].order*u}getSortMeta(e){if(this.multiSortMeta&&this.multiSortMeta.length){for(let o=0;o<this.multiSortMeta.length;o++)if(this.multiSortMeta[o].field===e)return this.multiSortMeta[o]}return null}isSorted(e){if(this.sortMode==="single")return this.sortField&&this.sortField===e;if(this.sortMode==="multiple"){let o=!1;if(this.multiSortMeta){for(let i=0;i<this.multiSortMeta.length;i++)if(this.multiSortMeta[i].field==e){o=!0;break}}return o}}createLazyLoadMetadata(){return{first:this.first,rows:this.rows,sortField:this.sortField,sortOrder:this.sortOrder,filters:this.filters,globalFilter:this.filters&&this.filters.global?this.filters.global.value:null,multiSortMeta:this.multiSortMeta,forceUpdate:()=>this.cd.detectChanges()}}onLazyItemLoad(e){this.onLazyLoad.emit(he($($({},this.createLazyLoadMetadata()),e),{rows:e.last-e.first}))}resetScrollTop(){this.virtualScroll?this.scrollToVirtualIndex(0):this.scrollTo({top:0})}scrollToVirtualIndex(e){this.scrollableViewChild&&this.scrollableViewChild.scrollToVirtualIndex(e),this.scrollableFrozenViewChild&&this.scrollableViewChild.scrollToVirtualIndex(e)}scrollTo(e){this.scrollableViewChild&&this.scrollableViewChild.scrollTo(e),this.scrollableFrozenViewChild&&this.scrollableViewChild.scrollTo(e)}isEmpty(){let e=this.filteredNodes||this.value;return e==null||e.length==0}getBlockableElement(){return this.el.nativeElement.children[0]}onColumnResizeBegin(e){let o=ce(this.containerViewChild?.nativeElement).left;this.lastResizerHelperX=e.pageX-o+this.containerViewChild?.nativeElement.scrollLeft,e.preventDefault()}onColumnResize(e){let o=ce(this.containerViewChild?.nativeElement).left;Re(this.containerViewChild?.nativeElement,"p-unselectable-text"),this.resizeHelperViewChild.nativeElement.style.height=this.containerViewChild?.nativeElement.offsetHeight+"px",this.resizeHelperViewChild.nativeElement.style.top="0px",this.resizeHelperViewChild.nativeElement.style.left=e.pageX-o+this.containerViewChild?.nativeElement.scrollLeft+"px",this.resizeHelperViewChild.nativeElement.style.display="block"}onColumnResizeEnd(e,o){let i=this.resizeHelperViewChild.nativeElement.offsetLeft-this.lastResizerHelperX,l=o.offsetWidth,n=l+i,c=o.style.minWidth||15;if(l+i>parseInt(c)){if(this.columnResizeMode==="fit"){let u=o.nextElementSibling;for(;!u.offsetParent;)u=u.nextElementSibling;if(u){let y=u.offsetWidth-i,C=u.style.minWidth||15;if(n>15&&y>parseInt(C))if(this.scrollable){let R=this.findParentScrollableView(o),v=z(R,".p-treetable-scrollable-body table")||z(R,".p-scroller-viewport table"),O=z(R,"table.p-treetable-scrollable-header-table"),F=z(R,"table.p-treetable-scrollable-footer-table"),H=se(o);this.resizeColGroup(O,H,n,y),this.resizeColGroup(v,H,n,y),this.resizeColGroup(F,H,n,y)}else o.style.width=n+"px",u&&(u.style.width=y+"px")}}else if(this.columnResizeMode==="expand")if(this.scrollable){let u=this.findParentScrollableView(o),y=z(u,".p-treetable-scrollable-body")||z(u,".p-scroller-viewport"),C=z(u,".p-treetable-scrollable-header"),R=z(u,".p-treetable-scrollable-footer"),v=z(u,".p-treetable-scrollable-body table")||z(u,".p-scroller-viewport table"),O=z(u,"table.p-treetable-scrollable-header-table"),F=z(u,"table.p-treetable-scrollable-footer-table");v.style.width=v.offsetWidth+i+"px",O.style.width=O.offsetWidth+i+"px",F&&(F.style.width=F.offsetWidth+i+"px");let H=se(o),de=o?v.offsetWidth+i:n,pe=o?O.offsetWidth+i:n,ye=this.containerViewChild?.nativeElement.offsetWidth>=de,Te=(Ge,Je,Xe,ui)=>{Ge&&Je&&(Ge.style.width=ui?Xe+Pe(y)+"px":"auto",Je.style.width=Xe+"px")};Te(y,v,de,ye),Te(C,O,pe,ye),Te(R,F,pe,ye),this.resizeColGroup(O,H,n,null),this.resizeColGroup(v,H,n,null),this.resizeColGroup(F,H,n,null)}else{this.tableViewChild.nativeElement.style.width=this.tableViewChild?.nativeElement.offsetWidth+i+"px",o.style.width=n+"px";let u=this.tableViewChild?.nativeElement.style.width;this.containerViewChild.nativeElement.style.width=u+"px"}this.onColResize.emit({element:o,delta:i})}this.resizeHelperViewChild.nativeElement.style.display="none",De(this.containerViewChild?.nativeElement,"p-unselectable-text")}findParentScrollableView(e){if(e){let o=e.parentElement;for(;o&&!Me(o,"p-treetable-scrollable-view");)o=o.parentElement;return o}else return null}resizeColGroup(e,o,i,l){if(e){let n=e.children[0].nodeName==="COLGROUP"?e.children[0]:null;if(n){let c=n.children[o],u=c.nextElementSibling;c.style.width=i+"px",u&&l&&(u.style.width=l+"px")}else throw"Scrollable tables require a colgroup to support resizable columns"}}onColumnDragStart(e,o){this.reorderIconWidth=St(this.reorderIndicatorUpViewChild?.nativeElement),this.reorderIconHeight=vt(this.reorderIndicatorDownViewChild?.nativeElement),this.draggedColumn=o,e.dataTransfer.setData("text","b")}onColumnDragEnter(e,o){if(this.reorderableColumns&&this.draggedColumn&&o){e.preventDefault();let i=ce(this.containerViewChild?.nativeElement),l=ce(o);if(this.draggedColumn!=o){let n=l.left-i.left,c=i.top-l.top,u=l.left+o.offsetWidth/2;this.reorderIndicatorUpViewChild.nativeElement.style.top=l.top-i.top-(this.reorderIconHeight-1)+"px",this.reorderIndicatorDownViewChild.nativeElement.style.top=l.top-i.top+o.offsetHeight+"px",e.pageX>u?(this.reorderIndicatorUpViewChild.nativeElement.style.left=n+o.offsetWidth-Math.ceil(this.reorderIconWidth/2)+"px",this.reorderIndicatorDownViewChild.nativeElement.style.left=n+o.offsetWidth-Math.ceil(this.reorderIconWidth/2)+"px",this.dropPosition=1):(this.reorderIndicatorUpViewChild.nativeElement.style.left=n-Math.ceil(this.reorderIconWidth/2)+"px",this.reorderIndicatorDownViewChild.nativeElement.style.left=n-Math.ceil(this.reorderIconWidth/2)+"px",this.dropPosition=-1),this.reorderIndicatorUpViewChild.nativeElement.style.display="block",this.reorderIndicatorDownViewChild.nativeElement.style.display="block"}else e.dataTransfer.dropEffect="none"}}onColumnDragLeave(e){this.reorderableColumns&&this.draggedColumn&&(e.preventDefault(),this.reorderIndicatorUpViewChild.nativeElement.style.display="none",this.reorderIndicatorDownViewChild.nativeElement.style.display="none")}onColumnDrop(e,o){if(e.preventDefault(),this.draggedColumn){let i=Ae.indexWithinGroup(this.draggedColumn,"ttreorderablecolumn"),l=Ae.indexWithinGroup(o,"ttreorderablecolumn"),n=i!=l;n&&(l-i==1&&this.dropPosition===-1||i-l==1&&this.dropPosition===1)&&(n=!1),n&&l<i&&this.dropPosition===1&&(l=l+1),n&&l>i&&this.dropPosition===-1&&(l=l-1),n&&(It(this.columns,i,l),this.onColReorder.emit({dragIndex:i,dropIndex:l,columns:this.columns})),this.reorderIndicatorUpViewChild.nativeElement.style.display="none",this.reorderIndicatorDownViewChild.nativeElement.style.display="none",this.draggedColumn.draggable=!1,this.draggedColumn=null,this.dropPosition=null}}handleRowClick(e){let o=e.originalEvent.target.nodeName;if(!(o=="INPUT"||o=="BUTTON"||o=="A"||Me(e.originalEvent.target,"p-clickable"))){if(this.selectionMode){this.preventSelectionSetterPropagation=!0;let i=e.rowNode,l=this.isSelected(i.node),n=this.rowTouched?!1:this.metaKeySelection,c=this.dataKey?String(V(i.node.data,this.dataKey)):null;if(n){let u=e.originalEvent,y=u.metaKey||u.ctrlKey;if(l&&y){if(this.isSingleSelectionMode())this._selection=null,this.selectedKeys={},this.selectionChange.emit(null);else{let C=this.findIndexInSelection(i.node);this._selection=this.selection.filter((R,v)=>v!=C),this.selectionChange.emit(this.selection),c&&delete this.selectedKeys[c]}this.onNodeUnselect.emit({originalEvent:e.originalEvent,node:i.node,type:"row"})}else this.isSingleSelectionMode()?(this._selection=i.node,this.selectionChange.emit(i.node),c&&(this.selectedKeys={},this.selectedKeys[c]=1)):this.isMultipleSelectionMode()&&(y?this._selection=this.selection||[]:(this._selection=[],this.selectedKeys={}),this._selection=[...this.selection,i.node],this.selectionChange.emit(this.selection),c&&(this.selectedKeys[c]=1)),this.onNodeSelect.emit({originalEvent:e.originalEvent,node:i.node,type:"row",index:e.rowIndex})}else if(this.selectionMode==="single")l?(this._selection=null,this.selectedKeys={},this.selectionChange.emit(this.selection),this.onNodeUnselect.emit({originalEvent:e.originalEvent,node:i.node,type:"row"})):(this._selection=i.node,this.selectionChange.emit(this.selection),this.onNodeSelect.emit({originalEvent:e.originalEvent,node:i.node,type:"row",index:e.rowIndex}),c&&(this.selectedKeys={},this.selectedKeys[c]=1));else if(this.selectionMode==="multiple")if(l){let u=this.findIndexInSelection(i.node);this._selection=this.selection.filter((y,C)=>C!=u),this.selectionChange.emit(this.selection),this.onNodeUnselect.emit({originalEvent:e.originalEvent,node:i.node,type:"row"}),c&&delete this.selectedKeys[c]}else this._selection=this.selection?[...this.selection,i.node]:[i.node],this.selectionChange.emit(this.selection),this.onNodeSelect.emit({originalEvent:e.originalEvent,node:i.node,type:"row",index:e.rowIndex}),c&&(this.selectedKeys[c]=1);this.tableService.onSelectionChange()}this.rowTouched=!1}}handleRowTouchEnd(e){this.rowTouched=!0}handleRowRightClick(e){if(this.contextMenu){let o=e.rowNode.node;if(this.contextMenuSelectionMode==="separate")this.contextMenuSelection=o,this.contextMenuSelectionChange.emit(o),this.onContextMenuSelect.emit({originalEvent:e.originalEvent,node:o}),this.contextMenu.show(e.originalEvent),this.tableService.onContextMenu(o);else if(this.contextMenuSelectionMode==="joint"){this.preventSelectionSetterPropagation=!0;let i=this.isSelected(o),l=this.dataKey?String(V(o.data,this.dataKey)):null;i||(this.isSingleSelectionMode()?(this.selection=o,this.selectionChange.emit(o)):this.isMultipleSelectionMode()&&(this.selection=[o],this.selectionChange.emit(this.selection)),l&&(this.selectedKeys[l]=1)),this.contextMenu.show(e.originalEvent),this.onContextMenuSelect.emit({originalEvent:e.originalEvent,node:o})}}}toggleNodeWithCheckbox(e){this.selection=this.selection||[],this.preventSelectionSetterPropagation=!0;let o=e.rowNode.node;this.isSelected(o)?(this.propagateSelectionDown(o,!1),e.rowNode.parent&&this.propagateSelectionUp(o.parent,!1),this.selectionChange.emit(this.selection),this.onNodeUnselect.emit({originalEvent:e,node:o})):(this.propagateSelectionDown(o,!0),e.rowNode.parent&&this.propagateSelectionUp(o.parent,!0),this.selectionChange.emit(this.selection),this.onNodeSelect.emit({originalEvent:e,node:o})),this.tableService.onSelectionChange()}toggleNodesWithCheckbox(e,o){let i=this.filteredNodes||this.value;this._selection=o&&i?i.slice():[],this.toggleAll(o),o||(this._selection=[],this.selectedKeys={}),this.preventSelectionSetterPropagation=!0,this.selectionChange.emit(this._selection),this.tableService.onSelectionChange(),this.onHeaderCheckboxToggle.emit({originalEvent:e,checked:o})}toggleAll(e){let o=this.filteredNodes||this.value;if(this.selectionKeys){if(o&&o.length){for(let i of o)this.propagateDown(i,e);this.selectionKeysChange.emit(this.selectionKeys)}}else if(o&&o.length)for(let i of o)this.propagateSelectionDown(i,e)}propagateSelectionUp(e,o){if(e.children&&e.children.length){let l=0,n=!1,c=this.dataKey?String(V(e.data,this.dataKey)):null;for(let u of e.children)this.isSelected(u)?l++:u.partialSelected&&(n=!0);if(o&&l==e.children.length)this._selection=[...this.selection||[],e],e.partialSelected=!1,c&&(this.selectedKeys[c]=1);else{if(!o){let u=this.findIndexInSelection(e);u>=0&&(this._selection=this.selection.filter((y,C)=>C!=u),c&&delete this.selectedKeys[c])}n||l>0&&l!=e.children.length?e.partialSelected=!0:e.partialSelected=!1}}let i=e.parent;e.checked=o,i&&this.propagateSelectionUp(i,o)}propagateSelectionDown(e,o){let i=this.findIndexInSelection(e),l=this.dataKey?String(V(e.data,this.dataKey)):null;if(o&&i==-1?(this._selection=[...this.selection||[],e],l&&(this.selectedKeys[l]=1)):!o&&i>-1&&(this._selection=this.selection.filter((n,c)=>c!=i),l&&delete this.selectedKeys[l]),e.partialSelected=!1,e.checked=o,e.children&&e.children.length)for(let n of e.children)this.propagateSelectionDown(n,o)}isSelected(e){return e&&this.selection?this.dataKey?e.hasOwnProperty("checked")?e.checked:this.selectedKeys[V(e.data,this.dataKey)]!==void 0:Array.isArray(this.selection)?this.findIndexInSelection(e)>-1:this.equals(e,this.selection):!1}isNodeSelected(e){return this.selectionMode&&this.selectionKeys?this.selectionKeys[this.nodeKey(e)]?.checked===!0:!1}isNodePartialSelected(e){return this.selectionMode&&this.selectionKeys?this.selectionKeys[this.nodeKey(e)]?.partialChecked===!0:!1}nodeKey(e){return V(e,this.dataKey)||V(e?.data,this.dataKey)}toggleCheckbox(e){let{rowNode:o,check:i,originalEvent:l}=e,n=o.node;this.selectionKeys?(this.propagateDown(n,i),n.parent&&this.propagateUp(n.parent,i),this.selectionKeysChange.emit(this.selectionKeys)):this.toggleNodeWithCheckbox({originalEvent:l,rowNode:o}),this.tableService.onSelectionChange()}propagateDown(e,o){if(o?this.selectionKeys[this.nodeKey(e)]={checked:!0,partialChecked:!1}:delete this.selectionKeys[this.nodeKey(e)],e.children&&e.children.length)for(let i of e.children)this.propagateDown(i,o)}propagateUp(e,o){let i=0,l=!1;for(let c of e.children)this.selectionKeys[this.nodeKey(c)]&&this.selectionKeys[this.nodeKey(c)].checked?i++:this.selectionKeys[this.nodeKey(c)]&&this.selectionKeys[this.nodeKey(c)].partialChecked&&(l=!0);o&&i===e.children.length?this.selectionKeys[this.nodeKey(e)]={checked:!0,partialChecked:!1}:(o||delete this.selectionKeys[this.nodeKey(e)],l||i>0&&i!==e.children.length?this.selectionKeys[this.nodeKey(e)]={checked:!1,partialChecked:!0}:this.selectionKeys[this.nodeKey(e)]={checked:!1,partialChecked:!1});let n=e.parent;n&&this.propagateUp(n,o)}findIndexInSelection(e){let o=-1;if(this.selection&&this.selection.length){for(let i=0;i<this.selection.length;i++)if(this.equals(e,this.selection[i])){o=i;break}}return o}isSingleSelectionMode(){return this.selectionMode==="single"}isMultipleSelectionMode(){return this.selectionMode==="multiple"}equals(e,o){return this.compareSelectionBy==="equals"?Oe(e,o):Oe(e.data,o.data,this.dataKey)}filter(e,o,i){this.filterTimeout&&clearTimeout(this.filterTimeout),this.isFilterBlank(e)?this.filters[o]&&delete this.filters[o]:this.filters[o]={value:e,matchMode:i},this.filterTimeout=setTimeout(()=>{this._filter(),this.filterTimeout=null},this.filterDelay)}filterGlobal(e,o){this.filter(e,"global",o)}isFilterBlank(e){return e!=null?!!(typeof e=="string"&&e.trim().length==0||Array.isArray(e)&&e.length==0):!0}_filter(){if(this.lazy)this.onLazyLoad.emit(this.createLazyLoadMetadata());else{if(!this.value)return;if(!this.hasFilter())this.filteredNodes=null,this.paginator&&(this.totalRecords=this.value?this.value.length:0);else{let o;if(this.filters.global){if(!this.columns&&!this.globalFilterFields)throw new Error("Global filtering requires dynamic columns or globalFilterFields to be defined.");o=this.globalFilterFields||this.columns}this.filteredNodes=[];let i=this.filterMode==="strict",l=!1;for(let n of this.value){let c=$({},n),u=!0,y=!1,C;for(let v in this.filters)if(this.filters.hasOwnProperty(v)&&v!=="global"){let O=this.filters[v],F=v,H=O.value,de=O.matchMode||"startsWith",pe=this.filterService.filters[de];if(C={filterField:F,filterValue:H,filterConstraint:pe,isStrictMode:i},(i&&!(this.findFilteredNodes(c,C)||this.isFilterMatched(c,C))||!i&&!(this.isFilterMatched(c,C)||this.findFilteredNodes(c,C)))&&(u=!1),!u)break}if(this.filters.global&&!y&&o){let v=$({},c),O,F=this.filters.global.value,H=this.filterService.filters[this.filters.global.matchMode];C={filterField:O,filterValue:F,filterConstraint:H,isStrictMode:i,globalFilterFieldsArray:o},(i&&(this.findFilteredNodes(v,C)||this.isFilterMatched(v,C))||!i&&(this.isFilterMatched(v,C)||this.findFilteredNodes(v,C)))&&(y=!0,c=v)}let R=u;this.filters.global&&(R=u&&y),R&&this.filteredNodes.push(c),l=l||!u||y||u&&this.filteredNodes.length>0||!y&&this.filteredNodes.length===0}l||(this.filteredNodes=null),this.paginator&&(this.totalRecords=this.filteredNodes?this.filteredNodes.length:this.value?this.value.length:0)}this.cd.markForCheck()}this.first=0;let e=this.filteredNodes||this.value;this.onFilter.emit({filters:this.filters,filteredValue:e}),this.tableService.onUIUpdate(e),this.updateSerializedValue(),this.scrollable&&this.resetScrollTop()}findFilteredNodes(e,o){if(e){let i=!1;if(e.children){let l=[...e.children];e.children=[];for(let n of l){let c=$({},n);this.isFilterMatched(c,o)&&(i=!0,e.children.push(c))}}if(i)return!0}}isFilterMatched(e,o){let{filterField:i,filterValue:l,filterConstraint:n,isStrictMode:c,globalFilterFieldsArray:u}=o,y=!1,C=R=>n(V(e.data,R),l,this.filterLocale);return y=u?.length?u.some(R=>C(R.field||R)):C(i),(!y||c&&!this.isNodeLeaf(e))&&(y=this.findFilteredNodes(e,{filterField:i,filterValue:l,filterConstraint:n,isStrictMode:c,globalFilterFieldsArray:u})||y),y}isNodeLeaf(e){return e.leaf===!1?!1:!(e.children&&e.children.length)}hasFilter(){let e=!0;for(let o in this.filters)if(this.filters.hasOwnProperty(o)){e=!1;break}return!e}reset(){this._sortField=null,this._sortOrder=1,this._multiSortMeta=null,this.tableService.onSort(null),this.filteredNodes=null,this.filters={},this.first=0,this.lazy?this.onLazyLoad.emit(this.createLazyLoadMetadata()):this.totalRecords=this._value?this._value.length:0}updateEditingCell(e,o,i){this.editingCell=e,this.editingCellData=o,this.editingCellField=i,this.bindDocumentEditListener()}isEditingCellValid(){return this.editingCell&&ie(this.editingCell,".ng-invalid.ng-dirty").length===0}bindDocumentEditListener(){this.documentEditListener||(this.documentEditListener=this.renderer.listen(this.document,"click",e=>{this.editingCell&&!this.editingCellClick&&this.isEditingCellValid()&&(De(this.editingCell,"p-cell-editing"),this.editingCell=null,this.onEditComplete.emit({field:this.editingCellField,data:this.editingCellData}),this.editingCellField=null,this.editingCellData=null,this.unbindDocumentEditListener()),this.editingCellClick=!1}))}unbindDocumentEditListener(){this.documentEditListener&&(this.documentEditListener(),this.documentEditListener=null)}ngOnDestroy(){this.unbindDocumentEditListener(),this.editingCell=null,this.editingCellField=null,this.editingCellData=null,this.initialized=null,super.ngOnDestroy()}static \u0275fac=(()=>{let e;return function(i){return(e||(e=ve(t)))(i||t)}})();static \u0275cmp=U({type:t,selectors:[["p-treeTable"],["p-treetable"],["p-tree-table"]],contentQueries:function(o,i,l){if(o&1&&(_(l,_i,4),_(l,yi,4),_(l,Ti,4),_(l,Ci,4),_(l,wi,4),_(l,vi,4),_(l,Si,4),_(l,xi,4),_(l,Ii,4),_(l,Ei,4),_(l,ki,4),_(l,zi,4),_(l,Li,4),_(l,Mi,4),_(l,Ri,4),_(l,Di,4),_(l,Pi,4),_(l,Vi,4),_(l,Ni,4),_(l,Oi,4),_(l,Fi,4),_(l,Hi,4),_(l,Ai,4),_(l,Bi,4),_(l,Ki,4),_(l,$i,4),_(l,_e,4)),o&2){let n;g(n=f())&&(i._colGroupTemplate=n.first),g(n=f())&&(i._captionTemplate=n.first),g(n=f())&&(i._headerTemplate=n.first),g(n=f())&&(i._bodyTemplate=n.first),g(n=f())&&(i._footerTemplate=n.first),g(n=f())&&(i._summaryTemplate=n.first),g(n=f())&&(i._emptyMessageTemplate=n.first),g(n=f())&&(i._paginatorLeftTemplate=n.first),g(n=f())&&(i._paginatorRightTemplate=n.first),g(n=f())&&(i._paginatorDropdownItemTemplate=n.first),g(n=f())&&(i._frozenHeaderTemplate=n.first),g(n=f())&&(i._frozenBodyTemplate=n.first),g(n=f())&&(i._frozenFooterTemplate=n.first),g(n=f())&&(i._frozenColGroupTemplate=n.first),g(n=f())&&(i._loadingIconTemplate=n.first),g(n=f())&&(i._reorderIndicatorUpIconTemplate=n.first),g(n=f())&&(i._reorderIndicatorDownIconTemplate=n.first),g(n=f())&&(i._sortIconTemplate=n.first),g(n=f())&&(i._checkboxIconTemplate=n.first),g(n=f())&&(i._headerCheckboxIconTemplate=n.first),g(n=f())&&(i._togglerIconTemplate=n.first),g(n=f())&&(i._paginatorFirstPageLinkIconTemplate=n.first),g(n=f())&&(i._paginatorLastPageLinkIconTemplate=n.first),g(n=f())&&(i._paginatorPreviousPageLinkIconTemplate=n.first),g(n=f())&&(i._paginatorNextPageLinkIconTemplate=n.first),g(n=f())&&(i._loaderTemplate=n.first),g(n=f())&&(i.templates=n)}},viewQuery:function(o,i){if(o&1&&(E(Qi,5),E(Ui,5),E(ji,5),E(qi,5),E(Wi,5),E(Gi,5),E(Ji,5)),o&2){let l;g(l=f())&&(i.containerViewChild=l.first),g(l=f())&&(i.resizeHelperViewChild=l.first),g(l=f())&&(i.reorderIndicatorUpViewChild=l.first),g(l=f())&&(i.reorderIndicatorDownViewChild=l.first),g(l=f())&&(i.tableViewChild=l.first),g(l=f())&&(i.scrollableViewChild=l.first),g(l=f())&&(i.scrollableFrozenViewChild=l.first)}},inputs:{columns:"columns",style:"style",styleClass:"styleClass",tableStyle:"tableStyle",tableStyleClass:"tableStyleClass",autoLayout:[2,"autoLayout","autoLayout",w],lazy:[2,"lazy","lazy",w],lazyLoadOnInit:[2,"lazyLoadOnInit","lazyLoadOnInit",w],paginator:[2,"paginator","paginator",w],rows:[2,"rows","rows",Q],first:[2,"first","first",Q],pageLinks:[2,"pageLinks","pageLinks",Q],rowsPerPageOptions:"rowsPerPageOptions",alwaysShowPaginator:[2,"alwaysShowPaginator","alwaysShowPaginator",w],paginatorPosition:"paginatorPosition",paginatorStyleClass:"paginatorStyleClass",paginatorDropdownAppendTo:"paginatorDropdownAppendTo",currentPageReportTemplate:"currentPageReportTemplate",showCurrentPageReport:[2,"showCurrentPageReport","showCurrentPageReport",w],showJumpToPageDropdown:[2,"showJumpToPageDropdown","showJumpToPageDropdown",w],showFirstLastIcon:[2,"showFirstLastIcon","showFirstLastIcon",w],showPageLinks:[2,"showPageLinks","showPageLinks",w],defaultSortOrder:[2,"defaultSortOrder","defaultSortOrder",Q],sortMode:"sortMode",resetPageOnSort:[2,"resetPageOnSort","resetPageOnSort",w],customSort:[2,"customSort","customSort",w],selectionMode:"selectionMode",contextMenuSelection:"contextMenuSelection",contextMenuSelectionMode:"contextMenuSelectionMode",dataKey:"dataKey",metaKeySelection:[2,"metaKeySelection","metaKeySelection",w],compareSelectionBy:"compareSelectionBy",rowHover:[2,"rowHover","rowHover",w],loading:[2,"loading","loading",w],loadingIcon:"loadingIcon",showLoader:[2,"showLoader","showLoader",w],scrollable:[2,"scrollable","scrollable",w],scrollHeight:"scrollHeight",virtualScroll:[2,"virtualScroll","virtualScroll",w],virtualScrollItemSize:[2,"virtualScrollItemSize","virtualScrollItemSize",Q],virtualScrollOptions:"virtualScrollOptions",virtualScrollDelay:[2,"virtualScrollDelay","virtualScrollDelay",Q],frozenWidth:"frozenWidth",frozenColumns:"frozenColumns",resizableColumns:[2,"resizableColumns","resizableColumns",w],columnResizeMode:"columnResizeMode",reorderableColumns:[2,"reorderableColumns","reorderableColumns",w],contextMenu:"contextMenu",rowTrackBy:"rowTrackBy",filters:"filters",globalFilterFields:"globalFilterFields",filterDelay:[2,"filterDelay","filterDelay",Q],filterMode:"filterMode",filterLocale:"filterLocale",paginatorLocale:"paginatorLocale",totalRecords:"totalRecords",sortField:"sortField",sortOrder:"sortOrder",multiSortMeta:"multiSortMeta",selection:"selection",value:"value",virtualRowHeight:"virtualRowHeight",selectionKeys:"selectionKeys",showGridlines:[2,"showGridlines","showGridlines",w]},outputs:{selectionChange:"selectionChange",contextMenuSelectionChange:"contextMenuSelectionChange",onFilter:"onFilter",onNodeExpand:"onNodeExpand",onNodeCollapse:"onNodeCollapse",onPage:"onPage",onSort:"onSort",onLazyLoad:"onLazyLoad",sortFunction:"sortFunction",onColResize:"onColResize",onColReorder:"onColReorder",onNodeSelect:"onNodeSelect",onNodeUnselect:"onNodeUnselect",onContextMenuSelect:"onContextMenuSelect",onHeaderCheckboxToggle:"onHeaderCheckboxToggle",onEditInit:"onEditInit",onEditComplete:"onEditComplete",onEditCancel:"onEditCancel",selectionKeysChange:"selectionKeysChange"},standalone:!1,features:[pt([We,ri]),xe,tt],decls:12,vars:21,consts:[["container",""],["table",""],["scrollableView",""],["scrollableFrozenView",""],["resizeHelper",""],["reorderIndicatorUp",""],["reorderIndicatorDown",""],["data-scrollselectors",".p-treetable-scrollable-body",3,"ngStyle","ngClass"],["class","p-treetable-loading",4,"ngIf"],["class","p-treetable-header",4,"ngIf"],["styleClass","p-paginator-top",3,"rows","first","totalRecords","pageLinkSize","alwaysShow","rowsPerPageOptions","templateLeft","templateRight","dropdownAppendTo","currentPageReportTemplate","showFirstLastIcon","dropdownItemTemplate","showCurrentPageReport","showJumpToPageDropdown","showPageLinks","styleClass","locale","onPageChange",4,"ngIf"],["class","p-treetable-wrapper",4,"ngIf"],["class","p-treetable-scrollable-wrapper",4,"ngIf"],["styleClass","p-paginator-bottom",3,"rows","first","totalRecords","pageLinkSize","alwaysShow","rowsPerPageOptions","templateLeft","templateRight","dropdownAppendTo","currentPageReportTemplate","showFirstLastIcon","dropdownItemTemplate","showCurrentPageReport","showJumpToPageDropdown","showPageLinks","styleClass","locale","onPageChange",4,"ngIf"],["class","p-treetable-footer",4,"ngIf"],["class","p-column-resizer-helper","style","display:none",4,"ngIf"],["class","p-treetable-reorder-indicator-up","style","display: none;",4,"ngIf"],["class","p-treetable-reorder-indicator-down","style","display: none;",4,"ngIf"],[1,"p-treetable-loading"],[1,"p-overlay-mask","p-treetable-mask"],[3,"class",4,"ngIf"],[4,"ngIf"],[3,"spin","styleClass",4,"ngIf"],["class","p-treetable-loading-icon",4,"ngIf"],[3,"spin","styleClass"],[1,"p-treetable-loading-icon"],[4,"ngTemplateOutlet"],[1,"p-treetable-header"],["styleClass","p-paginator-top",3,"onPageChange","rows","first","totalRecords","pageLinkSize","alwaysShow","rowsPerPageOptions","templateLeft","templateRight","dropdownAppendTo","currentPageReportTemplate","showFirstLastIcon","dropdownItemTemplate","showCurrentPageReport","showJumpToPageDropdown","showPageLinks","styleClass","locale"],["pTemplate","firstpagelinkicon"],["pTemplate","previouspagelinkicon"],["pTemplate","lastpagelinkicon"],["pTemplate","nextpagelinkicon"],[1,"p-treetable-wrapper"],["role","table",3,"ngClass","ngStyle"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["role","rowgroup",1,"p-treetable-thead"],["role","rowgroup",1,"p-treetable-tbody",3,"pTreeTableBody","pTreeTableBodyTemplate"],["role","rowgroup",1,"p-treetable-tfoot"],[1,"p-treetable-scrollable-wrapper"],["class","p-treetable-scrollable-view p-treetable-frozen-view",3,"ttScrollableView","frozen","ngStyle","scrollHeight",4,"ngIf"],[1,"p-treetable-scrollable-view",3,"ttScrollableView","frozen","scrollHeight","ngStyle"],[1,"p-treetable-scrollable-view","p-treetable-frozen-view",3,"ttScrollableView","frozen","ngStyle","scrollHeight"],["styleClass","p-paginator-bottom",3,"onPageChange","rows","first","totalRecords","pageLinkSize","alwaysShow","rowsPerPageOptions","templateLeft","templateRight","dropdownAppendTo","currentPageReportTemplate","showFirstLastIcon","dropdownItemTemplate","showCurrentPageReport","showJumpToPageDropdown","showPageLinks","styleClass","locale"],[1,"p-treetable-footer"],[1,"p-column-resizer-helper",2,"display","none"],[1,"p-treetable-reorder-indicator-up",2,"display","none"],[1,"p-treetable-reorder-indicator-down",2,"display","none"]],template:function(o,i){o&1&&(d(0,"div",7,0),p(2,ro,4,2,"div",8)(3,so,2,1,"div",9)(4,wo,5,21,"p-paginator",10)(5,Io,9,16,"div",11)(6,ko,4,8,"div",12)(7,Bo,5,21,"p-paginator",13)(8,$o,2,1,"div",14)(9,Qo,2,0,"div",15)(10,Wo,4,2,"span",16)(11,Zo,4,2,"span",17),h()),o&2&&(j(i.styleClass),a("ngStyle",i.style)("ngClass",mt(14,Xi,i.showGridlines,i.rowHover||i.selectionMode==="single"||i.selectionMode==="multiple",i.autoLayout,i.resizableColumns,i.resizableColumns&&i.columnResizeMode==="fit",i.scrollable&&i.scrollHeight==="flex")),s(2),a("ngIf",i.loading&&i.showLoader),s(),a("ngIf",i.captionTemplate||i._captionTemplate),s(),a("ngIf",i.paginator&&(i.paginatorPosition==="top"||i.paginatorPosition=="both")),s(),a("ngIf",!i.scrollable),s(),a("ngIf",i.scrollable),s(),a("ngIf",i.paginator&&(i.paginatorPosition==="bottom"||i.paginatorPosition=="both")),s(),a("ngIf",i.summaryTemplate||i._summaryTemplate),s(),a("ngIf",i.resizableColumns),s(),a("ngIf",i.reorderableColumns),s(),a("ngIf",i.reorderableColumns))},dependencies:()=>[re,G,ae,Le,Gt,_e,Ue,Be,Ke,Ul,si],encapsulation:2})}return t})(),si=(()=>{class t{tt;treeTableService;cd;columns;template;frozen;serializedNodes;scrollerOptions;subscription;constructor(e,o,i){this.tt=e,this.treeTableService=o,this.cd=i,this.subscription=this.tt.tableService.uiUpdateSource$.subscribe(()=>{this.tt.virtualScroll&&this.cd.detectChanges()})}getScrollerOption(e,o){return this.tt.virtualScroll?(o=o||this.scrollerOptions,o?o[e]:null):null}getRowIndex(e){let o=this.getScrollerOption("getItemOptions");return o?o(e).index:e}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}static \u0275fac=function(o){return new(o||t)(N(oe),N(We),N(bt))};static \u0275cmp=U({type:t,selectors:[["","pTreeTableBody",""]],inputs:{columns:[0,"pTreeTableBody","columns"],template:[0,"pTreeTableBodyTemplate","template"],frozen:[2,"frozen","frozen",w],serializedNodes:"serializedNodes",scrollerOptions:"scrollerOptions"},standalone:!1,attrs:Yo,decls:2,vars:3,consts:[["ngFor","",3,"ngForOf","ngForTrackBy"],[4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(o,i){o&1&&p(0,ll,1,1,"ng-template",0)(1,rl,2,5,"ng-container",1),o&2&&(a("ngForOf",i.serializedNodes||i.tt.serializedValue)("ngForTrackBy",i.tt.rowTrackBy),s(),a("ngIf",i.tt.isEmpty()))},dependencies:[yt,G,ae],encapsulation:2})}return t})(),Ul=(()=>{class t{platformId;renderer;tt;el;zone;columns;frozen;scrollHeaderViewChild;scrollHeaderBoxViewChild;scrollBodyViewChild;scrollTableViewChild;scrollLoadingTableViewChild;scrollFooterViewChild;scrollFooterBoxViewChild;scrollableAlignerViewChild;scroller;headerScrollListener;bodyScrollListener;footerScrollListener;frozenSiblingBody;totalRecordsSubscription;_scrollHeight;preventBodyScrollPropagation;get scrollHeight(){return this._scrollHeight}set scrollHeight(e){this._scrollHeight=e,e!=null&&(e.includes("%")||e.includes("calc"))&&console.log('Percentage scroll height calculation is removed in favor of the more performant CSS based flex mode, use scrollHeight="flex" instead.')}constructor(e,o,i,l,n){this.platformId=e,this.renderer=o,this.tt=i,this.el=l,this.zone=n}ngAfterViewInit(){if(ge(this.platformId)){if(this.frozen)this.scrollableAlignerViewChild&&this.scrollableAlignerViewChild.nativeElement&&(this.scrollableAlignerViewChild.nativeElement.style.height=wt()+"px");else{(this.tt.frozenColumns||this.tt.frozenBodyTemplate||this.tt._frozenBodyTemplate)&&Re(this.el.nativeElement,"p-treetable-unfrozen-view");let e=this.el.nativeElement.previousElementSibling;if(e&&(this.tt.virtualScroll?this.frozenSiblingBody=z(e,".p-scroller-viewport"):this.frozenSiblingBody=z(e,".p-treetable-scrollable-body")),this.scrollHeight){let o=Pe();this.scrollHeaderBoxViewChild.nativeElement.style.paddingRight=o+"px",this.scrollFooterBoxViewChild&&this.scrollFooterBoxViewChild.nativeElement&&(this.scrollFooterBoxViewChild.nativeElement.style.paddingRight=o+"px")}}this.bindEvents()}}bindEvents(){ge(this.platformId)&&this.zone.runOutsideAngular(()=>{this.scrollHeaderViewChild&&this.scrollHeaderViewChild.nativeElement&&(this.headerScrollListener=this.renderer.listen(this.scrollHeaderBoxViewChild?.nativeElement,"scroll",this.onHeaderScroll.bind(this))),this.scrollFooterViewChild&&this.scrollFooterViewChild.nativeElement&&(this.footerScrollListener=this.renderer.listen(this.scrollFooterViewChild.nativeElement,"scroll",this.onFooterScroll.bind(this))),this.frozen||(this.tt.virtualScroll?this.bodyScrollListener=this.renderer.listen((this.scroller?.getElementRef()).nativeElement,"scroll",this.onBodyScroll.bind(this)):this.bodyScrollListener=this.renderer.listen(this.scrollBodyViewChild?.nativeElement,"scroll",this.onBodyScroll.bind(this)))})}unbindEvents(){ge(this.platformId)&&(this.scrollHeaderViewChild&&this.scrollHeaderViewChild.nativeElement&&this.headerScrollListener&&(this.headerScrollListener(),this.headerScrollListener=null),this.scrollFooterViewChild&&this.scrollFooterViewChild.nativeElement&&this.footerScrollListener&&(this.footerScrollListener(),this.footerScrollListener=null),this.scrollBodyViewChild&&this.scrollBodyViewChild.nativeElement&&this.bodyScrollListener&&(this.bodyScrollListener(),this.bodyScrollListener=null),this.scroller&&this.scroller.getElementRef()&&this.bodyScrollListener&&(this.bodyScrollListener(),this.bodyScrollListener=null))}onHeaderScroll(){let e=this.scrollHeaderViewChild?.nativeElement.scrollLeft;this.scrollBodyViewChild.nativeElement.scrollLeft=e,this.scrollFooterViewChild&&this.scrollFooterViewChild.nativeElement&&(this.scrollFooterViewChild.nativeElement.scrollLeft=e),this.preventBodyScrollPropagation=!0}onFooterScroll(){let e=this.scrollFooterViewChild?.nativeElement.scrollLeft;this.scrollBodyViewChild.nativeElement.scrollLeft=e,this.scrollHeaderViewChild&&this.scrollHeaderViewChild.nativeElement&&(this.scrollHeaderViewChild.nativeElement.scrollLeft=e),this.preventBodyScrollPropagation=!0}onBodyScroll(e){if(this.preventBodyScrollPropagation){this.preventBodyScrollPropagation=!1;return}this.scrollHeaderViewChild&&this.scrollHeaderViewChild.nativeElement&&(this.scrollHeaderBoxViewChild.nativeElement.style.marginLeft=-1*e.target.scrollLeft+"px"),this.scrollFooterViewChild&&this.scrollFooterViewChild.nativeElement&&(this.scrollFooterBoxViewChild.nativeElement.style.marginLeft=-1*e.target.scrollLeft+"px"),this.frozenSiblingBody&&(this.frozenSiblingBody.scrollTop=e.target.scrollTop)}scrollToVirtualIndex(e){this.scroller&&this.scroller.scrollToIndex(e)}scrollTo(e){this.scroller?this.scroller.scrollTo(e):this.scrollBodyViewChild?.nativeElement.scrollTo?this.scrollBodyViewChild.nativeElement.scrollTo(e):(this.scrollBodyViewChild.nativeElement.scrollLeft=e.left,this.scrollBodyViewChild.nativeElement.scrollTop=e.top)}ngOnDestroy(){this.unbindEvents(),this.frozenSiblingBody=null}static \u0275fac=function(o){return new(o||t)(N(it),N(lt),N(oe),N(Se),N(le))};static \u0275cmp=U({type:t,selectors:[["","ttScrollableView",""]],viewQuery:function(o,i){if(o&1&&(E(al,5),E(sl,5),E(cl,5),E(dl,5),E(pl,5),E(hl,5),E(ul,5),E(ml,5),E(gl,5)),o&2){let l;g(l=f())&&(i.scrollHeaderViewChild=l.first),g(l=f())&&(i.scrollHeaderBoxViewChild=l.first),g(l=f())&&(i.scrollBodyViewChild=l.first),g(l=f())&&(i.scrollTableViewChild=l.first),g(l=f())&&(i.scrollLoadingTableViewChild=l.first),g(l=f())&&(i.scrollFooterViewChild=l.first),g(l=f())&&(i.scrollFooterBoxViewChild=l.first),g(l=f())&&(i.scrollableAlignerViewChild=l.first),g(l=f())&&(i.scroller=l.first)}},inputs:{columns:[0,"ttScrollableView","columns"],frozen:[2,"frozen","frozen",w],scrollHeight:"scrollHeight"},standalone:!1,attrs:fl,decls:13,vars:13,consts:[["scrollHeader",""],["scrollHeaderBox",""],["buildInItems",""],["scroller",""],["content",""],["loader",""],["scrollBody",""],["scrollTable",""],["scrollableAligner",""],["scrollFooter",""],["scrollFooterBox",""],[1,"p-treetable-scrollable-header"],[1,"p-treetable-scrollable-header-box"],[1,"p-treetable-scrollable-header-table",3,"ngClass","ngStyle"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["role","rowgroup",1,"p-treetable-thead"],["styleClass","p-treetable-scrollable-body",3,"items","style","scrollHeight","itemSize","lazy","options","onLazyLoad",4,"ngIf"],[4,"ngIf"],["class","p-treetable-scrollable-footer",4,"ngIf"],["styleClass","p-treetable-scrollable-body",3,"onLazyLoad","items","scrollHeight","itemSize","lazy","options"],[1,"p-treetable-scrollable-body",3,"ngStyle"],["role","table",3,"ngClass","ngStyle"],["role","rowgroup",1,"p-treetable-tbody",3,"pTreeTableBody","pTreeTableBodyTemplate","serializedNodes","frozen"],["style","background-color:transparent",4,"ngIf"],[2,"background-color","transparent"],[1,"p-treetable-scrollable-footer"],[1,"p-treetable-scrollable-footer-box"],[1,"p-treetable-scrollable-footer-table",3,"ngClass","ngStyle"],["role","rowgroup",1,"p-treetable-tfoot"]],template:function(o,i){o&1&&(d(0,"div",11,0)(2,"div",12,1)(4,"table",13),p(5,Cl,1,0,"ng-container",14),d(6,"thead",15),p(7,wl,1,0,"ng-container",14),h()()()(),p(8,kl,5,10,"p-scroller",16)(9,Ll,4,10,"ng-container",17)(10,Dl,5,15,"ng-template",null,2,x)(12,Nl,8,10,"div",18)),o&2&&(s(4),a("ngClass",i.tt.tableStyleClass)("ngStyle",i.tt.tableStyle),s(),a("ngTemplateOutlet",i.frozen?i.tt.frozenColGroupTemplate||i.tt._frozenColGroupTemplate||i.tt.colGroupTemplate||i.tt._colGroupTemplate:i.tt.colGroupTemplate||i.tt._colGroupTemplate)("ngTemplateOutletContext",P(9,K,i.columns)),s(2),a("ngTemplateOutlet",i.frozen?i.tt.frozenHeaderTemplate||i.tt._frozenHeaderTemplate||i.tt.headerTemplate||i.tt._headerTemplate:i.tt.headerTemplate||i.tt._headerTemplate)("ngTemplateOutletContext",P(11,K,i.columns)),s(),a("ngIf",i.tt.virtualScroll),s(),a("ngIf",!i.tt.virtualScroll),s(3),a("ngIf",i.tt.footerTemplate||i.tt._footerTemplate))},dependencies:()=>[re,G,ae,Le,je,si],encapsulation:2})}return t})();var ci=(()=>{class t{tt;el;zone;get level(){return this.rowNode?.level+1}get styleClass(){return this.rowNode?.node.styleClass||""}get expanded(){return this.rowNode?.node.expanded}rowNode;constructor(e,o,i){this.tt=e,this.el=o,this.zone=i}onKeyDown(e){switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e);break;case"ArrowRight":this.onArrowRightKey(e);break;case"ArrowLeft":this.onArrowLeftKey(e);break;case"Tab":this.onTabKey(e);break;case"Home":this.onHomeKey(e);break;case"End":this.onEndKey(e);break;default:break}}onArrowDownKey(e){let o=this.el?.nativeElement?.nextElementSibling;o&&this.focusRowChange(e.currentTarget,o),e.preventDefault()}onArrowUpKey(e){let o=this.el?.nativeElement?.previousElementSibling;o&&this.focusRowChange(e.currentTarget,o),e.preventDefault()}onArrowRightKey(e){let o=e.currentTarget;!(z(o,"button").style.visibility==="hidden")&&!this.expanded&&this.rowNode.node.children&&(this.expand(e),o.tabIndex=-1),e.preventDefault()}onArrowLeftKey(e){let o=this.tt.containerViewChild?.nativeElement,i=ie(o,'[aria-expanded="true"]'),l=i[i.length-1];this.expanded&&this.collapse(e),l&&(this.tt.toggleRowIndex=se(l)),this.restoreFocus(),e.preventDefault()}onHomeKey(e){let o=z(this.tt.containerViewChild?.nativeElement,`tr[aria-level="${this.level}"]`);o&&fe(o),e.preventDefault()}onEndKey(e){let o=ie(this.tt.containerViewChild?.nativeElement,`tr[aria-level="${this.level}"]`),i=o[o.length-1];fe(i),e.preventDefault()}onTabKey(e){let o=this.el.nativeElement?[...ie(this.el.nativeElement.parentNode,"tr")]:void 0;if(o&&xt(o)){let i=o.some(l=>Ve(l,"data-p-highlight")||l.getAttribute("aria-checked")==="true");if(o.forEach(l=>{l.tabIndex=-1}),i){let l=o.filter(n=>Ve(n,"data-p-highlight")||n.getAttribute("aria-checked")==="true");l[0].tabIndex=0;return}o[0].tabIndex=0}}expand(e){this.tt.toggleRowIndex=se(this.el.nativeElement),this.rowNode.node.expanded=!0,this.tt.updateSerializedValue(),this.tt.tableService.onUIUpdate(this.tt.value),this.rowNode.node.children?this.restoreFocus(this.tt.toggleRowIndex+1):this.restoreFocus(),this.tt.onNodeExpand.emit({originalEvent:e,node:this.rowNode.node})}collapse(e){this.rowNode.node.expanded=!1,this.tt.updateSerializedValue(),this.tt.tableService.onUIUpdate(this.tt.value),this.tt.onNodeCollapse.emit({originalEvent:e,node:this.rowNode.node})}focusRowChange(e,o,i){e.tabIndex="-1",o.tabIndex="0",fe(o)}restoreFocus(e){this.zone.runOutsideAngular(()=>{setTimeout(()=>{let o=this.tt.containerViewChild?.nativeElement,i=z(o,".p-treetable-tbody").children[e||this.tt.toggleRowIndex],l=[...ie(o,"tr")];l&&l.forEach(n=>{i.isSameNode(n)||(n.tabIndex=-1)}),i&&(i.tabIndex=0,i.focus())},25)})}static \u0275fac=function(o){return new(o||t)(N(oe),N(Se),N(le))};static \u0275dir=rt({type:t,selectors:[["","ttRow",""]],hostVars:7,hostBindings:function(o,i){o&1&&k("keydown",function(n){return i.onKeyDown(n)}),o&2&&(ne("tabindex","0")("aria-expanded",i.expanded)("aria-level",i.level)("data-pc-section",i.row)("role",i.row),j("p-element "+i.styleClass))},inputs:{rowNode:[0,"ttRow","rowNode"]},standalone:!1})}return t})(),di=(()=>{class t extends He{tt;rowNode;constructor(e){super(),this.tt=e}get toggleButtonAriaLabel(){return this.config.translation?this.rowNode.expanded?this.config.translation.aria.collapseRow:this.config.translation.aria.expandRow:void 0}onClick(e){this.rowNode.node.expanded=!this.rowNode.node.expanded,this.rowNode.node.expanded?this.tt.onNodeExpand.emit({originalEvent:e,node:this.rowNode.node}):this.tt.onNodeCollapse.emit({originalEvent:e,node:this.rowNode.node}),this.tt.updateSerializedValue(),this.tt.tableService.onUIUpdate(this.tt.value),e.preventDefault()}static \u0275fac=function(o){return new(o||t)(N(oe))};static \u0275cmp=U({type:t,selectors:[["p-treeTableToggler"],["p-treetabletoggler"],["p-treetable-toggler"]],inputs:{rowNode:"rowNode"},standalone:!1,features:[xe],decls:3,vars:12,consts:[["type","button","tabindex","-1","pRipple","",1,"p-treetable-toggler",3,"click"],[4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(o,i){o&1&&(d(0,"button",0),k("click",function(n){return i.onClick(n)}),p(1,Hl,3,2,"ng-container",1)(2,Bl,1,0,null,2),h()),o&2&&(at("visibility",i.rowNode.node.leaf===!1||i.rowNode.node.children&&i.rowNode.node.children.length?"visible":"hidden")("margin-inline-start",i.rowNode.level*16+"px"),ne("data-pc-section","rowtoggler")("data-pc-group-section","rowactionbutton")("aria-label",i.toggleButtonAriaLabel),s(),a("ngIf",!i.tt.togglerIconTemplate&&!i.tt._togglerIconTemplate),s(),a("ngTemplateOutlet",i.tt.togglerIconTemplate||i.tt._togglerIconTemplate)("ngTemplateOutletContext",P(10,K,i.rowNode.node.expanded)))},dependencies:()=>[G,ae,Nt,$e,Qe],encapsulation:2})}return t})(),pi=(()=>{class t{static \u0275fac=function(o){return new(o||t)};static \u0275mod=nt({type:t});static \u0275inj=et({imports:[me,Jt,je,Ue,Be,Ke,Rt,Pt,Dt,Lt,Mt,$e,Qe,Vt,Fe,Ct,Fe]})}return t})();var hi=mi(gi());var ql=["#treeTable"],Wl=()=>({width:"30vw"}),Gl=()=>({"1199px":"75vw","575px":"100vw"}),Jl=()=>({height:"calc(100vh - 70px)"}),Xl=t=>({"col-12":t}),Zl=(t,r,e)=>({"bg-gradient-danger":t,"bg-gradient-success":r,"bg-gradient-warning":e});function Yl(t,r){if(t&1){let e=D();d(0,"p-button",17),k("click",function(){L(e);let i=m(2);return M(i.onPrevStep())}),h()}if(t&2){let e=m(2);a("disabled",e.stepActiveIndex()===1)}}function en(t,r){if(t&1){let e=D();d(0,"p-button",18),k("click",function(){L(e);let i=m(2);return M(i.onNextStep())}),h()}if(t&2){let e=m(2);a("disabled",e.stepActiveIndex()===3||!e.COAImportPreview())}}function tn(t,r){if(t&1){let e=D();d(0,"p-button",19),k("click",function(){L(e);let i=m(2);return M(i.onReset())}),h()}}function on(t,r){if(t&1&&p(0,Yl,1,1,"p-button",14)(1,en,1,1,"p-button",15)(2,tn,1,0,"p-button",16),t&2){let e=m();a("ngIf",e.stepActiveIndex()>1),s(),a("ngIf",e.stepActiveIndex()<3),s(),a("ngIf",e.stepActiveIndex()===3)}}function ln(t,r){if(t&1){let e=D();d(0,"POS-uppy",28),k("fileUploaded",function(i){L(e);let l=m(2);return M(l.onFileUploaded(i))})("fileRemoved",function(i){L(e);let l=m(2);return M(l.onFileRemoved(i))}),h(),d(1,"p",29),b(2," Please refer this "),d(3,"a",30),b(4,"article"),h(),b(5," for more information "),h()}if(t&2){let e=m(2);a("uppyCoreConfiguration",e.uppyCore)("dashboardPropsConfiguration",e.dashboardProps)("sampleUrl",e.SAMPLE_URL)}}function nn(t,r){if(t&1){let e=D();d(0,"tr")(1,"th"),b(2,"Type"),h(),d(3,"th"),b(4,"Name"),h(),d(5,"th"),b(6,"Code"),h(),d(7,"th")(8,"div")(9,"span"),b(10,"Status "),h(),d(11,"p-button",33),k("onClick",function(i){L(e),m(4);let l=Y(15);return M(l.toggle(i))}),h()()(),d(12,"th"),b(13,"Message"),h()()}t&2&&(s(11),a("text",!0))}function rn(t,r){if(t&1&&(d(0,"div")(1,"span"),b(2),h(),d(3,"span"),b(4),h()()),t&2){let e=r.$implicit;s(2),A(e.issue),s(2),A(e.solution)}}function an(t,r){if(t&1&&(d(0,"div",40),ke(1,rn,5,2,"div",null,Ee),h()),t&2){let e=m().rowData;s(),ze(e.issues)}}function sn(t,r){if(t&1&&(d(0,"tr",34)(1,"td")(2,"div",35),I(3,"p-treetable-toggler",36)(4,"i"),b(5),gt(6,"truncate"),h()(),d(7,"td"),b(8),h(),d(9,"td"),b(10),h(),d(11,"td",37),b(12),h(),d(13,"td",38),p(14,an,3,0,"div",39),h()()),t&2){let e=r.$implicit,o=r.rowData;a("ttRow",e),s(3),a("rowNode",e),s(),j(o.icon),s(),ue(" ",ft(6,10,o.typeName,40)," "),s(3),A(o.accountName),s(2),A(o.code),s(),a("ngClass",ht(13,Zl,o.action==="Error",o.action==="New",o.action==="Update")),s(),ue(" ",o.action," "),s(2),a("ngIf",o.issues&&o.issues.length)}}function cn(t,r){if(t&1){let e=D();d(0,"p-treetable",32,7),k("onSort",function(i){L(e);let l=m(3);return M(l.onSort(i))}),p(2,nn,14,1,"ng-template",null,3,x)(4,sn,15,17,"ng-template",null,8,x),h()}if(t&2){let e=m(3);a("value",e.COAImportPreviewTreenode)("sortField",e.sortField)("sortOrder",e.sortOrder)}}function dn(t,r){if(t&1&&p(0,cn,6,3,"p-treetable",31),t&2){let e=m(2);Ie(e.COAImportPreview()?0:-1)}}function pn(t,r){t&1&&(d(0,"h5"),b(1,"Successfully Imported"),h())}function hn(t,r){if(t&1&&(d(0,"p-panel")(1,"p-scroll-panel")(2,"div",20)(3,"div",21)(4,"p-stepper",22,6)(6,"p-step-list")(7,"p-step",23)(8,"div",24),I(9,"i",25),d(10,"span"),b(11,"Upload"),h()()(),d(12,"p-step",23)(13,"div",24),I(14,"i",26),d(15,"span"),b(16,"Preview"),h()()(),d(17,"p-step",23)(18,"div",24),I(19,"i",27),d(20,"span"),b(21,"Finish"),h()()()(),d(22,"p-step-panels")(23,"p-step-panel",23),p(24,ln,6,3,"ng-template",null,1,x),h(),d(26,"p-step-panel",23),p(27,dn,1,1,"ng-template",null,1,x),h(),d(29,"p-step-panel",23),p(30,pn,2,0,"ng-template",null,1,x),h()()()()()()()),t&2){let e=m();s(),Z(ee(11,Jl)),s(2),a("ngClass",P(12,Xl,e.stepActiveIndex()===2)),s(),a("linear",!0)("value",e.stepActiveIndex()),s(3),a("value",1),s(5),a("value",2),s(5),a("value",3),s(6),a("value",1),s(3),a("value",2),s(3),a("value",3)}}function un(t,r){if(t&1){let e=D();d(0,"p-button",41),k("onClick",function(){L(e);let i=m();return M(i.summaryDialogVisible.set(!1))}),h()}t&2&&a("rounded",!0)("text",!0)}function mn(t,r){if(t&1&&(d(0,"div",42)(1,"h4",43),b(2,"Import Summary"),h(),d(3,"p",44),b(4),h()()),t&2){let e=m();s(4),ue("(",e.CSVRowCount()," rows ready for import)")}}function gn(t,r){t&1&&(d(0,"div",48)(1,"h4",49),b(2,"New"),h()())}function fn(t,r){t&1&&(d(0,"div",50)(1,"h4",49),b(2,"Updated"),h()())}function bn(t,r){t&1&&(d(0,"div",51)(1,"h4",49),b(2,"Unchanged"),h()())}function _n(t,r){t&1&&(d(0,"div",52)(1,"h4",49),b(2,"Error"),h()())}function yn(t,r){if(t&1&&(d(0,"div",45)(1,"div",46)(2,"p-card"),p(3,gn,3,0,"ng-template",null,3,x),d(5,"div",45)(6,"div",46)(7,"h5",47),b(8),h()()()()()(),I(9,"br"),d(10,"div",45)(11,"div",46)(12,"p-card"),p(13,fn,3,0,"ng-template",null,3,x),d(15,"div",45)(16,"div",46)(17,"h5",47),b(18),h()()()()(),d(19,"div",46)(20,"p-card"),p(21,bn,3,0,"ng-template",null,3,x),d(23,"div",45)(24,"div",46)(25,"h5",47),b(26),h()()()()(),d(27,"div",46)(28,"p-card"),p(29,_n,3,0,"ng-template",null,3,x),d(31,"div",45)(32,"div",46)(33,"h5",47),b(34),h()()()()()()),t&2){let e=m(2);s(8),A(e.COAImportPreview().summary.new),s(10),A(e.COAImportPreview().summary.updated),s(8),A(e.COAImportPreview().summary.noChanges),s(8),A(e.COAImportPreview().summary.error)}}function Tn(t,r){if(t&1&&p(0,yn,35,4),t&2){let e=m();Ie(e.COAImportPreview()?0:-1)}}function Cn(t,r){if(t&1){let e=D();d(0,"p-button",53),k("click",function(){L(e);let i=m();return M(i.summaryDialogVisible.set(!1))}),h(),d(1,"p-button",54),k("click",function(){L(e);let i=m();return M(i.onConfirmImport())}),h()}if(t&2){let e=m();s(),a("disabled",!e.COAImportPreview().canProceed)}}function wn(t,r){if(t&1){let e=D();d(0,"li",13)(1,"input",55),k("change",function(){let i=L(e).$implicit,l=m();return M(l.onChangeStatusFilter(i))}),h(),d(2,"label",56,9),b(4),h()()}if(t&2){let e=r.$implicit,o=r.$index,i=m();s(),a("checked",i.selectedStatuses().includes(e))("value",e)("id",e+"-"+o),s(),a("for",e+"-"+o),s(2),A(e)}}var Dr=(()=>{class t{constructor(){this.service=B(Xt),this.router=B(Tt),this.filterService=B(be),this.stepActiveIndex=X(1),this.COAImportPreview=X(null),this.COAImportPreviewTreenode=[],this.summaryDialogVisible=X(!1),this.CSVRowCount=X(0),this.sortField="",this.sortOrder=1,this.sortableColumns=[{field:"typeName",header:"Type"},{field:"accountName",header:"Name"},{field:"code",header:"Code"},{field:"action",header:"Status"}],this.dashboardProps={inline:!0,width:580,height:350},this.uppyCore={restrictions:{allowedFileTypes:["text/csv","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"]}},this.SAMPLE_URL="https://cdn.dealpos.xyz/books-import-template/ChartOfAccount-New.csv",this.importStatuses=["Unchanged","New","Update","Error"],this.selectedStatuses=X([...this.importStatuses]),_t(()=>{let e=this.COAImportPreview(),o=this.selectedStatuses();if(!e||!Array.isArray(e.dataRow)){this.COAImportPreviewTreenode=[];return}if(!o||o.length===0){this.COAImportPreviewTreenode=[];return}let i=l=>{let n=[];for(let c of l){let u=c.children?i(c.children):[];(o.includes(c.data.action)||u.length>0)&&n.push(he($({},c),{children:u}))}return n};this.COAImportPreviewTreenode=i(e.dataRow)})}onChangeStatusFilter(e){this.selectedStatuses.update(o=>o.includes(e)?o.filter(i=>i!==e):[...o,e])}onFileRemoved(e){console.log("File removed event:",e),this.COAImportPreview.set(null),this.COAImportPreviewTreenode=[]}onNextStep(){if(this.stepActiveIndex()<3&&(this.stepActiveIndex.update(e=>e+1),this.stepActiveIndex()===3)){this.stepActiveIndex.update(()=>this.stepActiveIndex()-1),this.summaryDialogVisible.set(!0);return}}onPrevStep(){this.stepActiveIndex()>1&&this.stepActiveIndex.update(e=>e-1)}onFileUploaded(e){let o=new FormData;if("name"in e&&typeof e.name=="string")hi.default.parse(e,{header:!0,skipEmptyLines:!0,complete:i=>{console.log("CSV Parsing Results:",i),this.CSVRowCount.set(i.data.length)},error:i=>{console.error("Error parsing CSV:",i)}}),o.append("File",e,e.name),this.service.importPreviewChartOfAccounts(o).pipe(qe("Import Preview"),Ce(i=>{this.COAImportPreview.set(i),this.COAImportPreviewTreenode=i.dataRow})).subscribe();else return}getJournalEntryImportCount(){let e=this.COAImportPreview();return e&&e.summary?.total!==void 0?e.summary.total:0}onConfirmImport(){if(this.COAImportPreview()&&this.COAImportPreview().canProceed){let e={cacheKey:this.COAImportPreview().cacheKey};this.service.importConfirmChartOfAccounts(e).pipe(qe("Import Confirm"),Ce(()=>{this.router.navigate(["/pages/chart-of-account/account"]),this.stepActiveIndex.update(o=>o+1),this.summaryDialogVisible.update(o=>!o)}),Ye(o=>(console.error("Error occurred during import confirmation:",o),this.stepActiveIndex.update(i=>i+1),this.summaryDialogVisible.update(i=>!i),Ze(null)))).subscribe()}else{console.error("Cannot proceed with import, JournalEntryImport is not set or canProceed is false.");return}}onReset(){this.stepActiveIndex.set(1),this.COAImportPreview.set(null)}onSort(e){this.sortField=e.field,this.sortOrder=e.order,this.sortTreeNodes(this.COAImportPreviewTreenode,e.field,e.order)}sortTreeNodes(e,o,i){e.sort((l,n)=>{let c=l.data[o],u=n.data[o];return c==null&&u!=null?i:c!=null&&u==null?-i:c==null&&u==null?0:typeof c=="string"&&typeof u=="string"?c.localeCompare(u)*i:c<u?-i:c>u?i:0}),e.forEach(l=>{l.children&&l.children.length>0&&this.sortTreeNodes(l.children,o,i)})}handleKeyboardEvent(e){e.key==="F2"&&this.onConfirmImport()}get hasIssue(){let e=this.COAImportPreview();return e&&Array.isArray(e.dataRow)?e.dataRow.some(o=>{let i=o.issues&&o.issues.length>0,l=o.items&&o.items.some(n=>n.issues&&n.issues.length>0);return i||l}):!1}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275cmp=U({type:t,selectors:[["app-coa-import"]],viewQuery:function(o,i){if(o&1&&E(ql,5),o&2){let l;g(l=f())&&(i.treeTableRef=l.first)}},hostBindings:function(o,i){o&1&&k("keydown",function(n){return i.handleKeyboardEvent(n)},!1,ot)},decls:19,vars:10,consts:[["actionButton",""],["content",""],["closeIconTemplate",""],["header",""],["footer",""],["op",""],["stepper",""],["treeTable",""],["body",""],["label",""],["pageTitle","Chart of Account Import"],["position","center","appendTo","body",3,"visibleChange","modal","visible","breakpoints","draggable","closeIconTemplate","dismissableMask"],[1,"list-group","border-none"],["tabindex","0",1,"list-group-item","d-flex","align-items-center"],["label","Back","severity","secondary","variant","outlined",3,"disabled","click",4,"ngIf"],["label","Next","severity","primary",3,"disabled","click",4,"ngIf"],["label","Finish","severity","primary",3,"click",4,"ngIf"],["label","Back","severity","secondary","variant","outlined",3,"click","disabled"],["label","Next","severity","primary",3,"click","disabled"],["label","Finish","severity","primary",3,"click"],[1,"row","justify-content-center"],[1,"col-6",3,"ngClass"],[1,"basis-[50rem]",3,"linear","value"],[3,"value"],[1,"d-flex","gap-2","align-items-center"],[1,"fa-solid","fa-upload"],[1,"fa-solid","fa-file"],[1,"fa-solid","fa-check"],["subtitle","Accepted file format: .csv & max file size: 1MB",3,"fileUploaded","fileRemoved","uppyCoreConfiguration","dashboardPropsConfiguration","sampleUrl"],[1,"fst-italic"],["href","#","target","_blank",1,"link","link-primary"],["scrollable","","scrollHeight","calc(100vh - 200px)",3,"value","sortField","sortOrder"],["scrollable","","scrollHeight","calc(100vh - 200px)",3,"onSort","value","sortField","sortOrder"],["icon","fa-solid fa-filter",3,"onClick","text"],[3,"ttRow"],[1,"d-flex","align-items-center","gap-2"],[3,"rowNode"],[3,"ngClass"],[1,"p-0"],["class","p-2",4,"ngIf"],[1,"p-2"],["severity","secondary","variant","outlined","icon","fa-solid fa-xmark",3,"onClick","rounded","text"],[1,"d-flex","gap-2","align-items-baseline"],[1,"fs-4","text-white","m-0"],[1,"m-0","fs-3"],[1,"row"],[1,"col"],[1,"fs-2"],[1,"state-new"],[1,"fs-3","m-0"],[1,"state-updated"],[1,"state-unchanged"],[1,"state-error"],["label","Cancel","severity","secondary","variant","outlined",3,"click"],["label","OK (F2)",3,"click","disabled"],["type","checkbox",1,"form-check-input","me-1",3,"change","checked","value","id"],[1,"form-check-label","m-0",3,"for"]],template:function(o,i){if(o&1){let l=D();d(0,"app-main-panel",10),p(1,on,3,3,"ng-template",null,0,x)(3,hn,32,14,"ng-template",null,1,x),h(),d(5,"p-dialog",11),dt("visibleChange",function(c){return L(l),ct(i.summaryDialogVisible,c)||(i.summaryDialogVisible=c),M(c)}),p(6,un,1,2,"ng-template",null,2,x)(8,mn,5,1,"ng-template",null,3,x)(10,Tn,1,1,"ng-template",null,1,x)(12,Cn,2,1,"ng-template",null,4,x),h(),d(14,"p-popover",null,5)(16,"ul",12),ke(17,wn,5,5,"li",13,Ee),h()()}if(o&2){let l=Y(7);s(5),Z(ee(8,Wl)),a("modal",!0),st("visible",i.summaryDialogVisible),a("breakpoints",ee(9,Gl))("draggable",!1)("closeIconTemplate",l)("dismissableMask",!0),s(12),ze(i.importStatuses)}},dependencies:[jt,me,re,G,Bt,At,Zt,Wt,qt,li,oi,Yt,ii,ti,ei,ni,Ht,Ft,pi,oe,di,ci,Ut,Qt,$t,Kt,zt,kt,Ot],styles:["[_nghost-%COMP%]{display:block} .p-stepper{display:flex;flex-direction:column;align-items:center} .p-stepper .p-steplist{width:40vw;min-height:10vh} .p-card{border-radius:4px} .p-card .p-card-header{display:flex;align-items:center;width:100%} .p-card .p-card-header .state-new{width:inherit;padding:.75rem;vertical-align:middle;background:repeating-linear-gradient(-60deg,#beeebb,#beeebb 15px,#afeba8 15px 30px)!important} .p-card .p-card-header .state-updated{width:inherit;padding:.75rem;background:repeating-linear-gradient(-60deg,#fcf3cf,#fcf3cf 15px,#f9e79f 15px 30px)!important} .p-card .p-card-header .state-unchanged{width:inherit;padding:.75rem;border-bottom:1px solid #dee2e6} .p-card .p-card-header .state-error{width:inherit;padding:.75rem;background:repeating-linear-gradient(-60deg,#f8d7da,#f8d7da 15px,#f5c6cb 15px 30px)!important}.list-group[_ngcontent-%COMP%] .list-group-item[_ngcontent-%COMP%]{padding:.5rem 1rem;font-size:.875rem;color:#212529;border:none;background-color:transparent;cursor:pointer}.list-group[_ngcontent-%COMP%] .list-group-item[_ngcontent-%COMP%]:hover{background-color:#f8f9fa}"],changeDetection:0})}}return t})();export{Dr as CoaImportComponent};