PageSourceSearch

https://static3.industrybuying.com/wakanda-turbo/assets/RELEASE-v1.255/static/browser/chunk-SWNH4VZM.js

js industrybuying.com collected 2026-09-24 09:38:35 UTC 87,972 bytes, 321 lines download raw bytes

1import{a as fe,b as ge,c as he,e as xe,f as Ot}from"./chunk-PJKHS7GF.js";import{a as _e}from"./chunk-VPXP2N2Q.js";import{a as pe,c as jt}from"./chunk-D76S5ZBH.js";import{a as R,b as Q,c as u,d as qt}from"./chunk-GUCY2OMR.js";import{a as K}from"./chunk-HB6SYD54.js";import{a as O}from"./chunk-2ZOJC5WM.js";import{a as ce,b as Bt}from"./chunk-3UHGRSHT.js";import{a as Mt,b as At}from"./chunk-TUDKQ5TI.js";import{a as ae,b as yt,c as Tt,d as re,e as ue,h as Nt,k as St,l as de,n as me}from"./chunk-N6AQUS3M.js";import"./chunk-D3AHYJ6R.js";import"./chunk-3WPD27XP.js";import"./chunk-KIMPBFEX.js";import{b as ne,c as gt}from"./chunk-VOUUGCHV.js";import{a as se,b as le}from"./chunk-OMGV3AKY.js";import"./chunk-ARZQXDGV.js";import"./chunk-WPY2545V.js";import"./chunk-M5NGUG44.js";import"./chunk-WXUZ4MJ3.js";import{B as Et,D as Ft,c as ht,e as y,h as xt,i as bt,n as Ct,p as oe,s as vt,t as It}from"./chunk-V4RBVOVY.js";import"./chunk-UYBHSWMX.js";import{g as D}from"./chunk-ERNBO6RL.js";import{g as M,z as q}from"./chunk-HVHJBPYH.js";import{b as ie}from"./chunk-HGDZ6AMD.js";import"./chunk-LSBESHNF.js";import"./chunk-BVHX55FD.js";import"./chunk-XKES3XAV.js";import{U as mt,X as ct,Y as pt,da as _t,fa as ft,ua as j}from"./chunk-MI6MLOSR.js";import{$b as at,Ac as S,Bc as C,Cc as rt,Jc as Yt,Mb as nt,Nb as E,Nc as ut,Ob as F,Oc as dt,Pb as Jt,Qb as Zt,Rb as st,Sb as lt,Ta as Xt,Tb as f,Tc as tt,Ub as d,Uc as et,V as Wt,Vb as m,Wb as A,Xb as w,Yb as k,Zb as te,_a as a,_b as ot,bc as N,cc as Ut,da as v,dd as ee,ea as I,f as Ht,fa as Kt,hb as L,ic as B,jc as $t,kc as r,n as zt,ob as G,oc as X,pa as h,pc as J,qc as Z,tb as U,ub as x,uc as $,v as Qt,vc as z,xc as P,yc as Y,zc as s}from"./chunk-EOSBAT63.js";import"./chunk-UGY2Q5IC.js";import{a as b,b as V}from"./chunk-ZGVHDELW.js";var it=(function(l){return l.RADIO="radio",l.TEXT="text",l.DROPDOWN="dropdown",l.PASSWORD="password",l.EMAIL="email",l.NUMBER="number",l.FILE="file",l.CHECKBOX="checkbox",l.CARD_RADIO_BUTTON="card_radio_button",l.SELECT="select",l})(it||{});var Rt=(()=>{class l{constructor(){this.timers=new Map,this.timerSubscriptions=new Map}startTimer(t,e){if(this.timers.has(t))this.timers.get(t)?.next(e);else{let i=new Ht(e);this.timers.set(t,i);let n=Qt(0,1e3).pipe(zt(o=>e-o)).subscribe({next:o=>{o<=0?(i.next(0),this.timerSubscriptions.has(t)&&(this.timerSubscriptions.get(t).unsubscribe(),this.timerSubscriptions.delete(t)),this.timers.delete(t)):i.next(o)}});this.timerSubscriptions.set(t,n)}}resetTimer(t,e){this.stopTimer(t),this.startTimer(t,e)}stopTimer(t){this.timerSubscriptions.has(t)&&(this.timerSubscriptions.get(t).unsubscribe(),this.timerSubscriptions.delete(t)),this.timers.has(t)&&this.timers.delete(t)}getTimerObservable(t){return this.timers.get(t)?.asObservable()}static{this.\u0275fac=function(e){return new(e||l)}}static{this.\u0275prov=Wt({token:l,factory:l.\u0275fac,providedIn:"root"})}}return l})();var H=class{constructor(c){this.type=c}},W=class extends H{constructor(c,t){super(c),this.gstNumber=t}},Dt=class extends H{constructor(c,t){super(c),this.panNumber=t}},wt=class extends H{constructor(c,t){super(c),this.companyName=t}},kt=class extends H{constructor(c,t){super(c),this.cin={companyCin:t}}},Pt=class extends H{constructor(c,t){super(c),this.msme={udyamRegistrationNumber:t}}},Lt=class extends H{constructor(c,t){super(c),this.fssai={fssaiNumber:t}}};var Ne=["business_registration_stepper"],Se=l=>({"form-field-disabled":l}),Me=()=>({borderColor:"#494949"});function Ae(l,c){if(l&1){let t=N();s(0,`
2        `),d(1,"div",9),B("click",function(){v(t);let i=r().index,n=r();return I(n.updateStepIndex(i))}),s(2),m(),s(3,`
3      `)}if(l&2){let t=r().$implicit;a(2),C(`
4          `,t==null?null:t.label,`
5        `)}}function Be(l,c){if(l&1&&(s(0,`
6        `),A(1,"div",10),tt(2,"safeHtml"),s(3,`
7      `)),l&2){let t=r().$implicit;a(),f("innerHTML",et(2,1,t==null?null:t.businessInfoMessage),Xt)}}function Oe(l,c){l&1&&(d(0,"div",27),s(1,`
8                  `),A(2,"img",28),s(3,`
9                `),m())}function Ve(l,c){if(l&1&&(s(0,`
10                    `),d(1,"span"),s(2),m(),s(3,`
11                  `)),l&2){let t,e=r(4).$implicit,i=r(2);a(2),S((t=i.errorMessage())==null||t[e==null?null:e.name]==null?null:t[e==null?null:e.name].text)}}function Re(l,c){if(l&1&&(s(0,`
12                    `),d(1,"span"),s(2),m(),s(3,`
13                  `)),l&2){let t=r(4).$implicit;a(2),S(t==null||t.validation==null||t.validation.errorMessages==null?null:t.validation.errorMessages.required)}}function De(l,c){if(l&1&&(s(0,`
14                    `),d(1,"span"),s(2),m(),s(3,`
15                  `)),l&2){let t=r(4).$implicit;a(2),S(t==null||t.validation==null||t.validation.errorMessages==null?null:t.validation.errorMessages.minlength)}}function we(l,c){if(l&1&&(s(0,`
16                    `),d(1,"span"),s(2),m(),s(3,`
17                  `)),l&2){let t=r(4).$implicit;a(2),S(t==null||t.validation==null||t.validation.errorMessages==null?null:t.validation.errorMessages.pattern)}}function ke(l,c){if(l&1&&(d(0,"mat-error"),s(1,`
18                  `),E(2,Ve,4,1)(3,Re,4,1)(4,De,4,1)(5,we,4,1),m()),l&2){let t,e=r(3).$implicit,i=r(2);a(2),F((t=i.businessRegistrationForm.get(e==null?null:e.name))!=null&&t.errors.customError&&((t=i.errorMessage())==null||t[e==null?null:e.name]==null?null:t[e==null?null:e.name].type)===i.MessageType.ER
18ROR?2:i.businessRegistrationForm.get(e.name).hasError("required")?3:i.businessRegistrationForm.get(e.name).hasError("minlength")&&(!(e==null||e.validation==null||e.validation.errorMessages==null)&&e.validation.errorMessages.minlength)?4:i.businessRegistrationForm.get(e.name).hasError("pattern")?5:-1)}}function Pe(l,c){if(l&1){let t=N();d(0,"mat-form-field",22),s(1,`
19                `),d(2,"mat-label",23),s(3),m(),s(4,`
20                `),d(5,"input",24),B("input",function(i){v(t);let n=r(2).$implicit,o=r(2);return I(o.checkAndTransformInput(i,n))})("click",function(i){v(t);let n=r(2).$implicit,o=r(2);return I(o.handleEvent(i,n,n.actions==null||n.actions.event==null||n.actions.event.onClick==null?null:n.actions.event.onClick.functionName,n.actions==null||n.actions.event==null||n.actions.event.onClick==null?null:n.actions.event.onClick.params))})("blur",function(i){v(t);let n=r(2).$implicit,o=r(2);return I(o.handleEvent(i,n,n.actions==null||n.actions.event==null||n.actions.event.onBlur==null?null:n.actions.event.onBlur.functionName,n.actions==null||n.actions.event==null||n.actions.event.onBlur==null?null:n.actions.event.onBlur.params))})("keypress",function(i){v(t);let n=r(2).$implicit,o=r(2);return I(o.handleInput(i,n))}),m(),s(6,`
21                `),x(7,Oe,4,0,"div",25),s(8,`
22
23                `),x(9,ke,6,1,"mat-error",26),s(10,`
24              `),m()}if(l&2){let t,e,i=r(2).$implicit,n=r(2);f("ngClass",dt(13,Se,i==null?null:i.isDisable)),a(3),S((t=n.placeHolder())==null?null:t[i==null?null:i.name]),a(2),f("disabled",i==null?null:i.isDisable)("readonly",i==null?null:i.isDisable)("id",i==null?null:i.name)("formControlName",i==null?null:i.name)("placeholder",(e=n.placeHolder())==null?null:e[i==null?null:i.name])("type",i==null?null:i.type)("ngStyle",ut(15,Me)),nt("minlength",i==null?null:i.minlength)("maxlength",i==null?null:i.maxlength),a(2),f("ngIf",i==null?null:i.isVerified),a(2),f("ngIf",n.businessRegistrationForm.get(i.name).touched&&n.businessRegistrationForm.get(i.name).errors)}}function Le(l,c){if(l&1){let t=N();d(0,"div",29),s(1,`
25              `),d(2,"div",30),B("click",function(i){let n;v(t);let o=r(2).$implicit,p=r(2);return I((n=p.isDisable())!=null&&n.leftCTA?i.preventDefault():p.onActionCall(o==null||o.actions==null||o.actions.leftRightCTA==null||o.actions.leftRightCTA.leftCTA==null||o.actions.leftRightCTA.leftCTA.action==null?null:o.actions.leftRightCTA.leftCTA.action.type))}),s(3),m(),s(4,`
26              `),d(5,"div",31),B("click",function(i){let n;v(t);let o=r(2).$implicit,p=r(2);return I(!((n=p.isDisable())==null||n[o==null?null:o.name]==null)&&n[o==null?null:o.name].rightCTA?i.preventDefault():p.onActionCall(o==null||o.actions==null||o.actions.leftRightCTA==null||o.actions.leftRightCTA.rightCTA==null||o.actions.leftRightCTA.rightCTA.action==null?null:o.actions.leftRightCTA.rightCTA.action.type))}),s(6),m(),s(7,`
27            `),m()}if(l&2){let t,e,i,n,o,p,g=r(2).$implicit,T=r(2);a(2),z("pointer-events",(t=T.isDisable())!=null&&t.leftCTA?"none":"auto")("cursor",(e=T.isDisable())!=null&&e.leftCTA?"not-allowed":"pointer")("color",(i=T.isDisable())!=null&&i.leftCTA?"#bbb":"inherit"),a(),C(`
28                `,g==null||g.actions==null||g.actions.leftRightCTA==null||g.actions.leftRightCTA.leftCTA==null?null:g.actions.leftRightCTA.leftCTA.title,`
29              `),a(2),z("pointer-events",!((n=T.isDisable())==null||n[g==null?null:g.name]==null)&&n[g==null?null:g.name].rightCTA?"none":"auto")("cursor",!((o=T.isDisable())==null||o[g==null?null:g.name]==null)&&o[g==null?null:g.name].rightCTA?"not-allowed":"pointer")("color",!((p=T.isDisable())==null||p[g==null?null:g.name]==null)&&p[g==null?null:g.name].rightCTA?"#ffa37a":"inherit"),a(),C(`
30                `,g==null||g.actions==null||g.actions.leftRightCTA==null||g.actions.leftRightCTA.rightCTA==null?null:g.actions.leftRightCTA.rightCTA.title,`
31              `)}}function Ge(l,c){if(l&1&&(d(0,"div",32),s(1),m()),l&2){let t=r(2).$implicit;a(),C(`
32                `,t==null||t.actions==null||t.actions.messages==null?null:t.actions.messages.text,`
33              `)}}function Ue(l,c){if(l&1&&(d(0,"div",33),s(1),m()),l&2){let t,e=r(2).$implicit,i=r(2);a(),C(`
34                `,(t=i.errorMessage())==null||t[e==null?null:e.name]==null?null:t[e==null?null:e.name].text,`
35              `)}}function $e(l,c){if(l&1&&(d(0,"p"),s(1),m()),l&2){let t=c.ngIf,e=r(3).$implicit,i=r(2);a(),rt(`
36                `,t," ",i.getTimerMessage(e.name),`
37              `)}}function Ye(l,c){if(l&1&&(d(0,"div",34),s(1,`
38              `),x(2,$e,2,2,"p",26),tt(3,"async"),s(4,`
39            `),m()),l&2){let t=r(2).$implicit,e=r(2);a(2),f("ngIf",et(3,1,e.getTimerObservable(t)))}}function je(l,c){if(l&1&&(d(0,"div",14),s(1,`
40            `),d(2,"div",15),s(3,`
41              `),x(4,Pe,11,16,"mat-form-field",16),s(5,`
42            `),m(),s(6,`
43
44            `),x(7,Le,8,14,"div",17),s(8,`
45
46            `),d(9,"div",18),s(10,`
47              `),x(11,Ge,2,1,"div",19),s(12,`
48              `),x(13,Ue,2,1,"div",20),s(14,`
49            `),m(),s(15,`
50            `),x(16,Ye,5,3,"div",21),s(17,`
51          `),m()),l&2){let t,e=r().$implicit,i=r(2);P(e.style),a(4),f("ngIf",!i.isFieldHidden(e==null?null:e.name)),a(3),f("ngIf",e==null||e.actions==null?null:e.actions.leftRightCTA),a(4),f("ngIf",!i.businessRegistrationForm.get(e==null?null:e.name).touched&&!i.businessRegistrationForm.get(e==null?null:e.name).errors&&(e==null||e.actions==null||e.actions.messages==null?null:e.actions.messages.type)===i.MessageType.SUCCESS),a(2),f("ngIf",!i.businessRegistrationForm.get(e==null?null:e.name).touched&&!i.businessRegistrationForm.get(e==null?null:e.name).errors&&((t=i.errorMessage())==null||t[e==null?null:e.name]==null?null:t[e==null?null:e.name].type)===i.MessageType.ER
51ROR||((t=i.errorMessage())==null||t[e==null?null:e.name]==null?null:t[e==null?null:e.name].type)===i.MessageType.INFO),a(3),f("ngIf",e.isTimer)}}function qe(l,c){if(l&1&&(d(0,"mat-option",38),s(1),m()),l&2){let t=c.$implicit;f("value",t.value),a(),C(`
52                  `,t.label,`
53                `)}}function He(l,c){if(l&1&&(d(0,"mat-error"),s(1),m()),l&2){let t=r(2).$implicit;a(),C(`
54                `,t==null||t.validation==null||t.validation.errorMessages==null?null:t.validation.errorMessages.required,`
55              `)}}function ze(l,c){if(l&1&&(d(0,"div",32),s(1),m()),l&2){let t=r(2).$implicit;a(),C(`
56                `,t==null||t.actions==null||t.actions.messages==null?null:t.actions.messages.text,`
57              `)}}function Qe(l,c){if(l&1&&(d(0,"div",33),s(1),m()),l&2){let t,e=r(2).$implicit,i=r(2);a(),C(`
58                `,(t=i.errorMessage())==null||t[e==null?null:e.name]==null?null:t[e==null?null:e.name].text,`
59              `)}}function We(l,c){if(l&1){let t=N();d(0,"div",14),s(1,`
60            `),d(2,"mat-form-field",35),s(3,`
61              `),d(4,"mat-label",23),s(5),m(),s(6,`
62              `),d(7,"mat-select",36),B("selectionChange",function(i){v(t);let n=r().$implicit,o=r(2);return I(o.handleEvent(i,n,n.actions==null||n.actions.event==null||n.actions.event.onChange==null?null:n.actions.event.onChange.functionName,n.actions==null||n.actions.event==null||n.actions.event.onChange==null?null:n.actions.event.onChange.params))}),s(8,`
63                `),x(9,qe,2,2,"mat-option",37),s(10,`
64              `),m(),s(11,`
65              `),x(12,He,2,1,"mat-error",26),s(13,`
66            `),m(),s(14,`
67
68            `),s(15,`
69            `),d(16,"div",18),s(17,`
70              `),x(18,ze,2,1,"div",19),s(19,`
71
72              `),x(20,Qe,2,1,"div",20),s(21,`
73            `),m(),s(22,`
74          `),m()}if(l&2){let t,e=r().$implicit,i=r(2);a(5),S(e.placeholder),a(2),f("id",e.name)("formControlName",e.name),a(2),f("ngForOf",e.options),a(3),f("ngIf",i.businessRegistrationForm.get(e.name).touched&&i.businessRegistrationForm.get(e.name).hasError("required")),a(6),f("ngIf",(e==null?null:e.name)&&!i.businessRegistrationForm.get(e==null?null:e.name).errors&&(e==null||e.actions==null||e.actions.messages==null?null:e.actions.messages.type)===i.MessageType.SUCCESS),a(2),f("ngIf",!i.businessRegistrationForm.get(e==null?null:e.name).touched&&!i.businessRegistrationForm.get(e==null?null:e.name).errors&&((t=i.errorMessage())==null||t[e==null?null:e.name]==null?null:t[e==null?null:e.name].type)===i.MessageType.ERROR)}}function Ke(l,c){if(l&1&&(d(0,"div",33),s(1),m()),l&2){let t=r(2).$implicit;a(),C(`
75              `,t==null||t.validation==null||t.validation.errorMessages==null?null:t.validation.errorMessages.required,`
76            `)}}function Xe(l,c){if(l&1&&(d(0,"div",33),s(1),m()),l&2){let t,e=r(2).$implicit,i=r(2);a(),C(`
77              `,(t=i.errorMessage())==null||t[e==null?null:e.name]==null?null:t[e==null?null:e.name].text,`
78            `)}}function Je(l,c){if(l&1){let t=N();d(0,"div",14),s(1,`
79            `),d(2,"media-uploader",39),B("onUpload",function(i){v(t);let n=r(3);return I(n.onUpload(i))}),m(),s(3,`
80            `),x(4,Ke,2,1,"div",20),s(5,`
81            `),x(6,Xe,2,1,"div",20),s(7,`
82          `),m()}if(l&2){let t,e=r().$implicit,i=r(2);a(2),f("data",e==null?null:e.fileUpload)("required",e==null?null:e.required)("fileId",e==null?null:e.name)("hideMediaUploader",i.hideMediaUploader()),a(2),f("ngIf",i.businessRegistrationForm.get(e==null?null:e.name).touched&&i.businessRegistrationForm.get(e.name).hasError("required")),a(2),f("ngIf",!i.businessRegistrationForm.get(e==null?null:e.name).touched&&!i.businessRegistrationForm.get(e==null?null:e.name).errors&&((t=i.errorMessage())==null||t[e==null?null:e.name]==null?null:t[e==null?null:e.name].type)===i.MessageType.ERROR)}}function Ze(l,c){if(l&1&&s(0),l&2){let t=r(5);C(`
83                      Select `,t.businessIdentificationValue,`
84                    `)}}function ti(l,c){if(l&1&&s(0),l&2){let t=r(5);C(`
85                      `,t.gstListInfo.title,`
86                    `)}}
86function ei(l,c){if(l&1&&(s(0,`
87                    `),d(1,"div",46),s(2,`
88                      `),A(3,"img",47),d(4,"span"),s(5),m(),s(6,`
89                    `),m(),s(7,`
90                  `)),l&2){let t=r(5);a(5),S(t.gstListInfo==null||t.gstListInfo.button==null?null:t.gstListInfo.button.verifiedText)}}function ii(l,c){if(l&1&&(d(0,"div",33),s(1),m()),l&2){let t,e=r(5);a(),C(`
91                  `,(t=e.errorMessage())==null||t.gstin==null?null:t.gstin.text,`
92                `)}}function ni(l,c){if(l&1){let t=N();s(0,`
93                    `),d(1,"label"),s(2,`
94                      `),d(3,"input",48),B("click",function(){let i=v(t).$implicit,n=r(5);return I(n.getGstInByPanValue(i.value))}),m(),s(4,`
95                      `),d(5,"div",49),s(6),m(),s(7,`
96                    `),m(),s(8,`
97                  `)}if(l&2){let t=c.$implicit,e=r(5);a(3),f("value",Yt(t.value))("formControlName",e.inputName.GSTIN),a(3),C(`
98                        `,t.value,`
99                      `)}}function si(l,c){if(l&1&&(d(0,"div",41),s(1,`
100              `),d(2,"div",42),s(3,`
101                `),d(4,"div",43),s(5,`
102                  `),d(6,"div",44),s(7,`
103                    `),E(8,Ze,1,1)(9,ti,1,1),m(),s(10,`
104                  `),E(11,ei,8,1),m(),s(12,`
105
106                `),x(13,ii,2,1,"div",20),s(14,`
107                `),d(15,"div",45),s(16,`
108                  `),st(17,ni,9,4,null,null,Zt),m(),s(19,`
109              `),m(),s(20,`
110            `),m()),l&2){let t,e=r(4);a(8),F(e.businessIdentification===e.VerificationTypeEnum.COMPANY_NAME?8:9),a(3),F(e.gstInByPan()&&e.showBillingAddress()?11:-1),a(2),f("ngIf",!e.businessRegistrationForm.get("gstin").touched&&((t=e.errorMessage())==null||t.gstin==null?null:t.gstin.type)===e.MessageType.ERROR),a(4),lt(e.gstOptions())}}function li(l,c){if(l&1&&(s(0,`
111            `),x(1,si,21,3,"div",40),s(2,`
112          `)),l&2){let t=r().$implicit,e=r(2);a(),f("ngIf",t.type===e.inputTypeEnum.RADIO&&(t==null?null:t.name)==="gstinList")}}function oi(l,c){l&1&&s(0,`
113                      * (Please enter the Billing address)
114                    `)}
114function ai(l,c){if(l&1){let t=N();d(0,"div",51),s(1,`
115              `),d(2,"div",52),s(3,`
116                `),d(4,"div",53),s(5),d(6,"label",54),s(7,`
117                    `),E(8,oi,1,0),m(),s(9,`
118                `),m(),s(10,`
119                `),d(11,"button",55),B("click",function(){v(t);let i=r(4);return I(i.editBillingAddress(i.billingAddressLayoutData==null||i.billingAddressLayoutData.action==null?null:i.billingAddressLayoutData.action.type))}),s(12,`
120                  Edit
121                `),m(),s(13,`
122              `),m(),s(14,`
123              `),d(15,"div",56),s(16,`
124                `),d(17,"div",57),s(18,`
125                  `),d(19,"div",58),s(20,`
126                    `),d(21,"div",59),s(22,`
127                      `),d(23,"span",60),s(24,"Name:"),m(),s(25," "),A(26,"br"),s(27),m(),s(28,`
128                    `),d(29,"div",61),s(30,`
129                      `),d(31,"span",60),s(32,"Mobile:"),m(),s(33," "),A(34,"br"),s(35),m(),s(36,`
130                  `),m(),s(37,`
131                  `),d(38,"div",62),s(39,`
132                    `),d(40,"span",60),s(41," Address:"),m(),s(42," "),A(43,"br"),s(44),m(),s(45,`
133                `),m(),s(46,`
134              `),m(),s(47,`
135            `),m()}if(l&2){let t,e,i,n=r(2).$implicit,o=r(2);a(5),C(`
136                  `,o.billingAddressLayoutData==null?null:o.billingAddressLayoutData.title,`
137                  `),a(),f("for",Yt(n==null?null:n.name)),a(2),F(n!=null&&n.required?8:-1),a(19),C(`
138                      `,(o.data==null||o.data.addressBook==null?null:o.data.addressBook.first_name)??((t=o.billingAddressObj())==null?null:t.name),`
139                    `),a(8),C(`
140                      `,(o.data==null||o.data.addressBook==null?null:o.data.addressBook.phone)??((e=o.billingAddressObj())==null?null:e.phone),`
141                    `),a(9),C(`
142                    `,o.billingAddress??((i=o.billingAddressObj())==null?null:i.address),`
143                  `)}}function ri(l,c){if(l&1&&(s(0,`
144            `),x(1,ai,48,7,"div",50),s(2,`
145          `)),l&2){let t=r().$implicit,e=r(2);a(),f("ngIf",(t==null?null:t.name)===e.inputName.BILLING_ADDRESS_LAYOUT)}}function ui(l,c){if(l&1&&(d(0,"label",67),s(1,`
146                `),A(2,"input",68),s(3,`
147                `),d(4,"span",69),s(5),m(),s(6,`
148              `),m()),l&2){let t=c.$implicit,e=r(2).$implicit;a(2),f("id",e.name+"_"+t.value)("formControlName",e.name)("value",t.value),a(3),C(`
149                  `,t.label,`
150                `)}}
150function di(l,c){if(l&1&&(d(0,"div",42),s(1,`
151            `),d(2,"div",63),s(3),A(4,"i",64),s(5,`
152            `),m(),s(6,`
153            `),d(7,"div",65),s(8,`
154              `),x(9,ui,7,4,"label",66),s(10,`
155            `),m(),s(11,`
156          `),m()),l&2){let t=r().$implicit;a(3),C(`
157              `,t==null?null:t.placeholder,`
158              `),a(6),f("ngForOf",t.options)}}function mi(l,c){if(l&1&&(ot(0),s(1,`
159          `),s(2,`
160          `),x(3,je,18,7,"div",11),s(4,`
161          `),s(5,`
162          `),x(6,We,23,7,"div",12),s(7,`
163
164          `),s(8,`
165          `),x(9,Je,8,6,"div",12),s(10,`
166
167          `),s(11,`
168          `),E(12,li,3,1),E(13,ri,3,1),x(14,di,12,2,"div",13),s(15,`
169        `),at()),l&2){let t=c.$implicit,e=r(2);a(3),f("ngIf",t.type===e.inputTypeEnum.TEXT&&e.isFieldEnabled(t)),a(3),f("ngIf",t.type===e.inputTypeEnum.SELECT),a(3),f("ngIf",t.type===e.inputTypeEnum.FILE&&e.isFieldEnabled(t)),a(3),F(e.showGSTList()?12:-1),a(),F(e.showBillingAddress()&&e.billingAddressObj()?13:-1),a(),f("ngIf",(t==null?null:t.name)===e.inputName.IB_CREDIT&&e.isFieldEnabled(t))}}function ci(l,c){l&1&&(d(0,"div",71),s(1,`
170            `),d(2,"button",72),s(3,`
171              Back
172            `),m(),s(4,`
173          `),m())}function pi(l,c){if(l&1){let t=N();s(0,`
174              `),s(1,`
175              `),d(2,"button",73),B("click",function(){v(t);let i=r(2),n=i.$implicit,o=i.index,p=r(),g=$(2);return I(!(n==null||n.button==null||n.button.action==null)&&n.button.action.triggerExtraStandardEvents?p.handleEvent(g,null,n==null||n.button==null||n.button.action==null?null:n.button.action.triggerExtraStandardEvents,null):p.onActionCall(n==null||n.button==null||n.button.action==null?null:n.button.action.type,o))}),s(3),m(),s(4,`
176            `)}if(l&2){let t=r(2).$implicit,e=r();a(2),f("matTooltip",e.disableSubmitButton()&&(!(e.handleInfoMessages==null||e.handleInfoMessages[0]==null)&&e.handleInfoMessages[0][e.selectedBusinessIdentificationValue()])&&e.updateDetails?"Please select valid Business Identification":"")("disabled",e.disableSubmitButton()),a(),C(`
177                `,t==null||t.button==null?null:t.button.text,`
178              `)}}function _i(l,c){l&1&&s(0,`
179                  fetching...
180                `)}function fi(l,c){if(l&1&&s(0),l&2){let t=r(4);C(`
181                  `,t.showVerificationAction().text,`
182                `)}}function gi(l,c){if(l&1){let t=N();s(0,`
183              `),s(1,`
184              `),d(2,"button",74),B("click",function(){let i;v(t);let n=r(3),o=$(2);return I(n.showLoader()?null:n.handleEvent(o,null,(i=n.showVerificationAction())==null||i.action==null?null:i.action.triggerExtraStandardEvents,null))}),s(3,`
185                `),E(4,_i,1,0)(5,fi,1,1),m(),s(6,`
186            `)}if(l&2){let t=r(3);a(2),f("disabled",t.disableSubmitButton()||t.showLoader()),a(2),F(t.showLoader()?4:5)}}function hi(l,c){if(l&1&&(s(0,`
187          `),x(1,ci,5,0,"div",70),s(2,`
188
189          `),d(3,"div",71),s(4,`
190            `),s(5,`
191            `),E(6,pi,5,3)(7,gi,7,2),m(),s(8,`
192        `)),l&2){let t=r(2);a(),f("ngIf",!t.updateDetails),a(5),F(t.StringUtils.isEmpty(t.showVerificationAction())?6:7)}}function xi(l,c){if(l&1){let t=N();s(0,`
193          `),s(1,`
194          `),d(2,"button",75),B("click",function(){v(t);let i=r(),n=i.$implicit,o=i.index,p=r(),g=$(2);return I(!(n==null||n.button==null||n.button.action==null)&&n.button.action.triggerExtraStandardEvents?p.handleEvent(g,null,n==null||n.button==null||n.button.action==null?null:n.button.action.triggerExtraStandardEvents,null):p.onActionCall(n==null||n.button==null||n.button.action==null?null:n.button.action.type,o))}),s(3),m(),s(4,`
195        `)}if(l&2){let t=r().$implicit,e=r();a(2),f("disabled",e.formDisabled()),a(),C(`
196            `,t==null||t.button==null?null:t.button.text,`
197          `)}}function bi(l,c){if(l&1&&(d(0,"mat-step",3),s(1,`
198    `),d(2,"form",4),s(3,`
199      `),x(4,Ae,4,1,"ng-template",5),s(5,`
200      `),E(6,Be,4,3),d(7,"div",6),s(8,`
201        `),x(9,mi,16,6,"ng-container",7),s(10,`
202      `),m(),s(11,`
203      `),d(12,"div",8),s(13,`
204        `),E(14,hi,9,2)(15,xi,5,2),m(),s(16,`
205    `),m(),s(17,`
206  `),m()),l&2){let t=c.$implicit,e=c.index,i=r();f("stepControl",i.businessRegistrationForm),a(2),f("formGroup",i.businessRegistrationForm),a(4),F(!(i.handleInfoMessages==null||i.handleInfoMessages[0]==null)&&i.handleInfoMessages[0][i.selectedBusinessIdentificationValue()]&&(t!=null&&t.businessInfoMessage)?6:-1),a(3),f("ngForOf",t==null?null:t.fields),a(5),F(e>0?14:15)}}var Ce=(()=>{class l extends q{constructor(t,e){super(),this.fb=t,this.timerService=e,this.businessFormConfig=h(null,{}),this.inputTypeEnum=it,this.businessIdentificationVerified=h(!1,{}),this.formDisabled=h(!0,{}),this.verifyDisabled=h(!0,{}),this.billingAddressObj=h({},{}),this.gstOptions=h([],{}),this.showGSTList=h(!1,{}),this.gstInByPan=h(null,{}),this.showBillingAddress=h(!1,{}),this.customErrors=h({},{}),this.MessageType=R,this.isButtonDisabled=!1,this.isDisable=h({},{}),this.disableTill=0,this.disableMessage=null,this.timerFor=null,this.validationRules=[],this.placeHolder=h({},{}),this.mobileNoVerified=h(!1,{}),this.isEmailExist=h(null,{}),this.handleBillingAddress=[],this.inputName=u,this.errorMessage=h({},{}),this.dataFromAction=h(!1,{}),this.businessFormFeilds=h([],{}),this.verificationAction=[],this.showVerificationAction=h({},{}
206),this.StringUtils=M,this.BusinessRegistrationFunctionName=qt,this.isLinear=!0,this.showLoader=h(!1,{}),this.hideMediaUploader=h(!1,{}),this.VerificationTypeEnum=O,this.selectedStepIndex=h(0,{}),this.disableSubmitButton=h(!1,{}),this.handleInfoMessages=[],this.selectedBusinessIdentificationValue=h(null,{}),this.trackingAction={},this.documentRequired=[Q.FACTORY_LICENCE,Q.LICENSE_REGISTRATION_CERTIFICATE_SHOPS_ACT,Q.LOCAL_GOVT_PERMITS_HAWKERS_LICENSE,Q.PARTNERSHIP_FIRM_AGREEMENT]}ngOnInit(){this.data=this.slot.widget.data,this.data.payload=this.data?.formData?.payload,this.data.messages=this.data?.formData?.messages,this.businessFormConfig.set(this.data?.renderableComponents[0]?.businessForm?.stepper),this.formBottomData=this.data?.renderableComponents[0]?.component?.bottomSection,this.gstListInfo=this.data?.renderableComponents[0]?.component?.gstInList,this.billingAddressLayoutData=this.data?.renderableComponents[0]?.component?.billingAddress,this.updateDetails=this.data?.formData?.isLoggedIn,this.getFormFields(),this.createForm(),this.addConditionalLogic(),this.data?.payload&&(this.dataFromAction.set(!0),this.patchFormData(this.data?.payload),this.initializeTimers(),this.showErrorOnLoad(this.data?.messages),this.goToNextStep()),this.subscribeToFirstStepValidation()}deleteDocumentFile(){this.mediaUploaderComponent&&this.mediaUploaderComponent.deleteFile()}getFormFields(){this.businessFormConfig().forEach(t=>{t?.fields.forEach(e=>{M.isEmpty(e)||this.businessFormFeilds().push(e)})})}createForm(){let t={};this.businessFormFeilds().forEach(e=>{let i=[];if(e?.name===u.BUSINESS_IDENTIFICATION&&e?.options.forEach(n=>{this.validationRules.push({[n?.value]:n?.validation}),this.handleBillingAddress.push({[n?.value]:n?.billingAddress}),this.verificationAction.push({[n?.value]:n?.action}),n?.action?.action?.tracking&&(this.trackingAction[n?.value]=n?.action?.action?.tracking),n?.showInfoMessage&&this.handleInfoMessages.push({[n?.value]:n?.showInfoMessage})}),e?.required&&i.push(y.required),e?.minlength&&i.push(y.minLength(e?.minlength)),e?.pattern&&i.push(y.pattern(e?.pattern)),e?.customValidationFunction){let n=this[e.customValidationFunction]?.();n&&i.push(n)}this.placeHolder.set(V(b({},this.placeHolder()),{[e?.name]:e?.placeholder})),t[e?.name]=[e?.defaultValue||"",i]}),this.businessRegistrationForm=this.fb.group(t)}getIndividualField(t){return this.businessFormFeilds().find(e=>e.name===t)}evaluateCondition(t,e,i){if(i?.value&&Array.isArray(i?.value))switch(t){case"equals":return i.value.includes(e);case"notEquals":return!i.value.includes(e);default:return!1}}isFieldEnabled(t){if(!t.condition)return!0;let e=this.getInputFieldValue(t?.condition?.field);return t?.condition?.disableValues?t.isDisable=t?.condition?.disableValues.includes(e):t.isDisable=!1,this.evaluateCondition(t.condition.operator,e,t.condition)}getValidatorsForOption(t){this.setVerificationActionButton(),this.businessIdentification=O[t];let e=this.verificationIdentificationField,i=this.setValidationForVerificationOption(t,e),n=this.verifyIdentification;n&&(n.setValidators(i),n.updateValueAndValidity())}getFormData(){return this.businessRegistrationForm.value}getInputFieldValue(t){return this.businessRegistrationForm.get(t).value}patchFormData(t){if(typeof t=="object"&&t&&Object.keys(t).length>0){let e=t?.addressBook;if(this.businessRegistrationForm.patchValue({[u.FULL_NAME]:t?.fullName,[u.EMAIL_ID]:t?.emailId,[u.MOBILE_NO]:t?.mobileNo,[u.OTP]:t?.otp,[u.BUSINESS_IDENTIFICATION]:t?.businessIdentification??"",[u.VERIFY_IDENTIFICATION]:t?.verifyIdentification,[u.COMPANY_NAME]:t?.companyName,[u.GSTIN]:t?.gstin,[u.BUSINESS_DOCUMENT]:t?.businessDocument?[...this.businessRegistrationForm.value?.[u.BUSINESS_DOCUMENT],...t?.businessDocument]:null}),this.documentRequired.includes(t?.businessIdentification)&&this.disableSubmitButton.set(M.isEmpty(this.businessDocument.value)),this.isEmailExist.set(t?.isEmailExist),this.businessIdentification=t?.businessIdentification,this.mobileNoVerified.set(t.mobileNoVerified),this.businessIdentificationVerified.set(t?.businessIdentificationVerified),this.gstInByPan.set(t?.gstin),e?.address&&(this.addressBilling=new _e(b({},e)),this.billingAddress=`${e?.address} ${e?.address2??""} ${e?.city} ${e?.state} ${e?.landmark??""} ${e?.pincode}`),t?.businessIdentificationVerified){let i=this.verificationAction.find(n=>t?.businessIdentification in n);this.showVerificationAction.set(i?.[t?.businessIdentification]),this.triggerEntityVerificationActionOnLoad(),t?.gstin&&this.verifyGstNo()}else Object.keys(t).forEach(i=>
206{let n=this.getIndividualField(i);n?.actions?.event?.onChange?.functionName&&this.handleEvent(t[i],n,n?.actions?.event?.onChange?.functionName,n?.actions?.event?.onChange?.params)});this.isFirstStepIsValid()}}addConditionalLogic(){this.businessRegistrationForm.get(u.BUSINESS_IDENTIFICATION)?.valueChanges.subscribe(t=>{let e=this.getIndividualField(u.COMPANY_NAME),i=this.getIndividualField(u.BUSINESS_DOCUMENT);M.isEmpty(t)||(this.documentRequired.includes(t)?(this.businessDocument?.setValidators([y.required]),i.required=!0):(i.required=!1,this.businessDocument?.clearValidators()),t!==Q.OTHER?(this.companyName?.setValidators([y.required]),e.required=!0):(e.required=!1,this.companyName?.clearValidators()),this.companyName?.updateValueAndValidity(),this.businessDocument?.updateValueAndValidity())})}createSimulatedEvent(t,e){return{target:{name:t,value:e},value:e}}initializeTimers(){this.businessFormFeilds().forEach(t=>{let e=t?.actions?.leftRightCTA?.rightCTA?.timer;e&&(this.timerService.resetTimer(t.name,e.duration),this.subscribeToTimer(t))})}subscribeToTimer(t){let e=t.name;this.timerService.getTimerObservable(e)?.subscribe(n=>{this.updateCTAButtonState(e,n)})}updateCTAButtonState(t,e){this.isDisable.update(i=>V(b({},i),{[t]:{rightCTA:e>0}}))}getTimerObservable(t){let e=t?.name;return this.timerService.getTimerObservable(e)}getTimerMessage(t){return this.businessFormFeilds().find(i=>i.name===t)?.actions?.leftRightCTA?.rightCTA?.timer?.message||""}async _getBizRegFromData(){this.businessRegistrationForm.markAllAsTouched();let t=this.getInputFieldValue(u.BUSINESS_IDENTIFICATION),e;return t===O.GST?e=this.verifyIdentification.value:t===O.COMPANY_NAME?e=null:e=this.getInputFieldValue(u.GSTIN),{[u.FULL_NAME]:this.getInputFieldValue(u.FULL_NAME),[u.EMAIL_ID]:this.getInputFieldValue(u.EMAIL_ID),[u.MOBILE_NO]:this.getInputFieldValue(u.MOBILE_NO),businessIdentification:t,[u.VERIFY_IDENTIFICATION]:this.verifyIdentification?.value,[u.COMPANY_NAME]:this.companyName.value,[u.BUSINESS_DOCUMENT]:this.getInputFieldValue(u.BUSINESS_DOCUMENT),gstin:e,mobileNoVerified:this.mobileNoVerified(),businessIdentificationVerified:this.businessIdentificationVerified(),billingAddress:{name:this.billingAddressObj()?.name,address:this.billingAddressObj()?.address,address2:this.billingAddressObj()?.address2,state:this.billingAddressObj()?.state,city:this.billingAddressObj()?.city,landMark:this.billingAddressObj()?.landMark,pincode:this.billingAddressObj()?.pincode,phone:this.billingAddressObj()?.phone},addressBook:b({},this.addressBilling),isEmailExist:this.isEmailExist()}}onUpload(t){let e=this.getInputFieldValue(u.BUSINESS_DOCUMENT);e?.[0]?.url&&this.deleteFile(e?.[0]?.url),t.type===pe.IMAGE&&this.businessRegistrationForm.patchValue({[u.BUSINESS_DOCUMENT]:[t]}),this.hideMediaUploader.set(!1)}deleteFile(t){this.apiService.callFileDeleteApi({url:t}).subscribe({next:e=>{},error:()=>{}})}async editBillingAddress(t){this.onActionCall(t)}async getBusinessIndentificaiton(t){let e=t?.value?t?.value:t;this.selectedBusinessIdentificationValue.set(e),this.getValidatorsForOption(e);let n=this.getIndividualField(u.BUSINESS_IDENTIFICATION).options.find(o=>o.value===e);if(this.businessIdentificationValue=n?.label,this.resetBusinessFields(this.verificationIdentificationField),this.dataFromAction.set(!1),n){let o=this.getIndividualField(u.BILLING_ADDRESS_LAYOUT);this.showBillingAddress.set(n?.billingAddress?.show),o.required=n?.billingAddress?.required}this.deleteErrorMessage(u.VERIFY_IDENTIFICATION),this.businessRegistrationForm.patchValue({[u.VERIFY_IDENTIFICATION]:null}),this.markInputTouchState(u.VERIFY_IDENTIFICATION,!1),this.placeHolder.set(V(b({},this.placeHolder()),{[u.VERIFY_IDENTIFICATION]:M.format("Enter {0}",this.businessIdentificationValue)}))}isFieldHidden(t){let e=this.getIndividualField(t),i=this.getInputFieldValue(t);return t===u.COMPANY_NAME?e?.isDisable&&!i:!1}resetBusinessFields(t){if(this.dataFromAction()){this.dataFromAction.set(!1);return}let e=this.getInputFieldValue(u.BUSINESS_DOCUMENT);e?.[0]?.url&&(this.deleteFile(e?.[0]?.url),this.hideMediaUploader.set(!0)),this.deleteDocumentFile(),this.businessIdentificationVerified.set(!1),this.showBillingAddress.set(!1),this.businessRegistrationForm.patchValue({[u.COMPANY_NAME]:null,[u.GSTIN]:null,[u.BUSINESS_DOCUMENT]:null}),this.addressBilling=null,this.data&&(this.data.addressBook=null,this.data.billingAddress=null,M.isEmpty(this.data?.payload)||(this.data.payload.addressBook=null,this.data.payload.billingAddress=null)),this.verificationIdentificationField.isVerified=!1,this.updateFormField(this.verificationIdentificationField),this.markInputTouchState(u.COMPANY_NAME,!1),this.showGSTList.set(!1),this.showLoader.set(!1),this.billingAddressObj.set(null),this.gstInByPan.set(null),this.companyName.enable(),this.billingAddress=null}getGstInByPanValue(t){t!==this.gstInByPan()&&(M.isEmpty(t)||(this.setCustomError(u.GSTIN,!1),this.deleteErrorMessage(u.GSTIN)),this.showBillingAddress.set(!1),this.billingAddressObj.set(null),this.businessRegistrationForm.patchValue({[u.COMPANY_NAME]:null}),this.markInputTouchState(u.COMPANY_NAME,!1),this.businessIdentification===O.COMPANY_NAME?(this.showVerificationAction.set(null),this.businessRegistrationForm.patchValue({[u.COMPANY_NAME]:t})):this.showVerificationAction.set({text:this.gstListInfo?.button?.text,action:{triggerExtraStandardEvents:qt.VERIFY_GST_NO}}),this.gstInByPan.set(t),this.disableSubmitButton.set(!1))}confirmPageExit(t){t.preventDefault()}get companyName(){return this.businessRegistrationForm.get(u.COMPANY_NAME)}get verifyIdentification(){return this.businessRegistrationForm.get(u.VERIFY_IDENTIFICATION)}get businessDocument(){return this.businessRegistrationForm.get(u.BUSINESS_DOCUMENT)}get verificationIdentificationField(){return this.getIndividualField(u.VERIFY_IDENTIFICATION)}updateFormField(t){let e=this.businessFormFeilds(),i=e.findIndex(n=>n.name===t.name);if(i!==-1){let n=[...e.slice(0,i),t,...e.slice(i+1)];this.businessFormFeilds.set(n)}}async verifyGstNo(){if(this.formDisabled.set(!0),M.isEmpty(this.gstInByPan())){this.setCustomError(u.GSTIN,!0),this.errorMessage.set(V(b({},this.errorMessage()),{[u.GSTIN]:{text:"Please select GSTIN.",type:R.ERROR}}
206)),this.markInputTouchState(u.GSTIN,!1);return}M.isEmpty(this.gstInByPan())||await this.fetchGstDetailsByGstNo(new W(O.GST,this.gstInByPan()))}handleEvent(t,e,i,n){i&&typeof this[i]=="function"&&this[i](t,e,n)}validateVerificationInput(t,e,i){let n=t.target.value;this.verificationInputValue&&this.verificationInputValue!==n&&this.resetBusinessFields(e)}async verifyBusinessIdentification(t,e,i){let n=this.getFormData(),o=O[n?.[u.BUSINESS_IDENTIFICATION]],p=n?.[u.VERIFY_IDENTIFICATION];if(this.verificationInputValue=p,M.isEmpty(p)){this.setCustomError(u.VERIFY_IDENTIFICATION,!0),this.markInputTouchState(u.VERIFY_IDENTIFICATION,!0);return}this.isInputInvalid(u.VERIFY_IDENTIFICATION)||(o===O.GST&&await this.fetchGstDetailsByGstNo(new W(o,p),e),o===O.PAN&&await this.fetchGstListByPanOrCompanyName(new Dt(o,p),e),o===O.COMPANY_NAME&&await this.fetchGstListByPanOrCompanyName(new wt(o,p),e),o===O.CIN&&this.fetchEntityDetails(new kt(o,p),e),o===O.MSME&&this.fetchEntityDetails(new Pt(o,p),e),o===O.FSSAI&&this.fetchEntityDetails(new Lt(o,p),e))}verifyEmail(t,e,i){let n=t?.target?.value??i?.email;this.data?.emailId!=n&&M.isValidEmail(n)&&this.onActionCall(i?.actionType)}async onActionCall(t,e){if([D.VERIFY_USER,D.VERIFY_OTP,D.RESEND_OTP].includes(t)&&(this.isInputInvalid(u.MOBILE_NO)||t===D.VERIFY_OTP&&this.isInputInvalid(u.OTP)))return;let i=this.getFormData(),n=await this._getBizRegFromData(),o={actionData:{type:t,params:b(b({},i),n)}};this.actionEvent(o)}async fetchGstDetailsByGstNo(t,e){return this.showLoader.set(!0),this.apiService.callVerificationApi({type:t?.type,gstNumber:t?.gstNumber,payload:{formType:K.BUSINESS_REGISTRATION_FORM,formData:this.businessRegistrationForm.value}}).subscribe({next:async i=>{this.showLoader.set(!1);let n=i.RESPONSE?.data;if(!n.status){if(n?.apiError){let p=this.getIndividualField(u.COMPANY_NAME);p.required=!1,this.companyName?.clearValidators(),this.companyName?.updateValueAndValidity(),await this.submitBusinessRegistrationForm(null,null,{apiError:n?.apiError});return}let o=this.gstInByPan()?u.GSTIN:u.VERIFY_IDENTIFICATION;this.setCustomError(o,!0),this.errorMessage.set(V(b({},this.errorMessage()),{[o]:{text:n.message,type:R.ERROR}})),this.resetBusinessFields(e)}if(n.status&&(this.businessRegistrationForm.get(u.GSTIN)?.setValue(this.gstInByPan()),this.deleteErrorMessage(u.VERIFY_IDENTIFICATION),this.deleteErrorMessage(u.GSTIN),this.setCustomError(u.VERIFY_IDENTIFICATION,!1),this.setCustomError(u.GSTIN,!1),this.businessIdentificationVerified.set(!0),this.businessRegistrationForm.patchValue({[u.COMPANY_NAME]:n?.businessName}),this.billingAddressObj.set({state:n?.state?.name,city:n?.city?.name,pincode:n?.pincode,address:n?.address,name:n?.name??this.data?.payload?.fullName,phone:this.data?.payload?.mobileNo}),this.companyName.disable(),this.showBillingAddress.set(!0),this.showVerificationAction.set(null),this.trackingAction?.GST&&t?.gstNumber)){let o={tracking:this.trackingAction.GST};super.getTrackingData(o,t?.gstNumber)&&this.actionEvent({actionData:o})}},error:i=>{this.setCustomError(u.VERIFY_IDENTIFICATION,!0),this.errorMessage.set(V(b({},this.errorMessage()),{[u.VERIFY_IDENTIFICATION]:{text:"Gst details not founds",type:R.ERROR}})),this.resetBusinessFields(e)}})}async fetchGstListByPanOrCompanyName(t,e){return this.showLoader.set(!0),this.apiService.callVerificationApi(t).subscribe({next:async i=>{let n=i.RESPONSE?.data;if(n.status)this.setCustomError(u.VERIFY_IDENTIFICATION,!1),this.showLoader.set(!1),this.showGSTList.set(!0),this.gstOptions.set(n?.gstList.map(o=>({value:t.type===O.COMPANY_NAME?o.legalBusinessName:o.gstin}))),this.verificationIdentificationField.isVerified=!0,this.updateFormField(this.verificationIdentificationField),this.deleteErrorMessage(u.VERIFY_IDENTIFICATION),this.businessIdentificationVerified.set(!0),t.type!==O.COMPANY_NAME?(this.businessRegistrationForm.get(u.GSTIN)?.setValue(this.gstInByPan()),this.showVerificationAction.set({text:this.gstListInfo?.button?.text,action:{triggerExtraStandardEvents:"verifyGstNo"}}),this.showBillingAddress()&&this.verifyGstNo()):(M.isEmpty(this.getInputFieldValue(u.COMPANY_NAME))&&this.businessRegistrationForm.get(u.COMPANY_NAME)?.setValue(this.getInputFieldValue(u.VERIFY_IDENTIFICATION)),this.businessRegistrationForm.get(u.GSTIN)?.setValue(this.getInputFieldValue(u.COMPANY_NAME)),this.showVerificationAction.set(null));
206else{if(n?.apiError){[u.COMPANY_NAME,u.GSTIN].forEach(p=>{let g=this.getIndividualField(p),T=this.businessRegistrationForm.get(p);g&&(g.required=!1),T?.clearValidators(),T?.updateValueAndValidity()}),await this.submitBusinessRegistrationForm(null,null,{apiError:n?.apiError});return}this.setCustomError(u.VERIFY_IDENTIFICATION,!0),this.errorMessage.set(V(b({},this.errorMessage()),{[u.VERIFY_IDENTIFICATION]:{text:n.message,type:R.ERROR}})),this.gstOptions.set([]),this.resetBusinessFields(e)}},error:i=>{this.setCustomError(u.VERIFY_IDENTIFICATION,!0),this.errorMessage.set(V(b({},this.errorMessage()),{[u.VERIFY_IDENTIFICATION]:{text:i?.error?.result?.response?.message[0]??M.format("{0} details not found.",t?.companyName||t?.panNumber),type:R.ERROR}})),this.resetBusinessFields(e)}})}async fetchEntityDetails(t,e){return this.showLoader.set(!0),this.apiService.callVerificationApi(t).subscribe({next:async i=>{this.showLoader.set(!1);let n=i.RESPONSE?.data;if(n.status)this.setCustomError(u.VERIFY_IDENTIFICATION,!1),this.deleteErrorMessage(u.VERIFY_IDENTIFICATION),this.businessIdentificationVerified.set(!0),this.businessRegistrationForm.patchValue({companyName:n?.businessName}),this.billingAddressObj.set({state:n?.state?.name,city:n?.city?.name,pincode:n?.pincode,address:n?.address,name:n?.name??this.data?.payload?.fullName,phone:this.data?.payload?.mobileNo}),this.companyName.disable(),this.showVerificationAction.set(null),this.showBillingAddress.set(!0);else{if(n?.apiError){[u.COMPANY_NAME,u.GSTIN].forEach(p=>{let g=this.getIndividualField(p),T=this.businessRegistrationForm.get(p);g&&(g.required=!1),T?.clearValidators(),T?.updateValueAndValidity()}),await this.submitBusinessRegistrationForm(null,null,{apiError:n?.apiError});return}this.setCustomError(u.VERIFY_IDENTIFICATION,!0),this.gstOptions.set([]),this.errorMessage.set(V(b({},this.errorMessage()),{[u.VERIFY_IDENTIFICATION]:{text:n.message,type:R.ERROR}})),this.resetBusinessFields(e)}},error:()=>{this.errorMessage.set({[u.VERIFY_IDENTIFICATION]:{text:"Details not founds",type:R.ERROR}}),this.markInputTouchState(u.VERIFY_IDENTIFICATION,!1),this.resetBusinessFields(e)}})}updateStepIndex(t){this.selectedStepIndex.set(t)}async submitBusinessRegistrationForm(t,e,i){if(this.isFirstStepIsValid(),this.goToNextStep(),!await this._validateForm()){let n=await this._getBizRegFromData(),o={actionData:{type:D.BUSINESS_REGISTRATION,params:b(b({},n),i)}};this.actionEvent(o)}}async _validateForm(){let t=[];return Object.keys(this.businessRegistrationForm.controls).forEach(e=>{let i=this.businessRegistrationForm.get(e);i&&i.invalid&&(t.push(e),i.markAsTouched())}),!!(this.businessRegistrationForm.invalid||await this.validateCustomRules())}async validateCustomRules(){let t=!1;return this.mobileNoVerified()||(t=!0,this.businessRegistrationForm.get([u.MOBILE_NO])?.markAsUntouched(),this.errorMessage.set({[u.MOBILE_NO]:{text:"Please verify the Phone no.",type:R.ERROR}})),t}_getButtonObjectByIndex(t){if(t<0||t>=this.businessFormConfig().length)return null;let e=this.businessFormConfig()[t];return e&&e.button?e.button:null}_updateActionButtonObject(t,e){let i=this.businessFormConfig();i[t]&&i[t].button&&(i[t].button=b(b({},this._getButtonObjectByIndex(t)),e),this.businessFormConfig.set(i))}showErrorOnLoad(t){if(t){let e=b({},this.errorMessage);Object.keys(t).forEach(i=>{t[i].type===R.ERROR&&this.setCustomError(i,!0),e[i]=b({},t[i])}),this.errorMessage.set(e)}}customErrorValidator(t){return e=>{let i=b({},e.errors);return t?i.customError=!0:delete i.customError,Object.keys(i).length>0?i:null}}setCustomError(t,e){let i=this.getIndividualField(t),n=this.businessRegistrationForm.get(t);if(!n)return;let o=[];if(n?.errors?.customError){if(i?.required&&o.push(y.required),i?.minlength&&o.push(y.minLength(i?.minlength)),i?.pattern&&o.push(y.pattern(i?.pattern)),i?.customValidationFunction){let p=this[i.customValidationFunction]?.();p&&o.push(p)}if(!e){if(i?.name===u.VERIFY_IDENTIFICATION){let p=this.getInputFieldValue(u.BUSINESS_IDENTIFICATION),g=this.setValidationForVerificationOption(p,i);o.push(...g)}i?.name===u.GSTIN&&o.push(this.customErrorValidator(e))}}e&&o.push(this.customErrorValidator(e)),M.isEmpty(o)||(n.setValidators(o),n.updateV
206alueAndValidity(),this.markInputTouchState(t,!0))}isInputInvalid(t){let e=this.businessRegistrationForm.get(t);return e?e.invalid:!1}markInputTouchState(t,e){this.businessRegistrationForm.get(t)?.[e?"markAsTouched":"markAsUntouched"]()}goToNextStep(t){this.isFirstStepIsValid()?(this.selectedStepIndex.set(1),t&&t.next()):this.selectedStepIndex.set(0)}subscribeToFirstStepValidation(){this.businessRegistrationForm.get(u.VERIFY_IDENTIFICATION)?.valueChanges.subscribe(t=>{this.disableSubmitButton.set(this.isInputInvalid(u.VERIFY_IDENTIFICATION));let e=this.getInputFieldValue(u.BUSINESS_IDENTIFICATION);this.documentRequired.includes(Q[e])&&this.disableSubmitButton.set(this.isInputInvalid(u.COMPANY_NAME)||this.isInputInvalid(u.BUSINESS_DOCUMENT)),this.businessIdentificationVerified()&&(this.resetBusinessFields(this.verificationIdentificationField),this.getValidatorsForOption(e))}),this.businessRegistrationForm.get(u.COMPANY_NAME)?.valueChanges.subscribe(t=>{this.disableSubmitButton.set(this.isInputInvalid(u.COMPANY_NAME)||this.isInputInvalid(u.BUSINESS_DOCUMENT))}),this.businessRegistrationForm.get(u.BUSINESS_DOCUMENT)?.valueChanges.subscribe(t=>{this.disableSubmitButton.set(this.isInputInvalid(u.BUSINESS_DOCUMENT))}),this.businessRegistrationForm.get(u.MOBILE_NO)?.valueChanges.subscribe(t=>{if(t!==this.data?.payload?.[u.MOBILE_NO]){this.mobileNoVerified.set(!1);let e=this.getIndividualField(u.MOBILE_NO);e.actions.verifyButton.showVerifyButton=!0,e.isVerified=!1;let i=this._getButtonObjectByIndex(0)?.allActions?.sendOtp;this._updateActionButtonObject(0,i)}}),this.businessRegistrationForm.events.subscribe(t=>{this.isFirstStepIsValid()})}isFirstStepIsValid(){let e=[u.FULL_NAME,u.EMAIL_ID,u.MOBILE_NO].some(i=>!!this.isInputInvalid(i));return this.formDisabled.update(()=>e),this.isLinear=e||!this.mobileNoVerified(),!(e||!this.mobileNoVerified())}triggerEntityVerificationActionOnLoad(){this.handleEvent(this.stepper,null,this.showVerificationAction()?.action?.triggerExtraStandardEvents,null)}handleInput(t,e){if(e?.isNumber){let i=t.key;!/^[0-9]$/.test(i)&&i!=="Backspace"&&i!=="Enter"&&t.preventDefault()}}checkAndTransformInput(t,e){this.setCustomError(e?.name,!1),this.deleteErrorMessage(e?.name);let i=t.target,n=i.value;e?.isUpperCase&&(i.value=n.toUpperCase(),this.businessRegistrationForm.get(e?.name)?.setValue(i.value))}setVerificationActionButton(){let t=this.getInputFieldValue(u.BUSINESS_IDENTIFICATION),e=this.verificationAction.find(i=>i[t]);this.showVerificationAction.set(e?.[t]||{})}deleteErrorMessage(t){delete this.errorMessage()?.[t]}setValidationForVerificationOption(t,e){let i=this.validationRules.find(p=>t in p);if(M.isEmpty(i))return;let n=i[t]||[];if(!Array.isArray(n))return;let o=[];return n.forEach(p=>{if(p&&p.rule)switch(p.rule){case"required":o.push(y.required),e.validation.errorMessages.required=p.message;break;case"pattern":p.value&&(o.push(y.pattern(p.value)),e.validation.errorMessages.pattern=p.message);break;case"minlength":p.value&&(o.push(y.minLength(p.value)),e.validation.errorMessages.minlength=p.message);break;case"maxlength":p.value&&(o.push(y.maxLength(p.value)),e.validation.errorMessages.maxlength=p.message);break;default:break}}),o}static{this.\u0275fac=function(e){return new(e||l)(L(Et),L(Rt))}}static{this.\u0275cmp=G({type:l,selectors:[["business-registration-dynamic-form"]],viewQuery:function(e,i){if(e&1&&(X(Ne,5),X(jt,5)),e&2){let n;J(n=Z())&&(i.stepper=n.first),J(n=Z())&&(i.mediaUploaderComponent=n.first)}},hostVars:4,hostBindings:function(e,i){e&2&&(P(i.ngStyle),Y(i.ngClass))},inputs:{ngClass:"ngClass",ngStyle:"ngStyle",actionEvent:"actionEvent",slot:"slot"},features:[U],decls:7,vars:3,consts:[["business_registration_stepper",""],["orientation","vertical",3,"selectedIndex","linear"],[3,"stepControl",4,"ngFor","ngForOf"],[3,"stepControl"],[3,"formGroup"],["matStepLabel",""],[1,"grid","grid-cols-1","md:grid-cols-4","gap-x-[25px]","gap-y-[15px]","mt-4","mb-4"],[4,"ngFor","ngForOf"],[1,"flex","flex-wrap","justify-end","gap-[10px]"],[3,"click"],[3,"innerHTML"],["class","md:col-span-2",3,"style",4,"ngIf"],["class","md:col-span-2",4,"ngIf"],["class","md:col-span-4 grow",4,"ngIf"],[1,"md:col-span-2"],[1,"relative"],["appearance","outline","class","w-full",3,"ngClass",4,"ngIf"],["class","flex justify-between",4,"ngIf"],["id","for_action"],["class","text-[#3BB000] font-semibold text-[12px] text-left mt-1",4,"ngIf"],["class","text-[#c00100] text-[13px] text-left mt-1",4,"ngIf"],["class","text-[12px] text-[red] mb-[7px] mt-[3px] text-left",4,"ngIf"],["appearance","outline",1,"w-full",3,"ngClass"],[1,"!text-[14px]"],["matInput","",1,"placeholder-truncate","w-full","rounded-sm","!text-[14px]","-translate-y-[7px]",3,"input","click","blur","keypress","disabled","readonly","id","formControlName","placeholder","type","ngStyle"],["class","icon absolute flex items-center justify-center -top-[11px] bottom-1 right-px px-[10px]",4,"ngIf"],[4,"ngIf"],[1,"icon","absolute","flex","items-center","justify-center","-top-[11px]","bottom-1","right-px","px-[10px]"],["src","../assets/assets-new/images/check-1.svg",1,"w-5","h-5","flex-shrink-0"],[1,"flex","justify-between"],[1,"text-[#F94D00]","font-semibold","text-[12px]","cursor-pointer","underline","mt-1",3,"click"],[1,"underline","text-[12px]","text-[#F94D00]","cursor-pointer","font-semibold","mt-1",3,"click"],[1,"text-[#3BB000]","font-semibold","text-[12px]","text-left","mt-1"],[1,"text-[#c00100]","text-[13px]","text-left","mt-1"],[1,"text-[12px]","text-[red]","mb
206-[7px]","mt-[3px]","text-left"],["appearance","outline",1,"w-full"],[1,"-translate-y-[7px]",3,"selectionChange","id","formControlName"],["class","!text-[14px]",3,"value",4,"ngFor","ngForOf"],[1,"!text-[14px]",3,"value"],[3,"onUpload","data","required","fileId","hideMediaUploader"],["class","forme-re md:col-span-4 -mt-[15px]",4,"ngIf"],[1,"forme-re","md:col-span-4","-mt-[15px]"],[1,"md:col-span-4","grow"],[1,"flex","justify-between","w-full"],[1,"text-[#000000]","text-left","font-semibold","text-[14px]","mb-[5px]","col-span-6"],[1,"flex","overflow-x-auto","gap-[10px]","scroll-container","pb-[10px]"],[1,"text-[#3bb000]","font-bold","text-[13px]","mb-[5px]","items-center","flex","gap-[5px]"],["src","../assets/assets-new/images/check-1.svg",1,"w-4","flex-shrink-0"],["type","radio",1,"sr-only","peer",3,"click","formControlName","value"],[1,"rounded-[5px]","flex","items-center","justify-center","text-[#000000]","peer-checked:bg-[#162F4D]","bg-[#dbdada]","peer-checked:text-[#ffffff]","text-[14px]","cursor-pointer",2,"padding","8px 20px"],["class","billing-address grow md:col-span-4",4,"ngIf"],[1,"billing-address","grow","md:col-span-4"],[1,"flex","justify-between","items-center","mb-[5px]"],[1,"text-[#000000]","font-semibold","text-[14px]"],[1,"text-[#c00100]",3,"for"],[1,"inline-block","whitespace-nowrap","rounded-3xl","bg-[#ffffff]","hover:bg-[#F94D00]","text-[13px]","hover:text-[#ffffff]","text-[#F94D00]","cursor-pointer","border","border-solid","font-semibold",2,"border-color","#f94d00 !important","padding","5px 15px","width","auto","min-width","0",3,"click"],[1,"md:col-span-4","border","border-solid","p-[10px]","rounded-sm","bg-[#ffffff]","leading-[20px]",2,"border-color","#dbd6dd !important"],[1,"gap-[10px]","text-left","text-[12px]"],[1,"flex","flex-wrap","gap-[5px]"],[1,"grow"],[1,"text-[#5B5B5B]"],[1,"flex-shrink-0"],[1,"col-span-12"],[1,"text-[#000000]","text-left","font-semibold","text-[14px]","mb-[5px]","whitespace-nowrap"],[1,"fa","fa-info"],[1,"grid","grid-cols-2","sm:grid-cols-3","md:grid-cols-4","gap-2","sm:gap-4","md:gap-4"],["class","flex items-center cursor-pointer",4,"ngFor","ngForOf"],[1,"flex","items-center","cursor-pointer"],["type","radio",1,"h-5","w-5",3,"id","formControlName","value"],[1,"first-letter:uppercase","ms-2","md:text-[14px]","text-[13px]","font-medium","whitespace-nowrap"],["class","md:grow-0 grow",4,"ngIf"],[1,"md:grow-0","grow"],["matStepperPrevious","",1,"md:w-auto","w-full","font-semibold","border","bg-[#162F4D]","text-[#ffffff]","text-[14px]","disabled:bg-[#dbdada]","disabled:text-[#000]","disabled:cursor-not-allowed","!text-center","rounded-lg",2,"border-color","#162f4d !important","padding","13px 45px"],["mat-button","","matTooltipPosition","above",1,"whitespace-nowrap","font-semibold","border","bg-[#F43F0C]","text-[#ffffff]","text-[14px]","disabled:bg-[#dbdada]","disabled:text-[#000]","disabled:cursor-not-allowed","rounded-lg","md:w-auto","w-full","!text-center","!py-[13px]","md:px-[45px]","!px-[30px]",2,"border-color","#f43f0c !important",3,"click","matTooltip","disabled"],["mat-button","",1,"font-semibold","border","bg-[#F43F0C]","text-[#ffffff]","text-[14px]","disabled:bg-[#dbdada]","disabled:text-[#000]","disabled:cursor-not-allowed","rounded-lg","md:w-auto","w-full","!text-center","!py-[13px]","md:px-[45px]","!px-[30px]",2,"border-color","#f43f0c !important",3,"click","disabled"],["mat-button","",1,"font-semibold","border","bg-[#F43F0C]","text-[#ffffff]","text-[14px]","disabled:bg-[#dbdada]","disabled:text-[#000]","disabled:cursor-not-allowed","rounded-lg","w-auto","flex","items-center","!py-[13px]","md:px-[45px]","!px-[30px]",2,"border-color","#f43f0c !important",3,"click","disabled"]],template:function(e,i){e&1&&(s(0,`
207`),d(1,"mat-stepper",1,0),s(3,`
208  `),x(4,bi,18,5,"mat-step",2),s(5,`
209`),m(),s(6,`
210`)),e&2&&(a(),f("selectedIndex",i.selectedStepIndex())("linear",i.isLinear),a(3),f("ngForOf",i.businessFormConfig()))},dependencies:[j,mt,ct,pt,_t,Ft,Ct,ht,oe,xt,bt,It,vt,St,Nt,yt,Tt,me,de,ae,At,Mt,Ot,ge,fe,he,xe,jt,gt,Bt,ce,ft,ne],styles:[`.mat-stepper-vertical[_ngcontent-%COMP%], .mat-stepper-horizontal[_ngcontent-%COMP%]{display:block;font-family:var(--font-family)!important;background:#fff8f600!important}[_nghost-%COMP%]     .mat-mdc-select .mat-mdc-select-trigger .mat-mdc-select-arrow-wrapper{display:contents!important}[_nghost-%COMP%]     input[disabled]{background-color:#f0f0f0;color:#999;cursor:not-allowed}[_nghost-%COMP%]     .mat-mdc-text-field-wrapper{background-color:#fdfdfd!important;height:45px!important}
210[_nghost-%COMP%]     .mat-mdc-notch-piece{border-color:#c2c2c2!important}[_nghost-%COMP%]     .mdc-notched-outline__notch{border-left:none!important}[_nghost-%COMP%]     .mat-mdc-select .mat-mdc-select-trigger .mat-mdc-select-value .mat-mdc-select-value-text .mat-mdc-select-min-line{font-size:14px!important}.mat-mdc-option[_ngcontent-%COMP%]{min-height:32px!important}[_nghost-%COMP%]     .mat-stepper-vertical .mat-step .mat-step-header{height:auto;padding:8px 24px!important;background-color:transparent!important;overflow:hidden}[_nghost-%COMP%]     .mat-stepper-vertical .mat-step .mat-stepper-vertical-line:before{top:calc(19px - (var(--mat-stepper-header-height) - 24px) / 2);bottom:calc(17px - (var(--mat-stepper-header-height) - 24px) / 2)}[_nghost-%COMP%]     .mat-mdc-form-field:not(.mat-form-field-disabled) .mat-mdc-floating-label.mdc-floating-label{top:21px!important}[_nghost-%COMP%]     input[readonly]{background-color:#f0f0f0;color:#999;border-color:#ccc}[_nghost-%COMP%]     .form-field-disabled>.mat-mdc-text-field-wrapper{width:100%;z-index:0;background-color:#80808012;cursor:not-allowed}[_nghost-%COMP%]     .mat-mdc-form-field-error-wrapper{position:absolute;top:0;left:0;right:0;padding:0}.form-field-disabled[_ngcontent-%COMP%]{cursor:not-allowed;pointer-events:none;opacity:.6}@media(max-width:600px){mat-vertical-stepper[_ngcontent-%COMP%]{width:100%;margin-bottom:20px}mat-form-field[_ngcontent-%COMP%]{width:100%}}[_nghost-%COMP%]     .mat-mdc-form-field-error{display:flex}
211/*# sourceMappingURL=https://static3.industrybuying.com/wakanda-turbo/assets/RELEASE-v1.255/static/browser/business-registration-dynamic-form.component-L3XMZBPP.css.map */`]})}}return l})();function Ci(l,c){if(l&1){let t=N();s(0,`
212        `),w(1,"div",7),s(2,`
213          `),w(3,"input",8),$t("change",function(i){let n=v(t).$implicit,o=r();return I(o.updateSelectedValues(n==null?null:n.option,i))}),k(),s(4,`
214          `),w(5,"label",9),s(6),k(),s(7,`
215        `),k(),s(8,`
216      `)}if(l&2){let t=c.$implicit,e=c.$index;a(3),Ut("id",e+1)("value",t==null?null:t.option),a(2),Ut("htmlFor",e+1),a(),S(t==null?null:t.option)}}var ve=(()=>{class l extends q{constructor(t){super(),this.route=t,this.cssClassMap=new Map,this.cssStylesMap=new Map,this.selectedValues=h([],{}),this.rating=h(null,{})}ngOnInit(){this.rating.set(Number(this.route.snapshot.queryParamMap.get("rating")))}updateSelectedValues(t,e){e.target.checked?this.selectedValues().push(t):this.selectedValues.set(this.selectedValues().filter(i=>i!==t))}onActionCall(t,e){t.params.additionalComments=e,t.params.npsFormInput=this.selectedValues().join(", "),t.params.npsRating=this.rating(),this.actionEvent({actionData:b({},t)})}static{this.\u0275fac=function(e){return new(e||l)(L(ie))}}static{this.\u0275cmp=G({type:l,selectors:[["feedback-form"]],hostVars:4,hostBindings:function(e,i){e&2&&(P(i.ngStyle),Y(i.ngClass))},inputs:{ngClass:"ngClass",ngStyle:"ngStyle",actionEvent:"actionEvent",slot:"slot"},features:[U],decls:23,vars:3,consts:[["additionalComments",""],[1,"px-[10px]","py-[15px]"],[1,"font-bold","text-[#F94D00]","mb
216-[10px]","block","md:text-[17px]","text-[14px]","leading-[20px]"],[1,"text-[14px]"],[1,"block","mt-4","mb-[10px]","md:text-[16px]","text-[14px]"],["placeholder","Additional Comments",1,"w-full","p-2","border","rounded","h-[150px]"],[1,"inline-flex","text-center","whitespace-nowrap","items-center","justify-center","gap-[8px]","border","border-solid","border-[#F94D00]","font-[600]","text-[#162F4D]","text-[12px]","p-[22px]","h-[40px]","cursor-pointer","rounded-full","mt-[10px]",3,"click"],[1,"mb-[10px]"],["type","checkbox",3,"change","id","value"],[1,"ml-2","font-[500]",3,"for"]],template:function(e,i){if(e&1){let n=N();w(0,"div",1),s(1,`
217  `),w(2,"form"),s(3,`
218    `),w(4,"label",2),s(5),k(),s(6,`
219    `),w(7,"div",3),s(8,`
220      `),st(9,Ci,9,4,null,null,Jt),k(),s(11,`
221
222    `),w(12,"label",4),s(13),k(),s(14,`
223    `),te(15,"textarea",5,0),s(17,`
224  `),k(),s(18,`
225  `),w(19,"button",6),$t("click",function(){v(n);let p=$(16);return I(i.onActionCall(i.slot==null||i.slot.widget==null||i.slot.widget.data==null?null:i.slot.widget.data.action,p==null?null:p.value))}),s(20),k(),s(21,`
226`),k(),s(22,`
227`)}e&2&&(a(5),C(`
228      `,i.slot==null||i.slot.widget==null||i.slot.widget.data==null?null:i.slot.widget.data.title,`
229    `),a(4),lt(i.slot==null||i.slot.widget==null||i.slot.widget.data==null?null:i.slot.widget.data.values),a(4),S(i.slot==null||i.slot.widget==null||i.slot.widget.data==null?null:i.slot.widget.data.subTitle),a(7),C(`
230    `,i.slot==null||i.slot.widget==null||i.slot.widget.data==null?null:i.slot.widget.data.buttonTitle,`
231  `))},dependencies:[j],encapsulation:2})}}return l})();var Gt;Gt||(Gt={});var _=(function(l){return l.GST_IN="gstin",l.CONTACT_PERSON_NAME="name",l.MOBILE_NO="phone_number",l.EMAIL_ID="email_id",l.FINANCE_PERSON_NAME="finance_person_name",l.FINANCE_DESIGNATION="finance_designation",l.FINANCE_EMAIL="finance_email",l.FINANCE_PHONE="finance_phone",l.OTP="otp",l.MOBILE_NO_VERIFIED="mobileNoVerified",l.GST_IN_VERIFIED="gstInVerified",l})(_||{});var vi=["ib_credit_stepper"],Ii=l=>({"form-field-disabled":l}),Ei=()=>({borderColor:"#494949"});function Fi(l,c){l&1&&(s(0,`
232    `),A(1,"mat-divider",6),s(2,`
233  `))}function yi(l,c){l&1&&(Kt(),d(0,"svg",23),s(1,`
234                      `),A(2,"circle",24),s(3,`
235                      `),A(4,"path",25),s(5,`
236                    `),m())}function Ti(l,c){if(l&1&&(d(0,"span"),s(1),m()),l&2){let t=r(4).$implicit;a(),S(t==null||t.actions==null||t.actions.verifyButton==null?null:t.actions.verifyButton.text)}}function Ni(l,c){if(l&1){let t=N();d(0,"div",19),s(1,`
237                  `),d(2,"button",20),B("click",function(i){v(t);let n=r(3).$implicit,o=r(2);return I(!(n==null||n.actions==null||n.actions.verifyButton==null||n.actions.verifyButton.action==null)&&n.actions.verifyButton.action.triggerExtraStandardEvents?o.handleEvent(i,n,n==null||n.actions==null||n.actions.verifyButton==null||n.actions.verifyButton.action==null?null:n.actions.verifyButton.action.triggerExtraStandardEvents,n.actions==null||n.actions.verifyButton==null||n.actions.verifyButton.action==null?null:n.actions.verifyButton.action.params):o.onActionCall(n==null||n.actions==null||n.actions.verifyButton==null||n.actions.verifyButton.action==null?null:n.actions.verifyButton.action.type))}),s(3,`
238                    `),x(4,yi,6,0,"svg",21),s(5,`
239                    `),x(6,Ti,2,1,"span",22),s(7,`
240                  `),m(),s(8,`
241                `),m()}if(l&2){let t,e,i,n=r(3).$implicit,o=r(2);a(2),f("disabled",(t=o.showLoader())==null?null:t[n==null?null:n.name]),a(2),f("ngIf",(e=o.showLoader())==null?null:e[n==null?null:n.name]),a(2),f("ngIf",!((i=o.showLoader())!=null&&i[n==null?null:n.name]))}}function Si(l,c){if(l&1&&(s(0,`
242                `),x(1,Ni,9,3,"div",18),s(2,`
243              `)),l&2){let t=r(2).$implicit;a(),f("ngIf",t==null||t.actions==null||t.actions.verifyButton==null?null:t.actions.verifyButton.showVerifyButton)}}function Mi(l,c){l&1&&(d(0,"div",27),s(1,`
244                  `),A(2,"img",28),s(3,`
245                `),m())}function Ai(l,c){if(l&1&&(s(0,`
246                `),x(1,Mi,4,0,"div",26),s(2,`
247              `)),l&2){let t=r(2).$implicit;a(),f("ngIf",t==null?null:t.isVerified)}}
247function Bi(l,c){if(l&1&&(s(0,`
248                  `),d(1,"span"),s(2),m(),s(3,`
249                `)),l&2){let t,e=r(3).$implicit,i=r(2);a(2),S((t=i.errorMessage())==null||t[e==null?null:e.name]==null?null:t[e==null?null:e.name].text)}}function Oi(l,c){if(l&1&&(s(0,`
250                  `),d(1,"span"),s(2),m(),s(3,`
251                `)),l&2){let t=r(3).$implicit;a(2),S(t==null||t.validation==null||t.validation.errorMessages==null?null:t.validation.errorMessages.required)}}function Vi(l,c){if(l&1&&(s(0,`
252                  `),d(1,"span"),s(2),m(),s(3,`
253                `)),l&2){let t=r(3).$implicit;a(2),S(t==null||t.validation==null||t.validation.errorMessages==null?null:t.validation.errorMessages.minlength)}}function Ri(l,c){if(l&1&&(s(0,`
254                  `),d(1,"span"),s(2),m(),s(3,`
255                `)),l&2){let t=r(3).$implicit;a(2),S(t==null||t.validation==null||t.validation.errorMessages==null?null:t.validation.errorMessages.pattern)}}function Di(l,c){if(l&1&&(d(0,"mat-error",29),s(1,`
256                `),E(2,Bi,4,1)(3,Oi,4,1)(4,Vi,4,1)(5,Ri,4,1),m()),l&2){let t,e=r(2).$implicit,i=r(2);a(2),F((t=i.ibCreditForm.get(e==null?null:e.name))!=null&&t.errors.customError&&((t=i.errorMessage())==null||t[e==null?null:e.name]==null?null:t[e==null?null:e.name].type)===i.MessageType.ERROR?2:i.ibCreditForm.get(e.name).hasError("required")?3:i.ibCreditForm.get(e.name).hasError("minlength")&&(!(e==null||e.validation==null||e.validation.errorMessages==null)&&e.validation.errorMessages.minlength)?4:i.ibCreditForm.get(e.name).hasError("pattern")?5:-1)}}function wi(l,c){if(l&1){let t=N();s(0,`
257            `),d(1,"div",30),s(2,`
258              `),d(3,"div",31),B("click",function(i){let n;v(t);let o=r(2).$implicit,p=r(2);return I((n=p.isDisable())!=null&&n.leftCTA?i.preventDefault():p.onActionCall(o==null||o.actions==null||o.actions.leftRightCTA==null||o.actions.leftRightCTA.leftCTA==null||o.actions.leftRightCTA.leftCTA.action==null?null:o.actions.leftRightCTA.leftCTA.action.type))}),s(4),m(),s(5,`
259              `),d(6,"div",32),B("click",function(i){let n;v(t);let o=r(2).$implicit,p=r(2);return I(!((n=p.isDisable())==null||n[o==null?null:o.name]==null)&&n[o==null?null:o.name].rightCTA?i.preventDefault():p.onActionCall(o==null||o.actions==null||o.actions.leftRightCTA==null||o.actions.leftRightCTA.rightCTA==null||o.actions.leftRightCTA.rightCTA.action==null?null:o.actions.leftRightCTA.rightCTA.action.type))}),s(7),m(),s(8,`
260            `),m(),s(9,`
261          `)}if(l&2){let t,e,i,n,o,p,g=r(2).$implicit,T=r(2);a(3),z("pointer-events",(t=T.isDisable())!=null&&t.leftCTA?"none":"auto")("cursor",(e=T.isDisable())!=null&&e.leftCTA?"not-allowed":"pointer")("color",(i=T.isDisable())!=null&&i.leftCTA?"#bbb":"inherit"),a(),C(`
262                `,g==null||g.actions==null||g.actions.leftRightCTA==null||g.actions.leftRightCTA.leftCTA==null?null:g.actions.leftRightCTA.leftCTA.title,`
263              `),a(2),z("pointer-events",!((n=T.isDisable())==null||n[g==null?null:g.name]==null)&&n[g==null?null:g.name].rightCTA?"none":"auto")("cursor",!((o=T.isDisable())==null||o[g==null?null:g.name]==null)&&o[g==null?null:g.name].rightCTA?"not-allowed":"pointer")("color",!((p=T.isDisable())==null||p[g==null?null:g.name]==null)&&p[g==null?null:g.name].rightCTA?"#ffa37a":"inherit"),a(),C(`
264                `,g==null||g.actions==null||g.actions.leftRightCTA==null||g.actions.leftRightCTA.rightCTA==null?null:g.actions.leftRightCTA.rightCTA.title,`
265              `)}}function ki(l,c){if(l&1&&(d(0,"div",33),s(1),m()),l&2){let t=r(2).$implicit;a(),C(`
266              `,t==null||t.actions==null||t.actions.messages==null?null:t.actions.messages.text,`
267            `)}}function Pi(l,c){if(l&1&&(s(0,`
268              `),d(1,"div",34),s(2),m(),s(3,`
269            `)),l&2){let t,e=r(2).$implicit,i=r(2);a(2),C(`
270                `,(t=i.errorMessage())==null||t[e==null?null:e.name]==null?null:t[e==null?null:e.name].text,`
271              `)}}function Li(l,c){if(l&1&&(d(0,"p"),s(1),m()),l&2){let t=c.ngIf,e=r(3).$implicit,i=r(2);a(),rt(`
272              `,t," ",i.getTimerMessage(e.name),`
273            `)}}
273function Gi(l,c){if(l&1&&(d(0,"div",35),s(1,`
274            `),x(2,Li,2,2,"p",22),tt(3,"async"),s(4,`
275          `),m()),l&2){let t=r(2).$implicit,e=r(2);a(2),f("ngIf",et(3,1,e.getTimerObservable(t)))}}function Ui(l,c){if(l&1){let t=N();d(0,"div",8),s(1,`
276          `),d(2,"div",9),s(3,`
277            `),d(4,"mat-form-field",10),s(5,`
278              `),d(6,"mat-label",11),s(7),m(),s(8,`
279              `),d(9,"input",12),B("input",function(i){v(t);let n=r().$implicit,o=r(2);return I(o.checkAndTransformInput(i,n))})("click",function(i){v(t);let n=r().$implicit,o=r(2);return I(o.handleEvent(i,n,n.actions==null||n.actions.event==null||n.actions.event.onClick==null?null:n.actions.event.onClick.functionName,n.actions==null||n.actions.event==null||n.actions.event.onClick==null?null:n.actions.event.onClick.params))})("blur",function(i){v(t);let n=r().$implicit,o=r(2);return I(o.handleEvent(i,n,n.actions==null||n.actions.event==null||n.actions.event.onBlur==null?null:n.actions.event.onBlur.functionName,n.actions==null||n.actions.event==null||n.actions.event.onBlur==null?null:n.actions.event.onBlur.params))})("keypress",function(i){v(t);let n=r().$implicit,o=r(2);return I(o.handleInput(i,n))}),m(),s(10,`
280              `),d(11,"mat-hint",13),s(12),m(),s(13,`
281              `),s(14,`
282
283              `),E(15,Si,3,1),E(16,Ai,3,1),x(17,Di,6,1,"mat-error",14),s(18,`
284            `),m(),s(19,`
285          `),m(),s(20,`
286
287          `),E(21,wi,10,14),d(22,"div",15),s(23,`
288            `),x(24,ki,2,1,"div",16),s(25,`
289
290            `),E(26,Pi,4,1),m(),s(27,`
291          `),x(28,Gi,5,3,"div",17),s(29,`
292        `),m()}if(l&2){let t,e,i,n=r().$implicit,o=r(2);P(n.style),z("display",n!=null&&n.isHidden?"none":"block"),a(4),f("ngClass",dt(23,Ii,n==null?null:n.isDisable)),a(3),S((t=o.placeHolder())==null?null:t[n==null?null:n.name]),a(2),f("disabled",n==null?null:n.isDisable)("readonly",n==null?null:n.isDisable)("id",n==null?null:n.name)("formControlName",n==null?null:n.name)("placeholder",(e=o.placeHolder())==null?null:e[n==null?null:n.name])("type",n==null?null:n.type)("ngStyle",ut(25,Ei)),nt("minlength",n==null?null:n.minlength)("maxlength",n==null?null:n.maxlength),a(3),S(n==null?null:n.hintText),a(3),F(o.isInputInvalid(n==null?null:n.name)?-1:15),a(),F(o.isInputInvalid(n==null?null:n.name)?-1:16),a(),f("ngIf",o.ibCreditForm.get(n.name).touched&&o.ibCreditForm.get(n.name).errors),a(4),F(!(n==null||n.actions==null)&&n.actions.leftRightCTA?21:-1),a(3),f("ngIf",!o.ibCreditForm.get(n==null?null:n.name).touched&&!o.ibCreditForm.get(n==null?null:n.name).errors&&(n==null||n.actions==null||n.actions.messages==null?null:n.actions.messages.type)===o.MessageType.SUCCESS),a(2),F(!o.ibCreditForm.get(n==null?null:n.name).touched&&((i=o.errorMessage())==null||i[n==null?null:n.name]==null?null:i[n==null?null:n.name].type)===o.MessageType.ERROR&&(n==null?null:n.name)==="otp"?26:-1),a(2),f("ngIf",n.isTimer)}}function $i(l,c){if(l&1&&(ot(0),s(1,`
293        `),s(2,`
294        `),x(3,Ui,30,26,"div",7),s(4,`
295      `),at()),l&2){let t=c.$implicit,e=r(2);a(3),f("ngIf",t.type===e.inputTypeEnum.TEXT&&e.isFieldEnabled(t))}}function Yi(l,c){if(l&1){let t=N();d(0,"div",36),s(1,`
296      `),s(2,`
297      `),d(3,"button",37),B("click",function(){v(t);let i=r(),n=i.$implicit,o=i.index,p=$(1),g=r();return I(!(n==null||n.button==null||n.button.action==null)&&n.button.action.triggerExtraStandardEvents?g.handleEvent(p,null,n==null||n.button==null||n.button.action==null?null:n.button.action.triggerExtraStandardEvents,null):g.onActionCall(n==null||n.button==null||n.button.action==null?null:n.button.action.type,o))}),s(4),m(),s(5,`
298    `),m()}if(l&2){let t=r().$implicit,e=r();a(3),f("disabled",e.isSubmitButtonDisabled()),a(),C(`
299        `,t==null||t.button==null?null:t.button.text,`
300      `)}}function ji(l,c){if(l&1&&(d(0,"div",null,0),s(2,`
301  `),E(3,Fi,3,0),d(4,"form",2),s(5,`
302    `),d(6,"div",3),s(7),m(),s(8,`
303    `),d(9,"div",4),s(10,`
304      `),x(11,$i,5,1,"ng-container",1),s(12,`
305    `),m(),s(13,`
306    `),s(14,`
307    `),x(15,Yi,6,2,"div",5),s(16,`
308  `),m(),s(17,`
309`),m()),l&2){let t=c.$implicit,e=r();a(3),F(t!=null&&t.divider?3:-1),a(),f("formGroup",e.ibCreditForm),a(3),C(`
310      `,t==null?null:t.label,`
311    `),a(4),f("ngForOf",t==null?null:t.fields),a(4),f("ngIf",t==null?null:t.button)}}var Ie=(()=>{class l extends q{constructor(t,e){super(),this.fb=t,this.timerService=e,this.slot=ee(void 0,{}),this.ibCreditFormConfig=h(null,{}
311),this.inputTypeEnum=it,this.isButtonDisabled=!1,this.StringUtils=M,this.gstInVerified=h(!1,{}),this.formDisabled=h(!0,{}),this.verifyDisabled=h(!0,{}),this.customErrors=h({},{}),this.MessageType=R,this.isDisable=h({},{}),this.disableMessage=null,this.validationRules=[],this.placeHolder=h({},{}),this.isEmailExist=h(null,{}),this.inputName=_,this.errorMessage=h({},{}),this.dataFromAction=h(!1,{}),this.ibCreditFormFeilds=h([],{}),this.verificationAction=[],this.showVerificationAction=h({},{}),this.IbCreditFunctionName=Gt,this.isLinear=!0,this.showLoader=h({},{}),this.selectedStepIndex=h(0,{}),this.disableSubmitButton=h(!1,{}),this.handleInfoMessages=[],this.trackingAction={},this.disableTill=0,this.timerFor=null,this.mobileNoVerified=h(!1,{}),this.verifyGstInValue=h(null,{})}ngOnInit(){this.data=this.slot().widget.data,this.data.payload=this.data?.formData?.payload,this.data.messages=this.data?.formData?.messages,this.ibCreditFormConfig.set(this.data?.renderableComponents[0]?.ibCreditForm?.stepper),this.getFormFields(),this.createForm(),this.data?.payload&&(this.dataFromAction.set(!0),this.patchFormData(this.data?.payload),this.initializeTimers(),this.showErrorOnLoad(this.data?.messages)),this.subscribeToFirstStepValidation()}getFormFields(){this.ibCreditFormConfig().forEach(t=>{t?.fields.forEach(e=>{M.isEmpty(e)||this.ibCreditFormFeilds().push(e)})})}createForm(){let t={};this.ibCreditFormFeilds().forEach(e=>{let i=[];if(e?.required&&i.push(y.required),e?.minlength&&i.push(y.minLength(e?.minlength)),e?.pattern&&i.push(y.pattern(e?.pattern)),e?.customValidationFunction){let n=this[e.customValidationFunction]?.();n&&i.push(n)}this.placeHolder.set(V(b({},this.placeHolder()),{[e?.name]:e?.placeholder})),t[e?.name]=[e?.defaultValue||"",i]}),this.ibCreditForm=this.fb.group(t)}patchFormData(t){typeof t=="object"&&t&&Object.keys(t).length>0&&(this.ibCreditForm.patchValue({[_.MOBILE_NO]:t?.[_.MOBILE_NO],[_.GST_IN]:t?.[_.GST_IN],[_.FINANCE_PERSON_NAME]:t?.[_.FINANCE_PERSON_NAME],[_.FINANCE_PHONE]:t?.[_.FINANCE_PHONE],[_.OTP]:t?.[_.OTP]}),this.gstInVerified.set(t?.[_.GST_IN_VERIFIED]),this.mobileNoVerified.set(t?.[_.MOBILE_NO_VERIFIED]),this.isFirstStepIsValid())}initializeTimers(){this.ibCreditFormFeilds().forEach(t=>{let e=t?.actions?.leftRightCTA?.rightCTA?.timer;e&&(this.timerService.resetTimer(t.name,e.duration),this.subscribeToTimer(t))})}subscribeToTimer(t){let e=t.name;this.timerService.getTimerObservable(e)?.subscribe(n=>{this.updateCTAButtonState(e,n)})}updateCTAButtonState(t,e){this.isDisable.update(i=>V(b({},i),{[t]:{rightCTA:e>0}}))}getTimerObservable(t){let e=t?.name;return this.timerService.getTimerObservable(e)}getTimerMessage(t){return this.ibCreditFormFeilds().find(i=>i.name===t)?.actions?.leftRightCTA?.rightCTA?.timer?.message||""}showErrorOnLoad(t){if(t){let e=b({},this.errorMessage);Object.keys(t).forEach(i=>{if(t[i].type===R.ERROR){let n=Object.keys(_).find(o=>_[o]===i);this.setCustomError(_[n],!0)}e[i]=b({},t[i])}),this.errorMessage.set(e)}}isFirstStepIsValid(){let e=[_.MOBILE_NO,_.GST_IN,_.FINANCE_PERSON_NAME,_.FINANCE_PHONE].some(i=>!!this.isInputInvalid(i));return this.formDisabled.update(()=>e),this.isLinear=e||!this.gstInVerified()||!this.mobileNoVerified(),!(e||!this.gstInVerified()||!this.mobileNoVerified())}isInputInvalid(t){let e=this.ibCreditForm.get(t);return e?e.invalid:!1}async onActionCall(t,e){if([D.SEND_OTP].includes(t)&&this.isInputInvalid(_.MOBILE_NO)||t===D.VERIFY_OTP&&this.isInputInvalid(_.OTP)||[D.VERIFY_GST].includes(t)&&this.isInputInvalid(_.GST_IN))return;let i=this.getFormData(),n=await this._getIbCreditFromData(),o={actionData:{type:t,params:b(b({},i),n)}};this.actionEvent(o)}getFormData(){return this.ibCreditForm.value}async _getIbCreditFromData(){return this.ibCreditForm.markAllAsTouched(),{[_.MOBILE_NO]:this.getInputFieldValue(_.MOBILE_NO),[_.GST_IN]:this.getInputFieldValue(_.GST_IN),[_.FINANCE_PERSON_NAME]:this.getInputFieldValue(_.FINANCE_PERSON_NAME),[_.FINANCE_PHONE]:this.getInputFieldValue(_.FINANCE_PHONE),[_.GST_IN_VERIFIED]:this.gstInVerified(),[_.MOBILE_NO_VERIFIED]:this.mobileNoVerified()}}getInputFieldValue(t){return this.ibCreditForm.get(t)?.value??this.data?.payload?.[t]}handleEvent(t,e,i,n){i&&typeof this[i]=="function"&&this[i](t,e,n)}handleInput(t,e){if(e?.isNumber){let i=t.key;!/^[0-9]$/.test(i)&&i!=="Backspace"&&i!=="Enter"&&t.preventDefault()}}validateGstin(){let t=this.getIndividualField(_.GST_IN),e=this.getInputFieldValue(_.GST_IN);if(!this.isInputInvalid(_.GST_IN)){let i=this.data.payload?.[_.GST_IN],n=this.verifyGstInValue()||i;n&&e!==n?(this.gstInVerified.set(!1),t.isVerified=!1,t.actions.verifyButton.showVerifyButton=!0,this.updateFormField(t),this.formDisabled.set(!0)):this.formDisabled.set(!1),this.gstInVerified()?this.formDisabled.set(!1):(t.isVerified=!1,t.actions.verifyButton.showVerifyButton=!0,this.updateFormField(t));return}this.formDisabled.set(!0)}validatePhone(){let t=this.getIndividualField(_.MOBILE_NO),e=this.getInputFieldValue(_.MOBILE_NO);
311if(!this.isInputInvalid(_.MOBILE_NO)){e!==this.data.payload?.[_.MOBILE_NO]?(this.mobileNoVerified.set(!1),t.isVerified=!1,t.actions.verifyButton.showVerifyButton=!0,this.updateFormField(t),this.formDisabled.set(!0)):this.formDisabled.set(!1),this.mobileNoVerified()||(this.formDisabled.set(!0),t.isVerified=!1,t.actions.verifyButton.showVerifyButton=!0,this.updateFormField(t));return}this.formDisabled.set(!0)}validateOtp(){if(!this.isInputInvalid(_.MOBILE_NO)){this.formDisabled.set(!1);return}this.formDisabled.set(!0)}isSubmitButtonDisabled(){return this.formDisabled()||!this.mobileNoVerified()||!this.gstInVerified()}checkAndTransformInput(t,e){this.setCustomError(e?.name,!1),this.deleteErrorMessage(e?.name);let i=t.target,n=i.value;e?.isUpperCase&&(i.value=n.toUpperCase(),this.ibCreditForm.get(e?.name)?.setValue(i.value))}setCustomError(t,e){let i=this.getIndividualField(t),n=this.ibCreditForm.get(t);if(!n||!i)return;let o=[];if(i.required&&o.push(y.required),i.minlength&&o.push(y.minLength(i.minlength)),i.pattern&&o.push(y.pattern(i.pattern)),i.customValidationFunction){let p=this[i.customValidationFunction]?.();p&&o.push(p)}o.push(this.customErrorValidator(e)),n.setValidators(o),setTimeout(()=>{n.updateValueAndValidity({emitEvent:!0}),this.markInputTouchState(t,!0)},0)}deleteErrorMessage(t){delete this.errorMessage()?.[t]}markInputTouchState(t,e){this.ibCreditForm.get(t)?.[e?"markAsTouched":"markAsUntouched"]()}customErrorValidator(t){return e=>t?{customError:!0}:null}getIndividualField(t){return this.ibCreditFormFeilds().find(e=>e.name===t)}isFieldEnabled(t){return!t.condition}updateStepIndex(t){this.selectedStepIndex.set(t)}verifyGstNo(){this.fetchGstDetailsByGstNo(new W(O.GST,this.getInputFieldValue(_.GST_IN)))}_getButtonObjectByIndex(t){if(t<0||t>=this.ibCreditFormConfig().length)return null;let e=this.ibCreditFormConfig()[t];return e&&e.button?e.button:null}_updateActionButtonObject(t,e){let i=this.ibCreditFormConfig();i[t]&&i[t].button&&(i[t].button=b(b({},this._getButtonObjectByIndex(t)),e),this.ibCreditFormConfig.set(i))}async fetchGstDetailsByGstNo(t,e){if(!this.isInputInvalid(_.GST_IN))return this.showLoader.set(V(b({},this.showLoader()),{[_.GST_IN]:!0})),this.apiService.callVerificationApi({type:t?.type,gstNumber:t?.gstNumber,payload:{formType:K.IB_CREDIT_FORM,formData:this.getFormData()}}).subscribe({next:async i=>{this.showLoader.set(V(b({},this.showLoader()),{[_.GST_IN]:!1}));let n=i.RESPONSE?.data;if(n.status||(this.setCustomError(_.GST_IN,!0),this.errorMessage.set(V(b({},this.errorMessage()),{[_.GST_IN]:{text:i.RESPONSE?.data?.message,type:R.ERROR}}))),n.status){this.deleteErrorMessage(_.GST_IN),this.setCustomError(_.GST_IN,!1);let o=this.getIndividualField(_.GST_IN);if(o.isVerified=!0,o.actions.verifyButton.showVerifyButton=!1,this.verifyGstInValue.set(n.gst),this.updateFormField(o),this.gstInVerified.set(!0),this.trackingAction?.GST&&t?.gstNumber){let p={tracking:this.trackingAction.GST};super.getTrackingData(p,t?.gstNumber)&&this.actionEvent({actionData:p})}}},error:i=>{this.setCustomError(_.GST_IN,!0),this.errorMessage.set(V(b({},this.errorMessage()),{[_.GST_IN]:{text:"Gst details not founds",type:R.ERROR}}))}})}updateFormField(t){let e=this.ibCreditFormFeilds(),i=e.findIndex(n=>n.name===t.name);if(i!==-1){let n=[...e.slice(0,i),t,...e.slice(i+1)];this.ibCreditFormFeilds.set(n)}}subscribeToFirstStepValidation(){this.ibCreditForm.get(_.GST_IN)?.valueChanges.subscribe(t=>{this.disableSubmitButton.set(this.isInputInvalid(_.GST_IN)),this.isInputInvalid(_.GST_IN)&&this.validateGstin()}),this.ibCreditForm.get(_.MOBILE_NO)?.valueChanges.subscribe(t=>{if(t!==this.data?.payload?.[_.MOBILE_NO]){this.mobileNoVerified.set(!1);let e=this.getIndividualField(_.MOBILE_NO);e.actions.verifyButton.showVerifyButton=!0,e.isVerified=!1}}),this.ibCreditForm.get(_.FINANCE_PERSON_NAME)?.valueChanges.subscribe(t=>{this.disableSubmitButton.set(this.isInputInvalid(_.FINANCE_PERSON_NAME))}),this.ibCreditForm.get(_.FINANCE_PHONE)?.valueChanges.subscribe(t=>{this.disableSubmitButton.set(this.isInputInvalid(_.FINANCE_PHONE))}),this.ibCreditForm.events.subscribe(t=>{this.isFirstStepIsValid()})}async _validateForm(){let t=[];
311return Object.keys(this.ibCreditForm.controls).forEach(e=>{let i=this.ibCreditForm.get(e);i&&i.invalid&&(t.push(e),i.markAsTouched())}),!!this.ibCreditForm.invalid}async validateCustomRules(){let t=!1;return this.mobileNoVerified()||(t=!0,this.ibCreditForm.get([_.MOBILE_NO])?.markAsUntouched(),this.errorMessage.set({[_.MOBILE_NO]:{text:"Please verify the Phone no.",type:R.ERROR}})),t}async submitIbCredit(t,e,i){if(this.isFirstStepIsValid(),!await this._validateForm()){let n=await this._getIbCreditFromData(),o={actionData:{type:D.SUBMIT_IB_CREDIT_FORM,params:b(b({},n),i)}};this.actionEvent(o)}}static{this.\u0275fac=function(e){return new(e||l)(L(Et),L(Rt))}}static{this.\u0275cmp=G({type:l,selectors:[["ib-credit-form"]],viewQuery:function(e,i){if(e&1&&X(vi,5),e&2){let n;J(n=Z())&&(i.stepper=n.first)}},hostVars:4,hostBindings:function(e,i){e&2&&(P(i.ngStyle),Y(i.ngClass))},inputs:{ngClass:"ngClass",ngStyle:"ngStyle",actionEvent:"actionEvent",slot:[1,"slot"]},features:[U],decls:2,vars:1,consts:[["ib_credit_stepper",""],[4,"ngFor","ngForOf"],[3,"formGroup"],[1,"text-sm","md:text-lg","font-semibold","text-foreground","mb-[10px]"],[1,"grid","grid-cols-1","md:grid-cols-4","gap-x-[20px]","gap-y-[20px]","mt-2","mb-8"],["class","flex flex-wrap justify-center md:justify-end gap-[10px]",4,"ngIf"],[1,"border-t","border-gray-300"],["class","md:col-span-2",3,"style","display",4,"ngIf"],[1,"md:col-span-2"],[1,"relative"],["appearance","outline",1,"w-full","mt-2","pt-3",3,"ngClass"],[1,"!text-[14px]"],["matInput","",1,"placeholder-truncate","w-full","rounded-sm","!text-[14px]","-translate-y-[7px]",3,"input","click","blur","keypress","disabled","readonly","id","formControlName","placeholder","type","ngStyle"],[1,"text-[11px]","px-1","text-[#6c6c6c]"],["class","p-2",4,"ngIf"],["id","for_action"],["class","text-[#3BB000] font-semibold text-[12px] text-left mt-1",4,"ngIf"],["class","text-[12px] text-[red] mb-[7px] mt-[3px] text-left",4,"ngIf"],["class","icon absolute flex items-center justify-center -top-[11px] bottom-1 right-px",4,"ngIf"],[1,"icon","absolute","flex","items-center","justify-center","-top-[11px]","bottom-1","right-px"],["mat-flat-button","","color","primary","matSuffix","","type","button",1,"text-[#fff]","text-[13px]","pt-[7px]","pb-[7px]","pl-[8px]","pr-[8px]","font-[600]","rounded","bg-[#467d91]","hover:!bg-[#2f2f2f]",3,"click","disabled"],["class","animate-spin h-4 w-4 text-white","xmlns","http://www.w3.org/2000/svg","fill","none","viewBox","0 0 24 24",4,"ngIf"],[4,"ngIf"],["xmlns","http://www.w3.org/2000/svg","fill","none","viewBox","0 0 24 24",1,"animate-spin","h-4","w-4","text-white"],["cx","12","cy","12","r","10","stroke","currentColor","stroke-width","4",1,"opacity-25"],["fill","currentColor","d","M4 12a8 8 0 018-8v8z",1,"opacity-75"],["class","icon absolute flex items-center justify-center -top-[11px] bottom-1 -right-[20px] px-[10px]",4,"ngIf"],[1,"icon","absolute","flex","items-center","justify-center","-top-[11px]","bottom-1","-right-[20px]","px-[10px]"],["src","../assets/assets-new/images/check-1.svg",1,"w-5","h-5","flex-shrink-0"],[1,"p-2"],[1,"flex","justify-between","mt-4"],[1,"text-[#F94D00]","font-semibold","text-[12px]","cursor-pointer","underline","mt-1",3,"click"],[1,"underline","text-[12px]","text-[#F94D00]","cursor-pointer","font-semibold","mt-1",3,"click"],[1,"text-[#3BB000]","font-semibold","text-[12px]","text-left","mt-1"],[1,"text-[#c00100]","text-[13px]","text-left","mt-1"],[1,"text-[12px]","text-[red]","mb-[7px]","mt-[3px]","text-left"],[1,"flex","flex-wrap","justify-center","md:justify-end","gap-[10px]"],["mat-button","",1,"border","bg-[#F43F0C]","text-[#ffffff]","disabled:bg-[#a4a4a4]","disabled:text-[#fff]","disabled:cursor-not-allowed","w-auto","flex","items-center","pt-[14px]","pb-[14px]","pl-[35px]","pr-[35px]","font-[500]","m-auto","text-[15px]","rounded-[4px]","mt-[5px]",2,"border-color","#f43f0c !important",3,"click","disabled"]],template:function(e,i){e&1&&(x(0,ji,18,5,"div",1),s(1,`
312`)),e&2&&f("ngForOf",i.ibCreditFormConfig())},dependencies:[j,mt,ct,pt,_t,Ft,Ct,ht,xt,bt,It,vt,St,Nt,yt,re,Tt,ue,At,Mt,Ot,gt,Bt,le,
312se,ft],styles:[`.mat-stepper-vertical[_ngcontent-%COMP%], .mat-stepper-horizontal[_ngcontent-%COMP%]{display:block;font-family:var(--font-family)!important;background:#fff8f600!important}[_nghost-%COMP%]     .mat-mdc-select .mat-mdc-select-trigger .mat-mdc-select-arrow-wrapper{display:contents!important}[_nghost-%COMP%]     .mat-mdc-form-field-has-icon-suffix .mat-mdc-text-field-wrapper{padding-left:8px}[_nghost-%COMP%]     input[disabled]{background-color:#f0f0f0;color:#999;cursor:not-allowed}[_nghost-%COMP%]     .mat-mdc-text-field-wrapper{background-color:#fdfdfd!important;height:45px!important}[_nghost-%COMP%]     .mat-mdc-notch-piece{border-color:#c2c2c2!important}[_nghost-%COMP%]     .mdc-notched-outline__notch{border-left:none!important}.mat-mdc-option[_ngcontent-%COMP%]{min-height:32px!important}[_nghost-%COMP%]     .mat-stepper-horizontal .mat-step .mat-step-header{height:40px;padding:8px 24px!important;background-color:transparent!important;overflow:hidden}[_nghost-%COMP%]     .mat-horizontal-stepper-header{height:40px;margin-top:5px}[_nghost-%COMP%]     .mat-stepper-horizontal .mat-step .mat-stepper-horizontal-line:before{top:calc(19px - (var(--mat-stepper-header-height) - 24px) / 2);bottom:calc(17px - (var(--mat-stepper-header-height) - 24px) / 2)}[_nghost-%COMP%]     .mdc-floating-label--required:not(.mdc-floating-label--hide-required-marker):after{color:red}[_nghost-%COMP%]     .mat-mdc-form-field:not(.mat-form-field-disabled) .mat-mdc-floating-label.mdc-floating-label{top:21px!important}[_nghost-%COMP%]     input[readonly]{background-color:#f0f0f0;color:#999;border-color:#ccc}[_nghost-%COMP%]     .form-field-disabled>.mat-mdc-text-field-wrapper{width:100%;z-index:0;background-color:#80808012;cursor:not-allowed}[_nghost-%COMP%]     .mat-mdc-form-field-error-wrapper{position:absolute;top:0;left:0;right:0;padding:0}.form-field-disabled[_ngcontent-%COMP%]{cursor:not-allowed;pointer-events:none;opacity:.6}@media(max-width:600px){mat-vertical-stepper[_ngcontent-%COMP%]{width:100%;margin-bottom:20px}mat-form-field[_ngcontent-%COMP%]{width:100%}}[_nghost-%COMP%]     .mat-mdc-form-field-error{display:flex}[_nghost-%COMP%]     .mat-mdc-form-field-hint-wrapper{padding:0}[_nghost-%COMP%]     .mat-divider{border-color:#dbdbdb!important;margin-top:-10px!important;margin-bottom:10px!important;border-width:3px}.responsive-text[_ngcontent-%COMP%]{font-size:14px}.padding[_ngcontent-%COMP%]{padding:8px 10px}@media(min-width:480px){.responsive-text[_ngcontent-%COMP%]{font-size:13px}}@media(min-width:640px){.responsive-text[_ngcontent-%COMP%]{font-size:14px}}@media(min-width:768px){.responsive-text[_ngcontent-%COMP%]{font-size:15px}}@media(min-width:1024px){.responsive-text[_ngcontent-%COMP%]{font-size:16px}}@media(min-width:1280px){.responsive-text[_ngcontent-%COMP%]{font-size:14px}.mat-mdc-form-field-input-control.mat-mdc-form-field-input-control[_ngcontent-%COMP%]{font-size:14px!important}}
313/*# sourceMappingURL=https://static3.industrybuying.com/wakanda-turbo/assets/RELEASE-v1.255/static/browser/ib-credit-form.component-KLF556UJ.css.map */`]})}}return l})();function qi(l,c){if(l&1&&(s(0,`
314    `),A(1,"business-registration-dynamic-form",0),s(2,`
315  `)),l&2){let t=r();a(),f("slot",t.slot)("actionEvent",t.actionEvent)}}function Hi(l,c){if(l&1&&(s(0,`
316    `),A(1,"feedback-form",0),s(2,`
317  `)),l&2){let t=r();a(),f("slot",t.slot)("actionEvent",t.actionEvent)}}function zi(l,c){if(l&1&&(s(0,`
318    `),A(1,"ib-credit-form",0),s(2,`
319  `)),l&2){let t=r();a(),f("slot",t.slot)("actionEvent",t.actionEvent)}}var Fs=(()=>{class l extends q{constructor(){super(),this.formType=K}ngOnInit(){this.data=this.slot.widget.data}static{this.\u0275fac=function(e){return new(e||l)}}static{this.\u0275cmp=G({type:l,selectors:[["forms"]],hostVars:4,hostBindings:function(e,i){e&2&&(P(i.ngStyle),Y(i.ngClass))},inputs:{ngClass:"ngClass",ngStyle:"ngStyle",actionEvent:"actionEvent",slot:"slot"},features:[U],decls:4,vars:1,consts:[[3,"slot","actionEvent"]],template:function(e,i){if(e&1&&(E(0,qi,3,2)(1,Hi,3,2)(2,zi,3,2),s(3,`
320`)),e&2){let n;F((n=i.slot.widget==null?null:i.slot.widget.viewType)===i.formType.BUSINESS_REGISTRATION_FORM?0:n===i.formType.FEEDBACK_FORM?1:n===i.formType.IB_CREDIT_FORM?2:-1)}},dependencies:[j,Ce,ve,Ie],encapsulation:2})}}return l})();export{Fs as FormComponent};
321//# sourceMappingURL=chunk-SWNH4VZM.js.map

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.