dealposbooks 1.0.6 → 1.0.8

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 (125) hide show
  1. package/3rdpartylicenses.txt +77 -41
  2. package/assets/scss/fonts/roboto-slab/RobotoSlab-Black.woff2 +0 -0
  3. package/assets/scss/fonts/roboto-slab/RobotoSlab-Bold.woff2 +0 -0
  4. package/assets/scss/fonts/roboto-slab/RobotoSlab-ExtraBold.woff2 +0 -0
  5. package/assets/scss/fonts/roboto-slab/RobotoSlab-ExtraLight.woff2 +0 -0
  6. package/assets/scss/fonts/roboto-slab/RobotoSlab-Light.woff2 +0 -0
  7. package/assets/scss/fonts/roboto-slab/RobotoSlab-Medium.woff2 +0 -0
  8. package/assets/scss/fonts/roboto-slab/RobotoSlab-Regular.woff2 +0 -0
  9. package/assets/scss/fonts/roboto-slab/RobotoSlab-SemiBold.woff2 +0 -0
  10. package/assets/scss/fonts/roboto-slab/RobotoSlab-Thin.woff2 +0 -0
  11. package/assets/scss/variables/_variables.scss +47 -32
  12. package/chunk-2LKTSMUI.js +197 -0
  13. package/{chunk-PLNF5Z47.js → chunk-2QCAOSMO.js} +3 -3
  14. package/{chunk-6VATP7AD.js → chunk-2XZW23PQ.js} +1 -1
  15. package/chunk-33RD6RQS.js +1 -0
  16. package/chunk-3ROVFYLI.js +189 -0
  17. package/chunk-3UAQZJAG.js +180 -0
  18. package/chunk-4Z6KFX2O.js +2 -0
  19. package/{chunk-ZKTMMTSB.js → chunk-6TJIZZK6.js} +1 -1
  20. package/chunk-7KARVIIN.js +1 -0
  21. package/chunk-7RH6F4PN.js +135 -0
  22. package/{chunk-XJB6ZB5C.js → chunk-7X454BGN.js} +2 -2
  23. package/{chunk-HW5TOHIY.js → chunk-A3I2VQNX.js} +2 -2
  24. package/{chunk-5U24N52S.js → chunk-A3MXO6MA.js} +1 -1
  25. package/chunk-B5ZO2I4D.js +2 -0
  26. package/chunk-BP2JJ6HZ.js +160 -0
  27. package/chunk-BWO4PVAG.js +301 -0
  28. package/{chunk-DFW6MEY3.js → chunk-C4WUUVLC.js} +1 -1
  29. package/chunk-CH2GYE5J.js +1 -0
  30. package/{chunk-ZZCZU47E.js → chunk-D5U6AOFB.js} +1 -1
  31. package/chunk-DF2QDC4T.js +1 -0
  32. package/chunk-DKWZOSVY.js +59 -0
  33. package/{chunk-CWSZS6PH.js → chunk-EE4WG35V.js} +1 -1
  34. package/chunk-EEJWF26F.js +1 -0
  35. package/{chunk-2TIQLYOU.js → chunk-F7FJPDUV.js} +1 -1
  36. package/chunk-FDDNZH4H.js +1633 -0
  37. package/chunk-FYNIFRG5.js +1 -0
  38. package/{chunk-G4OXNPYG.js → chunk-HKMI4ZYY.js} +3 -3
  39. package/chunk-HU6SF3HD.js +1 -0
  40. package/{chunk-72KCMRAD.js → chunk-I72ECAQH.js} +2 -2
  41. package/chunk-IWUDRSTJ.js +235 -0
  42. package/chunk-KJWN47PL.js +1 -0
  43. package/{chunk-TEV7GODP.js → chunk-M4ZOPGSP.js} +2 -2
  44. package/{chunk-USDU2OMR.js → chunk-MQJQRREL.js} +1 -1
  45. package/chunk-MVGPOIFT.js +1 -0
  46. package/chunk-OHEAUNEW.js +1 -0
  47. package/chunk-ONU5ICNZ.js +1 -0
  48. package/chunk-P4OJNULI.js +1 -0
  49. package/chunk-PCJXJ6O4.js +370 -0
  50. package/chunk-PFXPLNMA.js +1 -0
  51. package/{chunk-A63HKFUG.js → chunk-PQTHPF23.js} +6 -6
  52. package/chunk-PV6INEW2.js +1 -0
  53. package/chunk-QPA73UD5.js +616 -0
  54. package/{chunk-6YT5EOQ2.js → chunk-QUR72LET.js} +1 -1
  55. package/chunk-RFZOXUTS.js +1 -0
  56. package/chunk-RIUEIX64.js +1 -0
  57. package/{chunk-CJM6YIDJ.js → chunk-U2S74ZLK.js} +1 -1
  58. package/chunk-UPDO63XT.js +1 -0
  59. package/chunk-UQ3SWGEA.js +1 -0
  60. package/{chunk-RVDH4GNB.js → chunk-URKXDZJE.js} +2 -2
  61. package/{chunk-JGJNDRVZ.js → chunk-UZFJYFH2.js} +2 -2
  62. package/{chunk-37O3IGUE.js → chunk-WZKSD7XN.js} +2 -2
  63. package/chunk-X2CQD76I.js +208 -0
  64. package/chunk-YUFMXLRG.js +47 -0
  65. package/{chunk-QSMNYWAY.js → chunk-YX7446ZM.js} +1 -1
  66. package/chunk-Z53S4NM2.js +736 -0
  67. package/{chunk-JGV5HMBT.js → chunk-ZT4NOONZ.js} +1 -1
  68. package/index.html +3 -3
  69. package/main-U76NYT5G.js +1 -0
  70. package/package.json +1 -1
  71. package/{styles-PZKETPHN.css → styles-OZO2XDGZ.css} +1 -1
  72. package/assets/scss/fonts/Montserrat-Black.woff2 +0 -0
  73. package/assets/scss/fonts/Montserrat-BlackItalic.woff2 +0 -0
  74. package/assets/scss/fonts/Montserrat-Bold.woff2 +0 -0
  75. package/assets/scss/fonts/Montserrat-BoldItalic.woff2 +0 -0
  76. package/assets/scss/fonts/Montserrat-ExtraBold.woff2 +0 -0
  77. package/assets/scss/fonts/Montserrat-ExtraBoldItalic.woff2 +0 -0
  78. package/assets/scss/fonts/Montserrat-ExtraLight.woff2 +0 -0
  79. package/assets/scss/fonts/Montserrat-ExtraLightItalic.woff2 +0 -0
  80. package/assets/scss/fonts/Montserrat-Italic.woff2 +0 -0
  81. package/assets/scss/fonts/Montserrat-Light.woff2 +0 -0
  82. package/assets/scss/fonts/Montserrat-LightItalic.woff2 +0 -0
  83. package/assets/scss/fonts/Montserrat-Medium.woff2 +0 -0
  84. package/assets/scss/fonts/Montserrat-MediumItalic.woff2 +0 -0
  85. package/assets/scss/fonts/Montserrat-Regular.woff2 +0 -0
  86. package/assets/scss/fonts/Montserrat-SemiBold.woff2 +0 -0
  87. package/assets/scss/fonts/Montserrat-SemiBoldItalic.woff2 +0 -0
  88. package/assets/scss/fonts/Montserrat-Thin.woff2 +0 -0
  89. package/assets/scss/fonts/Montserrat-ThinItalic.woff2 +0 -0
  90. package/assets/scss/fonts/Roboto-Italic-VariableFont_wdth,wght.woff2 +0 -0
  91. package/assets/scss/fonts/Roboto-VariableFont_wdth,wght.woff2 +0 -0
  92. package/assets/scss/fonts/RobotoSlab-VariableFont_wght.woff2 +0 -0
  93. package/chunk-2JEYUHX6.js +0 -1
  94. package/chunk-36254LID.js +0 -1
  95. package/chunk-3O5WB452.js +0 -428
  96. package/chunk-4F4YTU5A.js +0 -1
  97. package/chunk-7BUIG2V4.js +0 -2
  98. package/chunk-7HQ6WSSU.js +0 -1
  99. package/chunk-B44UAABO.js +0 -1
  100. package/chunk-CDSOHE7R.js +0 -1
  101. package/chunk-D7GU77BZ.js +0 -1
  102. package/chunk-DGUB5VQV.js +0 -1
  103. package/chunk-DKKZGADB.js +0 -1
  104. package/chunk-KFF6NEEA.js +0 -1
  105. package/chunk-KHWYFU3R.js +0 -191
  106. package/chunk-KWULO2RL.js +0 -931
  107. package/chunk-L36U5L2E.js +0 -1
  108. package/chunk-LHGT7WC7.js +0 -237
  109. package/chunk-M3DGMI2G.js +0 -1
  110. package/chunk-NAZKZSVO.js +0 -1
  111. package/chunk-NY4Q6KXA.js +0 -180
  112. package/chunk-NYMK6LUH.js +0 -1
  113. package/chunk-OCLF4BGI.js +0 -160
  114. package/chunk-QAAN4NVX.js +0 -1
  115. package/chunk-QCF3XBU5.js +0 -1
  116. package/chunk-RJKIW354.js +0 -1767
  117. package/chunk-SWKKEI7U.js +0 -1
  118. package/chunk-UAPZHEQX.js +0 -1
  119. package/chunk-V3VYMXUU.js +0 -1
  120. package/chunk-VILWNFJE.js +0 -1
  121. package/chunk-WNZ52LDQ.js +0 -662
  122. package/chunk-WY5VYTM5.js +0 -1
  123. package/chunk-YYGEKYKY.js +0 -2
  124. package/chunk-ZQDTA2BC.js +0 -189
  125. package/main-T2PMTIHB.js +0 -1
