dealposbooks 1.9.1 → 1.9.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/3rdpartylicenses.txt +790 -89
- package/assets/scss/components/_scafholdings.scss +21 -17
- package/assets/scss/layouts/_sidebar.scss +1 -1
- package/assets/scss/layouts/dark/_dark.scss +164 -153
- package/assets/scss/style.scss +52 -12
- package/assets/scss/variables/_variables.scss +5 -3
- package/assets/world.json +17808 -1
- package/chunk-2US5D2LY.js +1 -0
- package/{chunk-TL6UHPBU.js → chunk-33XUIS57.js} +1 -1
- package/{chunk-SJTXIIX5.js → chunk-353U23ZQ.js} +1 -1
- package/chunk-3B65XZ6E.js +1 -0
- package/{chunk-YT7EC5LI.js → chunk-3CEJ67I5.js} +1 -1
- package/chunk-3E2EKFPH.js +1 -0
- package/{chunk-ZBTGGL5M.js → chunk-3ENMEUVK.js} +3 -3
- package/chunk-3H5KBX4R.js +1 -0
- package/chunk-3XLREP6U.js +297 -0
- package/{chunk-VYTUB2DV.js → chunk-4CUA33JH.js} +1 -1
- package/chunk-4NSHHAXV.js +1 -0
- package/{chunk-AKZM2DMY.js → chunk-5AITWOQZ.js} +1 -1
- package/{chunk-GHZLR44M.js → chunk-5QVQY32E.js} +1 -1
- package/chunk-6DPW74DP.js +1 -0
- package/chunk-6NCHCAKY.js +300 -0
- package/{chunk-HBVENULS.js → chunk-7DRL5PZZ.js} +1 -1
- package/chunk-7G6KXHQB.js +1 -0
- package/chunk-7KQDKLO4.js +70 -0
- package/chunk-7U2775BI.js +1 -0
- package/{chunk-G7MS6UI4.js → chunk-7U2I35GP.js} +1 -1
- package/{chunk-NNH4DORM.js → chunk-A47VRZZB.js} +1 -1
- package/chunk-ACQX2T2H.js +59 -0
- package/chunk-AG7353CN.js +1 -0
- package/chunk-AI6YS6T2.js +1 -0
- package/{chunk-FNOMC2TM.js → chunk-ANMXAMBL.js} +1 -1
- package/chunk-ARSLNNKY.js +7 -0
- package/chunk-AT7II4DO.js +7 -0
- package/{chunk-35EULUGT.js → chunk-BCXNVGDH.js} +1 -1
- package/chunk-BJNN42CI.js +1 -0
- package/chunk-CSQ4MHL2.js +246 -0
- package/chunk-DG6ETDOW.js +1 -0
- package/{chunk-TBHL2OSG.js → chunk-DIX7J6JH.js} +1 -1
- package/chunk-DMVAXVYQ.js +1 -0
- package/{chunk-2ACAW72E.js → chunk-DNSQSWOS.js} +1 -1
- package/chunk-F3PEWQT7.js +1 -0
- package/chunk-FTVGAWDW.js +1 -0
- package/{chunk-GLURPAU2.js → chunk-FUCSF42O.js} +1 -1
- package/chunk-FXUC6M2U.js +1 -0
- package/chunk-G4XX7EU2.js +1 -0
- package/chunk-GCGWIESO.js +1 -0
- package/{chunk-MS3UTNX6.js → chunk-GY53MWXH.js} +5 -5
- package/{chunk-CMHZLZ4E.js → chunk-H4V6YZX2.js} +1 -1
- package/chunk-IHJLTHHQ.js +1 -0
- package/{chunk-QBJKUIXK.js → chunk-J6H3BBKP.js} +1 -1
- package/chunk-JG5HGOEX.js +47 -0
- package/{chunk-PATWAZNE.js → chunk-LFDCJISD.js} +1 -1
- package/chunk-LFGL4ACG.css +1 -0
- package/chunk-LNRTAR2V.js +1 -0
- package/chunk-LWKS2JEV.js +1 -0
- package/chunk-N2XLL6HJ.js +33 -0
- package/chunk-NM37SDQJ.js +1 -0
- package/chunk-NN6GSTBJ.js +1 -0
- package/chunk-NRULEUE7.js +1 -0
- package/{chunk-CEMQLY34.js → chunk-O2GA6PH7.js} +1 -1
- package/{chunk-R3FUAON5.js → chunk-OAD4GTH6.js} +1 -1
- package/chunk-OCIKQOWD.js +328 -0
- package/{chunk-DWTUKOMR.js → chunk-PJKHUCJX.js} +1 -1
- package/chunk-PRRU3DEZ.js +503 -0
- package/{chunk-F6SXKAYF.js → chunk-PZBZVQUY.js} +1 -1
- package/chunk-Q2IWISMY.js +1 -0
- package/{chunk-BLOB7I4P.js → chunk-Q5BXN24W.js} +3 -3
- package/chunk-QIXIZZPY.js +1 -0
- package/{chunk-EKJXB6MV.js → chunk-RANHETC3.js} +2 -2
- package/chunk-RQEEJGOE.js +1 -0
- package/{chunk-VVC3QQUI.js → chunk-SGXU6X3O.js} +1 -1
- package/chunk-TDDTBHQE.js +1 -0
- package/{chunk-HZ7WPLLK.js → chunk-TNWHAKS6.js} +1 -1
- package/{chunk-26X2X35R.js → chunk-TPGKCMVN.js} +1 -1
- package/{chunk-7T6O4KFO.js → chunk-TYETQJ2X.js} +2 -2
- package/{chunk-CEUNPX5D.js → chunk-U5LD55IP.js} +1 -1
- package/chunk-U6SRN7P3.js +1 -0
- package/{chunk-IF72X7RS.js → chunk-V3B32QFK.js} +1 -1
- package/chunk-VBCJCAMN.js +1 -0
- package/chunk-W76GKZZU.js +1 -0
- package/chunk-WAJWW3TC.js +960 -0
- package/{chunk-Q4Y2IGA6.js → chunk-WM3NKRKN.js} +1 -1
- package/{chunk-HZLUYZB3.js → chunk-X4EHZEMZ.js} +1 -1
- package/chunk-X5SV4H5B.js +1 -0
- package/chunk-YQFG5XE2.js +1 -0
- package/chunk-YWYF6P7O.js +1 -0
- package/chunk-YYUWLV5N.js +1 -0
- package/chunk-ZB6TB7JI.js +180 -0
- package/{chunk-UNNEEFI2.js → chunk-ZPTNYW2S.js} +1 -1
- package/{chunk-ON4N4CPO.js → chunk-ZUALJ33O.js} +1 -1
- package/index.html +2 -2
- package/main-L6WVDQUB.js +1 -0
- package/main-YYIZ54AR.css +1 -0
- package/package.json +1 -1
- package/styles-7FHABE27.css +1 -0
- package/chunk-2VF35PRV.js +0 -7
- package/chunk-66DZK3FQ.js +0 -1
- package/chunk-6VN6A5B5.js +0 -520
- package/chunk-ABZUNDNB.js +0 -1
- package/chunk-AER6WLW5.js +0 -1
- package/chunk-AVL6C3VX.js +0 -59
- package/chunk-BPFNN32N.js +0 -1
- package/chunk-C375SLTS.js +0 -246
- package/chunk-C4HBNN2L.js +0 -1
- package/chunk-DO2YIWC5.js +0 -1
- package/chunk-E2RBYY7Q.js +0 -1
- package/chunk-EFOOUCV3.js +0 -301
- package/chunk-EHULZLLD.js +0 -300
- package/chunk-EQDQRRRY.js +0 -1
- package/chunk-GFHANKXL.js +0 -1
- package/chunk-GLLO2YQR.js +0 -1
- package/chunk-HZ6QN5ZG.js +0 -7
- package/chunk-I2MAIV44.js +0 -1
- package/chunk-I7T4W6G2.js +0 -47
- package/chunk-JXI4NDYT.js +0 -1
- package/chunk-KHZ5L5UR.js +0 -1
- package/chunk-LAZCPZXL.js +0 -1
- package/chunk-MEKP6D5H.js +0 -1
- package/chunk-NASSFXXN.js +0 -1
- package/chunk-NGKRNFZC.js +0 -1
- package/chunk-NTJQFRIB.js +0 -180
- package/chunk-OCYR2RTP.js +0 -1
- package/chunk-OVJSBJBH.js +0 -197
- package/chunk-P63Q5GYL.js +0 -1
- package/chunk-PGIXMWYT.js +0 -1
- package/chunk-PUEKZGWI.js +0 -1
- package/chunk-R6MI2SDH.js +0 -1
- package/chunk-RA2IZVJ4.js +0 -1
- package/chunk-ROX6NFMK.js +0 -297
- package/chunk-S64TQVWK.js +0 -1
- package/chunk-S6CFVRO6.js +0 -1
- package/chunk-USCTAGKM.js +0 -1
- package/chunk-USO7UKRV.js +0 -821
- package/chunk-UZOBSLZX.js +0 -1
- package/chunk-XCWBG4PB.js +0 -1
- package/main-TCYAGQCN.js +0 -1
- package/styles-H3D5FBL2.css +0 -1
package/chunk-C375SLTS.js
DELETED
|
@@ -1,246 +0,0 @@
|
|
|
1
|
-
import{a as st}from"./chunk-IF72X7RS.js";import{a as kn,b as Fn}from"./chunk-Q4Y2IGA6.js";import{a as H}from"./chunk-NNH4DORM.js";import{a as Mn,b as Pn,c as On,d as we,e as Ae}from"./chunk-QBJKUIXK.js";import"./chunk-ON4N4CPO.js";import"./chunk-GHZLR44M.js";import{a as E}from"./chunk-MEKP6D5H.js";import{d as _n}from"./chunk-F6SXKAYF.js";import{a as ot,b as rt}from"./chunk-UNNEEFI2.js";import{a as le,b as ce}from"./chunk-I7T4W6G2.js";import{a as fn,h as Tn,j as wn,k as An,l as En}from"./chunk-MS3UTNX6.js";import{g as Sn,h as at}from"./chunk-EHULZLLD.js";import"./chunk-AKZM2DMY.js";import"./chunk-AVL6C3VX.js";import{a as it,b as K}from"./chunk-G7MS6UI4.js";import{f as vn,g as B}from"./chunk-NTJQFRIB.js";import{d as In,e as yt,f as ae,g as se,h as nt,i as ge}from"./chunk-USO7UKRV.js";import{a as Q,b as gn,c as xn,e as Cn,f as yn,g as bn}from"./chunk-CMHZLZ4E.js";import{c as Ze,d as Yt,f as Jt,m as Ct,t as et,u as tt,v as hn}from"./chunk-OVJSBJBH.js";import{b as ee,c as te,e as ne,f as ye,g as Zt,h as V,i as Wt,j as Xt,l as be,o as Ie,r as ve,t as Se,u as Te}from"./chunk-E2RBYY7Q.js";import{a as De}from"./chunk-26X2X35R.js";import{B as an,G as sn,J as ln,N as cn,Q as _t,T as re,X as gt,Y as xt,aa as mn,ca as pn,f as ft,ha as un,k as tn,ka as Ye,la as Le,m as nn,n as on,na as dn,r as We,s as Xe,ta as Je,x as rn,y as ht}from"./chunk-35EULUGT.js";import{d as en}from"./chunk-CEUNPX5D.js";import{c as ut,d as dt,f as Ne,h as Ve}from"./chunk-F2X3VGZZ.js";import{m as ie,o as oe,p as R,w as N}from"./chunk-7T6O4KFO.js";import{j as _e,l as jt,m as D,n as pt,o as Ut,r as Qt,s as O,v as Fe}from"./chunk-SJTXIIX5.js";import{D as $e,Fa as I,Fc as zt,Gc as Gt,Ib as k,Ic as y,J as qe,Jb as c,L as Nt,Mb as ue,Nb as Oe,O as Vt,Rc as he,Sc as Ce,Tb as a,Ub as r,Uc as U,Vb as x,Vc as Ht,Wb as de,X as $,Xb as fe,Z as S,Zb as w,aa as Lt,ab as Me,ba as xe,bb as Dt,c as Ke,ca as ze,cc as v,dc as l,eb as Rt,ec as Bt,fb as m,fc as Kt,ha as g,hc as He,ic as X,jc as q,kc as z,lb as mt,lc as Y,mc as p,nc as M,oc as ke,pa as h,qa as _,qc as $t,rc as je,s as G,sa as Ee,sc as Ue,t as Ft,tb as P,tc as Qe,ub as Ge,uc as J,vc as F,wc as A,xb as Pe,xc as qt,ya as W,zb as d}from"./chunk-2VF35PRV.js";import{a as C,b}from"./chunk-EQDQRRRY.js";var jn=["class","page"],Un=n=>({id:n});function Qn(n,s){if(n&1){let e=w();a(0,"div",3)(1,"a",4),p(2,"Cancel"),r(),a(3,"a",4),x(4,"i",5),p(5," Edit"),r(),a(6,"p-button",6),v("onClick",function(){h(e);let i=l();return _(i.onDelete())}),r(),a(7,"a",7),p(8,"Ledger"),r()()}if(n&2){let e,t=l();m(7),c("queryParams",A(1,Un,(e=t.COAInfo())==null?null:e.id))}}function Zn(n,s){if(n&1&&(a(0,"div",9)(1,"div",10)(2,"p-card")(3,"div",11)(4,"div",12)(5,"div",13),p(6,"Name"),r(),a(7,"div",14),p(8),r()(),a(9,"div",12)(10,"div",13),p(11,"Code"),r(),a(12,"div",14),p(13),r()(),a(14,"div",12)(15,"div",13),p(16,"Category"),r(),a(17,"div",14),p(18),r()(),a(19,"div",12)(20,"div",13),p(21,"Note"),r(),a(22,"div",14),p(23),r()(),a(24,"div",12)(25,"div",13),p(26,"Outlet"),r(),a(27,"div",14),p(28),r()()()()()()),n&2){let e,t,i,o,u,f=l(2);m(8),M((e=f.COAInfo().name)!==null&&e!==void 0?e:"-"),m(5),M((t=f.COAInfo().code)!==null&&t!==void 0?t:"-"),m(5),M((i=f.COAInfo().category)!==null&&i!==void 0?i:"-"),m(5),M((o=f.COAInfo().note)!==null&&o!==void 0?o:"-"),m(5),M((u=f.COAInfo().outletName)!==null&&u!==void 0?u:"-")}}function Wn(n,s){if(n&1&&d(0,Zn,29,5,"div",8),n&2){let e=l();c("ngIf",e.COAInfo())}}var Nn=(()=>{class n{constructor(){this.#e=g(H),this.#t=g(ie),this.router=g(oe),this.COAInfo=I(null)}#e;#t;ngOnInit(){this.#t.paramMap.pipe(E("params"),$(e=>this.#e.getChartAccountById(e.get("id"))),S(e=>this.COAInfo.set(e)),E("response")).subscribe()}onDelete(){let t=[this.#t.snapshot.paramMap.get("id")];this.#e.deleteChartAccount(t).pipe(S(()=>{this.router.navigate(["/chart-of-account/account"])})).subscribe()}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=P({type:n,selectors:[["app-coa-account-info",8,"page"]],attrs:jn,decls:5,vars:0,consts:[["actionButton",""],["content",""],["pageTitle","Chart of Account Details"],[1,"d-flex","gap-2"],["routerLink","edit",1,"p-button","p-button-secondary","p-button-outlined"],[1,"fa-solid","fa-pen-to-square"],["label","Delete","icon","fa-solid fa-trash","severity","secondary","variant","outlined",3,"onClick"],["routerLink","/report/general-ledger",1,"p-button",3,"queryParams"],["class","row justify-content-center mt-3",4,"ngIf"],[1,"row","justify-content-center","mt-3"],[1,"col","col-lg-8"],[1,"d-flex","flex-column","row-gap-4"],[1,"row"],[1,"col","col-lg-3"],[1,"col"]],template:function(t,i){t&1&&(a(0,"app-main-panel",2),d(1,Qn,9,3,"ng-template",null,0,y)(3,Wn,1,1,"ng-template",null,1,y),r())},dependencies:[O,D,Se,Ze,N,R,B,K,it,se,ae],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return n})();var pe=(()=>{class n{constructor(){this.httpService=g(en)}fetchCOACategories(){return this.httpService.get("","api/ChartOfAccount/Category")}getCOACategoryByID(e){let t={params:e};return this.httpService.get("","api/ChartOfAccount/CategoryInfo",t)}renameCategory(e,t){return this.httpService.put("",`api/ChartOfAccount/RenameCategory/${e}`,t)}updateParentCategory(e,t){return this.httpService.put("",`api/ChartOfAccount/UpdateParentCategory/${e}`,t).pipe()}deleteCategory(e){return this.httpService.delete("",`api/ChartOfAccount/Category/${e}`)}submitCategory(e,t={}){return this.httpService.post("","api/ChartOfAccount/SubmitCategory",e,t)}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275prov=xe({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var It=n=>n?n.reduce((s,e)=>(s.push({label:e.label,data:e.data,key:e.key}),e.children&&e.children.length?s.push(...It(e.children)):s.push({label:`${e.label} (no children)`,data:e.data,key:`${e.key}-no-children`}),s),[]):[];var vt=(n,s,e)=>{let t=Math.ceil(e/s),i=(n-1)*s+1,o=Math.min(n*s,e);return{start:i,end:o,totalRecords:e,totalPages:t}};var Xn={filter:{RowCount:20,PageNumber:1,CategoryID:"",Text:"",listOutletID:[]},options:{entities:[],categories:[]},data:[],count:0,perPages:[{key:20,value:"20 per page"},{key:40,value:"40 per page"},{key:60,value:"60 per page"},{key:80,value:"80 per page"},{key:100,value:"100 per page"}]},St=gn(yn(Xn),bn("ChartOfAccount"),xn(n=>({isAllChecked:U(()=>n.data().every(s=>s.checked)),checkedItems:U(()=>n.data().filter(s=>s.checked)),IDsChecked:U(()=>n.data().filter(s=>s.checked).map(s=>s.id)),categories:U(()=>It(n.options.categories())),first:U(()=>{let{start:s}=vt(n.filter().PageNumber,n.filter().RowCount,n.count());return s}),last:U(()=>{let{end:s}=vt(n.filter().PageNumber,n.filter().RowCount,n.count());return s})})),Cn(n=>{let s=g(H),e=g(pe),t={updateFilter(i){Q(n,{filter:C({},i)})},checkedItem(i){if(Array.isArray(i))i.forEach(o=>{let u=n.data().map(f=>f.id===o.id?b(C({},f),{checked:!o.checked}):f);Q(n,{data:u})});else{let o=i,u=n.data().map(f=>f.id===o.id?b(C({},f),{checked:!o.checked}):f);Q(n,{data:u})}},checkAllCheckbox(){let i=n.data().map(o=>b(C({},o),{checked:!o.checked}));Q(n,{data:i})},fetchChartOfAccount:ot(Ke($e(()=>!!n.filter()),Nt(300),Vt(),$(i=>s.getPaginatedChartAccounts(i).pipe(G(o=>b(C({},o),{data:o.data.map(u=>b(C({},u),{checked:!1}))})),rt({next:o=>Q(n,{data:o.data,count:o.count}),error:o=>{Q(n,{data:[],count:0}),console.error(o)}}))))),fetchLoader:ot(Ke($(()=>s.getChartOfAccountLoader().pipe(rt({next:i=>{Q(n,{filter:{RowCount:i.filter.rowCount,PageNumber:1,CategoryID:i.filter.categoryID||null,Text:"",listOutletID:[]},options:i.options}),t.fetchChartOfAccount(n.filter)},error:i=>{console.error(i)}}))))),getCategories:ot(Ke(qe(()=>e.fetchCOACategories().pipe(rt({next:i=>{Q(n,{options:{entities:n.options.entities(),categories:i}})},error:i=>{console.error(i)}})))))};return t}));var Yn=["*"],Jn=({dt:n})=>`
|
|
2
|
-
.p-buttongroup .p-button {
|
|
3
|
-
margin: 0;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
.p-buttongroup .p-button:not(:last-child),
|
|
7
|
-
.p-buttongroup .p-button:not(:last-child):hover {
|
|
8
|
-
border-right: 0 none;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.p-buttongroup .p-button:not(:first-of-type):not(:last-of-type) {
|
|
12
|
-
border-radius: 0;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.p-buttongroup .p-button:first-of-type:not(:only-of-type) {
|
|
16
|
-
border-start-end-radius: 0;
|
|
17
|
-
border-end-end-radius: 0;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.p-buttongroup .p-button:last-of-type:not(:only-of-type) {
|
|
21
|
-
border-start-start-radius: 0;
|
|
22
|
-
border-end-start-radius: 0;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.p-buttongroup .p-button:focus {
|
|
26
|
-
position: relative;
|
|
27
|
-
z-index: 1;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.p-buttongroup {
|
|
31
|
-
display:flex;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.p-buttongroup > .p-button {
|
|
35
|
-
flex: 1;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
/* For PrimeNG */
|
|
39
|
-
|
|
40
|
-
.p-buttongroup .p-button:focus,
|
|
41
|
-
.p-buttongroup p-button:focus .p-button,
|
|
42
|
-
.p-buttonset .p-button:focus,
|
|
43
|
-
.p-buttonset .p-button:focus,
|
|
44
|
-
.p-buttonset p-button:focus .p-button,
|
|
45
|
-
.p-buttonset .p-button:focus {
|
|
46
|
-
position: relative;
|
|
47
|
-
z-index: 1;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
.p-buttongroup .p-button:not(:last-child),
|
|
51
|
-
.p-buttongroup .p-button:not(:last-child):hover,
|
|
52
|
-
.p-buttongroup p-button:not(:last-child) .p-button,
|
|
53
|
-
.p-buttongroup p-button:not(:last-child) .p-button:hover,
|
|
54
|
-
.p-buttonset .p-button:not(:last-child),
|
|
55
|
-
.p-buttonset .p-button:not(:last-child):hover,
|
|
56
|
-
.p-buttonset p-button:not(:last-child) .p-button,
|
|
57
|
-
.p-buttonset p-button:not(:last-child) .p-button:hover {
|
|
58
|
-
border-right: 0 none;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
.p-buttongroup .p-button:not(:first-of-type):not(:last-of-type),
|
|
62
|
-
.p-buttongroup p-button:not(:first-of-type):not(:last-of-type) .p-button,
|
|
63
|
-
.p-buttonset .p-button:not(:first-of-type):not(:last-of-type),
|
|
64
|
-
.p-buttonset p-button:not(:first-of-type):not(:last-of-type) .p-button {
|
|
65
|
-
border-radius: 0;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
.p-buttongroup .p-button:first-of-type:not(:only-of-type),
|
|
69
|
-
.p-buttongroup p-button:first-of-type:not(:only-of-type) .p-button,
|
|
70
|
-
.p-buttonset .p-button:first-of-type:not(:only-of-type),
|
|
71
|
-
.p-buttonset p-button:first-of-type:not(:only-of-type) .p-button {
|
|
72
|
-
border-start-end-radius: 0;
|
|
73
|
-
border-end-end-radius: 0;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
.p-buttongroup .p-button:last-of-type:not(:only-of-type),
|
|
77
|
-
.p-buttongroup p-button:last-of-type:not(:only-of-type) .p-button,
|
|
78
|
-
.p-buttonset .p-button:last-of-type:not(:only-of-type),
|
|
79
|
-
.p-buttonset p-button:last-of-type:not(:only-of-type) .p-button {
|
|
80
|
-
border-start-start-radius: 0;
|
|
81
|
-
border-end-start-radius: 0;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
p-button[iconpos='right'] spinnericon {
|
|
85
|
-
order: 1;
|
|
86
|
-
}
|
|
87
|
-
`,ei={root:"p-buttongroup p-component"},Vn=(()=>{class n extends Je{name="buttongroup";theme=Jn;classes=ei;static \u0275fac=(()=>{let e;return function(i){return(e||(e=Ee(n)))(i||n)}})();static \u0275prov=xe({token:n,factory:n.\u0275fac})}return n})();var ti=(()=>{class n extends De{_componentStyle=g(Vn);static \u0275fac=(()=>{let e;return function(i){return(e||(e=Ee(n)))(i||n)}})();static \u0275cmp=P({type:n,selectors:[["p-buttonGroup"],["p-buttongroup"],["p-button-group"]],features:[J([Vn]),Pe],ngContentSelectors:Yn,decls:2,vars:0,consts:[["role","group",1,"p-buttongroup","p-component"]],template:function(t,i){t&1&&(Bt(),a(0,"span",0),Kt(1),r())},dependencies:[O],encapsulation:2,changeDetection:0})}return n})(),Ln=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275mod=Ge({type:n});static \u0275inj=ze({imports:[ti]})}return n})();var ii=["class","page"],oi=()=>({height:"calc(100vh - 70px)"}),ri=n=>["../account/",n],ai=()=>["/report/general-ledger"],si=n=>({id:n}),li=()=>({width:"100%"}),ci=()=>({scrollHeight:"200px"});function mi(n,s){if(n&1){let e=w();a(0,"p-button",13),v("onClick",function(){h(e);let i=l(2);return _(i.deleteCOA())}),r()}}function pi(n,s){if(n&1&&(a(0,"div",7),d(1,mi,1,0,"p-button",8),x(2,"p-button",9)(3,"p-button",10),a(4,"a",11),x(5,"i",12),p(6," Add"),r()()),n&2){let e=l();m(),c("ngIf",e.store.checkedItems().length)}}function ui(n,s){n&1&&(a(0,"tr")(1,"th",15),x(2,"p-tableHeaderCheckbox"),r(),a(3,"th"),p(4,"Code"),r(),a(5,"th"),p(6,"Name"),r(),a(7,"th"),p(8,"Category"),r(),a(9,"th"),p(10,"Outlet"),r(),a(11,"th",16),p(12,"Balance"),r()())}function di(n,s){if(n&1&&(a(0,"tr")(1,"td"),x(2,"p-tableCheckbox",17),r(),a(3,"td"),p(4),r(),a(5,"td")(6,"a",18),p(7),r()(),a(8,"td"),p(9),r(),a(10,"td"),p(11),r(),a(12,"td",16)(13,"a",19),p(14),zt(15,"number"),r()()()),n&2){let e,t=s.$implicit;m(2),c("value",t),m(2),M(t.code),m(2),c("routerLink",A(11,ri,t.id)),m(),M(t.name),m(2),M(t.category),m(2),M(t.outletName),m(2),c("routerLink",F(13,ai))("queryParams",A(14,si,t.id)),m(),M(Gt(15,9,(e=t.balance)!==null&&e!==void 0?e:0))}}function fi(n,s){if(n&1&&p(0),n&2){let e=l(2);$t(" Showing ",e.store.first()," to ",e.store.last()," of ",e.store.count()," entries ")}}function hi(n,s){if(n&1){let e=w();a(0,"p-panel")(1,"p-table",14),v("onLazyLoad",function(i){h(e);let o=l();return _(o.loadData(i))})("onRowSelect",function(i){h(e);let o=l();return _(o.onRowSelect(i))})("onRowUnselect",function(i){h(e);let o=l();return _(o.onRowUnselect(i))})("onHeaderCheckboxToggle",function(i){h(e);let o=l();return _(o.onSelectAll(i))})("onPage",function(i){h(e);let o=l();return _(o.onPageChange(i))}),d(2,ui,13,0,"ng-template",null,3,y)(4,di,16,16,"ng-template",null,4,y)(6,fi,1,3,"ng-template",null,5,y),r()()}if(n&2){let e=l();ue(F(9,oi)),m(),c("lazy",!0)("value",e.store.data())("paginator",!0)("rows",e.store.filter().RowCount)("totalRecords",e.store.count())("scrollable",!0)("scrollHeight","calc(100vh - 150px)")}}function _i(n,s){if(n&1){let e=w();a(0,"form",21)(1,"div",22)(2,"label",23),p(3,"Outlet"),r(),x(4,"p-multiselect",24),r(),a(5,"div",22)(6,"label",23),p(7,"Category"),r(),a(8,"p-treeselect",25),v("onFocus",function(){h(e);let i=l(2);return _(i.onCategoryFocus())}),r()(),a(9,"div",26)(10,"label",23),p(11,"Page Size"),r(),x(12,"input",27),r()()}if(n&2){let e=l(2);c("formGroup",e.formFilter),m(4),c("showClear",!0)("virtualScroll",!0)("virtualScrollItemSize",50)("options",e.store.options().entities),m(4),ue(F(12,li)),c("showClear",!0)("virtualScroll",!0)("virtualScrollItemSize",50)("virtualScrollOptions",F(13,ci))("options",e.categoryNodes())}}function gi(n,s){if(n&1&&d(0,_i,13,14,"form",20),n&2){let e=l();c("ngIf",e.formFilter)}}var Rn=(()=>{class n{ngOnInit(){this.store.fetchLoader(),console.log(this.store.filter().RowCount),this.generateFilterForm()}#e;constructor(){this.routeInfo=Bn,this.store=g(St),this.#e=g(H),this.modalService=g(Yt),this.dialogVisible=I(!1),this.categoryNodes=I([]),this.fb=g(ve),this.isDialogFilterVisible=I(!1),this.generateFilterForm()}generateFilterForm(){this.formFilter=this.fb.group({outletID:this.fb.control([]),categoryID:this.fb.control(null),pageSize:this.fb.control(this.store.filter().RowCount)})}onPageChange(e){console.log("Page changed to: ",e),this.store.updateFilter(b(C({},this.store.filter()),{PageNumber:e.first/e.rows+1}))}onCategoryFocus(){this.#e.getCachedCategoriesOptions().pipe(S(e=>this.categoryNodes.set(e))).subscribe()}onRowSelect(e){console.log("Row select event: ",e),this.store.checkedItem(e.data)}onRowUnselect(e){console.log("Row unselect event: ",e),this.store.checkedItem(e.data)}onSelectAll(e){console.log("Select all event: ",e),this.store.checkAllCheckbox()}loadData(e){console.log("Lazy load event: ",e)}onSearch(e){console.log("Search text: ",e),this.store.updateFilter(b(C({},this.store.filter()),{Text:e}))}updateFilter(e,t){this.store.updateFilter(b(C({},this.store.filter()),{[e]:t}))}checkAllCheckBox(){this.store.checkAllCheckbox()}checkedItem(e){this.store.checkedItem(e)}deleteCOA(){this.#e.deleteChartAccount(this.store.IDsChecked()).pipe(E("response"),S(e=>{console.log("Delete COA Response: ",e),this.store.updateFilter(C({},this.store.filter()))})).subscribe()}onSearchEvent(e){this.store.updateFilter(b(C({},this.store.filter()),{Text:e.trim()}))}onFilterEvent(){this.dialogVisible.update(e=>!e)}onFilterOKEvent(){let{categoryID:e,pageSize:t,outletID:i}=this.formFilter.value;this.store.updateFilter(b(C({},this.store.filter()),{listOutletID:i,CategoryID:e?e.key:"",RowCount:+t})),this.isDialogFilterVisible.update(o=>!o)}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=P({type:n,selectors:[["app-cash-of-account",8,"page"]],features:[J([St])],attrs:ii,decls:7,vars:3,consts:[["actionButton",""],["content",""],["filters",""],["header",""],["body",""],["paginatorleft",""],["pageTitle","Chart of Account",3,"search","isDialogFilterVisibleChange","filterEmitted","filterConfirmed","isSearchableInput","isDialogFilterVisible","isFilterable"],[1,"d-flex","gap-2"],["icon","fa-solid fa-trash","label","Delete","severity","danger",3,"onClick",4,"ngIf"],["severity","secondary","label","Import","icon","fa-solid fa-upload","variant","outlined"],["severity","secondary","label","Export","icon","fa-solid fa-download","variant","outlined"],["routerLink","add",1,"p-button"],[1,"fa-solid","fa-plus"],["icon","fa-solid fa-trash","label","Delete","severity","danger",3,"onClick"],["dataKey","id","styleClass","d-flex flex-column justify-content-between h-100",1,"",3,"onLazyLoad","onRowSelect","onRowUnselect","onHeaderCheckboxToggle","onPage","lazy","value","paginator","rows","totalRecords","scrollable","scrollHeight"],[2,"width","4rem"],[1,"text-end"],[3,"value"],[1,"link-primary",3,"routerLink"],[1,"link","link-primary",3,"routerLink","queryParams"],["class","d-flex flex-column row-gap-3",3,"formGroup",4,"ngIf"],[1,"d-flex","flex-column","row-gap-3",3,"formGroup"],[1,"d-flex","flex-column","position-relative"],["for",""],["appendTo","body","formControlName","outletID","optionLabel","name","optionValue","id","placeholder","Select an Outlet",3,"showClear","virtualScroll","virtualScrollItemSize","options"],["containerStyleClass","w-100","filter","","filterBy","label","appendTo","body","formControlName","categoryID","optionLabel","label","optionValue","key","placeholder","Select a Category",1,"w-100",3,"onFocus","showClear","virtualScroll","virtualScrollItemSize","virtualScrollOptions","options"],[1,"d-flex","flex-column"],["formControlName","pageSize","type","text","pInputText",""]],template:function(t,i){if(t&1){let o=w();a(0,"app-main-panel",6),v("search",function(f){return h(o),_(i.onSearchEvent(f))}),Qe("isDialogFilterVisibleChange",function(f){return h(o),Ue(i.isDialogFilterVisible,f)||(i.isDialogFilterVisible=f),_(f)}),v("filterEmitted",function(){return h(o),_(i.onFilterEvent())})("filterConfirmed",function(){return h(o),_(i.onFilterOKEvent())}),d(1,pi,7,1,"ng-template",null,0,y)(3,hi,8,10,"ng-template",null,1,y)(5,gi,1,1,"ng-template",null,2,y),r()}t&2&&(c("isSearchableInput",!0),je("isDialogFilterVisible",i.isDialogFilterVisible),c("isFilterable",!0))},dependencies:[O,D,Qt,B,Jt,Ln,st,Se,Xt,ee,ne,ye,N,R,Te,be,Ie,Ze,En,Tn,wn,An,K,vn,se,ae,at,tt,et,ge,Pn,Mn,Ae,we,ce,le],styles:[".p-card{height:100%} .p-card .p-card-body{height:inherit} .p-card .p-card-body .p-card-content{height:inherit}"],changeDetection:0})}}return n})();var Ci=["class","page"],yi=()=>["../"],At=n=>({"ng-invalid ng-dirty":n}),bi=n=>({"ng-dirty ng-invalid":n});function Ii(n,s){if(n&1){let e=w();a(0,"div",5)(1,"a",6),p(2,"Cancel"),r(),a(3,"p-button",7),v("onClick",function(){h(e);let i=l();return _(i.onSubmit())}),r()()}n&2&&(m(),c("routerLink",F(1,yi)))}function vi(n,s){n&1&&(a(0,"div",25),p(1," Name is required "),r())}function Si(n,s){if(n&1&&(a(0,"div"),d(1,vi,2,0,"div",24),r()),n&2){let e=l(2);m(),c("ngIf",e.form.controls.Name.errors.required)}}function Ti(n,s){n&1&&(a(0,"div",26)(1,"p"),p(2," If you assign an outlet for this product, it is only visible for users who has access to that outlet. "),r()())}function wi(n,s){if(n&1&&(a(0,"span",27),p(1),r()),n&2){let e=s.$implicit;c("pTooltip",e.name),m(),ke(" ",e.name," ")}}function Ai(n,s){n&1&&(a(0,"div",25),p(1," Code is required "),r())}function Ei(n,s){if(n&1&&(a(0,"div"),d(1,Ai,2,0,"div",24),r()),n&2){let e=l(2);m(),c("ngIf",e.form.controls.Code.errors.required)}}function Mi(n,s){n&1&&(a(0,"div",25),p(1," Category is required "),r())}function Pi(n,s){if(n&1&&(a(0,"div"),d(1,Mi,2,0,"div",24),r()),n&2){let e=l(2);m(),c("ngIf",e.form.controls.Category.errors.required)}}function Oi(n,s){n&1&&(a(0,"div",25),p(1," Note is required "),r())}function ki(n,s){if(n&1&&(a(0,"div"),d(1,Oi,2,0,"div",24),r()),n&2){let e=l(2);m(),c("ngIf",e.form.controls.Note.errors.required)}}function Fi(n,s){if(n&1&&(a(0,"p-panel",8)(1,"div",9)(2,"div",10)(3,"div",11)(4,"div",12)(5,"div",13)(6,"label",14),p(7,"Name"),r(),x(8,"input",15),d(9,Si,2,1,"div",16),r()(),a(10,"div",12)(11,"div",13)(12,"div")(13,"label",14),p(14,"Outlet"),r(),x(15,"p-button",17),d(16,Ti,3,0,"ng-template",null,2,y),r(),a(18,"p-select",18),d(19,wi,2,2,"ng-template",null,3,y),r()()(),a(21,"div",12)(22,"div",13)(23,"label",14),p(24,"Code"),r(),x(25,"input",19),d(26,Ei,2,1,"div",16),r()(),a(27,"div",20)(28,"div",21)(29,"label",14),p(30,"Category"),r(),x(31,"p-treeselect",22),d(32,Pi,2,1,"div",16),r()(),a(33,"div",12)(34,"div",13)(35,"label",14),p(36,"Note"),r(),x(37,"textarea",23),d(38,ki,2,1,"div",16),r()()()()()()),n&2){let e=Y(17),t=l();m(),c("formGroup",t.form),m(7),c("ngClass",A(14,At,t.form.controls.Name.invalid&&(t.form.controls.Name.dirty||t.form.controls.Name.touched))),m(),c("ngIf",t.form.controls.Name.invalid&&(t.form.controls.Name.dirty||t.form.controls.Name.touched)),m(6),c("pTooltip",e)("rounded",!0)("text",!0),m(3),c("options",t.outlets()),m(7),c("ngClass",A(16,At,t.form.controls.Code.invalid&&(t.form.controls.Code.dirty||t.form.controls.Code.touched))),m(),c("ngIf",t.form.controls.Code.invalid&&(t.form.controls.Code.dirty||t.form.controls.Code.touched)),m(5),c("options",t.categoryOptions())("ngClass",A(18,bi,t.form.controls.Category.invalid&&(t.form.controls.Category.dirty||t.form.controls.Category.touched))),m(),c("ngIf",t.form.controls.Category.invalid&&(t.form.controls.Category.dirty||t.form.controls.Category.touched)),m(5),c("ngClass",A(20,At,t.form.controls.Note.invalid&&(t.form.controls.Note.dirty||t.form.controls.Note.touched))),m(),c("ngIf",t.form.controls.Note.errors)}}var Et=(()=>{class n{constructor(){this.route=g(ie),this.coa_service=g(H),this.coa_info=I(null),this.fb=g(ve),this.isEdit=I(!1),this.categoryOptions=I([]),this.router=g(oe),this.outlets=U(()=>this.coa_info()?this.coa_info().options.entities:[])}findParenChilds(e,t){function i(o,u=null){for(let f of o){if(f.key===t)return{parent:u,child:f};if(f.children){let L=i(f.children,f);if(L)return L}}return null}return i(e)}generateForm(e){this.form=this.fb.group({ID:new V(e.id||""),Name:new V(e.name||"",[te.required]),Code:new V(e.code||"",[te.required]),Note:new V(e.note||"",[]),Balance:new V(e.balance||0),Outlet:new V(e.outletID||""),AccessType:new V(e.accessTypeID||0),Category:new V(null,[te.required])})}ngOnInit(){this.generateForm({id:"",name:"",code:"",note:"",balance:0,outletID:"",accessTypeID:0,categoryID:null}),this.fetchLoader(),this.fetchCategoryOptions()}fetchLoader(){this.route.paramMap.pipe(qe(e=>{if(e.has("id")){this.isEdit.set(!0);let t=e.get("id");return this.coa_service.getChartAccountFormById(t)}else return this.coa_service.getChartAccountForm()}),E("response"),G(e=>b(C({},e),{form:b(C({},e.form),{categoryID:e.form.categoryID==="00000000-0000-0000-0000-000000000000"?"":e.form.categoryID})})),S(e=>{this.coa_info.set(e),this.generateForm(e.form)})).subscribe()}onSubmit(){if(this.form.invalid){this.form.markAllAsTouched();return}let{AccessType:e,Balance:t,Category:i,Code:o,Name:u,Note:f,Outlet:L}=this.form.value,T={id:this.coa_info().form.id,categoryID:i.key,name:u,code:o,note:f,outletID:L||null,balance:t,accessTypeID:e};this.coa_service.submitChartAccount(T).pipe(S(()=>{this.form.reset(),this.router.navigate(["/chart-of-account/account"])}),E("response")).subscribe()}fetchCategoryOptions(){this.coa_service.getCachedCategoriesOptions().pipe(E("response"),S(e=>{this.categoryOptions.set(e);let t=this.findParenChilds(this.categoryOptions(),this.coa_info()?.form?.categoryID);this.form.controls.Category.setValue(t?.child)})).subscribe()}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=P({type:n,selectors:[["app-coa-account-form",8,"page"]],attrs:Ci,decls:5,vars:1,consts:[["actionButton",""],["content",""],["tooltipContent",""],["item",""],["pageTitle","Chart Of Account Form",3,"hasMainWrapperPadding"],[1,"d-flex","gap-2"],["type","button",1,"p-button","p-button-secondary","p-button-outlined",3,"routerLink"],["label","Submit",3,"onClick"],["styleClass","rounded-2"],[1,"row","justify-content-center",3,"formGroup"],[1,"col"],[1,"row","row-gap-2"],[1,"col","col-lg-6"],[1,"d-flex","flex-column"],["for",""],["size","small","formControlName","Name","type","text","pInputText","",3,"ngClass"],[4,"ngIf"],["icon","fa-solid fa-circle-info",3,"pTooltip","rounded","text"],["appendTo","body","formControlName","Outlet","optionLabel","name","optionValue","id","placeholder","Select Outlet",3,"options"],["size","small","formControlName","Code","type","text","pInputText","",3,"ngClass"],[1,"co","col-lg-6"],[1,"form-group","d-flex","flex-column"],["formControlName","Category","containerStyleClass","w-full","placeholder","Select a Category",1,"w-full",3,"options","ngClass"],["pSize","small","rows","5","cols","30","pTextarea","","formControlName","Note",3,"ngClass"],["class","invalid-feedback text-danger d-block",4,"ngIf"],[1,"invalid-feedback","text-danger","d-block"],[1,"flex","items-center"],[1,"d-inline-block","text-truncate",2,"max-width","200px",3,"pTooltip"]],template:function(t,i){t&1&&(a(0,"app-main-panel",4),d(1,Ii,4,2,"ng-template",null,0,y)(3,Fi,39,22,"ng-template",null,1,y),r()),t&2&&c("hasMainWrapperPadding",!0)},dependencies:[B,Te,ee,ne,ye,be,Ie,st,O,_e,D,N,R,Ae,we,K,tt,et,Fn,kn,at,Sn,ge,nt,se,ae,ce,le],styles:["[_nghost-%COMP%]{display:block}[_nghost-%COMP%] .p-treeselect{width:100%!important}"],changeDetection:0})}}return n})();var Vi=["sublist"],Li=(n,s)=>({"p-contextmenu-submenu":n,"p-contextmenu-root-list":s}),Di=()=>({"p-contextmenu-item-link":!0}),$n=()=>({class:"p-contextmenu-submenu-icon"}),Ri=()=>({exact:!1}),Bi=n=>({"p-contextmenu-item-link":!0,"p-disabled":n}),Ki=n=>({$implicit:n});function $i(n,s){if(n&1&&x(0,"li",8),n&2){let e=l().$implicit,t=l(2);ue(t.getItemProp(e,"style")),c("ngClass",t.getSeparatorItemClass(e)),k("id",t.getItemId(e))("data-pc-section","separator")}}function qi(n,s){if(n&1&&x(0,"span",19),n&2){let e=l(4).$implicit,t=l(2);c("ngClass",t.getItemProp(e,"icon"))("ngStyle",t.getItemProp(e,"iconStyle")),k("data-pc-section","icon")("aria-hidden",!0)("tabindex",-1)}}function zi(n,s){if(n&1&&(a(0,"span",20),p(1),r()),n&2){let e=l(4).$implicit,t=l(2);k("data-pc-section","label"),m(),ke(" ",t.getItemLabel(e)," ")}}function Gi(n,s){if(n&1&&x(0,"span",21),n&2){let e=l(4).$implicit,t=l(2);c("innerHTML",t.getItemLabel(e),Me),k("data-pc-section","label")}}function Hi(n,s){if(n&1&&x(0,"p-badge",22),n&2){let e=l(4).$implicit,t=l(2);c("styleClass",t.getItemProp(e,"badgeStyleClass"))("value",t.getItemProp(e,"badge"))}}function ji(n,s){n&1&&x(0,"AngleRightIcon"),n&2&&(Oe("p-contextmenu-submenu-icon"),k("data-pc-section","submenuicon")("aria-hidden",!0))}function Ui(n,s){}function Qi(n,s){n&1&&d(0,Ui,0,0,"ng-template",25),n&2&&c("data-pc-section","submenuicon")("aria-hidden",!0)}function Zi(n,s){if(n&1&&(de(0),d(1,ji,1,4,"AngleRightIcon",23)(2,Qi,1,2,null,24),fe()),n&2){let e=l(6);m(),c("ngIf",!e.contextMenu.submenuIconTemplate&&!e.contextMenu._submenuIconTemplate),m(),c("ngTemplateOutlet",e.contextMenu.submenuIconTemplate||e.contextMenu._submenuIconTemplate)("ngTemplateOutletContext",F(3,$n))}}function Wi(n,s){if(n&1&&(a(0,"a",15),d(1,qi,1,5,"span",16)(2,zi,2,2,"span",17)(3,Gi,1,2,"ng-template",null,2,y)(5,Hi,1,2,"p-badge",18)(6,Zi,3,4,"ng-container",11),r()),n&2){let e=Y(4),t=l(3).$implicit,i=l(2);c("target",i.getItemProp(t,"target"))("ngClass",F(12,Di)),k("href",i.getItemProp(t,"url"),Dt)("aria-hidden",!0)("data-automationid",i.getItemProp(t,"automationId"))("data-pc-section","action")("tabindex",-1),m(),c("ngIf",i.getItemProp(t,"icon")),m(),c("ngIf",i.getItemProp(t,"escape"))("ngIfElse",e),m(3),c("ngIf",i.getItemProp(t,"badge")),m(),c("ngIf",i.isItemGroup(t))}}function Xi(n,s){if(n&1&&x(0,"span",19),n&2){let e=l(4).$implicit,t=l(2);c("ngClass",t.getItemProp(e,"icon"))("ngStyle",t.getItemProp(e,"iconStyle")),k("data-pc-section","icon")("aria-hidden",!0)("tabindex",-1)}}function Yi(n,s){if(n&1&&(a(0,"span",20),p(1),r()),n&2){let e=l(4).$implicit,t=l(2);k("data-pc-section","label"),m(),ke(" ",t.getItemLabel(e)," ")}}function Ji(n,s){if(n&1&&x(0,"span",21),n&2){let e=l(4).$implicit,t=l(2);c("innerHTML",t.getItemLabel(e),Me),k("data-pc-section","label")}}function eo(n,s){if(n&1&&x(0,"p-badge",22),n&2){let e=l(4).$implicit,t=l(2);c("styleClass",t.getItemProp(e,"badgeStyleClass"))("value",t.getItemProp(e,"badge"))}}function to(n,s){n&1&&x(0,"AngleRightIcon"),n&2&&(Oe("p-contextmenu-submenu-icon"),k("data-pc-section","submenuicon")("aria-hidden",!0))}function no(n,s){}function io(n,s){n&1&&d(0,no,0,0,"ng-template",25),n&2&&c("data-pc-section","submenuicon")("aria-hidden",!0)}function oo(n,s){if(n&1&&(de(0),d(1,to,1,4,"AngleRightIcon",23)(2,io,1,2,null,24),fe()),n&2){let e=l(6);m(),c("ngIf",!e.contextMenu.submenuIconTemplate&&!e.contextMenu._submenuIconTemplate),m(),c("ngTemplateOutlet",!e.contextMenu.submenuIconTemplate||!e.contextMenu._submenuIconTemplate)("ngTemplateOutletContext",F(3,$n))}}function ro(n,s){if(n&1&&(a(0,"a",26),d(1,Xi,1,5,"span",16)(2,Yi,2,2,"span",17)(3,Ji,1,2,"ng-template",null,2,y)(5,eo,1,2,"p-badge",18)(6,oo,3,4,"ng-container",11),r()),n&2){let e=Y(4),t=l(3).$implicit,i=l(2);c("routerLink",i.getItemProp(t,"routerLink"))("queryParams",i.getItemProp(t,"queryParams"))("routerLinkActiveOptions",i.getItemProp(t,"routerLinkActiveOptions")||F(20,Ri))("target",i.getItemProp(t,"target"))("ngClass",A(21,Bi,i.getItemProp(t,"disabled")))("fragment",i.getItemProp(t,"fragment"))("queryParamsHandling",i.getItemProp(t,"queryParamsHandling"))("preserveFragment",i.getItemProp(t,"preserveFragment"))("skipLocationChange",i.getItemProp(t,"skipLocationChange"))("replaceUrl",i.getItemProp(t,"replaceUrl"))("state",i.getItemProp(t,"state")),k("data-automationid",i.getItemProp(t,"automationId"))("tabindex",-1)("aria-hidden",!0)("data-pc-section","action"),m(),c("ngIf",i.getItemProp(t,"icon")),m(),c("ngIf",i.getItemProp(t,"escape"))("ngIfElse",e),m(3),c("ngIf",i.getItemProp(t,"badge")),m(),c("ngIf",i.isItemGroup(t))}}function ao(n,s){if(n&1&&(de(0),d(1,Wi,7,13,"a",13)(2,ro,7,23,"a",14),fe()),n&2){let e=l(2).$implicit,t=l(2);m(),c("ngIf",!t.getItemProp(e,"routerLink")),m(),c("ngIf",t.getItemProp(e,"routerLink"))}}function so(n,s){}function lo(n,s){n&1&&d(0,so,0,0,"ng-template")}function co(n,s){if(n&1&&(de(0),d(1,lo,1,0,null,24),fe()),n&2){let e=l(2).$implicit,t=l(2);m(),c("ngTemplateOutlet",t.itemTemplate)("ngTemplateOutletContext",A(2,Ki,e.item))}}function mo(n,s){if(n&1){let e=w();a(0,"p-contextmenu-sub",27),v("itemClick",function(i){h(e);let o=l(4);return _(o.itemClick.emit(i))})("itemMouseEnter",function(i){h(e);let o=l(4);return _(o.onItemMouseEnter(i))}),r()}if(n&2){let e=l(2).$implicit,t=l(2);c("items",e.items)("itemTemplate",t.itemTemplate)("menuId",t.menuId)("visible",t.isItemActive(e)&&t.isItemGroup(e))("activeItemPath",t.activeItemPath)("focusedItemId",t.focusedItemId)("level",t.level+1)}}function po(n,s){if(n&1){let e=w();a(0,"li",9,1)(2,"div",10),v("click",function(i){h(e);let o=l().$implicit,u=l(2);return _(u.onItemClick(i,o))})("mouseenter",function(i){h(e);let o=l().$implicit,u=l(2);return _(u.onItemMouseEnter({$event:i,processedItem:o}))}),d(3,ao,3,2,"ng-container",11)(4,co,2,4,"ng-container",11),r(),d(5,mo,1,7,"p-contextmenu-sub",12),r()}if(n&2){let e=l(),t=e.$implicit,i=e.index,o=l(2);Oe(o.getItemProp(t,"styleClass")),c("ngStyle",o.getItemProp(t,"style"))("ngClass",o.getItemClass(t))("tooltipOptions",o.getItemProp(t,"tooltipOptions")),k("id",o.getItemId(t))("data-pc-section","menuitem")("data-p-highlight",o.isItemActive(t))("data-p-focused",o.isItemFocused(t))("data-p-disabled",o.isItemDisabled(t))("aria-label",o.getItemLabel(t))("aria-disabled",o.isItemDisabled(t)||void 0)("aria-haspopup",o.isItemGroup(t)&&!o.getItemProp(t,"to")?"menu":void 0)("aria-expanded",o.isItemGroup(t)?o.isItemActive(t):void 0)("aria-level",o.level+1)("aria-setsize",o.getAriaSetSize())("aria-posinset",o.getAriaPosInset(i)),m(2),k("data-pc-section","content"),m(),c("ngIf",!o.itemTemplate),m(),c("ngIf",o.itemTemplate),m(),c("ngIf",o.isItemVisible(t)&&o.isItemGroup(t))}}function uo(n,s){if(n&1&&d(0,$i,1,5,"li",6)(1,po,6,21,"li",7),n&2){let e=s.$implicit,t=l(2);c("ngIf",t.isItemVisible(e)&&t.getItemProp(e,"separator")),m(),c("ngIf",t.isItemVisible(e)&&!t.getItemProp(e,"separator"))}}function fo(n,s){if(n&1){let e=w();a(0,"ul",4,0),v("@overlayAnimation.start",function(i){h(e);let o=Y(1),u=l();return _(u.onEnter(i,o))})("keydown",function(i){h(e);let o=l();return _(o.menuKeydown.emit(i))})("focus",function(i){h(e);let o=l();return _(o.menuFocus.emit(i))})("blur",function(i){h(e);let o=l();return _(o.menuBlur.emit(i))}),d(2,uo,2,2,"ng-template",5),r()}if(n&2){let e=l();c("ngClass",qt(10,Li,!e.root,e.root))("@overlayAnimation",e.visible)("tabindex",e.tabindex),k("id",e.menuId+"_list")("aria-label",e.ariaLabel)("aria-labelledBy",e.ariaLabelledBy)("aria-activedescendant",e.focusedItemId)("aria-orientation","vertical")("data-pc-section","menu"),m(2),c("ngForOf",e.items)}}var ho=["item"],_o=["submenuicon"],go=["rootmenu"],xo=["container"],Co=n=>({"p-contextmenu p-component":!0,"p-contextmenu-mobile":n}),yo=()=>({value:"visible"});function bo(n,s){if(n&1){let e=w();a(0,"div",3,0),v("@overlayAnimation.start",function(i){h(e);let o=l();return _(o.onOverlayAnimationStart(i))})("@overlayAnimation.done",function(i){h(e);let o=l();return _(o.onOverlayAnimationEnd(i))}),a(2,"p-contextmenu-sub",4,1),v("itemClick",function(i){h(e);let o=l();return _(o.onItemClick(i))})("menuFocus",function(i){h(e);let o=l();return _(o.onMenuFocus(i))})("menuBlur",function(i){h(e);let o=l();return _(o.onMenuBlur(i))})("menuKeydown",function(i){h(e);let o=l();return _(o.onKeyDown(i))})("itemMouseEnter",function(i){h(e);let o=l();return _(o.onItemMouseEnter(i))}),r()()}if(n&2){let e=l();Oe(e.styleClass),c("ngClass",A(20,Co,e.queryMatches))("ngStyle",e.style)("@overlayAnimation",F(22,yo)),k("data-pc-section","root")("data-pc-name","contextmenu")("id",e.id),m(2),c("root",!0)("items",e.processedItems)("itemTemplate",e.itemTemplate||e._itemTemplate)("menuId",e.id)("tabindex",e.disabled?-1:e.tabindex)("ariaLabel",e.ariaLabel)("ariaLabelledBy",e.ariaLabelledBy)("baseZIndex",e.baseZIndex)("autoZIndex",e.autoZIndex)("visible",e.submenuVisible())("focusedItemId",e.focused?e.focusedItemId:void 0)("activeItemPath",e.activeItemPath())}}var Io=({dt:n})=>`
|
|
88
|
-
.p-contextmenu {
|
|
89
|
-
position: absolute;
|
|
90
|
-
background: ${n("contextmenu.background")};
|
|
91
|
-
color: ${n("contextmenu.color")};
|
|
92
|
-
border: 1px solid ${n("contextmenu.border.color")};
|
|
93
|
-
border-radius: ${n("contextmenu.border.radius")};
|
|
94
|
-
box-shadow: ${n("contextmenu.shadow")};
|
|
95
|
-
min-width: 12.5rem;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
.p-contextmenu-root-list,
|
|
99
|
-
.p-contextmenu-submenu {
|
|
100
|
-
margin: 0;
|
|
101
|
-
padding: ${n("contextmenu.list.padding")};
|
|
102
|
-
list-style: none;
|
|
103
|
-
outline: 0 none;
|
|
104
|
-
display: flex;
|
|
105
|
-
flex-direction: column;
|
|
106
|
-
gap: ${n("contextmenu.list.gap")};
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
.p-contextmenu-submenu {
|
|
110
|
-
position: absolute;
|
|
111
|
-
display: flex;
|
|
112
|
-
flex-direction: column;
|
|
113
|
-
min-width: 100%;
|
|
114
|
-
z-index: 1;
|
|
115
|
-
background: ${n("contextmenu.background")};
|
|
116
|
-
color: ${n("contextmenu.color")};
|
|
117
|
-
border: 1px solid ${n("contextmenu.border.color")};
|
|
118
|
-
border-radius: ${n("contextmenu.border.radius")};
|
|
119
|
-
box-shadow: ${n("contextmenu.shadow")};
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
.p-contextmenu-item {
|
|
123
|
-
position: relative;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
.p-contextmenu-item-content {
|
|
127
|
-
transition: background ${n("contextmenu.transition.duration")}, color ${n("contextmenu.transition.duration")};
|
|
128
|
-
border-radius: ${n("contextmenu.item.border.radius")};
|
|
129
|
-
color: ${n("contextmenu.item.color")};
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
.p-contextmenu-item-link {
|
|
133
|
-
cursor: pointer;
|
|
134
|
-
display: flex;
|
|
135
|
-
align-items: center;
|
|
136
|
-
text-decoration: none;
|
|
137
|
-
overflow: hidden;
|
|
138
|
-
position: relative;
|
|
139
|
-
color: inherit;
|
|
140
|
-
padding: ${n("contextmenu.item.padding")};
|
|
141
|
-
gap: ${n("contextmenu.item.gap")};
|
|
142
|
-
user-select: none;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
.p-contextmenu-item-label {
|
|
146
|
-
line-height: 1;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
.p-contextmenu-item-icon {
|
|
150
|
-
color: ${n("contextmenu.item.icon.color")};
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
.p-contextmenu-submenu-icon {
|
|
154
|
-
color: ${n("contextmenu.submenu.icon.color")};
|
|
155
|
-
margin-left: auto;
|
|
156
|
-
font-size: ${n("contextmenu.submenu.icon.size")};
|
|
157
|
-
width: ${n("contextmenu.submenu.icon.size")};
|
|
158
|
-
height: ${n("contextmenu.submenu.icon.size")};
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
.p-contextmenu-submenu-icon:dir(rtl) {
|
|
162
|
-
margin-left: 0;
|
|
163
|
-
margin-right: auto;
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
.p-contextmenu-item.p-focus > .p-contextmenu-item-content {
|
|
167
|
-
color: ${n("contextmenu.item.focus.color")};
|
|
168
|
-
background: ${n("contextmenu.item.focus.background")};
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
.p-contextmenu-item.p-focus > .p-contextmenu-item-content .p-contextmenu-item-icon {
|
|
172
|
-
color: ${n("contextmenu.item.icon.focus.color")};
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
.p-contextmenu-item.p-focus > .p-contextmenu-item-content .p-contextmenu-submenu-icon {
|
|
176
|
-
color: ${n("contextmenu.submenu.icon.focus.color")};
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
.p-contextmenu-item:not(.p-disabled) > .p-contextmenu-item-content:hover {
|
|
180
|
-
color: ${n("contextmenu.item.focus.color")};
|
|
181
|
-
background: ${n("contextmenu.item.focus.background")};
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
.p-contextmenu-item:not(.p-disabled) > .p-contextmenu-item-content:hover .p-contextmenu-item-icon {
|
|
185
|
-
color: ${n("contextmenu.item.icon.focus.color")};
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
.p-contextmenu-item:not(.p-disabled) > .p-contextmenu-item-content:hover .p-contextmenu-submenu-icon {
|
|
189
|
-
color: ${n("contextmenu.submenu.icon.focus.color")};
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
.p-contextmenu-item-active > .p-contextmenu-item-content {
|
|
193
|
-
color: ${n("contextmenu.item.active.color")};
|
|
194
|
-
background: ${n("contextmenu.item.active.background")};
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
.p-contextmenu-item-active > .p-contextmenu-item-content .p-contextmenu-item-icon {
|
|
198
|
-
color: ${n("contextmenu.item.icon.active.color")};
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
.p-contextmenu-item-active > .p-contextmenu-item-content .p-contextmenu-submenu-icon {
|
|
202
|
-
color: ${n("contextmenu.submenu.icon.active.color")};
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
.p-contextmenu-separator {
|
|
206
|
-
border-top: 1px solid ${n("contextmenu.separator.border.color")};
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
.p-contextmenu-enter-from,
|
|
210
|
-
.p-contextmenu-leave-active {
|
|
211
|
-
opacity: 0;
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
.p-contextmenu-enter-active {
|
|
215
|
-
transition: opacity 250ms;
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
.p-contextmenu-mobile .p-contextmenu-submenu {
|
|
219
|
-
position: static;
|
|
220
|
-
box-shadow: none;
|
|
221
|
-
border: 0 none;
|
|
222
|
-
padding-left: ${n("tieredmenu.submenu.mobile.indent")};
|
|
223
|
-
padding-right: 0;
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
.p-contextmenu-mobile .p-contextmenu-submenu-icon {
|
|
227
|
-
transition: transform 0.2s;
|
|
228
|
-
transform: rotate(90deg);
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
.p-contextmenu-mobile .p-contextmenu-item-active > .p-contextmenu-item-content .p-contextmenu-submenu-icon {
|
|
232
|
-
transform: rotate(-90deg);
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
/* For PrimeNG */
|
|
236
|
-
.p-contextmenu-submenu-icon.p-iconwrapper {
|
|
237
|
-
margin-left: auto;
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
.p-contextmenu-submenu-icon.p-iconwrapper:dir(rtl) {
|
|
241
|
-
margin-left: 0;
|
|
242
|
-
margin-right: auto;
|
|
243
|
-
}
|
|
244
|
-
`,vo={root:"p-contextmenu p-component",rootList:"p-contextmenu-root-list",item:({instance:n,processedItem:s})=>["p-contextmenu-item",{"p-contextmenu-item-active":n.isItemActive(s),"p-focus":n.isItemFocused(s),"p-disabled":n.isItemDisabled(s)}],itemContent:"p-contextmenu-item-content",itemLink:"p-contextmenu-item-link",itemIcon:"p-contextmenu-item-icon",itemLabel:"p-contextmenu-item-label",submenuIcon:"p-contextmenu-submenu-icon",submenu:"p-contextmenu-submenu",separator:"p-contextmenu-separator"},Kn=(()=>{class n extends Je{name="contextmenu";theme=Io;classes=vo;static \u0275fac=(()=>{let e;return function(i){return(e||(e=Ee(n)))(i||n)}})();static \u0275prov=xe({token:n,factory:n.\u0275fac})}return n})();var So=(()=>{class n extends De{contextMenu;visible=!1;items;itemTemplate;root=!1;autoZIndex=!0;baseZIndex=0;popup;menuId;ariaLabel;ariaLabelledBy;level=0;focusedItemId;activeItemPath;tabindex=0;itemClick=new W;itemMouseEnter=new W;menuFocus=new W;menuBlur=new W;menuKeydown=new W;sublistViewChild;constructor(e){super(),this.contextMenu=e}getItemProp(e,t,i=null){return e&&e.item?xt(e.item[t],i):void 0}getItemId(e){return e.item&&e.item?.id?e.item.id:`${this.menuId}_${e.key}`}getItemKey(e){return this.getItemId(e)}getItemClass(e){return b(C({},this.getItemProp(e,"class")),{"p-contextmenu-item":!0,"p-contextmenu-item-active":this.isItemActive(e),"p-focus":this.isItemFocused(e),"p-disabled":this.isItemDisabled(e)})}getItemLabel(e){return this.getItemProp(e,"label")}getSeparatorItemClass(e){return b(C({},this.getItemProp(e,"class")),{"p-contextmenu-separator":!0})}getAriaSetSize(){return this.items.filter(e=>this.isItemVisible(e)&&!this.getItemProp(e,"separator")).length}getAriaPosInset(e){return e-this.items.slice(0,e).filter(t=>this.isItemVisible(t)&&this.getItemProp(t,"separator")).length+1}isItemVisible(e){return this.getItemProp(e,"visible")!==!1}isItemActive(e){if(this.activeItemPath)return this.activeItemPath.some(t=>t.key===e.key)}isItemDisabled(e){return this.getItemProp(e,"disabled")}isItemFocused(e){return this.focusedItemId===this.getItemId(e)}isItemGroup(e){return re(e.items)}onItemMouseEnter(e){let{event:t,processedItem:i}=e;this.itemMouseEnter.emit({originalEvent:t,processedItem:i})}onItemClick(e,t){this.getItemProp(t,"command",{originalEvent:e,item:t.item}),this.itemClick.emit({originalEvent:e,processedItem:t,isFocus:!0})}onEnter(e,t){if(e.fromState==="void"&&e.toState){let i=e.element;this.position(i)}}position(e){let t=e.parentElement.parentElement,i=an(e.parentElement.parentElement),o=ft(),u=e.offsetParent?e.offsetWidth:ht(e),f=tn(t.children[0]);e.style.top="0px",parseInt(i.left,10)+f+u>o.width-on()?e.style.left=-1*u+"px":e.style.left=f+"px"}static \u0275fac=function(t){return new(t||n)(mt(Lt(()=>lt)))};static \u0275cmp=P({type:n,selectors:[["p-contextMenuSub"],["p-contextmenu-sub"]],viewQuery:function(t,i){if(t&1&&X(Vi,5),t&2){let o;q(o=z())&&(i.sublistViewChild=o.first)}},inputs:{visible:[2,"visible","visible",he],items:"items",itemTemplate:"itemTemplate",root:[2,"root","root",he],autoZIndex:[2,"autoZIndex","autoZIndex",he],baseZIndex:[2,"baseZIndex","baseZIndex",Ce],popup:[2,"popup","popup",he],menuId:"menuId",ariaLabel:"ariaLabel",ariaLabelledBy:"ariaLabelledBy",level:[2,"level","level",Ce],focusedItemId:"focusedItemId",activeItemPath:"activeItemPath",tabindex:[2,"tabindex","tabindex",Ce]},outputs:{itemClick:"itemClick",itemMouseEnter:"itemMouseEnter",menuFocus:"menuFocus",menuBlur:"menuBlur",menuKeydown:"menuKeydown"},features:[Pe],decls:1,vars:1,consts:[["sublist",""],["listItem",""],["htmlLabel",""],["role","menu",3,"ngClass","tabindex","keydown","focus","blur",4,"ngIf"],["role","menu",3,"keydown","focus","blur","ngClass","tabindex"],["ngFor","",3,"ngForOf"],["role","separator",3,"style","ngClass",4,"ngIf"],["role","menuitem","pTooltip","",3,"ngStyle","ngClass","class","tooltipOptions",4,"ngIf"],["role","separator",3,"ngClass"],["role","menuitem","pTooltip","",3,"ngStyle","ngClass","tooltipOptions"],[1,"p-contextmenu-item-content",3,"click","mouseenter"],[4,"ngIf"],[3,"items","itemTemplate","menuId","visible","activeItemPath","focusedItemId","level","itemClick","itemMouseEnter",4,"ngIf"],["pRipple","",3,"target","ngClass",4,"ngIf"],["pRipple","",3,"routerLink","queryParams","routerLinkActiveOptions","target","ngClass","fragment","queryParamsHandling","preserveFragment","skipLocationChange","replaceUrl","state",4,"ngIf"],["pRipple","",3,"target","ngClass"],["class","p-contextmenu-item-icon",3,"ngClass","ngStyle",4,"ngIf"],["class","p-contextmenu-item-label",4,"ngIf","ngIfElse"],[3,"styleClass","value",4,"ngIf"],[1,"p-contextmenu-item-icon",3,"ngClass","ngStyle"],[1,"p-contextmenu-item-label"],[1,"p-contextmenu-item-label",3,"innerHTML"],[3,"styleClass","value"],[3,"class",4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"data-pc-section","aria-hidden"],["pRipple","",3,"routerLink","queryParams","routerLinkActiveOptions","target","ngClass","fragment","queryParamsHandling","preserveFragment","skipLocationChange","replaceUrl","state"],[3,"itemClick","itemMouseEnter","items","itemTemplate","menuId","visible","activeItemPath","focusedItemId","level"]],template:function(t,i){t&1&&d(0,fo,3,13,"ul",3),t&2&&c("ngIf",i.root?!0:i.visible)},dependencies:[n,O,_e,jt,D,Ut,pt,N,R,hn,ge,nt,fn,yt,In,Le],encapsulation:2,data:{animation:[ut("overlayAnimation",[Ve(":enter",[Ne({opacity:0})]),Ve(":leave",[Ne({opacity:0})])])]}})}return n})(),lt=(()=>{class n extends De{overlayService;set model(e){this._model=e,this._processedItems=this.createProcessedItems(this._model||[])}get model(){return this._model}triggerEvent="contextmenu";target;global;style;styleClass;appendTo;autoZIndex=!0;baseZIndex=0;id;breakpoint="960px";ariaLabel;ariaLabelledBy;pressDelay=500;onShow=new W;onHide=new W;rootmenu;containerViewChild;container;outsideClickListener;resizeListener;triggerEventListener;documentClickListener;documentTriggerListener;touchEndListener;pageX;pageY;visible=I(!1);relativeAlign;window;focused=!1;activeItemPath=I([]);focusedItemInfo=I({index:-1,level:0,parentKey:"",item:null});submenuVisible=I(!1);searchValue="";searchTimeout;_processedItems;_model;pressTimer;matchMediaListener;query;queryMatches;_componentStyle=g(Kn);get visibleItems(){let e=this.activeItemPath().find(t=>t.key===this.focusedItemInfo().parentKey);return e?e.items:this.processedItems}get processedItems(){return(!this._processedItems||!this._processedItems.length)&&(this._processedItems=this.createProcessedItems(this.model||[])),this._processedItems}get focusedItemId(){let e=this.focusedItemInfo();return e.item&&e.item?.id?e.item.id:e.index!==-1?`${this.id}${re(e.parentKey)?"_"+e.parentKey:""}_${e.index}`:null}constructor(e){super(),this.overlayService=e,Ht(()=>{let t=this.activeItemPath();re(t)?this.bindGlobalListeners():this.visible()||this.unbindGlobalListeners()})}ngOnInit(){super.ngOnInit(),this.id=this.id||pn("pn_id_"),this.bindMatchMediaListener(),this.bindTriggerEventListener()}isMobile(){return ln()||sn()}bindTriggerEventListener(){Fe(this.platformId)&&(this.triggerEventListener||(this.isMobile()?this.global?(this.triggerEventListener=this.renderer.listen(this.document,"touchstart",this.onTouchStart.bind(this)),this.touchEndListener=this.renderer.listen(this.document,"touchend",this.onTouchEnd.bind(this))):this.target&&(this.triggerEventListener=this.renderer.listen(this.target,"touchstart",this.onTouchStart.bind(this)),this.touchEndListener=this.renderer.listen(this.target,"touchend",this.onTouchEnd.bind(this))):this.global?this.triggerEventListener=this.renderer.listen(this.document,this.triggerEvent,e=>{this.show(e)}):this.target&&(this.triggerEventListener=this.renderer.listen(this.target,this.triggerEvent,e=>{this.show(e)}))))}bindGlobalListeners(){if(Fe(this.platformId)){if(!this.documentClickListener){let e=this.el?this.el.nativeElement.ownerDocument:"document";this.documentClickListener=this.renderer.listen(e,"click",t=>{this.containerViewChild.nativeElement.offsetParent&&this.isOutsideClicked(t)&&!t.ctrlKey&&t.button!==2&&this.triggerEvent!=="click"&&this.hide()}),this.documentTriggerListener=this.renderer.listen(e,this.triggerEvent,t=>{this.containerViewChild.nativeElement.offsetParent&&this.isOutsideClicked(t)&&this.hide()})}this.resizeListener||(this.resizeListener=this.renderer.listen(this.document.defaultView,"resize",e=>{this.hide()}))}}itemTemplate;submenuIconTemplate;templates;_submenuIconTemplate;_itemTemplate;ngAfterContentInit(){this.templates?.forEach(e=>{switch(e.getType()){case"submenuicon":this._submenuIconTemplate=e.template;break;case"item":this._itemTemplate=e.template;break;default:this._itemTemplate=e.template;break}})}createProcessedItems(e,t=0,i={},o=""){let u=[];return e&&e.forEach((f,L)=>{let T=(o!==""?o+"_":"")+L,Z={item:f,index:L,level:t,key:T,parent:i,parentKey:o};Z.items=this.createProcessedItems(f.items,t+1,Z,T),u.push(Z)}),u}bindMatchMediaListener(){if(Fe(this.platformId)&&!this.matchMediaListener){let e=window.matchMedia(`(max-width: ${this.breakpoint})`);this.query=e,this.queryMatches=e.matches,this.matchMediaListener=()=>{this.queryMatches=e.matches},e.addEventListener("change",this.matchMediaListener)}}unbindMatchMediaListener(){this.matchMediaListener&&(this.query.removeEventListener("change",this.matchMediaListener),this.matchMediaListener=null)}getItemProp(e,t){return e?xt(e[t]):void 0}getProccessedItemLabel(e){return e?this.getItemLabel(e.item):void 0}getItemLabel(e){return this.getItemProp(e,"label")}isProcessedItemGroup(e){return e&&re(e.items)}isSelected(e){return this.activeItemPath().some(t=>t.key===e.key)}isValidSelectedItem(e){return this.isValidItem(e)&&this.isSelected(e)}isValidItem(e){return!!e&&!this.isItemDisabled(e.item)&&!this.isItemSeparator(e.item)}isItemDisabled(e){return this.getItemProp(e,"disabled")}isItemSeparator(e){return this.getItemProp(e,"separator")}isItemMatched(e){return this.isValidItem(e)&&this.getProccessedItemLabel(e).toLocaleLowerCase().startsWith(this.searchValue.toLocaleLowerCase())}isProccessedItemGroup(e){return e&&re(e.items)}onItemClick(e){let{processedItem:t}=e,i=this.isProcessedItemGroup(t);if(this.isSelected(t)){let{index:u,key:f,level:L,parentKey:T,item:Z}=t;this.activeItemPath.set(this.activeItemPath().filter(j=>f!==j.key&&f.startsWith(j.key))),this.focusedItemInfo.set({index:u,level:L,parentKey:T,item:Z}),Xe(this.rootmenu.sublistViewChild.nativeElement)}else i?this.onItemChange(e):this.hide()}onItemMouseEnter(e){this.onItemChange(e,"hover")}onKeyDown(e){let t=e.metaKey||e.ctrlKey;switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e);break;case"ArrowLeft":this.onArrowLeftKey(e);break;case"ArrowRight":this.onArrowRightKey(e);break;case"Home":this.onHomeKey(e);break;case"End":this.onEndKey(e);break;case"Space":this.onSpaceKey(e);break;case"Enter":this.onEnterKey(e);break;case"Escape":this.onEscapeKey(e);break;case"Tab":this.onTabKey(e);break;case"PageDown":case"PageUp":case"Backspace":case"ShiftLeft":case"ShiftRight":break;default:!t&&mn(e.key)&&this.searchItems(e,e.key);break}}onArrowDownKey(e){let t=this.focusedItemInfo().index!==-1?this.findNextItemIndex(this.focusedItemInfo().index):this.findFirstFocusedItemIndex();this.changeFocusedItemIndex(e,t),e.preventDefault()}onArrowRightKey(e){let t=this.visibleItems[this.focusedItemInfo().index];this.isProccessedItemGroup(t)&&(this.onItemChange({originalEvent:e,processedItem:t}),this.focusedItemInfo.set({index:-1,parentKey:t.key,item:t.item}),this.searchValue="",this.onArrowDownKey(e)),e.preventDefault()}onArrowUpKey(e){if(e.altKey){if(this.focusedItemInfo().index!==-1){let t=this.visibleItems[this.focusedItemInfo().index];!this.isProccessedItemGroup(t)&&this.onItemChange({originalEvent:e,processedItem:t})}this.hide(),e.preventDefault()}else{let t=this.focusedItemInfo().index!==-1?this.findPrevItemIndex(this.focusedItemInfo().index):this.findLastFocusedItemIndex();this.changeFocusedItemIndex(e,t),e.preventDefault()}}onArrowLeftKey(e){let t=this.visibleItems[this.focusedItemInfo().index],i=this.activeItemPath().find(f=>f.key===t.parentKey);_t(t.parent)||(this.focusedItemInfo.set({index:-1,parentKey:i?i.parentKey:"",item:t.item}),this.searchValue="",this.onArrowDownKey(e));let u=this.activeItemPath().filter(f=>f.parentKey!==this.focusedItemInfo().parentKey);this.activeItemPath.set(u),e.preventDefault()}onHomeKey(e){this.changeFocusedItemIndex(e,this.findFirstItemIndex()),e.preventDefault()}onEndKey(e){this.changeFocusedItemIndex(e,this.findLastItemIndex()),e.preventDefault()}onSpaceKey(e){this.onEnterKey(e)}onEscapeKey(e){this.hide();let t=this.findVisibleItem(this.findFirstFocusedItemIndex()),i=this.focusedItemInfo();this.focusedItemInfo.set(b(C({},i),{index:this.findFirstFocusedItemIndex(),item:t.item})),e.preventDefault()}onTabKey(e){if(this.focusedItemInfo().index!==-1){let t=this.visibleItems[this.focusedItemInfo().index];!this.isProccessedItemGroup(t)&&this.onItemChange({originalEvent:e,processedItem:t})}this.hide()}onEnterKey(e){if(this.focusedItemInfo().index!==-1){let t=We(this.rootmenu.el.nativeElement,`li[id="${`${this.focusedItemId}`}"]`),i=t&&We(t,'a[data-pc-section="action"]');i?i.click():t&&t.click();let o=this.visibleItems[this.focusedItemInfo().index];if(!this.isProccessedItemGroup(o)){let f=this.focusedItemInfo();this.focusedItemInfo.set(b(C({},f),{index:this.findFirstFocusedItemIndex()}))}}e.preventDefault()}onItemChange(e,t){let{processedItem:i,isFocus:o}=e;if(_t(i))return;let{index:u,key:f,level:L,parentKey:T,items:Z}=i,j=re(Z),Ot=this.activeItemPath().filter(kt=>kt.parentKey!==T&&kt.parentKey!==f);j&&(Ot.push(i),this.submenuVisible.set(!0)),this.focusedItemInfo.set({index:u,level:L,parentKey:T,item:i.item}),o&&Xe(this.rootmenu.sublistViewChild.nativeElement),!(t==="hover"&&this.queryMatches)&&this.activeItemPath.set(Ot)}onMenuFocus(e){this.focused=!0;let t=this.focusedItemInfo().index!==-1?this.focusedItemInfo():{index:-1,level:0,parentKey:"",item:null};this.focusedItemInfo.set(t)}onMenuBlur(e){this.focused=!1,this.focusedItemInfo.set({index:-1,level:0,parentKey:"",item:null}),this.searchValue=""}onOverlayAnimationStart(e){switch(e.toState){case"visible":this.container=e.element,this.position(),this.moveOnTop(),this.appendOverlay(),this.bindGlobalListeners(),Xe(this.rootmenu.sublistViewChild.nativeElement);break}}onOverlayAnimationEnd(e){switch(e.toState){case"void":this.onOverlayHide();break}}appendOverlay(){this.appendTo&&(this.appendTo==="body"?this.renderer.appendChild(this.document.body,this.containerViewChild.nativeElement):nn(this.appendTo,this.containerViewChild.nativeElement))}moveOnTop(){this.autoZIndex&&this.containerViewChild&&Ct.set("menu",this.containerViewChild.nativeElement,this.baseZIndex+this.config.zIndex.menu)}onOverlayHide(){this.unbindGlobalListeners(),this.cd.destroyed||(this.target=null),this.container&&this.autoZIndex&&Ct.clear(this.container),this.container=null}onTouchStart(e){this.pressTimer=setTimeout(()=>{this.show(e)},this.pressDelay)}onTouchEnd(){clearTimeout(this.pressTimer)}hide(){this.visible.set(!1),this.onHide.emit(),this.activeItemPath.set([]),this.focusedItemInfo.set({index:-1,level:0,parentKey:"",item:null})}toggle(e){this.visible()?this.hide():this.show(e)}show(e){this.activeItemPath.set([]),this.focusedItemInfo.set({index:-1,level:0,parentKey:"",item:null}),this.pageX=e.pageX,this.pageY=e.pageY,this.onShow.emit(),this.visible()?this.position():this.visible.set(!0),e.stopPropagation(),e.preventDefault()}position(){let e=this.pageX+1,t=this.pageY+1,i=this.containerViewChild.nativeElement.offsetParent?this.containerViewChild.nativeElement.offsetWidth:ht(this.containerViewChild.nativeElement),o=this.containerViewChild.nativeElement.offsetParent?this.containerViewChild.nativeElement.offsetHeight:rn(this.containerViewChild.nativeElement),u=ft();e+i-this.document.scrollingElement.scrollLeft>u.width&&(e-=i),t+o-this.document.scrollingElement.scrollTop>u.height&&(t-=o),e<this.document.scrollingElement.scrollLeft&&(e=this.document.scrollingElement.scrollLeft),t<this.document.scrollingElement.scrollTop&&(t=this.document.scrollingElement.scrollTop),this.containerViewChild.nativeElement.style.left=e+"px",this.containerViewChild.nativeElement.style.top=t+"px"}searchItems(e,t){this.searchValue=(this.searchValue||"")+t;let i=-1,o=!1;return this.focusedItemInfo().index!==-1?(i=this.visibleItems.slice(this.focusedItemInfo().index).findIndex(u=>this.isItemMatched(u)),i=i===-1?this.visibleItems.slice(0,this.focusedItemInfo().index).findIndex(u=>this.isItemMatched(u)):i+this.focusedItemInfo().index):i=this.visibleItems.findIndex(u=>this.isItemMatched(u)),i!==-1&&(o=!0),i===-1&&this.focusedItemInfo().index===-1&&(i=this.findFirstFocusedItemIndex()),i!==-1&&this.changeFocusedItemIndex(e,i),this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout(()=>{this.searchValue="",this.searchTimeout=null},500),o}findVisibleItem(e){return re(this.visibleItems)?this.visibleItems[e]:null}findLastFocusedItemIndex(){let e=this.findSelectedItemIndex();return e<0?this.findLastItemIndex():e}findLastItemIndex(){return gt(this.visibleItems,e=>this.isValidItem(e))}findPrevItemIndex(e){let t=e>0?gt(this.visibleItems.slice(0,e),i=>this.isValidItem(i)):-1;return t>-1?t:e}findNextItemIndex(e){let t=e<this.visibleItems.length-1?this.visibleItems.slice(e+1).findIndex(i=>this.isValidItem(i)):-1;return t>-1?t+e+1:e}findFirstFocusedItemIndex(){let e=this.findSelectedItemIndex();return e<0?this.findFirstItemIndex():e}findFirstItemIndex(){return this.visibleItems.findIndex(e=>this.isValidItem(e))}findSelectedItemIndex(){return this.visibleItems.findIndex(e=>this.isValidSelectedItem(e))}changeFocusedItemIndex(e,t){let i=this.findVisibleItem(t),o=this.focusedItemInfo();o.index!==t&&(this.focusedItemInfo.set(b(C({},o),{index:t,item:i.item})),this.scrollInView())}scrollInView(e=-1){let t=e!==-1?`${this.id}_${e}`:this.focusedItemId,i=We(this.rootmenu.el.nativeElement,`li[id="${t}"]`);i&&i.scrollIntoView&&i.scrollIntoView({block:"nearest",inline:"nearest"})}bindResizeListener(){Fe(this.platformId)&&(this.resizeListener||(this.resizeListener=this.renderer.listen(this.document.defaultView,"resize",e=>{this.hide()})))}isOutsideClicked(e){return!(this.containerViewChild.nativeElement.isSameNode(e.target)||this.containerViewChild.nativeElement.contains(e.target))}unbindResizeListener(){this.resizeListener&&(this.resizeListener(),this.resizeListener=null)}unbindGlobalListeners(){this.documentClickListener&&(this.documentClickListener(),this.documentClickListener=null),this.documentTriggerListener&&(this.documentTriggerListener(),this.documentTriggerListener=null),this.resizeListener&&(this.resizeListener(),this.resizeListener=null),this.touchEndListener&&(this.touchEndListener(),this.touchEndListener=null)}unbindTriggerEventListener(){this.triggerEventListener&&(this.triggerEventListener(),this.triggerEventListener=null)}removeAppendedElements(){this.appendTo&&this.containerViewChild&&(this.appendTo==="body"?this.renderer.removeChild(this.document.body,this.containerViewChild.nativeElement):cn(this.containerViewChild.nativeElement,this.appendTo))}ngOnDestroy(){this.unbindGlobalListeners(),this.unbindTriggerEventListener(),this.unbindMatchMediaListener(),this.removeAppendedElements(),super.ngOnDestroy()}static \u0275fac=function(t){return new(t||n)(mt(un))};static \u0275cmp=P({type:n,selectors:[["p-contextMenu"],["p-contextmenu"],["p-context-menu"]],contentQueries:function(t,i,o){if(t&1&&(He(o,ho,4),He(o,_o,4),He(o,Ye,4)),t&2){let u;q(u=z())&&(i.itemTemplate=u.first),q(u=z())&&(i.submenuIconTemplate=u.first),q(u=z())&&(i.templates=u)}},viewQuery:function(t,i){if(t&1&&(X(go,5),X(xo,5)),t&2){let o;q(o=z())&&(i.rootmenu=o.first),q(o=z())&&(i.containerViewChild=o.first)}},inputs:{model:"model",triggerEvent:"triggerEvent",target:"target",global:[2,"global","global",he],style:"style",styleClass:"styleClass",appendTo:"appendTo",autoZIndex:[2,"autoZIndex","autoZIndex",he],baseZIndex:[2,"baseZIndex","baseZIndex",Ce],id:"id",breakpoint:"breakpoint",ariaLabel:"ariaLabel",ariaLabelledBy:"ariaLabelledBy",pressDelay:[2,"pressDelay","pressDelay",Ce]},outputs:{onShow:"onShow",onHide:"onHide"},features:[J([Kn]),Pe],decls:1,vars:1,consts:[["container",""],["rootmenu",""],[3,"ngClass","class","ngStyle",4,"ngIf"],[3,"ngClass","ngStyle"],[3,"itemClick","menuFocus","menuBlur","menuKeydown","itemMouseEnter","root","items","itemTemplate","menuId","tabindex","ariaLabel","ariaLabelledBy","baseZIndex","autoZIndex","visible","focusedItemId","activeItemPath"]],template:function(t,i){t&1&&d(0,bo,4,23,"div",2),t&2&&c("ngIf",i.visible())},dependencies:[O,_e,D,pt,So,N,ge,yt,Le],encapsulation:2,data:{animation:[ut("overlayAnimation",[Ve(":enter",[Ne({opacity:0}),dt("250ms")]),Ve(":leave",[dt(".1s linear",Ne({opacity:0}))])])]},changeDetection:0})}return n})(),qn=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275mod=Ge({type:n});static \u0275inj=ze({imports:[lt,Le,Le]})}return n})();var wo=["editInput"],Ao=["createInput"],Eo=["tree"],Mo=["class","page"],Po=()=>({height:"calc(100vh - 70px)"});function Oo(n,s){n&1&&(a(0,"a",6),x(1,"i",7),p(2," Add"),r())}function ko(n,s){if(n&1){let e=w();a(0,"input",13,4),Qe("ngModelChange",function(i){let o=h(e).$implicit;return Ue(o.label,i)||(o.label=i),_(i)}),v("keydown",function(i){h(e);let o=l(2);return _(o.handleEditKeydown(i))})("blur",function(i){h(e);let o=l(2);return _(o.onNodeEditBlur(i))}),r()}if(n&2){let e=s.$implicit;je("ngModel",e.label)}}function Fo(n,s){if(n&1){let e=w();a(0,"div",8)(1,"div",9)(2,"p-panel")(3,"p-tree",10,2),v("onNodeContextMenuSelect",function(i){h(e);let o=l();return _(o.onNodeContextMenuSelect(i))})("onNodeSelect",function(i){h(e);let o=l();return _(o.onNodeSelect(i))})("onNodeUnselect",function(i){h(e);let o=l();return _(o.onNodeUnselect(i))})("onNodeDrop",function(i){h(e);let o=l();return _(o.onNodeDrop(i))}),d(5,ko,2,1,"ng-template",11),r(),x(6,"p-contextmenu",12,3),r()()()}if(n&2){let e=Y(7),t=l();m(2),ue(F(13,Po)),m(),c("virtualScroll",!0)("virtualScrollItemSize",40)("scrollHeight","calc(100vh - 150px)")("value",t.categoryOptions())("contextMenu",e)("selection",t.selectedNode)("draggableNodes",!0)("droppableNodes",!0)("propagateSelectionUp",!1)("propagateSelectionDown",!1),m(3),c("model",t.items())}}var ct=function(n){return n[n.create=0]="create",n[n.edit=1]="edit",n}(ct||{}),zn=(()=>{class n{constructor(){this.COATypesService=g(pe),this.items=I([]),this.categoryOptions=I([]),this.selectedNode=null,this.editNode=I(null),this.router=g(oe),this.contextMenuState=I(null),this.focusTrigger=I(!1)}onEditNode(e){this.editNode.set(e)}ngAfterViewChecked(){this.selectedNode&&!this.focusTrigger()&&this.editInputRef&&(this.editInputRef.nativeElement.focus(),this.focusTrigger.set(!0))}fetchCOACategories(){return this.COATypesService.fetchCOACategories().pipe(E("response"),G(e=>{let t=i=>i.map(o=>{let u=o.children&&o.children.length>0;return b(C({},o),{icon:void 0,expandedIcon:u?"fa-solid fa-folder-open":void 0,collapsedIcon:u?"fa-solid fa-folder":"fa-solid fa-file",children:u?t(o.children):[]})});return t(e)}),S(e=>{this.categoryOptions.set(e),this.categoryOptions().forEach(t=>this.expandRecursive(t,!0))}))}onNodeSelect(e){let t=e.node;this.contextMenuState.set(null),this.focusTrigger.set(!1),t.children&&t.children.length&&(t.icon="fa-solid fa-folder-open")}onNodeUnselect(e){let t=e.node;t.children&&t.children.length&&(t.icon="fa-solid fa-folder")}handleEditKeydown(e){let t=e.target;if(e.key===" "&&e.stopPropagation(),e.key==="Enter"){e.stopPropagation(),this.rename(t.value);let i=this.tree.getNodeWithKey(this.selectedNode.key,this.categoryOptions());i&&(delete i.type,this.insertNodeByKey(this.selectedNode.parent.key,i))}}ngOnInit(){this.fetchCOACategories().subscribe(),this.items.set([{label:"Add",icon:"fa-light fa-plus",disabled:!1,command:()=>{this.contextMenuState.set(ct.create),this.insertNodeByKey(this.selectedNode.key,{label:"New Child Node"});let e=this.findNodeByKeyInArray(this.categoryOptions(),"New Child Node");e&&(this.contextMenuState.set(ct.edit),this.selectedNode=e)}},{label:"Edit",icon:"fa-light fa-pen-to-square",disabled:!1,command:()=>{this.contextMenuState.set(ct.edit);let e=this.findNodeByKeyInArray(this.categoryOptions(),this.selectedNode.key);e&&(e.type="edit",this.insertNodeByKey(this.selectedNode.parent.key,e)),console.log("findNode",e)}},{label:"Delete",disabled:!1,icon:"fa-light fa-trash",command:()=>this.onDeleteCategory()},{label:"Properties",disabled:!1,icon:"fa-light fa-file",command:()=>{this.router.navigate(["/chart-of-account/coa-types/info"],{queryParams:{ID:this.selectedNode.key}})}}]),this.expandAll()}insertNodeByKey(e,t,i=this.categoryOptions()){let o=!1,u=L=>L.map(T=>{if(T.key===e){if((T.children||[]).some(j=>t.key&&j.key===t.key||t.label&&j.label===t.label))return T;{let j=[...T.children||[],t];return o=!0,b(C({},T),{children:j})}}else if(T.children&&T.children.length>0)return b(C({},T),{children:u(T.children)});return T}),f=u(i);return o&&this.categoryOptions.set(f),o}onNodeEditBlur(e){let t=e.target;e.stopPropagation(),this.rename(t.value);let i=this.tree.getNodeWithKey(this.selectedNode.key,this.categoryOptions());i&&(delete i.type,this.insertNodeByKey(this.selectedNode.parent.key,i))}onNodeMouseDown(e,t){e.button===0&&(this.selectedNode=t)}rename(e,t=this.selectedNode){this.COATypesService.renameCategory(t.key?t.key:t.parent.key,{Name:e}).pipe(E("response"),S(()=>{this.fetchCOACategories(),this.contextMenuState.set(null)})).subscribe()}expandRecursive(e,t){e.expanded=t,e.children&&e.children.forEach(i=>{this.expandRecursive(i,t)})}expandAll(){this.categoryOptions().forEach(e=>this.expandRecursive(e,!0))}collapseAll(){this.categoryOptions().forEach(e=>this.expandRecursive(e,!1))}onEnterPress(){this.editNode&&this.onSave()}onNodeDrop(e){console.log("event",e);let{dragNode:t,dropNode:i}=e;this.COATypesService.updateParentCategory(t.key,{ParentID:i.key}).pipe(E("response"),S(()=>this.fetchCOACategories())).subscribe()}onSave(){this.COATypesService.renameCategory(this.selectedNode.key,{Name:this.editNode().label}).pipe(E("rename"),S(()=>{this.editNode.set(null)})).subscribe()}onDeleteCategory(){this.COATypesService.deleteCategory(this.selectedNode.key).pipe($(()=>this.fetchCOACategories()),E("delete")).subscribe()}findNodeByKeyInArray(e,t){for(let i of e){let o=this.findNodeByKey(i,t);if(o)return o}return null}findNodeByKey(e,t){if(e.key===t||e.label===t)return e;for(let i of e.children){let o=this.findNodeByKey(i,t);if(o)return o}return null}onNodeContextMenuSelect(e){if(this.selectedNode=e.node,e.node.parent===void 0||e.node.parent===null){if(e.node.children.length===5){let t=[...this.items()];t[0].disabled=!0,this.items.set(t)}}else this.items.update(t=>t.map(i=>b(C({},i),{disabled:!1})))}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=P({type:n,selectors:[["app-coa-type",8,"page"]],viewQuery:function(t,i){if(t&1&&(X(wo,5),X(Ao,5),X(Eo,5)),t&2){let o;q(o=z())&&(i.editInputRef=o.first),q(o=z())&&(i.createnputRef=o.first),q(o=z())&&(i.tree=o.first)}},hostBindings:function(t,i){t&1&&v("keydown.enter",function(u){return i.onEnterPress(u)},!1,Rt)},features:[J([dn])],attrs:Mo,decls:5,vars:0,consts:[["actionButton",""],["content",""],["tree",""],["cm",""],["editInput",""],["pageTitle",`Chart of Accounts Category
|
|
245
|
-
`],["routerLink","add",1,"p-button"],[1,"fa-solid","fa-plus"],[1,"row","justify-content-center"],[1,"col"],["selectionMode","single","draggableScope","self","droppableScope","self",3,"onNodeContextMenuSelect","onNodeSelect","onNodeUnselect","onNodeDrop","virtualScroll","virtualScrollItemSize","scrollHeight","value","contextMenu","selection","draggableNodes","droppableNodes","propagateSelectionUp","propagateSelectionDown"],["pTemplate","edit"],["appendTo","body",3,"model"],["type","text",1,"form-control",3,"ngModelChange","keydown","blur","ngModel"]],template:function(t,i){t&1&&(a(0,"app-main-panel",5),d(1,Oo,3,0,"ng-template",null,0,y)(3,Fo,8,14,"ng-template",null,1,y),r())},dependencies:[B,On,N,R,qn,lt,Ye,O,Se,ee,ne,Wt,K,_n,ce,le],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return n})();var No=["class","page"],Mt=n=>({"is-invalid":n});function Vo(n,s){if(n&1){let e=w();a(0,"div",3)(1,"p-button",4),v("onClick",function(){h(e);let i=l();return _(i.goBack())}),r(),a(2,"p-button",5),v("onClick",function(){h(e);let i=l();return _(i.onSubmit())}),r()()}}function Lo(n,s){n&1&&(a(0,"div",19),p(1," Name is required "),r())}function Do(n,s){n&1&&(a(0,"div",19),p(1," Code is required "),r())}function Ro(n,s){n&1&&(a(0,"div",19),p(1," Note is required "),r())}function Bo(n,s){if(n&1){let e=w();a(0,"p-panel")(1,"div",6)(2,"div",7)(3,"div",8)(4,"div",9)(5,"div",10)(6,"label",11),p(7,"Name"),r(),x(8,"input",12),d(9,Lo,2,0,"div",13),r()(),a(10,"div",14)(11,"div",10)(12,"label",11),p(13,"Code"),r(),x(14,"input",15),d(15,Do,2,0,"div",13),r()(),a(16,"div",9)(17,"div",10)(18,"label",11),p(19,"Note"),r(),x(20,"textarea",16),d(21,Ro,2,0,"div",13),r()(),a(22,"div",9)(23,"div",17)(24,"label",11),p(25,"Category"),r(),a(26,"p-treeselect",18),v("onFocus",function(){h(e);let i=l();return _(i.loadCategories())}),r()()()()()()()}if(n&2){let e=l();m(3),c("formGroup",e.form),m(5),c("ngClass",A(8,Mt,e.form.controls.Name.invalid&&(e.form.controls.Name.dirty||e.form.controls.Name.touched))),m(),c("ngIf",e.form.controls.Name.errors==null?null:e.form.controls.Name.errors.required),m(5),c("ngClass",A(10,Mt,e.form.controls.Code.invalid&&(e.form.controls.Code.dirty||e.form.controls.Code.touched))),m(),c("ngIf",e.form.controls.Code==null||e.form.controls.Code.errors==null?null:e.form.controls.Code.errors.required),m(5),c("ngClass",A(12,Mt,e.form.controls.Note.invalid&&(e.form.controls.Note.dirty||e.form.controls.Note.touched))),m(),c("ngIf",e.form.controls.Note.errors==null?null:e.form.controls.Note.errors.required),m(5),c("options",e.categories())}}var Pt=(()=>{class n{constructor(){this.categories=I([]),this.COATypeService=g(pe),this.COAService=g(H),this.info=I(null),this.route=g(ie),this.router=g(oe),this.fb=g(ve)}goBack(){this.router.navigate(["/chart-of-account/coa-types"])}ngOnInit(){this.generateForm(),Ft([this.route.paramMap.pipe(G(e=>e.get("id")),$e(e=>!!e)),this.COATypeService.fetchCOACategories()]).pipe(E("fetchCOACategories"),$(([e,t])=>{let i=this.findNodeByKeyInArray(t,e);return this.categories.set(t),this.COATypeService.getCOACategoryByID({ID:e}).pipe(S(o=>{this.form.patchValue({Name:o.name,Code:o.code,Note:o.note,Category:i.parent})}))})).subscribe()}loadCategories(){this.COAService.getCachedCategoriesOptions().pipe(S(e=>this.categories.set(e))).subscribe()}generateForm(){this.form=new Zt({Name:new V("",[te.required]),Code:new V("",[te.required]),Category:new V(null),Note:new V("",[te.required])})}findNodeByKeyInArray(e,t){for(let i of e){let o=this.findNodeByKey(i,t);if(o)return o}return null}findNodeByKey(e,t,i=null){if(e.key===t||e.label===t)return i&&(e.parent=i),e;if(e.children&&e.children.length>0)for(let o of e.children){let u=this.findNodeByKey(o,t,e);if(u)return u}return null}onSubmit(){let{Name:e,Code:t,Note:i}=this.form.value,o=this.findNodeByKeyInArray(this.categories(),this.route.snapshot.params.id),u={Name:e,Code:t,ParentID:o.parent.key,Note:i,ID:this.route.snapshot.params.id||null};this.COATypeService.submitCategory(u,{observe:"response"}).pipe(E("response"),S(()=>{this.router.navigate(["/chart-of-account/coa-types"])})).subscribe()}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=P({type:n,selectors:[["app-coa-type-form",8,"page"]],attrs:No,decls:5,vars:1,consts:[["actionButton",""],["content",""],["pageTitle","Chart of Account Category Form",3,"hasMainWrapperPadding"],[1,"d-flex","gap-2"],["label","Cancel","variant","outlined","severity","secondary",3,"onClick"],["label","Submit",3,"onClick"],[1,"row","justify-content-center"],[1,"col"],[1,"row","row-gap-2",3,"formGroup"],[1,"ol-12","col-md-6","col-lg-6"],[1,"form-group","has-validation"],["for",""],["formControlName","Name",1,"form-control",3,"ngClass"],["id","validationServer03Feedback","class","invalid-feedback",4,"ngIf"],[1,"col-12","col-md-6","col-lg-6"],["formControlName","Code",1,"form-control",3,"ngClass"],["formControlName","Note","placeholder","Enter a description for this COA category","id","floatingTextarea2",1,"form-control",2,"height","100px",3,"ngClass"],[1,"form-group","has-validation","d-flex","flex-column"],["placeholder","Select a Category","formControlName","Category",3,"onFocus","options"],["id","validationServer03Feedback",1,"invalid-feedback"]],template:function(t,i){t&1&&(a(0,"app-main-panel",2),d(1,Vo,3,0,"ng-template",null,0,y)(3,Bo,27,14,"ng-template",null,1,y),r()),t&2&&c("hasMainWrapperPadding",!0)},dependencies:[B,N,Ae,we,Te,ee,ne,ye,be,Ie,O,_e,D,K,se,ae,ce,le],styles:["[_nghost-%COMP%]{display:block} .p-treeselect{width:100%}"],changeDetection:0})}}return n})();var Ko=n=>[n];function $o(n,s){if(n&1&&(a(0,"a",4),x(1,"i",5),a(2,"span"),p(3,"Edit"),r()()),n&2){let e=l(2);c("routerLink",A(1,Ko,"/chart-of-account/coa-types/"+e.info().id+"/edit"))}}function qo(n,s){if(n&1&&(a(0,"div",6)(1,"div",7)(2,"p-card")(3,"div",8)(4,"div",9)(5,"div",10),p(6,"Name"),r(),a(7,"div",11),p(8),r()(),a(9,"div",9)(10,"div",10),p(11,"Code"),r(),a(12,"div",11),p(13),r()(),a(14,"div",9)(15,"div",10),p(16,"Category"),r(),a(17,"div",11),p(18),r()(),a(19,"div",9)(20,"div",10),p(21,"System Category"),r(),a(22,"div",11),p(23),r()(),a(24,"div",9)(25,"div",10),p(26,"Group Accounts"),r(),a(27,"div",11),p(28),r()(),a(29,"div",9)(30,"div",10),p(31,"Note"),r(),a(32,"div",11),x(33,"div",12),r()()()()()()),n&2){let e=l(2);m(8),M(e.info().name),m(5),M(e.info().code),m(5),M(e.info().name),m(5),M(e.info().option),m(5),M(e.info().isMain),m(5),c("innerHTML",e.info().note,Me)}}function zo(n,s){n&1&&(de(0),a(1,"app-main-panel",3),d(2,$o,4,3,"ng-template",null,0,y)(4,qo,34,6,"ng-template",null,1,y),r(),fe())}var Gn=(()=>{class n{constructor(){this.COATypeService=g(pe),this.route=g(ie),this.info=I(null)}ngOnInit(){this.route.queryParamMap.pipe(G(e=>e.get("ID")),$(e=>this.COATypeService.getCOACategoryByID({ID:e})),E("getCOACategoryByID"),S(e=>this.info.set(e))).subscribe()}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=P({type:n,selectors:[["app-coa-type-info"]],decls:1,vars:1,consts:[["actionButton",""],["content",""],[4,"ngIf"],["pageTitle",`Type of Account Info
|
|
246
|
-
`],["type","button",1,"p-button","p-button-success",3,"routerLink"],[1,"fa-solid","fa-pen-to-square"],[1,"row","justify-content-center","mt-3"],[1,"col-12","col-lg-8"],[1,"d-flex","flex-column","gap-3"],[1,"d-flex"],[1,"col-3"],[1,"col"],[3,"innerHTML"]],template:function(t,i){t&1&&d(0,zo,6,0,"ng-container",2),t&2&&c("ngIf",i.info())},dependencies:[O,D,B,K,it,N,R],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return n})();var tl=[{path:"",redirectTo:"account",pathMatch:"full"},{path:"",children:[{path:"account",component:Rn},{path:"account/add",component:Et},{path:"account/:id",component:Nn},{path:"account/:id/edit",component:Et},{path:"coa-types",component:zn},{path:"coa-types/add",component:Pt},{path:"coa-types/info",component:Gn},{path:"coa-types/:id/edit",component:Pt}]}],Bn={path:"cash-of-account",title:"COA",iconName:"fa fa-calculator",class:"",label:"",labelClass:"",extralink:!1,submenu:[{path:"account",title:"Ticket List",iconName:"solar:stop-circle-line-duotone",class:"",label:"",labelClass:"",extralink:!1,submenu:[]},{path:"coa-types",title:"Ticket Details",iconName:"solar:stop-circle-line-duotone",class:"",label:"",labelClass:"",extralink:!1,submenu:[]}]};export{tl as CHART_OF_ACCOUNT_ROUTES,Bn as CHART_OF_ACCOUNT_ROUTE_PAGE};
|
package/chunk-C4HBNN2L.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk-EQDQRRRY.js";var n=[{path:"",children:[{path:"404",loadComponent:()=>import("./chunk-66DZK3FQ.js").then(o=>o.NotfoundComponent)},{path:"lock",loadComponent:()=>import("./chunk-HZ7WPLLK.js").then(o=>o.LockComponent)},{path:"login",loadComponent:()=>import("./chunk-EFOOUCV3.js").then(o=>o.LoginComponent)},{path:"login2",loadComponent:()=>import("./chunk-GLURPAU2.js").then(o=>o.Login2Component)},{path:"signup",loadComponent:()=>import("./chunk-2ACAW72E.js").then(o=>o.SignupComponent)},{path:"signup2",loadComponent:()=>import("./chunk-TBHL2OSG.js").then(o=>o.Signup2Component)},{path:"504",loadComponent:()=>import("./chunk-VVC3QQUI.js").then(o=>o.TimeoutComponent)}]}];export{n as AuthenticationRoutes};
|
package/chunk-DO2YIWC5.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as s}from"./chunk-I2MAIV44.js";import{g as C}from"./chunk-NTJQFRIB.js";import"./chunk-USO7UKRV.js";import"./chunk-CMHZLZ4E.js";import"./chunk-OVJSBJBH.js";import"./chunk-E2RBYY7Q.js";import"./chunk-26X2X35R.js";import"./chunk-35EULUGT.js";import{a as E}from"./chunk-CEUNPX5D.js";import"./chunk-F2X3VGZZ.js";import"./chunk-7T6O4KFO.js";import{s as v}from"./chunk-SJTXIIX5.js";import{Ic as a,Tb as i,Ub as o,Zb as g,cc as x,dc as d,ha as r,mc as c,pa as p,qa as l,tb as u,uc as _,zb as f}from"./chunk-2VF35PRV.js";import"./chunk-EQDQRRRY.js";function M(e,h){if(e&1){let t=g();i(0,"div",3)(1,"button",4),x("click",function(){p(t);let m=d();return l(m.onMigrate())}),c(2,"Migrate"),o()()}}function S(e,h){e&1&&(i(0,"div",5),c(1," reserved for future User Interface (UI) enhancements "),o())}var j=(()=>{class e{constructor(){this.migrateService=r(s),this.toastr=r(E)}onMigrate(){this.migrateService.migrateExpenseAccount().subscribe(t=>{this.toastr.success(t.message,"Migration Successful")})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=u({type:e,selectors:[["app-expense-account"]],features:[_([s])],decls:5,vars:0,consts:[["actionButton",""],["content",""],["pageTitle","Expense Account"],[1,"d-flex","gap-2"],[1,"btn","btn-primary",3,"click"],[1,"container","d-flex","justify-content-center","align-items-center",2,"height","100vh"]],template:function(n,m){n&1&&(i(0,"app-main-panel",2),f(1,M,3,0,"ng-template",null,0,a)(3,S,2,0,"ng-template",null,1,a),o())},dependencies:[C,v],encapsulation:2})}}return e})();export{j as ExpenseAccountComponent};
|
package/chunk-E2RBYY7Q.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as oe}from"./chunk-SJTXIIX5.js";import{$ as w,Bb as Me,Da as te,Fa as C,Ib as Ae,Lb as ie,Mc as we,Rc as re,Tc as f,Uc as V,Vc as Ee,aa as g,ba as Q,ca as P,cc as T,ea as _,g as _e,ha as R,i as ve,kb as ne,l as ye,lb as s,na as De,oa as E,s as Ce,sa as F,ua as ee,ub as j,uc as p,va as be,vb as l,xb as d,y as Ve,ya as y}from"./chunk-2VF35PRV.js";import{a as u,b as h}from"./chunk-EQDQRRRY.js";var je=(()=>{class n{_renderer;_elementRef;onChange=e=>{};onTouched=()=>{};constructor(e,i){this._renderer=e,this._elementRef=i}setProperty(e,i){this._renderer.setProperty(this._elementRef.nativeElement,e,i)}registerOnTouched(e){this.onTouched=e}registerOnChange(e){this.onChange=e}setDisabledState(e){this.setProperty("disabled",e)}static \u0275fac=function(i){return new(i||n)(s(ne),s(te))};static \u0275dir=l({type:n})}return n})(),Te=(()=>{class n extends je{static \u0275fac=(()=>{let e;return function(r){return(e||(e=F(n)))(r||n)}})();static \u0275dir=l({type:n,features:[d]})}return n})(),Z=new _("");var dt={provide:Z,useExisting:g(()=>Ge),multi:!0};function ct(){let n=oe()?oe().getUserAgent():"";return/android (\d+)/.test(n.toLowerCase())}var ht=new _(""),Ge=(()=>{class n extends je{_compositionMode;_composing=!1;constructor(e,i,r){super(e,i),this._compositionMode=r,this._compositionMode==null&&(this._compositionMode=!ct())}writeValue(e){let i=e??"";this.setProperty("value",i)}_handleInput(e){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(e)}_compositionStart(){this._composing=!0}_compositionEnd(e){this._composing=!1,this._compositionMode&&this.onChange(e)}static \u0275fac=function(i){return new(i||n)(s(ne),s(te),s(ht,8))};static \u0275dir=l({type:n,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(i,r){i&1&&T("input",function(a){return r._handleInput(a.target.value)})("blur",function(){return r.onTouched()})("compositionstart",function(){return r._compositionStart()})("compositionend",function(a){return r._compositionEnd(a.target.value)})},standalone:!1,features:[p([dt]),d]})}return n})();function he(n){return n==null||fe(n)===0}function fe(n){return n==null?null:Array.isArray(n)||typeof n=="string"?n.length:n instanceof Set?n.size:null}var A=new _(""),k=new _(""),ft=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Fe=class{static min(t){return gt(t)}static max(t){return pt(t)}static required(t){return Ue(t)}static requiredTrue(t){return mt(t)}static email(t){return _t(t)}static minLength(t){return vt(t)}static maxLength(t){return yt(t)}static pattern(t){return Ct(t)}static nullValidator(t){return U()}static compose(t){return qe(t)}static composeAsync(t){return Ze(t)}};function gt(n){return t=>{if(t.value==null||n==null)return null;let e=parseFloat(t.value);return!isNaN(e)&&e<n?{min:{min:n,actual:t.value}}:null}}function pt(n){return t=>{if(t.value==null||n==null)return null;let e=parseFloat(t.value);return!isNaN(e)&&e>n?{max:{max:n,actual:t.value}}:null}}function Ue(n){return he(n.value)?{required:!0}:null}function mt(n){return n.value===!0?null:{required:!0}}function _t(n){return he(n.value)||ft.test(n.value)?null:{email:!0}}function vt(n){return t=>{let e=t.value?.length??fe(t.value);return e===null||e===0?null:e<n?{minlength:{requiredLength:n,actualLength:e}}:null}}function yt(n){return t=>{let e=t.value?.length??fe(t.value);return e!==null&&e>n?{maxlength:{requiredLength:n,actualLength:e}}:null}}function Ct(n){if(!n)return U;let t,e;return typeof n=="string"?(e="",n.charAt(0)!=="^"&&(e+="^"),e+=n,n.charAt(n.length-1)!=="$"&&(e+="$"),t=new RegExp(e)):(e=n.toString(),t=n),i=>{if(he(i.value))return null;let r=i.value;return t.test(r)?null:{pattern:{requiredPattern:e,actualValue:r}}}}function U(n){return null}function Be(n){return n!=null}function He(n){return Me(n)?ye(n):n}function Le(n){let t={};return n.forEach(e=>{t=e!=null?u(u({},t),e):t}),Object.keys(t).length===0?null:t}function $e(n,t){return t.map(e=>e(n))}function Vt(n){return!n.validate}function We(n){return n.map(t=>Vt(t)?t:e=>t.validate(e))}function qe(n){if(!n)return null;let t=n.filter(Be);return t.length==0?null:function(e){return Le($e(e,t))}}function ze(n){return n!=null?qe(We(n)):null}function Ze(n){if(!n)return null;let t=n.filter(Be);return t.length==0?null:function(e){let i=$e(e,t).map(He);return Ve(i).pipe(Ce(Le))}}function Xe(n){return n!=null?Ze(We(n)):null}function Se(n,t){return n===null?[t]:Array.isArray(n)?[...n,t]:[n,t]}function Ye(n){return n._rawValidators}function Ke(n){return n._rawAsyncValidators}function se(n){return n?Array.isArray(n)?n:[n]:[]}function B(n,t){return Array.isArray(n)?n.includes(t):n===t}function Ie(n,t){let e=se(t);return se(n).forEach(r=>{B(e,r)||e.push(r)}),e}function Oe(n,t){return se(t).filter(e=>!B(n,e))}var H=class{get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators=[];_rawAsyncValidators=[];_setValidators(t){this._rawValidators=t||[],this._composedValidatorFn=ze(this._rawValidators)}_setAsyncValidators(t){this._rawAsyncValidators=t||[],this._composedAsyncValidatorFn=Xe(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_onDestroyCallbacks=[];_registerOnDestroy(t){this._onDestroyCallbacks.push(t)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(t=>t()),this._onDestroyCallbacks=[]}reset(t=void 0){this.control&&this.control.reset(t)}hasError(t,e){return this.control?this.control.hasError(t,e):!1}getError(t,e){return this.control?this.control.getError(t,e):null}},c=class extends H{name;get formDirective(){return null}get path(){return null}},v=class extends H{_parent=null;name=null;valueAccessor=null},L=class{_cd;constructor(t){this._cd=t}get isTouched(){return this._cd?.control?._touched?.(),!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return this._cd?.control?._pristine?.(),!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return this._cd?.control?._status?.(),!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return this._cd?._submitted?.(),!!this._cd?.submitted}},Dt={"[class.ng-untouched]":"isUntouched","[class.ng-touched]":"isTouched","[class.ng-pristine]":"isPristine","[class.ng-dirty]":"isDirty","[class.ng-valid]":"isValid","[class.ng-invalid]":"isInvalid","[class.ng-pending]":"isPending"},gn=h(u({},Dt),{"[class.ng-submitted]":"isSubmitted"}),pn=(()=>{class n extends L{constructor(e){super(e)}static \u0275fac=function(i){return new(i||n)(s(v,2))};static \u0275dir=l({type:n,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(i,r){i&2&&ie("ng-untouched",r.isUntouched)("ng-touched",r.isTouched)("ng-pristine",r.isPristine)("ng-dirty",r.isDirty)("ng-valid",r.isValid)("ng-invalid",r.isInvalid)("ng-pending",r.isPending)},standalone:!1,features:[d]})}return n})(),mn=(()=>{class n extends L{constructor(e){super(e)}static \u0275fac=function(i){return new(i||n)(s(c,10))};static \u0275dir=l({type:n,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(i,r){i&2&&ie("ng-untouched",r.isUntouched)("ng-touched",r.isTouched)("ng-pristine",r.isPristine)("ng-dirty",r.isDirty)("ng-valid",r.isValid)("ng-invalid",r.isInvalid)("ng-pending",r.isPending)("ng-submitted",r.isSubmitted)},standalone:!1,features:[d]})}return n})();var S="VALID",G="INVALID",D="PENDING",I="DISABLED",m=class{},$=class extends m{value;source;constructor(t,e){super(),this.value=t,this.source=e}},O=class extends m{pristine;source;constructor(t,e){super(),this.pristine=t,this.source=e}},N=class extends m{touched;source;constructor(t,e){super(),this.touched=t,this.source=e}},b=class extends m{status;source;constructor(t,e){super(),this.status=t,this.source=e}},ae=class extends m{source;constructor(t){super(),this.source=t}},le=class extends m{source;constructor(t){super(),this.source=t}};function ge(n){return(X(n)?n.validators:n)||null}function bt(n){return Array.isArray(n)?ze(n):n||null}function pe(n,t){return(X(t)?t.asyncValidators:n)||null}function Mt(n){return Array.isArray(n)?Xe(n):n||null}function X(n){return n!=null&&!Array.isArray(n)&&typeof n=="object"}function Je(n,t,e){let i=n.controls;if(!(t?Object.keys(i):i).length)throw new w(1e3,"");if(!i[e])throw new w(1001,"")}function Qe(n,t,e){n._forEachChild((i,r)=>{if(e[r]===void 0)throw new w(1002,"")})}var M=class{_pendingDirty=!1;_hasOwnPendingAsyncValidator=null;_pendingTouched=!1;_onCollectionChange=()=>{};_updateOn;_parent=null;_asyncValidationSubscription;_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators;_rawAsyncValidators;value;constructor(t,e){this._assignValidators(t),this._assignAsyncValidators(e)}get validator(){return this._composedValidatorFn}set validator(t){this._rawValidators=this._composedValidatorFn=t}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(t){this._rawAsyncValidators=this._composedAsyncValidatorFn=t}get parent(){return this._parent}get status(){return f(this.statusReactive)}set status(t){f(()=>this.statusReactive.set(t))}_status=V(()=>this.statusReactive());statusReactive=C(void 0);get valid(){return this.status===S}get invalid(){return this.status===G}get pending(){return this.status==D}get disabled(){return this.status===I}get enabled(){return this.status!==I}errors;get pristine(){return f(this.pristineReactive)}set pristine(t){f(()=>this.pristineReactive.set(t))}_pristine=V(()=>this.pristineReactive());pristineReactive=C(!0);get dirty(){return!this.pristine}get touched(){return f(this.touchedReactive)}set touched(t){f(()=>this.touchedReactive.set(t))}_touched=V(()=>this.touchedReactive());touchedReactive=C(!1);get untouched(){return!this.touched}_events=new _e;events=this._events.asObservable();valueChanges;statusChanges;get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(t){this._assignValidators(t)}setAsyncValidators(t){this._assignAsyncValidators(t)}addValidators(t){this.setValidators(Ie(t,this._rawValidators))}addAsyncValidators(t){this.setAsyncValidators(Ie(t,this._rawAsyncValidators))}removeValidators(t){this.setValidators(Oe(t,this._rawValidators))}removeAsyncValidators(t){this.setAsyncValidators(Oe(t,this._rawAsyncValidators))}hasValidator(t){return B(this._rawValidators,t)}hasAsyncValidator(t){return B(this._rawAsyncValidators,t)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(t={}){let e=this.touched===!1;this.touched=!0;let i=t.sourceControl??this;this._parent&&!t.onlySelf&&this._parent.markAsTouched(h(u({},t),{sourceControl:i})),e&&t.emitEvent!==!1&&this._events.next(new N(!0,i))}markAllAsTouched(t={}){this.markAsTouched({onlySelf:!0,emitEvent:t.emitEvent,sourceControl:this}),this._forEachChild(e=>e.markAllAsTouched(t))}markAsUntouched(t={}){let e=this.touched===!0;this.touched=!1,this._pendingTouched=!1;let i=t.sourceControl??this;this._forEachChild(r=>{r.markAsUntouched({onlySelf:!0,emitEvent:t.emitEvent,sourceControl:i})}),this._parent&&!t.onlySelf&&this._parent._updateTouched(t,i),e&&t.emitEvent!==!1&&this._events.next(new N(!1,i))}markAsDirty(t={}){let e=this.pristine===!0;this.pristine=!1;let i=t.sourceControl??this;this._parent&&!t.onlySelf&&this._parent.markAsDirty(h(u({},t),{sourceControl:i})),e&&t.emitEvent!==!1&&this._events.next(new O(!1,i))}markAsPristine(t={}){let e=this.pristine===!1;this.pristine=!0,this._pendingDirty=!1;let i=t.sourceControl??this;this._forEachChild(r=>{r.markAsPristine({onlySelf:!0,emitEvent:t.emitEvent})}),this._parent&&!t.onlySelf&&this._parent._updatePristine(t,i),e&&t.emitEvent!==!1&&this._events.next(new O(!0,i))}markAsPending(t={}){this.status=D;let e=t.sourceControl??this;t.emitEvent!==!1&&(this._events.next(new b(this.status,e)),this.statusChanges.emit(this.status)),this._parent&&!t.onlySelf&&this._parent.markAsPending(h(u({},t),{sourceControl:e}))}disable(t={}){let e=this._parentMarkedDirty(t.onlySelf);this.status=I,this.errors=null,this._forEachChild(r=>{r.disable(h(u({},t),{onlySelf:!0}))}),this._updateValue();let i=t.sourceControl??this;t.emitEvent!==!1&&(this._events.next(new $(this.value,i)),this._events.next(new b(this.status,i)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(h(u({},t),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(r=>r(!0))}enable(t={}){let e=this._parentMarkedDirty(t.onlySelf);this.status=S,this._forEachChild(i=>{i.enable(h(u({},t),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent}),this._updateAncestors(h(u({},t),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(i=>i(!1))}_updateAncestors(t,e){this._parent&&!t.onlySelf&&(this._parent.updateValueAndValidity(t),t.skipPristineCheck||this._parent._updatePristine({},e),this._parent._updateTouched({},e))}setParent(t){this._parent=t}getRawValue(){return this.value}updateValueAndValidity(t={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){let i=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===S||this.status===D)&&this._runAsyncValidator(i,t.emitEvent)}let e=t.sourceControl??this;t.emitEvent!==!1&&(this._events.next(new $(this.value,e)),this._events.next(new b(this.status,e)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!t.onlySelf&&this._parent.updateValueAndValidity(h(u({},t),{sourceControl:e}))}_updateTreeValidity(t={emitEvent:!0}){this._forEachChild(e=>e._updateTreeValidity(t)),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?I:S}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(t,e){if(this.asyncValidator){this.status=D,this._hasOwnPendingAsyncValidator={emitEvent:e!==!1};let i=He(this.asyncValidator(this));this._asyncValidationSubscription=i.subscribe(r=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(r,{emitEvent:e,shouldHaveEmitted:t})})}}_cancelExistingSubscription(){if(this._asyncValidationSubscription){this._asyncValidationSubscription.unsubscribe();let t=this._hasOwnPendingAsyncValidator?.emitEvent??!1;return this._hasOwnPendingAsyncValidator=null,t}return!1}setErrors(t,e={}){this.errors=t,this._updateControlsErrors(e.emitEvent!==!1,this,e.shouldHaveEmitted)}get(t){let e=t;return e==null||(Array.isArray(e)||(e=e.split(".")),e.length===0)?null:e.reduce((i,r)=>i&&i._find(r),this)}getError(t,e){let i=e?this.get(e):this;return i&&i.errors?i.errors[t]:null}hasError(t,e){return!!this.getError(t,e)}get root(){let t=this;for(;t._parent;)t=t._parent;return t}_updateControlsErrors(t,e,i){this.status=this._calculateStatus(),t&&this.statusChanges.emit(this.status),(t||i)&&this._events.next(new b(this.status,e)),this._parent&&this._parent._updateControlsErrors(t,e,i)}_initObservables(){this.valueChanges=new y,this.statusChanges=new y}_calculateStatus(){return this._allControlsDisabled()?I:this.errors?G:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(D)?D:this._anyControlsHaveStatus(G)?G:S}_anyControlsHaveStatus(t){return this._anyControls(e=>e.status===t)}_anyControlsDirty(){return this._anyControls(t=>t.dirty)}_anyControlsTouched(){return this._anyControls(t=>t.touched)}_updatePristine(t,e){let i=!this._anyControlsDirty(),r=this.pristine!==i;this.pristine=i,this._parent&&!t.onlySelf&&this._parent._updatePristine(t,e),r&&this._events.next(new O(this.pristine,e))}_updateTouched(t={},e){this.touched=this._anyControlsTouched(),this._events.next(new N(this.touched,e)),this._parent&&!t.onlySelf&&this._parent._updateTouched(t,e)}_onDisabledChange=[];_registerOnCollectionChange(t){this._onCollectionChange=t}_setUpdateStrategy(t){X(t)&&t.updateOn!=null&&(this._updateOn=t.updateOn)}_parentMarkedDirty(t){let e=this._parent&&this._parent.dirty;return!t&&!!e&&!this._parent._anyControlsDirty()}_find(t){return null}_assignValidators(t){this._rawValidators=Array.isArray(t)?t.slice():t,this._composedValidatorFn=bt(this._rawValidators)}_assignAsyncValidators(t){this._rawAsyncValidators=Array.isArray(t)?t.slice():t,this._composedAsyncValidatorFn=Mt(this._rawAsyncValidators)}},W=class extends M{constructor(t,e,i){super(ge(e),pe(i,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}controls;registerControl(t,e){return this.controls[t]?this.controls[t]:(this.controls[t]=e,e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange),e)}addControl(t,e,i={}){this.registerControl(t,e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}removeControl(t,e={}){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}setControl(t,e,i={}){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],e&&this.registerControl(t,e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}contains(t){return this.controls.hasOwnProperty(t)&&this.controls[t].enabled}setValue(t,e={}){Qe(this,!0,t),Object.keys(t).forEach(i=>{Je(this,!0,i),this.controls[i].setValue(t[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){t!=null&&(Object.keys(t).forEach(i=>{let r=this.controls[i];r&&r.patchValue(t[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(t={},e={}){this._forEachChild((i,r)=>{i.reset(t?t[r]:null,{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e,this),this._updateTouched(e,this),this.updateValueAndValidity(e)}getRawValue(){return this._reduceChildren({},(t,e,i)=>(t[i]=e.getRawValue(),t))}_syncPendingControls(){let t=this._reduceChildren(!1,(e,i)=>i._syncPendingControls()?!0:e);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_forEachChild(t){Object.keys(this.controls).forEach(e=>{let i=this.controls[e];i&&t(i,e)})}_setUpControls(){this._forEachChild(t=>{t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(t){for(let[e,i]of Object.entries(this.controls))if(this.contains(e)&&t(i))return!0;return!1}_reduceValue(){let t={};return this._reduceChildren(t,(e,i,r)=>((i.enabled||this.disabled)&&(e[r]=i.value),e))}_reduceChildren(t,e){let i=t;return this._forEachChild((r,o)=>{i=e(i,r,o)}),i}_allControlsDisabled(){for(let t of Object.keys(this.controls))if(this.controls[t].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(t){return this.controls.hasOwnProperty(t)?this.controls[t]:null}};var ue=class extends W{};var Y=new _("",{providedIn:"root",factory:()=>K}),K="always";function J(n,t){return[...t.path,n]}function de(n,t,e=K){me(n,t),t.valueAccessor.writeValue(n.value),(n.disabled||e==="always")&&t.valueAccessor.setDisabledState?.(n.disabled),wt(n,t),Ft(n,t),Et(n,t),At(n,t)}function Ne(n,t,e=!0){let i=()=>{};t.valueAccessor&&(t.valueAccessor.registerOnChange(i),t.valueAccessor.registerOnTouched(i)),z(n,t),n&&(t._invokeOnDestroyCallbacks(),n._registerOnCollectionChange(()=>{}))}function q(n,t){n.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(t)})}function At(n,t){if(t.valueAccessor.setDisabledState){let e=i=>{t.valueAccessor.setDisabledState(i)};n.registerOnDisabledChange(e),t._registerOnDestroy(()=>{n._unregisterOnDisabledChange(e)})}}function me(n,t){let e=Ye(n);t.validator!==null?n.setValidators(Se(e,t.validator)):typeof e=="function"&&n.setValidators([e]);let i=Ke(n);t.asyncValidator!==null?n.setAsyncValidators(Se(i,t.asyncValidator)):typeof i=="function"&&n.setAsyncValidators([i]);let r=()=>n.updateValueAndValidity();q(t._rawValidators,r),q(t._rawAsyncValidators,r)}function z(n,t){let e=!1;if(n!==null){if(t.validator!==null){let r=Ye(n);if(Array.isArray(r)&&r.length>0){let o=r.filter(a=>a!==t.validator);o.length!==r.length&&(e=!0,n.setValidators(o))}}if(t.asyncValidator!==null){let r=Ke(n);if(Array.isArray(r)&&r.length>0){let o=r.filter(a=>a!==t.asyncValidator);o.length!==r.length&&(e=!0,n.setAsyncValidators(o))}}}let i=()=>{};return q(t._rawValidators,i),q(t._rawAsyncValidators,i),e}function wt(n,t){t.valueAccessor.registerOnChange(e=>{n._pendingValue=e,n._pendingChange=!0,n._pendingDirty=!0,n.updateOn==="change"&&et(n,t)})}function Et(n,t){t.valueAccessor.registerOnTouched(()=>{n._pendingTouched=!0,n.updateOn==="blur"&&n._pendingChange&&et(n,t),n.updateOn!=="submit"&&n.markAsTouched()})}function et(n,t){n._pendingDirty&&n.markAsDirty(),n.setValue(n._pendingValue,{emitModelToViewChange:!1}),t.viewToModelUpdate(n._pendingValue),n._pendingChange=!1}function Ft(n,t){let e=(i,r)=>{t.valueAccessor.writeValue(i),r&&t.viewToModelUpdate(i)};n.registerOnChange(e),t._registerOnDestroy(()=>{n._unregisterOnChange(e)})}function St(n,t){n==null,me(n,t)}function It(n,t){return z(n,t)}function tt(n,t){if(!n.hasOwnProperty("model"))return!1;let e=n.model;return e.isFirstChange()?!0:!Object.is(t,e.currentValue)}function Ot(n){return Object.getPrototypeOf(n.constructor)===Te}function Nt(n,t){n._syncPendingControls(),t.forEach(e=>{let i=e.control;i.updateOn==="submit"&&i._pendingChange&&(e.viewToModelUpdate(i._pendingValue),i._pendingChange=!1)})}function nt(n,t){if(!t)return null;Array.isArray(t);let e,i,r;return t.forEach(o=>{o.constructor===Ge?e=o:Ot(o)?i=o:r=o}),r||i||e||null}function xt(n,t){let e=n.indexOf(t);e>-1&&n.splice(e,1)}function xe(n,t){let e=n.indexOf(t);e>-1&&n.splice(e,1)}function ke(n){return typeof n=="object"&&n!==null&&Object.keys(n).length===2&&"value"in n&&"disabled"in n}var x=class extends M{defaultValue=null;_onChange=[];_pendingValue;_pendingChange=!1;constructor(t=null,e,i){super(ge(e),pe(i,e)),this._applyFormState(t),this._setUpdateStrategy(e),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),X(e)&&(e.nonNullable||e.initialValueIsDefault)&&(ke(t)?this.defaultValue=t.value:this.defaultValue=t)}setValue(t,e={}){this.value=this._pendingValue=t,this._onChange.length&&e.emitModelToViewChange!==!1&&this._onChange.forEach(i=>i(this.value,e.emitViewToModelChange!==!1)),this.updateValueAndValidity(e)}patchValue(t,e={}){this.setValue(t,e)}reset(t=this.defaultValue,e={}){this._applyFormState(t),this.markAsPristine(e),this.markAsUntouched(e),this.setValue(this.value,e),this._pendingChange=!1}_updateValue(){}_anyControls(t){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(t){this._onChange.push(t)}_unregisterOnChange(t){xe(this._onChange,t)}registerOnDisabledChange(t){this._onDisabledChange.push(t)}_unregisterOnDisabledChange(t){xe(this._onDisabledChange,t)}_forEachChild(t){}_syncPendingControls(){return this.updateOn==="submit"&&(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),this._pendingChange)?(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),!0):!1}_applyFormState(t){ke(t)?(this.value=this._pendingValue=t.value,t.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=t}};var kt=n=>n instanceof x,Pt=(()=>{class n extends c{_parent;ngOnInit(){this._checkParentType(),this.formDirective.addFormGroup(this)}ngOnDestroy(){this.formDirective&&this.formDirective.removeFormGroup(this)}get control(){return this.formDirective.getFormGroup(this)}get path(){return J(this.name==null?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}static \u0275fac=(()=>{let e;return function(r){return(e||(e=F(n)))(r||n)}})();static \u0275dir=l({type:n,standalone:!1,features:[d]})}return n})();var Rt={provide:v,useExisting:g(()=>jt)},Pe=Promise.resolve(),jt=(()=>{class n extends v{_changeDetectorRef;callSetDisabledState;control=new x;static ngAcceptInputType_isDisabled;_registered=!1;viewModel;name="";isDisabled;model;options;update=new y;constructor(e,i,r,o,a,ut){super(),this._changeDetectorRef=a,this.callSetDisabledState=ut,this._parent=e,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=nt(this,o)}ngOnChanges(e){if(this._checkForErrors(),!this._registered||"name"in e){if(this._registered&&(this._checkName(),this.formDirective)){let i=e.name.previousValue;this.formDirective.removeControl({name:i,path:this._getPath(i)})}this._setUpControl()}"isDisabled"in e&&this._updateDisabled(e),tt(e,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}get path(){return this._getPath(this.name)}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!!(this.options&&this.options.standalone)}_setUpStandalone(){de(this.control,this,this.callSetDisabledState),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._checkName()}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),!this._isStandalone()&&this.name}_updateValue(e){Pe.then(()=>{this.control.setValue(e,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(e){let i=e.isDisabled.currentValue,r=i!==0&&re(i);Pe.then(()=>{r&&!this.control.disabled?this.control.disable():!r&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(e){return this._parent?J(e,this._parent):[e]}static \u0275fac=function(i){return new(i||n)(s(c,9),s(A,10),s(k,10),s(Z,10),s(we,8),s(Y,8))};static \u0275dir=l({type:n,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"],options:[0,"ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],standalone:!1,features:[p([Rt]),d,E]})}return n})();var vn=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275dir=l({type:n,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""],standalone:!1})}return n})(),Tt={provide:Z,useExisting:g(()=>Gt),multi:!0},Gt=(()=>{class n extends Te{writeValue(e){let i=e??"";this.setProperty("value",i)}registerOnChange(e){this.onChange=i=>{e(i==""?null:parseFloat(i))}}static \u0275fac=(()=>{let e;return function(r){return(e||(e=F(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(i,r){i&1&&T("input",function(a){return r.onChange(a.target.value)})("blur",function(){return r.onTouched()})},standalone:!1,features:[p([Tt]),d]})}return n})();var it=new _("");var Ut={provide:c,useExisting:g(()=>rt)},rt=(()=>{class n extends c{callSetDisabledState;get submitted(){return f(this._submittedReactive)}set submitted(e){this._submittedReactive.set(e)}_submitted=V(()=>this._submittedReactive());_submittedReactive=C(!1);_oldForm;_onCollectionChange=()=>this._updateDomValue();directives=[];form=null;ngSubmit=new y;constructor(e,i,r){super(),this.callSetDisabledState=r,this._setValidators(e),this._setAsyncValidators(i)}ngOnChanges(e){e.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(z(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(e){let i=this.form.get(e.path);return de(i,e,this.callSetDisabledState),i.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),i}getControl(e){return this.form.get(e.path)}removeControl(e){Ne(e.control||null,e,!1),xt(this.directives,e)}addFormGroup(e){this._setUpFormContainer(e)}removeFormGroup(e){this._cleanUpFormContainer(e)}getFormGroup(e){return this.form.get(e.path)}addFormArray(e){this._setUpFormContainer(e)}removeFormArray(e){this._cleanUpFormContainer(e)}getFormArray(e){return this.form.get(e.path)}updateModel(e,i){this.form.get(e.path).setValue(i)}onSubmit(e){return this._submittedReactive.set(!0),Nt(this.form,this.directives),this.ngSubmit.emit(e),this.form._events.next(new ae(this.control)),e?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(e=void 0){this.form.reset(e),this._submittedReactive.set(!1),this.form._events.next(new le(this.form))}_updateDomValue(){this.directives.forEach(e=>{let i=e.control,r=this.form.get(e.path);i!==r&&(Ne(i||null,e),kt(r)&&(de(r,e,this.callSetDisabledState),e.control=r))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(e){let i=this.form.get(e.path);St(i,e),i.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(e){if(this.form){let i=this.form.get(e.path);i&&It(i,e)&&i.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){me(this.form,this),this._oldForm&&z(this._oldForm,this)}static \u0275fac=function(i){return new(i||n)(s(A,10),s(k,10),s(Y,8))};static \u0275dir=l({type:n,selectors:[["","formGroup",""]],hostBindings:function(i,r){i&1&&T("submit",function(a){return r.onSubmit(a)})("reset",function(){return r.onReset()})},inputs:{form:[0,"formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],standalone:!1,features:[p([Ut]),d,E]})}return n})(),Bt={provide:c,useExisting:g(()=>ot)},ot=(()=>{class n extends Pt{name=null;constructor(e,i,r){super(),this._parent=e,this._setValidators(i),this._setAsyncValidators(r)}_checkParentType(){at(this._parent)}static \u0275fac=function(i){return new(i||n)(s(c,13),s(A,10),s(k,10))};static \u0275dir=l({type:n,selectors:[["","formGroupName",""]],inputs:{name:[0,"formGroupName","name"]},standalone:!1,features:[p([Bt]),d]})}return n})(),Ht={provide:c,useExisting:g(()=>st)},st=(()=>{class n extends c{_parent;name=null;constructor(e,i,r){super(),this._parent=e,this._setValidators(i),this._setAsyncValidators(r)}ngOnInit(){at(this._parent),this.formDirective.addFormArray(this)}ngOnDestroy(){this.formDirective?.removeFormArray(this)}get control(){return this.formDirective.getFormArray(this)}get formDirective(){return this._parent?this._parent.formDirective:null}get path(){return J(this.name==null?this.name:this.name.toString(),this._parent)}static \u0275fac=function(i){return new(i||n)(s(c,13),s(A,10),s(k,10))};static \u0275dir=l({type:n,selectors:[["","formArrayName",""]],inputs:{name:[0,"formArrayName","name"]},standalone:!1,features:[p([Ht]),d]})}return n})();function at(n){return!(n instanceof ot)&&!(n instanceof rt)&&!(n instanceof st)}var Lt={provide:v,useExisting:g(()=>$t)},$t=(()=>{class n extends v{_ngModelWarningConfig;_added=!1;viewModel;control;name=null;set isDisabled(e){}model;update=new y;static _ngModelWarningSentOnce=!1;_ngModelWarningSent=!1;constructor(e,i,r,o,a){super(),this._ngModelWarningConfig=a,this._parent=e,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=nt(this,o)}ngOnChanges(e){this._added||this._setUpControl(),tt(e,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}get path(){return J(this.name==null?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_setUpControl(){this.control=this.formDirective.addControl(this),this._added=!0}static \u0275fac=function(i){return new(i||n)(s(c,13),s(A,10),s(k,10),s(Z,10),s(it,8))};static \u0275dir=l({type:n,selectors:[["","formControlName",""]],inputs:{name:[0,"formControlName","name"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},standalone:!1,features:[p([Lt]),d,E]})}return n})();var Wt=(()=>{class n{_validator=U;_onChange;_enabled;ngOnChanges(e){if(this.inputName in e){let i=this.normalizeInput(e[this.inputName].currentValue);this._enabled=this.enabled(i),this._validator=this._enabled?this.createValidator(i):U,this._onChange&&this._onChange()}}validate(e){return this._validator(e)}registerOnValidatorChange(e){this._onChange=e}enabled(e){return e!=null}static \u0275fac=function(i){return new(i||n)};static \u0275dir=l({type:n,features:[E]})}return n})();var qt={provide:A,useExisting:g(()=>zt),multi:!0};var zt=(()=>{class n extends Wt{required;inputName="required";normalizeInput=re;createValidator=e=>Ue;enabled(e){return e}static \u0275fac=(()=>{let e;return function(r){return(e||(e=F(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(i,r){i&2&&Ae("required",r._enabled?"":null)},inputs:{required:"required"},standalone:!1,features:[p([qt]),d]})}return n})();var lt=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=j({type:n});static \u0275inj=P({})}return n})(),ce=class extends M{constructor(t,e,i){super(ge(e),pe(i,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}controls;at(t){return this.controls[this._adjustIndex(t)]}push(t,e={}){this.controls.push(t),this._registerControl(t),this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}insert(t,e,i={}){this.controls.splice(t,0,e),this._registerControl(e),this.updateValueAndValidity({emitEvent:i.emitEvent})}removeAt(t,e={}){let i=this._adjustIndex(t);i<0&&(i=0),this.controls[i]&&this.controls[i]._registerOnCollectionChange(()=>{}),this.controls.splice(i,1),this.updateValueAndValidity({emitEvent:e.emitEvent})}setControl(t,e,i={}){let r=this._adjustIndex(t);r<0&&(r=0),this.controls[r]&&this.controls[r]._registerOnCollectionChange(()=>{}),this.controls.splice(r,1),e&&(this.controls.splice(r,0,e),this._registerControl(e)),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(t,e={}){Qe(this,!1,t),t.forEach((i,r)=>{Je(this,!1,r),this.at(r).setValue(i,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){t!=null&&(t.forEach((i,r)=>{this.at(r)&&this.at(r).patchValue(i,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(t=[],e={}){this._forEachChild((i,r)=>{i.reset(t[r],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e,this),this._updateTouched(e,this),this.updateValueAndValidity(e)}getRawValue(){return this.controls.map(t=>t.getRawValue())}clear(t={}){this.controls.length<1||(this._forEachChild(e=>e._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:t.emitEvent}))}_adjustIndex(t){return t<0?t+this.length:t}_syncPendingControls(){let t=this.controls.reduce((e,i)=>i._syncPendingControls()?!0:e,!1);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_forEachChild(t){this.controls.forEach((e,i)=>{t(e,i)})}_updateValue(){this.value=this.controls.filter(t=>t.enabled||this.disabled).map(t=>t.value)}_anyControls(t){return this.controls.some(e=>e.enabled&&t(e))}_setUpControls(){this._forEachChild(t=>this._registerControl(t))}_allControlsDisabled(){for(let t of this.controls)if(t.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(t){t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)}_find(t){return this.at(t)??null}};function Re(n){return!!n&&(n.asyncValidators!==void 0||n.validators!==void 0||n.updateOn!==void 0)}var Zt=(()=>{class n{useNonNullable=!1;get nonNullable(){let e=new n;return e.useNonNullable=!0,e}group(e,i=null){let r=this._reduceControls(e),o={};return Re(i)?o=i:i!==null&&(o.validators=i.validator,o.asyncValidators=i.asyncValidator),new W(r,o)}record(e,i=null){let r=this._reduceControls(e);return new ue(r,i)}control(e,i,r){let o={};return this.useNonNullable?(Re(i)?o=i:(o.validators=i,o.asyncValidators=r),new x(e,h(u({},o),{nonNullable:!0}))):new x(e,i,r)}array(e,i,r){let o=e.map(a=>this._createControl(a));return new ce(o,i,r)}_reduceControls(e){let i={};return Object.keys(e).forEach(r=>{i[r]=this._createControl(e[r])}),i}_createControl(e){if(e instanceof x)return e;if(e instanceof M)return e;if(Array.isArray(e)){let i=e[0],r=e.length>1?e[1]:null,o=e.length>2?e[2]:null;return this.control(i,r,o)}else return this.control(e)}static \u0275fac=function(i){return new(i||n)};static \u0275prov=Q({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),yn=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275prov=Q({token:n,factory:()=>R(Zt).nonNullable,providedIn:"root"})}return n})();var Cn=(()=>{class n{static withConfig(e){return{ngModule:n,providers:[{provide:Y,useValue:e.callSetDisabledState??K}]}}static \u0275fac=function(i){return new(i||n)};static \u0275mod=j({type:n});static \u0275inj=P({imports:[lt]})}return n})(),Vn=(()=>{class n{static withConfig(e){return{ngModule:n,providers:[{provide:it,useValue:e.warnOnNgModelWithFormControl??"always"},{provide:Y,useValue:e.callSetDisabledState??K}]}}static \u0275fac=function(i){return new(i||n)};static \u0275mod=j({type:n});static \u0275inj=P({imports:[lt]})}return n})();function Xt(n,t){!t?.injector&&De(Xt);let e=t?.injector??R(ee),i=new ve(1),r=Ee(()=>{let o;try{o=n()}catch(a){f(()=>i.error(a));return}f(()=>i.next(o))},{injector:e,manualCleanup:!0});return e.get(be).onDestroy(()=>{r.destroy(),i.complete()}),i.asObservable()}export{Z as a,Ge as b,Fe as c,v as d,pn as e,mn as f,W as g,x as h,jt as i,vn as j,Gt as k,rt as l,ot as m,st as n,$t as o,zt as p,ce as q,Zt as r,yn as s,Cn as t,Vn as u,Xt as v};
|