1import{a as xt}from"./chunk-FYZI7WGT.js";import{a as B}from"./chunk-N4Y6ONWE.js";import{a as wt,b as We}from"./chunk-2UBX7RJ3.js";import{a as me,b as q}from"./chunk-5CCPNCAT.js";import{a as vt}from"./chunk-F32QLDU3.js";import{a as Re}from"./chunk-RYEACL6S.js";import"./chunk-F2AP4GBC.js";import"./chunk-WHU4XXSE.js";import{a as _t}from"./chunk-T24IL6KT.js";import"./chunk-CKJXIJEW.js";import{c as xe,d as oe,e as Ue}from"./chunk-CLFCPDRQ.js";import"./chunk-POB67RW2.js";import{a as ht,b as Be}from"./chunk-YSH2LEMW.js";import{a as Ct,b as ft}from"./chunk-44OM7VNA.js";import"./chunk-RIDV7OZG.js";import{A as S,F as ee,G as P,H as I,b as ct,c as G,d as K,k as H,l as T,o as mt,q as Ne,r as we,s as Q,u as dt,v as Ge,x as Y,y as pt,z as Z}from"./chunk-N6B7OEUW.js";import"./chunk-AI2H4MTZ.js";import{f as gt}from"./chunk-RZWUF2WE.js";import{a as je}from"./chunk-YT3ISTXV.js";import{a as bt}from"./chunk-7WMAZ4BZ.js";import"./chunk-5BDXO5V3.js";import"./chunk-KCEJCXJZ.js";import{d as ie}from"./chunk-5BVZXLFA.js";import"./chunk-RTGIJOJ3.js";import"./chunk-N4VJFAAV.js";import"./chunk-7LORS5UB.js";import"./chunk-OCRPHCVN.js";import{a as be}from"./chunk-WXLVEQ4T.js";import{e as lt,g as st}from"./chunk-I335Z6VX.js";import"./chunk-YYKWFEMG.js";import"./chunk-D2N3WVHQ.js";import{a as ut}from"./chunk-OP5LXOJA.js";import"./chunk-ARD6OICO.js";import{e as Me}from"./chunk-BBHJ2D5U.js";import{c as ve}from"./chunk-RH7YKMCI.js";import"./chunk-2P2IIG2U.js";import"./chunk-J3TYBNDU.js";import{b as _e}from"./chunk-4QCSDQDN.js";import"./chunk-W3MH5BOT.js";import{A as Le,D as ce,m as ne,w as at}from"./chunk-GUQT3FOM.js";import{Aa as y,Ac as ae,Ba as L,Bc as le,Dc as D,Dd as F,Eb as l,Ec as N,Fd as E,Ga as ue,Ib as b,Id as J,Jb as v,Jc as O,K as $e,Lb as _,N as De,Oa as re,Qc as x,S as Ae,Sc as m,Tc as it,Ub as k,Uc as he,Vb as ot,Wc as Ce,Xc as $,Yc as X,ac as ge,ad as se,cd as ze,e as Je,ea as Xe,fa as et,fd as a,gd as h,ha as pe,hd as rt,id as fe,kd as A,ld as V,mc as Ve,md as z,na as tt,o as Te,pc as p,rb as nt,rc as u,s as Ke,tc as j,uc as R,vc as U,vd as He,wc as g,wd as Ze,xc as i,ya as C,yc as o,za as f,zc as d}from"./chunk-H5RMQNTW.js";import"./chunk-EU2KAMEK.js";import"./chunk-YNC7RVHT.js";var ye=(()=>{class t{constructor(e){this.rootFormGroup=e}ngOnInit(){this.selectedCurrency=localStorage.getItem("selectedCurrency"),this.selectedCurrency&&(this.selectedCurrency=this.selectedCurrency?.replace(/^"|"$/g,"")),this.form=this.rootFormGroup.control}static{this.\u0275fac=function(r){return new(r||t)(_(S))}}static{this.\u0275cmp=k({type:t,selectors:[["app-business-assets"]],decls:16,vars:3,consts:[[3,"formGroup"],["formGroupName","businessAssets",1,"p-top"],[1,"form-input-wrapper"],["for","tradableGoods",1,"form-label","mb-2"],[1,"d-flex","align-items-center","form-control-container"],[1,"d-inline-block","lh-1","currency"],["type","text","inputmode","numeric","autocomplete","off","formControlName","goodsAmount","id","tradableGoods","placeholder","","onlyNumbersAndDot","",1,"form-control","bg-transparent","ps-0","shadow-none"],["for","rawMaterials",1,"form-label","mb-2"],["type","text","inputmode","numeric","autocomplete","off","formControlName","rawMaterialsAmount","id","rawMaterials","placeholder","","onlyNumbersAndDot","",1,"form-control","bg-transparent","ps-0","shadow-none"]],template:function(r,n){r&1&&(D(0,0),i(1,"div",1)(2,"div",2)(3,"label",3),a(4,"Enter the total value of tradable goods:"),o(),i(5,"div",4)(6,"span",5),a(7),o(),d(8,"input",6),b(),o()(),i(9,"div",2)(10,"label",7),a(11,"Enter the value of your raw materials:"),o(),i(12,"div",4)(13,"span",5),a(14),o(),d(15,"input",8),b(),o()()(),N()),r&2&&(g("formGroup",n.form),l(7),h(n.selectedCurrency),l(),v(),l(6),h(n.selectedCurrency),l(),v())},dependencies:[P,G,H,T,I,S,Z,Y,B],styles:["@media(min-width:992px){.p-top[_ngcontent-%COMP%]{padding-top:7.25rem}}.form-input-wrapper[_ngcontent-%COMP%]{margin-bottom:1.5rem}@media(min-width:1200px){.form-input-wrapper[_ngcontent-%COMP%]{margin-bottom:2rem}}.form-input-wrapper[_ngcontent-%COMP%] .form-label[_ngcontent-%COMP%]{color:#242424;font-size:1rem;font-weight:600}@media(min-width:1200px){.form-input-wrapper[_ngcontent-%COMP%] .form-label[_ngcontent-%COMP%]{font-size:1.125rem}}.form-input-wrapper[_ngcontent-%COMP%] .form-control-container[_ngcontent-%COMP%]{border:0;box-shadow:0 0 0 .5px #dee1ed;background-color:#f4f5f9;border-radius:.3125rem;height:3.75rem;padding:0 .75rem;gap:.75rem}.form-input-wrapper[_ngcontent-%COMP%] .form-control-container[_ngcontent-%COMP%]:focus-within{background-color:#e8f0fe;box-shadow:0 0 0 .5px #009000}.form-input-wrapper[_ngcontent-%COMP%] .form-control-container[_ngcontent-%COMP%] .currency[_ngcontent-%COMP%]{font-weight:600;color:#696969}.form-input-wrapper[_ngcontent-%COMP%] .form-control-container[_ngcontent-%COMP%] .form-control[_ngcontent-%COMP%]{border:0;background-color:transparent}.form-input-wrapper[_ngcontent-%COMP%] .form-control-container[_ngcontent-%COMP%] .form-control.ng-valid[_ngcontent-%COMP%]{background-color:#f4f5f9}"],changeDetection:1})}}return t})();var ke=(()=>{class t{constructor(e){this.rootFormGroup=e}ngOnInit(){this.selectedCurrency=localStorage.getItem("selectedCurrency"),this.selectedCurrency&&(this.selectedCurrency=this.selectedCurrency?.replace(/^"|"$/g,"")),this.form=this.rootFormGroup.control}static{this.\u0275fac=function(r){return new(r||t)(_(S))}}static{this.\u0275cmp=k({type:t,selectors:[["app-cash-details"]],decls:16,vars:3,consts:[[3,"formGroup"],["formGroupName","cashDetails",1,"p-top"],[1,"form-input-wrapper"],["for","cash",1,"form-label","mb-2"],[1,"d-flex","align-items-center","form-control-container"],[1,"d-inline-block","lh-1","currency"],["type","text","inputmode","numeric","autocomplete","off","formControlName","cashAmount","id","cash","placeholder","","onlyNumbersAndDot","",1,"form-control","bg-transparent","ps-0","shadow-none"],["for","totalBankAccount",1,"form-label","mb-2"],["type","text","inputmode","numeric","autocomplete","off","formControlName","bankAmount","id","totalBankAccount","placeholder","","onlyNumbersAndDot","",1,"form-control","bg-transparent","ps-0","shadow-none"]],template:function(r,n){r&1&&(D(0,0),i(1,"form",1)(2,"div",2)(3,"label",3),a(4,"Enter cash in hand:"),o(),i(5,"div",4)(6,"span",5),a(7),o(),d(8,"input",6),b(),o()(),i(9,"div",2)(10,"label",7),a(11,"Enter total amount in your bank account(s):"),o(),i(12,"div",4)(13,"span",5),a(14),o(),d(15,"input",8),b(),o()()(),N()),r&2&&(g("formGroup",n.form),l(7),h(n.selectedCurrency),l(),v(),l(6),h(n.selectedCurrency),l(),v())},dependencies:[P,Q,G,H,T,mt,I,S,Z,Y,B],styles:["@media(min-width:992px){.p-top[_ngcontent-%COMP%]{padding-top:7.25rem}}.form-input-wrapper[_ngcontent-%COMP%]{margin-bottom:1.5rem}@media(min-width:1200px){.form-input-wrapper[_ngcontent-%COMP%]{margin-bottom:2rem}}.form-input-wrapper[_ngcontent-%COMP%] .form-label[_ngcontent-%COMP%]{color:#242424;font-size:1rem;font-weight:600}@media(min-width:1200px){.form-input-wrapper[_ngcontent-%COMP%] .form-label[_ngcontent-%COMP%]{font-size:1.125rem}}.form-input-wrapper[_ngcontent-%COMP%] .form-control-container[_ngcontent-%COMP%]{border:0;box-shadow:0 0 0 .5px #dee1ed;background-color:#f4f5f9;border-radius:.3125rem;height:3.75rem;padding:0 .75rem;gap:.75rem}.form-input-wrapper[_ngcontent-%COMP%] .form-control-container[_ngcontent-%COMP%]:focus-within{background-color:#e8f0fe;box-shadow:0 0 0 .5px #009000}.form-input-wrapper[_ngcontent-%COMP%] .form-control-container[_ngcontent-%COMP%] .currency[_ngcontent-%COMP%]{font-weight:600;color:#696969}.form-input-wrapper[_ngcontent-%COMP%] .form-control-container[_ngcontent-%COMP%] .form-control[_ngcontent-%COMP%]{border:0;background-color:transparent}.form-input-wrapper[_ngcontent-%COMP%] .form-control-container[_ngcontent-%COMP%] .form-control.ng-valid[_ngcontent-%COMP%]{background-color:#f4f5f9}"],changeDetection:1})}}return t})();var Se=(()=>{class t{constructor(e){this.rootFormGroup=e}ngOnInit(){this.selectedCurrency=localStorage.getItem("selectedCurrency"),this.selectedCurrency&&(this.selectedCurrency=this.selectedCurrency?.replace(/^"|"$/g,"")),this.form=this.rootFormGroup.control}static{this.\u0275fac=function(r){return new(r||t)(_(S))}}static{this.\u0275cmp=k({type:t,selectors:[["app-gold-and-silver-details"]],decls:21,vars:3,consts:[[3,"formGroup"],["formGroupName","goldAndSilver",1,"p-top"],[1,"form-input-wrapper"],["for","gold",1,"form-label","mb-2"],[1,"d-flex","align-items-center","form-control-container"],[1,"d-inline-block","lh-1","currency"],["type","text","inputmode","numeric","autocomplete","off","formControlName","goldAmount","id","gold","placeholder","","onlyNumbersAndDot","",1,"form-control","bg-transparent","ps-0","shadow-none"],["for","silver",1,"form-label","mb-2"],["type","text","inputmode","numeric","autocomplete","off","formControlName","silverAmount","id","silver","placeholder","","onlyNumbersAndDot","",1,"form-control","bg-transparent","ps-0","shadow-none"],[1,"d-flex","align-items-start","gap-2","step-info-wrapper"],["width","16","height","16","viewBox","0 0 21 20","fill","none","xmlns","http://www.w3.org/2000/svg",1,"flex-shrink-0","mt-1"],["d","M10.5 15C10.7833 15 11.0208 14.9042 11.2125 14.7125C11.4042 14.5208 11.5 14.2833 11.5 14V10C11.5 9.71667 11.4042 9.47917 11.2125 9.2875C11.0208 9.09583 10.7833 9 10.5 9C10.2167 9 9.97917 9.09583 9.7875 9.2875C9.59583 9.47917 9.5 9.71667 9.5 10V14C9.5 14.2833 9.59583 14.5208 9.7875 14.7125C9.97917 14.9042 10.2167 15 10.5 15ZM10.5 7C10.7833 7 11.0208 6.90417 11.2125 6.7125C11.4042 6.52083 11.5 6.28333 11.5 6C11.5 5.71667 11.4042 5.47917 11.2125 5.2875C11.0208 5.09583 10.7833 5 10.5 5C10.2167 5 9.97917 5.09583 9.7875 5.2875C9.59583 5.47917 9.5 5.71667 9.5 6C9.5 6.28333 9.59583 6.52083 9.7875 6.7125C9.97917 6.90417 10.2167 7 10.5 7ZM10.5 20C9.11667 20 7.81667 19.7375 6.6 19.2125C5.38333 18.6875 4.325 17.975 3.425 17.075C2.525 16.175 1.8125 15.1167 1.2875 13.9C0.7625 12.6833 0.5 11.3833 0.5 10C0.5 8.61667 0.7625 7.31667 1.2875 6.1C1.8125 4.88333 2.525 3.825 3.425 2.925C4.325 2.025 5.38333 1.3125 6.6 0.7875C7.81667 0.2625 9.11667 0 10.5 0C11.8833 0 13.1833 0.2625 14.4 0.7875C15.6167 1.3125 16.675 2.025 17.575 2.925C18.475 3.825 19.1875 4.88333 19.7125 6.1C20.2375 7.31667 20.5 8.61667 20.5 10C20.5 11.3833 20.2375 12.6833 19.7125 13.9C19.1875 15.1167 18.475 16.175 17.575 17.075C16.675 17.975 15.6167 18.6875 14.4 19.2125C13.1833 19.7375 11.8833 20 10.5 20ZM10.5 18C12.7333 18 14.625 17.225 16.175 15.675C17.725 14.125 18.5 12.2333 18.5 10C18.5 7.76667 17.725 5.875 16.175 4.325C14.625 2.775 12.7333 2 10.5 2C8.26667 2 6.375 2.775 4.825 4.325C3.275 5.875 2.5 7.76667 2.5 10C2.5 12.2333 3.275 14.125 4.825 15.675C6.375 17.225 8.26667 18 10.5 18Z","fill","#96999E"],[1,"mb-0","step-info-text"]],template:function(r,n){r&1&&(D(0,0),i(1,"div",1)(2,"div",2)(3,"label",3),a(4,"Enter the value of Gold you hold:"),o(),i(5,"div",4)(6,"span",5),a(7),o(),d(8,"input",6),b(),o()(),i(9,"div",2)(10,"label",7),a(11,"Enter the value of Silver you hold:"),o(),i(12,"div",4)(13,"span",5),a(14),o(),d(15,"input",8),b(),o()(),i(16,"div",9),y(),i(17,"svg",10),d(18,"path",11),o(),L(),i(19,"p",12),a(20," You would need to weigh the Zakatable Gold/Silver and calculate the value as per their current rate in your city. "),o()()(),N()),r&2&&(g("formGroup",n.form),l(7),h(n.selectedCurrency),l(),v(),l(6),h(n.selectedCurrency),l(),v())},dependencies:[P,G,H,T,I,S,Z,Y,B],styles:["@media(min-width:992px){.p-top[_ngcontent-%COMP%]{padding-top:7.25rem}}.form-input-wrapper[_ngcontent-%COMP%]{margin-bottom:1.5rem}@media(min-width:1200px){.form-input-wrapper[_ngcontent-%COMP%]{margin-bottom:2rem}}.form-input-wrapper[_ngcontent-%COMP%] .form-label[_ngcontent-%COMP%]{color:#242424;font-size:1rem;font-weight:600}@media(min-width:1200px){.form-input-wrapper[_ngcontent-%COMP%] .form-label[_ngcontent-%COMP%]{font-size:1.125rem}}.form-input-wrapper[_ngcontent-%COMP%] .form-control-container[_ngcontent-%COMP%]{border:0;box-shadow:0 0 0 .5px #dee1ed;background-color:#f4f5f9;border-radius:.3125rem;height:3.75rem;padding:0 .75rem;gap:.75rem}.form-input-wrapper[_ngcontent-%COMP%] .form-control-container[_ngcontent-%COMP%]:focus-within{background-color:#e8f0fe;box-shadow:0 0 0 .5px #009000}.form-input-wrapper[_ngcontent-%COMP%] .form-control-container[_ngcontent-%COMP%] .currency[_ngcontent-%COMP%]{font-weight:600;color:#696969}.form-input-wrapper[_ngcontent-%COMP%] .form-control-container[_ngcontent-%COMP%] .form-control[_ngcontent-%COMP%]{border:0;background-color:transparent}.form-input-wrapper[_ngcontent-%COMP%] .form-control-container[_ngcontent-%COMP%] .form-control.ng-valid[_ngcontent-%COMP%]{background-color:#f4f5f9}.step-info-wrapper[_ngcontent-%COMP%]{background-color:#fdf5e8;padding:.625rem 1rem;margin:0 -.75rem}@media(min-width:992px){.step-info-wrapper[_ngcontent-%COMP%]{margin:0}}.step-info-wrapper[_ngcontent-%COMP%] .step-info-text[_ngcontent-%COMP%]{color:#24242499;font-size:.875rem}"],changeDetection:1})}}return t})();function At(t,c){if(t&1&&(i(0,"div",2)(1,"label",3),a(2,"Enter the total amount of all your loans:"),o(),i(3,"div",4)(4,"span",5),a(5),o(),d(6,"input",6),b(),o()()),t&2){let e=m();l(5),h(e.selectedCurrency),l(),v()}}function Vt(t,c){if(t&1&&(i(0,"div",2)(1,"label",7)(2,"span"),a(3,"Utility Bills, Taxes, Rent etc"),o(),d(4,"br"),i(5,"span",8),a(6,"(Payable before Zakat year) :"),o()(),i(7,"div",4)(8,"span",5),a(9),o(),d(10,"input",9),b(),o()()),t&2){let e=m();l(9),h(e.selectedCurrency),l(),v()}}
1function zt(t,c){if(t&1&&(i(0,"div",2)(1,"label",10)(2,"span"),a(3,"Employee salaries, dealer payments "),o(),d(4,"br"),i(5,"span",8),a(6,"(Payable before Zakat year) :"),o()(),i(7,"div",4)(8,"span",5),a(9),o(),d(10,"input",11),b(),o()()),t&2){let e=m();l(9),h(e.selectedCurrency),l(),v()}}var Oe=(()=>{class t{constructor(e){this.rootFormGroup=e,this.selectedInputs=[],this.inputFields=[]}ngOnInit(){this.selectedCurrency=localStorage.getItem("selectedCurrency"),this.selectedCurrency&&(this.selectedCurrency=this.selectedCurrency?.replace(/^"|"$/g,"")),this.getLiabilityObject(this.selectedInputs),this.form=this.rootFormGroup.control}getLiabilityObject(e){let r=e.find(n=>n.id==="liability");r?.inputs&&(this.inputFields=r?.inputs)}static{this.\u0275fac=function(r){return new(r||t)(_(S))}}static{this.\u0275cmp=k({type:t,selectors:[["app-liabilities"]],inputs:{selectedInputs:"selectedInputs"},decls:5,vars:4,consts:[[3,"formGroup"],["formGroupName","liabilities",1,"p-top"],[1,"form-input-wrapper"],["for","loanAmount",1,"form-label","mb-2"],[1,"d-flex","align-items-center","form-control-container"],[1,"d-inline-block","lh-1","currency"],["type","text","inputmode","numeric","autocomplete","off","formControlName","loanAmount","id","loanAmount","placeholder","","onlyNumbersAndDot","",1,"form-control","bg-transparent","ps-0","shadow-none"],["for","utilitiesAmount",1,"form-label","mb-2"],[1,"label-info"],["type","text","inputmode","numeric","autocomplete","off","formControlName","utilitiesAmount","id","utilitiesAmount","placeholder","","onlyNumbersAndDot","",1,"form-control","bg-transparent","ps-0","shadow-none"],["for","employeeAmount",1,"form-label","mb-2"],["type","text","inputmode","numeric","autocomplete","off","formControlName","employeeAmount","id","employeeAmount","placeholder","","onlyNumbersAndDot","",1,"form-control","bg-transparent","ps-0","shadow-none"]],template:function(r,n){r&1&&(D(0,0),i(1,"div",1),p(2,At,7,1,"div",2),p(3,Vt,11,1,"div",2),p(4,zt,11,1,"div",2),o(),N()),r&2&&(g("formGroup",n.form),l(2),u(n.inputFields.includes("loans")?2:-1),l(),u(n.inputFields.includes("bills")?3:-1),l(),u(n.inputFields.includes("wages")?4:-1))},dependencies:[P,G,H,T,I,S,Z,Y,B],styles:["@media(min-width:992px){.p-top[_ngcontent-%COMP%]{padding-top:7.25rem}}.form-input-wrapper[_ngcontent-%COMP%]{margin-bottom:1.5rem}@media(min-width:1200px){.form-input-wrapper[_ngcontent-%COMP%]{margin-bottom:2rem}}.form-input-wrapper[_ngcontent-%COMP%] .form-label[_ngcontent-%COMP%]{color:#242424;font-size:1rem;font-weight:600}@media(min-width:1200px){.form-input-wrapper[_ngcontent-%COMP%] .form-label[_ngcontent-%COMP%]{font-size:1.125rem}}.form-input-wrapper[_ngcontent-%COMP%] .form-label[_ngcontent-%COMP%] .label-info[_ngcontent-%COMP%]{color:#24242499}.form-input-wrapper[_ngcontent-%COMP%] .form-control-container[_ngcontent-%COMP%]{border:0;box-shadow:0 0 0 .5px #dee1ed;background-color:#f4f5f9;border-radius:.3125rem;height:3.75rem;padding:0 .75rem;gap:.75rem}.form-input-wrapper[_ngcontent-%COMP%] .form-control-container[_ngcontent-%COMP%]:focus-within{background-color:#e8f0fe;box-shadow:0 0 0 .5px #009000}.form-input-wrapper[_ngcontent-%COMP%] .form-control-container[_ngcontent-%COMP%] .currency[_ngcontent-%COMP%]{font-weight:600;color:#696969}.form-input-wrapper[_ngcontent-%COMP%] .form-control-container[_ngcontent-%COMP%] .form-control[_ngcontent-%COMP%]{border:0;background-color:transparent}.form-input-wrapper[_ngcontent-%COMP%] .form-control-container[_ngcontent-%COMP%] .form-control.ng-valid[_ngcontent-%COMP%]{background-color:#f4f5f9}"],changeDetection:1})}}return t})();var Lt=["investmentInfoModalContent"],Nt=["addInvestmentDetailContent"];function Gt(t,c){if(t&1&&(i(0,"ng-option",22),a(1),o()),t&2){let e=c.$implicit;g("value",e.id),l(),h(e.name)}}function Bt(t,c){if(t&1){let e=O();i(0,"div",11)(1,"div",12)(2,"h6",13),a(3),o(),i(4,"button",14),x("click",function(){let n=C(e).$implicit,s=m(2);return f(s.removeOtherInvestment(n))}),a(5,"Remove"),o()(),i(6,"div",15)(7,"div",16)(8,"label",17),a(9,"Total Value of Investment:"),o(),i(10,"div",18)(11,"span",19),a(12),o(),i(13,"input",20),z("ngModelChange",function(n){let s=C(e).$implicit;return V(s.amount,n)||(s.amount=n),f(n)}),o(),b(),o()(),i(14,"div")(15,"ng-select",21),z("ngModelChange",function(n){let s=C(e).$implicit;return V(s.investment_type,n)||(s.investment_type=n),f(n)}),R(16,Gt,2,2,"ng-option",22,j),o(),b(),o()()()}if(t&2){let e=c.$implicit,r=m(2);l(3),h(e.name),l(9),h(r.selectedCurrency),l(),A("ngModel",e.amount),v(),l(2),g("searchable",!1)("clearable",!1),A("ngModel",e.investment_type),v(),l(),U(r.investments)}}function jt(t,c){if(t&1&&(i(0,"div",10),R(1,Bt,18,6,"div",11,j),o()),t&2){let e=m();l(),U(e.otherInvestments)}}function Rt(t,c){if(t&1&&(i(0,"ng-option",22),a(1),o()),t&2){let e=c.$implicit;g("value",e.id),l(),h(e.name)}}function Ut(t,c){if(t&1){let e=O();i(0,"form",23),x("ngSubmit",function(){C(e);let n=m();return f(n.addOtherInvestment())}),i(1,"div",24)(2,"h5",25),a(3,"Add Investment Details"),o(),i(4,"button",26),x("click",function(){C(e);let n=m();return f(n.closeInvestmentDetailsModal())}),y(),i(5,"svg",27),d(6,"path",28),o()()(),L(),i(7,"div",29)(8,"div",30)(9,"label",31),a(10,"Enter Name:"),o(),i(11,"div",32),d(12,"input",33),b(),o()(),i(13,"div",34)(14,"label",35),a(15,"Total Value of Investment:"),o(),i(16,"div",36)(17,"span",19),a(18),o(),d(19,"input",37),b(),o()(),i(20,"div",34)(21,"label",38),a(22,"Type of Investment:"),o(),i(23,"ng-select",39),R(24,Rt,2,2,"ng-option",22,j),o(),b(),b(),o()(),i(26,"div",40)(27,"button",41),x("click",function(){C(e);let n=m();return f(n.closeInvestmentDetailsModal())}),a(28," CANCEL "),o(),i(29,"button",42),a(30," ADD HOLDING "),o()()()}if(t&2){let e=m();g("formGroup",e.addOtherInvestmentForm),l(12),v(),l(6),h(e.selectedCurrency),l(),v(),l(4),g("searchable",!1)("clearable",!1)("ngModel",e.formInvestmentType),v(),v(),l(),U(e.investments),l(5),g("disabled",!e.addOtherInvestmentForm.valid)}}function Wt(t,c){if(t&1){let e=O();i(0,"div",43)(1,"div",24)(2,"h5",25),a(3," Short-Term / Long-Term Calculation Methodology "),o(),i(4,"button",26),x("click",function(){C(e);let n=m();return f(n.closeInvestmentInfoModal())}),y(),i(5,"svg",27),d(6,"path",28),o()()(),L(),i(7,"div",44)(8,"div",45)(9,"h4",46),a(10,"Short-Term (For Trade)"),o(),i(11,"h6",46),a(12,"Current market value of shares * 2.5%"),o(),i(13,"p",47),a(14," These investments are the one which you do with the intent of trading. Usually this are the one's which one holds for less than 1 year. These holdings are treated as liquid/cash and zakat is to be paid as 2.5% on the total amount. "),o()(),i(15,"div")(16,"h4",46),a(17,"Long-Term (For Capital Appreciation)"),o(),i(18,"h6",46),a(19," Current assets of the company / Shares outstanding of the company * Number of long term shares held * 2.5% "),o(),i(20,"p",47),a(21," These investments are the one which you do with the intent of long-term capital appreciation. Usually this are the one's which one holds for more than 1 year "),i(22,"b"),a(23,"AND WHEN"),o(),a(24," the information about underlying Zakatable assets of the company "),i(25,"b"),a(26,"IS UNAVAILABLE THEN:"),o(),a(27," 25% of the current value of the shares is treated as liquid and 2.5% on that amount is calculated as Zakat. "),o()()()()}}var Pe=(()=>{class t{constructor(e,r,n,s){this.modalService=e,this.formBuilder=r,this.zakatService=n,this.platformId=s,this.existingHoldings=[],this.otherInvestments=[],this.isUsersFirstVisit=!0,this.selectedInvestmentType=null,this.formInvestmentType=null,this.investments=[{id:"short",name:"Short Term"},{id:"long",name:"Long Term"}],this.isBrowser=ce(this.platformId),this.selectedInvestmentType=this.investments[0].id}ngOnInit(){this.isBrowser&&(sessionStorage.getItem("isFirstVisitOnOtherInvestments")||(this.openInvestmentInfoModal(),sessionStorage.setItem("isFirstVisitOnOtherInvestments","true"))),this.isUsersFirstVisit=!1,this.selectedCurrency=localStorage.getItem("selectedCurrency"),this.selectedCurrency&&(this.selectedCurrency=this.selectedCurrency?.replace(/^"|"$/g,"")),this.addOtherInvestmentForm=this.formBuilder.group({otherInvestmentName:["",K.required],otherInvestmentValue:["",K.required],investmentType:["",K.required]}),this.otherInvestments=this.zakatService.getOtherInvestment().investments}ngOnDestroy(){this.zakatService.setOtherInvestment(this.otherInvestments)}addOtherInvestment(){if(this.addOtherInvestmentForm.valid){let e={name:this.addOtherInvestmentForm.controls.otherInvestmentName.value,amount:+this.addOtherInvestmentForm.controls.otherInvestmentValue.value,investment_type:this.addOtherInvestmentForm.controls.investmentType.value};this.otherInvestments.push(e),this.zakatService.setOtherInvestment(this.otherInvestments),this.closeInvestmentDetailsModal(),this.addOtherInvestmentForm.reset()}}removeOtherInvestment(e){let r=this.otherInvestments.indexOf(e);r!==-1&&this.otherInvestments.splice(r,1)}openInvestmentInfoModal(){this.investmentInfoModalRef=this.modalService.open(this.investmentInfoModalContent,{centered:!0,size:"lg"})}closeInvestmentInfoModal(){this.investmentInfoModalRef&&this.investmentInfoModalRef.dismiss()}openInvestmentDetailsModal(){this.addInvestmentDetailsRef=this.modalService.open(this.addInvestmentDetailContent,{centered:!0})}closeInvestmentDetailsModal(){this.addInvestmentDetailsRef&&this.addInvestmentDetailsRef.dismiss()}static{this.\u0275fac=function(r){return new(r||t)(_(_e),_(ee),_(q),_(re))}}static{this.\u0275cmp=k({type:t,selectors:[["app-other-investments"]],viewQuery:function(r,n){if(r&1&&Ce(Lt,7)(Nt,7),r&2){let s;$(s=X())&&(n.investmentInfoModalContent=s.first),$(s=X())&&(n.addInvestmentDetailContent=s.first)}},inputs:{existingHoldings:"existingHoldings"},decls:17,vars:2,consts:[["addInvestmentDetailContent",""],["investmentInfoModalContent",""],[3,"ngClass"],[1,"d-flex","align-items-center","gap-2","step-info-wrapper",3,"click"],["width","16","height","16","viewBox","0 0 21 20","fill","none","xmlns","http://www.w3.org/2000/svg",1,"flex-shrink-0","info-svg"],["d","M10.5 15C10.7833 15 11.0208 14.9042 11.2125 14.7125C11.4042 14.5208 11.5 14.2833 11.5 14V10C11.5 9.71667 11.4042 9.47917 11.2125 9.2875C11.0208 9.09583 10.7833 9 10.5 9C10.2167 9 9.97917 9.09583 9.7875 9.2875C9.59583 9.47917 9.5 9.71667 9.5 10V14C9.5 14.2833 9.59583 14.5208 9.7875 14.7125C9.97917 14.9042 10.2167 15 10.5 15ZM10.5 7C10.7833 7 11.0208 6.90417 11.2125 6.7125C11.4042 6.52083 11.5 6.28333 11.5 6C11.5 5.71667 11.4042 5.47917 11.2125 5.2875C11.0208 5.09583 10.7833 5 10.5 5C10.2167 5 9.97917 5.09583 9.7875 5.2875C9.59583 5.47917 9.5 5.71667 9.5 6C9.5 6.28333 9.59583 6.52083 9.7875 6.7125C9.97917 6.90417 10.2167 7 10.5 7ZM10.5 20C9.11667 20 7.81667 19.7375 6.6 19.2125C5.38333 18.6875 4.325 17.975 3.425 17.075C2.525 16.175 1.8125 15.1167 1.2875 13.9C0.7625 12.6833 0.5 11.3833 0.5 10C0.5 8.61667 0.7625 7.31667 1.2875 6.1C1.8125 4.88333 2.525 3.825 3.425 2.925C4.325 2.025 5.38333 1.3125 6.6 0.7875C7.81667 0.2625 9.11667 0 10.5 0C11.8833 0 13.1833 0.2625 14.4 0.7875C15.6167 1.3125 16.675 2.025 17.575 2.925C18.475 3.825 19.1875 4.88333 19.7125 6.1C20.2375 7.31667 20.5 8.61667 20.5 10C20.5 11.3833 20.2375 12.6833 19.7125 13.9C19.1875 15.1167 18.475 16.175 17.575 17.075C16.675 17.975 15.6167 18.6875 14.4 19.2125C13.1833 19.7375 11.8833 20 10.5 20ZM10.5 18C12.7333 18 14.625 17.225 16.175 15.675C17.725 14.125 18.5 12.2333 18.5 10C18.5 7.76667 17.725 5.875 16.175 4.325C14.625 2.775 12.7333 2 10.5 2C8.26667 2 6.375 2.775 4.825 4.325C3.275 5.875 2.5 7.76667 2.5 10C2.5 12.2333 3.275 14.125 4.825 15.675C6.375 17.225 8.26667 18 10.5 18Z"],[1,"mb-0","step-info-text"],["type","button",1,"d-flex","align-items-center","shadow-none","justify-content-between","btn","investment-btn","p-3","p-lg-4",3,"click"],["width","28","height","28","viewBox","0 0 28 28","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M12.666 15.3333V19.3333C12.666 19.7111 12.7938 20.0277 13.0493 20.2833C13.3049 20.5388 13.6216 20.6666 13.9993 20.6666C14.3771 20.6666 14.6938 20.5388 14.9493 20.2833C15.2049 20.0277 15.3327 19.7111 15.3327 19.3333V15.3333H19.3327C19.7105 15.3333 20.0271 15.2055 20.2827 14.95C20.5382 14.6944 20.666 14.3777 20.666 14C20.666 13.6222 20.5382 13.3055 20.2827 13.05C20.0271 12.7944 19.7105 12.6666 19.3327 12.6666H15.3327V8.66663C15.3327 8.28885 15.2049 7.97218 14.9493 7.71663C14.6938 7.46107 14.3771 7.33329 13.9993 7.33329C13.6216 7.33329 13.3049 7.46107 13.0493 7.71663C12.7938 7.97218 12.666 8.28885 12.666 8.66663V12.6666H8.66602C8.28824 12.6666 7.97157 12.7944 7.71601 13.05C7.46046 13.3055 7.33268 13.6222 7.33268 14C7.33268 14.3777 7.46046 14.6944 7.71601 14.95C7.97157 15.2055 8.28824 15.3333 8.66602 15.3333H12.666ZM13.9993 27.3333C12.1549 27.3333 10.4216 26.9833 8.79935 26.2833C7.17713 25.5833 5.76602 24.6333 4.56602 23.4333C3.36602 22.2333 2.41602 20.8222 1.71602 19.2C1.01602 17.5777 0.666016 15.8444 0.666016 14C0.666016 12.1555 1.01602 10.4222 1.71602 8.79996C2.41602 7.17774 3.36602 5.76663 4.56602 4.56663C5.76602 3.36663 7.17713 2.41663 8.79935 1.71663C10.4216 1.01663 12.1549 0.666626 13.9993 0.666626C1
15.8438 0.666626 17.5771 1.01663 19.1993 1.71663C20.8216 2.41663 22.2327 3.36663 23.4327 4.56663C24.6327 5.76663 25.5827 7.17774 26.2827 8.79996C26.9827 10.4222 27.3327 12.1555 27.3327 14C27.3327 15.8444 26.9827 17.5777 26.2827 19.2C25.5827 20.8222 24.6327 22.2333 23.4327 23.4333C22.2327 24.6333 20.8216 25.5833 19.1993 26.2833C17.5771 26.9833 15.8438 27.3333 13.9993 27.3333Z","fill","#53877C"],[1,"investments-list-container"],[1,"single-investment-wrapper"],[1,"d-flex","align-items-center","justify-content-between","mb-2"],[1,"mb-0","investment-name"],[1,"remove-btn","btn","lh-1","p-0",3,"click"],[1,"investment-field-wrapper"],[1,""],["for","total",1,"form-label","mb-2","sr-only"],[1,"d-flex","align-items-center","currency-input"],[1,"d-inline-block","lh-1","currency"],["type","text","inputmode","numeric","autocomplete","off","id","total","placeholder","","onlyNumbersAndDot","",1,"form-control","py-2","pe-2","ps-0","shadow-none",3,"ngModelChange","ngModel"],["labelForId","investment",1,"custom-stock-select",3,"ngModelChange","searchable","clearable","ngModel"],[3,"value"],[1,"modal-wrapper",3,"ngSubmit","formGroup"],[1,"investment-modal-header","bg-white","d-flex","align-items-center","justify-content-between"],[1,"mb-0","text-start"],[1,"btn","lh-1","p-0","shadow-none",3,"click"],["xmlns","http://www.w3.org/2000/svg","height","24","width","24","viewBox","0 0 384 512"],["d","M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z"],[1,"investment-modal-body","p-0","bg-transparent"],[1,"form-input-wrapper"],["for","otherInvestmentName",1,"form-label","mb-2"],[1,"d-flex","align-items-center","p-0","form-control-container"],["type","text","autocomplete","off","id","otherInvestmentName","formControlName","otherInvestmentName","placeholder","",1,"form-control","bg-transparent","shadow-none"],[1,"form-input-wrapper","mb-4"],["for","otherInvestmentValue",1,"form-label","mb-2"],[1,"d-flex","align-items-center","form-control-container"],["type","text","inputmode","numeric","autocomplete","off","id","otherInvestmentValue","formControlName","otherInvestmentValue","placeholder","","onlyNumbersAndDot","",1,"form-control","bg-transparent","ps-0","shadow-none"],["for","totalSharesAmount",1,"form-label","mb-2"],["labelForId","totalSharesAmount","formControlName","investmentType",1,"custom-stock-select",3,"searchable","clearable","ngModel"],[1,"investment-modal-btns"],[1,"btn","shadow-none","modal-btn","cancel-btn",3,"click"],[1,"btn","shadow-none","modal-btn","add-btn",3,"disabled"],[1,"modal-wrapper"],[1,"investment-modal-body"],[1,"text-container"],[1,"text-black"],[1,"mb-0"]],template:function(r,n){r&1&&(i(0,"div",2)(1,"div",3),x("click",function(){return n.openInvestmentInfoModal()}),y(),i(2,"svg",4),d(3,"path",5),o(),L(),i(4,"div")(5,"p",6),a(6," How is Zakat Calculated for these investments? "),o()()(),i(7,"button",7),x("click",function(){return n.openInvestmentDetailsModal()}),i(8,"span"),a(9,"Add Investment"),o(),y(),i(10,"svg",8),d(11,"path",9),o()(),p(12,jt,3,0,"div",10),o(),ge(13,Ut,31,6,"ng-template",null,0,J)(15,Wt,28,0,"ng-template",null,1,J)),r&2&&(g("ngClass",n.otherInvestments.length>0?"":"p-top"),l(12),u(n.otherInvestments.length>0?12:-1))},dependencies:[ne,P,Q,G,H,T,we,B,oe,xe,I,S,Z],styles:["@media(min-width:992px){.p-top[_ngcontent-%COMP%]{padding-top:7.25rem}}.step-info-wrapper[_ngcontent-%COMP%]{cursor:pointer;background-color:#fdf5e8;padding:.625rem 1rem;margin:0 -.75rem 1.55rem}@media(min-width:992px){.step-info-wrapper[_ngcontent-%COMP%]{margin:0 0 .75rem;background-color:transparent;padding:0 0 .625rem}}.step-info-wrapper[_ngcontent-%COMP%] .info-svg[_ngcontent-%COMP%]{fill:#96999e}@media(min-width:992px){.step-info-wrapper[_ngcontent-%COMP%] .info-svg[_ngcontent-%COMP%]{fill:#f25022}}.step-info-wrapper[_ngcontent-%COMP%] .step-info-text[_ngcontent-%COMP%]{color:#24242499;font-size:.875rem;text-decoration:underline;text-underline-offset:2px}@media(min-width:992px){.step-info-wrapper[_ngcontent-%COMP%] .step-info-text[_ngcontent-%COMP%]{font-size:1rem;color:#f25022}}.investment-btn[_ngcontent-%COMP%]{background-color:#eaf1f3;border:1px solid rgb(83,135,124);border-radius:.325rem;color:#242424;width:100%;font-weight:600}@media(min-width:992px){.investment-btn[_ngcontent-%COMP%]{border-radius:.5rem}}.form-input-wrapper[_ngcontent-%COMP%]{margin-bottom:1.5rem}@media(min-width:1200px){.form-input-wrapper[_ngcontent-%COMP%]{margin-bottom:2rem}}.form-input-wrapper[_ngcontent-%COMP%] .form-label[_ngcontent-%COMP%]{color:#242424;font-size:1rem;font-weight:600}@media(min-width:1200px){.form-input-wrapper[_ngcontent-%COMP%] .form-label[_ngcontent-%COMP%]{font-size:1.125rem}}.form-input-wrapper[_ngcontent-%COMP%] .form-control-container[_ngcontent-%COMP%]{box-shadow:0 0 0 1px #dee1ed;background-color:#f4f5f9;border-radius:.3125rem;height:3.125rem;padding:0 .75rem;gap:.75rem}.form-input-wrapper[_ngcontent-%COMP%] .form-control-container[_ngcontent-%COMP%]:focus-within{background-color:#e8f0fe;box-shadow:0 0 0 1px #009000}.form-input-wrapper[_ngcontent-%COMP%] .form-control-container[_ngcontent-%COMP%] .currency[_ngcontent-%COMP%]{font-weight:600;color:#696969}.form-input-wrapper[_ngcontent-%COMP%] .form-control-container[_ngcontent-%COMP%] .form-control[_ngcontent-%COMP%]{border:0;background-color:transparent}.form-input-wrapper[_ngcontent-%COMP%] .form-control-container[_ngcontent-%COMP%] .form-control.ng-valid[_ngcontent-%COMP%]{background-color:#f4f5f9}.form-input-wrapper[_ngcontent-%COMP%] .form-control-container[_ngcontent-%COMP%] .search-control[_ngcontent-%COMP%]{padding:.875rem .75rem}.investment-modal-body[_ngcontent-%COMP%]{background-color:#f4f5f9;border-radius:.5rem;padding:1rem}@media(min-width:992px){.investment-modal-body[_ngcontent-%COMP%]{padding:1.5rem}}.investment-modal-body[_ngcontent-%COMP%] .text-container[_ngcontent-%COMP%]{margin-bottom:2rem}@media(min-width:992px){.investment-modal-body[_ngcontent-%COMP%] .text-container[_ngcontent-%COMP%]{margin-bottom:2.5rem}}
1.investment-modal-body[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{font-size:1.125rem;margin-bottom:1rem}@media(min-width:992px){.investment-modal-body[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{font-size:1.25rem;margin-bottom:1.5rem}}.investment-modal-body[_ngcontent-%COMP%] h6[_ngcontent-%COMP%], .investment-modal-body[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font-size:.875rem}@media(min-width:992px){.investment-modal-body[_ngcontent-%COMP%] h6[_ngcontent-%COMP%], .investment-modal-body[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font-size:1rem}}.investment-modal-body[_ngcontent-%COMP%] h6[_ngcontent-%COMP%]{font-weight:700;margin-bottom:1rem}.investment-modal-body[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:#0009}.investments-list-container[_ngcontent-%COMP%]{padding-top:1.5rem}.investments-list-container[_ngcontent-%COMP%] .single-investment-wrapper[_ngcontent-%COMP%]{margin-bottom:1.25rem}.investments-list-container[_ngcontent-%COMP%] .single-investment-wrapper[_ngcontent-%COMP%] .stock-investment[_ngcontent-%COMP%]{color:#242424;font-size:1rem;font-weight:600}.investments-list-container[_ngcontent-%COMP%] .single-investment-wrapper[_ngcontent-%COMP%] .remove-btn[_ngcontent-%COMP%]{color:#c70707;font-size:.625rem;text-decoration:underline}.investments-list-container[_ngcontent-%COMP%] .single-investment-wrapper[_ngcontent-%COMP%] .investment-field-wrapper[_ngcontent-%COMP%]{display:grid;grid-template-columns:2fr 1fr;gap:.5rem}.investments-list-container[_ngcontent-%COMP%] .form-control[_ngcontent-%COMP%]{border-color:#dee1ed;background-color:#f4f5f9;border-radius:.3125rem;height:3.125rem}.investments-list-container[_ngcontent-%COMP%] .form-control[_ngcontent-%COMP%]:focus-visible{border-color:#009000}.investments-list-container[_ngcontent-%COMP%] .currency-input[_ngcontent-%COMP%]{box-shadow:0 0 0 .5px #dee1ed;background-color:#f4f5f9;border-radius:.125rem;height:3.05rem;padding:0 .75rem;gap:.75rem}.investments-list-container[_ngcontent-%COMP%] .currency-input[_ngcontent-%COMP%]:focus-within{background-color:#e8f0fe;box-shadow:0 0 0 .5px #009000}.investments-list-container[_ngcontent-%COMP%] .currency-input[_ngcontent-%COMP%] .currency[_ngcontent-%COMP%]{font-weight:600;color:#696969}.investments-list-container[_ngcontent-%COMP%] .currency-input[_ngcontent-%COMP%] .form-control[_ngcontent-%COMP%]{border:0;background-color:transparent}.modal-wrapper[_ngcontent-%COMP%]{padding:0 1rem 1rem}@media(min-width:992px){.modal-wrapper[_ngcontent-%COMP%]{padding:0 1.5rem 1.5rem}}.modal-wrapper[_ngcontent-%COMP%] .investment-modal-header[_ngcontent-%COMP%]{padding:1.5rem 0}.modal-wrapper[_ngcontent-%COMP%] .investment-modal-header[_ngcontent-%COMP%] h5[_ngcontent-%COMP%]{font-size:1.25rem;font-weight:600}.modal-wrapper[_ngcontent-%COMP%] .investment-modal-body[_ngcontent-%COMP%]{background-color:#f4f5f9;border-radius:.5rem;padding:1rem}@media(min-width:992px){.modal-wrapper[_ngcontent-%COMP%] .investment-modal-body[_ngcontent-%COMP%]{padding:1.5rem}}.modal-wrapper[_ngcontent-%COMP%] .investment-modal-body[_ngcontent-%COMP%] h6[_ngcontent-%COMP%], .modal
1-wrapper[_ngcontent-%COMP%] .investment-modal-body[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font-size:.875rem}@media(min-width:992px){.modal-wrapper[_ngcontent-%COMP%] .investment-modal-body[_ngcontent-%COMP%] h6[_ngcontent-%COMP%], .modal-wrapper[_ngcontent-%COMP%] .investment-modal-body[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font-size:1rem}}.modal-wrapper[_ngcontent-%COMP%] .investment-modal-body[_ngcontent-%COMP%] h6[_ngcontent-%COMP%]{font-weight:700;margin-bottom:1rem}.modal-wrapper[_ngcontent-%COMP%] .investment-modal-body[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:#0009}.modal-wrapper[_ngcontent-%COMP%] .investment-modal-btns[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1.5fr;gap:1rem}.modal-wrapper[_ngcontent-%COMP%] .investment-modal-btns[_ngcontent-%COMP%] .modal-btn[_ngcontent-%COMP%]{display:block;font-size:1rem;font-weight:600;padding:.875rem 1.5rem;border-radius:.25rem}.modal-wrapper[_ngcontent-%COMP%] .investment-modal-btns[_ngcontent-%COMP%] .cancel-btn[_ngcontent-%COMP%]{background-color:#f4f5f9;color:#000c}.modal-wrapper[_ngcontent-%COMP%] .investment-modal-btns[_ngcontent-%COMP%] .add-btn[_ngcontent-%COMP%]{background-color:#009000;color:#fff}@media(min-width:992px){.modal-wrapper[_ngcontent-%COMP%] .investment-modal-btns[_ngcontent-%COMP%]{gap:1.5rem}}"],changeDetection:1})}}return t})();var Ie=(()=>{class t{constructor(e){this.rootFormGroup=e}ngOnInit(){this.selectedCurrency=localStorage.getItem("selectedCurrency"),this.selectedCurrency&&(this.selectedCurrency=this.selectedCurrency?.replace(/^"|"$/g,"")),this.form=this.rootFormGroup.control}static{this.\u0275fac=function(r){return new(r||t)(_(S))}}static{this.\u0275cmp=k({type:t,selectors:[["app-property"]],decls:9,vars:2,consts:[[3,"formGroup"],["formGroupName","property",1,"p-top"],[1,"form-input-wrapper"],["for","propertyAmount",1,"form-label","mb-2"],[1,"d-flex","align-items-center","form-control-container"],[1,"d-inline-block","lh-1","currency"],["type","text","inputmode","numeric","autocomplete","off","formControlName","propertyAmount","id","propertyAmount","placeholder","","onlyNumbersAndDot","",1,"form-control","bg-transparent","ps-0","shadow-none"]],template:function(r,n){r&1&&(D(0,0),i(1,"div",1)(2,"div",2)(3,"label",3),a(4,"Enter the total current market value of all your properties:"),o(),i(5,"div",4)(6,"span",5),a(7),o(),d(8,"input",6),b(),o()()(),N()),r&2&&(g("formGroup",n.form),l(7),h(n.selectedCurrency),l(),v())},dependencies:[P,G,H,T,I,S,Z,Y,B],styles:["@media(min-width:992px){.p-top[_ngcontent-%COMP%]{padding-top:7.25rem}}.form-input-wrapper[_ngcontent-%COMP%]{margin-bottom:1.5rem}@media(min-width:1200px){.form-input-wrapper[_ngcontent-%COMP%]{margin-bottom:2rem}}.form-input-wrapper[_ngcontent-%COMP%] .form-label[_ngcontent-%COMP%]{color:#242424;font-size:1rem;font-weight:600}@media(min-width:1200px){.form-input-wrapper[_ngcontent-%COMP%] .form-label[_ngcontent-%COMP%]{font-size:1.125rem}}.form-input-wrapper[_ngcontent-%COMP%] .form-control-container[_ngcontent-%COMP%]{border:0;box-shadow:0 0 0 .5px #dee1ed;background-color:#f4f5f9;border-radius:.3125rem;height:3.75rem;padding:0 .75rem;gap:.75rem}.form-input-wrapper[_ngcontent-%COMP%] .form-control-container[_ngcontent-%COMP%]:focus-within{background-color:#e8f0fe;box-shadow:0 0 0 .5px #009000}.form-input-wrapper[_ngcontent-%COMP%] .form-control-container[_ngcontent-%COMP%] .currency[_ngcontent-%COMP%]{font-weight:600;color:#696969}.form-input-wrapper[_ngcontent-%COMP%] .form-control-container[_ngcontent-%COMP%] .form-control[_ngcontent-%COMP%]{border:0;background-color:transparent}.form-input-wrapper[_ngcontent-%COMP%] .form-control-container[_ngcontent-%COMP%] .form-control.ng-valid[_ngcontent-%COMP%]{background-color:#f4f5f9}"],changeDetection:1})}}return t})();var qe=(()=>{class t{constructor(){this.formId=""}ngOnInit(){}static{this.\u0275fac=function(r){return new(r||t)}}static{this.\u0275cmp=k({type:t,selectors:[["app-steps-counter"]],inputs:{stepCounter:"stepCounter",totalSteps:"totalSteps",formId:"formId"},decls:7,vars:3,consts:[[1,"steps-counter-wrapper","d-flex","align-items-center","justify-content-center",3,"ngClass"],[1,"steps-num","text-white"]],template:function(r,n){r&1&&(i(0,"div",0)(1,"div",1)(2,"span"),a(3),o(),a(4,"/"),i(5,"span"),a(6),o()()()),r&2&&(g("ngClass",n.formId==="liability"?"bg-pink":"bg-teal"),l(3),h(n.stepCounter),l(3),h(n.totalSteps))},dependencies:[ne],styles:[".steps-counter-wrapper[_ngcontent-%COMP%]{width:3.75rem;aspect-ratio:1;border-radius:.25rem}@media(min-width:992px){.steps-counter-wrapper[_ngcontent-%COMP%]{width:5.75rem;border-radius:.5rem}}.bg-teal[_ngcontent-%COMP%]{background-color:#53877c}.bg-pink[_ngcontent-%COMP%]{background-color:#da808e}
1.steps-num[_ngcontent-%COMP%]{font-size:1.25rem;font-weight:700}@media(min-width:992px){.steps-num[_ngcontent-%COMP%]{font-size:2rem}}"],changeDetection:1})}}return t})();var Jt=[[["","stepsCounter",""]],[["","formContent",""]],[["",8,"steps-form-buttons"]]],Kt=["[stepsCounter]","[formContent]",".steps-form-buttons"],Qe=(()=>{class t{constructor(){this.formHeader="",this.formDescription=""}ngOnInit(){}static{this.\u0275fac=function(r){return new(r||t)}}static{this.\u0275cmp=k({type:t,selectors:[["app-steps-form-wrapper"]],inputs:{formHeader:"formHeader",formDescription:"formDescription"},ngContentSelectors:Kt,decls:12,vars:2,consts:[[1,"step-form-container"],[1,"form-wrapper"],[1,"form-details-wrapper"],[1,"heading-container"],[1,"steps-form-heading"],[1,"steps-form-description"],[1,"form-content"]],template:function(r,n){r&1&&(it(Jt),ae(0,"section",0)(1,"div",1)(2,"div",2),he(3),ae(4,"div",3)(5,"h6",4),a(6),le(),ae(7,"p",5),a(8),le()()(),ae(9,"div",6),he(10,1),le()(),he(11,2),le()),r&2&&(l(6),h(n.formHeader),l(2),h(n.formDescription))},styles:[".step-form-container[_ngcontent-%COMP%]{display:grid;height:100%;grid-template-rows:auto 4.375rem}@media(min-width:992px){.step-form-container[_ngcontent-%COMP%]{position:relative;grid-template-rows:auto 6.75rem}}.heading-container[_ngcontent-%COMP%] .steps-form-heading[_ngcontent-%COMP%]{font-size:1.25rem;font-weight:500;color:#242424;margin-bottom:.625rem}@media(min-width:1200px){.heading-container[_ngcontent-%COMP%] .steps-form-heading[_ngcontent-%COMP%]{font-size:2rem;margin-bottom:1rem}}.heading-container[_ngcontent-%COMP%] .steps-form-description[_ngcontent-%COMP%]{font-size:.875rem;font-weight:400;color:#24242499;margin-bottom:1.75rem}@media(min-width:1200px){.heading-container[_ngcontent-%COMP%] .steps-form-description[_ngcontent-%COMP%]{font-size:1.25rem}}.form-wrapper[_ngcontent-%COMP%]{padding:1.125rem .75rem;height:calc(100vh - 7.875rem);overflow-y:auto}.form-wrapper[_ngcontent-%COMP%]::-webkit-scrollbar{width:.325rem}.form-wrapper[_ngcontent-%COMP%]::-webkit-scrollbar-track{background:#f1f1f1}.form-wrapper[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:#bcbcbc}@media(min-width:992px){.form-wrapper[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(2,1fr);height:calc(100vh - 17rem);gap:5rem;padding:2.5rem;background:linear-gradient(#ebebeb,#ebebeb) center/1px calc(100% - 2.5rem) no-repeat;background-position:50% 2.5rem}}.form-wrapper[_ngcontent-%COMP%] .form-details-wrapper[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.25rem}@media(min-width:992px){.form-wrapper[_ngcontent-%COMP%] .form-details-wrapper[_ngcontent-%COMP%]{position:sticky;top:0;left:0;align-self:start;gap:1.5rem}}"],changeDetection:1})}}return t})();var tn=["zakatInvestmentInfoModalContent"],nn=["addStocksHoldingContent"],on=["otherHoldingsContent"],rn=["importHoldingsConfirmation"],Mt=t=>({"invalid-class":t});function an(t,c){t&1&&(i(0,"div",23)(1,"div",30)(2,"span",31),a(3,"Loading..."),o()()())}function ln(t,c){t&1&&(i(0,"div",24)(1,"div",26),a(2," Import "),d(3,"br"),a(4," Your Holdings "),o(),y(),i(5,"svg",32),d(6,"path",33),o()())}function sn(t,c){if(t&1&&(i(0,"ng-option",44),a(1),o()),t&2){let e=c.$implicit;g("value",e.id),l(),h(e.name)}}function cn(t,c){if(t&1){let e=O();i(0,"li",34)(1,"div",35)(2,"h6",36),a(3),o(),i(4,"button",37),x("click",function(){let n=C(e).$implicit,s=m(2);return f(s.removeStock(n))}),a(5," Remove "),o()(),i(6,"div",38)(7,"input",39),z("ngModelChange",function(n){let s=C(e).$implicit;return V(s.no_of_shares,n)||(s.no_of_shares=n),f(n)}),o(),b(),i(8,"div",40)(9,"span",41),a(10),o(),i(11,"input",42),z("ngModelChange",function(n){let s=C(e).$implicit;return V(s.current_market_value,n)||(s.current_market_value=n),f(n)}),o(),b(),o(),i(12,"ng-select",43),z("ngModelChange",function(n){let s=C(e).$implicit;return V(s.investment_type,n)||(s.investment_type=n),f(n)}),R(13,sn,2,2,"ng-option",44,j),o(),b(),o()()}if(t&2){let e=c.$implicit,r=m(2);l(3),h(e.ticker),l(4),A("ngModel",e.no_of_shares),v(),l(3),h(r.selectedCurrency),l(),A("ngModel",e.current_market_value),v(),l(),g("searchable",!1)("clearable",!1),A("ngModel",e.investment_type),v(),l(),U(r.investments)}}function mn(t,c){if(t&1&&(i(0,"ul",29),R(1,cn,15,7,"li",34,j),o()),t&2){let e=m();l(),U(e.allHoldings)}}function dn(t,c){t&1&&(i(0,"div",68)(1,"span"),a(2,"Symbol is required"),o()())}function pn(t,c){if(t&1&&(i(0,"div"),p(1,dn,3,0,"div",68),o()),t&2){let e=m(2);l(),u(e.addStocksForm.get("symbol")?.errors?.required?1:-1)}}function un(t,c){t&1&&(i(0,"div",68)(1,"span"),a(2,"Shares are required"),o()())}function gn(t,c){if(t&1&&(i(0,"div"),p(1,un,3,0,"div",68),o()),t&2){let e=m(2);l(),u(e.addStocksForm.get("numberOfShares")?.errors?.required?1:-1)}}function hn(t,c){t&1&&(i(0,"div",63)(1,"span",69),a(2,"Loading..."),o()())}function Cn(t,c){if(t&1&&(i(0,"div")(1,"div",68)(2,"span"),a(3),o()()()),t&2){let e=m(2);l(3),h(e.isStockUnavailable)}}function fn(t,c){t&1&&(i(0,"small"),a(1,"Price auto-fetched based on latest market value"),o())}function _n(t,c){if(t&1&&(i(0,"ng-option",44),a(1),o()),t&2){let e=c.$implicit;g("value",e.id),l(),h(e.name)}}function bn(t,c){if(t&1){let e=O();i(0,"form",45),x("ngSubmit",function(){C(e);let n=m();return f(n.addStock())}),i(1,"div",46)(2,"h5",47),a(3,"Add Holding"),o(),i(4,"button",48),x("click",function(){C(e);let n=m();return f(n.closeAddHoldingModal())}),y(),i(5,"svg",49),d(6,"path",50),o()()(),L(),i(7,"div",51)(8,"div",52)(9,"label",53),a(10,"Select Symbol:"),o(),i(11,"div",54)(12,"input",55,5),z("ngModelChange",function(n){C(e);let s=m();return V(s.symbol,n)||(s.symbol=n),f(n)}),o(),b(),b(),o(),p(14,pn,2,1,"div"),o(),i(15,"div",52)(16,"label",56),a(17,"Number of Shares:"),o(),i(18,"div",57),d(19,"input",58),b(),o(),p(20,gn,2,1,"div"),o(),i(21,"div",59)(22,"label",60),a(23,"Total Value of Shares:"),o(),i(24,"div",61)(25,"span",41),a(26),o(),d(27,"input",62),b(),p(28,hn,3,0,"div",63),o(),p(29,Cn,4,1,"div"),p(30,fn,2,0,"small"),o(),i(31,"div",59)(32,"label",60),a(33,"Type of Investment:"),o(),i(34,"ng-select",64),R(35,_n,2,2,"ng-option",44,j),o(),b(),b(),o()(),i(37,"div",65)(38,"button",66),x("click",function(){C(e);let n=m();return f(n.closeAddHoldingModal())}
1),a(39," CANCEL "),o(),i(40,"button",67),a(41," ADD HOLDING "),o()()()}if(t&2){let e=m(),r=se(41);g("formGroup",e.addStocksForm),l(12),g("ngClass",Ze(19,Mt,e.addStocksForm.get("symbol")?.invalid&&e.showTickerError)),A("ngModel",e.symbol),g("resultTemplate",r)("ngbTypeahead",e.search)("resultFormatter",e.formatSymbol)("inputFormatter",e.inputFormatBandListValue)("editable",!1),v(),v(),l(2),u(e.showTickerError?14:-1),l(4),g("ngClass",Ze(21,Mt,e.addStocksForm.get("numberOfShares")?.invalid&&e.showSharesError)),l(),v(),l(),u(e.showSharesError?20:-1),l(6),h(e.selectedCurrency),l(),v(),l(),u(e.autoFetchLoading?28:-1),l(),u(e.isStockUnavailable&&e.addStocksForm.get("totalValueOfShares")?.errors?.required?29:-1),l(),u(e.isPriceAutoFetched?30:-1),l(4),g("searchable",!1)("clearable",!1)("ngModel",e.formInvestmentType),v(),v(),l(),U(e.investments),l(5),g("disabled",!e.addStocksForm.valid)}}function vn(t,c){if(t&1&&(d(0,"p",70),F(1,"highlightSearch"),i(2,"p",71),a(3),o()),t&2){let e=c.result;g("innerHTML",E(1,2,e.stockName,e.stockName),nt),l(3),rt(" ",e.companyName," ")}}function wn(t,c){if(t&1){let e=O();i(0,"div",72)(1,"div",46)(2,"h5",47),a(3," Short-Term / Long-Term Calculation Methodology "),o(),i(4,"button",48),x("click",function(){C(e);let n=m();return f(n.closeZakatInvestmentInfoModal())}),y(),i(5,"svg",49),d(6,"path",50),o()()(),L(),i(7,"div",73)(8,"div",74)(9,"h4",75),a(10,"Short-Term (For Trade)"),o(),i(11,"h6",75),a(12,"Current market value of shares * 2.5%"),o(),i(13,"p",76),a(14," These investments are the one which you do with the intent of trading. Usually this are the one's which one holds for less than 1 year. These holdings are treated as liquid/cash and zakat is to be paid as 2.5% on the total amount. "),o()(),i(15,"div")(16,"h4",75),a(17,"Long-Term (For Capital Appreciation)"),o(),i(18,"h6",75),a(19," Current assets of the company / Shares outstanding of the company * Number of long term shares held * 2.5% "),o(),i(20,"p",76),a(21," These investments are the one which you do with the intent of long-term capital appreciation. Usually this are the one\u2019s which one holds for more than 1 year. Zakat on these shares are based on the underlying Zakatable assets of the company. "),o()()()()}}function xn(t,c){if(t&1){let e=O();i(0,"div",72)(1,"div",77)(2,"h5",47),a(3,"Lorem ipsum dolor site"),o()(),i(4,"div",51)(5,"div",78)(6,"p",76),a(7," Lorem ipsum dolor sit amet consectetur adipisicing elit. Suscipit vel, unde dolores harum veniam earum! "),o()()(),i(8,"div",79)(9,"button",80),x("click",function(){C(e);let n=m();return f(n.closeOtherHoldingsModal())}),a(10," OK "),o()()()}}function Mn(t,c){if(t&1){let e=O();i(0,"div",72)(1,"div",77)(2,"h5",47),a(3,"Import Confirmation"),o()(),i(4,"div",51)(5,"div",78)(6,"p",76),a(7,"Import holdings from linked portfolio(s)?"),o()()(),i(8,"div",81)(9,"button",82),x("click",function(){C(e);let n=m();return f(n.closeConfirmImportUserHoldings())}),a(10," No "),o(),i(11,"button",83),x("click",function(){C(e);let n=m();return f(n.importUserHoldings())}),a(12," Yes "),o()()()}}var Fe=(()=>{class t{constructor(e,r,n,s,w,M,kt,St,Ot,Pt){this.modalService=e,this.typesenseService=r,this.marketUtilsService=n,this.rootFormGroup=s,this.formBuilder=w,this.zakatService=M,this.subscriptionService=kt,this.toaster=St,this.portfolioService=Ot,this.platformId=Pt,this.existingHoldings=[],this.subscriptions=[],this.investments=[{id:"short",name:"Short Term"},{id:"long",name:"Long Term"}],this.selectedInvestmentType=null,this.currency="",this.importedholdings=[],this.formInvestmentType=null,this.allHoldings=[],this.otherHoldings=[],this.importHoldingsLoader=!1,this.userRole=null,this.showTickerError=!1,this.showSharesError=!1,this.isStockUnavailable="",this.autoFetchLoading=!1,this.isPriceAutoFetched=!1,this.isOther=!0,this.searching=!1,this.searchFailed=!1,this.stockCountries=[],this.configInitDone=!1,this.unSubscribe=new Je,this.isBrowser=ce(re),this.search=It=>this.configInitDone?It.pipe(De(200),Ae(),pe(()=>this.searching=!0),Xe(Ft=>this.typesenseService.searchOnlyStockSymbols(Ft,this.stockCountries).pipe(pe(()=>this.searchFailed=!1),$e(()=>(this.searchFailed=!0,Te([]))))),pe(()=>this.searching=!1)):Te([]),this.selectedInvestmentType=this.investments[0].id,this.formInvestmentType=this.investments[0].id}ngOnInit(){this.isBrowser&&(sessionStorage.getItem("isFirstVisitOnStockInvestments")||(this.openZakatInvestmentInfoModal(),sessionStorage.setItem("isFirstVisitOnStockInvestments","true"))),this.subscriptions.push(ie.subscriptionData.subscribe(e=>{this.userRole=e.role})),this.selectedCurrency=localStorage.getItem("selectedCurrency")??"USD",this.selectedCurrency&&(this.selectedCurrency=this.selectedCurrency?.replace(/^"|"$/g,"")),this.currency=this.zakatService.getSelectedCurrencyAndFormsData().currency,this.init(),this.addStocksForm=this.formBuilder.group({symbol
1:["",K.required],numberOfShares:["",K.required],totalValueOfShares:["",K.required],investmentType:["",K.required]}),this.allHoldings=this.zakatService.getAllHoldings().holdings,this.addStocksForm.get("symbol")?.valueChanges.pipe().subscribe(()=>{this.addStocksForm.controls.totalValueOfShares.setValue(""),this.isPriceAutoFetched=!1}),this.addStocksForm.get("numberOfShares")?.valueChanges.pipe(De(300),Ae(),et(this.unSubscribe)).subscribe(()=>{this.autofetchPrice()})}ngOnDestroy(){this.subscriptions&&this.subscriptions.length>0&&this.subscriptions.forEach(e=>{e.unsubscribe()}),this.zakatService.setAllHoldings(this.allHoldings),this.unSubscribe.next(),this.unSubscribe.complete()}async init(){if(ce(this.platformId))try{let e=await this.marketUtilsService.fetchCountries();this.stockCountries=e.filter(r=>r.stockEnabled).map(r=>r.countryCode),this.configInitDone=!0}catch(e){console.log(e)}}formatSymbol(e){return e.stockName}inputFormatBandListValue(e){return e.stockName}confirmImportUserHoldings(){this.importHoldingsConfirmationRef=this.modalService.open(this.importHoldingsConfirmationContent,{centered:!0})}closeConfirmImportUserHoldings(){this.importHoldingsConfirmationRef&&this.importHoldingsConfirmationRef.dismiss()}async importUserHoldings(){this.closeConfirmImportUserHoldings(),this.importHoldingsLoader=!0;try{if(this.userRole!=="PREMIUM"){let r=this.modalService.open(je,{centered:!0});r.componentInstance.title="Upgrade Required",r.componentInstance.description="This feature is only available for the premium users",r.componentInstance.showUpgradeButton=!0;return}let e=await Ke(this.portfolioService.getAccounts());if(e.status)if(e.data.length){let n=await this.zakatService.getUserHoldings(this.currency);if(n.holdings){this.importedholdings=[];for(let s of n.holdings){let w={ticker:s.symbol,no_of_shares:+s.units,current_market_value:+(s.price*s.units),investment_type:this.selectedInvestmentType!=="mixed"?this.selectedInvestmentType??"short":"short"};this.allHoldings.push(w)}for(let s of n.investments){let w={name:s.name,amount:s.amount,investment_type:this.selectedInvestmentType!=="mixed"?this.selectedInvestmentType??"short":"short"};this.otherHoldings.push(w)}this.zakatService.setOtherInvestment(this.otherHoldings),this.zakatService.setAllHoldings(this.allHoldings)}this.importHoldingsLoader=!1}else{let n=this.modalService.open(je,{centered:!0});n.componentInstance.title="No Brokerage Linked!",n.componentInstance.description="Link Brokerage to your account to import your holdings",n.componentInstance.showUpgradeButton=!1,n.componentInstance.goToOnConfirm="/portfolio-dashboard/",n.componentInstance.showCancelBtn=!0,n.componentInstance.confirmationText="Connect"}else this.importHoldingsLoader=!1}catch(e){console.error(e),this.importHoldingsLoader=!1}finally{this.importHoldingsLoader=!1}}autofetchPrice(){if(this.isStockUnavailable="",this.addStocksForm.controls.symbol.value||(this.showTickerError=!0),!this.addStocksForm.controls.numberOfShares.value){this.showSharesError=!0,this.addStocksForm.controls.totalValueOfShares.setValue(""),this.isPriceAutoFetched=!1;return}if(!this.addStocksForm.controls.symbol.value||!this.addStocksForm.controls.numberOfShares.value)return;this.autoFetchLoading=!0;let e=[],r,n=this.addStocksForm.controls.symbol.value.stockName;e.push(n),this.portfolioService.getConvertedPrice(n,this.selectedCurrency).then(s=>{s.status?(r=s.convertedAmount,this.addStocksForm.controls.totalValueOfShares.setValue((r*this.addStocksForm.controls.numberOfShares.value).toFixed(2)),this.isPriceAutoFetched=!0):(this.isStockUnavailable=s.message,this.addStocksForm.controls.totalValueOfShares.setValue(""),this.isPriceAutoFetched=!1)}).catch(s=>{console.log(s)}).finally(()=>{this.autoFetchLoading=!1})}addStock(){if(this.addStocksForm.valid){let e={ticker:this.addStocksForm.controls.symbol.value.stockName,no_of_shares:+this.addStocksForm.controls.numberOfShares.value,current_market_value:+this.addStocksForm.controls.totalValueOfShares.value,investment_type:this.addStocksForm.controls.investmentType.value};this.allHoldings.push(e),this.zakatService.setAllHoldings(this.allHoldings),this.closeAddHoldingModal(),this.resetFormControls()}}removeStock(e){let r=this.allHoldings.indexOf(e);r!==-1&&this.allHoldings.splice(r,1),this.zakatService.setAllHoldings(this.allHoldings)}removeOther(e){let r=this.otherHoldings.indexOf(e);r!==-1&&this.allHoldings.splice(r,1),this.zakatService.setOtherInvestment(this.otherHoldings)}resetFormControls(){this.addStocksForm.controls.symbol.setValue(""),this.addStocksForm.controls.numberOfShares.setValue(""),this.addStocksForm.controls.totalValueOfShares.setValue("")}updateSelectedInvestmentType(e){e==="longTerm"?(this.addStocksForm.controls.investmentType.setValue("long"),this.formInvestmentType="long",this.allHoldings.length&&this.allHoldings.forEac
1h(r=>{r.investment_type="long"})):e==="shortTerm"?(this.addStocksForm.controls.investmentType.setValue("short"),this.formInvestmentType="short",this.allHoldings.length&&this.allHoldings.forEach(r=>{r.investment_type="short"})):e==="mixed"&&(this.addStocksForm.controls.investmentType.setValue(null),this.selectedInvestmentType="mixed",this.formInvestmentType=null)}openZakatInvestmentInfoModal(){this.zakatInvestmentInfoModalRef=this.modalService.open(this.zakatInvestmentInfoModalContent,{size:"lg",centered:!0})}closeZakatInvestmentInfoModal(){this.zakatInvestmentInfoModalRef&&this.zakatInvestmentInfoModalRef.dismiss()}openAddHoldingModal(){this.addStocksHoldingRef=this.modalService.open(this.addStocksHoldingContent,{centered:!0})}closeAddHoldingModal(){this.addStocksForm.reset(),this.showSharesError=!1,this.showTickerError=!1,this.isStockUnavailable="",this.addStocksHoldingRef&&this.addStocksHoldingRef.dismiss()}openOtherHoldingsModal(){this.otherHoldingsRef=this.modalService.open(this.otherHoldingsContent,{centered:!0,backdrop:"static"})}closeOtherHoldingsModal(){this.otherHoldingsRef&&this.otherHoldingsRef.dismiss()}static{this.\u0275fac=function(r){return new(r||t)(_(_e),_(gt),_(ut),_(S),_(ee),_(q),_(ie),_(be),_(vt),_(re))}}static{this.\u0275cmp=k({type:t,selectors:[["app-stock-fund-investments"]],viewQuery:function(r,n){if(r&1&&Ce(tn,7)(nn,7)(on,7)(rn,7),r&2){let s;$(s=X())&&(n.zakatInvestmentInfoModalContent=s.first),$(s=X())&&(n.addStocksHoldingContent=s.first),$(s=X())&&(n.otherHoldingsContent=s.first),$(s=X())&&(n.importHoldingsConfirmationContent=s.first)}},inputs:{existingHoldings:"existingHoldings"},decls:48,vars:8,consts:[["addStocksHoldingContent",""],["rt",""],["zakatInvestmentInfoModalContent",""],["otherHoldingsContent",""],["importHoldingsConfirmation",""],["instance","ngbTypeahead"],[3,"ngClass"],[1,"heading-text","mb-2"],[1,"d-flex","align-items-center","justify-content-start","gap-2","gap-lg-3"],[1,"radio-wrapper"],["type","radio","name","investmentType","id","shortTerm","value","short",1,"investment-radio","long-radio","rounded","shadow-none",3,"ngModelChange","change","ngModel"],["for","shortTerm",1,"radio-label"],["type","radio","name","investmentType","id","longTerm","value","long",1,"investment-radio","long-radio","rounded","shadow-none",3,"ngModelChange","change","ngModel"],["for","longTerm",1,"radio-label"],["type","radio","name","investmentType","id","mixed","value","mixed",1,"investment-radio","long-radio","rounded","shadow-none",3,"ngModelChange","change","ngModel"],["for","mixed",1,"radio-label"],[1,"d-flex","align-items-center","gap-2","step-info-wrapper",3,"click"],["width","16","height","16","viewBox","0 0 21 20","fill","none","xmlns","http://www.w3.org/2000/svg",1,"flex-shrink-0","info-svg"],["d","M10.5 15C10.7833 15 11.0208 14.9042 11.2125 14.7125C11.4042 14.5208 11.5 14.2833 11.5 14V10C11.5 9.71667 11.4042 9.47917 11.2125 9.2875C11.0208 9.09583 10.7833 9 10.5 9C10.2167 9 9.97917 9.09583 9.7875 9.2875C9.59583 9.47917 9.5 9.71667 9.5 10V14C9.5 14.2833 9.59583 14.5208 9.7875 14.7125C9.97917 14.9042 10.2167 15 10.5 15ZM10.5 7C10.7833 7 11.0208 6.90417 11.2125 6.7125C11.4042 6.52083 11.5 6.28333 11.5 6C11.5 5.71667 11.4042 5.47917 11.2125 5.2875C11.0208 5.09583 10.7833 5 10.5 5C10.2167 5 9.97917 5.09583 9.7875 5.2875C9.59583 5.47917 9.5 5.71667 9.5 6C9.5 6.28333 9.59583 6.52083 9.7875 6.7125C9.97917 6.90417 10.2167 7 10.5 7ZM10.5 20C9.11667 20 7.81667 19.7375 6.6 19.2125C5.38333 18.6875 4.325 17.975 3.425 17.075C2.525 16.175 1.8125 15.1167 1.2875 13.9C0.7625 12.6833 0.5 11.3833 0.5 10C0.5 8.61667 0.7625 7.31667 1.2875 6.1C1.8125 4.88333 2.525 3.825 3.425 2.925C4.325 2.025 5.38333 1.3125 6.6 0.7875C7.81667 0.2625 9.11667 0 10.5 0C11.8833 0 13.1833 0.2625 14.4 0.7875C15.6167 1.3125 16.675 2.025 17.575 2.925C18.475 3.825 19.1875 4.88333 19.7125 6.1C20.2375 7.31667 20.5 8.61667 20.5 10C20.5 11.3833 20.2375 12.6833 19.7125 13.9C19.1875 15.1167 18.475 16.175 17.575 17.075C16.675 17.975 15.6167 18.6875 14.4 19.2125C13.1833 19.7375 11.8833 20 10.5 20ZM10.5 18C12.7333 18 14.625 17.225 16.175 15.675C17.725 14.125 18.5 12.2333 18.5 10C18.5 7.76667 17.725 5.875 16.175 4.325C14.625 2.775 12.7333 2 10.5 2C8.26667 2 6.375 2.775 4.825 4.325C3.275 5.875 2.5 7.76667 2.5 10C2.5 12.2333 3.275 14.125 4.825 15.675C6.375 17.225 8.26667 18 10.5 18Z"],[1,"mb-0","step-info-text"],[1,"holdings-container"],[1,"holdings-btns-wrapper"],["type","button",1,"btn","text-white","shadow-none","rounded","border-0","justify-content-between","holding-btn",3,"click","disabled"],[1,"d-flex","justify-content-center"],[1,"d-flex","align-items-stretch"],["type","button",1,"btn","d-flex","align-items-stretch","text-black","shadow-none","rounded","justify-content-between","stock-btn",3,"click"],[1,"btn-text","text-start"],["width","20","height","20","viewBox","0 0 20 20","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M9 11V14C9 14.2833 9.09583 14.5208 9.2875 14.7125C9.47917 14.9042 9.71667 15 10 15C10.2833 15 10.5208 14.9042 10.7125 14.7125C10.9042 14.5208 11 14.2833 11 14V11H14C14.2833 11 14.5208 10.9042 14.7125 10.7125C14.9042 10.5208 15 10.2833 15 10C15 9.71667 14.9042 9.47917 14.7125 9.2875C14.5208 9.09583 14.2833 9 14 9H11V6C11 5.71667 10.9042 5.47917 10.7125 5.2875C10.5208 5.09583 10.2833 5 10 5C9.71667 5 9.47917 5.09583 9.2875 5.2875C9.09583 5.47917 9 5.71667 9 6V9H6C5.71667 9 5.47917 9.09583 5.2875 9.2875C5.09583 9.47917 5 9.71667 5 10C5 10.2833 5.09583 10.5208 5.2875 10.7125C5.47917 10.9
1042 5.71667 11 6 11H9ZM10 20C8.61667 20 7.31667 19.7375 6.1 19.2125C4.88333 18.6875 3.825 17.975 2.925 17.075C2.025 16.175 1.3125 15.1167 0.7875 13.9C0.2625 12.6833 0 11.3833 0 10C0 8.61667 0.2625 7.31667 0.7875 6.1C1.3125 4.88333 2.025 3.825 2.925 2.925C3.825 2.025 4.88333 1.3125 6.1 0.7875C7.31667 0.2625 8.61667 0 10 0C11.3833 0 12.6833 0.2625 13.9 0.7875C15.1167 1.3125 16.175 2.025 17.075 2.925C17.975 3.825 18.6875 4.88333 19.2125 6.1C19.7375 7.31667 20 8.61667 20 10C20 11.3833 19.7375 12.6833 19.2125 13.9C18.6875 15.1167 17.975 16.175 17.075 17.075C16.175 17.975 15.1167 18.6875 13.9 19.2125C12.6833 19.7375 11.3833 20 10 20Z","fill","#53877C"],[1,"holdings-list-wrapper","ps-0","mb-0"],["role","status",1,"spinner-border","text-white"],[1,"visually-hidden"],["width","20","height","16","viewBox","0 0 22 16","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M5.5 16C3.98333 16 2.6875 15.475 1.6125 14.425C0.5375 13.375 0 12.0916 0 10.575C0 9.27495 0.391667 8.11662 1.175 7.09995C1.95833 6.08328 2.98333 5.43328 4.25 5.14995C4.63333 3.79995 5.34583 2.66662 6.3875 1.74995C7.42917 0.833285 8.63333 0.274951 10 0.0749512V8.14995L9.1 7.27495C8.91667 7.09162 8.6875 6.99995 8.4125 6.99995C8.1375 6.99995 7.9 7.09995 7.7 7.29995C7.51667 7.48328 7.425 7.71662 7.425 7.99995C7.425 8.28329 7.51667 8.51662 7.7 8.69995L10.3 11.3C10.5 11.5 10.7333 11.6 11 11.6C11.2667 11.6 11.5 11.5 11.7 11.3L14.3 8.69995C14.4833 8.51662 14.5792 8.28745 14.5875 8.01245C14.5958 7.73745 14.5 7.49995 14.3 7.29995C14.1167 7.11662 13.8875 7.02078 13.6125 7.01245C13.3375 7.00412 13.1 7.09162 12.9 7.27495L12 8.14995V0.0749512C13.7167 0.308285 15.1458 1.07912 16.2875 2.38745C17.4292 3.69578 18 5.23328 18 6.99995C19.15 7.13328 20.1042 7.62912 20.8625 8.48745C21.6208 9.34579 22 10.35 22 11.5C22 12.75 21.5625 13.8125 20.6875 14.6875C19.8125 15.5625 18.75 16 17.5 16H5.5Z","fill","white"],[1,"single-holding-item","d-block"],[1,"d-flex","align-items-center","justify-content-between","mb-2"],[1,"mb-0","holding-name"],[1,"holding-remove-btn","btn","lh-1","p-0",3,"click"],[1,"holdings-inputs-wrapper"],["type","text","inputmode","numeric","autocomplete","off","id","","placeholder","","onlyNumbersAndDot","",1,"form-control","p-2","shadow-none",3,"ngModelChange","ngModel"],[1,"d-flex","align-items-center","currency-input"],[1,"d-inline-block","lh-1","currency"],["type","text","inputmode","numeric","autocomplete","off","id","shares","placeholder","","onlyNumbersAndDot","",1,"form-control","py-2","pe-2","ps-0","shadow-none",3,"ngModelChange","ngModel"],["labelForId","investment",1,"custom-stock-select",3,"ngModelChange","searchable","clearable","ngModel"],[3,"value"],[1,"modal-wrapper",3,"ngSubmit","formGroup"],[1,"investment-modal-header","bg-white","d-flex","align-items-center","justify-content-between"],[1,"mb-0","text-start"],[1,"btn","lh-1","p-0","shadow-none",3,"click"],["xmlns","http://www.w3.org/2000/svg","height","24","width","24","viewBox","0 0 384 512"],["d","M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z"],[1,"investment-modal-body","p-0","bg-transparent"],[1,"form-input-wrapper"],["for","symbol",1,"form-label","mb-2"],[1,"d-flex","align-items-center","px-0","form-control-container"],["type","text","id","symbol","formControlName","symbol","placeholder","",1,"form-control","bg-transparent","search-control","shadow-none",3,"ngModelChange","ngClass","ngModel","resultTemplate","ngbTypeahead","resultFormatter","inputFormatter","editable"],["for","sharesAmount",1,"form-label","mb-2"],[1,"d-flex","align-items-center","p-0","form-control-container",3,"ngClass"],["type","text","inputmode","numeric","autocomplete","off","id","sharesAmount","formControlName","numberOfShares","placeholder","","onlyNumbersAndDot","",1,"form-control","bg-transparent","shadow-none"],[1,"form-input-wrapper","mb-4"],["for","totalSharesAmount",1,"form-label","mb-2"],[1,"d-flex","align-items-center","form-control-container"],["type","text","inputmode","numeric","autocomplete","off","id","totalSharesAmount","formControlName","totalValueOfShares","placeholder","","onlyNumbersAndDot","",1,"form-control","bg-transparent","ps-0","shadow-none"],["role","status",1,"spinner-border","spinner-border-sm","text-success","autofetch-spinner"],["labelForId","totalSharesAmount","formControlName","investmentType",1,"custom-stock-select",3,"searchable","clearable","ngModel"],[1,"investment-modal-btns"],[1,"btn","shadow-none","modal
1-btn","cancel-btn",3,"click"],[1,"btn","shadow-none","modal-btn","add-btn",3,"disabled"],[1,"invalid-text"],[1,"sr-only"],[1,"mb-0","stock-symbol","lh-sm",2,"font-size","0.875rem","font-weight","600",3,"innerHTML"],[1,"mb-0","stock-name","lh-sm",2,"font-size","0.75rem","font-weight","400"],[1,"modal-wrapper"],[1,"investment-modal-body"],[1,"text-container"],[1,"text-black"],[1,"mb-0"],[1,"investment-modal-header","pb-3","bg-white","d-flex","align-items-center","justify-content-center"],[1,"text-container","text-center","mb-4"],[1,"other-modal-btns"],[1,"btn","shadow-none","mx-auto","modal-btn","add-btn",3,"click"],[1,"d-flex","justify-content-center","align-items-center"],[1,"btn","shadow-none","mx-1","modal-btn","cancel-btn",3,"click"],[1,"btn","shadow-none","mx-1","modal-btn","success-btn",3,"click"]],template:function(r,n){if(r&1){let s=O();D(0),i(1,"div",6)(2,"label",7),a(3,"Type of Investment:"),o(),i(4,"div",8)(5,"div",9)(6,"input",10),z("ngModelChange",function(M){return C(s),V(n.selectedInvestmentType,M)||(n.selectedInvestmentType=M),f(M)}),x("change",function(){return n.updateSelectedInvestmentType("shortTerm")}),o(),b(),i(7,"label",11),a(8,"Short Term"),o()(),i(9,"div",9)(10,"input",12),z("ngModelChange",function(M){return C(s),V(n.selectedInvestmentType,M)||(n.selectedInvestmentType=M),f(M)}),x("change",function(){return n.updateSelectedInvestmentType("longTerm")}),o(),b(),i(11,"label",13),a(12,"Long Term"),o()(),i(13,"div",9)(14,"input",14),z("ngModelChange",function(M){return C(s),V(n.selectedInvestmentType,M)||(n.selectedInvestmentType=M),f(M)}),x("change",function(){return n.updateSelectedInvestmentType("mixed")}),o(),b(),i(15,"label",15),a(16,"Mixed"),o()()(),i(17,"div",16),x("click",function(){return n.openZakatInvestmentInfoModal()}),y(),i(18,"svg",17),d(19,"path",18),o(),L(),i(20,"div")(21,"p",19),a(22," How this impacts your Zakat calculation? "),o()()(),i(23,"div",20)(24,"label",7),a(25,"Your Holdings:"),o(),i(26,"div",21)(27,"button",22),x("click",function(){return n.confirmImportUserHoldings()}),p(28,an,4,0,"div",23),p(29,ln,7,0,"div",24),o(),i(30,"button",25),x("click",function(){return n.openAddHoldingModal()}),i(31,"div",26),a(32,"Add "),d(33,"br"),a(34,"Stock / Fund"),o(),y(),i(35,"svg",27),d(36,"path",28),o()()()(),p(37,mn,3,0,"ul",29),o(),N(),ge(38,bn,42,23,"ng-template",null,0,J)(40,vn,4,5,"ng-template",null,1,J)(42,wn,22,0,"ng-template",null,2,J)(44,xn,11,0,"ng-template",null,3,J)(46,Mn,13,0,"ng-template",null,4,J)}r&2&&(l(),g("ngClass",n.allHoldings.length>0?"":"p-top"),l(5),A("ngModel",n.selectedInvestmentType),v(),l(4),A("ngModel",n.selectedInvestmentType),v(),l(4),A("ngModel",n.selectedInvestmentType),v(),l(13),g("disabled",n.importHoldingsLoader),l(),u(n.importHoldingsLoader?28:-1),l(),u(n.importHoldingsLoader?-1:29),l(8),u(n.allHoldings.length>0?37:-1))},dependencies:[ne,P,Q,G,dt,H,T,we,B,oe,xe,I,S,Z,wt,xt],styles:["@media(min-width:992px){.p-top[_ngcontent-%COMP%]{padding-top:7.25rem}}.heading-text[_ngcontent-%COMP%]{color:#242424;font-size:1rem;font-weight:600}@media(min-width:1200px){.heading-text[_ngcontent-%COMP%]{font-size:1.125rem}}.radio-wrapper[_ngcontent-%COMP%]{width:max-content}.radio-wrapper[_ngcontent-%COMP%] .investment-radio[_ngcontent-%COMP%]{display:none}.radio-wrapper[_ngcontent-%COMP%] .investment-radio[_ngcontent-%COMP%]:checked + .radio-label[_ngcontent-%COMP%]{background-color:#53877c;color:#fff}.radio-wrapper[_ngcontent-%COMP%] .radio-label[_ngcontent-%COMP%]{position:relative;background-color:#eaf1f3;text-align:center;border-radius:.25rem;display:block;cursor:pointer;font-weight:500;font-size:1rem;padding:.75rem 0;width:150px}@media(min-width:992px){.radio-wrapper[_ngcontent-%COMP%] .radio-label[_ngcontent-%COMP%]{padding:.75rem 0}}.step-info-wrapper[_ngcontent-%COMP%]{cursor:pointer;background-color:#fdf5e8;padding:.625rem 1rem;margin:.75rem -.75rem}@media(min-width:992px){.step-info-wrapper[_ngcontent-%COMP%]{margin:.75rem 0;background-color:transparent;padding:.625rem 0;max-width:max-content}}.step-info-wrapper[_ngcontent-%COMP%] .info-svg[_ngcontent-%COMP%]{fill:#96999e}@media(min-width:992px){.step-info-wrapper[_ngcontent-%COMP%] .info-svg[_ngcontent-%COMP%]{fill:#f25022}}.step-info-wrapper[_ngcontent-%COMP%] .step-info-text[_ngcontent-%COMP%]{color:#24242499;font-size:.875rem;text-decoration:underline;text-underline-offset:2px}@media(min-width:992px){.step-info-wrapper[_ngcontent-%COMP%] .step-info-text[_ngcontent-%COMP%]{font-size:1rem;color:#f25022}}.holdings-container[_ngcontent-%COMP%]{margin:1.75rem 0 0}@media(min-width:992px){.holdings-container[_ngcontent-%COMP%]{margin:0}}.holdings-container[_ngcontent-%COMP%] .holdings-btns-wrapper[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:.5rem}@media(min-width:992px){.holdings-container[_ngcontent-%COMP%] .holdings-btns-wrapper[_ngcontent-%COMP%]{gap:1rem}}.holdings-container[_ngcontent-%COMP%] .holdings-btns-wrapper[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{padding:1.25rem;font-size:1rem;font-weight:600;position:relative}@media(min-width:992px){.holdings-container[_ngcontent-%COMP%] .holdings-btns-wrapper[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{padding:1.5rem;font-size:1.125rem}}.holdings-container[_ngcontent-%COMP%] .holdings-btns-wrapper[_ngcontent-%COMP%] button[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{position:absolute;top:.75rem;right:.75rem}@media(min-width:992px){.holdings-container[_ngcontent-%COMP%] .holdings-btns-wrapper[_ngcontent-%COMP%] button[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{top:1rem;right:1rem}}.holdings-container[_ngcontent-%COMP%] .holdings-btns-wrapper[_ngcontent-%COMP%] .holding-btn[_ngcontent-%COMP%]{background-image:linear-gradient(102.17deg,#316a56 1.95%,#a1d154 98.1%),linear-gradient(101.24deg,#316a56,#a1d154 100.6%)}.holdings-container[_ngcontent-%COMP%] .holdings-btns-wrapper[_ngcontent-%COMP%] .stock-btn[_ngcontent-%COMP%]{background-color:#eaf1f3;border:1px solid rgb(83,135,124)}.holdings-list-wrapper[_ngcontent-%COMP%]{padding-top:1.5rem}.holdings-list-wrapper[_ngcontent-%COMP%] .single-holding-item[_ngcontent-%COMP%]{box-sizing:border-box;list-style:none;margin-bottom:1.25rem}.holdings-list-wrapper[_ngcontent-%COMP%] .single-holding-item[_ngcontent-%COMP%] .holding-name[_ng
1content-%COMP%]{color:#242424;font-size:1rem;font-weight:600}.holdings-list-wrapper[_ngcontent-%COMP%] .single-holding-item[_ngcontent-%COMP%] .holding-remove-btn[_ngcontent-%COMP%]{color:#c70707;font-size:.625rem;text-decoration:underline}.holdings-list-wrapper[_ngcontent-%COMP%] .single-holding-item[_ngcontent-%COMP%] .holdings-inputs-wrapper[_ngcontent-%COMP%]{display:grid;grid-template-columns:.6fr 1.5fr 1fr;gap:.75rem}.holdings-list-wrapper[_ngcontent-%COMP%] .single-holding-item[_ngcontent-%COMP%] .form-control[_ngcontent-%COMP%]{border-color:#dee1ed;background-color:#f4f5f9;border-radius:.3125rem;height:3.125rem}.holdings-list-wrapper[_ngcontent-%COMP%] .single-holding-item[_ngcontent-%COMP%] .form-control[_ngcontent-%COMP%]:focus-visible{border-color:#009000}.holdings-list-wrapper[_ngcontent-%COMP%] .single-holding-item[_ngcontent-%COMP%] .currency-input[_ngcontent-%COMP%]{box-shadow:0 0 0 .5px #dee1ed;background-color:#f4f5f9;border-radius:.125rem;height:3.05rem;padding:0 .75rem;gap:.75rem}.holdings-list-wrapper[_ngcontent-%COMP%] .single-holding-item[_ngcontent-%COMP%] .currency-input[_ngcontent-%COMP%]:focus-within{background-color:#e8f0fe;box-shadow:0 0 0 .5px #009000}.holdings-list-wrapper[_ngcontent-%COMP%] .single-holding-item[_ngcontent-%COMP%] .currency-input[_ngcontent-%COMP%] .currency[_ngcontent-%COMP%]{font-weight:600;color:#696969}.holdings-list-wrapper[_ngcontent-%COMP%] .single-holding-item[_ngcontent-%COMP%] .currency-input[_ngcontent-%COMP%] .form-control[_ngcontent-%COMP%]{border:0;background-color:transparent}.form-input-wrapper[_ngcontent-%COMP%]{margin-bottom:1.5rem}@media(min-width:1200px){.form-input-wrapper[_ngcontent-%COMP%]{margin-bottom:2rem}}.form-input-wrapper[_ngcontent-%COMP%] .form-label[_ngcontent-%COMP%]{color:#242424;font-size:1rem;font-weight:600}@media(min-width:1200px){.form-input-wrapper[_ngcontent-%COMP%] .form-label[_ngcontent-%COMP%]{font-size:1.125rem}}.form-input-wrapper[_ngcontent-%COMP%] .form-control-container[_ngcontent-%COMP%]{box-shadow:0 0 0 1px #dee1ed;background-color:#f4f5f9;border-radius:.3125rem;height:3.125rem;padding:0 .75rem;gap:.75rem;position:relative}.form-input-wrapper[_ngcontent-%COMP%] .form-control-container[_ngcontent-%COMP%]:focus-within{background-color:#e8f0fe;box-shadow:0 0 0 1px #009000}.form-input-wrapper[_ngcontent-%COMP%] .form-control-container[_ngcontent-%COMP%] .currency[_ngcontent-%COMP%]{font-weight:600;color:#696969}.form-input-wrapper[_ngcontent-%COMP%] .form-control-container[_ngcontent-%COMP%] .autofetch-spinner[_ngcontent-%COMP%]{position:absolute;right:1rem}.form-input-wrapper[_ngcontent-%COMP%] .form-control-container[_ngcontent-%COMP%] .form-control[_ngcontent-%COMP%]{border:0;background-color:transparent}.form-input-wrapper[_ngcontent-%COMP%] .form-control-container[_ngcontent-%COMP%] .form-control.ng-valid[_ngcontent-%COMP%]{background-color:#f4f5f9}.form-input-wrapper[_ngcontent-%COMP%] .form-control-container[_ngcontent-%COMP%] .search-control[_ngcontent-%COMP%]{padding:.875rem .75rem}.invalid-text[_ngcontent-%COMP%]{color:red;font-size:13px;margin-top:2px}.modal-wrapper[_ngcontent-%COMP%]{padding:0 1rem 1rem}@media(min-width:992px){.modal-wrapper[_ngcontent-%COMP%]{padding:0 1.5rem 1.5rem}}.modal-wrapper[_ngcontent-%COMP%] .investment-modal-header[_ngcontent-%COMP%]{padding:1.5rem 0}.modal-wrapper[_ngcontent-%COMP%] .investment-modal-header[_ngcontent-%COMP%] h5[_ngcontent-%COMP%]{font-size:1.25rem;font-weight:600}.modal-wrapper[_ngcontent-%COMP%] .investment-modal-body[_ngcontent-%COMP%]{background-color:#f4f5f9;border-radius:.5rem;padding:1rem}@media(min-width:992px){.modal-wrapper[_ngcontent-%COMP%] .investment-modal-body[_ngcontent-%COMP%]{padding:1.5rem}}.modal-wrapper[_ngcontent-%COMP%] .investment-modal-body[_ngcontent-%COMP%] .text-container[_ngcontent-%COMP%]{margin-bottom:2rem}@media(min-width:992px){.modal-wrapper[_ngcontent-%COMP%] .investment-modal-body[_ngcontent-%COMP%] .text-container[_ngcontent-%COMP%]{margin-bottom:2.5rem}}.modal-wrapper[_ngcontent-%COMP%] .investment-modal-body[_ngcontent-%COMP%] h4[_ng
1content-%COMP%]{font-size:1.125rem;margin-bottom:1rem}@media(min-width:992px){.modal-wrapper[_ngcontent-%COMP%] .investment-modal-body[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{font-size:1.25rem;margin-bottom:1.5rem}}.modal-wrapper[_ngcontent-%COMP%] .investment-modal-body[_ngcontent-%COMP%] h6[_ngcontent-%COMP%], .modal-wrapper[_ngcontent-%COMP%] .investment-modal-body[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font-size:.875rem}@media(min-width:992px){.modal-wrapper[_ngcontent-%COMP%] .investment-modal-body[_ngcontent-%COMP%] h6[_ngcontent-%COMP%], .modal-wrapper[_ngcontent-%COMP%] .investment-modal-body[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font-size:1rem}}.modal-wrapper[_ngcontent-%COMP%] .investment-modal-body[_ngcontent-%COMP%] h6[_ngcontent-%COMP%]{font-weight:700;margin-bottom:1rem}.modal-wrapper[_ngcontent-%COMP%] .investment-modal-body[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:#0009}.modal-wrapper[_ngcontent-%COMP%] .investment-modal-btns[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1.5fr;gap:1rem}.modal-wrapper[_ngcontent-%COMP%] .investment-modal-btns[_ngcontent-%COMP%] .modal-btn[_ngcontent-%COMP%]{display:block;font-size:1rem;font-weight:600;padding:.875rem 1.5rem;border-radius:.25rem}.modal-wrapper[_ngcontent-%COMP%] .investment-modal-btns[_ngcontent-%COMP%] .cancel-btn[_ngcontent-%COMP%]{background-color:#f4f5f9;color:#000c}.modal-wrapper[_ngcontent-%COMP%] .investment-modal-btns[_ngcontent-%COMP%] .add-btn[_ngcontent-%COMP%]{background-color:#009000;color:#fff}@media(min-width:992px){.modal-wrapper[_ngcontent-%COMP%] .investment-modal-btns[_ngcontent-%COMP%]{gap:1.5rem}}.modal-wrapper[_ngcontent-%COMP%] .other-modal-btns[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr;gap:1rem}.modal-wrapper[_ngcontent-%COMP%] .other-modal-btns[_ngcontent-%COMP%] .add-btn[_ngcontent-%COMP%]{width:100%;max-width:50%;font-size:1rem;font-weight:600;background-color:#009000;color:#fff;border-radius:.25rem}@media(min-width:992px){.modal-wrapper[_ngcontent-%COMP%] .other-modal-btns[_ngcontent-%COMP%] .add-btn[_ngcontent-%COMP%]{max-width:40%}} ngb-typeahead-window.dropdown-menu{width:calc(100% - 2rem);max-height:14rem;overflow-y:auto} ngb-typeahead-window.dropdown-menu::-webkit-scrollbar{width:.325rem} ngb-typeahead-window.dropdown-menu::-webkit-scrollbar-track{background:#f1f1f1} ngb-typeahead-window.dropdown-menu::-webkit-scrollbar-thumb{background:#bcbcbc}@media(min-width:992px){ ngb-typeahead-window.dropdown-menu{width:calc(100% - 3rem)}} ngb-typeahead-window.dropdown-menu .dropdown-item{padding:.5rem 1rem} ngb-typeahead-window.dropdown-menu .dropdown-item.active{background-color:#d2f7d2;color:#000}.cancel-btn[_ngcontent-%COMP%]{width:100px;font-weight:600;background-color:#dc3545;color:#fff;border-radius:.25rem}.success-btn[_ngcontent-%COMP%]{width:100px;font-weight:600;background-color:#009000;color:#fff;border-radius:.25rem}.invalid-class[_ngcontent-%COMP%]{box-shadow:0 0 0 1px red!important}.text-autofetch[_ngcontent-%COMP%]{text-decoration:underline;font-size:13px;margin-top:5px;cursor:pointer;transition:all .2s ease-in-out}"],changeDetection:1})}}return t})();function Sn(t,c){if(t&1&&(i(0,"div",18)(1,"span",27),a(2,"Cash in Hand"),o(),i(3,"span",28),a(4),F(5,"sumPipe"),o()()),t&2){let e=m();l(4),h(E(5,1,e.calculatedData.cash_hand_amt,e.calculatedData.currency_code))}}function On(t,c){if(t&1&&(i(0,"div",18)(1,"span",27),a(2,"Amount in Bank"),o(),i(3,"span",28),a(4),F(5,"sumPipe"),o()()),t&2){let e=m();l(4),h(E(5,1,e.calculatedData.cash_bank_amt,e.calculatedData.currency_code))}}function Pn(t,c){if(t&1&&(i(0,"div",18)(1,"span",27),a(2,"Amount of Gold"),o(),i(3,"span",28),a(4),F(5,"sumPipe"),o()()),t&2){let e=m();l(4),h(E(5,1,e.calculatedData.gold_amt,e.calculatedData.currency_code))}}function In(t,c){if(t&1&&(i(0,"div",18)(1,"span",27),a(2,"Amount of Silver"),o(),i(3,"span",28),a(4),F(5,"sumPipe"),o()()),t&2){let e=m();l(4),h(E(5,1,e.calculatedData.silver_amt,e.calculatedData.currency_code))}}function Fn(t,c){if(t&1&&(i(0,"div",18)(1,"span",27),a(2,"Short Term Investments"),o(),i(3,"span",28),a(4),F(5,"sumPipe"),o()()),t&2){let e=m();l(4),h(E(5,1,e.calculatedData.shares_short_term_amt,e.calculatedData.currency_code))}}function En(t,c){if(t&1&&(i(0,"div",18)(1,"span",27),a(2,"Long Term Investments"),o(),i(3,"span",28),a(4),F(5,"sumPipe"),o()()),t&2){let e=m();l(4),h(E(5,1,e.calculatedData.shares_known_long_term_amt,e.calculatedData.currency_code))}}function Tn(t,c){if(t&1&&(i(0,"div",18)(1,"span",27),a(2,"Other Short Term Investments"),o(),i(3,"span",28),a(4),F(5,"sumPipe"),o()()),t&2){let e=m();l(4),h(E(5,1,e.calculatedData.shares_unknown_short_term_amt,e.calculatedData.currency_code))}}function Dn(t,c){if(t&1&&(i(0,"div",18)(1,"span",27),a(2,"Other Long Term Investments"),o(),i(3,"span",28),a(4),F(5,"sumPipe"),o()()),t&2){let e=m();l(4),h(E(5,1,e.calculatedData.shares_unknown_long_term_amt,e.calculatedData.currency_code))}}function An(t,c){if(t&1&&(i(0,"div",18)(1,"span",27),a(2,"Business Assets"),o(),i(3,"span",28),a(4),F(5,"sumPipe"),o()()),t&2){let e=m();l(4),h(E(5,1,e.getBusinessAssetsTotal(),e.calculatedData.currency_code))}}function Vn(t,c){if(t&1&&(i(0,"div",18)(1,"span",27),a(2,"Value of Properties"),o(),i(3,"span",28),a(4),F(5,"sumPipe"),o()()),t&2){let e=m();l(4),h(E(5,1,e.calculatedData.property_total_amt,e.calculatedData.currency_code))}}function zn(t,c){if(t&1&&(i(0,"div",18)(1,"span",27),a(2,"Loans"),o(),i(3,"span",28),a(4),F(5,"sumPipe"),o()()),t&2){let e=m();l(4),h(E(5,1,e.calculatedData.loan_amt,e.calculatedData.currency_code))}}function Hn(t,c){if(t&1&&(i(0,"div",18)(1,"span",27),a(2,"Immediate Bills / Taxes / Rent"),o(),i(3,"span",28),a(4),F(5,"sumPipe"),o()()),t&2){let e=m();l(4),h(E(5,1,e.calculatedData.bills_amt,e.calculatedData.currency_code))}}function Zn(t,c){if(t&1&&(i(0,"div",18)(1,"span",27),a(2,"Employee wages / Dealer payments"),o(),i(3,"span",28),a(4),F(5,"sumPipe"),o()()),t&2){let e=m();l(4),h(E(5,1,e.calculatedData.payables_amt,e.calculatedData.currency_code))}}var Ye=(()=>{class t{constructor(e,r,n,s){this.observer=e,this.zakatService=r,this.router=n,this.activatedRoute=s,this.isMobileScreen=!1,this.isZakatableAssetsCollapsed=!0,this.isLiabilitiesCollapsed=!0,this.ZakatFormEnum=me,this.currentRouter=this.router.url,this.selectedFormSteps=[]}ngOnInit(){this.observer.observe("(max-width: 991px)").subscribe(e=>{this.isMobileScreen=e.matches})}get ZakatEnum(){return this.zakatService.ZakatEnum}getBusinessAssetsTotal(){let e=parseFloat(this.calculatedData.tradable_goods_amt?.toString()??"0"),r=parseFloat(this.calculatedData.raw_materials_amt?.toString()??"0");return e+r}getShowForm(){return this.zakatService.getShowForm()}goToHome(){this.router.navigate(["/"])}static{this.\u0275fac=function(r){return new(r||t)(_(ve),_(q),_(st),_(lt))}}static{this.\u0275cmp=k({type:t,selectors:[["app-zakat-calculations"]],inputs:{calculatedData:"calculatedData",selectedFormSteps:"selectedFormSteps"},decls:61,vars:34,consts:[["collapse","ngbCollapse"],["collapse1","ngbCollapse"],[1,"section"],[1,"heading-wrapper"],[1,"d-flex","align-items-end","gap-2","header"],["src","assets/images/musaffa-calc-logo.svg","alt","Musaffa Logo",1,"img-fluid","musaffa-logo"],[1,"mb-0","zakat-heading"],[1,"thankyou-para"],[1,"desktop-grid-wrapper"],[1,"desktop-collapse-wrapper"],[1,"collapse-wrapper","assets-container"],[1,""],[1,"inner-collapse-wrapper","assets-wrapper"],["type","button","aria-controls","collapseExample",1,"btn","d-flex","align-items-center","justify-content-between","shadow-none","collapse-btn",3,"click","disabled"],["width","12","height","7","viewBox","0 0 12 7","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M6.00078 4.19995L9.90078 0.299951C10.0841 0.116618 10.3174 0.024951 10.6008 0.024951C10.8841 0.024951 11.1174 0.116618 11.3008 0.299951C11.4841 0.483284 11.5758 0.716618 11.5758 0.999951C11.5758 1.28328 11.4841 1.51662 11.3008 1.69995L6.70078 6.29995C6.60078 6.39995 6.49245 6.47078 6.37578 6.51245C6.25911 6.55412 6.13411 6.57495 6.00078 6.57495C5.86745 6.57495 5.74245 6.55412 5.62578 6.51245C5.50911 6.47078 5.40078 6.39995 5.30078 6.29995L0.700781 1.69995C0.517448 1.51662 0.425781 1.28328 0.425781 0.999951C0.425781 0.716618 0.517448 0.483284 0.700781 0.299951C0.884115 0.116618 1.11745 0.024951 1.40078
10.024951C1.68411 0.024951 1.91745 0.116618 2.10078 0.299951L6.00078 4.19995Z","fill","black"],[3,"ngbCollapseChange","ngbCollapse"],[1,"collapse-card","d-flex","flex-column","gap-3","p-3","border-0"],[1,"d-flex","align-items-center","justify-content-between"],[1,"collapse-wrapper","liabilities-container"],[1,"inner-collapse-wrapper","liabilities-wrapper"],[1,"desktop-total-wrapper"],[1,"total-wrapper"],[1,"total-zakat-due","rounded","text-white"],[1,"mb-0","zakat-formula"],[1,"bottom-btns-wrapper","text-center"],["type","button",1,"btn","home-link","lh-1","d-block","mx-auto",3,"click"],[1,"cash-text"],[1,"cash-amount"]],template:function(r,n){if(r&1){let s=O();i(0,"section",2)(1,"div",3)(2,"div",4),d(3,"img",5),i(4,"h6",6),a(5,"Zakat Calculator"),o()(),i(6,"p",7),a(7," Thank you for calculating your zakat using our platform! You can come back anytime and update the details to recalculate. "),o()(),i(8,"div",8)(9,"div",9)(10,"div",10)(11,"label",11),a(12,"Total Zakatable Assets:"),o(),i(13,"div",12)(14,"button",13),x("click",function(){C(s);let M=se(21);return f(M.toggle())}),i(15,"span"),a(16),F(17,"number"),o(),y(),i(18,"svg",14),d(19,"path",15),o()(),L(),i(20,"div",16,0),z("ngbCollapseChange",function(M){return C(s),V(n.isZakatableAssetsCollapsed,M)||(n.isZakatableAssetsCollapsed=M),f(M)}),i(22,"div",17),p(23,Sn,6,4,"div",18),p(24,On,6,4,"div",18),p(25,Pn,6,4,"div",18),p(26,In,6,4,"div",18),p(27,Fn,6,4,"div",18),p(28,En,6,4,"div",18),p(29,Tn,6,4,"div",18),p(30,Dn,6,4,"div",18),p(31,An,6,4,"div",18),p(32,Vn,6,4,"div",18),o()()()(),i(33,"div",19)(34,"label",11),a(35,"Total Liabilities:"),o(),i(36,"div",20)(37,"button",13),x("click",function(){C(s);let M=se(44);return f(M.toggle())}),i(38,"span"),a(39),F(40,"number"),o(),y(),i(41,"svg",14),d(42,"path",15),o()(),L(),i(43,"div",16,1),z("ngbCollapseChange",function(M){return C(s),V(n.isLiabilitiesCollapsed,M)||(n.isLiabilitiesCollapsed=M),f(M)}),i(45,"div",17),p(46,zn,6,4,"div",18),p(47,Hn,6,4,"div",18),p(48,Zn,6,4,"div",18),o()()()()(),i(49,"div",21)(50,"div",22)(51,"label",11),a(52,"Total Zakat Due:"),o(),i(53,"div",23),a(54),F(55,"number"),o(),i(56,"p",24),a(57,"Total Zakat Due = (Zakatable Assets - Liabilities) x 0.025"),o()(),i(58,"div",25)(59,"button",26),x("click",function(){return n.goToHome()}),a(60,"Back to Home"),o()()()()()}r&2&&(l(14),g("disabled",!n.calculatedData.total_zakatable_amt),Ve("aria-expanded",!n.isZakatableAssetsCollapsed),l(2),fe("",n.calculatedData.currency_code," ",E(17,25,n.calculatedData.total_zakatable_amt,"1.2-2")),l(4),A("ngbCollapse",n.isZakatableAssetsCollapsed),l(3),u(n.calculatedData.cash_hand_amt?23:-1),l(),u(n.calculatedData.cash_bank_amt?24:-1),l(),u(n.calculatedData.gold_amt?25:-1),l(),u(n.calculatedData.silver_amt?26:-1),l(),u(n.calculatedData.shares_short_term_amt?27:-1),l(),u(n.calculatedData.shares_known_long_term_amt?28:-1),l(),u(n.calculatedData.shares_unknown_short_term_amt?29:-1),l(),u(n.calculatedData.shares_unknown_long_term_amt?30:-1),l(),u(n.calculatedData.tradable_goods_amt||n.calculatedData.raw_materials_amt?31:-1),l(),u(n.calculatedData.property_total_amt?32:-1),l(5),g("disabled",!n.calculatedData.total_liabilities_amt),Ve("aria-expanded",!n.isLiabilitiesCollapsed),l(2),fe("",n.calculatedData.currency_code," ",E(40,28,n.calculatedData.total_liabilities_amt,"1.2-2")),l(4),A("ngbCollapse",n.isLiabilitiesCollapsed),l(3),u(n.calculatedData.loan_amt?46:-1),l(),u(n.calculatedData.bills_amt?47:-1),l(),u(n.calculatedData.payables_amt?48:-1),l(6),fe(" ",n.calculatedData.currency_code," ",E(55,31,n.calculatedData.total_zakat_amt,"1.2-2")," "))},dependencies:[ht,at,_t],styles:[".section[_ngcontent-%COMP%]{padding:1rem .75rem 1.5rem}@media(min-width:992px){.section[_ngcontent-%COMP%]{padding:2.5rem}}@media(min-width:992px){.desktop-grid-wrapper[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:5rem}.desktop-grid-wrapper[_ngcontent-%COMP%] .desktop-collapse-wrapper[_ngcontent-%COMP%]{padding:0 2.5rem 0 0}.desktop-grid-wrapper[_ngcontent-%COMP%] .desktop-total-wrapper[_ngcontent-%COMP%]{padding:2.5rem;background-color:#f8f9fb;border-radius:1rem;border:1px solid rgba(0,0,0,.1);text-align:center}}.heading-wrapper[_ngcontent-%COMP%] .musaffa-logo[_ngcontent-%COMP%]{max-width:7rem}@media(min-width:992px){.heading-wrapper[_ngcontent-%COMP%] .musaffa-logo[_ngcontent-%COMP%]{max-width:10rem}}.heading-wrapper[_ngcontent-%COMP%] .zakat-heading[_ngcontent-%COMP%]{color:#1bad4e;font-weight:600;font-size:1.25rem;line-height:1.15}@media(min-width:992px){.heading-wrapper[_ngcontent-%COMP%] .zakat-heading[_ngcontent-%COMP%]{font-size:1.75rem}}.heading-wrapper[_ngcontent-%COMP%] .thankyou-para[_ngcontent-%COMP%]{color:#24242499;font-size:.875rem;margin:1.25rem 0 2.375rem}@media(min-width:992px){.heading-wrapper[_ngcontent-%COMP%] .thankyou-para[_ngcontent-%COMP%]{font-size:1.25rem;margin:1.25rem 0 3rem;max-width:85%;line-height:1.6}}label[_ngcontent-%COMP%]{color:#242424;font-size:1rem;font-weight:600;margin-bottom:.75rem}@media(min-width:992px){label[_ngcontent-%COMP%]{font-size:1.25rem;margin-bottom:1rem}}.assets-container[_ngcontent-%COMP%]{margin-bottom:1.75rem}@media(min-width:992px){.assets-container[_ngcontent-%COMP%]{margin-bottom:2rem}}.liabilities-container[_ngcontent-%COMP%]{margin-bottom:1.75rem}@media(min-width:992px){.liabilities-container[_ngcontent-%COMP%]{margin-bottom:0}}.collapse-wrapper[_ngcontent-%COMP%] .inner-collapse-wrapper[_ngcontent-%COMP%]{border-radius:.25rem}.collapse-wrapper[_ngcontent-%COMP%] .collapse-btn[_ngcontent-%COMP%]{width:100%;color:#000;font-weight:600;padding:.75rem 1rem}@media(min-width:992px){.collapse-wrapper[_ngcontent-%COMP%] .collapse-btn[_ngcontent-%COMP%]{padding:1rem}}.assets-wrapper[_ngcontent-%COMP%]{border:1px solid rgb(83,135,124)}.assets-wrapper[_ngcontent-%COMP%] .collapse-btn[_ngcontent-%COMP%]{background-color:#eaf1f3}.liabilities-wrapper[_ngcontent-%COMP%]{border:1px solid rgb(218,128,142)}.liabilities-wrapper[_ngcontent-%COMP%] .collapse-btn[_ngcontent-%COMP%]{background-color:#faeeed}.collapse-card[_ngcontent-%COMP%] .cash-text[_ngcontent-%COMP%], .collapse-card[_ngcontent-%COMP%] .cash-amount[_ng
1content-%COMP%]{font-size:.875rem}.collapse-card[_ngcontent-%COMP%] .cash-amount[_ngcontent-%COMP%]{font-weight:600}.total-wrapper[_ngcontent-%COMP%] .total-zakat-due[_ngcontent-%COMP%]{background-color:#53877c;font-size:1.5rem;font-weight:600;padding:1rem;margin-bottom:.75rem}@media(min-width:992px){.total-wrapper[_ngcontent-%COMP%] .total-zakat-due[_ngcontent-%COMP%]{margin-bottom:1rem}}.zakat-formula[_ngcontent-%COMP%]{color:#242424;font-size:.75rem}@media(min-width:992px){.zakat-formula[_ngcontent-%COMP%]{font-size:.875rem}}.bottom-btns-wrapper[_ngcontent-%COMP%]{margin-top:2.5rem}@media(min-width:992px){.bottom-btns-wrapper[_ngcontent-%COMP%]{margin-top:4rem}}.bottom-btns-wrapper[_ngcontent-%COMP%] .share-btn[_ngcontent-%COMP%]{border:1px solid rgb(0,144,0);font-size:1rem;font-weight:600;color:#009000;padding:.875rem 1.875rem;max-width:20rem;margin-bottom:1rem}.bottom-btns-wrapper[_ngcontent-%COMP%] .home-link[_ngcontent-%COMP%]{color:#242424;font-size:1rem;text-decoration:underline}"],changeDetection:1})}}return t})();var Gn=()=>[1,2,3,4],Bn=()=>({height:"250px",width:"100%","border-radius":"8px",margin:"0px"});function jn(t,c){t&1&&(i(0,"div"),d(1,"ngx-skeleton-loader",2),o()),t&2&&(l(),g("theme",He(1,Bn)))}function Rn(t,c){t&1&&(i(0,"div",0),R(1,jn,2,2,"div",null,j),o()),t&2&&(l(),U(He(0,Gn)))}function Un(t,c){t&1&&(y(),i(0,"svg",22),d(1,"path",24),o())}function Wn(t,c){t&1&&(y(),i(0,"svg",23),d(1,"path",25),o())}function qn(t,c){if(t&1&&(i(0,"label",16),d(1,"input",20),b(),i(2,"div",21),p(3,Un,2,0,":svg:svg",22),p(4,Wn,2,0,":svg:svg",23),i(5,"span"),a(6),o()()()),t&2){let e=c.$index,r=m(2);l(),g("formControlName",e),v(),l(),ze("checked",r.assetsFormArray.controls[e].value),l(),u(r.assetsFormArray.controls[e].value?-1:3),l(),u(r.assetsFormArray.controls[e].value?4:-1),l(2),h(r.userAssets[e].name)}}function Qn(t,c){t&1&&(y(),i(0,"svg",22),d(1,"path",24),o())}function Yn(t,c){t&1&&(y(),i(0,"svg",23),d(1,"path",25),o())}function Jn(t,c){if(t&1&&(i(0,"label",18),d(1,"input",20),b(),i(2,"div",26),p(3,Qn,2,0,":svg:svg",22),p(4,Yn,2,0,":svg:svg",23),i(5,"span"),a(6),o()()()),t&2){let e=c.$index,r=m(2);l(),g("formControlName",e),v(),l(),ze("checked",r.liabilitiesFormArray.controls[e].value),l(),u(r.liabilitiesFormArray.controls[e].value?-1:3),l(),u(r.liabilitiesFormArray.controls[e].value?4:-1),l(2),h(r.userLiabilities[e].name)}}function Kn(t,c){if(t&1&&(i(0,"div",19)(1,"button",27)(2,"span"),a(3,"START"),o(),y(),i(4,"svg",28),d(5,"path",29),o()()()),t&2){let e=m(2);l(),g("disabled",!e.areCheckboxesChecked)}}function $n(t,c){if(t&1){let e=O();i(0,"div",19)(1,"button",30),x("click",function(){C(e);let n=m(2);return f(n.openLoginPopup())}),i(2,"span"),a(3,"START"),o(),y(),i(4,"svg",28),d(5,"path",29),o()()()}}function Xn(t,c){if(t&1){let e=O();i(0,"form",3),x("ngSubmit",function(){C(e);let n=m();return f(n.getUserSelectedValues())}),i(1,"div",4)(2,"div",5)(3,"h5",6),a(4," Select all the items that you think may apply to you "),o(),i(5,"p",7),a(6," Based on the selections, you would be presented to enter the details in the next steps. "),o()(),i(7,"div",8)(8,"h6",9),a(9,"Select your currency:"),o(),d(10,"label",10),i(11,"ng-select",11),x("click",function(){C(e);let n=m();return f(n.isLoggedIn?null:n.openLoginPopup())})("change",function(n){C(e);let s=m();return f(s.onCurrencyChange(n))}),z("ngModelChange",function(n){C(e);let s=m();return V(s.selectedCurrency,n)||(s.selectedCurrency=n),f(n)}),o(),b(),b(),o(),i(12,"div",12)(13,"div",13)(14,"h6",14),a(15,"Select what you own:"),o(),i(16,"div",15),R(17,qn,7,6,"label",16,j),o()(),i(19,"div",17)(20,"h6",14),a(21,"Select your liabilities:"),o(),i(22,"div",15),R(23,Jn,7,6,"label",18,j),o()()()(),p(25,Kn,6,1,"div",19),p(26,$n,6,0,"div",19),o()}if(t&2){let e=m();g("formGroup",e.form),l(11),g("items",e.currencies)("clearable",!1)("searchable",!1)("hideSelected",!0),A("ngModel",e.selectedCurrency),v(),v(),l(6),U(e.assetsFormArray.controls),l(6),U(e.liabilitiesFormArray.controls),l(2),u(e.isLoggedIn?25:-1),l(),u(e.isLoggedIn?-1:26)}}var Ee=(()=>{class t{constructor(e,r,n){this.formBuilder=e,this.zakatService=r,this.authService=n,this.areCheckboxesChecked=!1,this.isLoading=!1,this.currencies=[],this.selectedCurrency="USD",this.isCurrencyChanged=new ue,this.userAssets=[{id:"cash",inputs:"",name:"Cash (In Hand / In Bank Account)"},{id:"jwellery",inputs:"",name:"Gold & Silver"},{id:"stock",inputs:"",name:"Stock/Fund Investments"},{id:"business",inputs:"",name:"Business Assets"},{id:"property",inputs:"",name:"Property (For Trading)"}],this.userLiabilities=[{id:"loans",inputs:"loans",name:"Loans"},{id:"bills",inputs:"bills",name:"Immediate Bills / Taxes / Rent"},{id:"wages",inputs:"wages",name:"Employee wages / Dealer payments"}],this.selectedValues={currency:"",selectedCheckboxes:[]}
1,this.onUpdateShowForm=new ue,this.onTransformedCheckboxesArr=new ue,this.authService.getUserId()?(this.isLoggedIn=!0,this.fetchCurrencyCodes()):(this.isLoggedIn=!1,this.currencies=[{currency_code:"USD",label:"USD($)",symbol:"$"}]),this.form=this.formBuilder.group({currency:this.selectedValues.currency,assets:new Ge([]),liabilities:new Ge([])}),this.addCheckboxes()}openLoginPopup(){this.authService.openAuthPopup()}ngOnInit(){this.formSubscription=this.form.valueChanges.subscribe(()=>{this.areCheckboxesChecked=this.checkIfAnyCheckboxChecked()});let e=localStorage.getItem("selectedValues");e?(this.selectedValues=JSON.parse(e),this.selectedCurrency=this.selectedValues.currency,localStorage.setItem("selectedCurrency",JSON.stringify(this.selectedCurrency)),this.form.patchValue({currency:this.selectedValues.currency,assets:this.mapToCheckboxFormArray(this.selectedValues.selectedCheckboxes,this.userAssets),liabilities:this.mapToCheckboxFormArray(this.selectedValues.selectedCheckboxes,this.userLiabilities)})):this.selectedCurrency="USD"}onCurrencyChange(e){localStorage.setItem("selectedCurrency",JSON.stringify(e.currency_code)),this.isCurrencyChanged.emit(!0)}ngOnDestroy(){this.formSubscription&&this.formSubscription.unsubscribe(),this.currencySubscription&&this.currencySubscription.unsubscribe()}get assetsFormArray(){return this.form.controls.assets}get liabilitiesFormArray(){return this.form.controls.liabilities}addCheckboxes(){this.userAssets.forEach(()=>this.assetsFormArray.push(new Ne(!1))),this.userLiabilities.forEach(()=>this.liabilitiesFormArray.push(new Ne(!1)))}mapToCheckboxFormArray(e,r){return r.map(n=>e.some(s=>s.id===n.id))}checkIfAnyCheckboxChecked(){let e=this.form.get("assets"),r=this.form.get("liabilities"),n=e.controls.some(w=>w.value),s=r.controls.some(w=>w.value);return n||s}getUserSelectedValues(){let e=this.form.value.assets.map((w,M)=>w?this.userAssets[M]:null).filter(w=>w!==null),r=e.findIndex(w=>w.id==="stock");r>=0&&e.splice(r+1,0,{id:"other",inputs:"",name:"Other Investments"});let n=this.form.value.liabilities.map((w,M)=>w?this.userLiabilities[M]:null).filter(w=>w!==null);this.selectedValues.currency=this.form.value?.currency,this.selectedValues.selectedCheckboxes=e.concat(n),localStorage.setItem("selectedValues",JSON.stringify(this.selectedValues));let s=e;if(n.length>0){let w={id:"liability",inputs:n.map(M=>M.inputs),name:n.map(M=>M.name)};s=s.concat(w)}this.transformedCheckboxesArr(s),this.zakatService.setSelectedCurrencyAndFormsData(this.selectedValues),this.updateShowForm()}updateShowForm(){this.onUpdateShowForm.emit()}transformedCheckboxesArr(e){this.onTransformedCheckboxesArr.emit(e)}fetchCurrencyCodes(){this.isLoading=!0,this.currencySubscription=this.zakatService.getCurrencyCodes().subscribe(e=>{this.currencies=e.data,this.isLoading=!1},e=>{console.error(e),this.isLoading=!1})}static{this.\u0275fac=function(r){return new(r||t)(_(ee),_(q),_(Me))}}static{this.\u0275cmp=k({type:t,selectors:[["app-zakat-calculator-home"]],inputs:{selectedCurrency:"selectedCurrency"},outputs:{isCurrencyChanged:"isCurrencyChanged",onUpdateShowForm:"onUpdateShowForm",onTransformedCheckboxesArr:"onTransformedCheckboxesArr"},decls:2,vars:2,consts:[[1,"container","p-3","p-lg-4","loader-grid"],[1,"form-wrapper",3,"formGroup"],["count","1","appearance","line","animation","progress",3,"theme"],[1,"form-wrapper",3,"ngSubmit","formGroup"],[1,"form-inner-wrapper"],[1,"heading-text-wrapper"],[1,"steps-form-heading"],[1,"steps-form-description"],[1,"d-flex","align-items-center","justify-content-between","currency-container","self-align-start"],[1,"mb-0","heading"],["for","currency"],["bindLabel","label","bindValue","currency_code","formControlName","currency","placeholder","USD",1,"custom-currency-select",3,"click","change","ngModelChange","items","clearable","searchable","hideSelected","ngModel"],[1,"checkbox-group-container"],[1,"checkbox-group","assets-group"],[1,"heading"],[1,"checkbox-list-container"],["formArrayName","assets",1,"checkbox-tile"],[1,"checkbox-group","liabilities-group"],["formArrayName","liabilities",1,"checkbox-tile"],[1,"btn-container"],["type","checkbox",1,"checkbox-input",3,"formControlName"],[1,"checkbox-container","assets"],["viewBox","0 0 24 24","fill","none","xmlns","http://www.w3.org/2000/svg",1,"empty-box-icon"],["viewBox","0 0 24 24","fill","none","xmlns","http://www.w3.org/2000/svg",1,"check-icon"],["d","M8 24C5.77778 24 3.88889 23.2222 2.33333 21.6667C0.777778 20.1111 0 18.2222 0 16V8C0 5.77778 0.777778 3.88889 2.33333 2.33333C3.88889 0.777778 5.77778 0 8 0H16C18.2222 0 20.1111 0.777778 21.6667 2.33333C23.2222 3.88889 24 5.77778 24 8V16C24 18.2222 23.2222 20.1111 21.6667 21.6667C20.1111 23.2222 18.2222 24 16 24H8ZM8 21.3333H16C17.4667 21.3333 18.7222 20.8111 19.7667 19.7667C20.8111 18.7222 21.3333 17.4667 21.3333 16V8C21.3333 6.53333 20.8111 5.27778 19.7667 4.23333C18.7222 3.18889 17.4667 2.66667 16 2.66667H8C6.53333 2.66667 5.27778 3.18889 4.23333 4.23333C3.18889 5.27778 2.66667 6.53333 2.66667 8V16C2.66667 17.4667 3.18889 18.7222 4.23333 19.7667C5.27778 20.8111 6.53333 21.3333 8 21.3333Z","fill","#1C1B1F"],["d","M8 24C5.77778 24 3.88889 23.2222 2.33333 21.6667C0.777778 20.1111 0 18.2222 0 16V8C0 5.77778 0.777778 3.88889 2.33333 2.33333C3.88889 0.777778 5.77778 0 8 0H16C18.2222 0 20.1111 0.777778 21.6667 2.33333C23.2222 3.88889 24 5.77778 24 8V16C24 18.2222 23.2222 20.1111 21.6667 21.6667C20.1111 23.2222 18.2222 24 16 24H8ZM10.6667 17.3333L18.6667 9.33333L16.8 7.46667L10.6667 13.6L7.73333 10.6667L5.86667 12.5333L10.6667 17.3333ZM8 21.3333H16C17.4667 21.3333 18.7222 20.8111 19.7667 19.7667C20.8111 18.7222 21.3333 17.4667 21.3333 16V8C21.3333 6.53333 20.8111 5.27778 19.7667 4.23333C18.7222 3.18889 17.4667 2.66667 16 2.66667H8C6.53333 2.66667 5.27778 3.18889 4.23333 4.23333C3.18889 5.27778 2.66667 6.53333 2.66667 8V16C2.66667 17.4667 3.18889 18.7222 4.23333 19.7667C5.27778 20.8111 6.53333 21.3333 8 21.3333Z","fill","white"],[1,"checkbox-container","liabilities"],[1,"btn","d-flex","align-items-center","justify-content-center","text-white","rounded","gap-3","start-btn",3,"disabled"],["width","16","height","16","viewBox","0 0 16 16","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M12.175 9H0V7H12.175L6.575 1.4L8 0L16 8L8 16L6.575 14.6L12.175 9Z","fill","white"],["type","button",1,"btn","d-flex","align-items-center","justify-content-center","text-white","rounded","gap-3","start-btn",3,"click"]],template:function(r,n){r&1&&(p(0,Rn,3,1,"div",0),p(1,Xn,27,8,"form",1)),r&2&&(u(n.isLoading?0:-1),l(),u(n.isLoading?-1:1))},dependencies:[Ct,P,Q,ct,H,T,I,S,Z,pt,oe],styles:[".loader-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr;gap:.5rem}@media(min-width:992px){.loader-grid[_ngcontent-%COMP%]{grid-template-columns:1fr 1.5fr;gap:1.5rem}}.form-wrapper[_ngcontent-%COMP%]{display:grid;height:100%;grid-template-rows:auto 4.5rem}@media(min-width:992px){.form-wrapper[_ngcontent-%COMP%]{position:relative;grid-template-rows:auto 5.875rem}}.form-wrapper[_ngcontent-%COMP%] .form-inner-wrapper[_ngcontent-%COMP%]{padding:0 .75rem;height:calc(100vh - 8rem);overflow-y:auto}.form-wrapper[_ngcontent-%COMP%] .form-inner-wrapper[_ngcontent-%COMP%]::-webkit-scrollbar{width:.325rem}.form-wrapper[_ngcontent-%COMP%] .form-inner-wrapper[_ngcontent-%COMP%]::-webkit-scrollbar-track{background:#f1f1f1}.form-wrapper[_ngcontent-%COMP%] .form-inner-wrapper[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:#bcbcbc}@media(min-width:992px){.form-wrapper[_ngcontent-%COMP%] .form-inner-wrapper[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(2,1fr);grid-template-rows:4.25rem auto;align-items:flex-start;padding:2.5rem;gap:1.5rem 5rem;height:100%;background:linear-gradient(#ebebeb,#ebebeb) center/1px calc(100% - 3rem) no-repeat;background-position:50% 2.5rem}}.currency-container[_ngcontent-%COMP%]{background-color:#fdf5e8;margin:0 -.75rem;padding:.875rem .75rem}@media(min-width:992px){.currency-container[_ngcontent-%COMP%]{margin:0;padding:1rem;border-radius:.25rem;grid-column:1/2;max-width:26rem}}.heading-text-wrapper[_ngcontent-%COMP%]{padding:1.125rem 0 1.75rem}@media(min-width:992px){.heading-text-wrapper[_ngcontent-%COMP%]{padding:0;grid-column:1/2;max-width:26rem}}.heading-text-wrapper[_ngcontent-%COMP%] .steps-form-heading[_ngcontent-%COMP%]{font-size:1.25rem;font-weight:500;color:#222;margin-bottom:.625rem}@media(min-width:1200px){.heading-text-wrapper[_ngcontent-%COMP%] .steps-form-heading[_ngcontent-%COMP%]{font-size:1.5rem;margin-bottom:1rem;line-height:1.6}}.heading-text-wrapper[_ngcontent-%COMP%] .steps-form-description[_ngcontent-%COMP%]{font-size:.875rem;font-weight:400;color:#24242499;margin-bottom:0}@media(min-width:1200px){.heading-text-wrapper[_ngcontent-%COMP%] .steps-form-description[_ngcontent-%COMP%]{font-size:1rem;line-height:1.6}}.heading[_ngcontent-%COMP%]{color:#222;font-weight:600;font-size:1rem;margin-bottom:.75rem}@media(min-width:1200px){.heading[_ngcontent-%COMP%]{font-size:1.125rem}}@media(min-width:992px){.checkbox-group-container[_ngcontent-%COMP%]{grid-row:1/3;grid-column:2/3}}.checkbox-group-container[_ngcontent-%COMP%] .assets-group[_ngcontent-%COMP%]{margin-bottom:2rem}@media(min-width:992px){.checkbox-group-container[_ngcontent-%COMP%] .assets-group[_ngcontent-%COMP%]{margin-bottom:3.5rem}}.checkbox-group-container[_ngcontent-%COMP%] .liabilities-group[_ngcontent-%COMP%]{margin-bottom:2rem}@media(min-width:992px){.checkbox-group-container[_ngcontent-%COMP%] .liabilities-group[_ngcontent-%COMP%]{margin-bottom:0}}.checkbox-group-container[_ngcontent-%COMP%] .checkbox-list-container[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr;gap:1rem}@media(min-width:992px){.checkbox-group-container[_ngcontent-%COMP%] .checkbox-list-container[_ngcontent-%COMP%]{grid-template-columns:repeat(2,1fr);gap:.875rem}}.checkbox-input[_ngcontent-%COMP%]{clip:rect(0 0 0 0);clip-path:inset(100%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}.checkbox-container[_ngcontent-%COMP%]{display:flex;align-items:center;cursor:pointer;padding:8px;border-radius:4px;color:#222;padding:1rem .75rem;font-weight:500;font-size:1rem}@media(min-width:992px){.checkbox-container[_ngcontent-%COMP%]{padding:.75rem .5rem;font-size:.8rem}}.checkbox-container.checked[_ngcontent-%COMP%]{color:#fff}.checkbox-input[_ngcontent-%COMP%]{display:none}.check-icon[_ngcontent-%COMP%], .empty-box-icon[_ngcontent-%COMP%]{flex-shrink:0;width:1.275rem;height:1.275rem;margin-right:8px}@media(min-width:992px){.check-icon[_ngcontent-%COMP%], .empty-box-icon[_ngcontent-%COMP%]{width:1rem;height:1rem}}.assets[_ngcontent-%COMP%]{background-color:#eaf1f3}.assets.checked[_ngcontent-%COMP%]{background-color:#53877c}.liabilities[_ngcontent-%COMP%]{background-color:#faeeed}.liabilities.checked[_ngcontent-%COMP%]{background-color:#da808e}.btn-container[_ngcontent-%COMP%]{background-color:#fff;padding:.75rem;position:fixed;bottom:0;left:0;width:100%}@media(min-width:992px){.btn-container[_ngcontent-%COMP%]{position:absolute;bottom:2.5rem;left:unset;right:2.5rem;width:max-content;padding:0}}.btn-container[_ngcontent-%COMP%] .start-btn[_ngcontent-%COMP%]{background-color:#009000;font-size:1rem;font-weight:600;padding:.875rem 1.5rem;width:100%;box-shadow:0 2px 8px #1bad4e4d;margin-left:auto}@media(min-width:992px){.btn-container[_ngcontent-%COMP%] .start-btn[_ngcontent-%COMP%]{width:max-content;padding:.875rem 3.125rem}}"],changeDetection:1})}}return t})();var yt=(()=>{class t{static{this.\u0275fac=function(r){return new(r||t)}}static{this.\u0275mod=ot({type:t})}static{this.\u0275inj=tt({imports:[Le,P,I,Be,We,Ue,ft,Re,Ee,ke,Se,ye,Ie,Oe,Fe,Pe,Le,P,I,Be,We,Ue,Re]})}}return t})();function to(t,c){t&1&&(i(0,"header",0)(1,"div",7)(2,"h2",8),a(3,"Zakat Calculator"),o()()())}function no(t,c){t&1&&(i(0,"h3",2),a(1,"Zakat Calculator"),o())}function oo(t,c){if(t&1){let e=O();
1i(0,"app-zakat-calculator-home",9),x("onUpdateShowForm",function(){C(e);let n=m();return f(n.updateForm())})("isCurrencyChanged",function(n){C(e);let s=m();return f(s.currencyChanged(n))})("onTransformedCheckboxesArr",function(n){C(e);let s=m();return f(s.getTransformedArr(n))}),o()}if(t&2){let e=m();g("selectedCurrency",e.selectedCurrency)}}function io(t,c){t&1&&d(0,"app-cash-details")}function ro(t,c){t&1&&d(0,"app-gold-and-silver-details")}function ao(t,c){if(t&1&&d(0,"app-stock-fund-investments",14),t&2){let e=m(2);g("existingHoldings",e.holdings)}}function lo(t,c){if(t&1&&d(0,"app-other-investments",14),t&2){let e=m(2);g("existingHoldings",e.otherHoldings)}}function so(t,c){t&1&&d(0,"app-business-assets")}function co(t,c){t&1&&d(0,"app-property")}function mo(t,c){if(t&1&&d(0,"app-liabilities",15),t&2){let e=m(2);g("selectedInputs",e.selectedFormSteps)}}function po(t,c){if(t&1){let e=O();i(0,"button",22),x("click",function(){C(e);let n=m(2);return f(n.goToNextStep())}),i(1,"span"),a(2,"CONTINUE"),o(),y(),i(3,"svg",23),d(4,"path",24),o()()}}function uo(t,c){t&1&&(i(0,"div",26)(1,"div",28)(2,"span",29),a(3,"Loading..."),o()()())}function go(t,c){t&1&&(i(0,"div",27)(1,"span"),a(2,"CALCULATE"),o(),y(),i(3,"svg",23),d(4,"path",24),o()())}function ho(t,c){if(t&1){let e=O();i(0,"button",25),x("click",function(){C(e);let n=m(2);return f(n.calculateZakat())}),p(1,uo,4,0,"div",26),p(2,go,5,0,"div",27),o()}if(t&2){let e=m(2);g("disabled",e.calculationLoader),l(),u(e.calculationLoader?1:-1),l(),u(e.calculationLoader?-1:2)}}function Co(t,c){if(t&1){let e=O();i(0,"form",5)(1,"app-steps-form-wrapper",10),D(2,11),d(3,"app-steps-counter",12),N(),D(4,13),p(5,io,1,0,"app-cash-details"),p(6,ro,1,0,"app-gold-and-silver-details"),p(7,ao,1,1,"app-stock-fund-investments",14),p(8,lo,1,1,"app-other-investments",14),p(9,so,1,0,"app-business-assets"),p(10,co,1,0,"app-property"),p(11,mo,1,1,"app-liabilities",15),D(12),i(13,"div",16)(14,"button",17),x("click",function(){C(e);let n=m();return f(n.goToPreviousStep())}),y(),i(15,"svg",18),d(16,"path",19),o(),L(),i(17,"span"),a(18,"BACK"),o()(),p(19,po,5,0,"button",20),p(20,ho,3,3,"button",21),o(),N()(),o()()}if(t&2){let e=m();g("formGroup",e.zakatForm),l(),g("formHeader",e.currentFormHeader)("formDescription",e.currentFormDescription),l(2),g("stepCounter",e.currentStep)("totalSteps",e.selectedFormSteps.length)("formId",e.currentForm),l(2),u(e.currentForm==="cash"?5:-1),l(),u(e.currentForm==="jwellery"?6:-1),l(),u(e.currentForm==="stock"?7:-1),l(),u(e.currentForm==="other"?8:-1),l(),u(e.currentForm==="business"?9:-1),l(),u(e.currentForm==="property"?10:-1),l(),u(e.currentForm==="liability"?11:-1),l(8),u(e.currentFormIndex!==e.selectedFormSteps.length-1?19:-1),l(),u(e.currentFormIndex===e.selectedFormSteps.length-1?20:-1)}}function fo(t,c){if(t&1&&d(0,"app-zakat-calculations",6),t&2){let e=m();g("calculatedData",e.calculatedZakatData)("selectedFormSteps",e.selectedFormSteps)}}var Wi=(()=>{class t{constructor(e,r,n,s,w,M){this.observer=e,this.fb=r,this.zakatService=n,this.toaster=s,this.authService=w,this.seoService=M,this.holdings=[],this.otherHoldings=[],this.isMobileScreen=!1,this.currentStep=1,this.totalSteps=6,this.ZakatFormEnum=me,this.currentlyFormState="",this.currentFormHeader="",this.currentFormDescription="",this.userSelectedData={currency:"",selectedCheckboxes:[]},this.currentFormIndex=0,this.selectedFormSteps=[],this.calculationLoader=!1,this.formHeaders=[{formId:"cash",formTitle:"Cash Details",formDescription:"Enter the amount of cash you have in hand or is currently in your bank account."},{formId:"jwellery",formTitle:"Gold & Silver Details",formDescription:"Enter the total value of zakatable Gold & Silver you currently have."},{formId:"stock",formTitle:"Stock Investments",formDescription:"Enter your investment details. You can either enter manually or auto-fetch by connecting to your brokerage."},{formId:"other",formTitle:"Other Investments (Funds etc.)",formDescription:"Enter your other long-term investment details like ETFs, Index Funds, Mutual Funds etc."},{formId:"business",formTitle:"Business Assets",formDescription:"Enter the total value of tradable goods or raw materials your business holds"},{formId:"property",formTitle:"Property",formDescription:"Enter the total value of plots, houses or flats for trading."},{formId:"liability",formTitle:"Liabilities",formDescription:"Enter the value of what you owe / your liabilities."}]}ngOnInit(){this.seoService.updateTitle("Musaffa | Zakat Calculator"),this.seoService.updateDescription(""),this.authService.getUserId()&&this.fetchMyZakatCalculation(),this.observer.observe("(max-width: 991px)").subscribe(e=>{this.isMobileScreen=e.matches}),this.zakatForm=this.fb.group({cashDetails:this.fb.group({cashAmount:null,bankAmount:null}),businessAssets:this.fb.group({goodsAmount:null,rawMaterialsAmount:null}),goldAndSilver:this.fb.group({goldAmount:null,silverAmount:null}),property:this.fb.group({propertyAmount:null}),liabilities:this.fb.group({loanAmount:null,utilitiesAmount:null,employeeAmount:null}),stockFundInvestment:this.fb.group({holdings:this.fb.array([])})})}get ZakatEnum(){return this.zakatService.ZakatEnum}getShowForm(){return this.zakatService.getShowForm()}updateForm(){let e=this.zakatService.getSelectedCurrencyAndFormsData();this.userSelectedData.currency=e.currency,this.currentForm=this.selectedFormSteps[this.currentFormIndex].id,this.getCurrentFormHeadingAndDescription(this.currentForm),this.zakatService.setShowForm(this.ZakatEnum.MultiStep)}getTransformedArr(e){this.selectedFormSteps=e}currencyChanged(e){(this.isCurrencyChanged=e)&&(this.zakatForm.reset(),this.zakatService.setAllHoldings([]),this.zakatService.setOtherInvestment([]))}goToNextStep(){this.currentFormIndex!==this.selectedFormSteps.length-1&&(this.currentFormIndex++,this.currentStep=this.currentFormIndex+1,this.currentForm=this.selectedFormSteps[this.currentFormIndex].id,this.getCurrentFormHeadingAndDescription(this.currentForm))}goToPreviousStep(){if(this.currentFormIndex===0){this.zakatService.setShowForm(this.ZakatEnum.Home);return}this.currentFormIndex--,this.currentStep=this.currentFormIndex+1,this.currentForm=this.selectedFormSteps[this.currentFormIndex].id,this.getCurrentFormHeadingAndDescription(this.currentForm)}async calculateZakat(){this.calculationLoader=!0;let e={currency_code:this.userSelectedData.currency,cash_hand_amt:null,cash_bank_amt:null,gold_amt:null,silver_amt:null,tradable_goods_amt:null,raw_materials_amt:null,property_total_amt:null,loan_amt:null,bills_amt:null,payables_amt:null,stock_fund_investments:{holdings:[]},other_investments:{investments:[]},shares_investment_type:null},n=this.zakatService.getSelectedCurrencyAndFormsData().selectedCheckboxes.map(s=>s.id);n.includes("cash")&&(e.cash_hand_amt=this.zakatForm.value.cashDetails.cashAmount,e.cash_bank_amt=this.zakatForm.value.cashDetails.bankAmount),n.includes("jwellery")&&(e.gold_amt=this.zakatForm.value.goldAndSilver.goldAmount,e.silver_amt=this.zakatForm.value.goldAndSilver.silverAmount),n.includes("other")&&(e.other_investments=this.zakatService.getOtherInvestment()),n.includes("stock")&&(e.stock_fund_investments=this.zakatService.getAllHoldings()),n.includes("business")&&(e.tradable_goods_amt=this.zakatForm.value.businessAssets.goodsAmount,e.raw_materials_amt=this.zakatForm.value.businessAssets.rawMaterialsAmount),n.includes("property")&&(e.property_total_amt=this.zakatForm.value.property.propertyAmount),n.includes("loans")&&(e.loan_amt=this.zakatForm.value.liabilities.loanAmount),n.includes("bills")&&(e.bills_amt=this.zakatForm.value.liabilities.utilitiesAmount),n.includes("wages")&&(e.payables_amt=this.zakatForm.value.liabilities.employeeAmount);try{let s=await this.zakatService.calculateMyZakat(e);
1if(s.data)this.calculationLoader=!1,this.calculatedZakatData=s.data,this.zakatService.setShowForm(this.ZakatEnum.Calculations);else{this.calculationLoader=!1,this.toaster.error(s.message);return}this.calculationLoader=!1}catch(s){console.error(s),this.calculationLoader=!1}finally{this.calculationLoader=!1}}getCurrentFormHeadingAndDescription(e){let r=this.formHeaders.find(n=>n.formId===e);r&&(this.currentFormHeader=r.formTitle,this.currentFormDescription=r.formDescription)}fetchMyZakatCalculation(){this.zakatService.getMyZakatCalculation().subscribe(e=>{let r=e;r.zakat_calc&&(this.selectedCurrency=r.zakat_calc.currency_code,this.holdings=e.stock_fund_investments.map(n=>({ticker:n.symbol,no_of_shares:n.units,current_market_value:n.price,investment_type:n.type})),this.zakatService.setAllHoldings(this.holdings),this.otherHoldings=e.other_investments.map(n=>({name:n.name,amount:n.price,investment_type:n.type})),this.zakatService.setOtherInvestment(this.otherHoldings),this.zakatForm.patchValue({cashDetails:{cashAmount:r.zakat_calc.cash_hand_amt,bankAmount:r.zakat_calc.cash_bank_amt},businessAssets:{goodsAmount:r.zakat_calc.tradable_goods_amt,rawMaterialsAmount:r.zakat_calc.raw_materials_amt},goldAndSilver:{goldAmount:r.zakat_calc.gold_amt,silverAmount:r.zakat_calc.silver_amt},property:{propertyAmount:r.zakat_calc.property_total_amt},liabilities:{loanAmount:r.zakat_calc.loan_amt,utilitiesAmount:r.zakat_calc.bills_amt,employeeAmount:r.zakat_calc.payables_amt}})),this.zakatService.setShowForm(this.ZakatEnum.Home)})}static{this.\u0275fac=function(r){return new(r||t)(_(ve),_(ee),_(q),_(be),_(Me),_(bt))}}static{this.\u0275cmp=k({type:t,selectors:[["app-zakat-calulator"]],decls:7,vars:5,consts:[[1,"bg-white","mobile-header"],[1,"container","main-container","py-4","py-lg-5"],[1,"section-heading"],[1,"calculator-container"],[3,"selectedCurrency"],[3,"formGroup"],[3,"calculatedData","selectedFormSteps"],[1,"d-flex","align-items-center","gap-3","container"],[1,"mb-0"],[3,"onUpdateShowForm","isCurrencyChanged","onTransformedCheckboxesArr","selectedCurrency"],[3,"formHeader","formDescription"],["stepsCounter",""],[3,"stepCounter","totalSteps","formId"],["formContent",""],[3,"existingHoldings"],[3,"selectedInputs"],[1,"steps-form-buttons"],["type","button",1,"d-flex","align-items-center","justify-content-center","gap-3","btn","rounded","step-form-btn","text-black","back-btn",3,"click"],["width","17","height","16","viewBox","0 0 17 16","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M4.325 7L16.5 7V9L4.325 9L9.925 14.6L8.5 16L0.5 8L8.5 0L9.925 1.4L4.325 7Z","fill","black","fill-opacity","0.8"],["type","button",1,"d-flex","align-items-center","justify-content-center","gap-3","btn","rounded","step-form-btn","text-white","continue-btn"],["type","button",1,"btn","rounded","step-form-btn","text-white","calculate-btn",3,"disabled"],["type","button",1,"d-flex","align-items-center","justify-content-center","gap-3","btn","rounded","step-form-btn","text-white","continue-btn",3,"click"],["width","16","height","16","viewBox","0 0 16 16","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M12.175 9H0V7H12.175L6.575 1.4L8 0L16 8L8 16L6.575 14.6L12.175 9Z","fill","white"],["type","button",1,"btn","rounded","step-form-btn","text-white","calculate-btn",3,"click","disabled"],[1,"d-flex","justify-content-center"],[1,"d-flex","align-items-center","justify-content-center","gap-3"],["role","status",1,"spinner-border","spinner-border-sm","text-white"],[1,"visually-hidden"]],template:function(r,n){r&1&&(p(0,to,4,0,"header",0),i(1,"section",1),p(2,no,2,0,"h3",2),i(3,"div",3),p(4,oo,1,1,"app-zakat-calculator-home",4),p(5,Co,21,15,"form",5),p(6,fo,1,2,"app-zakat-calculations",6),o()()),r&2&&(u(n.isMobileScreen?0:-1),l(2),u(n.isMobileScreen?-1:2),l(2),u(n.getShowForm()===n.ZakatEnum.Home?4:-1),l(),u(n.getShowForm()===n.ZakatEnum.MultiStep?5:-1),l(),u(n.getShowForm()===n.ZakatEnum.Calculations?6:-1))},dependencies:[yt,Qe,Ee,qe,ke,Se,ye,Ie,Oe,Fe,Ye,Pe,Q,T,S,P,I],styles:["@media(min-width:992px){.main-container[_ngcontent-%COMP%]{padding-top:1.25rem}}.mobile-header[_ngcontent-%COMP%]{position:relative;padding:1rem 0;box-shadow:0 2px 5px #0000001a;z-index:5}.mobile-header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{font-size:1.25rem;font-weight:500;color:#242424}.section-heading[_ngcontent-%COMP%]{font-weight:700;font-size:1.25px;margin-bottom:1rem}@media(min-width:992px){.section-heading[_ngcontent-%COMP%]{font-size:1.5rem;margin-bottom:1.25rem}}.calculator-container[_ngcontent-%COMP%]{height:calc(100vh - 3.5rem);overflow-y:auto}.calculator-container[_ngcontent-%COMP%]::-webkit-scrollbar{width:.325rem}.calculator-container[_ngcontent-%COMP%]::-webkit-scrollbar-track{background:#f1f1f1}.calculator-container[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:#bcbcbc}@media(min-width:992px){.calculator-container[_ngcontent-%COMP%]{height:calc(100vh - 10rem);max-height:50rem;border-radius:.625rem;border:1px solid #efedeb;background-color:#fff}}.steps-form-buttons[_ngcontent-%COMP%]{position:fixed;left:0;bottom:0;width:100%;display:grid;grid-template-columns:1fr 1.25fr;gap:1rem;padding:.75rem 1rem;background-color:#fff;box-shadow:0 0 5px #00000040}@media(min-width:992px){.steps-form-buttons[_ngcontent-%COMP%]{position:absolute;
1left:0;bottom:0;width:100%;display:flex;align-items:center;justify-content:space-between;box-shadow:none;padding:1.5rem 2.5rem 2.5rem}}.steps-form-buttons[_ngcontent-%COMP%] .step-form-btn[_ngcontent-%COMP%]{font-size:1rem;font-weight:600;padding:.625rem 1.5rem}@media(min-width:992px){.steps-form-buttons[_ngcontent-%COMP%] .step-form-btn[_ngcontent-%COMP%]{width:max-content;padding:.625rem 3.125rem}}.steps-form-buttons[_ngcontent-%COMP%] .back-btn[_ngcontent-%COMP%]{background-color:#f4f5f9}.steps-form-buttons[_ngcontent-%COMP%] .calculate-btn[_ngcontent-%COMP%], .steps-form-buttons[_ngcontent-%COMP%] .continue-btn[_ngcontent-%COMP%]{background-color:#009000;box-shadow:0 2px 8px #1bad4e4d}"],changeDetection:1})}}return t})();export{Wi as ZakatCalulatorComponent};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.