@@ -0,0 +1 @@
1
+ import{a as Ie,b as Te,c as Fe,d as Ae,e as Be,f as Ne}from"./chunk-A3I2VQNX.js";import{a as Me,b as we}from"./chunk-UZFJYFH2.js";import{a as Ee}from"./chunk-2QCAOSMO.js";import{a as ye,b as Se}from"./chunk-URKXDZJE.js";import"./chunk-U2S74ZLK.js";import{a as se}from"./chunk-OHEAUNEW.js";import{b as ge,c as fe,d as he,e as be,f as xe,j as Ce}from"./chunk-FDDNZH4H.js";import{i as _e,j as ve}from"./chunk-PCJXJ6O4.js";import"./chunk-7RH6F4PN.js";import"./chunk-DKWZOSVY.js";import{a as j,b as $}from"./chunk-I72ECAQH.js";import{g as R}from"./chunk-3UAQZJAG.js";import"./chunk-Z53S4NM2.js";import"./chunk-YX7446ZM.js";import{t as de,u as V}from"./chunk-2LKTSMUI.js";import{Ca as H,Ga as ue,b as k,e as G,f as te,i as ne,k as ie,l as oe,m as re,o as ae,q as le,s as ce,t as me}from"./chunk-3ROVFYLI.js";import{d as pe}from"./chunk-P4OJNULI.js";import"./chunk-S35HUXPS.js";import"./chunk-7X454BGN.js";import{k as Z,n as D,s as ee,t as J}from"./chunk-C4WUUVLC.js";import{$b as c,Ac as B,Fb as f,Jc as z,Kc as K,La as y,Mc as P,Ob as l,Rb as X,Ub as U,Vb as _,Xb as v,Xc as N,Yb as h,Zb as i,_b as t,aa as M,ac as S,bc as E,dc as O,ga as Q,hc as I,ic as u,kb as r,ma as C,qc as o,rc as s,ua as F,va as A,yb as w,yc as Y,zc as q}from"./chunk-PQTHPF23.js";import{a as b,b as x}from"./chunk-EQDQRRRY.js";var L=(()=>{class n{#e=C(pe);fetchLoaderConfiguration(){return this.#e.get("","api/SetupLoader/Load")}updateAccountingIntegrationConfiguration(e){return this.#e.post(void 0,"/api/setup/SubmitConfig",e)}fetchOpeningBalanceFormConfiguration(){return this.#e.get("","/api/setup/OpeningBalance/Form")}static{this.\u0275fac=function(a){return new(a||n)}}static{this.\u0275prov=Q({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var Pe=n=>({"active-state":n}),De=n=>({"text-white":n});function Le(n,m){if(n&1&&(i(0,"p-tab",8),o(1),t()),n&2){let e=m.$implicit,a=m.$index;l("value",a),r(),s(e)}}function Ue(n,m){if(n&1&&(i(0,"div",34)(1,"h3",35),o(2," End Of Shift "),t()()),n&2){let e=u(4);l("ngClass",B(2,Pe,e.form.controls.posIntegration.value.createJournalTriggers===0)),r(),l("ngClass",B(4,De,e.form.controls.posIntegration.value.createJournalTriggers===0))}}function qe(n,m){if(n&1&&(i(0,"div",34)(1,"h3",35),o(2," Every "),t()()),n&2){let e=u(4);l("ngClass",B(2,Pe,e.form.controls.posIntegration.value.createJournalTriggers===1)),r(),l("ngClass",B(4,De,e.form.controls.posIntegration.value.createJournalTriggers===1))}}function ze(n,m){if(n&1&&f(0,Ue,3,6,"div",34)(1,qe,3,6,"div",34),n&2){let e,a=u().$implicit;U((e=a.key)===0?0:e===1?1:-1)}}function Ke(n,m){n&1&&(i(0,"h4"),o(1,"Suitable for Cash Sales (Retail & FnB)"),t(),i(2,"p"),o(3," One Journal is generated for all transaction happening within a register open - close period "),t())}function He(n,m){n&1&&(i(0,"h4"),o(1,"Every"),t(),i(2,"p"),o(3," Suitable for Credit Sales (Wholesale) Journal is generated for each transaction "),t())}function We(n,m){if(n&1){let e=O();i(0,"div",12),c(1,"p-radiobutton",32),i(2,"p-card",33),I("click",function(){F(e);let p=u(2);return A(p.changeJournalType())}),f(3,ze,2,1,"ng-template",null,0,P)(5,Ke,4,0)(6,He,4,0),t()()}if(n&2){let e,a=m.$implicit;r(),l("inputId",a.value)("value",a.key),r(4),U((e=a.key)===0?5:e===1?6:-1)}}function Qe(n,m){if(n&1&&(i(0,"div",26),c(1,"p-radiobutton",36),i(2,"label",37),o(3),t()()),n&2){let e=m.$implicit;r(),l("value",e.key)("inputId",e.value),r(),l("for",e.value),r(),s(e.value)}}function Xe(n,m){if(n&1&&(i(0,"div",26),c(1,"p-radiobutton",38),i(2,"label",37),o(3),t()()),n&2){let e=m.$implicit;r(),l("value",e.key)("inputId",e.value),r(),l("for",e.value),r(),s(e.value)}}function Ye(n,m){if(n&1&&(i(0,"div",26),c(1,"p-radiobutton",39),i(2,"label",37),o(3),t()()),n&2){let e=m.$implicit;r(),l("value",e.key)("inputId",e.value),r(),l("for",e.value),r(),s(e.value)}}function Ze(n,m){if(n&1&&(i(0,"div",26),c(1,"p-radiobutton",40),i(2,"label",37),o(3),t()()),n&2){let e=m.$implicit;r(),l("value",e.key)("inputId",e.value),r(),l("for",e.value),r(),s(e.value)}}function et(n,m){if(n&1&&(S(0,6),i(1,"p-tabs",7)(2,"p-tablist"),v(3,Le,2,2,"p-tab",8,_),t(),i(5,"p-tabpanels")(6,"p-tabpanel",9)(7,"h4"),o(8,"Integration with POS"),t(),i(9,"p"),o(10,"Generate Journal"),t(),i(11,"div",10)(12,"div",11)(13,"div",10),v(14,We,7,3,"div",12,_),t()()(),c(16,"hr"),i(17,"div",13)(18,"h3"),o(19,"Journal Generate"),t(),i(20,"p"),o(21,"Configure generate transaction"),t(),i(22,"div",10)(23,"div",14)(24,"div",15)(25,"div",14)(26,"div",16)(27,"label",17),o(28,"Generate EOD Expense Journal"),t(),c(29,"p-toggleswitch",18),t()(),c(30,"div",14),i(31,"div",14)(32,"div",16)(33,"label",17),o(34,"Generate Outlet Delivery Journal"),t(),c(35,"p-toggleswitch",19),t()(),c(36,"div",14),i(37,"div",14)(38,"div",16)(39,"label",17),o(40,"Generate Payment Discount Journal On Payment"),t(),c(41,"p-toggleswitch",20),t()()()()()()(),i(42,"p-tabpanel",21)(43,"div",13)(44,"h3"),o(45,"Accounting Numbering"),t(),i(46,"p"),o(47,"Configure numbering format and rule for your accounting"),t(),i(48,"div",10)(49,"div",14)(50,"div",15)(51,"div",14)(52,"div",16)(53,"label",17),o(54,"Digit"),t(),c(55,"input",22),t()(),c(56,"div",14),i(57,"div",14)(58,"div",16)(59,"label",17),o(60,"Seed"),t(),c(61,"input",23),t()(),i(62,"div",14)(63,"div",16)(64,"label",17),o(65,"Last Number"),t(),c(66,"input",24),t()(),i(67,"div",14)(68,"div",16)(69,"label",17),o(70,"Reset Every"),t(),i(71,"div",25),v(72,Qe,4,4,"div",26,_),t()()(),i(74,"div",14)(75,"div",16)(76,"label",17),o(77,"Format"),t(),c(78,"p-select",27),t()()()()()()(),i(79,"p-tabpanel",28)(80,"div",13)(81,"h3"),o(82,"Report"),t(),i(83,"p"),o(84,"Configure report behavior"),t(),i(85,"div",10)(86,"div",14)(87,"div",15)(88,"div",14)(89,"div",16)(90,"label",17),o(91,"Audit Journal Transaction"),t(),i(92,"div",25),v(93,Xe,4,4,"div",26,_),t()()(),c(95,"div",14),i(96,"div",14)(97,"div",16)(98,"label",17),o(99,"Accounting For Treatment"),t(),i(100,"div",25),v(101,Ye,4,4,"div",26,_),t()()(),c(103,"div",14),i(104,"div",14)(105,"div",16)(106,"label",17),o(107,"Configure Report Access Control in COA"),t(),i(108,"div",25),v(109,Ze,4,4,"div",26,_),t()()()()()()()(),i(111,"p-tabpanel",29)(112,"div",13)(113,"h3"),o(114,"Note"),t(),i(115,"p"),o(116,"Configure show note"),t(),i(117,"div",10)(118,"div",14)(119,"div",15)(120,"div",14)(121,"div",16)(122,"label",17),o(123,"Note Required On Journal"),t(),c(124,"p-toggleswitch",30),t()(),c(125,"div",14),i(126,"div",14)(127,"div",16)(128,"label",17),o(129,"Trial Balance Footer Visible"),t(),c(130,"p-toggleswitch",31),t()(),c(131,"div",14),t()()()()()()(),E()),n&2){let e=u();r(),l("value",0)("formGroup",e.form),r(2),h(e.tabs()),r(3),l("value",0),r(8),h(e.accountingIntegration().options.journalType),r(28),l("value",1),r(30),h(e.accountingIntegration().options.resetPeriods),r(6),l("options",e.accountingIntegration().options.monthlyResetPeriodFormat),r(),l("value",2),r(14),h(e.accountingIntegration().options.auditType),r(8),h(e.accountingIntegration().options.generatePrepaidJournal),r(8),h(e.accountingIntegration().options.entityAccess),r(2),l("value",3)}}var Je=(()=>{class n{constructor(){this.accountingSetupService=C(L),this.fb=C(le).nonNullable,this.tabs=y(["Pos","Numbering","Report","Note"]),this.journalType=y(0),this.accountingIntegration=y(null)}ngOnInit(){this.initializeForm(),this.loadAccountingConfiguration()}initializeForm(){this.form=this.fb.group({posIntegration:this.createPosIntegrationGroup(),number:this.createNumberGroup(),report:this.createReportGroup(),journalGenerate:this.createJournalGenerateGroup(),note:this.createNoteGroup()})}createPosIntegrationGroup(){return this.fb.group({createJournalTriggers:this.fb.control(0)})}createNumberGroup(){return this.fb.group({seed:this.fb.control(""),digit:this.fb.control(""),resetEvery:this.fb.control(""),monthlyFormat:this.fb.control(""),lastNumber:this.fb.control(""),lastModified:this.fb.control("")})}createReportGroup(){return this.fb.group({accountingAuditType:this.fb.control(""),accountingEntityAccess:this.fb.control(""),generatePrepaidJournal:this.fb.control("")})}createJournalGenerateGroup(){return this.fb.group({eodExpenseJournal:this.fb.control(""),transferOrder:this.fb.control(""),paymentDiscount:this.fb.control("")})}createNoteGroup(){return this.fb.group({noteMandatory:this.fb.control(""),trialBalanceFooterVisible:this.fb.control("")})}changeJournalType(){let e=this.journalType()===0?1:0;this.journalType.set(e),this.accountingIntegration.update(a=>x(b({},a),{form:x(b({},a.form),{posIntegration:x(b({},a.form.posIntegration),{createJournalTriggers:e})})})),this.form.controls.posIntegration.patchValue({createJournalTriggers:e})}loadAccountingConfiguration(){this.accountingSetupService.fetchLoaderConfiguration().pipe(M(e=>{this.accountingIntegration.set(e);let a=e.form.posIntegration.createJournalTriggers;this.journalType.set(a),this.form.get("posIntegration.createJournalTriggers")?.setValue(a),this.form.patchValue(e.form)})).subscribe()}updateAccountingIntegration(){let e={form:this.form.getRawValue()};this.accountingSetupService.updateAccountingIntegrationConfiguration(e).pipe().subscribe()}static{this.\u0275fac=function(a){return new(a||n)}}static{this.\u0275cmp=w({type:n,selectors:[["app-accounting-integration"]],decls:7,vars:1,consts:[["header",""],["pageTitle","Accounting Integration"],["ngProjectAs","action-button",5,["action-button"]],[1,"btn","btn-secondary","rounded"],[1,"btn","btn-primary","rounded",3,"click"],["ngProjectAs","content",5,["content"],4,"ngIf"],["ngProjectAs","content",5,["content"]],[3,"value","formGroup"],[3,"value"],["formGroupName","posIntegration",3,"value"],[1,"row"],[1,"col-8"],[1,"col"],[1,"px-3"],[1,"col-6"],[1,"row","row-gap-3"],[1,"d-flex","flex-column"],["for",""],["formControlName","eodExpenseJournal"],["formControlName","transferOrder"],["formControlName","paymentDiscount"],["formGroupName","number",3,"value"],["formControlName","digit","type","text","pInputText",""],["formControlName","seed","type","text","pInputText",""],["formControlName","lastNumber","type","text","pInputText",""],[1,"d-flex","flex-column","gap-2"],[1,"d-flex","align-items-center","gap-2"],["formControlName","monthlyFormat","optionValue","key","optionLabel","value",3,"options"],["formGroupName","report",3,"value"],["formGroupName","note",3,"value"],["formControlName","noteMandatory"],["formControlName","trialBalanceFooterVisible"],["styleClass","d-none","name","createJournalTriggers","formControlName","createJournalTriggers",3,"inputId","value"],["styleClass","h-100",3,"click"],[1,"d-flex","justify-content-center","inactive-state","text-white","py-2",3,"ngClass"],[1,"m-0",3,"ngClass"],["name","resetEvery","formControlName","resetEvery",3,"value","inputId"],[1,"ml-2","m-0",3,"for"],["name","accountingAuditType","formControlName","accountingAuditType",3,"value","inputId"],["name","generatePrepaidJournal","formControlName","generatePrepaidJournal",3,"value","inputId"],["name","accountingEntityAccess","formControlName","accountingEntityAccess",3,"value","inputId"]],template:function(a,p){a&1&&(i(0,"app-main-panel",1),S(1,2),i(2,"button",3),o(3,"Cancel"),t(),i(4,"button",4),I("click",function(){return p.updateAccountingIntegration()}),o(5," Save "),t(),E(),f(6,et,132,7,"ng-container",5),t()),a&2&&(r(6),l("ngIf",p.accountingIntegration()))},dependencies:[J,Z,D,Ne,Be,Ae,Fe,Ie,Te,R,$,j,be,he,me,k,G,te,oe,ae,re,V,de,ve,_e,we,Me],styles:["[_nghost-%COMP%]{display:block}.inactive-state[_ngcontent-%COMP%]{background-color:#e5e5e5}.active-state[_ngcontent-%COMP%]{background-color:#5680e9}"],changeDetection:0})}}return n})();var tt=()=>({width:"100%",height:"calc(100vh - 300px)"}),nt=()=>[];function it(n,m){n&1&&(i(0,"tr")(1,"th"),o(2,"Account Name"),t(),i(3,"th",18),o(4,"Debit"),t(),i(5,"th",18),o(6,"Credit"),t()())}function ot(n,m){if(n&1){let e=O();i(0,"tr")(1,"td"),o(2),t(),i(3,"td")(4,"input",19),I("ngModelChange",function(p){let g=F(e).rowIndex,T=u(2).$index,d=u(2);return A(d.dfsfsd(p,T,g,"debitAmount"))}),t()(),i(5,"td")(6,"input",19),I("ngModelChange",function(p){let g=F(e).rowIndex,T=u(2).$index,d=u(2);return A(d.dfsfsd(p,T,g,"creditAmount"))}),t()()()}if(n&2){let e=m.$implicit;r(2),s(e.accountName),r(2),l("ngModel",e.debitAmount),r(2),l("ngModel",e.creditAmount)}}function rt(n,m){if(n&1&&(i(0,"p-table",15),f(1,it,7,0,"ng-template",16)(2,ot,7,3,"ng-template",17),t()),n&2){let e=u().$implicit;l("value",e.items)}}function at(n,m){if(n&1&&(i(0,"div",8)(1,"div",9)(2,"div",13)(3,"h4"),o(4),t()(),i(5,"div"),f(6,rt,3,1,"p-table",14),t()()()),n&2){let e=m.$implicit;r(4),s(e.name),r(2),l("ngIf",e.items.length)}}function lt(n,m){if(n&1&&(i(0,"tr")(1,"td")(2,"p",20),o(3,"Total"),t()(),i(4,"td",18)(5,"p",20),o(6),z(7,"number"),t()(),i(8,"td",18)(9,"p",20),o(10),z(11,"number"),t()()()),n&2){let e=u(2);r(6),s(K(7,2,e.subTotalDebit())),r(4),s(K(11,4,e.subTotalCredit()))}}function ct(n,m){if(n&1&&(S(0,6),i(1,"p-card",7)(2,"div",8)(3,"div",9),c(4,"p-datepicker",10),t()()(),c(5,"br"),i(6,"p-card")(7,"p-scroll-panel")(8,"div",11),v(9,at,7,2,"div",8,_),t()(),i(11,"p-table",12),f(12,lt,12,6,"ng-template",null,0,P),t()(),E()),n&2){let e=u();r(4),l("ngModel",e.date()),r(3),X(q(4,tt)),r(2),h(e.nonEmptyForms()),r(2),l("value",q(5,nt))}}var ke=(()=>{class n{constructor(){this.accSetupService=C(L),this.openingBalanceForm=y(null),this.date=y(new Date),this.messageService=C(H),this.subTotalDebit=N(()=>this.openingBalanceForm()?this.openingBalanceForm().form.reduce((e,a)=>e+a.items.reduce((p,g)=>p+g.debitAmount,0),0):0),this.subTotalCredit=N(()=>this.openingBalanceForm()?this.openingBalanceForm().form.reduce((e,a)=>e+a.items.reduce((p,g)=>p+g.creditAmount,0),0):0),this.totalItemsCount=N(()=>this.openingBalanceForm()?this.openingBalanceForm().form.reduce((e,a)=>e+a.items.length,0):0),this.nonEmptyForms=N(()=>{let e=["Asset","Liability","Equity","Revenue","Expense"];return this.openingBalanceForm()?this.openingBalanceForm().form.filter(a=>a.items.length>0||e.includes(a.name)):[]})}ngOnInit(){this.loadFormData(),setInterval(()=>{this.subTotalCredit()!==this.subTotalDebit()&&this.messageService.add({severity:"warn",summary:"Mismatch Detected",detail:`The total Debit and Credit amounts are not balanced. Difference: ${this.subTotalCredit()-this.subTotalDebit()}`})},1e3)}loadFormData(){this.accSetupService.fetchOpeningBalanceFormConfiguration().pipe(se("response"),M(e=>{this.openingBalanceForm.set(e)})).subscribe()}dfsfsd(e,a,p,g){let T=this.openingBalanceForm().form.map((d,Ge)=>Ge===a?x(b({},d),{items:d.items.map((W,Ve)=>Ve===p?x(b({},W),{[g]:e}):W)}):d).filter(d=>d!==null);this.openingBalanceForm.update(d=>x(b({},d),{form:T})),console.log(this.openingBalanceForm())}static{this.\u0275fac=function(a){return new(a||n)}}static{this.\u0275cmp=w({type:n,selectors:[["app-acc-opening-balance-form"]],features:[Y([H])],decls:6,vars:1,consts:[["footer",""],["pageTitle","Opening Balance Form"],["ngProjectAs","action-button",5,["action-button"]],[1,"btn","btn-primary","rounded"],["ngProjectAs","content",5,["content"],4,"ngIf"],["preventOpenDuplicates",""],["ngProjectAs","content",5,["content"]],["header","Opening Balance Date"],[1,"row"],[1,"col"],[3,"ngModel"],[1,"d-flex","flex-column","gap-4"],[3,"value"],[1,"mb-2"],["dataKey","id","stripedRows","",3,"value",4,"ngIf"],["dataKey","id","stripedRows","",3,"value"],["pTemplate","header"],["pTemplate","body"],[2,"width","200px"],["type","number",1,"form-control",3,"ngModelChange","ngModel"],[1,"fw-semibold","fs-5"]],template:function(a,p){a&1&&(i(0,"app-main-panel",1),S(1,2),i(2,"button",3),o(3,"Submit"),t(),E(),f(4,ct,14,6,"ng-container",4),t(),c(5,"p-toast",5)),a&2&&(r(4),l("ngIf",p.openingBalanceForm()))},dependencies:[R,$,j,ue,J,D,ee,fe,ge,Ce,xe,Se,ye,ce,k,ie,G,ne,V,Ee],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return n})();var rn=[{path:"",redirectTo:"accounting-integration",pathMatch:"full"},{path:"",children:[{path:"accounting-integration",component:Je},{path:"opening-balance-form",component:ke}]}];export{rn as ACCOUNTING_SETUP_ROUTES};
@@ -1,4 +1,4 @@
1
- import{a as je}from"./chunk-TEV7GODP.js";import{c as Qe,f as He}from"./chunk-RJKIW354.js";import{b as ce,c as Ae,d as qe,e as Ke}from"./chunk-3O5WB452.js";import{a as Z,b as Le,d as ze,f as Ue,j as Re,n as ye,o as Be,p as Pe}from"./chunk-KWULO2RL.js";import{G as me,H as Ve,I as A,K as X,L as De,Q as Me,c as he,d as ke,ea as Oe,ga as ae,m as fe,oa as se,pa as U,q as $,qa as Fe,ra as $e}from"./chunk-ZQDTA2BC.js";import{a as we,e as Ie,i as Ee,t as _e}from"./chunk-CDSOHE7R.js";import{k as K,m as j,n as W,o as G,p as Y,t as J}from"./chunk-DFW6MEY3.js";import{$b as S,Ac as L,Bb as H,Ca as b,Db as q,Eb as d,Lc as k,Mb as N,Nb as a,Ob as ie,Qb as ne,Rb as O,Tb as ue,Uc as y,Vc as z,Yb as f,Zb as m,_b as w,ac as C,bc as I,cc as V,ea as ee,fa as te,ga as de,gc as x,hc as s,jb as c,kb as ve,kc as T,la as B,lc as E,mc as _,nc as h,oc as ge,pc as Q,qc as oe,rc as re,sa as xe,ta as u,ua as g,uc as Se,vc as Ce,wa as R,wc as Ne,xb as P,xc as le,yb as pe,zc as D}from"./chunk-A63HKFUG.js";import{a as F}from"./chunk-EQDQRRRY.js";var Ye=t=>({height:t}),Je=t=>({"p-tree-node-droppoint-active":t}),Te=t=>({$implicit:t}),ot=(t,l)=>({$implicit:t,partialSelected:l,class:"p-tree-node-checkbox"});function rt(t,l){if(t&1){let e=V();f(0,"li",11),x("drop",function(i){u(e);let o=s(2);return g(o.onDropPoint(i,-1))})("dragover",function(i){u(e);let o=s(2);return g(o.onDropPointDragOver(i))})("dragenter",function(i){u(e);let o=s(2);return g(o.onDropPointDragEnter(i,-1))})("dragleave",function(i){u(e);let o=s(2);return g(o.onDropPointDragLeave(i))}),m()}if(t&2){let e=s(2);a("ngClass",D(2,Je,e.draghoverPrev)),N("aria-hidden",!0)}}function lt(t,l){t&1&&w(0,"ChevronRightIcon",13),t&2&&a("styleClass","p-tree-node-toggle-icon")}function at(t,l){t&1&&w(0,"ChevronDownIcon",13),t&2&&a("styleClass","p-tree-node-toggle-icon")}function st(t,l){if(t&1&&(S(0),d(1,lt,1,1,"ChevronRightIcon",12)(2,at,1,1,"ChevronDownIcon",12),C()),t&2){let e=s(3);c(),a("ngIf",!e.node.expanded),c(),a("ngIf",e.node.expanded)}}function ct(t,l){t&1&&(S(0),w(1,"SpinnerIcon",13),C()),t&2&&(c(),a("styleClass","pi-spin p-tree-node-toggle-icon"))}function dt(t,l){if(t&1&&(S(0),d(1,st,3,2,"ng-container",5)(2,ct,2,1,"ng-container",5),C()),t&2){let e=s(2);c(),a("ngIf",!e.node.loading),c(),a("ngIf",e.loadingMode==="icon"&&e.node.loading)}}function pt(t,l){}function ut(t,l){t&1&&d(0,pt,0,0,"ng-template")}function gt(t,l){if(t&1&&(f(0,"span",14),d(1,ut,1,0,null,15),m()),t&2){let e=s(2);c(),a("ngTemplateOutlet",e.tree.togglerIconTemplate||e.tree._togglerIconTemplate)("ngTemplateOutletContext",D(2,Te,e.node.expanded))}}function _t(t,l){}function ht(t,l){t&1&&d(0,_t,0,0,"ng-template")}function ft(t,l){if(t&1&&d(0,ht,1,0,null,15),t&2){let e=s(4);a("ngTemplateOutlet",e.tree.checkboxIconTemplate||e.tree._checkboxIconTemplate)("ngTemplateOutletContext",L(2,ot,e.isSelected(),e.node.partialSelected))}}function mt(t,l){t&1&&(S(0),d(1,ft,1,5,"ng-template",null,0,k),C())}function yt(t,l){if(t&1){let e=V();f(0,"p-checkbox",16),x("click",function(i){return u(e),g(i.preventDefault())}),d(1,mt,3,0,"ng-container",5),m()}if(t&2){let e=s(2);a("ngModel",e.isSelected())("binary",!0)("indeterminate",e.node.partialSelected)("disabled",e.node.selectable===!1)("variant",(e.tree==null?null:e.tree.config.inputStyle())==="filled"||(e.tree==null?null:e.tree.config.inputVariant())==="filled"?"filled":"outlined")("tabindex",-1),N("data-p-partialchecked",e.node.partialSelected),c(),a("ngIf",e.tree.checkboxIconTemplate||e.tree._checkboxIconTemplate)}}function Tt(t,l){if(t&1&&w(0,"span"),t&2){let e=s(2);O(e.getIcon())}}function bt(t,l){if(t&1&&(f(0,"span"),Q(1),m()),t&2){let e=s(2);c(),oe(e.node.label)}}function xt(t,l){t&1&&I(0)}function vt(t,l){if(t&1&&(f(0,"span"),d(1,xt,1,0,"ng-container",15),m()),t&2){let e=s(2);c(),a("ngTemplateOutlet",e.tree.getTemplateForNode(e.node))("ngTemplateOutletContext",D(2,Te,e.node))}}function St(t,l){if(t&1&&w(0,"p-treeNode",19),t&2){let e=l.$implicit,n=l.first,i=l.last,o=l.index,r=s(3);a("node",e)("parentNode",r.node)("firstChild",n)("lastChild",i)("index",o)("itemSize",r.itemSize)("level",r.level+1)("loadingMode",r.loadingMode)}}function Ct(t,l){if(t&1&&(f(0,"ul",17),d(1,St,1,8,"p-treeNode",18),m()),t&2){let e=s(2);ie("display",e.node.expanded?"block":"none"),c(),a("ngForOf",e.node.children)("ngForTrackBy",e.tree.trackBy.bind(e))}}function Nt(t,l){if(t&1){let e=V();f(0,"li",11),x("drop",function(i){u(e);let o=s(2);return g(o.onDropPoint(i,1))})("dragover",function(i){u(e);let o=s(2);return g(o.onDropPointDragOver(i))})("dragenter",function(i){u(e);let o=s(2);return g(o.onDropPointDragEnter(i,1))})("dragleave",function(i){u(e);let o=s(2);return g(o.onDropPointDragLeave(i))}),m()}if(t&2){let e=s(2);a("ngClass",D(2,Je,e.draghoverNext)),N("aria-hidden",!0)}}function wt(t,l){if(t&1){let e=V();d(0,rt,1,4,"li",1),f(1,"li",2),x("keydown",function(i){u(e);let o=s();return g(o.onKeyDown(i))}),f(2,"div",3),x("click",function(i){u(e);let o=s();return g(o.onNodeClick(i))})("contextmenu",function(i){u(e);let o=s();return g(o.onNodeRightClick(i))})("dblclick",function(i){u(e);let o=s();return g(o.onNodeDblClick(i))})("touchend",function(){u(e);let i=s();return g(i.onNodeTouchEnd())})("drop",function(i){u(e);let o=s();return g(o.onDropNode(i))})("dragover",function(i){u(e);let o=s();return g(o.onDropNodeDragOver(i))})("dragenter",function(i){u(e);let o=s();return g(o.onDropNodeDragEnter(i))})("dragleave",function(i){u(e);let o=s();return g(o.onDropNodeDragLeave(i))})("dragstart",function(i){u(e);let o=s();return g(o.onDragStart(i))})("dragend",function(i){u(e);let o=s();return g(o.onDragStop(i))}),f(3,"button",4),x("click",function(i){u(e);let o=s();return g(o.toggle(i))}),d(4,dt,3,2,"ng-container",5)(5,gt,2,4,"span",6),m(),d(6,yt,2,8,"p-checkbox",7)(7,Tt,1,2,"span",8),f(8,"span",9),d(9,bt,2,1,"span",5)(10,vt,2,4,"span",5),m()(),d(11,Ct,2,4,"ul",10),m(),d(12,Nt,1,4,"li",1)}if(t&2){let e=s();a("ngIf",e.tree.droppableNodes),c(),ne(e.node.style),O(e.node.styleClass),a("ngClass",e.nodeClass)("ngStyle",D(29,Ye,e.itemSize+"px")),N("aria-label",e.node.label)("aria-checked",e.checked)("aria-setsize",e.node.children?e.node.children.length:0)("aria-selected",e.selected)("aria-expanded",e.node.expanded)("aria-posinset",e.index+1)("aria-level",e.level+1)("tabindex",e.index===0?0:-1)("data-id",e.node.key),c(),ie("padding-left",e.level*e.indentation+"rem"),a("ngClass",e.nodeContentClass)("draggable",e.tree.draggableNodes),c(),N("data-pc-section","toggler"),c(),a("ngIf",!e.tree.togglerIconTemplate&&!e.tree._togglerIconTemplate),c(),a("ngIf",e.tree.togglerIconTemplate||e.tree._togglerIconTemplate),c(),a("ngIf",e.tree.selectionMode=="checkbox"),c(),a("ngIf",e.node.icon||e.node.expandedIcon||e.node.collapsedIcon),c(2),a("ngIf",!e.tree.getTemplateForNode(e.node)),c(),a("ngIf",e.tree.getTemplateForNode(e.node)),c(),a("ngIf",!e.tree.virtualScroll&&e.node.children&&e.node.expanded),c(),a("ngIf",e.tree.droppableNodes&&e.lastChild)}}var We=["filter"],It=["node"],Et=["header"],kt=["footer"],Vt=["loader"],Dt=["empty"],Mt=["togglericon"],Ot=["checkboxicon"],Ft=["loadingicon"],$t=["filtericon"],Lt=["scroller"],zt=["wrapper"],Ut=t=>({options:t});function Rt(t,l){if(t&1&&w(0,"i"),t&2){let e=s(2);O("p-tree-loading-icon pi-spin "+e.loadingIcon)}}function Qt(t,l){t&1&&w(0,"SpinnerIcon",16),t&2&&a("spin",!0)("styleClass","p-tree-loading-icon")}function At(t,l){}function Bt(t,l){t&1&&d(0,At,0,0,"ng-template")}function Pt(t,l){if(t&1&&(f(0,"span",17),d(1,Bt,1,0,null,9),m()),t&2){let e=s(3);c(),a("ngTemplateOutlet",e.loadingIconTemplate||e._loadingIconTemplate)}}function Ht(t,l){if(t&1&&(S(0),d(1,Qt,1,2,"SpinnerIcon",14)(2,Pt,2,1,"span",15),C()),t&2){let e=s(2);c(),a("ngIf",!e.loadingIconTemplate&&!e._loadingIconTemplate),c(),a("ngIf",e.loadingIconTemplate||e._loadingIconTemplate)}}function qt(t,l){if(t&1&&(f(0,"div",12),d(1,Rt,1,2,"i",13)(2,Ht,3,2,"ng-container",10),m()),t&2){let e=s();c(),a("ngIf",e.loadingIcon),c(),a("ngIf",!e.loadingIcon)}}function Kt(t,l){t&1&&I(0)}function jt(t,l){t&1&&I(0)}function Wt(t,l){if(t&1&&d(0,jt,1,0,"ng-container",18),t&2){let e=s();a("ngTemplateOutlet",e.filterTemplate||e._filterTemplate)("ngTemplateOutletContext",D(2,Te,e.filterOptions))}}function Gt(t,l){t&1&&w(0,"SearchIcon",21)}function Yt(t,l){}function Jt(t,l){t&1&&d(0,Yt,0,0,"ng-template")}function Xt(t,l){if(t&1&&(f(0,"span"),d(1,Jt,1,0,null,9),m()),t&2){let e=s(3);c(),a("ngTemplateOutlet",e.filterIconTemplate||e._filterIconTemplate)}}function Zt(t,l){if(t&1){let e=V();f(0,"p-iconField")(1,"input",19,0),x("keydown.enter",function(i){return u(e),g(i.preventDefault())})("input",function(i){u(e);let o=s(2);return g(o._filter(i.target.value))}),m(),f(3,"p-inputIcon"),d(4,Gt,1,0,"SearchIcon",20)(5,Xt,2,1,"span",10),m()()}if(t&2){let e=s(2);c(),N("placeholder",e.filterPlaceholder),c(3),a("ngIf",!e.filterIconTemplate&&!e._filterIconTemplate),c(),a("ngIf",e.filterIconTemplate||e._filterIconTemplate)}}function ei(t,l){if(t&1&&d(0,Zt,6,3,"p-iconField",10),t&2){let e=s();a("ngIf",e.filter)}}function ti(t,l){if(t&1&&w(0,"p-treeNode",27,3),t&2){let e=l.$implicit,n=l.first,i=l.last,o=l.index,r=s(2).options,p=s(3);a("level",e.level)("rowNode",e)("node",e.node)("parentNode",e.parent)("firstChild",n)("lastChild",i)("index",p.getIndex(r,o))("itemSize",r.itemSize)("indentation",p.indentation)("loadingMode",p.loadingMode)}}function ii(t,l){if(t&1&&(f(0,"ul",25),d(1,ti,2,10,"p-treeNode",26),m()),t&2){let e=s(),n=e.$implicit,i=e.options,o=s(3);ne(i.contentStyle),a("ngClass",i.contentStyleClass),N("aria-label",o.ariaLabel)("aria-labelledby",o.ariaLabelledBy),c(),a("ngForOf",n)("ngForTrackBy",o.trackBy)}}function ni(t,l){if(t&1&&d(0,ii,2,7,"ul",24),t&2){let e=l.$implicit;a("ngIf",e)}}function oi(t,l){t&1&&I(0)}function ri(t,l){if(t&1&&d(0,oi,1,0,"ng-container",18),t&2){let e=l.options,n=s(4);a("ngTemplateOutlet",n.loaderTemplate||n._loaderTemplate)("ngTemplateOutletContext",D(2,Ut,e))}}function li(t,l){t&1&&(S(0),d(1,ri,1,4,"ng-template",null,4,k),C())}function ai(t,l){if(t&1){let e=V();f(0,"p-scroller",23,1),x("onScroll",function(i){u(e);let o=s(2);return g(o.onScroll.emit(i))})("onScrollIndexChange",function(i){u(e);let o=s(2);return g(o.onScrollIndexChange.emit(i))})("onLazyLoad",function(i){u(e);let o=s(2);return g(o.onLazyLoad.emit(i))}),d(2,ni,1,1,"ng-template",null,2,k)(4,li,3,0,"ng-container",10),m()}if(t&2){let e=s(2);ne(D(9,Ye,e.scrollHeight!=="flex"?e.scrollHeight:void 0)),a("items",e.serializedValue)("tabindex",-1)("scrollHeight",e.scrollHeight!=="flex"?void 0:"100%")("itemSize",e.virtualScrollItemSize||e._virtualNodeHeight)("lazy",e.lazy)("options",e.virtualScrollOptions),c(4),a("ngIf",e.loaderTemplate||e._loaderTemplate)}}function si(t,l){if(t&1&&w(0,"p-treeNode",32),t&2){let e=l.$implicit,n=l.first,i=l.last,o=l.index,r=s(4);a("node",e)("firstChild",n)("lastChild",i)("index",o)("level",0)("loadingMode",r.loadingMode)}}function ci(t,l){if(t&1&&(f(0,"ul",30),d(1,si,1,6,"p-treeNode",31),m()),t&2){let e=s(3);N("aria-label",e.ariaLabel)("aria-labelledby",e.ariaLabelledBy),c(),a("ngForOf",e.getRootNode())("ngForTrackBy",e.trackBy.bind(e))}}function di(t,l){if(t&1&&(S(0),f(1,"div",28,5),d(3,ci,2,4,"ul",29),m(),C()),t&2){let e=s(2);c(),ie("max-height",e.scrollHeight),c(2),a("ngIf",e.getRootNode())}}function pi(t,l){if(t&1&&(S(0),d(1,ai,5,11,"p-scroller",22)(2,di,4,3,"ng-container",10),C()),t&2){let e=s();c(),a("ngIf",e.virtualScroll),c(),a("ngIf",!e.virtualScroll)}}function ui(t,l){if(t&1&&(S(0),Q(1),C()),t&2){let e=s(2);c(),re(" ",e.emptyMessageLabel," ")}}function gi(t,l){}function _i(t,l){t&1&&d(0,gi,0,0,"ng-template",null,6,k)}function hi(t,l){if(t&1&&(f(0,"div",33),d(1,ui,2,1,"ng-container",34)(2,_i,2,0,null,9),m()),t&2){let e=s();c(),a("ngIf",!e.emptyMessageTemplate&&!e._emptyMessageTemplate)("ngIfElse",e.emptyFilter),c(),a("ngTemplateOutlet",e.emptyMessageTemplate||e._emptyMessageTemplate)}}function fi(t,l){t&1&&I(0)}var mi=({dt:t})=>`
1
+ import{a as je}from"./chunk-M4ZOPGSP.js";import{a as ce,c as Le,f as Ke}from"./chunk-PCJXJ6O4.js";import{a as Re}from"./chunk-7RH6F4PN.js";import{d as ze,e as He}from"./chunk-DKWZOSVY.js";import{a as Ue,b as qe}from"./chunk-Z53S4NM2.js";import{h as Z,o as ye,p as Qe,r as Ae,t as Be,v as Pe}from"./chunk-2LKTSMUI.js";import{Ga as ae,Ha as U,Ia as Fe,Ja as $e,M as he,N as ke,O as A,Pa as se,Q as X,R as Ve,W as De,a as we,e as Ie,i as Ee,na as fe,oa as Me,s as _e,w as $,xa as me,ya as Oe}from"./chunk-3ROVFYLI.js";import{k as K,m as j,n as W,o as G,p as Y,t as J}from"./chunk-C4WUUVLC.js";import{$b as w,Ac as D,Bc as L,Cb as H,Da as b,Eb as q,Fb as d,Mc as k,Nb as N,Ob as a,Pb as ie,Rb as ne,Sb as O,Ub as ue,Vc as y,Wc as z,Zb as f,_b as m,ac as S,bc as C,cc as I,dc as V,fa as ee,ga as te,ha as de,hc as x,ic as s,kb as c,lb as ve,lc as T,ma as B,mc as E,nc as _,oc as h,pc as ge,qc as Q,rc as oe,sc as re,ta as xe,ua as u,va as g,vc as Se,wc as Ce,xa as R,xc as Ne,yb as P,yc as le,zb as pe}from"./chunk-PQTHPF23.js";import{a as F}from"./chunk-EQDQRRRY.js";var Ye=t=>({height:t}),Je=t=>({"p-tree-node-droppoint-active":t}),Te=t=>({$implicit:t}),ot=(t,l)=>({$implicit:t,partialSelected:l,class:"p-tree-node-checkbox"});function rt(t,l){if(t&1){let e=V();f(0,"li",11),x("drop",function(i){u(e);let o=s(2);return g(o.onDropPoint(i,-1))})("dragover",function(i){u(e);let o=s(2);return g(o.onDropPointDragOver(i))})("dragenter",function(i){u(e);let o=s(2);return g(o.onDropPointDragEnter(i,-1))})("dragleave",function(i){u(e);let o=s(2);return g(o.onDropPointDragLeave(i))}),m()}if(t&2){let e=s(2);a("ngClass",D(2,Je,e.draghoverPrev)),N("aria-hidden",!0)}}function lt(t,l){t&1&&w(0,"ChevronRightIcon",13),t&2&&a("styleClass","p-tree-node-toggle-icon")}function at(t,l){t&1&&w(0,"ChevronDownIcon",13),t&2&&a("styleClass","p-tree-node-toggle-icon")}function st(t,l){if(t&1&&(S(0),d(1,lt,1,1,"ChevronRightIcon",12)(2,at,1,1,"ChevronDownIcon",12),C()),t&2){let e=s(3);c(),a("ngIf",!e.node.expanded),c(),a("ngIf",e.node.expanded)}}function ct(t,l){t&1&&(S(0),w(1,"SpinnerIcon",13),C()),t&2&&(c(),a("styleClass","pi-spin p-tree-node-toggle-icon"))}function dt(t,l){if(t&1&&(S(0),d(1,st,3,2,"ng-container",5)(2,ct,2,1,"ng-container",5),C()),t&2){let e=s(2);c(),a("ngIf",!e.node.loading),c(),a("ngIf",e.loadingMode==="icon"&&e.node.loading)}}function pt(t,l){}function ut(t,l){t&1&&d(0,pt,0,0,"ng-template")}function gt(t,l){if(t&1&&(f(0,"span",14),d(1,ut,1,0,null,15),m()),t&2){let e=s(2);c(),a("ngTemplateOutlet",e.tree.togglerIconTemplate||e.tree._togglerIconTemplate)("ngTemplateOutletContext",D(2,Te,e.node.expanded))}}function _t(t,l){}function ht(t,l){t&1&&d(0,_t,0,0,"ng-template")}function ft(t,l){if(t&1&&d(0,ht,1,0,null,15),t&2){let e=s(4);a("ngTemplateOutlet",e.tree.checkboxIconTemplate||e.tree._checkboxIconTemplate)("ngTemplateOutletContext",L(2,ot,e.isSelected(),e.node.partialSelected))}}function mt(t,l){t&1&&(S(0),d(1,ft,1,5,"ng-template",null,0,k),C())}function yt(t,l){if(t&1){let e=V();f(0,"p-checkbox",16),x("click",function(i){return u(e),g(i.preventDefault())}),d(1,mt,3,0,"ng-container",5),m()}if(t&2){let e=s(2);a("ngModel",e.isSelected())("binary",!0)("indeterminate",e.node.partialSelected)("disabled",e.node.selectable===!1)("variant",(e.tree==null?null:e.tree.config.inputStyle())==="filled"||(e.tree==null?null:e.tree.config.inputVariant())==="filled"?"filled":"outlined")("tabindex",-1),N("data-p-partialchecked",e.node.partialSelected),c(),a("ngIf",e.tree.checkboxIconTemplate||e.tree._checkboxIconTemplate)}}function Tt(t,l){if(t&1&&w(0,"span"),t&2){let e=s(2);O(e.getIcon())}}function bt(t,l){if(t&1&&(f(0,"span"),Q(1),m()),t&2){let e=s(2);c(),oe(e.node.label)}}function xt(t,l){t&1&&I(0)}function vt(t,l){if(t&1&&(f(0,"span"),d(1,xt,1,0,"ng-container",15),m()),t&2){let e=s(2);c(),a("ngTemplateOutlet",e.tree.getTemplateForNode(e.node))("ngTemplateOutletContext",D(2,Te,e.node))}}function St(t,l){if(t&1&&w(0,"p-treeNode",19),t&2){let e=l.$implicit,n=l.first,i=l.last,o=l.index,r=s(3);a("node",e)("parentNode",r.node)("firstChild",n)("lastChild",i)("index",o)("itemSize",r.itemSize)("level",r.level+1)("loadingMode",r.loadingMode)}}function Ct(t,l){if(t&1&&(f(0,"ul",17),d(1,St,1,8,"p-treeNode",18),m()),t&2){let e=s(2);ie("display",e.node.expanded?"block":"none"),c(),a("ngForOf",e.node.children)("ngForTrackBy",e.tree.trackBy.bind(e))}}function Nt(t,l){if(t&1){let e=V();f(0,"li",11),x("drop",function(i){u(e);let o=s(2);return g(o.onDropPoint(i,1))})("dragover",function(i){u(e);let o=s(2);return g(o.onDropPointDragOver(i))})("dragenter",function(i){u(e);let o=s(2);return g(o.onDropPointDragEnter(i,1))})("dragleave",function(i){u(e);let o=s(2);return g(o.onDropPointDragLeave(i))}),m()}if(t&2){let e=s(2);a("ngClass",D(2,Je,e.draghoverNext)),N("aria-hidden",!0)}}function wt(t,l){if(t&1){let e=V();d(0,rt,1,4,"li",1),f(1,"li",2),x("keydown",function(i){u(e);let o=s();return g(o.onKeyDown(i))}),f(2,"div",3),x("click",function(i){u(e);let o=s();return g(o.onNodeClick(i))})("contextmenu",function(i){u(e);let o=s();return g(o.onNodeRightClick(i))})("dblclick",function(i){u(e);let o=s();return g(o.onNodeDblClick(i))})("touchend",function(){u(e);let i=s();return g(i.onNodeTouchEnd())})("drop",function(i){u(e);let o=s();return g(o.onDropNode(i))})("dragover",function(i){u(e);let o=s();return g(o.onDropNodeDragOver(i))})("dragenter",function(i){u(e);let o=s();return g(o.onDropNodeDragEnter(i))})("dragleave",function(i){u(e);let o=s();return g(o.onDropNodeDragLeave(i))})("dragstart",function(i){u(e);let o=s();return g(o.onDragStart(i))})("dragend",function(i){u(e);let o=s();return g(o.onDragStop(i))}),f(3,"button",4),x("click",function(i){u(e);let o=s();return g(o.toggle(i))}),d(4,dt,3,2,"ng-container",5)(5,gt,2,4,"span",6),m(),d(6,yt,2,8,"p-checkbox",7)(7,Tt,1,2,"span",8),f(8,"span",9),d(9,bt,2,1,"span",5)(10,vt,2,4,"span",5),m()(),d(11,Ct,2,4,"ul",10),m(),d(12,Nt,1,4,"li",1)}if(t&2){let e=s();a("ngIf",e.tree.droppableNodes),c(),ne(e.node.style),O(e.node.styleClass),a("ngClass",e.nodeClass)("ngStyle",D(29,Ye,e.itemSize+"px")),N("aria-label",e.node.label)("aria-checked",e.checked)("aria-setsize",e.node.children?e.node.children.length:0)("aria-selected",e.selected)("aria-expanded",e.node.expanded)("aria-posinset",e.index+1)("aria-level",e.level+1)("tabindex",e.index===0?0:-1)("data-id",e.node.key),c(),ie("padding-left",e.level*e.indentation+"rem"),a("ngClass",e.nodeContentClass)("draggable",e.tree.draggableNodes),c(),N("data-pc-section","toggler"),c(),a("ngIf",!e.tree.togglerIconTemplate&&!e.tree._togglerIconTemplate),c(),a("ngIf",e.tree.togglerIconTemplate||e.tree._togglerIconTemplate),c(),a("ngIf",e.tree.selectionMode=="checkbox"),c(),a("ngIf",e.node.icon||e.node.expandedIcon||e.node.collapsedIcon),c(2),a("ngIf",!e.tree.getTemplateForNode(e.node)),c(),a("ngIf",e.tree.getTemplateForNode(e.node)),c(),a("ngIf",!e.tree.virtualScroll&&e.node.children&&e.node.expanded),c(),a("ngIf",e.tree.droppableNodes&&e.lastChild)}}var We=["filter"],It=["node"],Et=["header"],kt=["footer"],Vt=["loader"],Dt=["empty"],Mt=["togglericon"],Ot=["checkboxicon"],Ft=["loadingicon"],$t=["filtericon"],Lt=["scroller"],zt=["wrapper"],Ut=t=>({options:t});function Rt(t,l){if(t&1&&w(0,"i"),t&2){let e=s(2);O("p-tree-loading-icon pi-spin "+e.loadingIcon)}}function Qt(t,l){t&1&&w(0,"SpinnerIcon",16),t&2&&a("spin",!0)("styleClass","p-tree-loading-icon")}function At(t,l){}function Bt(t,l){t&1&&d(0,At,0,0,"ng-template")}function Pt(t,l){if(t&1&&(f(0,"span",17),d(1,Bt,1,0,null,9),m()),t&2){let e=s(3);c(),a("ngTemplateOutlet",e.loadingIconTemplate||e._loadingIconTemplate)}}function Ht(t,l){if(t&1&&(S(0),d(1,Qt,1,2,"SpinnerIcon",14)(2,Pt,2,1,"span",15),C()),t&2){let e=s(2);c(),a("ngIf",!e.loadingIconTemplate&&!e._loadingIconTemplate),c(),a("ngIf",e.loadingIconTemplate||e._loadingIconTemplate)}}function qt(t,l){if(t&1&&(f(0,"div",12),d(1,Rt,1,2,"i",13)(2,Ht,3,2,"ng-container",10),m()),t&2){let e=s();c(),a("ngIf",e.loadingIcon),c(),a("ngIf",!e.loadingIcon)}}function Kt(t,l){t&1&&I(0)}function jt(t,l){t&1&&I(0)}function Wt(t,l){if(t&1&&d(0,jt,1,0,"ng-container",18),t&2){let e=s();a("ngTemplateOutlet",e.filterTemplate||e._filterTemplate)("ngTemplateOutletContext",D(2,Te,e.filterOptions))}}function Gt(t,l){t&1&&w(0,"SearchIcon",21)}function Yt(t,l){}function Jt(t,l){t&1&&d(0,Yt,0,0,"ng-template")}function Xt(t,l){if(t&1&&(f(0,"span"),d(1,Jt,1,0,null,9),m()),t&2){let e=s(3);c(),a("ngTemplateOutlet",e.filterIconTemplate||e._filterIconTemplate)}}function Zt(t,l){if(t&1){let e=V();f(0,"p-iconField")(1,"input",19,0),x("keydown.enter",function(i){return u(e),g(i.preventDefault())})("input",function(i){u(e);let o=s(2);return g(o._filter(i.target.value))}),m(),f(3,"p-inputIcon"),d(4,Gt,1,0,"SearchIcon",20)(5,Xt,2,1,"span",10),m()()}if(t&2){let e=s(2);c(),N("placeholder",e.filterPlaceholder),c(3),a("ngIf",!e.filterIconTemplate&&!e._filterIconTemplate),c(),a("ngIf",e.filterIconTemplate||e._filterIconTemplate)}}function ei(t,l){if(t&1&&d(0,Zt,6,3,"p-iconField",10),t&2){let e=s();a("ngIf",e.filter)}}function ti(t,l){if(t&1&&w(0,"p-treeNode",27,3),t&2){let e=l.$implicit,n=l.first,i=l.last,o=l.index,r=s(2).options,p=s(3);a("level",e.level)("rowNode",e)("node",e.node)("parentNode",e.parent)("firstChild",n)("lastChild",i)("index",p.getIndex(r,o))("itemSize",r.itemSize)("indentation",p.indentation)("loadingMode",p.loadingMode)}}function ii(t,l){if(t&1&&(f(0,"ul",25),d(1,ti,2,10,"p-treeNode",26),m()),t&2){let e=s(),n=e.$implicit,i=e.options,o=s(3);ne(i.contentStyle),a("ngClass",i.contentStyleClass),N("aria-label",o.ariaLabel)("aria-labelledby",o.ariaLabelledBy),c(),a("ngForOf",n)("ngForTrackBy",o.trackBy)}}function ni(t,l){if(t&1&&d(0,ii,2,7,"ul",24),t&2){let e=l.$implicit;a("ngIf",e)}}function oi(t,l){t&1&&I(0)}function ri(t,l){if(t&1&&d(0,oi,1,0,"ng-container",18),t&2){let e=l.options,n=s(4);a("ngTemplateOutlet",n.loaderTemplate||n._loaderTemplate)("ngTemplateOutletContext",D(2,Ut,e))}}function li(t,l){t&1&&(S(0),d(1,ri,1,4,"ng-template",null,4,k),C())}function ai(t,l){if(t&1){let e=V();f(0,"p-scroller",23,1),x("onScroll",function(i){u(e);let o=s(2);return g(o.onScroll.emit(i))})("onScrollIndexChange",function(i){u(e);let o=s(2);return g(o.onScrollIndexChange.emit(i))})("onLazyLoad",function(i){u(e);let o=s(2);return g(o.onLazyLoad.emit(i))}),d(2,ni,1,1,"ng-template",null,2,k)(4,li,3,0,"ng-container",10),m()}if(t&2){let e=s(2);ne(D(9,Ye,e.scrollHeight!=="flex"?e.scrollHeight:void 0)),a("items",e.serializedValue)("tabindex",-1)("scrollHeight",e.scrollHeight!=="flex"?void 0:"100%")("itemSize",e.virtualScrollItemSize||e._virtualNodeHeight)("lazy",e.lazy)("options",e.virtualScrollOptions),c(4),a("ngIf",e.loaderTemplate||e._loaderTemplate)}}function si(t,l){if(t&1&&w(0,"p-treeNode",32),t&2){let e=l.$implicit,n=l.first,i=l.last,o=l.index,r=s(4);a("node",e)("firstChild",n)("lastChild",i)("index",o)("level",0)("loadingMode",r.loadingMode)}}function ci(t,l){if(t&1&&(f(0,"ul",30),d(1,si,1,6,"p-treeNode",31),m()),t&2){let e=s(3);N("aria-label",e.ariaLabel)("aria-labelledby",e.ariaLabelledBy),c(),a("ngForOf",e.getRootNode())("ngForTrackBy",e.trackBy.bind(e))}}function di(t,l){if(t&1&&(S(0),f(1,"div",28,5),d(3,ci,2,4,"ul",29),m(),C()),t&2){let e=s(2);c(),ie("max-height",e.scrollHeight),c(2),a("ngIf",e.getRootNode())}}function pi(t,l){if(t&1&&(S(0),d(1,ai,5,11,"p-scroller",22)(2,di,4,3,"ng-container",10),C()),t&2){let e=s();c(),a("ngIf",e.virtualScroll),c(),a("ngIf",!e.virtualScroll)}}function ui(t,l){if(t&1&&(S(0),Q(1),C()),t&2){let e=s(2);c(),re(" ",e.emptyMessageLabel," ")}}function gi(t,l){}function _i(t,l){t&1&&d(0,gi,0,0,"ng-template",null,6,k)}function hi(t,l){if(t&1&&(f(0,"div",33),d(1,ui,2,1,"ng-container",34)(2,_i,2,0,null,9),m()),t&2){let e=s();c(),a("ngIf",!e.emptyMessageTemplate&&!e._emptyMessageTemplate)("ngIfElse",e.emptyFilter),c(),a("ngTemplateOutlet",e.emptyMessageTemplate||e._emptyMessageTemplate)}}function fi(t,l){t&1&&I(0)}var mi=({dt:t})=>`
2
2
  .p-tree {
3
3
  background: ${t("tree.background")};
4
4
  color: ${t("tree.color")};
@@ -220,7 +220,7 @@ import{a as je}from"./chunk-TEV7GODP.js";import{c as Qe,f as He}from"./chunk-RJK
220
220
  .p-tree.p-tree-horizontal table {
221
221
  height: 0;
222
222
  }
223
- `,yi={root:({instance:t})=>({"p-tree p-component":!0,"p-tree-selectable":t.selectionMode!=null,"p-tree-loading":t.loading,"p-tree-flex-scrollable":t.scrollHeight==="flex","p-tree-node-dragover":t.dragHover}),mask:"p-tree-mask p-overlay-mask",loadingIcon:"p-tree-loading-icon",pcFilterInput:"p-tree-filter-input",wrapper:"p-tree-root",rootChildren:"p-tree-root-children",node:({instance:t})=>({"p-tree-node":!0,"p-tree-node-leaf":t.isLeaf()}),nodeContent:({instance:t})=>({"p-tree-node-content":!0,[t.styleClass]:!!t.styleClass,"p-tree-node-selectable":t.selectable,"p-tree-node-dragover":t.draghoverNode,"p-tree-node-selected":t.selectionMode==="checkbox"&&t.tree.highlightOnSelect?t.checked:t.selected}),nodeToggleButton:"p-tree-node-toggle-button",nodeToggleIcon:"p-tree-node-toggle-icon",nodeCheckbox:"p-tree-node-checkbox",nodeIcon:"p-tree-node-icon",nodeLabel:"p-tree-node-label",nodeChildren:"p-tree-node-children"},Ge=(()=>{class t extends ae{name="tree";theme=mi;classes=yi;static \u0275fac=(()=>{let e;return function(i){return(e||(e=R(t)))(i||t)}})();static \u0275prov=te({token:t,factory:t.\u0275fac})}return t})();var Ti=(()=>{class t extends Z{static ICON_CLASS="p-tree-node-icon ";rowNode;node;parentNode;root;index;firstChild;lastChild;level;indentation;itemSize;loadingMode;tree=B(ee(()=>be));timeout;draghoverPrev;draghoverNext;draghoverNode;get selected(){return this.tree.selectionMode==="single"||this.tree.selectionMode==="multiple"?this.isSelected():void 0}get checked(){return this.tree.selectionMode==="checkbox"?this.isSelected():void 0}get nodeClass(){return this.tree._componentStyle.classes.node({instance:this})}get nodeContentClass(){return this.tree._componentStyle.classes.nodeContent({instance:this})}get selectable(){return this.node.selectable===!1?!1:this.tree.selectionMode!=null}ngOnInit(){super.ngOnInit(),this.node.parent=this.parentNode;let n=this.tree.el.nativeElement.closest("p-dialog");this.parentNode&&!n&&(this.setAllNodesTabIndexes(),this.tree.syncNodeOption(this.node,this.tree.value,"parent",this.tree.getNodeWithKey(this.parentNode.key,this.tree.value)))}getIcon(){let e;return this.node.icon?e=this.node.icon:e=this.node.expanded&&this.node.children&&this.node.children?.length?this.node.expandedIcon:this.node.collapsedIcon,t.ICON_CLASS+" "+e+" p-tree-node-icon"}isLeaf(){return this.tree.isNodeLeaf(this.node)}toggle(e){this.node.expanded?this.collapse(e):this.expand(e),e.stopPropagation()}expand(e){this.node.expanded=!0,this.tree.virtualScroll&&(this.tree.updateSerializedValue(),this.focusVirtualNode()),this.tree.onNodeExpand.emit({originalEvent:e,node:this.node})}collapse(e){this.node.expanded=!1,this.tree.virtualScroll&&(this.tree.updateSerializedValue(),this.focusVirtualNode()),this.tree.onNodeCollapse.emit({originalEvent:e,node:this.node})}onNodeClick(e){this.tree.onNodeClick(e,this.node)}onNodeKeydown(e){e.key==="Enter"&&this.tree.onNodeClick(e,this.node)}onNodeTouchEnd(){this.tree.onNodeTouchEnd()}onNodeRightClick(e){this.tree.onNodeRightClick(e,this.node)}onNodeDblClick(e){this.tree.onNodeDblClick(e,this.node)}isSelected(){return this.tree.isSelected(this.node)}isSameNode(e){return e.currentTarget&&(e.currentTarget.isSameNode(e.target)||e.currentTarget.isSameNode(e.target.closest('[role="treeitem"]')))}onDropPoint(e,n){e.preventDefault();let i=this.tree.dragNode,o=this.tree.dragNodeIndex,r=this.tree.dragNodeScope,p=this.tree.dragNodeTree===this.tree?n===1||o!==this.index-1:!0;if(this.tree.allowDrop(i,this.node,r)&&p){let v=F({},this.createDropPointEventMetadata(n));this.tree.validateDrop?this.tree.onNodeDrop.emit({originalEvent:e,dragNode:i,dropNode:this.node,index:this.index,accept:()=>{this.processPointDrop(v)}}):(this.processPointDrop(v),this.tree.onNodeDrop.emit({originalEvent:e,dragNode:i,dropNode:this.node,index:this.index}))}this.draghoverPrev=!1,this.draghoverNext=!1}processPointDrop(e){let n=e.dropNode.parent?e.dropNode.parent.children:this.tree.value;e.dragNodeSubNodes.splice(e.dragNodeIndex,1);let i=this.index;e.position<0?(i=e.dragNodeSubNodes===n?e.dragNodeIndex>e.index?e.index:e.index-1:e.index,n.splice(i,0,e.dragNode)):(i=n.length,n.push(e.dragNode)),this.tree.dragDropService.stopDrag({node:e.dragNode,subNodes:e.dropNode.parent?e.dropNode.parent.children:this.tree.value,index:e.dragNodeIndex})}createDropPointEventMetadata(e){return{dragNode:this.tree.dragNode,dragNodeIndex:this.tree.dragNodeIndex,dragNodeSubNodes:this.tree.dragNodeSubNodes,dropNode:this.node,index:this.index,position:e}}onDropPointDragOver(e){e.dataTransfer.dropEffect="move",e.preventDefault()}onDropPointDragEnter(e,n){this.tree.allowDrop(this.tree.dragNode,this.node,this.tree.dragNodeScope)&&(n<0?this.draghoverPrev=!0:this.draghoverNext=!0)}onDropPointDragLeave(e){this.draghoverPrev=!1,this.draghoverNext=!1}onDragStart(e){this.tree.draggableNodes&&this.node.draggable!==!1?(e.dataTransfer.setData("text","data"),this.tree.dragDropService.startDrag({tree:this,node:this.node,subNodes:this.node?.parent?this.node.parent.children:this.tree.value,index:this.index,scope:this.tree.draggableScope})):e.preventDefault()}onDragStop(e){this.tree.dragDropService.stopDrag({node:this.node,subNodes:this.node?.parent?this.node.parent.children:this.tree.value,index:this.index})}onDropNodeDragOver(e){e.dataTransfer.dropEffect="move",this.tree.droppableNodes&&(e.preventDefault(),e.stopPropagation())}onDropNode(e){if(this.tree.droppableNodes&&this.node?.droppable!==!1){let n=this.tree.dragNode;if(this.tree.allowDrop(n,this.node,this.tree.dragNodeScope)){let i=F({},this.createDropNodeEventMetadata());this.tree.validateDrop?this.tree.onNodeDrop.emit({originalEvent:e,dragNode:n,dropNode:this.node,index:this.index,accept:()=>{this.processNodeDrop(i)}}):(this.processNodeDrop(i),this.tree.onNodeDrop.emit({originalEvent:e,dragNode:n,dropNode:this.node,index:this.index}))}}e.preventDefault(),e.stopPropagation(),this.draghoverNode=!1}createDropNodeEventMetadata(){return{dragNode:this.tree.dragNode,dragNodeIndex:this.tree.dragNodeIndex,dragNodeSubNodes:this.tree.dragNodeSubNodes,dropNode:this.node}}processNodeDrop(e){let n=e.dragNodeIndex;e.dragNodeSubNodes.splice(n,1),e.dropNode.children?e.dropNode.children.push(e.dragNode):e.dropNode.children=[e.dragNode],this.tree.dragDropService.stopDrag({node:e.dragNode,subNodes:e.dropNode.parent?e.dropNode.parent.children:this.tree.value,index:n})}onDropNodeDragEnter(e){this.tree.droppableNodes&&this.node?.droppable!==!1&&this.tree.allowDrop(this.tree.dragNode,this.node,this.tree.dragNodeScope)&&(this.draghoverNode=!0)}onDropNodeDragLeave(e){if(this.tree.droppableNodes){let n=e.currentTarget.getBoundingClientRect();(e.x>n.left+n.width||e.x<n.left||e.y>=Math.floor(n.top+n.height)||e.y<n.top)&&(this.draghoverNode=!1)}}onKeyDown(e){if(!(!this.isSameNode(e)||this.tree.contextMenu&&this.tree.contextMenu.containerViewChild?.nativeElement.style.display==="block"))switch(e.code){case"ArrowDown":this.onArrowDown(e);break;case"ArrowUp":this.onArrowUp(e);break;case"ArrowRight":this.onArrowRight(e);break;case"ArrowLeft":this.onArrowLeft(e);break;case"Enter":case"Space":case"NumpadEnter":this.onEnter(e);break;case"Tab":this.setAllNodesTabIndexes();break;default:break}}onArrowUp(e){let n=e.target.getAttribute("data-pc-section")==="toggler"?e.target.closest('[role="treeitem"]'):e.target.parentElement;if(n.previousElementSibling)this.focusRowChange(n,n.previousElementSibling,this.findLastVisibleDescendant(n.previousElementSibling));else{let i=this.getParentNodeElement(n);i&&this.focusRowChange(n,i)}e.preventDefault()}onArrowDown(e){let n=e.target.getAttribute("data-pc-section")==="toggler"?e.target.closest('[role="treeitem"]'):e.target,i=n.children[1];if(i&&i.children.length>0)this.focusRowChange(n,i.children[0]);else if(n.parentElement.nextElementSibling)this.focusRowChange(n,n.parentElement.nextElementSibling);else{let o=this.findNextSiblingOfAncestor(n.parentElement);o&&this.focusRowChange(n,o)}e.preventDefault()}onArrowRight(e){!this.node?.expanded&&!this.tree.isNodeLeaf(this.node)&&(this.expand(e),e.currentTarget.tabIndex=-1,setTimeout(()=>{this.onArrowDown(e)},1)),e.preventDefault()}onArrowLeft(e){let n=e.target.getAttribute("data-pc-section")==="toggler"?e.target.closest('[role="treeitem"]'):e.target;if(this.level===0&&!this.node?.expanded)return!1;if(this.node?.expanded){this.collapse(e);return}let i=this.getParentNodeElement(n.parentElement);i&&this.focusRowChange(e.currentTarget,i),e.preventDefault()}onEnter(e){this.tree.onNodeClick(e,this.node),this.setTabIndexForSelectionMode(e,this.tree.nodeTouched),e.preventDefault()}setAllNodesTabIndexes(){let e=me(this.tree.el.nativeElement,".p-tree-node"),n=[...e].some(i=>i.getAttribute("aria-selected")==="true"||i.getAttribute("aria-checked")==="true");if([...e].forEach(i=>{i.tabIndex=-1}),n){let i=[...e].filter(o=>o.getAttribute("aria-selected")==="true"||o.getAttribute("aria-checked")==="true");i[0].tabIndex=0;return}e.length&&([...e][0].tabIndex=0)}setTabIndexForSelectionMode(e,n){if(this.tree.selectionMode!==null){let i=[...me(this.tree.el.nativeElement,'[role="treeitem"]')];e.currentTarget.tabIndex=n===!1?-1:0,i.every(o=>o.tabIndex===-1)&&(i[0].tabIndex=0)}}findNextSiblingOfAncestor(e){let n=this.getParentNodeElement(e);return n?n.nextElementSibling?n.nextElementSibling:this.findNextSiblingOfAncestor(n):null}findLastVisibleDescendant(e){let i=Array.from(e.children).find(o=>$(o,"p-tree-node"))?.children[1];if(i&&i.children.length>0){let o=i.children[i.children.length-1];return this.findLastVisibleDescendant(o)}else return e}getParentNodeElement(e){let n=e.parentElement?.parentElement?.parentElement;return n?.tagName==="P-TREENODE"?n:null}focusNode(e){this.tree.droppableNodes?e.children[1].focus():e.children[0].focus()}focusRowChange(e,n,i){e.tabIndex="-1",n.children[0].tabIndex="0",this.focusNode(i||n)}focusVirtualNode(){this.timeout=setTimeout(()=>{let e=Ve(document.body,`[data-id="${this.node?.key??this.node?.data}"]`);A(e)},1)}static \u0275fac=(()=>{let e;return function(i){return(e||(e=R(t)))(i||t)}})();static \u0275cmp=P({type:t,selectors:[["p-treeNode"]],inputs:{rowNode:"rowNode",node:"node",parentNode:"parentNode",root:[2,"root","root",y],index:[2,"index","index",z],firstChild:[2,"firstChild","firstChild",y],lastChild:[2,"lastChild","lastChild",y],level:[2,"level","level",z],indentation:[2,"indentation","indentation",z],itemSize:[2,"itemSize","itemSize",z],loadingMode:"loadingMode"},features:[q,H],decls:1,vars:1,consts:[["icon",""],["class","p-tree-node-droppoint",3,"ngClass","drop","dragover","dragenter","dragleave",4,"ngIf"],["role","treeitem",3,"keydown","ngClass","ngStyle"],[3,"click","contextmenu","dblclick","touchend","drop","dragover","dragenter","dragleave","dragstart","dragend","ngClass","draggable"],["type","button","pRipple","","tabindex","-1",1,"p-tree-node-toggle-button",3,"click"],[4,"ngIf"],["class","p-tree-node-toggle-icon",4,"ngIf"],["styleClass","p-tree-node-checkbox",3,"ngModel","binary","indeterminate","disabled","variant","tabindex","click",4,"ngIf"],[3,"class",4,"ngIf"],[1,"p-tree-node-label"],["class","p-tree-node-children","style","display: none;","role","group",3,"display",4,"ngIf"],[1,"p-tree-node-droppoint",3,"drop","dragover","dragenter","dragleave","ngClass"],[3,"styleClass",4,"ngIf"],[3,"styleClass"],[1,"p-tree-node-toggle-icon"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["styleClass","p-tree-node-checkbox",3,"click","ngModel","binary","indeterminate","disabled","variant","tabindex"],["role","group",1,"p-tree-node-children",2,"display","none"],[3,"node","parentNode","firstChild","lastChild","index","itemSize","level","loadingMode",4,"ngFor","ngForOf","ngForTrackBy"],[3,"node","parentNode","firstChild","lastChild","index","itemSize","level","loadingMode"]],template:function(n,i){n&1&&d(0,wt,13,31),n&2&&ue(i.node?0:-1)},dependencies:[t,J,K,j,W,Y,G,Pe,He,_e,Ie,Ee,Qe,ce,ye,U],encapsulation:2})}return t})(),be=(()=>{class t extends Z{dragDropService;value;selectionMode;loadingMode="mask";selection;style;styleClass;contextMenu;draggableScope;droppableScope;draggableNodes;droppableNodes;metaKeySelection=!1;propagateSelectionUp=!0;propagateSelectionDown=!0;loading;loadingIcon;emptyMessage="";ariaLabel;togglerAriaLabel;ariaLabelledBy;validateDrop;filter;filterBy="label";filterMode="lenient";filterOptions;filterPlaceholder;filteredNodes;filterLocale;scrollHeight;lazy=!1;virtualScroll;virtualScrollItemSize;virtualScrollOptions;indentation=1.5;_templateMap;trackBy=(e,n)=>n;highlightOnSelect=!1;_virtualNodeHeight;get virtualNodeHeight(){return this._virtualNodeHeight}set virtualNodeHeight(e){this._virtualNodeHeight=e,console.log("The virtualNodeHeight property is deprecated, use virtualScrollItemSize property instead.")}selectionChange=new b;onNodeSelect=new b;onNodeUnselect=new b;onNodeExpand=new b;onNodeCollapse=new b;onNodeContextMenuSelect=new b;onNodeDoubleClick=new b;onNodeDrop=new b;onLazyLoad=new b;onScroll=new b;onScrollIndexChange=new b;onFilter=new b;filterTemplate;nodeTemplate;headerTemplate;footerTemplate;loaderTemplate;emptyMessageTemplate;togglerIconTemplate;checkboxIconTemplate;loadingIconTemplate;filterIconTemplate;filterViewChild;scroller;wrapperViewChild;templates;_headerTemplate;_emptyMessageTemplate;_footerTemplate;_loaderTemplate;_togglerIconTemplate;_checkboxIconTemplate;_loadingIconTemplate;_filterIconTemplate;_filterTemplate;ngAfterContentInit(){this.templates.length&&(this._templateMap={}),this.templates.forEach(e=>{switch(e.getType()){case"header":this._headerTemplate=e.template;break;case"empty":this._emptyMessageTemplate=e.template;break;case"footer":this._footerTemplate=e.template;break;case"loader":this._loaderTemplate=e.template;break;case"togglericon":this._togglerIconTemplate=e.template;break;case"checkboxicon":this._checkboxIconTemplate=e.template;break;case"loadingicon":this._loadingIconTemplate=e.template;break;case"filtericon":this._filterIconTemplate=e.template;break;case"filter":this._filterTemplate=e.template;break;default:this._templateMap[e.name]=e.template;break}})}serializedValue;nodeTouched;dragNodeTree;dragNode;dragNodeSubNodes;dragNodeIndex;dragNodeScope;dragHover;dragStartSubscription;dragStopSubscription;_componentStyle=B(Ge);constructor(e){super(),this.dragDropService=e}ngOnInit(){super.ngOnInit(),this.filterBy&&(this.filterOptions={filter:e=>this._filter(e),reset:()=>this.resetFilter()}),this.droppableNodes&&(this.dragStartSubscription=this.dragDropService.dragStart$.subscribe(e=>{this.dragNodeTree=e.tree,this.dragNode=e.node,this.dragNodeSubNodes=e.subNodes,this.dragNodeIndex=e.index,this.dragNodeScope=e.scope}),this.dragStopSubscription=this.dragDropService.dragStop$.subscribe(e=>{this.dragNodeTree=null,this.dragNode=null,this.dragNodeSubNodes=null,this.dragNodeIndex=null,this.dragNodeScope=null,this.dragHover=!1}))}ngOnChanges(e){super.ngOnChanges(e),e.value&&(this.updateSerializedValue(),this.hasFilterActive()&&this._filter(this.filterViewChild.nativeElement.value))}get containerClass(){return this._componentStyle.classes.root({instance:this})}get emptyMessageLabel(){return this.emptyMessage||this.config.getTranslation(Fe.EMPTY_MESSAGE)}updateSerializedValue(){this.serializedValue=[],this.serializeNodes(null,this.getRootNode(),0,!0)}serializeNodes(e,n,i,o){if(n&&n.length)for(let r of n){r.parent=e;let p={node:r,parent:e,level:i,visible:o&&(e?e.expanded:!0)};this.serializedValue.push(p),p.visible&&r.expanded&&this.serializeNodes(r,r.children,i+1,p.visible)}}onNodeClick(e,n){let i=e.target;if(!($(i,"p-tree-toggler")||$(i,"p-tree-toggler-icon"))){if(this.selectionMode){if(n.selectable===!1){n.style="--p-focus-ring-color: none;";return}else n.style?.includes("--p-focus-ring-color")||(n.style=n.style?`${n.style}--p-focus-ring-color: var(--primary-color)`:"--p-focus-ring-color: var(--primary-color)");if(this.hasFilteredNodes()&&(n=this.getNodeWithKey(n.key,this.filteredNodes),!n))return;let o=this.findIndexInSelection(n),r=o>=0;if(this.isCheckboxSelectionMode())r?(this.propagateSelectionDown?this.propagateDown(n,!1):this.selection=this.selection.filter((p,v)=>v!=o),this.propagateSelectionUp&&n.parent&&this.propagateUp(n.parent,!1),this.selectionChange.emit(this.selection),this.onNodeUnselect.emit({originalEvent:e,node:n})):(this.propagateSelectionDown?this.propagateDown(n,!0):this.selection=[...this.selection||[],n],this.propagateSelectionUp&&n.parent&&this.propagateUp(n.parent,!0),this.selectionChange.emit(this.selection),this.onNodeSelect.emit({originalEvent:e,node:n}));else if(this.nodeTouched?!1:this.metaKeySelection){let v=e.metaKey||e.ctrlKey;r&&v?(this.isSingleSelectionMode()?this.selectionChange.emit(null):(this.selection=this.selection.filter((M,tt)=>tt!=o),this.selectionChange.emit(this.selection)),this.onNodeUnselect.emit({originalEvent:e,node:n})):(this.isSingleSelectionMode()?this.selectionChange.emit(n):this.isMultipleSelectionMode()&&(this.selection=v?this.selection||[]:[],this.selection=[...this.selection,n],this.selectionChange.emit(this.selection)),this.onNodeSelect.emit({originalEvent:e,node:n}))}else this.isSingleSelectionMode()?r?(this.selection=null,this.onNodeUnselect.emit({originalEvent:e,node:n})):(this.selection=n,setTimeout(()=>{this.onNodeSelect.emit({originalEvent:e,node:n})})):r?(this.selection=this.selection.filter((v,M)=>M!=o),this.onNodeUnselect.emit({originalEvent:e,node:n})):(this.selection=[...this.selection||[],n],setTimeout(()=>{this.onNodeSelect.emit({originalEvent:e,node:n})})),this.selectionChange.emit(this.selection)}this.nodeTouched=!1}}onNodeTouchEnd(){this.nodeTouched=!0}onNodeRightClick(e,n){if(this.contextMenu){let i=e.target;if(i.className&&i.className.indexOf("p-tree-toggler")===0)return;this.findIndexInSelection(n)>=0||(this.isSingleSelectionMode()?this.selectionChange.emit(n):this.selectionChange.emit([n])),this.contextMenu.show(e),this.onNodeContextMenuSelect.emit({originalEvent:e,node:n})}}onNodeDblClick(e,n){this.onNodeDoubleClick.emit({originalEvent:e,node:n})}findIndexInSelection(e){let n=-1;if(this.selectionMode&&this.selection)if(this.isSingleSelectionMode())n=this.selection.key&&this.selection.key===e.key||this.selection==e?0:-1;else for(let i=0;i<this.selection.length;i++){let o=this.selection[i];if(o.key&&o.key===e.key||o==e){n=i;break}}return n}syncNodeOption(e,n,i,o){let r=this.hasFilteredNodes()?this.getNodeWithKey(e.key,n):null;r&&(r[i]=o||e[i])}hasFilteredNodes(){return this.filter&&this.filteredNodes&&this.filteredNodes.length}hasFilterActive(){return this.filter&&this.filterViewChild?.nativeElement?.value.length>0}getNodeWithKey(e,n){for(let i of n){if(i.key===e)return i;if(i.children){let o=this.getNodeWithKey(e,i.children);if(o)return o}}}propagateUp(e,n){if(e.children&&e.children.length){let o=0,r=!1;for(let p of e.children)this.isSelected(p)?o++:p.partialSelected&&(r=!0);if(n&&o==e.children.length)this.selection=[...this.selection||[],e],e.partialSelected=!1;else{if(!n){let p=this.findIndexInSelection(e);p>=0&&(this.selection=this.selection.filter((v,M)=>M!=p))}r||o>0&&o!=e.children.length?e.partialSelected=!0:e.partialSelected=!1}this.syncNodeOption(e,this.filteredNodes,"partialSelected")}let i=e.parent;i&&this.propagateUp(i,n)}propagateDown(e,n){let i=this.findIndexInSelection(e);if(n&&i==-1?this.selection=[...this.selection||[],e]:!n&&i>-1&&(this.selection=this.selection.filter((o,r)=>r!=i)),e.partialSelected=!1,this.syncNodeOption(e,this.filteredNodes,"partialSelected"),e.children&&e.children.length)for(let o of e.children)this.propagateDown(o,n)}isSelected(e){return this.findIndexInSelection(e)!=-1}isSingleSelectionMode(){return this.selectionMode&&this.selectionMode=="single"}isMultipleSelectionMode(){return this.selectionMode&&this.selectionMode=="multiple"}isCheckboxSelectionMode(){return this.selectionMode&&this.selectionMode=="checkbox"}isNodeLeaf(e){return e.leaf==!1?!1:!(e.children&&e.children.length)}getRootNode(){return this.filteredNodes?this.filteredNodes:this.value}getTemplateForNode(e){return this._templateMap?e.type?this._templateMap[e.type]:this._templateMap.default:null}onDragOver(e){this.droppableNodes&&(!this.value||this.value.length===0)&&(e.dataTransfer.dropEffect="move",e.preventDefault())}onDrop(e){if(this.droppableNodes&&(!this.value||this.value.length===0)){e.preventDefault();let n=this.dragNode;if(this.allowDrop(n,null,this.dragNodeScope)){let i=this.dragNodeIndex;this.value=this.value||[],this.validateDrop?this.onNodeDrop.emit({originalEvent:e,dragNode:n,dropNode:null,index:i,accept:()=>{this.processTreeDrop(n,i)}}):(this.onNodeDrop.emit({originalEvent:e,dragNode:n,dropNode:null,index:i}),this.processTreeDrop(n,i))}}}processTreeDrop(e,n){this.dragNodeSubNodes.splice(n,1),this.value.push(e),this.dragDropService.stopDrag({node:e})}onDragEnter(){this.droppableNodes&&this.allowDrop(this.dragNode,null,this.dragNodeScope)&&(this.dragHover=!0)}onDragLeave(e){if(this.droppableNodes){let n=e.currentTarget.getBoundingClientRect();(e.x>n.left+n.width||e.x<n.left||e.y>n.top+n.height||e.y<n.top)&&(this.dragHover=!1)}}allowDrop(e,n,i){if(e)if(this.isValidDragScope(i)){let o=!0;if(n)if(e===n)o=!1;else{let r=n.parent;for(;r!=null;){if(r===e){o=!1;break}r=r.parent}}return o}else return!1;else return!1}isValidDragScope(e){let n=this.droppableScope;if(n){if(typeof n=="string"){if(typeof e=="string")return n===e;if(Array.isArray(e))return e.indexOf(n)!=-1}else if(Array.isArray(n)){if(typeof e=="string")return n.indexOf(e)!=-1;if(Array.isArray(e)){for(let i of n)for(let o of e)if(i===o)return!0}}return!1}else return!0}_filter(e){let n=e;if(n==="")this.filteredNodes=null;else{this.filteredNodes=[];let i=this.filterBy.split(","),o=fe(n).toLocaleLowerCase(this.filterLocale),r=this.filterMode==="strict";for(let p of this.value){let v=F({},p),M={searchFields:i,filterText:o,isStrictMode:r};(r&&(this.findFilteredNodes(v,M)||this.isFilterMatched(v,M))||!r&&(this.isFilterMatched(v,M)||this.findFilteredNodes(v,M)))&&this.filteredNodes.push(v)}}this.updateSerializedValue(),this.onFilter.emit({filter:n,filteredValue:this.filteredNodes})}resetFilter(){this.filteredNodes=null,this.filterViewChild&&this.filterViewChild.nativeElement&&(this.filterViewChild.nativeElement.value="")}scrollToVirtualIndex(e){this.virtualScroll&&this.scroller?.scrollToIndex(e)}scrollTo(e){this.virtualScroll?this.scroller?.scrollTo(e):this.wrapperViewChild&&this.wrapperViewChild.nativeElement&&(this.wrapperViewChild.nativeElement.scrollTo?this.wrapperViewChild.nativeElement.scrollTo(e):(this.wrapperViewChild.nativeElement.scrollLeft=e.left,this.wrapperViewChild.nativeElement.scrollTop=e.top))}findFilteredNodes(e,n){if(e){let i=!1;if(e.children){let o=[...e.children];e.children=[];for(let r of o){let p=F({},r);this.isFilterMatched(p,n)&&(i=!0,e.children.push(p))}}if(i)return e.expanded=!0,!0}}isFilterMatched(e,n){let{searchFields:i,filterText:o,isStrictMode:r}=n,p=!1;for(let v of i)fe(String(ke(e,v))).toLocaleLowerCase(this.filterLocale).indexOf(o)>-1&&(p=!0);return(!p||r&&!this.isNodeLeaf(e))&&(p=this.findFilteredNodes(e,{searchFields:i,filterText:o,isStrictMode:r})||p),p}getIndex(e,n){let i=e.getItemOptions;return i?i(n).index:n}getBlockableElement(){return this.el.nativeElement.children[0]}ngOnDestroy(){this.dragStartSubscription&&this.dragStartSubscription.unsubscribe(),this.dragStopSubscription&&this.dragStopSubscription.unsubscribe(),super.ngOnDestroy()}static \u0275fac=function(n){return new(n||t)(ve($e,8))};static \u0275cmp=P({type:t,selectors:[["p-tree"]],contentQueries:function(n,i,o){if(n&1&&(T(o,We,4),T(o,It,4),T(o,Et,4),T(o,kt,4),T(o,Vt,4),T(o,Dt,4),T(o,Mt,4),T(o,Ot,4),T(o,Ft,4),T(o,$t,4),T(o,se,4)),n&2){let r;_(r=h())&&(i.filterTemplate=r.first),_(r=h())&&(i.nodeTemplate=r.first),_(r=h())&&(i.headerTemplate=r.first),_(r=h())&&(i.footerTemplate=r.first),_(r=h())&&(i.loaderTemplate=r.first),_(r=h())&&(i.emptyMessageTemplate=r.first),_(r=h())&&(i.togglerIconTemplate=r.first),_(r=h())&&(i.checkboxIconTemplate=r.first),_(r=h())&&(i.loadingIconTemplate=r.first),_(r=h())&&(i.filterIconTemplate=r.first),_(r=h())&&(i.templates=r)}},viewQuery:function(n,i){if(n&1&&(E(We,5),E(Lt,5),E(zt,5)),n&2){let o;_(o=h())&&(i.filterViewChild=o.first),_(o=h())&&(i.scroller=o.first),_(o=h())&&(i.wrapperViewChild=o.first)}},inputs:{value:"value",selectionMode:"selectionMode",loadingMode:"loadingMode",selection:"selection",style:"style",styleClass:"styleClass",contextMenu:"contextMenu",draggableScope:"draggableScope",droppableScope:"droppableScope",draggableNodes:[2,"draggableNodes","draggableNodes",y],droppableNodes:[2,"droppableNodes","droppableNodes",y],metaKeySelection:[2,"metaKeySelection","metaKeySelection",y],propagateSelectionUp:[2,"propagateSelectionUp","propagateSelectionUp",y],propagateSelectionDown:[2,"propagateSelectionDown","propagateSelectionDown",y],loading:[2,"loading","loading",y],loadingIcon:"loadingIcon",emptyMessage:"emptyMessage",ariaLabel:"ariaLabel",togglerAriaLabel:"togglerAriaLabel",ariaLabelledBy:"ariaLabelledBy",validateDrop:[2,"validateDrop","validateDrop",y],filter:[2,"filter","filter",y],filterBy:"filterBy",filterMode:"filterMode",filterOptions:"filterOptions",filterPlaceholder:"filterPlaceholder",filteredNodes:"filteredNodes",filterLocale:"filterLocale",scrollHeight:"scrollHeight",lazy:[2,"lazy","lazy",y],virtualScroll:[2,"virtualScroll","virtualScroll",y],virtualScrollItemSize:[2,"virtualScrollItemSize","virtualScrollItemSize",z],virtualScrollOptions:"virtualScrollOptions",indentation:[2,"indentation","indentation",z],_templateMap:"_templateMap",trackBy:"trackBy",highlightOnSelect:[2,"highlightOnSelect","highlightOnSelect",y],virtualNodeHeight:"virtualNodeHeight"},outputs:{selectionChange:"selectionChange",onNodeSelect:"onNodeSelect",onNodeUnselect:"onNodeUnselect",onNodeExpand:"onNodeExpand",onNodeCollapse:"onNodeCollapse",onNodeContextMenuSelect:"onNodeContextMenuSelect",onNodeDoubleClick:"onNodeDoubleClick",onNodeDrop:"onNodeDrop",onLazyLoad:"onLazyLoad",onScroll:"onScroll",onScrollIndexChange:"onScrollIndexChange",onFilter:"onFilter"},features:[le([Ge]),q,H,xe],decls:8,vars:10,consts:[["filter",""],["scroller",""],["content",""],["treeNode",""],["loader",""],["wrapper",""],["emptyFilter",""],[3,"drop","dragover","dragenter","dragleave","ngClass","ngStyle"],["class","p-tree-mask p-overlay-mask",4,"ngIf"],[4,"ngTemplateOutlet"],[4,"ngIf"],["class","p-tree-empty-message",4,"ngIf"],[1,"p-tree-mask","p-overlay-mask"],[3,"class",4,"ngIf"],[3,"spin","styleClass",4,"ngIf"],["class","p-tree-loading-icon",4,"ngIf"],[3,"spin","styleClass"],[1,"p-tree-loading-icon"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["pInputText","","type","search","autocomplete","off",1,"p-tree-filter-input",3,"keydown.enter","input"],["class","p-tree-filter-icon",4,"ngIf"],[1,"p-tree-filter-icon"],["styleClass","p-tree-root",3,"items","tabindex","style","scrollHeight","itemSize","lazy","options","onScroll","onScrollIndexChange","onLazyLoad",4,"ngIf"],["styleClass","p-tree-root",3,"onScroll","onScrollIndexChange","onLazyLoad","items","tabindex","scrollHeight","itemSize","lazy","options"],["class","p-tree-root-children","role","tree",3,"ngClass","style",4,"ngIf"],["role","tree",1,"p-tree-root-children",3,"ngClass"],[3,"level","rowNode","node","parentNode","firstChild","lastChild","index","itemSize","indentation","loadingMode",4,"ngFor","ngForOf","ngForTrackBy"],[3,"level","rowNode","node","parentNode","firstChild","lastChild","index","itemSize","indentation","loadingMode"],[1,"p-tree-root"],["class","p-tree-root-children","role","tree",4,"ngIf"],["role","tree",1,"p-tree-root-children"],[3,"node","firstChild","lastChild","index","level","loadingMode",4,"ngFor","ngForOf","ngForTrackBy"],[3,"node","firstChild","lastChild","index","level","loadingMode"],[1,"p-tree-empty-message"],[4,"ngIf","ngIfElse"]],template:function(n,i){if(n&1&&(f(0,"div",7),x("drop",function(r){return i.onDrop(r)})("dragover",function(r){return i.onDragOver(r)})("dragenter",function(){return i.onDragEnter()})("dragleave",function(r){return i.onDragLeave(r)}),d(1,qt,3,2,"div",8)(2,Kt,1,0,"ng-container",9)(3,Wt,1,4,"ng-container")(4,ei,1,1,"p-iconField")(5,pi,3,2,"ng-container",10)(6,hi,3,3,"div",11)(7,fi,1,0,"ng-container",9),m()),n&2){let o;O(i.styleClass),a("ngClass",i.containerClass)("ngStyle",i.style),c(),a("ngIf",i.loading&&i.loadingMode==="mask"),c(),a("ngTemplateOutlet",i.headerTemplate||i._headerTemplate),c(),ue(i.filterTemplate||i._filterTemplate?3:4),c(2),a("ngIf",(o=i.getRootNode())==null?null:o.length),c(),a("ngIf",!i.loading&&(i.getRootNode()==null||i.getRootNode().length===0)),c(),a("ngTemplateOutlet",i.footerTemplate||i._footerTemplate)}},dependencies:[J,K,j,W,Y,G,Ke,U,Ae,ye,Ue,_e,Le,ze,Ti],encapsulation:2})}return t})();var bi=["value"],xi=["header"],vi=["empty"],Si=["footer"],Ci=["clearicon"],Ni=["triggericon"],wi=["dropdownicon"],Ii=["filtericon"],Ei=["closeicon"],ki=["itemtogglericon"],Vi=["itemcheckboxicon"],Di=["itemloadingicon"],Mi=["container"],Oi=["focusInput"],Fi=["filter"],$i=["tree"],Li=["panel"],zi=["overlay"],Ui=["firstHiddenFocusableEl"],Ri=["lastHiddenFocusableEl"],Qi=(t,l)=>({$implicit:t,placeholder:l}),Xe=(t,l)=>({$implicit:t,options:l}),Ai=t=>({"max-height":t}),Bi=t=>({$implicit:t}),Pi=(t,l)=>({$implicit:t,partialSelected:l});function Hi(t,l){t&1&&I(0)}function qi(t,l){if(t&1&&(S(0),d(1,Hi,1,0,"ng-container",25),C()),t&2){let e=s();c(),a("ngTemplateOutlet",e.valueTemplate||e._valueTemplate)("ngTemplateOutletContext",L(2,Qi,e.value,e.placeholder))}}function Ki(t,l){if(t&1&&(S(0),Q(1),C()),t&2){let e=s(2);c(),re(" ",e.label||"empty"," ")}}function ji(t,l){if(t&1&&(f(0,"div",27),w(1,"p-chip",28),m()),t&2){let e=l.$implicit;c(),a("label",e.label)}}function Wi(t,l){if(t&1&&(S(0),Q(1),C()),t&2){let e=s(3);c(),oe(e.placeholder||"empty")}}function Gi(t,l){if(t&1&&d(0,ji,2,1,"div",26)(1,Wi,2,1,"ng-container",20),t&2){let e=s(2);a("ngForOf",e.value),c(),a("ngIf",e.emptyValue)}}function Yi(t,l){if(t&1&&d(0,Ki,2,1,"ng-container",19)(1,Gi,2,2,"ng-template",null,5,k),t&2){let e=ge(2),n=s();a("ngIf",n.display==="comma")("ngIfElse",e)}}function Ji(t,l){if(t&1){let e=V();f(0,"TimesIcon",31),x("click",function(i){u(e);let o=s(2);return g(o.clear(i))}),m()}t&2&&O("p-treeselect-clear-icon")}function Xi(t,l){}function Zi(t,l){t&1&&d(0,Xi,0,0,"ng-template")}function en(t,l){if(t&1){let e=V();f(0,"span",32),x("click",function(i){u(e);let o=s(2);return g(o.clear(i))}),d(1,Zi,1,0,null,33),m()}if(t&2){let e=s(2);c(),a("ngTemplateOutlet",e.clearIconTemplate||e._clearIconTemplate)}}function tn(t,l){if(t&1&&(S(0),d(1,Ji,1,2,"TimesIcon",29)(2,en,2,1,"span",30),C()),t&2){let e=s();c(),a("ngIf",!e.clearIconTemplate&&!e._clearIconTemplate),c(),a("ngIf",e.clearIconTemplate||e.clearIconTemplate)}}function nn(t,l){t&1&&w(0,"ChevronDownIcon",34),t&2&&a("styleClass","p-treeselect-dropdown-icon")}function on(t,l){}function rn(t,l){t&1&&d(0,on,0,0,"ng-template")}function ln(t,l){if(t&1&&(f(0,"span",35),d(1,rn,1,0,null,33),m()),t&2){let e=s();c(),a("ngTemplateOutlet",e.triggerIconTemplate||e._triggerIconTemplate||e.dropdownIconTemplate||e._dropdownIconTemplate)}}function an(t,l){t&1&&I(0)}function sn(t,l){t&1&&I(0)}function cn(t,l){if(t&1&&d(0,sn,1,0,"ng-container",33),t&2){let e=s(3);a("ngTemplateOutlet",e.emptyTemplate||e._emptyTemplate)}}function dn(t,l){t&1&&(S(0),d(1,cn,1,1,"ng-template",null,10,k),C())}function pn(t,l){t&1&&I(0)}function un(t,l){if(t&1&&d(0,pn,1,0,"ng-container",25),t&2){let e=l.$implicit,n=s(3);a("ngTemplateOutlet",n.itemTogglerIconTemplate||n._itemTogglerIconTemplate)("ngTemplateOutletContext",D(2,Bi,e))}}function gn(t,l){t&1&&d(0,un,1,4,"ng-template",null,11,k)}function _n(t,l){t&1&&I(0)}function hn(t,l){if(t&1&&d(0,_n,1,0,"ng-container",25),t&2){let e=l.$implicit,n=l.partialSelected,i=s(3);a("ngTemplateOutlet",i.itemCheckboxIconTemplate||i._itemCheckboxIconTemplate)("ngTemplateOutletContext",L(2,Pi,e,n))}}function fn(t,l){t&1&&d(0,hn,1,5,"ng-template",null,12,k)}function mn(t,l){t&1&&I(0)}function yn(t,l){if(t&1&&d(0,mn,1,0,"ng-container",33),t&2){let e=s(3);a("ngTemplateOutlet",e.itemLoadingIconTemplate||e._itemLoadingIconTemplate)}}function Tn(t,l){t&1&&d(0,yn,1,1,"ng-template",null,13,k)}function bn(t,l){t&1&&I(0)}function xn(t,l){if(t&1){let e=V();f(0,"div",36,6)(2,"span",37,7),x("focus",function(i){u(e);let o=s();return g(o.onFirstHiddenFocus(i))}),m(),d(4,an,1,0,"ng-container",25),f(5,"div",38)(6,"p-tree",39,8),x("selectionChange",function(i){u(e);let o=s();return g(o.onSelectionChange(i))})("onNodeExpand",function(i){u(e);let o=s();return g(o.nodeExpand(i))})("onNodeCollapse",function(i){u(e);let o=s();return g(o.nodeCollapse(i))})("onNodeSelect",function(i){u(e);let o=s();return g(o.onSelect(i))})("onNodeUnselect",function(i){u(e);let o=s();return g(o.onUnselect(i))}),d(8,dn,3,0,"ng-container",20)(9,gn,2,0,null,20)(10,fn,2,0,null,20)(11,Tn,2,0,null,20),m()(),d(12,bn,1,0,"ng-container",25),f(13,"span",37,9),x("focus",function(i){u(e);let o=s();return g(o.onLastHiddenFocus(i))}),m()()}if(t&2){let e=s();O(e.panelStyleClass),a("ngStyle",e.panelStyle)("ngClass",e.panelClass),N("id",e.listId),c(2),N("tabindex",0)("data-p-hidden-accessible",!0)("data-p-hidden-focusable",!0),c(2),a("ngTemplateOutlet",e.headerTemplate||e._headerTemplate)("ngTemplateOutletContext",L(38,Xe,e.value,e.options)),c(),a("ngStyle",D(41,Ai,e.scrollHeight)),c(),a("value",e.options)("propagateSelectionDown",e.propagateSelectionDown)("propagateSelectionUp",e.propagateSelectionUp)("selectionMode",e.selectionMode)("selection",e.value)("metaKeySelection",e.metaKeySelection)("emptyMessage",e.emptyMessage)("filter",e.filter)("filterBy",e.filterBy)("filterMode",e.filterMode)("filterPlaceholder",e.filterPlaceholder)("filterLocale",e.filterLocale)("filteredNodes",e.filteredNodes)("virtualScroll",e.virtualScroll)("virtualScrollItemSize",e.virtualScrollItemSize)("virtualScrollOptions",e.virtualScrollOptions)("_templateMap",e.templateMap)("loading",e.loading),c(2),a("ngIf",e.emptyTemplate||e._emptyTemplate),c(),a("ngIf",e.itemTogglerIconTemplate||e._itemTogglerIconTemplate),c(),a("ngIf",e.itemCheckboxIconTemplate||e._itemCheckboxIconTemplate),c(),a("ngIf",e.itemLoadingIconTemplate||e._itemLoadingIconTemplate),c(),a("ngTemplateOutlet",e.footerTemplate)("ngTemplateOutletContext",L(43,Xe,e.value,e.options)),c(),N("tabindex",0)("data-p-hidden-accessible",!0)("data-p-hidden-focusable",!0)}}var vn=({dt:t})=>`
223
+ `,yi={root:({instance:t})=>({"p-tree p-component":!0,"p-tree-selectable":t.selectionMode!=null,"p-tree-loading":t.loading,"p-tree-flex-scrollable":t.scrollHeight==="flex","p-tree-node-dragover":t.dragHover}),mask:"p-tree-mask p-overlay-mask",loadingIcon:"p-tree-loading-icon",pcFilterInput:"p-tree-filter-input",wrapper:"p-tree-root",rootChildren:"p-tree-root-children",node:({instance:t})=>({"p-tree-node":!0,"p-tree-node-leaf":t.isLeaf()}),nodeContent:({instance:t})=>({"p-tree-node-content":!0,[t.styleClass]:!!t.styleClass,"p-tree-node-selectable":t.selectable,"p-tree-node-dragover":t.draghoverNode,"p-tree-node-selected":t.selectionMode==="checkbox"&&t.tree.highlightOnSelect?t.checked:t.selected}),nodeToggleButton:"p-tree-node-toggle-button",nodeToggleIcon:"p-tree-node-toggle-icon",nodeCheckbox:"p-tree-node-checkbox",nodeIcon:"p-tree-node-icon",nodeLabel:"p-tree-node-label",nodeChildren:"p-tree-node-children"},Ge=(()=>{class t extends se{name="tree";theme=mi;classes=yi;static \u0275fac=(()=>{let e;return function(i){return(e||(e=R(t)))(i||t)}})();static \u0275prov=te({token:t,factory:t.\u0275fac})}return t})();var Ti=(()=>{class t extends Z{static ICON_CLASS="p-tree-node-icon ";rowNode;node;parentNode;root;index;firstChild;lastChild;level;indentation;itemSize;loadingMode;tree=B(ee(()=>be));timeout;draghoverPrev;draghoverNext;draghoverNode;get selected(){return this.tree.selectionMode==="single"||this.tree.selectionMode==="multiple"?this.isSelected():void 0}get checked(){return this.tree.selectionMode==="checkbox"?this.isSelected():void 0}get nodeClass(){return this.tree._componentStyle.classes.node({instance:this})}get nodeContentClass(){return this.tree._componentStyle.classes.nodeContent({instance:this})}get selectable(){return this.node.selectable===!1?!1:this.tree.selectionMode!=null}ngOnInit(){super.ngOnInit(),this.node.parent=this.parentNode;let n=this.tree.el.nativeElement.closest("p-dialog");this.parentNode&&!n&&(this.setAllNodesTabIndexes(),this.tree.syncNodeOption(this.node,this.tree.value,"parent",this.tree.getNodeWithKey(this.parentNode.key,this.tree.value)))}getIcon(){let e;return this.node.icon?e=this.node.icon:e=this.node.expanded&&this.node.children&&this.node.children?.length?this.node.expandedIcon:this.node.collapsedIcon,t.ICON_CLASS+" "+e+" p-tree-node-icon"}isLeaf(){return this.tree.isNodeLeaf(this.node)}toggle(e){this.node.expanded?this.collapse(e):this.expand(e),e.stopPropagation()}expand(e){this.node.expanded=!0,this.tree.virtualScroll&&(this.tree.updateSerializedValue(),this.focusVirtualNode()),this.tree.onNodeExpand.emit({originalEvent:e,node:this.node})}collapse(e){this.node.expanded=!1,this.tree.virtualScroll&&(this.tree.updateSerializedValue(),this.focusVirtualNode()),this.tree.onNodeCollapse.emit({originalEvent:e,node:this.node})}onNodeClick(e){this.tree.onNodeClick(e,this.node)}onNodeKeydown(e){e.key==="Enter"&&this.tree.onNodeClick(e,this.node)}onNodeTouchEnd(){this.tree.onNodeTouchEnd()}onNodeRightClick(e){this.tree.onNodeRightClick(e,this.node)}onNodeDblClick(e){this.tree.onNodeDblClick(e,this.node)}isSelected(){return this.tree.isSelected(this.node)}isSameNode(e){return e.currentTarget&&(e.currentTarget.isSameNode(e.target)||e.currentTarget.isSameNode(e.target.closest('[role="treeitem"]')))}onDropPoint(e,n){e.preventDefault();let i=this.tree.dragNode,o=this.tree.dragNodeIndex,r=this.tree.dragNodeScope,p=this.tree.dragNodeTree===this.tree?n===1||o!==this.index-1:!0;if(this.tree.allowDrop(i,this.node,r)&&p){let v=F({},this.createDropPointEventMetadata(n));this.tree.validateDrop?this.tree.onNodeDrop.emit({originalEvent:e,dragNode:i,dropNode:this.node,index:this.index,accept:()=>{this.processPointDrop(v)}}):(this.processPointDrop(v),this.tree.onNodeDrop.emit({originalEvent:e,dragNode:i,dropNode:this.node,index:this.index}))}this.draghoverPrev=!1,this.draghoverNext=!1}processPointDrop(e){let n=e.dropNode.parent?e.dropNode.parent.children:this.tree.value;e.dragNodeSubNodes.splice(e.dragNodeIndex,1);let i=this.index;e.position<0?(i=e.dragNodeSubNodes===n?e.dragNodeIndex>e.index?e.index:e.index-1:e.index,n.splice(i,0,e.dragNode)):(i=n.length,n.push(e.dragNode)),this.tree.dragDropService.stopDrag({node:e.dragNode,subNodes:e.dropNode.parent?e.dropNode.parent.children:this.tree.value,index:e.dragNodeIndex})}createDropPointEventMetadata(e){return{dragNode:this.tree.dragNode,dragNodeIndex:this.tree.dragNodeIndex,dragNodeSubNodes:this.tree.dragNodeSubNodes,dropNode:this.node,index:this.index,position:e}}onDropPointDragOver(e){e.dataTransfer.dropEffect="move",e.preventDefault()}onDropPointDragEnter(e,n){this.tree.allowDrop(this.tree.dragNode,this.node,this.tree.dragNodeScope)&&(n<0?this.draghoverPrev=!0:this.draghoverNext=!0)}onDropPointDragLeave(e){this.draghoverPrev=!1,this.draghoverNext=!1}onDragStart(e){this.tree.draggableNodes&&this.node.draggable!==!1?(e.dataTransfer.setData("text","data"),this.tree.dragDropService.startDrag({tree:this,node:this.node,subNodes:this.node?.parent?this.node.parent.children:this.tree.value,index:this.index,scope:this.tree.draggableScope})):e.preventDefault()}onDragStop(e){this.tree.dragDropService.stopDrag({node:this.node,subNodes:this.node?.parent?this.node.parent.children:this.tree.value,index:this.index})}onDropNodeDragOver(e){e.dataTransfer.dropEffect="move",this.tree.droppableNodes&&(e.preventDefault(),e.stopPropagation())}onDropNode(e){if(this.tree.droppableNodes&&this.node?.droppable!==!1){let n=this.tree.dragNode;if(this.tree.allowDrop(n,this.node,this.tree.dragNodeScope)){let i=F({},this.createDropNodeEventMetadata());this.tree.validateDrop?this.tree.onNodeDrop.emit({originalEvent:e,dragNode:n,dropNode:this.node,index:this.index,accept:()=>{this.processNodeDrop(i)}}):(this.processNodeDrop(i),this.tree.onNodeDrop.emit({originalEvent:e,dragNode:n,dropNode:this.node,index:this.index}))}}e.preventDefault(),e.stopPropagation(),this.draghoverNode=!1}createDropNodeEventMetadata(){return{dragNode:this.tree.dragNode,dragNodeIndex:this.tree.dragNodeIndex,dragNodeSubNodes:this.tree.dragNodeSubNodes,dropNode:this.node}}processNodeDrop(e){let n=e.dragNodeIndex;e.dragNodeSubNodes.splice(n,1),e.dropNode.children?e.dropNode.children.push(e.dragNode):e.dropNode.children=[e.dragNode],this.tree.dragDropService.stopDrag({node:e.dragNode,subNodes:e.dropNode.parent?e.dropNode.parent.children:this.tree.value,index:n})}onDropNodeDragEnter(e){this.tree.droppableNodes&&this.node?.droppable!==!1&&this.tree.allowDrop(this.tree.dragNode,this.node,this.tree.dragNodeScope)&&(this.draghoverNode=!0)}onDropNodeDragLeave(e){if(this.tree.droppableNodes){let n=e.currentTarget.getBoundingClientRect();(e.x>n.left+n.width||e.x<n.left||e.y>=Math.floor(n.top+n.height)||e.y<n.top)&&(this.draghoverNode=!1)}}onKeyDown(e){if(!(!this.isSameNode(e)||this.tree.contextMenu&&this.tree.contextMenu.containerViewChild?.nativeElement.style.display==="block"))switch(e.code){case"ArrowDown":this.onArrowDown(e);break;case"ArrowUp":this.onArrowUp(e);break;case"ArrowRight":this.onArrowRight(e);break;case"ArrowLeft":this.onArrowLeft(e);break;case"Enter":case"Space":case"NumpadEnter":this.onEnter(e);break;case"Tab":this.setAllNodesTabIndexes();break;default:break}}onArrowUp(e){let n=e.target.getAttribute("data-pc-section")==="toggler"?e.target.closest('[role="treeitem"]'):e.target.parentElement;if(n.previousElementSibling)this.focusRowChange(n,n.previousElementSibling,this.findLastVisibleDescendant(n.previousElementSibling));else{let i=this.getParentNodeElement(n);i&&this.focusRowChange(n,i)}e.preventDefault()}onArrowDown(e){let n=e.target.getAttribute("data-pc-section")==="toggler"?e.target.closest('[role="treeitem"]'):e.target,i=n.children[1];if(i&&i.children.length>0)this.focusRowChange(n,i.children[0]);else if(n.parentElement.nextElementSibling)this.focusRowChange(n,n.parentElement.nextElementSibling);else{let o=this.findNextSiblingOfAncestor(n.parentElement);o&&this.focusRowChange(n,o)}e.preventDefault()}onArrowRight(e){!this.node?.expanded&&!this.tree.isNodeLeaf(this.node)&&(this.expand(e),e.currentTarget.tabIndex=-1,setTimeout(()=>{this.onArrowDown(e)},1)),e.preventDefault()}onArrowLeft(e){let n=e.target.getAttribute("data-pc-section")==="toggler"?e.target.closest('[role="treeitem"]'):e.target;if(this.level===0&&!this.node?.expanded)return!1;if(this.node?.expanded){this.collapse(e);return}let i=this.getParentNodeElement(n.parentElement);i&&this.focusRowChange(e.currentTarget,i),e.preventDefault()}onEnter(e){this.tree.onNodeClick(e,this.node),this.setTabIndexForSelectionMode(e,this.tree.nodeTouched),e.preventDefault()}setAllNodesTabIndexes(){let e=he(this.tree.el.nativeElement,".p-tree-node"),n=[...e].some(i=>i.getAttribute("aria-selected")==="true"||i.getAttribute("aria-checked")==="true");if([...e].forEach(i=>{i.tabIndex=-1}),n){let i=[...e].filter(o=>o.getAttribute("aria-selected")==="true"||o.getAttribute("aria-checked")==="true");i[0].tabIndex=0;return}e.length&&([...e][0].tabIndex=0)}setTabIndexForSelectionMode(e,n){if(this.tree.selectionMode!==null){let i=[...he(this.tree.el.nativeElement,'[role="treeitem"]')];e.currentTarget.tabIndex=n===!1?-1:0,i.every(o=>o.tabIndex===-1)&&(i[0].tabIndex=0)}}findNextSiblingOfAncestor(e){let n=this.getParentNodeElement(e);return n?n.nextElementSibling?n.nextElementSibling:this.findNextSiblingOfAncestor(n):null}findLastVisibleDescendant(e){let i=Array.from(e.children).find(o=>$(o,"p-tree-node"))?.children[1];if(i&&i.children.length>0){let o=i.children[i.children.length-1];return this.findLastVisibleDescendant(o)}else return e}getParentNodeElement(e){let n=e.parentElement?.parentElement?.parentElement;return n?.tagName==="P-TREENODE"?n:null}focusNode(e){this.tree.droppableNodes?e.children[1].focus():e.children[0].focus()}focusRowChange(e,n,i){e.tabIndex="-1",n.children[0].tabIndex="0",this.focusNode(i||n)}focusVirtualNode(){this.timeout=setTimeout(()=>{let e=ke(document.body,`[data-id="${this.node?.key??this.node?.data}"]`);A(e)},1)}static \u0275fac=(()=>{let e;return function(i){return(e||(e=R(t)))(i||t)}})();static \u0275cmp=P({type:t,selectors:[["p-treeNode"]],inputs:{rowNode:"rowNode",node:"node",parentNode:"parentNode",root:[2,"root","root",y],index:[2,"index","index",z],firstChild:[2,"firstChild","firstChild",y],lastChild:[2,"lastChild","lastChild",y],level:[2,"level","level",z],indentation:[2,"indentation","indentation",z],itemSize:[2,"itemSize","itemSize",z],loadingMode:"loadingMode"},features:[q,H],decls:1,vars:1,consts:[["icon",""],["class","p-tree-node-droppoint",3,"ngClass","drop","dragover","dragenter","dragleave",4,"ngIf"],["role","treeitem",3,"keydown","ngClass","ngStyle"],[3,"click","contextmenu","dblclick","touchend","drop","dragover","dragenter","dragleave","dragstart","dragend","ngClass","draggable"],["type","button","pRipple","","tabindex","-1",1,"p-tree-node-toggle-button",3,"click"],[4,"ngIf"],["class","p-tree-node-toggle-icon",4,"ngIf"],["styleClass","p-tree-node-checkbox",3,"ngModel","binary","indeterminate","disabled","variant","tabindex","click",4,"ngIf"],[3,"class",4,"ngIf"],[1,"p-tree-node-label"],["class","p-tree-node-children","style","display: none;","role","group",3,"display",4,"ngIf"],[1,"p-tree-node-droppoint",3,"drop","dragover","dragenter","dragleave","ngClass"],[3,"styleClass",4,"ngIf"],[3,"styleClass"],[1,"p-tree-node-toggle-icon"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["styleClass","p-tree-node-checkbox",3,"click","ngModel","binary","indeterminate","disabled","variant","tabindex"],["role","group",1,"p-tree-node-children",2,"display","none"],[3,"node","parentNode","firstChild","lastChild","index","itemSize","level","loadingMode",4,"ngFor","ngForOf","ngForTrackBy"],[3,"node","parentNode","firstChild","lastChild","index","itemSize","level","loadingMode"]],template:function(n,i){n&1&&d(0,wt,13,31),n&2&&ue(i.node?0:-1)},dependencies:[t,J,K,j,W,Y,G,Pe,Re,_e,Ie,Ee,Le,ce,ye,U],encapsulation:2})}return t})(),be=(()=>{class t extends Z{dragDropService;value;selectionMode;loadingMode="mask";selection;style;styleClass;contextMenu;draggableScope;droppableScope;draggableNodes;droppableNodes;metaKeySelection=!1;propagateSelectionUp=!0;propagateSelectionDown=!0;loading;loadingIcon;emptyMessage="";ariaLabel;togglerAriaLabel;ariaLabelledBy;validateDrop;filter;filterBy="label";filterMode="lenient";filterOptions;filterPlaceholder;filteredNodes;filterLocale;scrollHeight;lazy=!1;virtualScroll;virtualScrollItemSize;virtualScrollOptions;indentation=1.5;_templateMap;trackBy=(e,n)=>n;highlightOnSelect=!1;_virtualNodeHeight;get virtualNodeHeight(){return this._virtualNodeHeight}set virtualNodeHeight(e){this._virtualNodeHeight=e,console.log("The virtualNodeHeight property is deprecated, use virtualScrollItemSize property instead.")}selectionChange=new b;onNodeSelect=new b;onNodeUnselect=new b;onNodeExpand=new b;onNodeCollapse=new b;onNodeContextMenuSelect=new b;onNodeDoubleClick=new b;onNodeDrop=new b;onLazyLoad=new b;onScroll=new b;onScrollIndexChange=new b;onFilter=new b;filterTemplate;nodeTemplate;headerTemplate;footerTemplate;loaderTemplate;emptyMessageTemplate;togglerIconTemplate;checkboxIconTemplate;loadingIconTemplate;filterIconTemplate;filterViewChild;scroller;wrapperViewChild;templates;_headerTemplate;_emptyMessageTemplate;_footerTemplate;_loaderTemplate;_togglerIconTemplate;_checkboxIconTemplate;_loadingIconTemplate;_filterIconTemplate;_filterTemplate;ngAfterContentInit(){this.templates.length&&(this._templateMap={}),this.templates.forEach(e=>{switch(e.getType()){case"header":this._headerTemplate=e.template;break;case"empty":this._emptyMessageTemplate=e.template;break;case"footer":this._footerTemplate=e.template;break;case"loader":this._loaderTemplate=e.template;break;case"togglericon":this._togglerIconTemplate=e.template;break;case"checkboxicon":this._checkboxIconTemplate=e.template;break;case"loadingicon":this._loadingIconTemplate=e.template;break;case"filtericon":this._filterIconTemplate=e.template;break;case"filter":this._filterTemplate=e.template;break;default:this._templateMap[e.name]=e.template;break}})}serializedValue;nodeTouched;dragNodeTree;dragNode;dragNodeSubNodes;dragNodeIndex;dragNodeScope;dragHover;dragStartSubscription;dragStopSubscription;_componentStyle=B(Ge);constructor(e){super(),this.dragDropService=e}ngOnInit(){super.ngOnInit(),this.filterBy&&(this.filterOptions={filter:e=>this._filter(e),reset:()=>this.resetFilter()}),this.droppableNodes&&(this.dragStartSubscription=this.dragDropService.dragStart$.subscribe(e=>{this.dragNodeTree=e.tree,this.dragNode=e.node,this.dragNodeSubNodes=e.subNodes,this.dragNodeIndex=e.index,this.dragNodeScope=e.scope}),this.dragStopSubscription=this.dragDropService.dragStop$.subscribe(e=>{this.dragNodeTree=null,this.dragNode=null,this.dragNodeSubNodes=null,this.dragNodeIndex=null,this.dragNodeScope=null,this.dragHover=!1}))}ngOnChanges(e){super.ngOnChanges(e),e.value&&(this.updateSerializedValue(),this.hasFilterActive()&&this._filter(this.filterViewChild.nativeElement.value))}get containerClass(){return this._componentStyle.classes.root({instance:this})}get emptyMessageLabel(){return this.emptyMessage||this.config.getTranslation(Fe.EMPTY_MESSAGE)}updateSerializedValue(){this.serializedValue=[],this.serializeNodes(null,this.getRootNode(),0,!0)}serializeNodes(e,n,i,o){if(n&&n.length)for(let r of n){r.parent=e;let p={node:r,parent:e,level:i,visible:o&&(e?e.expanded:!0)};this.serializedValue.push(p),p.visible&&r.expanded&&this.serializeNodes(r,r.children,i+1,p.visible)}}onNodeClick(e,n){let i=e.target;if(!($(i,"p-tree-toggler")||$(i,"p-tree-toggler-icon"))){if(this.selectionMode){if(n.selectable===!1){n.style="--p-focus-ring-color: none;";return}else n.style?.includes("--p-focus-ring-color")||(n.style=n.style?`${n.style}--p-focus-ring-color: var(--primary-color)`:"--p-focus-ring-color: var(--primary-color)");if(this.hasFilteredNodes()&&(n=this.getNodeWithKey(n.key,this.filteredNodes),!n))return;let o=this.findIndexInSelection(n),r=o>=0;if(this.isCheckboxSelectionMode())r?(this.propagateSelectionDown?this.propagateDown(n,!1):this.selection=this.selection.filter((p,v)=>v!=o),this.propagateSelectionUp&&n.parent&&this.propagateUp(n.parent,!1),this.selectionChange.emit(this.selection),this.onNodeUnselect.emit({originalEvent:e,node:n})):(this.propagateSelectionDown?this.propagateDown(n,!0):this.selection=[...this.selection||[],n],this.propagateSelectionUp&&n.parent&&this.propagateUp(n.parent,!0),this.selectionChange.emit(this.selection),this.onNodeSelect.emit({originalEvent:e,node:n}));else if(this.nodeTouched?!1:this.metaKeySelection){let v=e.metaKey||e.ctrlKey;r&&v?(this.isSingleSelectionMode()?this.selectionChange.emit(null):(this.selection=this.selection.filter((M,tt)=>tt!=o),this.selectionChange.emit(this.selection)),this.onNodeUnselect.emit({originalEvent:e,node:n})):(this.isSingleSelectionMode()?this.selectionChange.emit(n):this.isMultipleSelectionMode()&&(this.selection=v?this.selection||[]:[],this.selection=[...this.selection,n],this.selectionChange.emit(this.selection)),this.onNodeSelect.emit({originalEvent:e,node:n}))}else this.isSingleSelectionMode()?r?(this.selection=null,this.onNodeUnselect.emit({originalEvent:e,node:n})):(this.selection=n,setTimeout(()=>{this.onNodeSelect.emit({originalEvent:e,node:n})})):r?(this.selection=this.selection.filter((v,M)=>M!=o),this.onNodeUnselect.emit({originalEvent:e,node:n})):(this.selection=[...this.selection||[],n],setTimeout(()=>{this.onNodeSelect.emit({originalEvent:e,node:n})})),this.selectionChange.emit(this.selection)}this.nodeTouched=!1}}onNodeTouchEnd(){this.nodeTouched=!0}onNodeRightClick(e,n){if(this.contextMenu){let i=e.target;if(i.className&&i.className.indexOf("p-tree-toggler")===0)return;this.findIndexInSelection(n)>=0||(this.isSingleSelectionMode()?this.selectionChange.emit(n):this.selectionChange.emit([n])),this.contextMenu.show(e),this.onNodeContextMenuSelect.emit({originalEvent:e,node:n})}}onNodeDblClick(e,n){this.onNodeDoubleClick.emit({originalEvent:e,node:n})}findIndexInSelection(e){let n=-1;if(this.selectionMode&&this.selection)if(this.isSingleSelectionMode())n=this.selection.key&&this.selection.key===e.key||this.selection==e?0:-1;else for(let i=0;i<this.selection.length;i++){let o=this.selection[i];if(o.key&&o.key===e.key||o==e){n=i;break}}return n}syncNodeOption(e,n,i,o){let r=this.hasFilteredNodes()?this.getNodeWithKey(e.key,n):null;r&&(r[i]=o||e[i])}hasFilteredNodes(){return this.filter&&this.filteredNodes&&this.filteredNodes.length}hasFilterActive(){return this.filter&&this.filterViewChild?.nativeElement?.value.length>0}getNodeWithKey(e,n){for(let i of n){if(i.key===e)return i;if(i.children){let o=this.getNodeWithKey(e,i.children);if(o)return o}}}propagateUp(e,n){if(e.children&&e.children.length){let o=0,r=!1;for(let p of e.children)this.isSelected(p)?o++:p.partialSelected&&(r=!0);if(n&&o==e.children.length)this.selection=[...this.selection||[],e],e.partialSelected=!1;else{if(!n){let p=this.findIndexInSelection(e);p>=0&&(this.selection=this.selection.filter((v,M)=>M!=p))}r||o>0&&o!=e.children.length?e.partialSelected=!0:e.partialSelected=!1}this.syncNodeOption(e,this.filteredNodes,"partialSelected")}let i=e.parent;i&&this.propagateUp(i,n)}propagateDown(e,n){let i=this.findIndexInSelection(e);if(n&&i==-1?this.selection=[...this.selection||[],e]:!n&&i>-1&&(this.selection=this.selection.filter((o,r)=>r!=i)),e.partialSelected=!1,this.syncNodeOption(e,this.filteredNodes,"partialSelected"),e.children&&e.children.length)for(let o of e.children)this.propagateDown(o,n)}isSelected(e){return this.findIndexInSelection(e)!=-1}isSingleSelectionMode(){return this.selectionMode&&this.selectionMode=="single"}isMultipleSelectionMode(){return this.selectionMode&&this.selectionMode=="multiple"}isCheckboxSelectionMode(){return this.selectionMode&&this.selectionMode=="checkbox"}isNodeLeaf(e){return e.leaf==!1?!1:!(e.children&&e.children.length)}getRootNode(){return this.filteredNodes?this.filteredNodes:this.value}getTemplateForNode(e){return this._templateMap?e.type?this._templateMap[e.type]:this._templateMap.default:null}onDragOver(e){this.droppableNodes&&(!this.value||this.value.length===0)&&(e.dataTransfer.dropEffect="move",e.preventDefault())}onDrop(e){if(this.droppableNodes&&(!this.value||this.value.length===0)){e.preventDefault();let n=this.dragNode;if(this.allowDrop(n,null,this.dragNodeScope)){let i=this.dragNodeIndex;this.value=this.value||[],this.validateDrop?this.onNodeDrop.emit({originalEvent:e,dragNode:n,dropNode:null,index:i,accept:()=>{this.processTreeDrop(n,i)}}):(this.onNodeDrop.emit({originalEvent:e,dragNode:n,dropNode:null,index:i}),this.processTreeDrop(n,i))}}}processTreeDrop(e,n){this.dragNodeSubNodes.splice(n,1),this.value.push(e),this.dragDropService.stopDrag({node:e})}onDragEnter(){this.droppableNodes&&this.allowDrop(this.dragNode,null,this.dragNodeScope)&&(this.dragHover=!0)}onDragLeave(e){if(this.droppableNodes){let n=e.currentTarget.getBoundingClientRect();(e.x>n.left+n.width||e.x<n.left||e.y>n.top+n.height||e.y<n.top)&&(this.dragHover=!1)}}allowDrop(e,n,i){if(e)if(this.isValidDragScope(i)){let o=!0;if(n)if(e===n)o=!1;else{let r=n.parent;for(;r!=null;){if(r===e){o=!1;break}r=r.parent}}return o}else return!1;else return!1}isValidDragScope(e){let n=this.droppableScope;if(n){if(typeof n=="string"){if(typeof e=="string")return n===e;if(Array.isArray(e))return e.indexOf(n)!=-1}else if(Array.isArray(n)){if(typeof e=="string")return n.indexOf(e)!=-1;if(Array.isArray(e)){for(let i of n)for(let o of e)if(i===o)return!0}}return!1}else return!0}_filter(e){let n=e;if(n==="")this.filteredNodes=null;else{this.filteredNodes=[];let i=this.filterBy.split(","),o=me(n).toLocaleLowerCase(this.filterLocale),r=this.filterMode==="strict";for(let p of this.value){let v=F({},p),M={searchFields:i,filterText:o,isStrictMode:r};(r&&(this.findFilteredNodes(v,M)||this.isFilterMatched(v,M))||!r&&(this.isFilterMatched(v,M)||this.findFilteredNodes(v,M)))&&this.filteredNodes.push(v)}}this.updateSerializedValue(),this.onFilter.emit({filter:n,filteredValue:this.filteredNodes})}resetFilter(){this.filteredNodes=null,this.filterViewChild&&this.filterViewChild.nativeElement&&(this.filterViewChild.nativeElement.value="")}scrollToVirtualIndex(e){this.virtualScroll&&this.scroller?.scrollToIndex(e)}scrollTo(e){this.virtualScroll?this.scroller?.scrollTo(e):this.wrapperViewChild&&this.wrapperViewChild.nativeElement&&(this.wrapperViewChild.nativeElement.scrollTo?this.wrapperViewChild.nativeElement.scrollTo(e):(this.wrapperViewChild.nativeElement.scrollLeft=e.left,this.wrapperViewChild.nativeElement.scrollTop=e.top))}findFilteredNodes(e,n){if(e){let i=!1;if(e.children){let o=[...e.children];e.children=[];for(let r of o){let p=F({},r);this.isFilterMatched(p,n)&&(i=!0,e.children.push(p))}}if(i)return e.expanded=!0,!0}}isFilterMatched(e,n){let{searchFields:i,filterText:o,isStrictMode:r}=n,p=!1;for(let v of i)me(String(Me(e,v))).toLocaleLowerCase(this.filterLocale).indexOf(o)>-1&&(p=!0);return(!p||r&&!this.isNodeLeaf(e))&&(p=this.findFilteredNodes(e,{searchFields:i,filterText:o,isStrictMode:r})||p),p}getIndex(e,n){let i=e.getItemOptions;return i?i(n).index:n}getBlockableElement(){return this.el.nativeElement.children[0]}ngOnDestroy(){this.dragStartSubscription&&this.dragStartSubscription.unsubscribe(),this.dragStopSubscription&&this.dragStopSubscription.unsubscribe(),super.ngOnDestroy()}static \u0275fac=function(n){return new(n||t)(ve($e,8))};static \u0275cmp=P({type:t,selectors:[["p-tree"]],contentQueries:function(n,i,o){if(n&1&&(T(o,We,4),T(o,It,4),T(o,Et,4),T(o,kt,4),T(o,Vt,4),T(o,Dt,4),T(o,Mt,4),T(o,Ot,4),T(o,Ft,4),T(o,$t,4),T(o,ae,4)),n&2){let r;_(r=h())&&(i.filterTemplate=r.first),_(r=h())&&(i.nodeTemplate=r.first),_(r=h())&&(i.headerTemplate=r.first),_(r=h())&&(i.footerTemplate=r.first),_(r=h())&&(i.loaderTemplate=r.first),_(r=h())&&(i.emptyMessageTemplate=r.first),_(r=h())&&(i.togglerIconTemplate=r.first),_(r=h())&&(i.checkboxIconTemplate=r.first),_(r=h())&&(i.loadingIconTemplate=r.first),_(r=h())&&(i.filterIconTemplate=r.first),_(r=h())&&(i.templates=r)}},viewQuery:function(n,i){if(n&1&&(E(We,5),E(Lt,5),E(zt,5)),n&2){let o;_(o=h())&&(i.filterViewChild=o.first),_(o=h())&&(i.scroller=o.first),_(o=h())&&(i.wrapperViewChild=o.first)}},inputs:{value:"value",selectionMode:"selectionMode",loadingMode:"loadingMode",selection:"selection",style:"style",styleClass:"styleClass",contextMenu:"contextMenu",draggableScope:"draggableScope",droppableScope:"droppableScope",draggableNodes:[2,"draggableNodes","draggableNodes",y],droppableNodes:[2,"droppableNodes","droppableNodes",y],metaKeySelection:[2,"metaKeySelection","metaKeySelection",y],propagateSelectionUp:[2,"propagateSelectionUp","propagateSelectionUp",y],propagateSelectionDown:[2,"propagateSelectionDown","propagateSelectionDown",y],loading:[2,"loading","loading",y],loadingIcon:"loadingIcon",emptyMessage:"emptyMessage",ariaLabel:"ariaLabel",togglerAriaLabel:"togglerAriaLabel",ariaLabelledBy:"ariaLabelledBy",validateDrop:[2,"validateDrop","validateDrop",y],filter:[2,"filter","filter",y],filterBy:"filterBy",filterMode:"filterMode",filterOptions:"filterOptions",filterPlaceholder:"filterPlaceholder",filteredNodes:"filteredNodes",filterLocale:"filterLocale",scrollHeight:"scrollHeight",lazy:[2,"lazy","lazy",y],virtualScroll:[2,"virtualScroll","virtualScroll",y],virtualScrollItemSize:[2,"virtualScrollItemSize","virtualScrollItemSize",z],virtualScrollOptions:"virtualScrollOptions",indentation:[2,"indentation","indentation",z],_templateMap:"_templateMap",trackBy:"trackBy",highlightOnSelect:[2,"highlightOnSelect","highlightOnSelect",y],virtualNodeHeight:"virtualNodeHeight"},outputs:{selectionChange:"selectionChange",onNodeSelect:"onNodeSelect",onNodeUnselect:"onNodeUnselect",onNodeExpand:"onNodeExpand",onNodeCollapse:"onNodeCollapse",onNodeContextMenuSelect:"onNodeContextMenuSelect",onNodeDoubleClick:"onNodeDoubleClick",onNodeDrop:"onNodeDrop",onLazyLoad:"onLazyLoad",onScroll:"onScroll",onScrollIndexChange:"onScrollIndexChange",onFilter:"onFilter"},features:[le([Ge]),q,H,xe],decls:8,vars:10,consts:[["filter",""],["scroller",""],["content",""],["treeNode",""],["loader",""],["wrapper",""],["emptyFilter",""],[3,"drop","dragover","dragenter","dragleave","ngClass","ngStyle"],["class","p-tree-mask p-overlay-mask",4,"ngIf"],[4,"ngTemplateOutlet"],[4,"ngIf"],["class","p-tree-empty-message",4,"ngIf"],[1,"p-tree-mask","p-overlay-mask"],[3,"class",4,"ngIf"],[3,"spin","styleClass",4,"ngIf"],["class","p-tree-loading-icon",4,"ngIf"],[3,"spin","styleClass"],[1,"p-tree-loading-icon"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["pInputText","","type","search","autocomplete","off",1,"p-tree-filter-input",3,"keydown.enter","input"],["class","p-tree-filter-icon",4,"ngIf"],[1,"p-tree-filter-icon"],["styleClass","p-tree-root",3,"items","tabindex","style","scrollHeight","itemSize","lazy","options","onScroll","onScrollIndexChange","onLazyLoad",4,"ngIf"],["styleClass","p-tree-root",3,"onScroll","onScrollIndexChange","onLazyLoad","items","tabindex","scrollHeight","itemSize","lazy","options"],["class","p-tree-root-children","role","tree",3,"ngClass","style",4,"ngIf"],["role","tree",1,"p-tree-root-children",3,"ngClass"],[3,"level","rowNode","node","parentNode","firstChild","lastChild","index","itemSize","indentation","loadingMode",4,"ngFor","ngForOf","ngForTrackBy"],[3,"level","rowNode","node","parentNode","firstChild","lastChild","index","itemSize","indentation","loadingMode"],[1,"p-tree-root"],["class","p-tree-root-children","role","tree",4,"ngIf"],["role","tree",1,"p-tree-root-children"],[3,"node","firstChild","lastChild","index","level","loadingMode",4,"ngFor","ngForOf","ngForTrackBy"],[3,"node","firstChild","lastChild","index","level","loadingMode"],[1,"p-tree-empty-message"],[4,"ngIf","ngIfElse"]],template:function(n,i){if(n&1&&(f(0,"div",7),x("drop",function(r){return i.onDrop(r)})("dragover",function(r){return i.onDragOver(r)})("dragenter",function(){return i.onDragEnter()})("dragleave",function(r){return i.onDragLeave(r)}),d(1,qt,3,2,"div",8)(2,Kt,1,0,"ng-container",9)(3,Wt,1,4,"ng-container")(4,ei,1,1,"p-iconField")(5,pi,3,2,"ng-container",10)(6,hi,3,3,"div",11)(7,fi,1,0,"ng-container",9),m()),n&2){let o;O(i.styleClass),a("ngClass",i.containerClass)("ngStyle",i.style),c(),a("ngIf",i.loading&&i.loadingMode==="mask"),c(),a("ngTemplateOutlet",i.headerTemplate||i._headerTemplate),c(),ue(i.filterTemplate||i._filterTemplate?3:4),c(2),a("ngIf",(o=i.getRootNode())==null?null:o.length),c(),a("ngIf",!i.loading&&(i.getRootNode()==null||i.getRootNode().length===0)),c(),a("ngTemplateOutlet",i.footerTemplate||i._footerTemplate)}},dependencies:[J,K,j,W,Y,G,He,U,ze,ye,Be,_e,Qe,Ae,Ti],encapsulation:2})}return t})();var bi=["value"],xi=["header"],vi=["empty"],Si=["footer"],Ci=["clearicon"],Ni=["triggericon"],wi=["dropdownicon"],Ii=["filtericon"],Ei=["closeicon"],ki=["itemtogglericon"],Vi=["itemcheckboxicon"],Di=["itemloadingicon"],Mi=["container"],Oi=["focusInput"],Fi=["filter"],$i=["tree"],Li=["panel"],zi=["overlay"],Ui=["firstHiddenFocusableEl"],Ri=["lastHiddenFocusableEl"],Qi=(t,l)=>({$implicit:t,placeholder:l}),Xe=(t,l)=>({$implicit:t,options:l}),Ai=t=>({"max-height":t}),Bi=t=>({$implicit:t}),Pi=(t,l)=>({$implicit:t,partialSelected:l});function Hi(t,l){t&1&&I(0)}function qi(t,l){if(t&1&&(S(0),d(1,Hi,1,0,"ng-container",25),C()),t&2){let e=s();c(),a("ngTemplateOutlet",e.valueTemplate||e._valueTemplate)("ngTemplateOutletContext",L(2,Qi,e.value,e.placeholder))}}function Ki(t,l){if(t&1&&(S(0),Q(1),C()),t&2){let e=s(2);c(),re(" ",e.label||"empty"," ")}}function ji(t,l){if(t&1&&(f(0,"div",27),w(1,"p-chip",28),m()),t&2){let e=l.$implicit;c(),a("label",e.label)}}function Wi(t,l){if(t&1&&(S(0),Q(1),C()),t&2){let e=s(3);c(),oe(e.placeholder||"empty")}}function Gi(t,l){if(t&1&&d(0,ji,2,1,"div",26)(1,Wi,2,1,"ng-container",20),t&2){let e=s(2);a("ngForOf",e.value),c(),a("ngIf",e.emptyValue)}}function Yi(t,l){if(t&1&&d(0,Ki,2,1,"ng-container",19)(1,Gi,2,2,"ng-template",null,5,k),t&2){let e=ge(2),n=s();a("ngIf",n.display==="comma")("ngIfElse",e)}}function Ji(t,l){if(t&1){let e=V();f(0,"TimesIcon",31),x("click",function(i){u(e);let o=s(2);return g(o.clear(i))}),m()}t&2&&O("p-treeselect-clear-icon")}function Xi(t,l){}function Zi(t,l){t&1&&d(0,Xi,0,0,"ng-template")}function en(t,l){if(t&1){let e=V();f(0,"span",32),x("click",function(i){u(e);let o=s(2);return g(o.clear(i))}),d(1,Zi,1,0,null,33),m()}if(t&2){let e=s(2);c(),a("ngTemplateOutlet",e.clearIconTemplate||e._clearIconTemplate)}}function tn(t,l){if(t&1&&(S(0),d(1,Ji,1,2,"TimesIcon",29)(2,en,2,1,"span",30),C()),t&2){let e=s();c(),a("ngIf",!e.clearIconTemplate&&!e._clearIconTemplate),c(),a("ngIf",e.clearIconTemplate||e.clearIconTemplate)}}function nn(t,l){t&1&&w(0,"ChevronDownIcon",34),t&2&&a("styleClass","p-treeselect-dropdown-icon")}function on(t,l){}function rn(t,l){t&1&&d(0,on,0,0,"ng-template")}function ln(t,l){if(t&1&&(f(0,"span",35),d(1,rn,1,0,null,33),m()),t&2){let e=s();c(),a("ngTemplateOutlet",e.triggerIconTemplate||e._triggerIconTemplate||e.dropdownIconTemplate||e._dropdownIconTemplate)}}function an(t,l){t&1&&I(0)}function sn(t,l){t&1&&I(0)}function cn(t,l){if(t&1&&d(0,sn,1,0,"ng-container",33),t&2){let e=s(3);a("ngTemplateOutlet",e.emptyTemplate||e._emptyTemplate)}}function dn(t,l){t&1&&(S(0),d(1,cn,1,1,"ng-template",null,10,k),C())}function pn(t,l){t&1&&I(0)}function un(t,l){if(t&1&&d(0,pn,1,0,"ng-container",25),t&2){let e=l.$implicit,n=s(3);a("ngTemplateOutlet",n.itemTogglerIconTemplate||n._itemTogglerIconTemplate)("ngTemplateOutletContext",D(2,Bi,e))}}function gn(t,l){t&1&&d(0,un,1,4,"ng-template",null,11,k)}function _n(t,l){t&1&&I(0)}function hn(t,l){if(t&1&&d(0,_n,1,0,"ng-container",25),t&2){let e=l.$implicit,n=l.partialSelected,i=s(3);a("ngTemplateOutlet",i.itemCheckboxIconTemplate||i._itemCheckboxIconTemplate)("ngTemplateOutletContext",L(2,Pi,e,n))}}function fn(t,l){t&1&&d(0,hn,1,5,"ng-template",null,12,k)}function mn(t,l){t&1&&I(0)}function yn(t,l){if(t&1&&d(0,mn,1,0,"ng-container",33),t&2){let e=s(3);a("ngTemplateOutlet",e.itemLoadingIconTemplate||e._itemLoadingIconTemplate)}}function Tn(t,l){t&1&&d(0,yn,1,1,"ng-template",null,13,k)}function bn(t,l){t&1&&I(0)}function xn(t,l){if(t&1){let e=V();f(0,"div",36,6)(2,"span",37,7),x("focus",function(i){u(e);let o=s();return g(o.onFirstHiddenFocus(i))}),m(),d(4,an,1,0,"ng-container",25),f(5,"div",38)(6,"p-tree",39,8),x("selectionChange",function(i){u(e);let o=s();return g(o.onSelectionChange(i))})("onNodeExpand",function(i){u(e);let o=s();return g(o.nodeExpand(i))})("onNodeCollapse",function(i){u(e);let o=s();return g(o.nodeCollapse(i))})("onNodeSelect",function(i){u(e);let o=s();return g(o.onSelect(i))})("onNodeUnselect",function(i){u(e);let o=s();return g(o.onUnselect(i))}),d(8,dn,3,0,"ng-container",20)(9,gn,2,0,null,20)(10,fn,2,0,null,20)(11,Tn,2,0,null,20),m()(),d(12,bn,1,0,"ng-container",25),f(13,"span",37,9),x("focus",function(i){u(e);let o=s();return g(o.onLastHiddenFocus(i))}),m()()}if(t&2){let e=s();O(e.panelStyleClass),a("ngStyle",e.panelStyle)("ngClass",e.panelClass),N("id",e.listId),c(2),N("tabindex",0)("data-p-hidden-accessible",!0)("data-p-hidden-focusable",!0),c(2),a("ngTemplateOutlet",e.headerTemplate||e._headerTemplate)("ngTemplateOutletContext",L(38,Xe,e.value,e.options)),c(),a("ngStyle",D(41,Ai,e.scrollHeight)),c(),a("value",e.options)("propagateSelectionDown",e.propagateSelectionDown)("propagateSelectionUp",e.propagateSelectionUp)("selectionMode",e.selectionMode)("selection",e.value)("metaKeySelection",e.metaKeySelection)("emptyMessage",e.emptyMessage)("filter",e.filter)("filterBy",e.filterBy)("filterMode",e.filterMode)("filterPlaceholder",e.filterPlaceholder)("filterLocale",e.filterLocale)("filteredNodes",e.filteredNodes)("virtualScroll",e.virtualScroll)("virtualScrollItemSize",e.virtualScrollItemSize)("virtualScrollOptions",e.virtualScrollOptions)("_templateMap",e.templateMap)("loading",e.loading),c(2),a("ngIf",e.emptyTemplate||e._emptyTemplate),c(),a("ngIf",e.itemTogglerIconTemplate||e._itemTogglerIconTemplate),c(),a("ngIf",e.itemCheckboxIconTemplate||e._itemCheckboxIconTemplate),c(),a("ngIf",e.itemLoadingIconTemplate||e._itemLoadingIconTemplate),c(),a("ngTemplateOutlet",e.footerTemplate)("ngTemplateOutletContext",L(43,Xe,e.value,e.options)),c(),N("tabindex",0)("data-p-hidden-accessible",!0)("data-p-hidden-focusable",!0)}}var vn=({dt:t})=>`
224
224
  .p-treeselect {
225
225
  display: inline-flex;
226
226
  cursor: pointer;
@@ -390,4 +390,4 @@ p-treeselect.ng-invalid.ng-dirty .p-treeselect-label.p-placeholder {
390
390
  flex-shrink: 0;
391
391
  background: transparent;
392
392
  color: ${t("treeselect.clear.icon.color")};
393
- }`,Sn={root:({instance:t})=>({position:t.appendTo==="self"?"relative":void 0})},Cn={root:({instance:t})=>({"p-treeselect p-component p-inputwrapper":!0,"p-treeselect-display-chip":t.display==="chip","p-disabled":t.disabled,"p-invalid":t.invalid,"p-focus":t.focused,"p-variant-filled":t.variant==="filled"||t.config.inputVariant()==="filled"||t.config.inputStyle()==="filled","p-inputwrapper-filled":!t.emptyValue,"p-inputwrapper-focus":t.focused||t.overlayVisible,"p-treeselect-open":t.overlayVisible,"p-treeselect-clearable":t.showClear,"p-treeselect-fluid":t.hasFluid,"p-treeselect-sm p-inputfield-sm":t.size==="small","p-treeselect-lg p-inputfield-lg":t.size==="large"}),labelContainer:"p-treeselect-label-container",label:({instance:t})=>({"p-treeselect-label":!0,"p-placeholder":t.label===t.placeholder,"p-treeselect-label-empty":!t.placeholder&&t.emptyValue}),chip:"p-treeselect-chip-item",pcChip:"p-treeselect-chip",dropdown:"p-treeselect-dropdown",dropdownIcon:"p-treeselect-dropdown-icon",panel:"p-treeselect-overlay p-component",treeContainer:"p-treeselect-tree-container",emptyMessage:"p-treeselect-empty-message"},Ze=(()=>{class t extends ae{name="treeselect";theme=vn;classes=Cn;inlineStyles=Sn;static \u0275fac=(()=>{let e;return function(i){return(e||(e=R(t)))(i||t)}})();static \u0275prov=te({token:t,factory:t.\u0275fac})}return t})();var Nn={provide:we,useExisting:ee(()=>et),multi:!0},et=(()=>{class t extends Z{inputId;scrollHeight="400px";disabled;metaKeySelection=!1;variant;display="comma";selectionMode="single";tabindex="0";ariaLabel;ariaLabelledBy;placeholder;panelClass;panelStyle;fluid=!1;panelStyleClass;set containerStyle(e){let n=this._componentStyle.inlineStyles.root({instance:this});this._containerStyle=F(F({},n),e)}get containerStyle(){return this._containerStyle}_containerStyle;containerStyleClass;labelStyle;labelStyleClass;overlayOptions;emptyMessage="";appendTo;filter=!1;filterBy="label";filterMode="lenient";filterPlaceholder;filterLocale;filterInputAutoFocus=!0;propagateSelectionDown=!0;propagateSelectionUp=!0;showClear=!1;resetFilterOnHide=!0;virtualScroll;virtualScrollItemSize;size;virtualScrollOptions;autofocus;get options(){return this._options}set options(e){this._options=e,this.updateTreeState()}get showTransitionOptions(){return this._showTransitionOptions}set showTransitionOptions(e){this._showTransitionOptions=e,console.log("The showTransitionOptions property is deprecated since v14.2.0, use overlayOptions property instead.")}get hideTransitionOptions(){return this._hideTransitionOptions}set hideTransitionOptions(e){this._hideTransitionOptions=e,console.log("The hideTransitionOptions property is deprecated since v14.2.0, use overlayOptions property instead.")}loading;onNodeExpand=new b;onNodeCollapse=new b;onShow=new b;onHide=new b;onClear=new b;onFilter=new b;onFocus=new b;onBlur=new b;onNodeUnselect=new b;onNodeSelect=new b;_showTransitionOptions;_hideTransitionOptions;containerEl;focusInput;filterViewChild;treeViewChild;panelEl;overlayViewChild;firstHiddenFocusableElementOnOverlay;lastHiddenFocusableElementOnOverlay;filteredNodes;filterValue=null;serializedValue;valueTemplate;headerTemplate;emptyTemplate;footerTemplate;clearIconTemplate;triggerIconTemplate;dropdownIconTemplate;filterIconTemplate;closeIconTemplate;itemTogglerIconTemplate;itemCheckboxIconTemplate;itemLoadingIconTemplate;templates;_valueTemplate;_headerTemplate;_emptyTemplate;_footerTemplate;_clearIconTemplate;_triggerIconTemplate;_filterIconTemplate;_closeIconTemplate;_itemTogglerIconTemplate;_itemCheckboxIconTemplate;_itemLoadingIconTemplate;_dropdownIconTemplate;focused;overlayVisible;selfChange;value;expandedNodes=[];_options;templateMap;onModelChange=()=>{};onModelTouched=()=>{};listId="";_componentStyle=B(Ze);ngOnInit(){super.ngOnInit(),this.listId=Oe("pn_id_")+"_list",this.updateTreeState()}ngAfterContentInit(){this.templates.length&&(this.templateMap={}),this.templates.forEach(e=>{switch(e.getType()){case"value":this._valueTemplate=e.template;break;case"header":this._headerTemplate=e.template;break;case"empty":this._emptyTemplate=e.template;break;case"footer":this._footerTemplate=e.template;break;case"clearicon":this._clearIconTemplate=e.template;break;case"triggericon":this._triggerIconTemplate=e.template;break;case"filtericon":this._filterIconTemplate=e.template;break;case"closeicon":this._closeIconTemplate=e.template;break;case"itemtogglericon":this._itemTogglerIconTemplate=e.template;break;case"itemcheckboxicon":this._itemCheckboxIconTemplate=e.template;break;case"dropdownicon":this._dropdownIconTemplate=e.template;break;case"itemloadingicon":this._itemLoadingIconTemplate=e.template;break;default:e.name?this.templateMap[e.name]=e.template:this.valueTemplate=e.template;break}})}onOverlayAnimationStart(e){switch(e.toState){case"visible":if(this.filter)he(this.filterValue)&&this.treeViewChild?._filter(this.filterValue),this.filterInputAutoFocus&&this.filterViewChild?.nativeElement.focus();else{let n=X(this.panelEl.nativeElement);n&&n.length>0&&n[0].focus()}break}}onOverlayBeforeHide(e){let n=X(this.containerEl.nativeElement);n&&n.length>0&&n[0].focus()}onSelectionChange(e){this.value=e,this.onModelChange(this.value),this.cd.markForCheck()}onClick(e){this.disabled||!this.overlayViewChild?.el?.nativeElement?.contains(e.target)&&!$(e.target,"p-treeselect-close")&&!$(e.target,"p-checkbox-box")&&!$(e.target,"p-checkbox-icon")&&(this.overlayVisible?this.hide():this.show(),this.focusInput?.nativeElement.focus())}onKeyDown(e){switch(e.code){case"ArrowDown":this.overlayVisible||(this.show(),e.preventDefault()),this.onArrowDown(e),e.preventDefault();break;case"Space":case"Enter":this.overlayVisible||(this.show(),e.preventDefault());break;case"Escape":this.overlayVisible&&(this.hide(),this.focusInput?.nativeElement.focus(),e.preventDefault());break;case"Tab":this.onTabKey(e);break;default:break}}onFilterInput(e){this.filterValue=e.target.value,this.treeViewChild?._filter(this.filterValue),this.onFilter.emit({filter:this.filterValue,filteredValue:this.treeViewChild?.filteredNodes}),setTimeout(()=>{this.overlayViewChild.alignOverlay()})}onArrowDown(e){if(this.overlayVisible&&this.panelEl?.nativeElement){let n=X(this.panelEl.nativeElement,".p-tree-node");n&&n.length>0&&n[0].focus(),e.preventDefault()}}onFirstHiddenFocus(e){let n=e.relatedTarget===this.focusInput?.nativeElement?De(this.overlayViewChild?.overlayViewChild?.nativeElement,':not([data-p-hidden-focusable="true"])'):this.focusInput?.nativeElement;A(n)}onLastHiddenFocus(e){let n=e.relatedTarget===this.focusInput?.nativeElement?Me(this.overlayViewChild?.overlayViewChild?.nativeElement,':not([data-p-hidden-focusable="true"])'):this.focusInput?.nativeElement;A(n)}show(){this.overlayVisible=!0}hide(e){this.overlayVisible=!1,this.resetFilter(),this.onHide.emit(e),this.cd.markForCheck()}clear(e){this.value=null,this.resetExpandedNodes(),this.resetPartialSelected(),this.onModelChange(this.value),this.onClear.emit(),e.stopPropagation()}checkValue(){return this.value!==null&&he(this.value)}onTabKey(e,n=!1){n||(this.overlayVisible&&this.hasFocusableElements()?(A(e.shiftKey?this.lastHiddenFocusableElementOnOverlay.nativeElement:this.firstHiddenFocusableElementOnOverlay.nativeElement),e.preventDefault()):this.overlayVisible&&this.hide(this.filter))}hasFocusableElements(){return X(this.overlayViewChild.overlayViewChild.nativeElement,':not([data-p-hidden-focusable="true"])').length>0}resetFilter(){this.filter&&!this.resetFilterOnHide?(this.filteredNodes=this.treeViewChild?.filteredNodes,this.treeViewChild?.resetFilter()):this.filterValue=null}updateTreeState(){if(this.value){let e=this.selectionMode==="single"?[this.value]:[...this.value];this.resetExpandedNodes(),this.resetPartialSelected(),e&&this.options&&this.updateTreeBranchState(null,null,e)}}updateTreeBranchState(e,n,i){if(e){if(this.isSelected(e)&&(this.expandPath(n),i.splice(i.indexOf(e),1)),i.length>0&&e.children)for(let o of e.children)this.updateTreeBranchState(o,[...n,e],i)}else for(let o of this.options)this.updateTreeBranchState(o,[],i)}expandPath(e){for(let n of e)n.expanded=!0;this.expandedNodes=[...e]}nodeExpand(e){this.onNodeExpand.emit(e),this.expandedNodes.push(e.node)}nodeCollapse(e){this.onNodeCollapse.emit(e),this.expandedNodes.splice(this.expandedNodes.indexOf(e.node),1)}resetExpandedNodes(){for(let e of this.expandedNodes)e.expanded=!1;this.expandedNodes=[]}resetPartialSelected(e=this.options){if(e)for(let n of e)n.partialSelected=!1,n.children&&n.children?.length>0&&this.resetPartialSelected(n.children)}findSelectedNodes(e,n,i){if(e){if(this.isSelected(e)&&(i.push(e),delete n[e.key]),Object.keys(n).length&&e.children)for(let o of e.children)this.findSelectedNodes(o,n,i)}else for(let o of this.options)this.findSelectedNodes(o,n,i)}isSelected(e){return this.findIndexInSelection(e)!=-1}findIndexInSelection(e){let n=-1;if(this.value)if(this.selectionMode==="single")n=this.value.key&&this.value.key===e.key||this.value==e?0:-1;else for(let i=0;i<this.value.length;i++){let o=this.value[i];if(o.key&&o.key===e.key||o==e){n=i;break}}return n}onSelect(e){this.onNodeSelect.emit(e),this.selectionMode==="single"&&(this.hide(),this.focusInput?.nativeElement.focus())}onUnselect(e){this.onNodeUnselect.emit(e)}onInputFocus(e){this.disabled||(this.focused=!0,this.onFocus.emit(e))}onInputBlur(e){this.focused=!1,this.onBlur.emit(e),this.onModelTouched()}writeValue(e){this.value=e,this.updateTreeState(),this.cd.markForCheck()}registerOnChange(e){this.onModelChange=e}registerOnTouched(e){this.onModelTouched=e}setDisabledState(e){setTimeout(()=>{this.disabled=e,this.cd.markForCheck()})}get containerClass(){return this._componentStyle.classes.root({instance:this})}get hasFluid(){let n=this.el.nativeElement.closest("p-fluid");return this.fluid||!!n}get labelClass(){return this._componentStyle.classes.label({instance:this})}get emptyValue(){return!this.value||Object.keys(this.value).length===0}get emptyOptions(){return!this.options||this.options.length===0}get label(){let e=this.value||[];return e.length?e.map(n=>n.label).join(", "):this.selectionMode==="single"&&this.value?e.label:this.placeholder}static \u0275fac=(()=>{let e;return function(i){return(e||(e=R(t)))(i||t)}})();static \u0275cmp=P({type:t,selectors:[["p-treeSelect"],["p-treeselect"],["p-tree-select"]],contentQueries:function(n,i,o){if(n&1&&(T(o,bi,4),T(o,xi,4),T(o,vi,4),T(o,Si,4),T(o,Ci,4),T(o,Ni,4),T(o,wi,4),T(o,Ii,4),T(o,Ei,4),T(o,ki,4),T(o,Vi,4),T(o,Di,4),T(o,se,4)),n&2){let r;_(r=h())&&(i.valueTemplate=r.first),_(r=h())&&(i.headerTemplate=r.first),_(r=h())&&(i.emptyTemplate=r.first),_(r=h())&&(i.footerTemplate=r.first),_(r=h())&&(i.clearIconTemplate=r.first),_(r=h())&&(i.triggerIconTemplate=r.first),_(r=h())&&(i.dropdownIconTemplate=r.first),_(r=h())&&(i.filterIconTemplate=r.first),_(r=h())&&(i.closeIconTemplate=r.first),_(r=h())&&(i.itemTogglerIconTemplate=r.first),_(r=h())&&(i.itemCheckboxIconTemplate=r.first),_(r=h())&&(i.itemLoadingIconTemplate=r.first),_(r=h())&&(i.templates=r)}},viewQuery:function(n,i){if(n&1&&(E(Mi,5),E(Oi,5),E(Fi,5),E($i,5),E(Li,5),E(zi,5),E(Ui,5),E(Ri,5)),n&2){let o;_(o=h())&&(i.containerEl=o.first),_(o=h())&&(i.focusInput=o.first),_(o=h())&&(i.filterViewChild=o.first),_(o=h())&&(i.treeViewChild=o.first),_(o=h())&&(i.panelEl=o.first),_(o=h())&&(i.overlayViewChild=o.first),_(o=h())&&(i.firstHiddenFocusableElementOnOverlay=o.first),_(o=h())&&(i.lastHiddenFocusableElementOnOverlay=o.first)}},inputs:{inputId:"inputId",scrollHeight:"scrollHeight",disabled:[2,"disabled","disabled",y],metaKeySelection:[2,"metaKeySelection","metaKeySelection",y],variant:"variant",display:"display",selectionMode:"selectionMode",tabindex:"tabindex",ariaLabel:"ariaLabel",ariaLabelledBy:"ariaLabelledBy",placeholder:"placeholder",panelClass:"panelClass",panelStyle:"panelStyle",fluid:[2,"fluid","fluid",y],panelStyleClass:"panelStyleClass",containerStyle:"containerStyle",containerStyleClass:"containerStyleClass",labelStyle:"labelStyle",labelStyleClass:"labelStyleClass",overlayOptions:"overlayOptions",emptyMessage:"emptyMessage",appendTo:"appendTo",filter:[2,"filter","filter",y],filterBy:"filterBy",filterMode:"filterMode",filterPlaceholder:"filterPlaceholder",filterLocale:"filterLocale",filterInputAutoFocus:[2,"filterInputAutoFocus","filterInputAutoFocus",y],propagateSelectionDown:[2,"propagateSelectionDown","propagateSelectionDown",y],propagateSelectionUp:[2,"propagateSelectionUp","propagateSelectionUp",y],showClear:[2,"showClear","showClear",y],resetFilterOnHide:[2,"resetFilterOnHide","resetFilterOnHide",y],virtualScroll:"virtualScroll",virtualScrollItemSize:"virtualScrollItemSize",size:"size",virtualScrollOptions:"virtualScrollOptions",autofocus:[2,"autofocus","autofocus",y],options:"options",showTransitionOptions:"showTransitionOptions",hideTransitionOptions:"hideTransitionOptions",loading:[2,"loading","loading",y]},outputs:{onNodeExpand:"onNodeExpand",onNodeCollapse:"onNodeCollapse",onShow:"onShow",onHide:"onHide",onClear:"onClear",onFilter:"onFilter",onFocus:"onFocus",onBlur:"onBlur",onNodeUnselect:"onNodeUnselect",onNodeSelect:"onNodeSelect"},features:[le([Nn,Ze]),q,H],decls:18,vars:30,consts:[["container",""],["focusInput",""],["defaultValueTemplate",""],["overlay",""],["content",""],["chipsValueTemplate",""],["panel",""],["firstHiddenFocusableEl",""],["tree",""],["lastHiddenFocusableEl",""],["empty",""],["togglericon",""],["checkboxicon",""],["loadingicon",""],[3,"click","ngClass","ngStyle"],[1,"p-hidden-accessible"],["type","text","role","combobox","readonly","",3,"focus","blur","keydown","disabled","pAutoFocus"],[1,"p-treeselect-label-container"],[3,"ngClass","ngStyle"],[4,"ngIf","ngIfElse"],[4,"ngIf"],["role","button","aria-haspopup","tree",1,"p-treeselect-dropdown"],[3,"styleClass",4,"ngIf"],["class","p-treeselect-dropdown-icon",4,"ngIf"],[3,"visibleChange","onAnimationStart","onBeforeHide","onShow","onHide","visible","options","target","appendTo","showTransitionOptions","hideTransitionOptions"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["class","p-treeselect-chip-item",4,"ngFor","ngForOf"],[1,"p-treeselect-chip-item"],["styleClass","p-treeselect-chip",3,"label"],[3,"class","click",4,"ngIf"],["class","p-treeselect-clear-icon",3,"click",4,"ngIf"],[3,"click"],[1,"p-treeselect-clear-icon",3,"click"],[4,"ngTemplateOutlet"],[3,"styleClass"],[1,"p-treeselect-dropdown-icon"],[1,"p-treeselect-overlay","p-component",3,"ngStyle","ngClass"],["role","presentation",1,"p-hidden-accessible","p-hidden-focusable",3,"focus"],[1,"p-treeselect-tree-container",3,"ngStyle"],[3,"selectionChange","onNodeExpand","onNodeCollapse","onNodeSelect","onNodeUnselect","value","propagateSelectionDown","propagateSelectionUp","selectionMode","selection","metaKeySelection","emptyMessage","filter","filterBy","filterMode","filterPlaceholder","filterLocale","filteredNodes","virtualScroll","virtualScrollItemSize","virtualScrollOptions","_templateMap","loading"]],template:function(n,i){if(n&1){let o=V();f(0,"div",14,0),x("click",function(p){return u(o),g(i.onClick(p))}),f(2,"div",15)(3,"input",16,1),x("focus",function(p){return u(o),g(i.onInputFocus(p))})("blur",function(p){return u(o),g(i.onInputBlur(p))})("keydown",function(p){return u(o),g(i.onKeyDown(p))}),m()(),f(5,"div",17)(6,"div",18),d(7,qi,2,5,"ng-container",19)(8,Yi,3,2,"ng-template",null,2,k),m()(),d(10,tn,3,2,"ng-container",20),f(11,"div",21),d(12,nn,1,1,"ChevronDownIcon",22)(13,ln,2,1,"span",23),m(),f(14,"p-overlay",24,3),Ne("visibleChange",function(p){return u(o),Ce(i.overlayVisible,p)||(i.overlayVisible=p),g(p)}),x("onAnimationStart",function(p){return u(o),g(i.onOverlayAnimationStart(p))})("onBeforeHide",function(p){return u(o),g(i.onOverlayBeforeHide(p))})("onShow",function(p){return u(o),g(i.onShow.emit(p))})("onHide",function(p){return u(o),g(i.hide(p))}),d(16,xn,15,46,"ng-template",null,4,k),m()()}if(n&2){let o,r,p=ge(9);O(i.containerStyleClass),a("ngClass",i.containerClass)("ngStyle",i.containerStyle),c(3),a("disabled",i.disabled)("pAutoFocus",i.autofocus),N("id",i.inputId)("tabindex",i.disabled?-1:i.tabindex)("aria-controls",i.overlayVisible?i.listId:null)("aria-haspopup","tree")("aria-expanded",(o=i.overlayVisible)!==null&&o!==void 0?o:!1)("aria-labelledby",i.ariaLabelledBy)("aria-label",i.ariaLabel||(i.label==="p-emptylabel"?void 0:i.label)),c(3),O(i.labelStyleClass),a("ngClass",i.labelClass)("ngStyle",i.labelStyle),c(),a("ngIf",i.valueTemplate||i._valueTemplate)("ngIfElse",p),c(3),a("ngIf",i.checkValue()&&!i.disabled&&i.showClear),c(),N("aria-expanded",(r=i.overlayVisible)!==null&&r!==void 0?r:!1)("aria-label","treeselect trigger"),c(),a("ngIf",!i.triggerIconTemplate&&!i._triggerIconTemplate&&!i.dropdownIconTemplate&&!i._dropdownIconTemplate),c(),a("ngIf",i.triggerIconTemplate||i._triggerIconTemplate||i.dropdownIconTemplate||i._dropdownIconTemplate),c(),Se("visible",i.overlayVisible),a("options",i.overlayOptions)("target","@parent")("appendTo",i.appendTo)("showTransitionOptions",i.showTransitionOptions)("hideTransitionOptions",i.hideTransitionOptions)}},dependencies:[J,K,j,W,Y,G,qe,U,be,Re,Be,ce,je],encapsulation:2,changeDetection:0})}return t})(),Co=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=pe({type:t});static \u0275inj=de({imports:[et,U,U]})}return t})();export{be as a,et as b,Co as c};
393
+ }`,Sn={root:({instance:t})=>({position:t.appendTo==="self"?"relative":void 0})},Cn={root:({instance:t})=>({"p-treeselect p-component p-inputwrapper":!0,"p-treeselect-display-chip":t.display==="chip","p-disabled":t.disabled,"p-invalid":t.invalid,"p-focus":t.focused,"p-variant-filled":t.variant==="filled"||t.config.inputVariant()==="filled"||t.config.inputStyle()==="filled","p-inputwrapper-filled":!t.emptyValue,"p-inputwrapper-focus":t.focused||t.overlayVisible,"p-treeselect-open":t.overlayVisible,"p-treeselect-clearable":t.showClear,"p-treeselect-fluid":t.hasFluid,"p-treeselect-sm p-inputfield-sm":t.size==="small","p-treeselect-lg p-inputfield-lg":t.size==="large"}),labelContainer:"p-treeselect-label-container",label:({instance:t})=>({"p-treeselect-label":!0,"p-placeholder":t.label===t.placeholder,"p-treeselect-label-empty":!t.placeholder&&t.emptyValue}),chip:"p-treeselect-chip-item",pcChip:"p-treeselect-chip",dropdown:"p-treeselect-dropdown",dropdownIcon:"p-treeselect-dropdown-icon",panel:"p-treeselect-overlay p-component",treeContainer:"p-treeselect-tree-container",emptyMessage:"p-treeselect-empty-message"},Ze=(()=>{class t extends se{name="treeselect";theme=vn;classes=Cn;inlineStyles=Sn;static \u0275fac=(()=>{let e;return function(i){return(e||(e=R(t)))(i||t)}})();static \u0275prov=te({token:t,factory:t.\u0275fac})}return t})();var Nn={provide:we,useExisting:ee(()=>et),multi:!0},et=(()=>{class t extends Z{inputId;scrollHeight="400px";disabled;metaKeySelection=!1;variant;display="comma";selectionMode="single";tabindex="0";ariaLabel;ariaLabelledBy;placeholder;panelClass;panelStyle;fluid=!1;panelStyleClass;set containerStyle(e){let n=this._componentStyle.inlineStyles.root({instance:this});this._containerStyle=F(F({},n),e)}get containerStyle(){return this._containerStyle}_containerStyle;containerStyleClass;labelStyle;labelStyleClass;overlayOptions;emptyMessage="";appendTo;filter=!1;filterBy="label";filterMode="lenient";filterPlaceholder;filterLocale;filterInputAutoFocus=!0;propagateSelectionDown=!0;propagateSelectionUp=!0;showClear=!1;resetFilterOnHide=!0;virtualScroll;virtualScrollItemSize;size;virtualScrollOptions;autofocus;get options(){return this._options}set options(e){this._options=e,this.updateTreeState()}get showTransitionOptions(){return this._showTransitionOptions}set showTransitionOptions(e){this._showTransitionOptions=e,console.log("The showTransitionOptions property is deprecated since v14.2.0, use overlayOptions property instead.")}get hideTransitionOptions(){return this._hideTransitionOptions}set hideTransitionOptions(e){this._hideTransitionOptions=e,console.log("The hideTransitionOptions property is deprecated since v14.2.0, use overlayOptions property instead.")}loading;onNodeExpand=new b;onNodeCollapse=new b;onShow=new b;onHide=new b;onClear=new b;onFilter=new b;onFocus=new b;onBlur=new b;onNodeUnselect=new b;onNodeSelect=new b;_showTransitionOptions;_hideTransitionOptions;containerEl;focusInput;filterViewChild;treeViewChild;panelEl;overlayViewChild;firstHiddenFocusableElementOnOverlay;lastHiddenFocusableElementOnOverlay;filteredNodes;filterValue=null;serializedValue;valueTemplate;headerTemplate;emptyTemplate;footerTemplate;clearIconTemplate;triggerIconTemplate;dropdownIconTemplate;filterIconTemplate;closeIconTemplate;itemTogglerIconTemplate;itemCheckboxIconTemplate;itemLoadingIconTemplate;templates;_valueTemplate;_headerTemplate;_emptyTemplate;_footerTemplate;_clearIconTemplate;_triggerIconTemplate;_filterIconTemplate;_closeIconTemplate;_itemTogglerIconTemplate;_itemCheckboxIconTemplate;_itemLoadingIconTemplate;_dropdownIconTemplate;focused;overlayVisible;selfChange;value;expandedNodes=[];_options;templateMap;onModelChange=()=>{};onModelTouched=()=>{};listId="";_componentStyle=B(Ze);ngOnInit(){super.ngOnInit(),this.listId=Oe("pn_id_")+"_list",this.updateTreeState()}ngAfterContentInit(){this.templates.length&&(this.templateMap={}),this.templates.forEach(e=>{switch(e.getType()){case"value":this._valueTemplate=e.template;break;case"header":this._headerTemplate=e.template;break;case"empty":this._emptyTemplate=e.template;break;case"footer":this._footerTemplate=e.template;break;case"clearicon":this._clearIconTemplate=e.template;break;case"triggericon":this._triggerIconTemplate=e.template;break;case"filtericon":this._filterIconTemplate=e.template;break;case"closeicon":this._closeIconTemplate=e.template;break;case"itemtogglericon":this._itemTogglerIconTemplate=e.template;break;case"itemcheckboxicon":this._itemCheckboxIconTemplate=e.template;break;case"dropdownicon":this._dropdownIconTemplate=e.template;break;case"itemloadingicon":this._itemLoadingIconTemplate=e.template;break;default:e.name?this.templateMap[e.name]=e.template:this.valueTemplate=e.template;break}})}onOverlayAnimationStart(e){switch(e.toState){case"visible":if(this.filter)fe(this.filterValue)&&this.treeViewChild?._filter(this.filterValue),this.filterInputAutoFocus&&this.filterViewChild?.nativeElement.focus();else{let n=X(this.panelEl.nativeElement);n&&n.length>0&&n[0].focus()}break}}onOverlayBeforeHide(e){let n=X(this.containerEl.nativeElement);n&&n.length>0&&n[0].focus()}onSelectionChange(e){this.value=e,this.onModelChange(this.value),this.cd.markForCheck()}onClick(e){this.disabled||!this.overlayViewChild?.el?.nativeElement?.contains(e.target)&&!$(e.target,"p-treeselect-close")&&!$(e.target,"p-checkbox-box")&&!$(e.target,"p-checkbox-icon")&&(this.overlayVisible?this.hide():this.show(),this.focusInput?.nativeElement.focus())}onKeyDown(e){switch(e.code){case"ArrowDown":this.overlayVisible||(this.show(),e.preventDefault()),this.onArrowDown(e),e.preventDefault();break;case"Space":case"Enter":this.overlayVisible||(this.show(),e.preventDefault());break;case"Escape":this.overlayVisible&&(this.hide(),this.focusInput?.nativeElement.focus(),e.preventDefault());break;case"Tab":this.onTabKey(e);break;default:break}}onFilterInput(e){this.filterValue=e.target.value,this.treeViewChild?._filter(this.filterValue),this.onFilter.emit({filter:this.filterValue,filteredValue:this.treeViewChild?.filteredNodes}),setTimeout(()=>{this.overlayViewChild.alignOverlay()})}onArrowDown(e){if(this.overlayVisible&&this.panelEl?.nativeElement){let n=X(this.panelEl.nativeElement,".p-tree-node");n&&n.length>0&&n[0].focus(),e.preventDefault()}}onFirstHiddenFocus(e){let n=e.relatedTarget===this.focusInput?.nativeElement?Ve(this.overlayViewChild?.overlayViewChild?.nativeElement,':not([data-p-hidden-focusable="true"])'):this.focusInput?.nativeElement;A(n)}onLastHiddenFocus(e){let n=e.relatedTarget===this.focusInput?.nativeElement?De(this.overlayViewChild?.overlayViewChild?.nativeElement,':not([data-p-hidden-focusable="true"])'):this.focusInput?.nativeElement;A(n)}show(){this.overlayVisible=!0}hide(e){this.overlayVisible=!1,this.resetFilter(),this.onHide.emit(e),this.cd.markForCheck()}clear(e){this.value=null,this.resetExpandedNodes(),this.resetPartialSelected(),this.onModelChange(this.value),this.onClear.emit(),e.stopPropagation()}checkValue(){return this.value!==null&&fe(this.value)}onTabKey(e,n=!1){n||(this.overlayVisible&&this.hasFocusableElements()?(A(e.shiftKey?this.lastHiddenFocusableElementOnOverlay.nativeElement:this.firstHiddenFocusableElementOnOverlay.nativeElement),e.preventDefault()):this.overlayVisible&&this.hide(this.filter))}hasFocusableElements(){return X(this.overlayViewChild.overlayViewChild.nativeElement,':not([data-p-hidden-focusable="true"])').length>0}resetFilter(){this.filter&&!this.resetFilterOnHide?(this.filteredNodes=this.treeViewChild?.filteredNodes,this.treeViewChild?.resetFilter()):this.filterValue=null}updateTreeState(){if(this.value){let e=this.selectionMode==="single"?[this.value]:[...this.value];this.resetExpandedNodes(),this.resetPartialSelected(),e&&this.options&&this.updateTreeBranchState(null,null,e)}}updateTreeBranchState(e,n,i){if(e){if(this.isSelected(e)&&(this.expandPath(n),i.splice(i.indexOf(e),1)),i.length>0&&e.children)for(let o of e.children)this.updateTreeBranchState(o,[...n,e],i)}else for(let o of this.options)this.updateTreeBranchState(o,[],i)}expandPath(e){for(let n of e)n.expanded=!0;this.expandedNodes=[...e]}nodeExpand(e){this.onNodeExpand.emit(e),this.expandedNodes.push(e.node)}nodeCollapse(e){this.onNodeCollapse.emit(e),this.expandedNodes.splice(this.expandedNodes.indexOf(e.node),1)}resetExpandedNodes(){for(let e of this.expandedNodes)e.expanded=!1;this.expandedNodes=[]}resetPartialSelected(e=this.options){if(e)for(let n of e)n.partialSelected=!1,n.children&&n.children?.length>0&&this.resetPartialSelected(n.children)}findSelectedNodes(e,n,i){if(e){if(this.isSelected(e)&&(i.push(e),delete n[e.key]),Object.keys(n).length&&e.children)for(let o of e.children)this.findSelectedNodes(o,n,i)}else for(let o of this.options)this.findSelectedNodes(o,n,i)}isSelected(e){return this.findIndexInSelection(e)!=-1}findIndexInSelection(e){let n=-1;if(this.value)if(this.selectionMode==="single")n=this.value.key&&this.value.key===e.key||this.value==e?0:-1;else for(let i=0;i<this.value.length;i++){let o=this.value[i];if(o.key&&o.key===e.key||o==e){n=i;break}}return n}onSelect(e){this.onNodeSelect.emit(e),this.selectionMode==="single"&&(this.hide(),this.focusInput?.nativeElement.focus())}onUnselect(e){this.onNodeUnselect.emit(e)}onInputFocus(e){this.disabled||(this.focused=!0,this.onFocus.emit(e))}onInputBlur(e){this.focused=!1,this.onBlur.emit(e),this.onModelTouched()}writeValue(e){this.value=e,this.updateTreeState(),this.cd.markForCheck()}registerOnChange(e){this.onModelChange=e}registerOnTouched(e){this.onModelTouched=e}setDisabledState(e){setTimeout(()=>{this.disabled=e,this.cd.markForCheck()})}get containerClass(){return this._componentStyle.classes.root({instance:this})}get hasFluid(){let n=this.el.nativeElement.closest("p-fluid");return this.fluid||!!n}get labelClass(){return this._componentStyle.classes.label({instance:this})}get emptyValue(){return!this.value||Object.keys(this.value).length===0}get emptyOptions(){return!this.options||this.options.length===0}get label(){let e=this.value||[];return e.length?e.map(n=>n.label).join(", "):this.selectionMode==="single"&&this.value?e.label:this.placeholder}static \u0275fac=(()=>{let e;return function(i){return(e||(e=R(t)))(i||t)}})();static \u0275cmp=P({type:t,selectors:[["p-treeSelect"],["p-treeselect"],["p-tree-select"]],contentQueries:function(n,i,o){if(n&1&&(T(o,bi,4),T(o,xi,4),T(o,vi,4),T(o,Si,4),T(o,Ci,4),T(o,Ni,4),T(o,wi,4),T(o,Ii,4),T(o,Ei,4),T(o,ki,4),T(o,Vi,4),T(o,Di,4),T(o,ae,4)),n&2){let r;_(r=h())&&(i.valueTemplate=r.first),_(r=h())&&(i.headerTemplate=r.first),_(r=h())&&(i.emptyTemplate=r.first),_(r=h())&&(i.footerTemplate=r.first),_(r=h())&&(i.clearIconTemplate=r.first),_(r=h())&&(i.triggerIconTemplate=r.first),_(r=h())&&(i.dropdownIconTemplate=r.first),_(r=h())&&(i.filterIconTemplate=r.first),_(r=h())&&(i.closeIconTemplate=r.first),_(r=h())&&(i.itemTogglerIconTemplate=r.first),_(r=h())&&(i.itemCheckboxIconTemplate=r.first),_(r=h())&&(i.itemLoadingIconTemplate=r.first),_(r=h())&&(i.templates=r)}},viewQuery:function(n,i){if(n&1&&(E(Mi,5),E(Oi,5),E(Fi,5),E($i,5),E(Li,5),E(zi,5),E(Ui,5),E(Ri,5)),n&2){let o;_(o=h())&&(i.containerEl=o.first),_(o=h())&&(i.focusInput=o.first),_(o=h())&&(i.filterViewChild=o.first),_(o=h())&&(i.treeViewChild=o.first),_(o=h())&&(i.panelEl=o.first),_(o=h())&&(i.overlayViewChild=o.first),_(o=h())&&(i.firstHiddenFocusableElementOnOverlay=o.first),_(o=h())&&(i.lastHiddenFocusableElementOnOverlay=o.first)}},inputs:{inputId:"inputId",scrollHeight:"scrollHeight",disabled:[2,"disabled","disabled",y],metaKeySelection:[2,"metaKeySelection","metaKeySelection",y],variant:"variant",display:"display",selectionMode:"selectionMode",tabindex:"tabindex",ariaLabel:"ariaLabel",ariaLabelledBy:"ariaLabelledBy",placeholder:"placeholder",panelClass:"panelClass",panelStyle:"panelStyle",fluid:[2,"fluid","fluid",y],panelStyleClass:"panelStyleClass",containerStyle:"containerStyle",containerStyleClass:"containerStyleClass",labelStyle:"labelStyle",labelStyleClass:"labelStyleClass",overlayOptions:"overlayOptions",emptyMessage:"emptyMessage",appendTo:"appendTo",filter:[2,"filter","filter",y],filterBy:"filterBy",filterMode:"filterMode",filterPlaceholder:"filterPlaceholder",filterLocale:"filterLocale",filterInputAutoFocus:[2,"filterInputAutoFocus","filterInputAutoFocus",y],propagateSelectionDown:[2,"propagateSelectionDown","propagateSelectionDown",y],propagateSelectionUp:[2,"propagateSelectionUp","propagateSelectionUp",y],showClear:[2,"showClear","showClear",y],resetFilterOnHide:[2,"resetFilterOnHide","resetFilterOnHide",y],virtualScroll:"virtualScroll",virtualScrollItemSize:"virtualScrollItemSize",size:"size",virtualScrollOptions:"virtualScrollOptions",autofocus:[2,"autofocus","autofocus",y],options:"options",showTransitionOptions:"showTransitionOptions",hideTransitionOptions:"hideTransitionOptions",loading:[2,"loading","loading",y]},outputs:{onNodeExpand:"onNodeExpand",onNodeCollapse:"onNodeCollapse",onShow:"onShow",onHide:"onHide",onClear:"onClear",onFilter:"onFilter",onFocus:"onFocus",onBlur:"onBlur",onNodeUnselect:"onNodeUnselect",onNodeSelect:"onNodeSelect"},features:[le([Nn,Ze]),q,H],decls:18,vars:30,consts:[["container",""],["focusInput",""],["defaultValueTemplate",""],["overlay",""],["content",""],["chipsValueTemplate",""],["panel",""],["firstHiddenFocusableEl",""],["tree",""],["lastHiddenFocusableEl",""],["empty",""],["togglericon",""],["checkboxicon",""],["loadingicon",""],[3,"click","ngClass","ngStyle"],[1,"p-hidden-accessible"],["type","text","role","combobox","readonly","",3,"focus","blur","keydown","disabled","pAutoFocus"],[1,"p-treeselect-label-container"],[3,"ngClass","ngStyle"],[4,"ngIf","ngIfElse"],[4,"ngIf"],["role","button","aria-haspopup","tree",1,"p-treeselect-dropdown"],[3,"styleClass",4,"ngIf"],["class","p-treeselect-dropdown-icon",4,"ngIf"],[3,"visibleChange","onAnimationStart","onBeforeHide","onShow","onHide","visible","options","target","appendTo","showTransitionOptions","hideTransitionOptions"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["class","p-treeselect-chip-item",4,"ngFor","ngForOf"],[1,"p-treeselect-chip-item"],["styleClass","p-treeselect-chip",3,"label"],[3,"class","click",4,"ngIf"],["class","p-treeselect-clear-icon",3,"click",4,"ngIf"],[3,"click"],[1,"p-treeselect-clear-icon",3,"click"],[4,"ngTemplateOutlet"],[3,"styleClass"],[1,"p-treeselect-dropdown-icon"],[1,"p-treeselect-overlay","p-component",3,"ngStyle","ngClass"],["role","presentation",1,"p-hidden-accessible","p-hidden-focusable",3,"focus"],[1,"p-treeselect-tree-container",3,"ngStyle"],[3,"selectionChange","onNodeExpand","onNodeCollapse","onNodeSelect","onNodeUnselect","value","propagateSelectionDown","propagateSelectionUp","selectionMode","selection","metaKeySelection","emptyMessage","filter","filterBy","filterMode","filterPlaceholder","filterLocale","filteredNodes","virtualScroll","virtualScrollItemSize","virtualScrollOptions","_templateMap","loading"]],template:function(n,i){if(n&1){let o=V();f(0,"div",14,0),x("click",function(p){return u(o),g(i.onClick(p))}),f(2,"div",15)(3,"input",16,1),x("focus",function(p){return u(o),g(i.onInputFocus(p))})("blur",function(p){return u(o),g(i.onInputBlur(p))})("keydown",function(p){return u(o),g(i.onKeyDown(p))}),m()(),f(5,"div",17)(6,"div",18),d(7,qi,2,5,"ng-container",19)(8,Yi,3,2,"ng-template",null,2,k),m()(),d(10,tn,3,2,"ng-container",20),f(11,"div",21),d(12,nn,1,1,"ChevronDownIcon",22)(13,ln,2,1,"span",23),m(),f(14,"p-overlay",24,3),Ne("visibleChange",function(p){return u(o),Ce(i.overlayVisible,p)||(i.overlayVisible=p),g(p)}),x("onAnimationStart",function(p){return u(o),g(i.onOverlayAnimationStart(p))})("onBeforeHide",function(p){return u(o),g(i.onOverlayBeforeHide(p))})("onShow",function(p){return u(o),g(i.onShow.emit(p))})("onHide",function(p){return u(o),g(i.hide(p))}),d(16,xn,15,46,"ng-template",null,4,k),m()()}if(n&2){let o,r,p=ge(9);O(i.containerStyleClass),a("ngClass",i.containerClass)("ngStyle",i.containerStyle),c(3),a("disabled",i.disabled)("pAutoFocus",i.autofocus),N("id",i.inputId)("tabindex",i.disabled?-1:i.tabindex)("aria-controls",i.overlayVisible?i.listId:null)("aria-haspopup","tree")("aria-expanded",(o=i.overlayVisible)!==null&&o!==void 0?o:!1)("aria-labelledby",i.ariaLabelledBy)("aria-label",i.ariaLabel||(i.label==="p-emptylabel"?void 0:i.label)),c(3),O(i.labelStyleClass),a("ngClass",i.labelClass)("ngStyle",i.labelStyle),c(),a("ngIf",i.valueTemplate||i._valueTemplate)("ngIfElse",p),c(3),a("ngIf",i.checkValue()&&!i.disabled&&i.showClear),c(),N("aria-expanded",(r=i.overlayVisible)!==null&&r!==void 0?r:!1)("aria-label","treeselect trigger"),c(),a("ngIf",!i.triggerIconTemplate&&!i._triggerIconTemplate&&!i.dropdownIconTemplate&&!i._dropdownIconTemplate),c(),a("ngIf",i.triggerIconTemplate||i._triggerIconTemplate||i.dropdownIconTemplate||i._dropdownIconTemplate),c(),Se("visible",i.overlayVisible),a("options",i.overlayOptions)("target","@parent")("appendTo",i.appendTo)("showTransitionOptions",i.showTransitionOptions)("hideTransitionOptions",i.hideTransitionOptions)}},dependencies:[J,K,j,W,Y,G,Ke,U,be,qe,Ue,ce,je],encapsulation:2,changeDetection:0})}return t})(),Co=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=pe({type:t});static \u0275inj=de({imports:[et,U,U]})}return t})();export{be as a,et as b,Co as c};
@@ -0,0 +1 @@
1
+ import{a as S,b as _}from"./chunk-KJWN47PL.js";import{f as V,j as W}from"./chunk-FDDNZH4H.js";import"./chunk-PCJXJ6O4.js";import"./chunk-7RH6F4PN.js";import"./chunk-DKWZOSVY.js";import{a as J,b as Q}from"./chunk-I72ECAQH.js";import{g as z}from"./chunk-3UAQZJAG.js";import"./chunk-Z53S4NM2.js";import{a as B,b as H,c as N,d as K,e as U,f as q,g as $}from"./chunk-YX7446ZM.js";import"./chunk-2LKTSMUI.js";import{s as F}from"./chunk-3ROVFYLI.js";import{d as G}from"./chunk-P4OJNULI.js";import"./chunk-S35HUXPS.js";import{p as O,w as j}from"./chunk-7X454BGN.js";import{s as T,t as R}from"./chunk-C4WUUVLC.js";import{Ac as g,Fb as E,Jc as k,Kc as x,Mc as s,Ob as l,Xc as L,Z as u,Zb as n,_b as a,ac as P,bc as I,c as f,cc as M,ga as y,ic as w,kb as c,ma as p,qc as i,rc as m,yb as b,yc as D,zc as C}from"./chunk-PQTHPF23.js";import{a as d,b as h}from"./chunk-EQDQRRRY.js";var X=(()=>{class t{constructor(){this.httpService=p(G)}fetchCashAndBankLoader(){return this.httpService.get("","api/CashAndBankLoader/GetCashAndBank")}fetchCashAndBankData(){return this.httpService.get("","api/CashAndBank/GetCashAndBank")}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var et={data:[],filter:[],options:{hasGeneralLedger:!1}},v=H($("cash-bank-store"),q(et),N(t=>({totalBalance:L(()=>t.data().reduce((r,e)=>r+e.balance,0))})),U(t=>{let r=p(X);return{loadCashAndBankLoader:S(f(u(()=>r.fetchCashAndBankLoader().pipe(_({next:e=>{console.log("response",e),B(t,o=>h(d({},o),{options:e.options}))},error:e=>{console.log("error",e)}}))))),loadCashAndBankData:S(f(u(()=>r.fetchCashAndBankData().pipe(_({next:e=>{console.log("response",e),B(t,o=>h(d({},o),{data:e}))},error:e=>{console.log("error",e)}})))))}}),K({onInit(t){t.loadCashAndBankLoader(),t.loadCashAndBankData()}}));var nt=["class","page"],at=()=>({"min-width":"50rem"}),ot=t=>[t],it=()=>["/report/general-ledger"],rt=t=>({id:t});function ct(t,r){t&1&&(n(0,"tr")(1,"th"),i(2,"Code"),a(),n(3,"th"),i(4,"Name"),a(),n(5,"th"),i(6,"Balance"),a()())}function pt(t,r){if(t&1&&(n(0,"tr")(1,"td"),i(2),a(),n(3,"td")(4,"a",7),i(5),a()(),n(6,"td")(7,"a",8),i(8),k(9,"number"),a()()()),t&2){let e=r.$implicit;c(2),m(e.code),c(2),l("routerLink",g(8,ot,"/chart-of-account/account/"+e.accountID)),c(),m(e.name),c(2),l("routerLink",C(10,it))("queryParams",g(11,rt,e.accountID)),c(),m(x(9,6,e.balance))}}function lt(t,r){if(t&1&&(n(0,"tr")(1,"td",9),i(2,"Total"),a(),n(3,"td"),i(4),k(5,"number"),a()()),t&2){let e=w();c(4),m(x(5,1,e.store.totalBalance()))}}var Y=(()=>{class t{constructor(){this.store=p(v),this.routeInfo=Z}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275cmp=b({type:t,selectors:[["app-cash-bank",8,"page"]],features:[D([v])],attrs:nt,decls:11,vars:4,consts:[["header",""],["body",""],["footer",""],["pageTitle","Cash and Bank",3,"routeInfo"],["ngProjectAs","action-button",5,["action-button"]],["ngProjectAs","content",5,["content"]],["stripedRows","",3,"value","tableStyle"],[1,"link","link-primary",3,"routerLink"],[1,"link","link-primary",3,"routerLink","queryParams"],["colspan","2",1,"text-end"]],template:function(o,A){o&1&&(n(0,"app-main-panel",3),M(1,4),P(2,5),n(3,"p-card")(4,"p-table",6),E(5,ct,7,0,"ng-template",null,0,s)(7,pt,10,13,"ng-template",null,1,s)(9,lt,6,3,"ng-template",null,2,s),a()(),I(),a()),o&2&&(l("routeInfo",A.routeInfo),c(4),l("value",A.store.data())("tableStyle",C(3,at)))},dependencies:[R,T,z,F,W,V,Q,J,j,O],styles:[".card[_ngcontent-%COMP%]{height:calc(100vh - 120px)}.card[_ngcontent-%COMP%] .card-body[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:inherit;overflow-y:auto}"],changeDetection:0})}}return t})();var Ht=[{path:"",component:Y,children:[]}],Z={path:"cash-of-account",title:"COA",iconName:"fa fa-calculator",class:"",label:"",labelClass:"",extralink:!1,submenu:[]};export{Ht as CASH_BANK_ROUTES,Z as CASH_BANK_ROUTE_PAGE};
@@ -1,4 +1,4 @@
1
- import{a as G}from"./chunk-KWULO2RL.js";import{e as z,ga as P,ma as A,na as H,oa as V,pa as g}from"./chunk-ZQDTA2BC.js";import{k as R,n as w,o as O,p as N,t as B}from"./chunk-DFW6MEY3.js";import{$b as b,Bb as k,Eb as c,Ka as x,Mb as D,Nb as r,Rb as $,Yb as f,Zb as u,ac as v,bc as y,fa as S,ga as F,hc as _,ic as j,jb as i,jc as h,kc as p,la as I,mc as d,nc as s,pc as C,qc as Q,wa as T,xb as E,xc as q,yb as M}from"./chunk-A63HKFUG.js";var K=["header"],L=["title"],U=["subtitle"],W=["content"],X=["footer"],Y=["*",[["p-header"]],[["p-footer"]]],Z=["*","p-header","p-footer"];function ee(e,o){e&1&&y(0)}function te(e,o){if(e&1&&(f(0,"div",8),h(1,1),c(2,ee,1,0,"ng-container",6),u()),e&2){let t=_();i(2),r("ngTemplateOutlet",t.headerTemplate||t._headerTemplate)}}function ne(e,o){if(e&1&&(b(0),C(1),v()),e&2){let t=_(2);i(),Q(t.header)}}function ae(e,o){e&1&&y(0)}function ie(e,o){if(e&1&&(f(0,"div",9),c(1,ne,2,1,"ng-container",10)(2,ae,1,0,"ng-container",6),u()),e&2){let t=_();i(),r("ngIf",t.header&&!t._titleTemplate&&!t.titleTemplate),i(),r("ngTemplateOutlet",t.titleTemplate||t._titleTemplate)}}function re(e,o){if(e&1&&(b(0),C(1),v()),e&2){let t=_(2);i(),Q(t.subheader)}}function oe(e,o){e&1&&y(0)}function le(e,o){if(e&1&&(f(0,"div",11),c(1,re,2,1,"ng-container",10)(2,oe,1,0,"ng-container",6),u()),e&2){let t=_();i(),r("ngIf",t.subheader&&!t._subtitleTemplate&&!t.subtitleTemplate),i(),r("ngTemplateOutlet",t.subtitleTemplate||t._subtitleTemplate)}}function ce(e,o){e&1&&y(0)}function pe(e,o){e&1&&y(0)}function de(e,o){if(e&1&&(f(0,"div",12),h(1,2),c(2,pe,1,0,"ng-container",6),u()),e&2){let t=_();i(2),r("ngTemplateOutlet",t.footerTemplate||t._footerTemplate)}}var se=({dt:e})=>`
1
+ import{h as G}from"./chunk-2LKTSMUI.js";import{Ea as P,Fa as A,Ga as H,Ha as g,Pa as V,pa as z}from"./chunk-3ROVFYLI.js";import{k as R,n as w,o as O,p as N,t as B}from"./chunk-C4WUUVLC.js";import{Cb as k,Fb as c,La as x,Nb as D,Ob as r,Sb as $,Zb as f,_b as u,ac as b,bc as v,cc as y,ga as S,ha as F,ic as _,jc as j,kb as i,kc as h,lc as p,ma as I,nc as d,oc as s,qc as C,rc as Q,xa as T,yb as E,yc as q,zb as M}from"./chunk-PQTHPF23.js";var K=["header"],L=["title"],U=["subtitle"],W=["content"],X=["footer"],Y=["*",[["p-header"]],[["p-footer"]]],Z=["*","p-header","p-footer"];function ee(e,o){e&1&&y(0)}function te(e,o){if(e&1&&(f(0,"div",8),h(1,1),c(2,ee,1,0,"ng-container",6),u()),e&2){let t=_();i(2),r("ngTemplateOutlet",t.headerTemplate||t._headerTemplate)}}function ne(e,o){if(e&1&&(b(0),C(1),v()),e&2){let t=_(2);i(),Q(t.header)}}function ae(e,o){e&1&&y(0)}function ie(e,o){if(e&1&&(f(0,"div",9),c(1,ne,2,1,"ng-container",10)(2,ae,1,0,"ng-container",6),u()),e&2){let t=_();i(),r("ngIf",t.header&&!t._titleTemplate&&!t.titleTemplate),i(),r("ngTemplateOutlet",t.titleTemplate||t._titleTemplate)}}function re(e,o){if(e&1&&(b(0),C(1),v()),e&2){let t=_(2);i(),Q(t.subheader)}}function oe(e,o){e&1&&y(0)}function le(e,o){if(e&1&&(f(0,"div",11),c(1,re,2,1,"ng-container",10)(2,oe,1,0,"ng-container",6),u()),e&2){let t=_();i(),r("ngIf",t.subheader&&!t._subtitleTemplate&&!t.subtitleTemplate),i(),r("ngTemplateOutlet",t.subtitleTemplate||t._subtitleTemplate)}}function ce(e,o){e&1&&y(0)}function pe(e,o){e&1&&y(0)}function de(e,o){if(e&1&&(f(0,"div",12),h(1,2),c(2,pe,1,0,"ng-container",6),u()),e&2){let t=_();i(2),r("ngTemplateOutlet",t.footerTemplate||t._footerTemplate)}}var se=({dt:e})=>`
2
2
  .p-card {
3
3
  background: ${e("card.background")};
4
4
  color: ${e("card.color")};
@@ -29,4 +29,4 @@ import{a as G}from"./chunk-KWULO2RL.js";import{e as z,ga as P,ma as A,na as H,oa
29
29
  .p-card-subtitle {
30
30
  color: ${e("card.subtitle.color")};
31
31
  }
32
- `,me={root:"p-card p-component",header:"p-card-header",body:"p-card-body",caption:"p-card-caption",title:"p-card-title",subtitle:"p-card-subtitle",content:"p-card-content",footer:"p-card-footer"},J=(()=>{class e extends P{name="card";theme=se;classes=me;static \u0275fac=(()=>{let t;return function(n){return(t||(t=T(e)))(n||e)}})();static \u0275prov=S({token:e,factory:e.\u0275fac})}return e})();var fe=(()=>{class e extends G{header;subheader;set style(t){z(this._style(),t)||this._style.set(t)}styleClass;headerFacet;footerFacet;headerTemplate;titleTemplate;subtitleTemplate;contentTemplate;footerTemplate;_headerTemplate;_titleTemplate;_subtitleTemplate;_contentTemplate;_footerTemplate;_style=x(null);_componentStyle=I(J);getBlockableElement(){return this.el.nativeElement.children[0]}templates;ngAfterContentInit(){this.templates.forEach(t=>{switch(t.getType()){case"header":this._headerTemplate=t.template;break;case"title":this._titleTemplate=t.template;break;case"subtitle":this._subtitleTemplate=t.template;break;case"content":this._contentTemplate=t.template;break;case"footer":this._footerTemplate=t.template;break;default:this._contentTemplate=t.template;break}})}static \u0275fac=(()=>{let t;return function(n){return(t||(t=T(e)))(n||e)}})();static \u0275cmp=E({type:e,selectors:[["p-card"]],contentQueries:function(l,n,m){if(l&1&&(p(m,A,5),p(m,H,5),p(m,K,4),p(m,L,4),p(m,U,4),p(m,W,4),p(m,X,4),p(m,V,4)),l&2){let a;d(a=s())&&(n.headerFacet=a.first),d(a=s())&&(n.footerFacet=a.first),d(a=s())&&(n.headerTemplate=a.first),d(a=s())&&(n.titleTemplate=a.first),d(a=s())&&(n.subtitleTemplate=a.first),d(a=s())&&(n.contentTemplate=a.first),d(a=s())&&(n.footerTemplate=a.first),d(a=s())&&(n.templates=a)}},inputs:{header:"header",subheader:"subheader",style:"style",styleClass:"styleClass"},features:[q([J]),k],ngContentSelectors:Z,decls:9,vars:10,consts:[[3,"ngClass","ngStyle"],["class","p-card-header",4,"ngIf"],[1,"p-card-body"],["class","p-card-title",4,"ngIf"],["class","p-card-subtitle",4,"ngIf"],[1,"p-card-content"],[4,"ngTemplateOutlet"],["class","p-card-footer",4,"ngIf"],[1,"p-card-header"],[1,"p-card-title"],[4,"ngIf"],[1,"p-card-subtitle"],[1,"p-card-footer"]],template:function(l,n){l&1&&(j(Y),f(0,"div",0),c(1,te,3,1,"div",1),f(2,"div",2),c(3,ie,3,2,"div",3)(4,le,3,2,"div",4),f(5,"div",5),h(6),c(7,ce,1,0,"ng-container",6),u(),c(8,de,3,1,"div",7),u()()),l&2&&($(n.styleClass),r("ngClass","p-card p-component")("ngStyle",n._style()),D("data-pc-name","card"),i(),r("ngIf",n.headerFacet||n.headerTemplate||n._headerTemplate),i(2),r("ngIf",n.header||n.titleTemplate||n._titleTemplate),i(),r("ngIf",n.subheader||n.subtitleTemplate||n._subtitleTemplate),i(3),r("ngTemplateOutlet",n.contentTemplate||n._contentTemplate),i(),r("ngIf",n.footerFacet||n.footerTemplate||n._footerTemplate))},dependencies:[B,R,w,N,O,g],encapsulation:2,changeDetection:0})}return e})(),ke=(()=>{class e{static \u0275fac=function(l){return new(l||e)};static \u0275mod=M({type:e});static \u0275inj=F({imports:[fe,g,g]})}return e})();export{fe as a,ke as b};
32
+ `,me={root:"p-card p-component",header:"p-card-header",body:"p-card-body",caption:"p-card-caption",title:"p-card-title",subtitle:"p-card-subtitle",content:"p-card-content",footer:"p-card-footer"},J=(()=>{class e extends V{name="card";theme=se;classes=me;static \u0275fac=(()=>{let t;return function(n){return(t||(t=T(e)))(n||e)}})();static \u0275prov=S({token:e,factory:e.\u0275fac})}return e})();var fe=(()=>{class e extends G{header;subheader;set style(t){z(this._style(),t)||this._style.set(t)}styleClass;headerFacet;footerFacet;headerTemplate;titleTemplate;subtitleTemplate;contentTemplate;footerTemplate;_headerTemplate;_titleTemplate;_subtitleTemplate;_contentTemplate;_footerTemplate;_style=x(null);_componentStyle=I(J);getBlockableElement(){return this.el.nativeElement.children[0]}templates;ngAfterContentInit(){this.templates.forEach(t=>{switch(t.getType()){case"header":this._headerTemplate=t.template;break;case"title":this._titleTemplate=t.template;break;case"subtitle":this._subtitleTemplate=t.template;break;case"content":this._contentTemplate=t.template;break;case"footer":this._footerTemplate=t.template;break;default:this._contentTemplate=t.template;break}})}static \u0275fac=(()=>{let t;return function(n){return(t||(t=T(e)))(n||e)}})();static \u0275cmp=E({type:e,selectors:[["p-card"]],contentQueries:function(l,n,m){if(l&1&&(p(m,P,5),p(m,A,5),p(m,K,4),p(m,L,4),p(m,U,4),p(m,W,4),p(m,X,4),p(m,H,4)),l&2){let a;d(a=s())&&(n.headerFacet=a.first),d(a=s())&&(n.footerFacet=a.first),d(a=s())&&(n.headerTemplate=a.first),d(a=s())&&(n.titleTemplate=a.first),d(a=s())&&(n.subtitleTemplate=a.first),d(a=s())&&(n.contentTemplate=a.first),d(a=s())&&(n.footerTemplate=a.first),d(a=s())&&(n.templates=a)}},inputs:{header:"header",subheader:"subheader",style:"style",styleClass:"styleClass"},features:[q([J]),k],ngContentSelectors:Z,decls:9,vars:10,consts:[[3,"ngClass","ngStyle"],["class","p-card-header",4,"ngIf"],[1,"p-card-body"],["class","p-card-title",4,"ngIf"],["class","p-card-subtitle",4,"ngIf"],[1,"p-card-content"],[4,"ngTemplateOutlet"],["class","p-card-footer",4,"ngIf"],[1,"p-card-header"],[1,"p-card-title"],[4,"ngIf"],[1,"p-card-subtitle"],[1,"p-card-footer"]],template:function(l,n){l&1&&(j(Y),f(0,"div",0),c(1,te,3,1,"div",1),f(2,"div",2),c(3,ie,3,2,"div",3)(4,le,3,2,"div",4),f(5,"div",5),h(6),c(7,ce,1,0,"ng-container",6),u(),c(8,de,3,1,"div",7),u()()),l&2&&($(n.styleClass),r("ngClass","p-card p-component")("ngStyle",n._style()),D("data-pc-name","card"),i(),r("ngIf",n.headerFacet||n.headerTemplate||n._headerTemplate),i(2),r("ngIf",n.header||n.titleTemplate||n._titleTemplate),i(),r("ngIf",n.subheader||n.subtitleTemplate||n._subtitleTemplate),i(3),r("ngTemplateOutlet",n.contentTemplate||n._contentTemplate),i(),r("ngIf",n.footerFacet||n.footerTemplate||n._footerTemplate))},dependencies:[B,R,w,N,O,g],encapsulation:2,changeDetection:0})}return e})(),ke=(()=>{class e{static \u0275fac=function(l){return new(l||e)};static \u0275mod=M({type:e});static \u0275inj=F({imports:[fe,g,g]})}return e})();export{fe as a,ke as b};