dealposbooks 5.47.1 → 5.49.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 (165) hide show
  1. package/3rdpartylicenses.txt +75 -26
  2. package/assets/images/users/user1_160.jpg +0 -0
  3. package/assets/images/users/user1_40.jpg +0 -0
  4. package/assets/images/users/user1_80.jpg +0 -0
  5. package/assets/scss/layouts/_sidebar.scss +2 -2
  6. package/assets/scss/style.scss +10 -0
  7. package/chunk-2A5KXVYV.js +129 -0
  8. package/{chunk-2MKKFLNJ.js → chunk-2BI7WNJP.js} +1 -1
  9. package/{chunk-GDQUB54I.js → chunk-2LNMV22E.js} +2 -2
  10. package/chunk-2RHKXE62.js +1 -0
  11. package/chunk-2RKPDCYU.js +1 -0
  12. package/{chunk-53HJBLFX.js → chunk-2VZ7JZIO.js} +1 -1
  13. package/{chunk-YFNWEI3R.js → chunk-2XW2ZOT4.js} +1 -1
  14. package/{chunk-E4MHRZVH.js → chunk-3DBSHDAQ.js} +1 -1
  15. package/{chunk-JOHRJHEX.js → chunk-3UAQHNUY.js} +1 -1
  16. package/{chunk-3A4BFUGD.js → chunk-3VQUNDVT.js} +1 -1
  17. package/chunk-4KDA7ZRZ.js +1 -0
  18. package/chunk-4ZU2FOSO.js +1 -0
  19. package/chunk-52U5NSQT.js +2 -0
  20. package/{chunk-VK3G2VIU.js → chunk-5B5AMMR3.js} +1 -1
  21. package/chunk-5DRALZZF.js +1 -0
  22. package/chunk-5M5KVWZB.js +1 -0
  23. package/{chunk-3TPMIYM6.js → chunk-5YGRLXFR.js} +1 -1
  24. package/{chunk-6NX36ZC2.js → chunk-6DTQWLB3.js} +1 -1
  25. package/chunk-6QJHEOXN.js +7 -0
  26. package/chunk-6RB67IF5.js +1 -0
  27. package/chunk-6WWXJJID.js +1 -0
  28. package/chunk-72H3DW5Z.js +1 -0
  29. package/chunk-7HVUWEG2.js +1 -0
  30. package/chunk-A5Q65V4N.js +1 -0
  31. package/{chunk-BUDZ3ONE.js → chunk-AD247LWQ.js} +1 -1
  32. package/chunk-ADODNO5M.js +229 -0
  33. package/chunk-AJA5W4PQ.js +1 -0
  34. package/{chunk-HQMTUZZQ.js → chunk-AMGBUOC4.js} +1 -1
  35. package/{chunk-CWFLUFKM.js → chunk-AN4SAUSA.js} +1 -1
  36. package/chunk-AOQH3HTB.js +1 -0
  37. package/{chunk-KIBBRAL5.js → chunk-ARJ7OCQO.js} +1 -1
  38. package/{chunk-5BXMDXZD.js → chunk-B4C3ZPN6.js} +1 -1
  39. package/{chunk-IRGC65GN.js → chunk-BKTBVFNX.js} +1 -1
  40. package/chunk-BRKRIPYY.js +1 -0
  41. package/chunk-BT7Y4ADP.js +1 -0
  42. package/{chunk-CJCMWPPM.js → chunk-CAS5GLLU.js} +1 -1
  43. package/chunk-CLWQ53HX.js +1 -0
  44. package/chunk-D6IS6PE6.js +1 -0
  45. package/{chunk-3IEOINKV.js → chunk-DGACZ747.js} +1 -1
  46. package/{chunk-Q7SK53ST.js → chunk-DJXQKSLT.js} +1 -1
  47. package/{chunk-2D2YD753.js → chunk-DTYVTTET.js} +1 -1
  48. package/{chunk-PTQPB44D.js → chunk-E6SW7I4D.js} +1 -1
  49. package/{chunk-NDLX3ORI.js → chunk-E7QWESN4.js} +1 -1
  50. package/{chunk-53I5JFOQ.js → chunk-EBEY2MBR.js} +1 -1
  51. package/{chunk-NM5M567G.js → chunk-ELMSU4U7.js} +1 -1
  52. package/{chunk-CNXYBR45.js → chunk-ENH6HA3V.js} +1 -1
  53. package/chunk-ER5Y4FMF.js +1 -0
  54. package/chunk-ERG2YCYC.js +1 -0
  55. package/{chunk-6PNHT5U7.js → chunk-ES2YST7G.js} +1 -1
  56. package/{chunk-AOOG6YOT.js → chunk-F7PVAVLQ.js} +1 -1
  57. package/{chunk-BXEGWIR3.js → chunk-F7XGJYCZ.js} +1 -1
  58. package/{chunk-UW7IAYIG.js → chunk-FWAGEKIF.js} +1 -1
  59. package/{chunk-SZAGTA5I.js → chunk-HCJK6VTO.js} +1 -1
  60. package/chunk-HECYO7RI.js +1 -0
  61. package/chunk-IMQMRA4Y.js +1 -0
  62. package/chunk-IW7TNRJO.js +1 -0
  63. package/chunk-J3R2TUSM.js +1 -0
  64. package/{chunk-JZVNZ3I3.js → chunk-JD3HX7VY.js} +1 -1
  65. package/{chunk-OMQE3MLE.js → chunk-JLFNJ2HH.js} +1 -1
  66. package/chunk-K4IULEBH.js +1 -0
  67. package/chunk-KSPR5HTA.js +130 -0
  68. package/{chunk-VSHPIUZM.js → chunk-KZHI6PGZ.js} +1 -1
  69. package/chunk-L6PLE5U4.js +1 -0
  70. package/{chunk-Z65OWCDJ.js → chunk-LOLOGGWA.js} +1 -1
  71. package/{chunk-YZTBV6HG.js → chunk-M4SSELXT.js} +1 -1
  72. package/{chunk-IMVMIXVJ.js → chunk-ME4ALIS7.js} +1 -1
  73. package/{chunk-LABWETHZ.js → chunk-MHRSQRHT.js} +1 -1
  74. package/chunk-MV52MU2A.js +1 -0
  75. package/chunk-NMU2YBAB.js +1 -0
  76. package/{chunk-53SYMJT3.js → chunk-O3XDMCQO.js} +2 -2
  77. package/chunk-O54WM4PU.js +1 -0
  78. package/chunk-O7PTQ6FD.js +1 -0
  79. package/{chunk-U5XXKH2H.js → chunk-OJTHBHGK.js} +1 -1
  80. package/{chunk-RKFZQV37.js → chunk-OPSSYJMR.js} +1 -1
  81. package/chunk-OQRWMLXY.js +1 -0
  82. package/{chunk-RZFXAB7W.js → chunk-OT3UFDBI.js} +1 -1
  83. package/chunk-OZXIWJFE.js +1 -0
  84. package/{chunk-Q4LKKVQU.js → chunk-PGOSR3RI.js} +1 -1
  85. package/{chunk-AUZDLI47.js → chunk-PKO36DGM.js} +1 -1
  86. package/{chunk-XPRP6AB4.js → chunk-PPXXWO4E.js} +1 -1
  87. package/chunk-Q3HB53OC.js +1 -0
  88. package/{chunk-UBPSH6UX.js → chunk-Q4KG7LH6.js} +1 -1
  89. package/chunk-QJGYGXL3.js +202 -0
  90. package/{chunk-QWTGY7FA.js → chunk-QPPFPDWZ.js} +1 -1
  91. package/{chunk-PKOERZXQ.js → chunk-RM5HLXNW.js} +1 -1
  92. package/{chunk-ZUDQOT7C.js → chunk-S27Z7D3D.js} +1 -1
  93. package/chunk-STBJVKOH.js +7 -0
  94. package/{chunk-L56Y2VZA.js → chunk-SWU3XDYQ.js} +2 -2
  95. package/chunk-TFW2HBFA.js +1 -0
  96. package/chunk-TON77VSP.js +1 -0
  97. package/{chunk-IGWIRCAS.js → chunk-U2VDC52W.js} +1 -1
  98. package/chunk-U57VXKUE.js +1 -0
  99. package/{chunk-KPHDNZQR.js → chunk-UHOHG6YG.js} +1 -1
  100. package/chunk-ULAE6ZMS.js +1 -0
  101. package/{chunk-RXOOTYEO.js → chunk-UPSNJEHO.js} +1 -1
  102. package/{chunk-LWYAFMN3.js → chunk-URH77XNK.js} +1 -1
  103. package/{chunk-HZ7BZ72K.js → chunk-UVSR4LPB.js} +1 -1
  104. package/chunk-VCUOMA7I.js +1 -0
  105. package/{chunk-T3EH4DR2.js → chunk-VDXZGF3M.js} +1 -1
  106. package/{chunk-SEXB43QC.js → chunk-VKNINE5Q.js} +1 -1
  107. package/{chunk-OIBDX2CA.js → chunk-VMI3QWC6.js} +1 -1
  108. package/chunk-WDT3X7BX.js +1 -0
  109. package/{chunk-DHLFL3KH.js → chunk-WMZF4DQK.js} +1 -1
  110. package/chunk-WTU5HM6J.js +8 -0
  111. package/{chunk-PPGOVQXM.js → chunk-WUMR7VK2.js} +1 -1
  112. package/{chunk-ZMIVD3SF.js → chunk-WXIG4CXY.js} +1 -1
  113. package/{chunk-I23KOE73.js → chunk-XLEICBBP.js} +1 -1
  114. package/chunk-XVAFZB6H.js +1 -0
  115. package/{chunk-V4SH72WU.js → chunk-ZFNIPERQ.js} +1 -1
  116. package/{chunk-OP5H3EZS.js → chunk-ZIZHSXQM.js} +1 -1
  117. package/chunk-ZK43JB4A.js +2 -0
  118. package/chunk-ZXJEHHMR.js +1 -0
  119. package/index.html +2 -2
  120. package/main-P47IKABJ.js +1 -0
  121. package/package.json +1 -1
  122. package/{styles-4HAX3IDP.css → styles-FYY2LVCE.css} +1 -1
  123. package/chunk-3TL7F2KM.js +0 -1
  124. package/chunk-55EJL7IR.js +0 -1
  125. package/chunk-5CZNOXPC.js +0 -1
  126. package/chunk-5N7FOORD.js +0 -1
  127. package/chunk-5PBHMN6G.js +0 -1
  128. package/chunk-5ZBLFL65.js +0 -1
  129. package/chunk-6IZPVRGJ.js +0 -1
  130. package/chunk-7GZBVXWZ.js +0 -8
  131. package/chunk-ABFKSSKO.js +0 -1
  132. package/chunk-CD46WARP.js +0 -1
  133. package/chunk-CKQDZ5V3.js +0 -1
  134. package/chunk-EAFXWJXR.js +0 -1
  135. package/chunk-EE75EMIP.js +0 -1
  136. package/chunk-GLBRPUVN.js +0 -1
  137. package/chunk-GXFYCEYY.js +0 -7
  138. package/chunk-GY5YPT6L.js +0 -1
  139. package/chunk-IZ7ZAVDB.js +0 -202
  140. package/chunk-KSA3KTUZ.js +0 -1
  141. package/chunk-L6AAVCV5.js +0 -1
  142. package/chunk-LT4TNQWP.js +0 -1
  143. package/chunk-MQJPYOYS.js +0 -1
  144. package/chunk-MYREYOSL.js +0 -1
  145. package/chunk-N4JFV34B.js +0 -1
  146. package/chunk-NJIJC7GH.js +0 -130
  147. package/chunk-NMCKMUY4.js +0 -7
  148. package/chunk-OABNAZCH.js +0 -1
  149. package/chunk-OT26ZWS2.js +0 -1
  150. package/chunk-OZYJ4SOH.js +0 -1
  151. package/chunk-P4DH4OHM.js +0 -180
  152. package/chunk-PE5AWYXZ.js +0 -2
  153. package/chunk-PG45FZTK.js +0 -1
  154. package/chunk-QF4D5YPK.js +0 -1
  155. package/chunk-RYNNNPBD.js +0 -1
  156. package/chunk-SH2QYE6S.js +0 -1
  157. package/chunk-SQUBEFKB.js +0 -1
  158. package/chunk-UAZOJSS3.js +0 -1
  159. package/chunk-UYWLPZ66.js +0 -1
  160. package/chunk-VEEJ5Z24.js +0 -1
  161. package/chunk-VZ5CMS5O.js +0 -2
  162. package/chunk-XJ7SJUJ2.js +0 -1
  163. package/chunk-XQB3OGS3.js +0 -1
  164. package/chunk-Y5V2RWZ2.js +0 -129
  165. package/main-2FOYJ7E6.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-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-CJCMWPPM.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-P4DH4OHM.js";import"./chunk-ZUDQOT7C.js";import{a as At,b as Bt}from"./chunk-BUDZ3ONE.js";import{a as $t}from"./chunk-IRGC65GN.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-XJ7SJUJ2.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-5B5AMMR3.js";import{a as Zt,b as gi,c as ni}from"./chunk-JD3HX7VY.js";import{a as kt,b as zt}from"./chunk-2XW2ZOT4.js";import{a as Xt}from"./chunk-CAS5GLLU.js";import{a as qe}from"./chunk-BT7Y4ADP.js";import{a as Ot}from"./chunk-DJXQKSLT.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-VKNINE5Q.js";import"./chunk-E7QWESN4.js";import"./chunk-AN4SAUSA.js";import"./chunk-URH77XNK.js";import{a as Vt}from"./chunk-PPXXWO4E.js";import{c as je}from"./chunk-3DBSHDAQ.js";import{a as Lt}from"./chunk-M4SSELXT.js";import{a as qt,b as Wt}from"./chunk-WXIG4CXY.js";import{a as Qe}from"./chunk-QPPFPDWZ.js";import{a as $e}from"./chunk-WMZF4DQK.js";import{e as Qt,f as Ut,i as jt}from"./chunk-ADODNO5M.js";import"./chunk-S27Z7D3D.js";import{a as At,b as Bt}from"./chunk-AD247LWQ.js";import{a as $t}from"./chunk-BKTBVFNX.js";import{i as Mt}from"./chunk-ZFNIPERQ.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-ME4ALIS7.js";import"./chunk-DTYVTTET.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 ce,_ as de,na as Ne,qa as xt,ra as V,sa as Oe,w as Ct,y as Me,z as Re}from"./chunk-VMI3QWC6.js";import{d as Tt}from"./chunk-F7PVAVLQ.js";import"./chunk-Q3HB53OC.js";import"./chunk-5DRALZZF.js";import"./chunk-2BI7WNJP.js";import{h as ae,j as yt,k as G,l as Le,m as se,s as me,t as ge}from"./chunk-ZK43JB4A.js";import"./chunk-F2X3VGZZ.js";import{$b as T,$c as Q,Aa as S,Ab as rt,Ba as le,Cb as xe,Dc as pt,Eb as p,Ec as ee,Fa as Se,Fc as P,Gc as te,Ha as X,Hc as ht,I as Ye,Ic as ut,Kc as mt,La as it,Lb as ne,Mb as a,Nb as at,Oc as gt,Pb as Z,Qb as j,Qc as ft,Rb as Ie,Sb as Ee,Sc as x,Ub as ke,Vb as ze,Wb as d,Wc as bt,Xb as h,Yb as I,Zb as q,_ as Ce,_b as W,_c as w,ac as D,ca as we,cd as _t,da as et,fc as k,g as J,gb as ot,gc as m,ia as A,ib as s,lc as _,m as Ze,mc as E,nb as lt,nc as g,ob as N,oc as f,pa as tt,qa as L,ra as M,rc as Y,sc as b,tc as B,ua as ve,uc as re,xc as st,yb as U,yc as ct,zb as nt,zc as dt}from"./chunk-6QJHEOXN.js";import{a as $,b as ue,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,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};
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=A(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=A(be);tableService=A(We);zone=A(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(ue($($({},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=de(this.containerViewChild?.nativeElement).left;this.lastResizerHelperX=e.pageX-o+this.containerViewChild?.nativeElement.scrollLeft,e.preventDefault()}onColumnResize(e){let o=de(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=ce(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=ce(o),pe=o?v.offsetWidth+i:n,he=o?O.offsetWidth+i:n,ye=this.containerViewChild?.nativeElement.offsetWidth>=pe,Te=(Ge,Je,Xe,ui)=>{Ge&&Je&&(Ge.style.width=ui?Xe+Pe(y)+"px":"auto",Je.style.width=Xe+"px")};Te(y,v,pe,ye),Te(C,O,he,ye),Te(R,F,he,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=de(this.containerViewChild?.nativeElement),l=de(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,pe=O.matchMode||"startsWith",he=this.filterService.filters[pe];if(C={filterField:F,filterValue:H,filterConstraint:he,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:()=>[ae,G,se,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,se],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:()=>[ae,G,se,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=ce(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=ce(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,se,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,"div"),b(2),h(),d(3,"div"),b(4),h()()),t&2){let e=r.$implicit;s(2),re("",e.issue,"."),s(2),B(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(),re(" ",ft(6,10,o.typeName,40)," "),s(3),B(o.accountName),s(2),B(o.code),s(),a("ngClass",ht(13,Zl,o.action==="Error",o.action==="New",o.action==="Update")),s(),re(" ",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),re("(",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),B(e.COAImportPreview().summary.new),s(10),B(e.COAImportPreview().summary.updated),s(8),B(e.COAImportPreview().summary.noChanges),s(8),B(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),B(e)}}var Dr=(()=>{class t{constructor(){this.service=A(Xt),this.router=A(Tt),this.filterService=A(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(ue($({},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,ae,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};
@@ -0,0 +1 @@
1
+ import{a as ue}from"./chunk-6RB67IF5.js";import{b as be}from"./chunk-B4C3ZPN6.js";import"./chunk-U2VDC52W.js";import{a as Q,b as W}from"./chunk-3VQUNDVT.js";import{d as X,i as he,j as Ce,k as Y}from"./chunk-DGACZ747.js";import"./chunk-EBEY2MBR.js";import"./chunk-AMGBUOC4.js";import"./chunk-UPSNJEHO.js";import{a as xe}from"./chunk-BT7Y4ADP.js";import"./chunk-VKNINE5Q.js";import"./chunk-E7QWESN4.js";import"./chunk-AN4SAUSA.js";import"./chunk-URH77XNK.js";import"./chunk-PPXXWO4E.js";import"./chunk-3DBSHDAQ.js";import"./chunk-M4SSELXT.js";import{b as ge}from"./chunk-WXIG4CXY.js";import"./chunk-QPPFPDWZ.js";import"./chunk-WMZF4DQK.js";import{i as q}from"./chunk-ADODNO5M.js";import"./chunk-S27Z7D3D.js";import{a as A,b as j}from"./chunk-AD247LWQ.js";import{b,c as H,d as L,e as G,f as $,g as K}from"./chunk-BKTBVFNX.js";import"./chunk-ZFNIPERQ.js";import{o as _e,w as V,x as F}from"./chunk-ME4ALIS7.js";import"./chunk-DTYVTTET.js";import{x as fe}from"./chunk-VMI3QWC6.js";import{e as z,l as me}from"./chunk-F7PVAVLQ.js";import"./chunk-Q3HB53OC.js";import{a as se}from"./chunk-5DRALZZF.js";import{a as de}from"./chunk-2BI7WNJP.js";import{A as ce,k as le,p as pe,q as N,s as O}from"./chunk-ZK43JB4A.js";import"./chunk-F2X3VGZZ.js";import{Dc as D,Eb as w,Ec as P,Fc as ie,Mb as g,Oc as S,Pb as I,Pc as U,Qc as re,Sc as _,Wb as o,Xb as i,Y as R,Yb as J,_ as ne,ac as E,bd as T,c as k,ca as ae,eb as oe,fc as y,gc as s,ia as u,ib as m,qa as h,ra as C,s as te,sc as r,tc as f,wc as B,yb as M}from"./chunk-6QJHEOXN.js";import{a as l,b as d}from"./chunk-YQFG5XE2.js";var v=(()=>{class e{constructor(){this.httpService=u(se)}getGenerateCoa(t){let n={params:new ce().set("PageNumber",t.PageNumber).set("PageSize",t.PageSize)};return this.httpService.get(void 0,"api/Tools/GetListCOA",n)}updateCOABalance(t={}){return this.httpService.put(void 0,"api/Tools/UpdateCOABalance",void 0,t)}getUnbalanceJournal(t){return this.httpService.get(void 0,"api/Tools/UnbalanceJurnal/"+t.PageNumber+"/"+t.PageSize)}updateUnbalanceJournal(t){let a={ListID:t};return this.httpService.put(void 0,"api/Tools/RegenerateUnBalanceJournal",a)}static{this.\u0275fac=function(a){return new(a||e)}}static{this.\u0275prov=ae({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var we={filter:{PageNumber:1,PageSize:20},data:{data:[],count:0}},Z=H(K(we),L(e=>({first:T(()=>(e.filter().PageNumber-1)*e.filter().PageSize+1),end:T(()=>Math.min(e.filter().PageNumber*e.filter().PageSize,e.data().count))})),$(e=>{let p=u(v);return{updateFilter:a=>{b(e,n=>d(l({},n),{filter:l(l({},n.filter),a)}))},getUpdateCOA:Q(k(R(a=>p.getGenerateCoa(a).pipe(W({next:n=>{b(e,c=>d(l({},c),{data:n}))},error:n=>{console.error(n)}})))))}}),G({onInit(e){e.getUpdateCOA(e.filter)}}));var ke=()=>({height:"calc(100vh - 70px)"}),Re=()=>({"min-width":"50rem"});function Me(e,p){if(e&1){let t=E();o(0,"p-button",7),y("onClick",function(){h(t);let n=s();return C(n.updateCoaBalance())}),i()}}function Ie(e,p){e&1&&(o(0,"tr")(1,"th"),r(2,"Code"),i(),o(3,"th"),r(4,"Name"),i(),o(5,"th"),r(6,"Tag"),i(),o(7,"th",9),r(8,"COA Balance"),i(),o(9,"th",9),r(10,"Correct Balance"),i()())}function Je(e,p){if(e&1&&(o(0,"tr")(1,"td"),r(2),i(),o(3,"td")(4,"a",10),r(5),i()(),o(6,"td"),r(7),i(),o(8,"td",9),r(9),S(10,"number"),i(),o(11,"td",9),r(12),S(13,"number"),i()()),e&2){let t=p.$implicit;m(2),f(t.Code),m(2),g("routerLink","/pages/chart-of-account/account/"+t.ID),m(),f(t.Name),m(2),f(t.OutletName),m(2),f(U(10,6,t.Balance)),m(3),f(U(13,8,t.CorrectBalance))}}function Be(e,p){if(e&1&&(o(0,"div",11)(1,"p",12),r(2),i()()),e&2){let t=s(2);m(2),B(" Showing ",t.store.first()," to ",t.store.end()," of ",t.store.data().count," entries ")}}function De(e,p){e&1&&(o(0,"tr")(1,"td",13)(2,"span"),r(3,"No records found."),i()()())}function Ne(e,p){if(e&1){let t=E();o(0,"p-panel")(1,"p-table",8),y("onPage",function(n){h(t);let c=s();return C(c.onPageChange(n))}),w(2,Ie,11,0,"ng-template",null,2,_)(4,Je,14,10,"ng-template",null,3,_)(6,Be,3,3,"ng-template",null,4,_)(8,De,4,0,"ng-template",null,5,_),i()()}if(e&2){let t=s();I(P(8,ke)),m(),g("paginator",!0)("lazy",!0)("totalRecords",t.store.data().count)("rows",t.store.filter().PageSize)("value",t.store.data().data)("tableStyle",P(9,Re))}}var Te=(()=>{class e{constructor(){this.store=u(Z),this.coaService=u(v),this.toastrService=u(de)}onPageChange(t){this.store.updateFilter(d(l({},this.store.filter()),{PageNumber:Math.floor(t.first/t.rows)+1}))}updateCoaBalance(){this.coaService.updateCOABalance({observe:"response"}).pipe(xe("Update COA Balance"),ne(()=>{this.store.updateFilter(this.store.filter())})).subscribe()}static{this.\u0275fac=function(a){return new(a||e)}}static{this.\u0275cmp=M({type:e,selectors:[["app-tools-update-coa"]],features:[D([Z])],decls:5,vars:1,consts:[["actionButton",""],["content",""],["header",""],["body",""],["paginatorleft",""],["emptymessage",""],["pageTitle","Update COA Balance",3,"scrollable"],["label","Update",3,"onClick"],[3,"onPage","paginator","lazy","totalRecords","rows","value","tableStyle"],[1,"text-end"],["target","_blank",1,"link","link-primary",3,"routerLink"],[1,"flex","align-items-center","custom-font-footer",2,"height","100%"],[1,"m-0"],["colspan","5"]],template:function(a,n){a&1&&(o(0,"app-main-panel",6),w(1,Me,1,0,"ng-template",null,0,_)(3,Ne,10,10,"ng-template",null,1,_),i()),a&2&&g("scrollable",!0)},dependencies:[q,Y,X,ge,O,N,F,V,j,A,z],styles:["[_nghost-%COMP%]{display:block} .p-card{height:100%} .p-card .p-card-body{height:inherit} .p-card .p-card-body .p-card-content{height:inherit} .p-paginator .p-paginator-pages .p-paginator-page{font-size:14px}.custom-font-footer[_ngcontent-%COMP%]{font-size:.875rem}"],changeDetection:0})}}return e})();var Oe={data:{count:0,data:[]},filter:{PageNumber:1,PageSize:20}},ee=H(K(Oe),L(e=>({first:T(()=>(e.filter().PageNumber-1)*e.filter().PageSize+1),end:T(()=>Math.min(e.filter().PageNumber*e.filter().PageSize,e.data().count)),selectedItems:T(()=>e.data().data.filter(p=>p.checked)),hasCheckedRows:T(()=>e.data().data.some(p=>p.checked))})),$(e=>{let p=u(v);return{updateFilter(a){b(e,n=>d(l({},n),{filter:l(l({},n.filter),a)}))},onRowSelect(a){b(e,n=>{let c=n.data.data.map(x=>x.id===a.id?d(l({},x),{checked:!0}):x);return d(l({},n),{data:d(l({},n.data),{data:c})})})},onRowUnselect(a){b(e,n=>{let c=n.data.data.map(x=>x.id===a.id?d(l({},x),{checked:!1}):x);return d(l({},n),{data:d(l({},n.data),{data:c})})})},onHeaderCheckboxToggle(a){b(e,n=>{let c=n.data.data.map(x=>d(l({},x),{checked:a}));return d(l({},n),{data:d(l({},n.data),{data:c})})})},loadData:Q(k(R(a=>p.getUnbalanceJournal(a).pipe(te(n=>d(l({},n),{data:n.data.map(c=>d(l({},c),{checked:!1}))})),W({next:n=>{b(e,c=>d(l({},c),{data:n}))},error:n=>{console.error("Error loading unbalance journal data:",n)}})))))}}),G(e=>({onInit:()=>{e.loadData(e.filter)}})));var ze=()=>({height:"calc(100vh - 70px)"}),Ve=e=>["/pages/journal/journal-entry",e];function Fe(e,p){if(e&1){let t=E();o(0,"div",8),J(1,"p-button",9),o(2,"p-button",10),y("onClick",function(){h(t);let n=s(2);return C(n.regenerateUnbalanceJournal())}),r(3,"Regenerate"),i()()}}function Ae(e,p){if(e&1&&w(0,Fe,4,0,"div",7),e&2){let t=s();g("ngIf",t.store.hasCheckedRows())}}function je(e,p){e&1&&(o(0,"tr")(1,"th",12),J(2,"p-tableHeaderCheckbox"),i(),o(3,"th"),r(4,"Date"),i(),o(5,"th"),r(6,"Number"),i(),o(7,"th",13),r(8,"Debit SUM"),i(),o(9,"th",13),r(10,"Credit SUM"),i(),o(11,"th",13),r(12,"Difference"),i(),o(13,"th"),r(14,"Reference"),i(),o(15,"th"),r(16,"Tag"),i()())}function He(e,p){if(e&1&&(o(0,"tr")(1,"td"),J(2,"p-tableCheckbox",14),i(),o(3,"td"),r(4),S(5,"date"),i(),o(6,"td")(7,"a",15),r(8),i()(),o(9,"td",13),r(10),S(11,"number"),i(),o(12,"td",13),r(13),S(14,"number"),i(),o(15,"td",13),r(16),S(17,"number"),i(),o(18,"td")(19,"a",16),r(20),i()(),o(21,"td"),r(22),i()()),e&2){let t=p.$implicit,a=s(2);m(2),g("value",t),m(2),f(re(5,10,t.date,"dd MMM yyyy")),m(3),g("routerLink",ie(19,Ve,t.id)),m(),f(t.number),m(2),f(U(11,13,t.debitSum)),m(3),f(U(14,15,t.creditSum)),m(3),f(U(17,17,t.differences)),m(3),g("href",a.authService.getTenantExternalURL()+"/menu/Orders/Orders/Customer_Invoice/Info?ID="+t.id,oe),m(),f(t.referenceText),m(2),f(t.outletName)}}function Le(e,p){if(e&1&&r(0),e&2){let t=s(2);B(" Showing ",t.store.first()," to ",t.store.end()," of ",t.store.data().count," entries ")}}function Ge(e,p){e&1&&(o(0,"tr")(1,"td",17)(2,"span"),r(3,"No records found."),i()()())}function $e(e,p){if(e&1){let t=E();o(0,"p-panel")(1,"p-table",11),y("onPage",function(n){h(t);let c=s();return C(c.onPageChange(n))})("onRowSelect",function(n){h(t);let c=s();return C(c.onRowSelect(n))})("onRowUnselect",function(n){h(t);let c=s();return C(c.onRowUnselect(n))})("onHeaderCheckboxToggle",function(n){h(t);let c=s();return C(c.onHeaderCheckboxToggle(n))}),w(2,je,17,0,"ng-template",null,2,_)(4,He,23,21,"ng-template",null,3,_)(6,Le,1,3,"ng-template",null,4,_)(8,Ge,4,0,"ng-template",null,5,_),i()()}if(e&2){let t=s();I(P(7,ze)),m(),g("value",t.store.data().data)("lazy",!0)("paginator",!0)("rows",t.store.filter().PageSize)("totalRecords",t.store.data().count)}}var ve=(()=>{class e{constructor(){this.store=u(ee),this.toolsService=u(v),this.authService=u(ue)}onPageChange(t){console.log("Page changed:",t);let a=t.first/t.rows;this.store.updateFilter({PageNumber:a+1})}onRowSelect(t){this.store.onRowSelect(t.data)}onRowUnselect(t){if(Array.isArray(t.data)){t.data.forEach(a=>{this.store.onRowUnselect(a)});return}else this.store.onRowUnselect(t.data)}onHeaderCheckboxToggle(t){this.store.onHeaderCheckboxToggle(t.checked)}regenerateUnbalanceJournal(){let a=this.store.selectedItems().filter(n=>n.checked==!0).map(n=>n.id);this.toolsService.updateUnbalanceJournal(a).subscribe()}static{this.\u0275fac=function(a){return new(a||e)}}static{this.\u0275cmp=M({type:e,selectors:[["app-unbalance-journal"]],features:[D([ee])],decls:5,vars:1,consts:[["actionButton",""],["content",""],["header",""],["body",""],["paginatorleft",""],["emptymessage",""],["pageTitle","Unbalance Journal",3,"scrollable"],["class","d-flex gap-2",4,"ngIf"],[1,"d-flex","gap-2"],["icon","fa-solid fa-trash","label","Delete","severity","danger"],[3,"onClick"],["paginatorStyleClass","d-flex justify-content-end","dataKey","id",3,"onPage","onRowSelect","onRowUnselect","onHeaderCheckboxToggle","value","lazy","paginator","rows","totalRecords"],[2,"width","1rem"],[1,"text-end"],[3,"value"],["target","_blank",1,"link","link-primary",3,"routerLink"],["target","_blank",1,"link","link-primary",3,"href"],["colspan","6"]],template:function(a,n){a&1&&(o(0,"app-main-panel",6),w(1,Ae,1,1,"ng-template",null,0,_)(3,$e,10,8,"ng-template",null,1,_),i()),a&2&&g("scrollable",!0)},dependencies:[q,Y,X,he,Ce,be,_e,O,le,N,pe,fe,F,V,j,A,me,z],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return e})();var Wt=[{path:"",redirectTo:"generate-coa",pathMatch:"full"},{path:"generate-coa",component:Te},{path:"unbalance-journal",component:ve}];export{Wt as TOOLS_ROUTES};
@@ -0,0 +1 @@
1
+ import{a as I,b as k,c as F,d as j,e as R,f as O}from"./chunk-RM5HLXNW.js";import"./chunk-UPSNJEHO.js";import{a as E}from"./chunk-BT7Y4ADP.js";import{b as T}from"./chunk-PPXXWO4E.js";import"./chunk-M4SSELXT.js";import"./chunk-QPPFPDWZ.js";import{i as w}from"./chunk-ADODNO5M.js";import"./chunk-S27Z7D3D.js";import{a as S}from"./chunk-AD247LWQ.js";import"./chunk-BKTBVFNX.js";import"./chunk-ZFNIPERQ.js";import"./chunk-ME4ALIS7.js";import"./chunk-DTYVTTET.js";import"./chunk-VMI3QWC6.js";import"./chunk-Q3HB53OC.js";import{a as P}from"./chunk-5DRALZZF.js";import"./chunk-2BI7WNJP.js";import{s as M}from"./chunk-ZK43JB4A.js";import"./chunk-F2X3VGZZ.js";import{Eb as h,Ec as _,Ha as u,Pb as v,Sb as m,Sc as C,Ub as c,Vb as s,Wb as o,Xb as r,_ as f,ca as d,gc as g,ia as l,ib as n,sc as p,tc as x,uc as y,yb as b}from"./chunk-6QJHEOXN.js";import"./chunk-YQFG5XE2.js";var D=(()=>{class e{constructor(){this.httpService=l(P)}getUserProfile(){return this.httpService.get(void 0,"api/MyProfile")}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=d({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var A=()=>({height:"calc(100vh - 70px)"});function B(e,a){if(e&1&&(o(0,"div",10)(1,"div",11)(2,"p",12),p(3),r()()()),e&2){let t=a.$implicit;n(3),y(" ",t.roleName," ")}}function L(e,a){if(e&1&&(o(0,"div",4)(1,"div",5)(2,"div",6)(3,"span",7),p(4),r()()(),o(5,"div",8)(6,"div",9),c(7,B,4,1,"div",10,m),r()()()),e&2){let t=a.$implicit;n(4),x(t.roleGroupName),n(3),s(t.listRole)}}function $(e,a){if(e&1&&(o(0,"p-panel")(1,"p-tabs",2)(2,"p-tablist")(3,"p-tab",2),p(4,"Roles"),r()(),o(5,"p-tabpanels")(6,"p-tabpanel",2)(7,"div",3),c(8,L,9,1,"div",4,m),r()()()()()),e&2){let t,i=g();v(_(2,A)),n(8),s((t=i.roles())==null?null:t.Roles)}}var N=(()=>{class e{constructor(){this.profileService=l(D),this.roles=u(null)}ngOnInit(){this.profileService.getUserProfile().pipe(E("response"),f(t=>this.roles.set(t))).subscribe()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=b({type:e,selectors:[["app-my-profile"]],decls:3,vars:0,consts:[["content",""],["pageTitle","My Profile"],["value","0"],["formArrayName","roles",1,"container-fluid","d-flex","flex-column","row-gap-3"],[1,"row"],[1,"col-2","border","d-flex","align-items-center","justify-content-between",2,"height","50px","background","#f6f6f6"],[1,"d-flex","justify-content-center","w-100"],[1,"text-dark","fw-semibold","fs-2"],[1,"col"],["formArrayName","roles",1,"row","h-100"],[1,"col-3","border-top","border-bottom","border-end","p-0","bg-white"],[1,"d-flex","h-100","align-items-center","gap-2","px-2"],[1,"fs-2","text-dark","m-0"]],template:function(i,G){i&1&&(o(0,"app-main-panel",1),h(1,$,10,3,"ng-template",null,0,C),r())},dependencies:[w,S,O,R,j,F,I,k,M,T],styles:["[_nghost-%COMP%]{display:block} .p-tabs .p-tab{padding-top:0!important}"],changeDetection:0})}}return e})();var le=[{path:"",redirectTo:"my-profile",pathMatch:"full"},{path:"",children:[{path:"my-profile",component:N}]}];export{le as PROFILE_ROUTES};
@@ -1 +1 @@
1
- import{Ha as i,ca as c}from"./chunk-NMCKMUY4.js";var n=class extends Error{};n.prototype.name="InvalidTokenError";function l(e){return decodeURIComponent(atob(e).replace(/(.)/g,(r,t)=>{let o=t.charCodeAt(0).toString(16).toUpperCase();return o.length<2&&(o="0"+o),"%"+o}))}function d(e){let r=e.replace(/-/g,"+").replace(/_/g,"/");switch(r.length%4){case 0:break;case 2:r+="==";break;case 3:r+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return l(r)}catch{return atob(r)}}function p(e,r){if(typeof e!="string")throw new n("Invalid token specified: must be a string");r||(r={});let t=r.header===!0?0:1,o=e.split(".")[t];if(typeof o!="string")throw new n(`Invalid token specified: missing part #${t+1}`);let s;try{s=d(o)}catch(a){throw new n(`Invalid token specified: invalid base64 for part #${t+1} (${a.message})`)}try{return JSON.parse(s)}catch(a){throw new n(`Invalid token specified: invalid json for part #${t+1} (${a.message})`)}}var m=(()=>{class e{constructor(){this._token=i(localStorage.getItem("AUTH_TOKEN")),this.tokenSignal=this._token,this._token.set(localStorage.getItem("AUTH_TOKEN"))}setToken(t){this._token.set(t),localStorage.setItem("AUTH_TOKEN",t)}clearToken(){this._token.set(null),localStorage.removeItem("AUTH_TOKEN")}static{this.\u0275fac=function(o){return new(o||e)}}static{this.\u0275prov=c({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();export{p as a,m as b};
1
+ import{Ha as i,ca as c}from"./chunk-6QJHEOXN.js";var n=class extends Error{};n.prototype.name="InvalidTokenError";function l(e){return decodeURIComponent(atob(e).replace(/(.)/g,(r,t)=>{let o=t.charCodeAt(0).toString(16).toUpperCase();return o.length<2&&(o="0"+o),"%"+o}))}function d(e){let r=e.replace(/-/g,"+").replace(/_/g,"/");switch(r.length%4){case 0:break;case 2:r+="==";break;case 3:r+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return l(r)}catch{return atob(r)}}function p(e,r){if(typeof e!="string")throw new n("Invalid token specified: must be a string");r||(r={});let t=r.header===!0?0:1,o=e.split(".")[t];if(typeof o!="string")throw new n(`Invalid token specified: missing part #${t+1}`);let s;try{s=d(o)}catch(a){throw new n(`Invalid token specified: invalid base64 for part #${t+1} (${a.message})`)}try{return JSON.parse(s)}catch(a){throw new n(`Invalid token specified: invalid json for part #${t+1} (${a.message})`)}}var m=(()=>{class e{constructor(){this._token=i(localStorage.getItem("AUTH_TOKEN")),this.tokenSignal=this._token,this._token.set(localStorage.getItem("AUTH_TOKEN"))}setToken(t){this._token.set(t),localStorage.setItem("AUTH_TOKEN",t)}clearToken(){this._token.set(null),localStorage.removeItem("AUTH_TOKEN")}static{this.\u0275fac=function(o){return new(o||e)}}static{this.\u0275prov=c({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();export{p as a,m as b};
@@ -0,0 +1 @@
1
+ import{a as v,b as L}from"./chunk-ZIZHSXQM.js";import"./chunk-XLEICBBP.js";import{a as I,b as E}from"./chunk-DJXQKSLT.js";import"./chunk-WXIG4CXY.js";import{i as H}from"./chunk-ADODNO5M.js";import"./chunk-S27Z7D3D.js";import{a as R,b as D}from"./chunk-AD247LWQ.js";import"./chunk-BKTBVFNX.js";import"./chunk-ZFNIPERQ.js";import{w as V,x as j,y as N,z as G}from"./chunk-ME4ALIS7.js";import"./chunk-DTYVTTET.js";import"./chunk-VMI3QWC6.js";import"./chunk-Q3HB53OC.js";import"./chunk-5DRALZZF.js";import{a as F}from"./chunk-2BI7WNJP.js";import{n as O,s as $}from"./chunk-ZK43JB4A.js";import"./chunk-F2X3VGZZ.js";import{Dc as P,Eb as w,Ec as _,Mb as p,Oc as s,Pb as h,Pc as m,Sc as x,W as y,Wb as o,Xb as n,Y as M,Yb as l,_ as b,ac as B,fc as C,gc as c,h as T,ia as f,ib as a,qa as g,ra as d,s as u,sa as S,ta as A,yb as k}from"./chunk-6QJHEOXN.js";import"./chunk-YQFG5XE2.js";var q=()=>({height:"calc(100vh - 100px)"});function J(i,z){if(i&1){let t=B();o(0,"div",3)(1,"p-button",4),C("onClick",function(){g(t);let r=c();return d(r.onFormatCOA())}),n(),o(2,"p-button",5),s(3,"async"),s(4,"async"),C("onClick",function(){g(t);let r=c();return d(r.onMigrateCoaAccount())}),n()()}if(i&2){let t=c();a(2),p("disabled",m(3,2,t.countInBooks$)!==0)("pTooltip",m(4,4,t.countInBooks$)!==0?"Books already has entries. Please format before re-migrating.":null)}}function K(i,z){if(i&1&&(o(0,"p-scroll-panel")(1,"p-panel")(2,"div",6),l(3,"app-migration-cards",7),s(4,"async"),S(),o(5,"svg",8),l(6,"path",9),n(),A(),l(7,"app-migration-cards",10),s(8,"async"),n()()()),i&2){let t=c();h(_(12,q)),a(),h(_(13,q)),a(2),p("migrationCount",m(4,8,t.countInPOS$))("migrationTitle",t.pageTitle),a(4),p("migrationCount",m(8,10,t.countInBooks$))("migrationTitle",t.pageTitle)}}var gt=(()=>{class i{constructor(){this.migrateService=f(v),this.toastr=f(F),this.refresh$=new T(void 0),this.pageTitle="Chart of Account"}ngOnInit(){let t=this.refresh$.pipe(M(()=>this.migrateService.getCOACount()),b(e=>console.log("API response:",e)),y(1));this.countInPOS$=t.pipe(u(e=>Number(e.pos))),this.countInBooks$=t.pipe(u(e=>Number(e.books)))}onMigrateCoaAccount(){this.migrateService.migrateCoaAccount().subscribe(t=>{this.refresh$.next(),this.toastr.success(t.message,"Migration Successful")})}onFormatCOA(){window.confirm("Are you sure you want to format this data? This action cannot be undone.")&&this.migrateService.formatManualCOA().subscribe(e=>{this.refresh$.next(),this.toastr.success(e.message,"Format Successful")})}static{this.\u0275fac=function(e){return new(e||i)}}static{this.\u0275cmp=k({type:i,selectors:[["app-chart-of-account"]],features:[P([v])],decls:5,vars:1,consts:[["actionButton",""],["content",""],[3,"pageTitle"],[1,"d-flex","gap-2"],["label","Format","severity","danger",3,"onClick"],["label","Migrate","tooltipPosition","left",3,"onClick","disabled","pTooltip"],[1,"flex","gap-30","flex-wrap",2,"display","flex","justify-content","center","align-items","center","gap","1rem","margin-top","40px"],["migrationPlace","Accounting",3,"migrationCount","migrationTitle"],["width","40","height","40","viewBox","0 0 24 24","fill","none"],["d","M8 5l8 7-8 7","stroke","#007bff","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],["migrationPlace","Books",3,"migrationCount","migrationTitle"]],template:function(e,r){e&1&&(o(0,"app-main-panel",2),w(1,J,5,6,"ng-template",null,0,x)(3,K,9,14,"ng-template",null,1,x),n()),e&2&&p("pageTitle",r.pageTitle)},dependencies:[H,$,O,L,j,V,E,I,D,R,G,N],encapsulation:2})}}return i})();export{gt as ChartOfAccountComponent};
@@ -1 +1 @@
1
- import{a as i}from"./chunk-MYREYOSL.js";import{d as r}from"./chunk-AOOG6YOT.js";import{ia as e}from"./chunk-NMCKMUY4.js";var f=(a,o)=>{let t=e(i),s=e(r),n=t.isAuthenticated(),u=!t.isTokenExpired(),c=t.checkAuthKeysExists();return!n||!u||!c?(s.navigate(["/"],{queryParams:{returnUrl:o.url}}),!1):!0};export{f as a};
1
+ import{a as i}from"./chunk-6RB67IF5.js";import{d as r}from"./chunk-F7PVAVLQ.js";import{ia as e}from"./chunk-6QJHEOXN.js";var f=(a,o)=>{let t=e(i),s=e(r),n=t.isAuthenticated(),u=!t.isTokenExpired(),c=t.checkAuthKeysExists();return!n||!u||!c?(s.navigate(["/"],{queryParams:{returnUrl:o.url}}),!1):!0};export{f as a};