PageSourceSearch

https://uniteddataconnect.com/chunk-B3XyroS02.js

js uniteddataconnect.com collected 2026-10-07 21:20:45 UTC 108,827 bytes, 26 lines download raw bytes

1import{Ar as pw,Cr as og,D as ED,Dt as PF,Et as Ow,J as Ib,L as Fw,Ln as es,Mn as eE,N as FF,O as Eb,Or as pg,Pr as qr,U as Hh,Un as gb,Ur as ty,Wn as gg,Wr as ud,Xr as vb,Z as Ip,Zn as hg,Zr as vg,an as Vh,br as ne,ci as yg,cr as kb,di as zE,dr as lw,f as Bl,fr as mT,gn as Zh,i as AI,l as BF,ln as Wl,lr as ld,nt as Jb,or as jw,pr as mb,sr as kI,t as $$1,v as Cb,yt as Ni}from"./chunk-BDM6WsAu.js";import"./chunk-ChqQs_00.js";import"./chunk-B9WYoD4X.js";import{t as u}from"./chunk-Dfdyfum4.js";import"./chunk-zlUweSdg.js";import{a as Ki,i as Jt$1,o as Qt$1}from"./chunk-DebN01VD.js";import"./chunk-ys_DYaDe.js";import{C as mt$1,S as hn,T as un,_ as Zt$1,f as Xe$1,h as Yt$1,p as Xn,t as $n,u as Qn,w as qn}from"./chunk-BnY58xjn.js";import{n as wt$1}from"./chunk-B6coe9rb.js";import{n as K,r as V$1}from"./chunk-C27-8Eg5.js";import{t as u1}from"./chunk-BObuTj8M.js";import{i as xe,n as Re$1,r as Se,t as Oe$1}from"./chunk-CGzYMJSh.js";import{a as xo,d as f,u as a}from"./main-72K5J4LV.js";import{t as b}from"./chunk-DilGn60M.js";var V=mT(a());var Ie=(()=>{class n{constructor(){}getCartSchema(){return{type:`cart`,id:``,orgID:``,personID:``,items:[]}}getEmptyPerson(){return{id:``,type:`persons`,firstName:``,lastName:``,suffix:null,prefix:null,gender:``,DOB:null,email:[{type:`business`,address:``}],phone:[{type:`phone`,title:`business`,number:``,validateMobile:!0}],address:[],roles:[{orgID:``,role:`client`,type:`client`,isOrgAdmin:!1,isGlobalAdmin:!1,rolesBasedSchema:{creationDate:new Date().getTime(),lastUpdateDate:new Date().getTime()},stripeCustID:``,subscriptions:{emailSub:!0,phoneSub:!1},status:[{timeStamp:``,level:1,statusType:`Contact`}],notes:[]}]}}getAppointmentTemplate(){return{type:`newAppointment`,id:``,orgID:``,domainDiscipline:``,customerID:``,officeID:``,source:`storefront`,dateCreated:0,dateBooked:0,cardSelected:``,status:`paid`,deliveryStatus:`pending`,deliveryMethodID:``,deliveryAddress:{id:``,address1:``,address2:``,city:``,state:``,type:``,zip:``},trackingLink:``,notifyUser:!1,clientNotes:``,customerNotes:``,appointmentDetails:[],activity:[]}}getOrderTemplate(){return{id:``,appointmentID:``,type:`order`,subType:``,orgID:``,domainDiscipline:``,customerID:``,officeID:``,dateCreated:0,deliveryMethodID:``,deliveryAddress:{id:``,address1:``,address2:``,city:``,state:``,type:``,zip:``},orderDetails:[],pricing:{subTotal:0,discounts:[],tipPercent:0,tipValue:0,deposit:0,deliveryCharge:0,salesTax:0,estimatedTotal:0,grandTotal:0},payment:{balanceDue:0,charges:[],refunds:[],adjustedAmount:{remainingDeposit:0,remainingPayment:0,remainingTotal:0}}}}static{this.ɵfac=function(i){return new(i||n)}}static{this.ɵprov=ne({token:n,factory:n.ɵfac,providedIn:`root`})}}return n})();function Ae(n,c){n&1&&(Ni(0,`span`),lw(1,`s`),Bl())}function Oe(n,c){if(n&1&&(Ni(0,`div`)(1,`div`,92),lw(2),Bl()()),n&2){let e=c.$implicit;zE(2),pg(e.type)}}function Ne(n,c){if(n&1&&(Ni(0,`div`,120),Eb(1,Oe,3,1,`div`,null,vb),Bl()),n&2){let e=kb().$implicit;zE(),Ib(e.selectedColor)}}function $e(n,c){if(n&1){let e=Cb();Ni(0,`div`,64)(1,`div`,103),Hh(2,`img`,104),Bl(),Ni(3,`div`,105)(4,`div`,106)(5,`div`,107)(6,`div`,108),lw(7),Bl(),Ni(8,`div`,109),lw(9),Ow(10,`currency`),Bl()(),Ni(11,`div`,110)(12,`label`,111),lw(13,`Quantity`),Bl(),Ni(14,`div`,112)(15,`div`,113),Zh(`click`,function(){let t=ld(e).$index;return ud(kb(2).onQuantityChange(`minus`,t))}),Ni(16,`span`,114),lw(17,`-`),Bl()(),Ni(18,`div`,115)(19,`input`,116),Zh(`keyup`,function(){let t=ld(e).$index;return ud(kb(2).onQuantityChange(``,t))})(`keypress`,function(t){ld(e);return ud(kb(2).preventKeyPress(t))}),vg(`ngModelChange`,function(t){let s=ld(e).$implicit;return pw(s.quantity,t)||(s.quantity=t),ud(t)}),Bl(),AI(),Ni(20,`div`,117),Hh(21,`i`,118),Bl()(),Ni(22,`div`,113),Zh(`click`,function(){let t=ld(e).$index;return ud(kb(2).onQuantityChange(`plus`,t))}),Ni(23,`span`,119),lw(24,`+`),Bl()()()(),gb(25,Ne,3,0,`div`,120),Bl(),Ni(26,`div`,121),Zh(`click`,function(){let t=ld(e).$index;return ud(kb(2).removeItemFromCart(t))}),Ni(27,`label`,122),lw(28,`Remove `),Hh(29,`mat-icon`,123),Bl()()()()}if(n&2){let e=c.$implicit,i=c.$index,t=kb(2);zE(2),Vh(`src`,e.productImage,Ip),zE(5),pg(e.name),zE(2),Wl(` `,jw(10,9,e.price*e.quantity,`USD`,`symbol`)),zE(10),og(`color`,t.widgetColor.fg1Color),yg(`ngModel`,e.quantity),kI(),zE(),Jb(`icon-container icon-container`+i),zE(5),mb(e.selectedColor.length>0?25:-1)}}
1function Fe(n,c){n&1&&(Ni(0,`span`),lw(1,`,\xA0`),Bl())}function Be(n,c){if(n&1&&(Ni(0,`span`),lw(1),gb(2,Fe,2,0,`span`),Bl()),n&2){let e=c.$implicit,i=c.$index,t=kb(3).$implicit;zE(),pg(e.type),zE(),mb(i!=t.selectedColor.length-1?2:-1)}}function Ve(n,c){if(n&1&&(Ni(0,`span`),lw(1,`(`),Eb(2,Be,3,2,`span`,null,vb),lw(4,`)`),Bl()),n&2){let e=kb(2).$implicit;zE(2),Ib(e.selectedColor)}}function ze(n,c){if(n&1&&(Ni(0,`td`,124)(1,`div`),lw(2),gb(3,Ve,5,0,`span`),lw(4),Bl()()),n&2){let e=kb().$implicit;zE(2),Wl(``,e.name,` `),zE(),mb(e.selectedColor.length>0?3:-1),zE(),Wl(` X `,e.quantity,` `)}}function Ue(n,c){if(n&1&&(Ni(0,`td`,125),lw(1),Ow(2,`currency`),Bl()),n&2){let e=kb().$implicit;zE(),Wl(` +`,jw(2,1,e.price,`USD`,`symbol`))}}function qe(n,c){if(n&1&&(Ni(0,`td`,125),lw(1),Ow(2,`currency`),Bl()),n&2){let e=kb().$implicit;zE(),Wl(` +`,jw(2,1,e.price*e.quantity,`USD`,`symbol`))}}function Re(n,c){if(n&1&&(Ni(0,`tr`),gb(1,ze,5,3,`td`,124),gb(2,Ue,3,5,`td`,125),gb(3,qe,3,5,`td`,125),Bl()),n&2){let e=c.$implicit,i=kb(2);zE(),mb(e.quantity!=0&&i.view!=`mobileView`?1:-1),zE(),mb(e.quantity!=0?2:-1),zE(),mb(e.quantity!=0?3:-1)}}function We(n,c){n&1&&Hh(0,`td`)}function je(n,c){if(n&1&&(Ni(0,`tr`,72)(1,`td`),lw(2,`Sales tax\xA0`),Bl(),gb(3,We,1,0,`td`),Ni(4,`td`,74),lw(5),Ow(6,`currency`),Bl()()),n&2){let e=kb(2);zE(3),mb(e.view!=`mobileView`?3:-1),zE(2),Wl(` +`,jw(6,2,e.tax,`USD`,`symbol`),` `)}}function He(n,c){n&1&&Hh(0,`td`)}function Xe(n,c){if(n&1){let e=Cb();Ni(0,`button`,126),Zh(`click`,function(){ld(e);return ud(kb(2).navigateToStep(1,2))}),lw(1,`CHECKOUT`),Bl()}}function Je(n,c){if(n&1&&(Ni(0,`div`,87)(1,`div`,92),lw(2),Bl(),Ni(3,`div`,92),lw(4),Bl(),Ni(5,`div`,92),lw(6),Bl()()),n&2){let e=kb(2);zE(2),hg(``,e.personDoc.firstName,` `,e.personDoc.lastName),zE(2),pg(e.personDoc.email[0].address),zE(2),pg(e.personDoc.phone[0].number)}}function Ze(n,c){if(n&1){let e=Cb();Ni(0,`div`,142),lw(1,`Already have an account? `),Ni(2,`button`,144),Zh(`click`,function(){ld(e);return ud(kb(4).displayLoginModal())}),lw(3,`Sign in`),Bl()()}}function Ke(n,c){if(n&1&&(Ni(0,`div`,143),lw(1),Bl()),n&2){let e=kb(4);zE(),Wl(`Hello `,e.personDoc.firstName,`, you have logged in successfully. `)}}function Ye(n,c){if(n&1&&(Ni(0,`div`),gb(1,Ze,4,0,`div`,142),gb(2,Ke,2,1,`div`,143),Bl()),n&2){let e=kb(3);zE(),mb(e.isLoggedInUser!=!0?1:-1),zE(),mb(e.isLoggedInUser?2:-1)}}function Ge(n,c){if(n&1&&(Ni(0,`span`,140),Hh(1,`div`,150),Bl()),n&2){let e=kb(4);zE(),Vh(`innerHtml`,e.configDoc.userExistsText.value,eE)}}function Qe(n,c){if(n&1){let e=Cb();Ni(0,`div`)(1,`div`,31)(2,`label`,127),lw(3,`Password`),Bl(),Ni(4,`input`,145),vg(`ngModelChange`,function(t){ld(e);let s=kb(3);return pw(s.password,t)||(s.password=t),ud(t)}),Zh(`keyup`,function(){ld(e);return ud(kb(3).validate(`password`))}),Bl(),AI(),Ni(5,`span`,146),lw(6,`Please enter password.`),Bl()(),Ni(7,`div`,31)(8,`label`,127),lw(9,`Confirm Password`),Bl(),Ni(10,`input`,147),vg(`ngModelChange`,function(t){ld(e);let s=kb(3);return pw(s.cfmPassword,t)||(s.cfmPassword=t),ud(t)}),Zh(`keyup`,function(){ld(e);return ud(kb(3).validate(`confirmPassword`))}),Bl(),AI(),Ni(11,`span`,148),lw(12,`Confirm password does not match the password.`),Bl(),Ni(13,`span`,149),lw(14,`Please enter password.`),Bl()(),gb(15,Ge,2,1,`span`,140),Bl()}if(n&2){let e=kb(3);zE(4),yg(`ngModel`,e.password),kI(),zE(6),yg(`ngModel`,e.cfmPassword),kI(),zE(5),mb(e.userExists&&e.configDoc!=null&&e.configDoc.userExistsText.value?15:-1)}}function et(n,c){n&1&&(Ni(0,`span`,140),lw(1,` Please enter correct address. `),Bl())}function tt(n,c){if(n&1){let e=Cb();Ni(0,`div`,89),gb(1,Ye,3,2,`div`),Ni(2,`label`,127),lw(3,`First Name`),Bl(),Ni(4,`div`,128)(5,`input`,129),vg(`ngModelChange`,function(t){ld(e);let s=kb(2);return pw(s.personDoc.firstName,t)||(s.personDoc.firstName=t),ud(t)}),Zh(`keyup`,function(){ld(e);return ud(kb(2).validate(`fName`))}),Bl(),AI(),Ni(6,`span`,130),lw(7,`First Name is invalid`),Bl()(),Ni(8,`label`,127),lw(9,`Last Name`),Bl(),Ni(10,`div`,131)(11,`input`,132),vg(`ngModelChange`,function(t){ld(e);let s=kb(2);return pw(s.personDoc.lastName,t)||(s.personDoc.lastName=t),ud(t)}),Zh(`keyup`,function(){ld(e);return ud(kb(2).validate(`lName`))}
1),Bl(),AI(),Ni(12,`span`,133),lw(13,`Last name is invalid`),Bl()(),Ni(14,`label`,127),lw(15,`Phone Number`),Bl(),Ni(16,`div`,134)(17,`input`,135),vg(`ngModelChange`,function(t){ld(e);let s=kb(2);return pw(s.personDoc.phone[0].number,t)||(s.personDoc.phone[0].number=t),ud(t)}),Zh(`keyup`,function(){ld(e);return ud(kb(2).validate(`phone`))}),Bl(),AI(),Ni(18,`span`,136),lw(19,`Phone Number is invalid`),Bl()(),Ni(20,`label`,127),lw(21,`Email`),Bl(),Ni(22,`div`,137)(23,`input`,138),vg(`ngModelChange`,function(t){ld(e);let s=kb(2);return pw(s.personDoc.email[0].address,t)||(s.personDoc.email[0].address=t),ud(t)}),Zh(`keyup`,function(){ld(e);return ud(kb(2).validate(`email`))}),Bl(),AI(),Ni(24,`span`,139),lw(25,`Email is invalid`),Bl()(),gb(26,Qe,16,3,`div`),gb(27,et,2,0,`span`,140),Ni(28,`button`,141),Zh(`click`,function(){ld(e);return ud(kb(2).saveCustomerDetails())}),lw(29,`Continue`),Bl()()}if(n&2){let e=kb(2);zE(),mb(e.storeFrontLoginFlag?1:-1),zE(4),yg(`ngModel`,e.personDoc.firstName),kI(),zE(6),yg(`ngModel`,e.personDoc.lastName),kI(),zE(6),yg(`ngModel`,e.personDoc.phone[0].number),Vh(`maskito`,e.maskitoOptionsPhone),kI(),zE(6),yg(`ngModel`,e.personDoc.email[0].address),kI(),zE(3),mb(!e.isLoggedInUser&&e.storeFrontLoginFlag?26:-1),zE(),mb(e.incorrectAddressFlag==!0?27:-1),zE(),og(`background`,e.widgetColor.bg2Color)(`color`,e.widgetColor.fg2Color)}}function it(n,c){if(n&1&&(Ni(0,`div`,92),lw(1),Ow(2,`currency`),Bl()),n&2){let e=kb(2);zE(),hg(` `,e.deliveryMethods[e.deliveryIndex].method,` - `,jw(2,2,e.deliveryMethods[e.deliveryIndex].deliveryAmount,`USD`,`symbol`),` `)}}function nt(n,c){if(n&1&&(Ni(0,`div`,92),lw(1),Hh(2,`br`),lw(3),Bl()),n&2){let e=kb(2);zE(),hg(` Selected Address - `,e.personDoc.address[e.selectedAddressIndex].address1,` `,e.personDoc.address[e.selectedAddressIndex].address2,` `),zE(2),gg(``,e.personDoc.address[e.selectedAddressIndex].city,` `,e.personDoc.address[e.selectedAddressIndex].state,`, `,e.personDoc.address[e.selectedAddressIndex].zip,` `)}}function ot(n,c){if(n&1){let e=Cb();Ni(0,`div`,94)(1,`input`,151),Zh(`click`,function(){let t=ld(e).$index;return ud(kb(2).getDeliveryMethod(t))}),Bl(),Ni(2,`div`,152)(3,`div`,153)(4,`span`,154),lw(5),Bl()()(),Ni(6,`div`,155)(7,`div`,156),lw(8),Ow(9,`currency`),Bl()()()}if(n&2){let e=c.$implicit,i=c.$index;zE(),Vh(`id`,`methodOption`+i),zE(4),pg(e.method),zE(3),Wl(` `,jw(9,3,e.deliveryAmount,`USD`,`symbol`))}}function rt(n,c){if(n&1){let e=Cb();Ni(0,`div`,157)(1,`div`,159)(2,`div`,160),Zh(`click`,function(){let t=ld(e).$index;return ud(kb(3).deleteAddress(t))}),Hh(3,`mat-icon`,161),Bl(),Ni(4,`div`,162),lw(5,`Deliver to this address`),Bl(),Ni(6,`div`,163),lw(7),Hh(8,`br`),lw(9),Bl(),Ni(10,`div`,164)(11,`button`,165),Zh(`click`,function(){let t=ld(e).$index;return ud(kb(3).selectAddress(t))}),lw(12,`Select`),Bl(),Ni(13,`button`,166),Zh(`click`,function(){let t=ld(e).$index;return ud(kb(3).openAddress(t,`old`))}),lw(14,`Edit`),Bl()()()()}if(n&2){let e=c.$implicit,i=c.$index;zE(),Vh(`id`,`addressBlock`+i),zE(6),hg(``,e.address1,` `,e.address2,` `),zE(2),gg(``,e.city,` `,e.state,`, `,e.zip,` `),zE(2),Jb(`addressBtn`+i)}}function at(n,c){if(n&1){let e=Cb();Ni(0,`div`)(1,`div`,60),Eb(2,rt,15,8,`div`,157,vb),Bl(),Ni(4,`div`,158),Zh(`click`,function(){ld(e);return ud(kb(2).openAddress(-1,`new`))}),lw(5,`+ Add New Address`),Bl()()}if(n&2){let e=kb(2);zE(2),Ib(e.personDoc.address)}}function st(n,c){if(n&1&&Hh(0,`div`,96),n&2)Vh(`innerHtml`,kb(2).configDoc.deliveryUnavailableText.value,eE)}function dt(n,c){if(n&1){let e=Cb();Ni(0,`button`,167),Zh(`click`,function(){ld(e);return ud(kb(2).accordinBlock(`payment`,`paymentColor`))}),lw(1,`Continue`),Bl()}if(n&2){let e=kb(2);og(`background`,e.widgetColor.bg2Color)(`color`,e.widgetColor.fg2Color)}}function lt(n,c){if(n&1){let e=Cb();Ni(0,`div`,168),Zh(`click`,function(){ld(e);return ud(kb(2).accordinBlock(`payment`,`paymentColor`))}),Ni(1,`p`,169),lw(2,`3) Payment `),Bl()()}}function ct(n,c){if(n&1){let e=Cb();Ni(0,`div`,171)(1,`div`,175),Zh(`click`,function(){ld(e);return ud(kb(3).openTab(`savedCards`))}),lw(2,` Saved Cards `),Bl(),Ni(3,`div`,176),Zh(`click`,function(){ld(e);return ud(kb(3).openTab(`newCards`))}),lw(4,` New Card `),Bl()()}}function pt(n,c){n&1&&(Ni(0,`div`,172)(1,`form`,177),Hh(2,`div`,178),Bl(),Hh(3,`div`,179),Bl())}
1function mt(n,c){n&1&&(Ni(0,`span`),lw(1,`Expires on`),Bl())}function ut(n,c){if(n&1&&(Ni(0,`span`),gb(1,mt,2,0,`span`),lw(2),Bl()),n&2){let e=kb().$implicit,i=kb(4);zE(),mb(i.mobileViewFlag==0?1:-1),zE(),Wl(` `,e.expiryDate,` `)}}function ht(n,c){if(n&1){let e=Cb();Ni(0,`div`,180)(1,`div`,181)(2,`input`,182),Zh(`click`,function(){let t=ld(e).$index;return ud(kb(4).selectSavedCard(t))}),Bl()(),Ni(3,`div`,183)(4,`div`,60)(5,`div`,103),Hh(6,`img`,184),Bl(),Ni(7,`div`,185),lw(8),Bl(),Ni(9,`div`,186),gb(10,ut,3,2,`span`),Bl(),Ni(11,`div`,187),Zh(`click`,function(){let t=ld(e).$index;return ud(kb(4).removeCard(t))}),Hh(12,`mat-icon`,188),Bl()()()()}if(n&2){let e=c.$implicit,i=c.$index,t=kb(4);zE(2),Vh(`id`,`res-radio-card`+i),zE(),Vh(`id`,`res-saved-card`+i),zE(3),Vh(`src`,`https://ceadstorage.blob.core.windows.net/cead-images/`+e.brand+`.png`,Ip),zE(2),hg(``,e.brand,` •••• `,e.last4),zE(2),mb(t.accountType!=`authorize`?10:-1)}}function gt(n,c){n&1&&(Ni(0,`div`)(1,`p`,163),lw(2,`There are no Saved Cards.`),Bl()())}function Ct(n,c){if(n&1&&(Ni(0,`div`,32)(1,`b`),lw(2),Bl(),lw(3,` has been selected `),Bl()),n&2){let e=kb(4);zE(2),hg(``,e.selectedCard.brand,` card •••• `,e.selectedCard.last4,` `)}}function _t(n,c){if(n&1&&(Ni(0,`div`,173)(1,`div`,60),Eb(2,ht,13,6,`div`,180,vb),gb(4,gt,3,0,`div`),Bl(),gb(5,Ct,4,2,`div`,32),Bl()),n&2){let e=kb(3);zE(2),Ib(e.savedCardDetails),zE(2),mb(e.savedCardDetails.length==0?4:-1),zE(),mb(e.selectedCard!=null?5:-1)}}function vt(n,c){n&1&&(Ni(0,`span`),lw(1,`select saved card or `),Bl())}function ft(n,c){if(n&1){let e=Cb();Ni(0,`div`,102)(1,`button`,189),Zh(`click`,function(){ld(e);let t=kb(3);return ud(t.handlePaymentMethodSubmission(t.card))}),lw(2,`Pay`),Bl()()}if(n&2){let e=kb(3);zE(),og(`background`,e.widgetColor.bg2Color)(`color`,e.widgetColor.fg2Color)}}function xt(n,c){if(n&1){let e=Cb();Ni(0,`div`,102)(1,`button`,189),Zh(`click`,function(){ld(e);return ud(kb(3).savedCardPay())}),lw(2,`Pay`),Bl()()}if(n&2){let e=kb(3);zE(),og(`background`,e.widgetColor.bg2Color)(`color`,e.widgetColor.fg2Color)}}function yt(n,c){if(n&1&&(Ni(0,`div`,60)(1,`div`)(2,`div`,170),gb(3,ct,5,0,`div`,171),gb(4,pt,4,0,`div`,172),gb(5,_t,6,2,`div`,173),Ni(6,`div`,174),lw(7,` Please `),gb(8,vt,2,0,`span`),lw(9,`enter new card. `),Bl()()(),gb(10,ft,3,4,`div`,102),gb(11,xt,3,4,`div`,102),Bl()),n&2){let e=kb(2);zE(3),mb(e.storeFrontLoginFlag?3:-1),zE(),mb(e.accountType==`squareup`?4:-1),zE(),mb(e.storeFrontLoginFlag?5:-1),zE(3),mb(e.storeFrontLoginFlag?8:-1),zE(2),mb(e.tabOpen==`newCards`?10:-1),zE(),mb(e.tabOpen==`savedCards`?11:-1)}}function bt(n,c){n&1&&(Ni(0,`div`,195),lw(1,`Card number required!`),Bl())}function Dt(n,c){n&1&&(Ni(0,`div`,195),lw(1,`Please enter valid card number!`),Bl())}function wt(n,c){n&1&&(Ni(0,`div`,195),lw(1,`Expiration date is invalid! `),Bl())}function Pt(n,c){n&1&&(Ni(0,`div`,195),lw(1,`CVV is required! `),Bl())}function St(n,c){n&1&&(Ni(0,`div`,195),lw(1,`CVV is invalid! `),Bl())}function Tt(n,c){if(n&1){let e=Cb();Ni(0,`div`,172)(1,`div`,60)(2,`div`,192)(3,`label`,193),lw(4,`Card number`),Bl(),Ni(5,`input`,194),Zh(`keyup`,function(){ld(e);let t=kb(3);return ud(t.validateCard(t.userDetails.cardNumber))})(`keypress`,function(t){ld(e);return ud(kb(3).preventKeyPress(t))}),vg(`ngModelChange`,function(t){ld(e);let s=kb(3);return pw(s.userDetails.cardNumber,t)||(s.userDetails.cardNumber=t),ud(t)}),Bl(),AI(),gb(6,bt,2,0,`div`,195),gb(7,Dt,2,0,`div`,195),Bl()(),Ni(8,`div`,60)(9,`div`,196)(10,`div`,31)(11,`label`,193),lw(12,`Expiration`),Bl(),Ni(13,`input`,197),Zh(`keyup`,function(){ld(e);let t=kb(3);return ud(t.validateExpiryDate(t.userDetails.expiryDate))})(`keypress`,function(t){ld(e);return ud(kb(3).preventKeyPress(t))}),vg(`ngModelChange`,function(t){ld(e);let s=kb(3);return pw(s.userDetails.expiryDate,t)||(s.userDetails.expiryDate=t),ud(t)}),Bl(),AI(),gb(14,wt,2,0,`div`,195),Bl()(),Ni(15,`div`,198)(16,`div`,31)(17,`label`,199),lw(18,`CVV`),Bl(),Ni(19,`input`,200),vg(`ngModelChange`,function(t){ld(e);let s=kb(3);return pw(s.userDetails.cvv,t)||(s.userDetails.cvv=t),ud(t)}),Zh(`keyup`,function(){ld(e);let t=kb(3);return ud(t.validateCvv(t.userDetails.cvv))})(`keypress`,function(t){ld(e);return ud(kb(3).preventKeyPress(t))}),Bl(),AI(),gb(20,Pt,2,0,`div`,195),gb(21,St,2,0,`div`,195),Bl()()()()}if(n&2){let e=kb(3);zE(5),Vh(`maskito`,e.maskitoOptionsCard),yg(`ngModel`,e.userDetails.cardNumber),kI(),zE(),mb(e.cardEmpty?6:-1),zE(),mb(e.cardErrors?7:-1),zE(6),Vh(`maskito`,e.maskitoOptionsExpiry),yg(`ngModel`,e.userDetails.expiryDate),kI(),zE(),mb(e.expiryErrors?14:-1),zE(5),yg(`ngModel`,e.userDetails.cvv),kI(),zE(),mb(e.cvvEmpty?20:-1),zE(),mb(e.cvvLength?21:-1)}}function It(n,c){n&1&&(Ni(0,`span`),lw(1,`select saved card or `),Bl())}function Mt(n,c){if(n&1){let e=Cb();Ni(0,`div`,60)(1,`div`)(2,`div`,170)(3,`div`,190)(4,`h2`),lw(5,`Card Details`),Bl()(),gb(6,Tt,22,10,`div`,172),Ni(7,`div`,174),lw(8,` Please `),gb(9,It,2,0,`span`),lw(10,`enter new card. `),Bl()()(),Ni(11,`div`,102)(12,`button`,191),Zh(`click`,function(){ld(e);return ud(kb(2).stripeCardSubmitClick())}),lw(13,`Pay`),Bl()()()}if(n&2){let e=kb(2);zE(6),mb(e.accountType==`stripe`?6:-1),zE(3),mb(e.storeFrontLoginFlag?9:-1),zE(3),og(`background`,e.widgetColor.bg2Color)(`color`,e.widgetColor.fg2Color)}}function Et(n,c){n&1&&(Ni(0,`span`),lw(1,`,\xA0`),Bl())}function kt(n,c){if(n&1&&(Ni(0,`span`),lw(1),gb(2,Et,2,0,`span`),Bl()),n&2){let e=c.$implicit,i=c.$index,t=kb(3).$implicit;zE(),pg(e.type),zE(),mb(i!=t.selectedColor.length-1?2:-1)}}function Lt(n,c){if(n&1&&(Ni(0,`span`),lw(1,`(`),Eb(2,kt,3,2,`span`,null,vb),lw(4,`)`),Bl()),n&2){let e=kb(2).$implicit;zE(2),Ib(e.selectedColor)}}function At(n,c){if(n&1&&(Ni(0,`td`,124)(1,`div`),lw(2),gb(3,Lt,5,0,`span`),lw(4),Bl()()),n&2){let e=kb().$implicit;zE(2),Wl(``,e.name,` `),zE(),mb(e.selectedColor.length>0?3:-1),zE(),Wl(` X `,e.quantity,` `)}}function Ot(n,c){if(n&1&&(Ni(0,`td`,125),lw(1),Ow(2,`currency`),Bl()),n&2){let e=kb().$implicit;zE(),Wl(` +`,jw(2,1,e.price,`USD`,`symbol`))}}function Nt(n,c){if(n&1&&(Ni(0,`td`,125),lw(1),Ow(2,`currency`),Bl()),n&2){let e=kb().$implicit;zE(),Wl(` +`,jw(2,1,e.price*e.quantity,`USD`,`symbol`))}}function $t(n,c){if(n&1&&(Ni(0,`tr`),gb(1,At,5,3,`td`,124),gb(2,Ot,3,5,`td`,125),gb(3,Nt,3,5,`td`,125),Bl()),n&2){let e=c.$implicit,i=kb(2);zE(),mb(e.quantity!=0&&i.view!=`mobileView`?1:-1),zE(),mb(e.quantity!=0?2:-1),zE(),mb(e.quantity!=0?3:-1)}}function Ft(n,c){n&1&&Hh(0,`td`)}function Bt(n,c){if(n&1&&(Ni(0,`tr`,72)(1,`td`),lw(2,`Delivery Charges `),Bl(),gb(3,Ft,1,0,`td`),Ni(4,`td`,74),lw(5),Ow(6,`currency`),Bl()()),n&2){let e=kb(2);zE(3),mb(e.view!=`mobileView`?3:-1),zE(2),Wl(` +`,jw(6,2,e.deliveryCharges,`USD`,`symbol`),` `)}}function Vt(n,c){n&1&&Hh(0,`td`)}function zt(n,c){if(n&1&&(Ni(0,`tr`,72)(1,`td`),lw(2,`Sales tax\xA0`),Bl(),gb(3,Vt,1,0,`td`),Ni(4,`td`,74),lw(5),Ow(6,`currency`),Bl()()),n&2){let e=kb(2);zE(3),mb(e.view!=`mobileView`?3:-1),zE(2),Wl(` +`,jw(6,2,e.tax,`USD`,`symbol`),` `)}}function Ut(n,c){n&1&&Hh(0,`td`)}function qt(n,c){if(n&1){let e=Cb();Ni(0,`div`,5)(1,`div`,59)(2,`div`,60)(3,`div`,61)(4,`div`)(5,`p`,62),lw(6),gb(7,Ae,2,0,`span`),lw(8,`)`),Bl(),Ni(9,`p`,63),lw(10),Ow(11,`currency`),Bl()(),Eb(12,$e,30,13,`div`,64,vb),Bl(),Ni(14,`div`,65)(15,`div`,66)(16,`div`,67)(17,`p`,68),lw(18,`Order Details`),Bl(),Ni(19,`table`,69)(20,`thead`)(21,`tr`)(22,`th`,70),lw(23,`Name`),Bl(),Ni(24,`th`,71),lw(25,`Amount`),Bl(),Ni(26,`th`,71),lw(27,`Total`),Bl()()(),Ni(28,`tbody`),Eb(29,Re,4,3,`tr`,null,vb),gb(31,je,7,6,`tr`,72),Ni(32,`tr`,72)(33,`td`)(34,`div`,73)(35,`strong`),lw(36,`Total\xA0`),Bl()()(),gb(37,He,1,0,`td`),Ni(38,`td`,74)(39,`div`,73),lw(40),Ow(41,`currency`),Bl()()()()(),Ni(42,`div`,75),gb(43,Xe,2,0,`button`,76),Bl()()()()(),Ni(44,`div`,77
1),lw(45,`Some of the products are not available. Please try adding another product. `),Bl()(),Ni(46,`div`,78)(47,`div`,79)(48,`a`,80),Zh(`click`,function(){ld(e);return ud(kb().navigateToStep(2,1))}),Hh(49,`mat-icon`,81)(50,`div`,82),Bl()(),Ni(51,`div`,60)(52,`div`,83)(53,`div`,60)(54,`div`,84)(55,`div`,85)(56,`p`,86),Zh(`click`,function(){ld(e);return ud(kb().accordinBlock(`custmerDetails`,`customerText`))}),lw(57,`1) Customer Details `),Bl(),gb(58,Je,7,4,`div`,87),Bl(),Ni(59,`div`,88),gb(60,tt,30,12,`div`,89),Bl(),Ni(61,`div`,85)(62,`p`,90),Zh(`click`,function(){ld(e);return ud(kb().accordinBlock(`deliveryMethod`,`methodColor`))}),lw(63,`2) Delivery Method `),Bl(),Ni(64,`div`,91),gb(65,it,3,6,`div`,92),gb(66,nt,4,5,`div`,92),Bl()(),Ni(67,`div`,93),Eb(68,ot,10,7,`div`,94,vb),Ni(70,`span`,95),lw(71,`Select delivery method`),Bl(),gb(72,at,6,0,`div`),gb(73,st,1,1,`div`,96),Ni(74,`span`,97),lw(75,`Select address for delivery.`),Bl(),gb(76,dt,2,4,`button`,98),Bl(),gb(77,lt,3,0,`div`,85),Ni(78,`div`,99),Zh(`click`,function(){ld(e);return ud(kb().accordinBlock(`payment`,`paymentColor`))}),gb(79,yt,12,6,`div`,60),gb(80,Mt,14,6,`div`,60),Bl()()()(),Ni(81,`div`,100)(82,`div`,101)(83,`div`,67)(84,`table`,69)(85,`thead`)(86,`tr`)(87,`th`,70),lw(88,`Name`),Bl(),Ni(89,`th`,71),lw(90,`Amount`),Bl(),Ni(91,`th`,71),lw(92,`Total`),Bl()()(),Ni(93,`tbody`),Eb(94,$t,4,3,`tr`,null,vb),gb(96,Bt,7,6,`tr`,72),gb(97,zt,7,6,`tr`,72),Ni(98,`tr`,72)(99,`td`)(100,`div`,73)(101,`strong`),lw(102,`Total\xA0`),Bl()()(),gb(103,Ut,1,0,`td`),Ni(104,`td`,102)(105,`div`,73),lw(106),Ow(107,`currency`),Bl()()()()()()()()()()()}if(n&2){let e=kb();zE(6),Wl(`My Shopping Bag (`,e.cartProductList.length,` Item`),zE(),mb(e.cartProductList.length>1?7:-1),zE(3),Wl(`Total: `,jw(11,31,e.cartTotal,`USD`,`symbol`)),zE(2),Ib(e.cartProductList),zE(7),og(`color`,e.widgetColor.fg1Color),zE(10),Ib(e.cartProductList),zE(2),mb(e.tax!=0?31:-1),zE(6),mb(e.view!=`mobileView`?37:-1),zE(3),Wl(` `,jw(41,35,e.cartTotal,`USD`,`symbol`),` `),zE(3),mb(e.cartHasItems==!0?43:-1),zE(),og(`display`,e.anyItemOutOfStock?`block`:`none`),zE(12),og(`color`,e.widgetColor.fg1Color),zE(2),mb(e.personDoc!=null?58:-1),zE(2),mb(e.personDoc!=null?60:-1),zE(2),og(`color`,e.widgetColor.fg1Color),zE(3),mb(e.deliveryIndex!=-1?65:-1),zE(),mb(e.selectedAddressIndex!=-1?66:-1),zE(2),Ib(e.deliveryMethods),zE(4),mb(e.displayAddressModal==!0?72:-1),zE(),mb(e.cakeDeliveryCharge==-1?73:-1),zE(3),mb(e.cakeDeliveryCharge!=-1?76:-1),zE(),mb(e.cakeDeliveryCharge!=-1?77:-1),zE(2),mb(e.accountType==`squareup`?79:-1),zE(),mb(e.accountType==`stripe`?80:-1),zE(4),og(`color`,e.widgetColor.fg1Color),zE(10),Ib(e.cartProductList),zE(2),mb(e.deliveryCharges!=null?96:-1),zE(),mb(e.tax!=0?97:-1),zE(6),mb(e.view!=`mobileView`?103:-1),zE(3),Wl(` `,jw(107,39,e.totalAmount,`USD`,`symbol`),` `)}}function Rt(n,c){n&1&&(Ni(0,`div`,6),Hh(1,`div`,201),Ni(2,`div`,202),Hh(3,`img`,203),Bl(),Hh(4,`div`,201),Bl())}function Wt(n,c){if(n&1){let e=Cb();Ni(0,`div`,13)(1,`div`,204)(2,`div`,205)(3,`label`,206),lw(4,`Address 1`),Bl(),Ni(5,`input`,207),vg(`ngModelChange`,function(t){ld(e);let s=kb();return pw(s.currAddress.address1,t)||(s.currAddress.address1=t),ud(t)}),Bl(),AI(),Bl(),Ni(6,`div`,208)(7,`label`,209),lw(8,`Address 2`),Bl(),Ni(9,`input`,210),vg(`ngModelChange`,function(t){ld(e);let s=kb();return pw(s.currAddress.address2,t)||(s.currAddress.address2=t),ud(t)}),Bl(),AI(),Bl(),Ni(10,`div`,211)(11,`label`,212),lw(12,`City`),Bl(),Ni(13,`input`,213),vg(`ngModelChange`,function(t){ld(e);let s=kb();return pw(s.currAddress.city,t)||(s.currAddress.city=t),ud(t)}),Bl(),AI(),Bl(),Ni(14,`div`,214)(15,`label`,215),lw(16,`State`),Bl(),Ni(17,`input`,216),vg(`ngModelChange`,function(t){ld(e);let s=kb();return pw(s.currAddress.state,t)||(s.currAddress.state=t),ud(t)}),Zh(`keyup`,function(){ld(e);let t=kb();return ud(t.currAddress.state=t.currAddress.state.toUpperCase())}),Bl(),AI(),Bl(),Ni(18,`div`,211)(19,`label`,217),lw(20,`Zip`),Bl(),Ni(21,`input`,218),vg(`ngModelChange`,function(t){ld(e);let s=kb();return pw(s.currAddress.zip,t)||(s.currAddress.zip=t),ud(t)}),Bl(),AI(),Bl()(),Ni(22,`div`,219)(23,`button`,220),Zh(`click`,function(){ld(e);return ud(kb().saveAddress())}),lw(24,`Save`),Bl()()()}if(n&2){let e=kb();zE(5),yg(`ngModel`,e.currAddress.address1),kI(),zE(4),yg(`ngModel`,e.currAddress.address2),kI(),zE(4),yg(`ngModel`,e.currAddress.city),kI(),zE(4),yg(`ngModel`,e.currAddress.state),kI(),zE(4),yg(`ngModel`,e.currAddress.zip),kI()}}function jt(n,c){if(n&1){let e=Cb();Ni(0,`div`,20)(1,`div`,10)(2,`div`,21)(3,`div`,221),lw(4,`Order placed!`),Bl()(),Ni(5,`div`,222),Hh(6,`mat-icon`,223),Ni(7,`label`,224),Hh(8,`span`,225)(9,`br`),Ni(10,`span`,226),lw(11,`If you do not receive an email, please check your spam folder.`),Bl()(),Ni(12,`button`,227),Zh(`click`,function(){ld(e);return ud(kb().closeBookingSuccessfulModal())}),lw(13,`Close`),Bl()()()()}if(n&2){let e=kb();zE(8),Vh(`innerHTML`,e.configDoc.productBookedText.value,eE)}}function Ht(n,c){n&1&&(Ni(0,`span`,34),lw(1,`Invalid Email Address`),Bl())}function Xt(n,c){n&1&&(Ni(0,`span`,34),lw(1,`Invalid Password`),Bl())}function Jt(n,c){n&1&&(Ni(0,`span`,34),lw(1,`You have not registered with us. Kindly register.`),Bl())}function Zt(n,c){if(n&1&&(Ni(0,`div`,40),lw(1,` We will send you a link to reset your password. `),Hh(2,`br`),lw(3,`Please enter your Email Address first. `),Bl()),n&2)Vh(`innerHtml`,kb().configDoc.forgotPasswordText.value,eE)}function Kt(n,c){if(n&1&&Hh(0,`div`,41),n&2)Vh(`innerHtml`,kb().configDoc.forgotPasswordLinkSentText.value,eE)}function Yt(n,c){n&1&&(Ni(0,`span`),lw(1,`,\xA0`),Bl())}function Gt(n,c){if(n&1&&(Ni(0,`span`),lw(1),gb(2,Yt,2,0,`span`),Bl()),n&2){let e=c.$implicit,i=c.$index,t=kb(2).$implicit;zE(),hg(``,e.name,`-`,e.type),zE(),mb(i!=t.selectedColor.length-1?2:-1)}}function Qt(n,c){if(n&1&&(Ni(0,`span`),lw(1,`(`),Eb(2,Gt,3,3,`span`,null,vb),lw(4,`)`),Bl()),n&2){let e=kb().$implicit;zE(2),Ib(e.selectedColor)}}function ei(n,c){if(n&1&&(Ni(0,`tr`)(1,`td`)(2,`div`,237),lw(3),gb(4,Qt,5,0,`span`),lw(5),Bl()(),Ni(6,`td`,239),lw(7),Ow(8,`currency`),Bl()()),n&2){let e=c.$implicit;zE(3),Wl(` `,e.name),zE(),mb(e.selectedColor.length>0?4:-1),zE(),Wl(` X `,e.quantity,` `),zE(2),Wl(` +`,jw(8,4,e.price*e.quantity,`USD`,`symbol`),` `)}}function ti(n,c){if(n&1&&(Ni(0,`tr`)(1,`td`)(2,`div`,237),lw(3),Bl()(),Ni(4,`td`)(5,`div`,239),lw(6),Ow(7,`currency`),Bl()()()),n&2){let e=kb(2);zE(3),Wl(` (`,e.deliveryMethods[e.deliveryIndex].method,`) Shipping Charges`),zE(3),Wl(` +`,jw(7,2,e.deliveryMethods[e.deliveryIndex].deliveryAmount,`USD`,`symbol`))}}function ii(n,c){if(n&1&&(Ni(0,`div`,50)(1,`div`,228)(2,`div`,229)(3,`div`,230),lw(4),Ow(5,`date`),Ow(6,`date`),Bl()()(),Ni(7,`div`)(8,`table`,231)(9,`tr`)(10,`td`)(11,`h3`,232),lw(12,`Total Amount Paid`),Bl()(),Ni(13,`td`)(14,`h2`,233),lw(15),Ow(16,`currency`),Bl()()()()(),Ni(17,`div`,234),lw(18,`ORDER DETAILS `),Bl(),Ni(19,`div`,235)(20,`table`,236)(21,`tr`)(22,`td`)(23,`div`,237),lw(24,`Description`),Bl()(),Ni(25,`td`)(26,`div`,238),lw(27,`Amount`),Bl()()(),Eb(28,ei,9,8,`tr`,null,vb),gb(30,ti,8,6,`tr`),Ni(31,`tr`)(32,`td`)(33,`div`,237),lw(34,`Sales Tax`),Bl()(),Ni(35,`td`)(36,`div`,239),lw(37),Ow(38,`currency`),Bl()()(),Ni(39,`tr`,240)(40,`td`)(41,`div`,237),lw(42,`Total`),Bl()(),Ni(43,`td`,238),lw(44),Ow(45,`currency`),Bl()()()()()),n&2){let e=kb();zE(4),hg(`Order Date: `,Fw(5,10,e.orderDate,`fullDate`),` `,Fw(6,13,e.orderDate,`shortTime`),` `),zE(4),og(`color`,e.widgetColor.fg1Color),zE(7),pg(jw(16,16,e.totalAmount,`USD`,`symbol`)),zE(5),og(`color`,e.widgetColor.fg1Color),zE(8),Ib(e.cartProductList),zE(2),mb(e.deliveryIndex!=-1?30:-1),zE(7),Wl(` +`,jw(38,20,e.tax,`USD`,`symbol`)),zE(7),Wl(` `,jw(45,24,e.totalAmount,`USD`,`symbol`),` `)}}function ni(n,c){if(n&1&&(Ni(0,`div`),lw(1),Bl()),n&2){let e=c.$implicit;zE(),Wl(` `,e.productName,` `)}}function oi(n,c){if(n&1){let e=Cb();Ni(0,`app-error-modal`,241),Zh(`sendCloseModal`,function(){ld(e);let t=kb();
1return ud(t.errorModalDisplay=!1)}),Bl()}if(n&2)Vh(`errorText`,kb().errorText)}var bi=(()=>{class n{constructor(e,i,t,s,_,f,p,C,P,x,z){this.currency=e,this.router=i,this.route=t,this.cartPrductService=s,this.date=_,this.cd=f,this.universalService=p,this.paymentService=C,this.mainComponent=P,this.mainService=x,this.browserID=z,this.domainName=FF(void 0),this.orgID=FF(void 0),this.organizationDetails=FF(void 0),this.widgetStyle=FF(void 0),this.LoginEvent=PF(),this.productDocument=FF(void 0),this.ourTeamDoc=FF(void 0),this.errorText=``,this.errorModalDisplay=!1,this.widgetColor={bg1Color:``,fg1Color:``,bg2Color:``,fg2Color:``},this.cartProduct=[],this.cartProductList=[],this.mobileNumber=[`(`,/[0-9]/,/\d/,/\d/,`)`,` `,/\d/,/\d/,/\d/,`-`,/\d/,/\d/,/\d/,/\d/],this.cardNumber=[/[0-9]/,/[0-9]/,/[0-9]/,/[0-9]/,` `,/[0-9]/,/[0-9]/,/[0-9]/,/[0-9]/,` `,/[0-9]/,/[0-9]/,/[0-9]/,/[0-9]/,` `,/[0-9]/,/[0-9]/,/[0-9]/,/[0-9]/],this.expiryDate=[/[0-9]/,/[0-9]/,`/`,/[0-9]/,/[0-9]/],this.cvv=[/[0-9]/,/[0-9]/,/[0-9]/],this.maskitoOptionsCard=$$1({mask:[/[0-9]/,/[0-9]/,/[0-9]/,/[0-9]/,` `,/[0-9]/,/[0-9]/,/[0-9]/,/[0-9]/,` `,/[0-9]/,/[0-9]/,/[0-9]/,/[0-9]/,` `,/[0-9]/,/[0-9]/,/[0-9]/,/[0-9]/]},Re$1(`____ ____ ____ ____`)),this.maskitoOptionsExpiry=$$1({mask:[/[0-9]/,/[0-9]/,`/`,/[0-9]/,/[0-9]/]},Re$1(`__/__`)),this.maskitoOptionsCvv={mask:[/[0-9]/,/[0-9]/,/[0-9]/]},this.maskitoOptionsPhone=$$1({mask:[`(`,/[0-9]/,/\d/,/\d/,`)`,` `,/\d/,/\d/,/\d/,`-`,/\d/,/\d/,/\d/,/\d/]},Re$1(`(   ) ___-____`)),this.mobileViewFlag=0,this.checkCartList=[],this.isLoggedInUser=!1,this.storeFrontLoginFlag=!1,this.salesTaxPercent=0,this.savedCardDetails=[],this.anyItemOutOfStock=!1,this.smallInventory=0,this.singleProductInventoryError=!1,this.tax=0,this.cartProductTotal=0,this.validateFName=!0,this.validateLName=!0,this.validateEmail=!0,this.validatePhone=!0,this.validateAddress=!0,this.validateCity=!0,this.validateState=!0,this.validateZip=!0,this.validatePassword=!1,this.validateConfirmPassword=!1,this.validateConfirmPassword1=!1,this.password=``,this.cfmPassword=``,this.paymentSubBlock=``,this.cakeDeliveryCharge=0,this.distance={source:{lat:0,lng:0},sourceA:``,destination:{lat:0,lng:0},sourceB:``},this.incorrectAddressFlag=!1,this.selectedAddressIndex=-1,this.currAddress={id:``,address1:``,address2:``,city:``,state:``,type:`shipping`,zip:``},this.displayAddressFlag=!1,this.warningText=``,this.displayWarningFlag=!1,this.deliveryIndex=-1,this.displayAddressModal=!1,this.displayBookingSuccessModal=!1,this.validateEmailId=!1,this.validateRegisterEmailId=!1,this.validatePass=!1,this.email_forgetClick=!1,this.success_forgetClick=!1,this.notRegistered=!1,this.searchPerson={firstName:``,lastName:``,email:``,mobile:``,orgID:``},this.loginDetails={emailid:``,password:``},this.userDetails={cardNumber:``,expiryDate:``,expiryMonth:``,expiryYear:``,cvv:``},this.existingCustInfo={accountID:``,customerID:``,stripeStatus:``,orgID:``},this.mailDataClient={DomainDiscipline:``,address:``,password:``,SMTPPort:0,SMTPAddress:``,header:``,ReceiverName:``,ReceiverMailID:``,Subject:``,MessageBody:``,BccMailID:[{Address:`[email protected]`}],CcMailIDs:[],Attachments:[]},this.mailDataCust={DomainDiscipline:``,address:``,password:``,SMTPPort:0,SMTPAddress:``,header:``,ReceiverName:``,ReceiverMailID:``,Subject:``,MessageBody:``,BccMailID:[{Address:`[email protected]`}],CcMailIDs:[],Attachments:[]},this.smsData={ToNumber:``,FromNumber:`7203303864`,MessageBody:``},this.orderDoc={id:``,appointmentID:``,type:`order`,subType:`productOrder`,orgID:``,domainDiscipline:``,customerID:``,officeID:``,dateCreated:0,dateBooked:0,deliveryMethodID:``,deliveryAddress:{id:``,type:`shipping`,address1:``,address2:``,city:``,state:``,zip:``},orderDetails:[],eventDetails:{event:``,theme:``,imageUploads:[],printables:[],allergies:``},pricing:{subTotal:0,discounts:[],tipPercent:0,tipValue:0,deposit:0,deliveryCharge:0,salesTax:{id:``,type:`donation`,amount:0},estimatedTotal:0,grandTotal:0},payment:{balanceDue:0,charges:[],refunds:[],adjustedAmount:{remainingDeposit:0,remainingPayment:0,remainingTotal:0}}}}ngOnInit(){this.loadScript(),this.mainComponent.contactDisplay=!1,this.getColorPalette
1(this.widgetStyle().colorPalette),this.route.params.subscribe(e=>{this.shortName=e.sName,this.shortName==null||this.shortName==null?this.shortName=``:this.shortName=this.shortName.toLowerCase()}),this.orgAdmin=this.ourTeamDoc().find(e=>e.isOrgAdmin==!0||e.isOrgAdmin==`true`),this.checkWidth(),$(window).resize(()=>{this.checkWidth()}),this.width<426?this.mobileViewFlag=1:this.mobileViewFlag=0,this.domainDiscipline=this.organizationDetails().domainDiscipline,this.orderDate=new Date().getTime(),this.route.params.subscribe(e=>{this.shortURL=e.sName}),sessionStorage.cartProduct!=null&&(this.cartProduct=JSON.parse(sessionStorage.cartProduct),this.cartProductList=this.cartProduct),this.is_safari=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),this.universalService.getProductsDataFunction(this.orgID(),`product`).subscribe(e=>{this.productList=e[0],this.deliveryMethods=e[1][0].deliveryMethods,this.isProductListDisplay=!1,sessionStorage.cartProduct!=null&&(this.cartProduct=JSON.parse(sessionStorage.cartProduct)),sessionStorage.removeItem(`cartProduct`),sessionStorage.cartProduct=JSON.stringify(this.cartProduct),this.cartProductList=this.cartProduct,this.universalService.getdocumentfunctionV1(this.orgID(),`websiteConfigurations`).subscribe(i=>{this.getConfigDoc(i[0].textConfig,i[0].booleanConfig,i[0].valueConfig),this.getEmailDetails(),this.calculateTotalPrice(),this.cartHasItems=!0}),this.navigateToStep(0,1),this.personDoc=this.cartPrductService.getEmptyPerson(),this.personDoc.roles[0].orgID=this.orgID()}),setTimeout(()=>{sessionStorage.getItem(`pId`)!=null&&localStorage.loggedInUserEmail!=null&&this.searchLoggedInPerson(localStorage.loggedInUserEmail)},100),this.setSquareupScript(),this.setStripeKeyandScript()}searchLoggedInPerson(e){this.searchPerson.orgID=this.orgID(),this.searchPerson.email=e,this.universalService.getSurveysCustomerDataFunction(this.searchPerson).subscribe(i=>{i.length!=0&&(this.isLoggedInUser=!0,this.universalService.getdocumentfunctionV2(i[0].persons.personID).subscribe(t=>{this.personDoc=t[0],this.openTab(`savedCards`),this.tabOpen=`savedCards`,this.personDoc.roles[0].stripeCustID!=``&&(this.mainService.setloginInfo(JSON.parse(sessionStorage.getItem(`authInfo`))),this.mainService.setToken(sessionStorage.getItem(`authTok`)),this.mainService.setExpiration(sessionStorage.getItem(`authExp`)),this.getPaymentConfigDetails(`login`))}))})}getConfigDoc(e,i,t){this.configDoc={},e.forEach(s=>{this.configDoc[s.configID]=s}),i.forEach(s=>{this.configDoc[s.configID]=s}),t.forEach(s=>{this.configDoc[s.configID]=s}),this.configDoc.salesTax&&(this.salesTaxPercent=this.configDoc.salesTax.value),this.configDoc.storeFrontLoginCapability&&(this.storeFrontLoginFlag=this.configDoc.storeFrontLoginCapability.value)}setSquareupScript(){if(Ki(this.browserID)){var e=document.createElement(`script`);e.type=`text/javascript`;let i=this.organizationDetails();i.stripeStatus==`not live`||i.stripeStatus==null?e.src=`https://sandbox.web.squarecdn.com/v1/square.js`:e.src=`https://web.squarecdn.com/v1/square.js`,$(`head`).append(e)}}setStripeKeyandScript(){if(Ki(this.browserID)){var e=document.createElement(`script`);e.type=`text/javascript`,e.src=`https://js.stripe.com/v2/`,$(`head`).append(e)}this.paymentService.getPaymentConfigData(this.orgID()).subscribe(i=>{if(this.paymentConfigData=i,Ki(this.browserID)){var t=document.createElement(`script`);if(t.type=`text/javascript`,this.paymentConfigData!=null){let s=this.organizationDetails();s.stripeStatus==`not live`||s.stripeStatus==null?t.innerHTML=`Stripe.setPublishableKey('`+this.paymentConfigData.testPublishingKey+`')`:s.stripeStatus==`live`&&(t.innerHTML=`Stripe.setPublishableKey('`+this.paymentConfigData.publishingKey+`')`),$(`head`).append(t)}}})}getPaymentConfigDetails(e){this.universalService.getdocumentfunctionV1(this.orgID(),`gatewayConfig`).subscribe(i=>{this.accountType=i[0].accountType,this.accountID=i[0].connectedAccountID,this.accountType==`squareup`?(this.organizationDetails().stripeStatus==`not live`?this.applicationID=i[0].sanboxAccountKey:this.applicationID=i[0].accountKey,this.accountID=i[0].connectedAccountID):this.accountType==`stripe`&&(this.accountType=i[0].accountType,this.accountID=i[0].connectedAccountID),this.existingCustInfo.accountID=this.accountID,e==`register`?this.openTab(`newCards`):e==`login`&&this.getCustomerInfo(this.personDoc.roles[0].stripeCustID)})}
1getCustomerInfo(e){this.savedCardDetails=[],this.existingCustInfo.customerID=e,this.existingCustInfo.stripeStatus=this.organizationDetails().stripeStatus,this.existingCustInfo.orgID=this.orgID(),this.paymentService.getCustomerFunction(this.existingCustInfo).subscribe(i=>{if(this.accountType==`squareup`&&i.cards!=null)for(var t=0;t<i.cards.length;t++)this.savedCardDetails.push({cardID:i.cards[t].id,brand:i.cards[t].card_brand.toLowerCase().charAt(0).toUpperCase()+i.cards[t].card_brand.toLowerCase().slice(1),country:``,funding:``,last4:i.cards[t].last_4,fingerprint:``,expiryDate:i.cards[t].exp_month+`/`+i.cards[t].exp_year})})}getEmailDetails(){this.universalService.getdocumentfunctionV1(``,`businessEmails`).subscribe(e=>{for(var i=0;i<e[0].emails.length;i++)e[0].emails[i].domainDiscipline!=null&&e[0].emails[i].domainDiscipline==this.domainDiscipline&&(this.mailDataClient.DomainDiscipline=e[0].emails[i].domainDiscipline,this.mailDataClient.address=e[0].emails[i].address,this.mailDataClient.password=e[0].emails[i].password,this.mailDataClient.SMTPPort=e[0].emails[i].SMTPPort,this.mailDataClient.SMTPAddress=e[0].emails[i].SMTPAddress,this.mailDataClient.header=e[0].emails[i].header);this.universalService.getdocumentfunctionV1(this.orgID(),`businessEmails`).subscribe(t=>{this.mailDataCust.DomainDiscipline=this.domainDiscipline,this.mailDataCust.address=t[0].emails[0].address,this.mailDataCust.password=t[0].emails[0].password,this.mailDataCust.SMTPPort=t[0].emails[0].SMTPPort,this.mailDataCust.SMTPAddress=t[0].emails[0].SMTPAddress,this.mailDataCust.header=t[0].emails[0].header,this.getEmailTemplate()})})}getEmailTemplate(){this.universalService.getPersonsAppointmentsDataFunction(this.orgID()).subscribe(e=>{this.appointmentTemplateDoc=e[0];var i=this.appointmentTemplateDoc.orderOutterTemplate;i=i.replace(/ORGLOGO/g,this.organizationDetails().footerLogo),i=i.replace(/ORGNAME/g,this.organizationDetails().name),i=i.replace(/ORGNUMBER/g,this.organizationDetails().phone[0].number),i=i.replace(/DOMAINNAME/g,this.domainName());var t=this.organizationDetails().address[0].address1;let s=this.organizationDetails();s.address[0].address2==``||s.address[0].address2==null||(t+=`,<br>`+s.address[0].address2),i=i.replace(/ADD1/g,t);var _=s.address[0].address1;s.address[0].address2==``||s.address[0].address2==null||(_+=` `+s.address[0].address2),_+=`+ `+s.address[0].city+`, `+s.address[0].state+` `+s.address[0].zip,i=i.replace(/ADDRESSLINE/g,_),i=i.replace(/CITY/g,s.address[0].city),i=i.replace(/STATE/g,s.address[0].state),i=i.replace(/ZIP/g,s.address[0].zip),i=i.replace(/WEBSITEURL/g,s.websiteUrl),i=i.replace(/MAILNOTE/g,``);var f=``;this.appointmentTemplateDoc.socialLinks!=null&&this.appointmentTemplateDoc.socialLinks!=``&&s.socialLinks.forEach(p=>{var C=this.appointmentTemplateDoc.socialLinks;C=C.replace(/SOCIALURL/g,p.url),C=C.replace(/SOCIALTYPE/g,p.type),f+=C}),i=i.replace(/SOCIALLINKS/g,f),this.appointmentTemplateDoc.outterTemplate=i})}navigateToStep(e,i){$(`html, body`).animate({scrollTop:0},`fast`),$(`.t2-cart-progressbar .list`).removeClass(`active`),$(`.t2-cart-progressbar #list`+i).addClass(`active`),i==1&&($(`.cartItemList`).css(`display`,`block`),$(`.t2-cart-payment`).css(`display`,`none`),$(`.t2-cart-orderSummery`).css(`display`,`none`)),i==2&&($(`.alertBadge`).attr(`data-badge`,this.cartProduct.length),this.isCustomerForm=!0,this.isPaymentForm=!1,this.isLoggedInUser==!0?(this.isDeliveryMethodForm=!0,this.accordinBlock(`deliveryMethod`,`methodColor`),$(`.customerSummery`).css(`display`,`block`)):(this.isDeliveryMethodForm=!1,this.accordinBlock(`custmerDetails`,`customerText`)),$(`.cartItemList`).css(`display`,`none`),$(`.t2-cart-payment`).css(`display`,`block`),$(`.t2-cart-orderSummery`).css(`display`,`block`))}onQuantityChange(e,i){var t=this.cartProductList[i].quantity;e==`plus`?t++:e==`minus`&&t>1&&t--,this.selectedProduct=JSON.parse(JSON.stringify(this.cartProductList[i])),this.selectedProduct.quantity=t,this.cartProductList[i].quantity=t,this.calculateTotalPrice()}preventKeyPress(e){if((e.keyCode||e.which)===13)return e.preventDefault(),!1}calculateTotalPrice(){this.cartProductTotal=0,this.tax=0,this.cartProductList.forEach(e
1=>{this.cartProductTotal=this.cartProductTotal+e.price*e.quantity;for(var i=0;i<e.quantity;i++)this.tax=Math.round((this.tax+e.price*(this.salesTaxPercent/100))*100)/100}),this.cartTotal=this.cartProductTotal+this.tax,this.totalAmount=this.cartProductTotal+this.tax,sessionStorage.cartProduct=JSON.stringify(this.cartProductList)}removeItemFromCart(e){this.removeItemID=e,$(`.confirmModal`).css(`display`,`block`)}closeModal(){$(`.confirmModal`).css(`display`,`none`)}removeItem(){this.cartTotal=this.cartTotal-this.cartProductList[this.removeItemID].price*this.cartProductList[this.removeItemID].quantity,this.totalAmount=this.totalAmount-this.cartProductList[this.removeItemID].price*this.cartProductList[this.removeItemID].quantity,this.cartProductList.splice(this.removeItemID,1),sessionStorage.cartProduct=JSON.stringify(this.cartProductList),this.cartProductList.length==0&&(this.cartHasItems=!1),$(`.confirmModal`).css(`display`,`none`),this.removeItemID=-1,this.calculateTotalPrice()}validate(e){if(e==`fName`)this.personDoc.firstName=this.personDoc.firstName.trim(),!/^[a-zA-Z]+$/.test(this.personDoc.firstName)||this.personDoc.firstName==``?($(`.invalid-`+e).removeClass(`dn`),this.validateFName=!0):($(`.invalid-`+e).addClass(`dn`),this.validateFName=!1);else if(e==`lName`)this.personDoc.lastName=this.personDoc.lastName.trim(),!/^[a-zA-Z]+$/.test(this.personDoc.lastName)||this.personDoc.lastName==``?($(`.invalid-`+e).removeClass(`dn`),this.validateLName=!0):($(`.invalid-`+e).addClass(`dn`),this.validateLName=!1);else if(e==`email`){var i=this.personDoc.email[0].address.toLowerCase();i=i.trim(),!/^[a-zA-Z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,15}$/.test(i)||i==``?($(`.invalid-`+e).removeClass(`dn`),this.validateEmail=!0):($(`.invalid-`+e).addClass(`dn`),this.validateEmail=!1)}else e==`phone`?this.personDoc.phone[0].number.includes(`_`)||this.personDoc.phone[0].number==``?($(`.invalid-`+e).removeClass(`dn`),this.validatePhone=!0):($(`.invalid-`+e).addClass(`dn`),this.validatePhone=!1):e==`address`?this.personDoc.address[0].address1==``?($(`.invalid-`+e).removeClass(`dn`),this.validateAddress=!0):($(`.invalid-`+e).addClass(`dn`),this.validateAddress=!1):e==`city`?this.personDoc.address[0].city==``?($(`.invalid-`+e).removeClass(`dn`),this.validateCity=!0):($(`.invalid-`+e).addClass(`dn`),this.validateCity=!1):e==`state`?(this.personDoc.address[0].state=this.personDoc.address[0].state.toUpperCase(),this.personDoc.address[0].state==``?($(`.invalid-`+e).removeClass(`dn`),this.validateState=!0):($(`.invalid-`+e).addClass(`dn`),this.validateState=!1)):e==`zip`?!/(^\d{5}$)|(^\d{5}-\d{4}$)/.test(this.personDoc.address[0].zip)||this.personDoc.address[0].zip==``?($(`.invalid-`+e).removeClass(`dn`),this.validateZip=!0):($(`.invalid-`+e).addClass(`dn`),this.validateZip=!1):e==`password`?this.password==``?($(`.invalid-`+e).removeClass(`dn`),this.validatePassword=!0):($(`.invalid-`+e).addClass(`dn`),this.validatePassword=!1):e==`confirmPassword`&&(this.personDoc.cfmPassword==``?($(`.empty-`+e).removeClass(`dn`),this.validateConfirmPassword=!0):($(`.empty-`+e).addClass(`dn`),this.validateConfirmPassword=!1),this.confirmPassword())}confirmPassword(){this.password!=this.cfmPassword?($(`.invalid-confirmPassword`).removeClass(`dn`),this.validateConfirmPassword1=!0):($(`.invalid-confirmPassword`).addClass(`dn`),this.validateConfirmPassword1=!1)}accordinBlock(e,i){if(this.paymentSubBlock!=e){if(this.paymentSubBlock=e,e==`custmerDetails`&&this.isCustomerForm==!0||e==`deliveryMethod`&&this.isDeliveryMethodForm==!0||e==`payment`&&this.isPaymentForm==!0&&this.deliveryIndex!=-1&&(this.deliveryMethods[this.deliveryIndex].deliveryType==`delivery`&&this.selectedAddressIndex!=-1||this.deliveryMethods[this.deliveryIndex].deliveryType!=`delivery`)){e==`custmerDetails`?($(`.customerSummery`).css(`display`,`none`),$(`.paymentMethodSummery`).css(`display`,`none`)):e==`payment`&&$(`.paymentMethodSummery`).css(`display`,`block`);var t=this.personDoc.email[0].address.toLowerCase();t=t.trim(),t!=``&&(e==`deliveryMethod`||e==`payment`)&&$(`.customerSummery`).css(`display`,`block`),$(`.textColor`).css(`color`,`rgb(162, 162, 162)`),$(`.accordionBlock`).slideUp(),$(`.`+e).slideDown(),this.widgetColor.bg1Color!=``&&this.widgetColor.bg1Color!=null&&this.widgetColor.fg1Color!=``&&this.widgetColor.fg1Color!=null?($(`.t2-cart-methodBlock`).css(`border`,`1px solid`+this.widgetColor.fg1Color),$(`.`+i).css(`color`,this.widgetColor.fg1Color),$(`.t1-cart-Form-lbl`).css(`color`,this.widgetColor.fg1Color)):($(`.t2-cart-methodBlock`).css(`border`,`1px solid rgba(18, 18, 18, 0.15)`),$(`.t1-cart-formBtn`).css(`background-color`,` #3f3f3f!important`),$(`.t1-cart-formBtn`).css(`color`,` #fff`),$(`.t2-cart-formBtn`).css(`background-color`,` #3f3f3f!important`),$(`.t2-cart-formBtn`).css(`color`,` #fff`),$(`.`+i).css(`color`,`black`),$(`.t1-cart-Form-lbl`).css(`color`,`rgb(63, 81, 181)`))}
1e==`payment`&&(this.isLoggedInUser&&this.savedCardDetails.length>0?this.openTab(`savedCards`):this.openTab(`newCards`)),e==`payment`&&this.isPaymentForm==!1&&($(`.deliveryMethodError`).css(`display`,`block`),this.paymentSubBlock=``),e==`payment`&&this.deliveryIndex!=-1&&this.deliveryMethods[this.deliveryIndex].deliveryType==`delivery`&&this.selectedAddressIndex==-1&&($(`.addressError`).css(`display`,`block`),this.paymentSubBlock=``)}}navigateToAllProd(){var e;if(this.mainComponent.navigationMenu.forEach(t=>{(t.storeFront==`true`||t.storeFront==!0)&&(e=t.routeLink)}),this.shortURL!=null)if(e)var i=`/`+this.shortURL+`/`+e;else var i=`/`+this.shortURL+`/productlist`;else if(e)var i=`/`+e;else var i=`/productlist`;setTimeout(()=>{i!==``&&this.router.navigate([i])},500)}saveCustomerDetails(){if($(`.loadSubmit`).button(`loading`),this.validate(`fName`),this.validate(`lName`),this.validate(`email`),this.validate(`orgName`),this.validate(`phone`),this.storeFrontLoginFlag&&!this.isLoggedInUser&&(this.validate(`password`),this.validate(`confirmPassword`)),this.validateFName==!0||this.validateLName==!0||this.validateEmail==!0||this.validatePhone==!0||this.validatePassword==!0||this.validateConfirmPassword==!0||this.validateConfirmPassword1==!0)$(`.loadSubmit`).button(`reset`);else{var e=this.personDoc.email[0].address.toLowerCase();e=e.trim(),setTimeout(()=>{this.searchPerson.orgID=this.orgID(),this.searchPerson.email=e,this.universalService.getSurveysCustomerDataFunction(this.searchPerson).subscribe(i=>{if(this.storeFrontLoginFlag)if(i.length==0){this.userExists=!1,this.personDoc.id=V.UUID.UUID();var t={email:e,id:this.personDoc.id.replace(/-/g,``),password:this.cfmPassword,accountID:this.accountID,stripeStatus:this.organizationDetails().stripeStatus,orgID:this.orgID(),cardNumber:`4242424242424242`,expirationDate:`1222`,firstName:this.personDoc.firstName,lastName:this.personDoc.lastName};this.paymentService.addCustomerFunction(t).subscribe(_=>{var f=JSON.parse(_);this.mainService.setToken(f.jwtToken),this.mainService.setExpiration(f.expiration),this.mainService.setloginInfo({username:f.customerID,password:`abc@123`}),this.personDoc.roles[0].stripeCustID=f.customerID,this.personDoc.roles[0].status[0].timeStamp=(Date.now()/1e3).toString(),this.universalService.updateDocumentFunction(this.personDoc).subscribe(p=>{this.isDeliveryMethodForm=!0,this.accordinBlock(`deliveryMethod`,`methodColor`),$(`.loadSubmit`).button(`reset`),this.tabOpen=`newCards`,this.isLoggedInUser=!0,this.existingCustInfo.customerID=this.personDoc.roles[0].stripeCustID,localStorage.loggedInUserEmail=this.personDoc.email[0].address.toLowerCase().trim();var C=this.personDoc.firstName;sessionStorage.setItem(`pId`,this.personDoc.id),sessionStorage.setItem(`pName`,C),this.getPaymentConfigDetails(`register`),$(`.customerSummery`).css(`display`,`block`)})})}else{var s=i[0].persons.personID;this.universalService.getdocumentfunctionV2(s).subscribe(_=>{var f=JSON.parse(JSON.stringify(_[0]));if((this.personDoc.firstName==``||this.personDoc.lastName==``)&&(this.personDoc.firstName=f.firstName,this.personDoc.lastName=f.lastName),this.personDoc.roles[0].stripeCustID==``&&(this.personDoc.roles[0].stripeCustID=f.roles[0].stripeCustID),this.personDoc.id=i[0].persons.personID,this.personDoc.roles[0].status[0].timeStamp=(Date.now()/1e3).toString(),this.personDoc.roles[0].stripeCustID!=``)this.isLoggedInUser?this.universalService.updateDocumentFunction(this.personDoc).subscribe(P=>{this.isDeliveryMethodForm=!0,this.accordinBlock(`deliveryMethod`,`methodColor`),this.tabOpen=`savedCards`,$(`.loadSubmit`).button(`reset`),$(`.customerSummery`).css(`display`,`block`),this.getPaymentConfigDetails(`login`)}):(this.userExists=!0,$(`.loadSubmit`).button(`reset`),this.personDoc.id=V.UUID.UUID());else{this.userExists=!1;var p=this.personDoc.email[0].address.toLowerCase();p=p.trim();var C={email:p,id:this.personDoc.id.replace(/-/g,``),password:this.cfmPassword,accountID:this.accountID,stripeStatus:this.organizationDetails().stripeStatus,orgID:this.orgID(),cardNumber:`4242424242424242`,expirationDate:`1222`,firstName:this.personDoc.firstName,lastName:this.personDoc.lastName};this.paymentService.addCustomerFunction(C).subscribe(P=>{var x=JSON.parse(P);this.mainService.setToken(x.jwtToken),this.mainService.setExpiration(x.expiration),this.mainService.setloginInfo({username:x.customerID,password:`abc@123`}),this.personDoc.roles[0].stripeCustID=x.customerID,this.personDoc.id=i[0].persons.personID,this.personDoc.roles[0].status[0].timeStamp=(Date.now()/1e3).toString(),this.universalService.updateDocumentFunction(this.personDoc).subscribe(z=>{this.isDeliveryMethodForm=!0,this.accordinBlock(`deliveryMethod`,`methodColor`),$(`.loadSubmit`).button(`reset`),this.tabOpen=`newCards`,this.isLoggedInUser=!0,this.existingCustInfo.customerID=this.personDoc.roles[0].stripeCustID,localStorage.loggedInUserEmail=this.personDoc.email[0].address.toLowerCase().trim();var Y=this.personDoc.firstName;
1sessionStorage.setItem(`pId`,this.personDoc.id),sessionStorage.setItem(`pName`,Y),this.getPaymentConfigDetails(`register`),$(`.customerSummery`).css(`display`,`block`)})})}})}else if(i.length==0)this.personDoc.id=V.UUID.UUID(),this.universalService.updateDocumentFunction(this.personDoc).subscribe(_=>{this.isDeliveryMethodForm=!0,this.accordinBlock(`deliveryMethod`,`methodColor`),this.tabOpen=`newCards`,this.getPaymentConfigDetails(``),$(`.loadSubmit`).button(`reset`),$(`.customerSummery`).css(`display`,`block`)});else{var s=i[0].persons.personID;this.universalService.getdocumentfunctionV2(s).subscribe(f=>{var p=JSON.parse(JSON.stringify(f[0]));(this.personDoc.firstName==``||this.personDoc.lastName==``)&&(this.personDoc.firstName=p.firstName,this.personDoc.lastName=p.lastName),this.personDoc.email[0].address==``&&(this.personDoc.email[0].address=p.email[0].address),this.personDoc.phone[0].number==``&&(this.personDoc.phone[0].number=p.phone[0].number),this.personDoc.address.address1==``&&(this.personDoc.address.address1=p.address.address1),this.personDoc.address.address2==``&&(this.personDoc.address.address2=p.address.address2),this.personDoc.address.city==``&&(this.personDoc.address.city=p.address.city),this.personDoc.address.state==``&&(this.personDoc.address.state=p.address.state),this.personDoc.address.zip==``&&(this.personDoc.address.zip=p.address.zip),this.personDoc.roles[0].stripeCustID==``&&(this.personDoc.roles[0].stripeCustID=p.roles[0].stripeCustID),this.personDoc.id=i[0].persons.personID,this.personDoc.roles[0].status[0].timeStamp=(Date.now()/1e3).toString(),this.universalService.updateDocumentFunction(this.personDoc).subscribe(C=>{this.isDeliveryMethodForm=!0,this.accordinBlock(`deliveryMethod`,`methodColor`),this.tabOpen=`newCards`,this.getPaymentConfigDetails(``),$(`.loadSubmit`).button(`reset`),$(`.customerSummery`).css(`display`,`block`)})})}})},500)}}getDistance(e){$(`.addressBtn`+e).button(`loading`);let i={query:this.configDoc.storefrontAddressText?this.configDoc.storefrontAddressText.value:`80003`,fields:[`name`,`geometry`]},t={query:this.personDoc.address[e].address1+` `+this.personDoc.address[e].city+` `+this.personDoc.address[e].state+` `+this.personDoc.address[e].zip,fields:[`name`,`geometry`]};var s=new google.maps.Map(document.getElementById(`map`),{center:{lat:39.7392358,lng:-104.990251},zoom:7}),_=new google.maps.places.PlacesService(s);_.findPlaceFromQuery(i,(f,p)=>{p===google.maps.places.PlacesServiceStatus.OK&&(this.distance.source.lat=f[0].geometry.location.lat(),this.distance.source.lng=f[0].geometry.location.lng(),this.distance.sourceA=f[0].name)}),_.findPlaceFromQuery(t,(f,p)=>{p===google.maps.places.PlacesServiceStatus.OK?(this.distance.destination.lat=f[0].geometry.location.lat(),this.distance.destination.lng=f[0].geometry.location.lng(),this.distance.sourceB=f[0].name,this.calculateDistanceAndDuration(this.distance.source.lat,this.distance.source.lng,this.distance.destination.lat,this.distance.destination.lng).then(C=>{var P=C.distance;if(P==null)alert(`Please enter a valid address.`),this.incorrectAddressFlag=!0,this.selectedAddressIndex=-1,$(`.loadSubmit`).button(`reset`),$(`.addressBtn`+e).button(`reset`),$(`.addressBlock`).removeClass(`activeAddress`);else{this.incorrectAddressFlag=!1;var x=P.text.split(` `)[0],z=!1;if(x<=parseInt(this.deliveryMethods[this.deliveryIndex].radius)){z=!0,this.cakeDeliveryCharge=this.deliveryMethods[this.deliveryIndex].deliveryAmount,this.deliveryCharges=this.deliveryMethods[this.deliveryIndex].deliveryAmount;var Y=this.cartTotal;this.totalAmount=Y+parseInt(this.deliveryCharges),this.selectedAddressIndex=e,$(`.addressError`).css(`display`,`none`),$(`.addressBtn`+e).button(`reset`),$(`.addressBlock`).removeClass(`activeAddress`),$(`#addressBlock`+e).addClass(`activeAddress`)}z||(this.deliveryCharges=void 0,$(`.addressBtn`+e).button(`reset`),$(`.addressBlock`).removeClass(`activeAddress`),this.cakeDeliveryCharge=-1)}})):(this.incorrectAddressFlag=!0,alert(`Please enter valid address`),this.selectedAddressIndex=-1,$(`.loadSubmit`).button(`reset`),$(`.addressBtn`+e).button(`reset`),$(`.addressBlock`).removeClass(`activeAddress`))})}saveAddress(){if(this.checkSaveAddressWarning(),this.warningText!=``)this.warningText=`Please enter the following information:<br>`+this.warningText,this.displayWarningFlag=!0;else{var e=this.personDoc.address.findIndex(i=>i.id==this.currAddress.id);e!=-1?this.personDoc.address[e]=JSON.parse(JSON.stringify(this.currAddress)):this.personDoc.address.push(JSON.parse(JSON.stringify(this.currAddress))),this.universalService.updateDocumentFunction(this.personDoc).subscribe(i=>{}),this.closeAddress()}}deleteAddress(e){this.personDoc.address.splice(e,1),this.universalService.updateDocumentFunction(this.personDoc).subscribe(i=>{})}openAddress(e,i){i==`new`?this.currAddress={id:V.UUID.UUID(),type:`shipping`,address1:``,address2:``,city:``,state:``,zip:``}:this.currAddress=JSON.parse(JSON.stringify(this.personDoc.address[e])),this.displayAddressFlag=!0}checkSaveAddressWarning(){this.currAddress.address1==``&&(this.warningText+=`Address is required<br>`),this.currAddress.city==``&&(this.warningText+=`City is required<br>`),this.currAddress.state==``&&(this.warningText+=`State is required<br>`),this.currAddress.zip==``&&(this.warningText+=`Zip is required<br>`)}closeAddress(){this.displayAddressFlag=!1,this.currAddress=void 0}calculateDistanceAndDuration(e,i,t,s){var _=new google.maps.LatLng(parseFloat(e),parseFloat(i)),f=new google.maps.LatLng(parseFloat(t),parseFloat(s)),p=new google.maps.DistanceMatrixService,C=$.Deferred();return p.getDistanceMatrix({origins:[_],destinations:[f],travelMode:`DRIVING`,unitSystem:google.maps.UnitSystem.IMPERIAL,avoidHighways:!1,avoidTolls:!1},(P,x)=>{x==`OK`?C.resolve(P.rows[0].elements[0]):(alert(`Incorrect Address`),C.reject(x))}),C.promise()}getDeliveryMethod(e){if(this.deliveryIndex=e,this.isPaymentForm=!0,this.deliveryMethodID=this.deliveryMethods[e].deliveryID,$(`.deliveryMethodError`).css(`display`,`none`),this.deliveryMethods[e].deliveryType==`pickup`){this.displayAddressModal=!1;var i=this.cartTotal;this.deliveryCharges=parseInt(this.deliveryMethods[e].deliveryAmount),this.totalAmount=i+parseInt(this.deliveryCharges),this.selectedAddressIndex=-1,this.cakeDeliveryCharge=this.deliveryMethods[e].deliveryAmount}else this.deliveryCharges=void 0,this.displayAddressModal=!0}selectAddress(e){this.getDistance(e)}sendMails(){this.mailDataCust.ReceiverName=this.personDoc.firstName+` `+this.personDoc.lastName,this.mailDataCust.ReceiverMailID=this.personDoc.email[0].address;var i=this.appointmentTemplateDoc.appointmentTemplate.find(x=>x.status==`orderPaymentMade`).data.find(x=>x.type==`email`);this.mailDataCust.Subject=i.subject.replace(/ORGNAME/g,this.organizationDetail
1s().name);var t=this.appointmentTemplateDoc.outterTemplate;t=t.replace(/FIRSTNAME/g,this.personDoc.firstName),t=t.replace(/SUBJECT/g,i.bodySubject);var s=`<div style="font-weight:bold; padding: 20px;text-align: center;background-color:#ececec ">ORDER DETAILS</div><div style="text-align:center; width: 100%"><table cellpadding="10" style="border:none;width:100%; margin-top: 20px;"><tr><td><div style="font-size: 16px; font-weight: 500;text-align: left;">Description</div></td><td><div style="text-align:right;font-size: 16px;font-weight: 500;">Amount</div></td></tr>`;this.cartProductList.forEach(x=>{s+=`<tr><td><div style="font-size: 16px; font-weight: 500;text-align: left;">`+x.name,x.selectedColor.length>0&&(s+=`<span>(`,x.selectedColor.forEach(z=>{s+=z.type+`,`}),s+=`)</span>`),s+=` X `+x.quantity+`</div></td><td style="text-align:right;">`+this.currency.transform(x.price*x.quantity,`USD`)+`</td></tr>`}),this.deliveryIndex!=-1&&(s+=`<tr><td><div style="font-size: 16px; font-weight: 500;text-align: left;">(`+this.deliveryMethods[this.deliveryIndex].method+`) Shipping Charges </div></td><td><div style="text-align:right">+`+this.currency.transform(this.deliveryMethods[this.deliveryIndex].deliveryAmount,`USD`)+`</div></td></tr>`),s+=`<tr><td><div style="font-size: 16px; font-weight: 500;text-align: left;">Sales Tax</div></td><td><div style="text-align:right">+`+this.currency.transform(this.tax,`USD`)+`</div></td></tr>`,s+=`<tr style="border-top: 1px solid black;"><td><div style="font-size: 16px; font-weight: 500;text-align: left;">Total</div></td><td style="text-align:right;font-size: 16px;font-weight: 500;">`+this.currency.transform(this.totalAmount,`USD`)+`</td></tr>`,s+=`</table></div>`,i.body=i.body.replace(/RECEIPT/g,s),i.body=i.body.replace(/ORDERDATE/g,this.date.transform(this.orderDate,`fullDate`)),i.body=i.body.replace(/TOTALAMOUNT/g,this.currency.transform(this.totalAmount,`USD`)),this.mailDataCust.MessageBody=t.replace(`INSERTTEMPLATEHERE`,i.body),this.universalService.emailHandlerFunction(this.mailDataCust).subscribe(x=>{});var _=this.personDoc.email[0].address.toLowerCase();_=_.trim(),this.mailDataClient.ReceiverName=this.organizationDetails().name,this.mailDataClient.ReceiverMailID=this.organizationDetails().email[0].address,this.mailDataClient.Subject=`New Order`;var f=$(`.receipt`).html();this.mailDataClient.MessageBody=`Hello `+this.organizationDetails().name+`,<br><br> You have received an order with the following details: <br><br>Name: `+this.personDoc.firstName+` `+this.personDoc.lastName+`<br>Email: `+_+`<br>Phone Number: `+this.personDoc.phone[0].number+`<br>`+f+`<br>Thank you,<br>Meshbase Support`,this.smsData.MessageBody=`Hello `+this.organizationDetails().name+`,
2You have received an order with the following details: 
3
4Customer Details: 
5Name: `+this.personDoc.firstName+` `+this.personDoc.lastName+`
6Email: `+_+`
7Phone Number: `+this.personDoc.phone[0].number+`
8
9Product Details :
10`;var p=``;this.cartProductList.forEach(x=>{p+=x.name,x.selectedColor.length>0&&(p+=`(`,x.selectedColor.forEach(z=>{p+=z.type+`,`}),p+=`)`),p+=` X `+x.quantity+`
11`+this.currency.transform(x.price*x.quantity,`USD`)+`
12`}),this.smsData.MessageBody+=p,this.smsData.MessageBody+=`
13Delivery Method: `+this.deliveryMethods[this.deliveryIndex].method+`
14
15Thank you,
16Meshbase Support `;let C=this.organizationDetails();C.phone.length==2?this.smsData.ToNumber=C.phone[1].number.replace(/[`~!@#$%^&*()_|+\-=?;:'",.<>\{\}\[\]\\\/ ]/gi,``):this.smsData.ToNumber=C.phone[0].number.replace(/[`~!@#$%^&*()_|+\-=?;:'",.<>\{\}\[\]\\\/ ]/gi,``),this.universalService.messagingHandlerFunction(this.smsData.ToNumber,this.smsData.FromNumber,this.smsData.MessageBody).subscribe(x=>{}),this.smsData.MessageBody=`Hello `+this.personDoc.firstName+`,
17We have received an order with the following details: 
18Product Details :
19`,this.smsData.MessageBody+=p,this.smsData.MessageBody+=`
20Delivery Method: `+this.deliveryMethods[this.deliveryIndex].method;var P=`Location:
21`+C.name+`
22`+C.address[0].address1+`
23`+C.address[0].address2+`
24`+C.address[0].city+`, `+C.address[0].state+` `+C.address[0].zip+`
25`;this.smsData.MessageBody+=P,this.smsData.ToNumber=this.personDoc.phone[0].number.replace(/[`~!@#$%^&*()_|+\-=?;:'",.<>\{\}\[\]\\\/ ]/gi,``),this.smsData.FromNumber=C.phone[0].number.replace(/[`~!@#$%^&*()_|+\-=?;:'",.<>\{\}\[\]\\\/ ]/gi,``),this.universalService.messagingHandlerFunction(this.smsData.ToNumber,this.smsData.FromNumber,this.smsData.MessageBody).subscribe(x=>{}),this.universalService.emailHandlerFunction(this.mailDataClient).subscribe(x=>{})}closeBookingSuccessfulModal(){if(this.displayBookingSuccessModal=!1,this.shortURL!=null)var e=`/`+this.shortURL+`/home`;else var e=`/home`;e!==``&&this.router.navigate([e]),setTimeout(()=>{this.is_safari&&(location.href=e+`/home`,location.reload()),location.reload()},50)}validateCard(e){$(`#cardEmptyError`).css(`display`,`none`),$(`#cardnumError`).css(`display`,`none`),$(`#cardEmptyErrors`).css(`display`,`none`),$(`#cardnumErrors`).css(`display`,`none`);var i=0,t=0,s=!1;e=e.replace(/\D/g,``);for(var _=e.length-1;_>=0;_--){var f=e.charAt(_),t=parseInt(f,10);s&&(t*=2)>9&&(t-=9),i+=t,s=!s}i%10==0?this.cardErrors=!1:this.cardErrors=!0,e==``?(this.cardEmpty=!0,this.cardErrors=!1):this.cardEmpty=!1}validateExpiryDate(e){$(`#cardEmptyError`).css(`display`,`none`),$(`#expError`).css(`display`,`none`),$(`#cardEmptyErrors`).css(`display`,`none`),$(`#expErrors`).css(`display`,`none`);var i,t=new Date;i=t.getMonth()+1;var s=t.getFullYear()%100;i<10&&(i=`0`+i);var _=e.split(`/`)[0],f=e.split(`/`)[1];(f>s||f==s&&_>=i)&&_<13?this.expiryErrors=!1:this.expiryErrors=!0,e==``?(this.expiryEmpty=!0,this.expiryErrors=!1):this.expiryEmpty=!1}validateCvv(e){$(`#cardEmptyError`).css(`display`,`none`),$(`#cvvError`).css(`display`,`none`),$(`#cardEmptyErrors`).css(`display`,`none`),$(`#cvvErrors`).css(`display`,`none`),e==``||e.includes(`_`)?this.cvvEmpty=!0:this.cvvEmpty=!1,e.length<3||e.length==4?this.cvvLength=!0:this.cvvLength=!1}checkWidth(){this.width=window.innerWidth}squareUpForms(){var e=this.applicationID,i=this.accountID;if(!window.Square)throw new Error(`Square.js failed to load properly`);let t;try{t=window.Square.payments(e,i)}catch(_){let f=document.getElementById(`payment-status-container`);f.className=`missing-credentials`,f.style.visibility=`visible`;return}let s;try{s=this.initializeCard(t),this.card=s}catch(_){console.error(`Initializing Card failed`,_);return}this.cardButton=document.getElementById(`card-button`)}initializeCard(e){return es(this,null,function*(){return this.card=yield e.card(),yield this.card.attach(`#card-container`),this.card})}handlePaymentMethodSubmission(e){return es(this,null,function*(){try{this.cardButton.disabled=!0;let i=yield this.tokenize(e),t=yield this.createPayment(i);this.displayPaymentResults(`SUCCESS`),console.debug(`Payment Success`,t)}catch(i){this.cardButton.disabled=!1,this.displayPaymentResults(`FAILURE`),console.error(i.message)}})}displayPaymentResults(e){let i=document.getElementById(`payment-status-container`);e===`SUCCESS`?(i.classList.remove(`is-failure`),i.classList.add(`is-success`)):(i.classList.remove(`is-success`),i.classList.add(`is-failure`)),i.style.visibility=`visible`}tokenize(e){return es(this,null,function*(){let i=yield e.tokenize();if(i.status===`OK`)return i.token;{let t=`Tokenization failed with status: ${i.status}`;throw i.errors&&(t+=` and errors: ${JSON.stringify(i.errors)}`),new Error(t)}})}createPayment(e){var i={sourceToken:``,accountID:``,customerID:``,stripeStatus:``,orgID:``};i.sourceToken=e,i.accountID=this.accountID,i.customerID=this.personDoc.roles[0].stripeCustID,i.stripeStatus=this.organizationDetail
25s().stripeStatus,i.orgID=this.orgID(),this.paymentService.addCardFunction(i).subscribe(t=>{this.creditCard=t,this.bookProductOrder(this.creditCard)},t=>{this.errorText=`<div style="text-align:left">`+t.error+`</div>`,this.errorModalDisplay=!0})}submitCardClick(){event.preventDefault(),this.tabOpen==`newCards`?this.paymentForm.requestCardNonce():this.savedCardPay()}stripeCardSubmitClick(){this.onStripeCardSubmit()}selectSavedCard(e){$(`#cardEmptyErrors`).css(`display`,`none`),$(`.res-saved-cards`).removeClass(`active`),$(`#res-saved-card`+e).addClass(`active`),this.selectedCard=this.savedCardDetails[e],$(`.res-radio-card`).prop(`checked`,!1),$(`#res-radio-card`+e).prop(`checked`,!0)}openTab(e){e==`newCards`?this.accountType==`squareup`&&!this.card&&(setTimeout(()=>{this.squareUpForms()},50),setTimeout(()=>{this.widgetColor.bg2Color!=``&&this.widgetColor.bg2Color!=null&&this.widgetColor.fg2Color!=``&&this.widgetColor.fg2Color!=null?($(`.t2-cart-formBtn`).css(`background-color`,this.widgetColor.bg2Color),$(`.t2-cart-formBtn`).css(`color`,this.widgetColor.fg2Color)):($(`.t2-cart-formBtn`).css(`background-color`,`#3f3f3f !important`),$(`.t2-cart-formBtn`).css(`color`,`#fff`))},50)):e==`savedCards`&&this.accountType==`squareup`&&this.card&&(this.card.destroy(),this.card=null,setTimeout(()=>{this.widgetColor.bg2Color!=``&&this.widgetColor.bg2Color!=null&&this.widgetColor.fg2Color!=``&&this.widgetColor.fg2Color!=null?($(`.t2-cart-formBtn`).css(`background-color`,this.widgetColor.bg2Color),$(`.t2-cart-formBtn`).css(`color`,this.widgetColor.fg2Color)):($(`.t2-cart-formBtn`).css(`background-color`,`#3f3f3f !important`),$(`.t2-cart-formBtn`).css(`color`,`#fff`))},50)),this.selectedCard=void 0,this.tabOpen=e,$(`.res-saved-cards`).removeClass(`active`),$(`.db-tab`).css(`display`,`none`),$(`.db-tab-title`).removeClass(`activeTab`),$(`#`+e).css(`display`,`block`),$(`#`+e+`Tab`).addClass(`activeTab`),$(`.res-radio-card`).prop(`checked`,!1),$(`.res-saved-cards`).removeClass(`active`)}savedCardPay(){if(this.selectedCard==null)$(`#cardEmptyErrors`).css(`display`,`block`);else{$(`.paymentBtn`).button(`loading`),$(`.closeModel`).css(`display`,`none`);Math.round(this.totalAmount*100*100)/100,this.accountID,this.personDoc.roles[0].stripeCustID,this.personDoc.firstName+``+this.personDoc.lastName,this.organizationDetails().stripeStatus,this.orgID(),this.selectedCard.cardID;this.bookProductOrder(this.selectedCard.cardID)}}closeLogin(){$(`#loginModal`).css(`display`,`none`),this.loginDetails={emailid:``,password:``},this.validateEmailId=!1,$(`#loginidError`).css(`display`,`none`)}displayLoginModal(){$(`#loginModal`).css(`display`,`block`)}validateEmailAddress(e){if(e==`login`){var i=this.loginDetails.emailid.toLowerCase();i=i.trim(),$(`#loginidError`).css(`display`,`none`),/^[a-zA-Z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,15}$/.test(i)?this.validateEmailId=!1:this.validateEmailId=!0}else{$(`#emailError`).css(`display`,`none`);var t=this.personDoc.email[0].address.toLowerCase();t=t.trim(),/^[a-zA-Z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,15}$/.test(t)?this.validateRegisterEmailId=!1:this.validateRegisterEmailId=!0}return!1}login(){this.userExists=!1;var e=this.loginDetails.emailid.toLowerCase();e=e.trim(),e==``||this.loginDetails.password==``?(e==``&&$(`#loginidError`).css(`display`,`block`),this.loginDetails.password==``&&$(`#loginpassError`).css(`display`,`block`)):(this.searchPerson.email=e,this.searchPerson.orgID=this.orgID(),e.length==0?(this.validateEmailId=!0,this.loginDetails.password=``):($(`.loadLogin`).button(`loading`),this.validateEmailId=!1,this.universalService.getSurveysCustomerDataFunction(this.searchPerson).subscribe(i=>{if(i.length==0)this.validateEmailId=!0,this.loginDetails.password=``,$(`.loadLogin`).button(`reset`);else{var t=i[0].persons.personID;t=t.replace(/-/g,``),this.paymentService.getKeyVaultClientSecretDataFunction(t,this.loginDetails.password).subscribe(s=>{s.isEmail==`False`?(this.validateEmailId=!0,this.loginDetails.password=``,$(`.loadLogin`).button(`reset`)):s.isPassword==`False`?(this.validatePass=!0,$(`.loadLogin`).button(`reset`)):(this.mainService.setToken(s.jwtToken),this.mainService.setExpiration(s.expiration),this.mainService.setloginInfo({username:t,password:this.loginDetail
25s.password}),this.validatePass=!1,this.universalService.getdocumentfunctionV2(i[0].persons.personID).subscribe(_=>{this.openTab(`savedCards`),this.tabOpen=`savedCards`,this.personDoc=_[0],this.validate(`fName`),this.validate(`lName`),this.validate(`email`),this.validate(`orgName`),this.validate(`phone`),$(`.invalid-email`).css(`display`,`none`),this.getPaymentConfigDetails(`login`),localStorage.loggedInUserEmail=e;var f=this.personDoc.firstName;sessionStorage.setItem(`pId`,this.personDoc.id),sessionStorage.setItem(`pName`,f),this.LoginEvent.emit(this.personDoc.id),$(`#loginModal`).css(`display`,`none`),this.isLoggedInUser=!0,$(`.loadLogin`).button(`reset`)}))},s=>{this.validateEmailId=!0,this.loginDetails.password=``,$(`.loadLogin`).button(`reset`)})}},i=>{this.validateEmailId=!0,this.loginDetails.password=``,$(`.loadLogin`).button(`reset`)})))}removeCard(e){if(window.confirm(`Do you really want to delete this card ? 
26 XXXX XXXX XXXX `+this.savedCardDetails[e].last4)){this.selectedCard=void 0;var i={orgID:this.orgID(),customerID:this.existingCustInfo.customerID,cardID:this.savedCardDetails[e].cardID,accountID:this.accountID,stripeStatus:this.organizationDetails().stripeStatus};this.paymentService.deleteCardFunction(i).subscribe(t=>{t==`Deleted!!`&&this.savedCardDetails.splice(e,1),$(`.deletecard`).hide()})}}loadScript(){let e=document.createElement(`script`);e.src=`https://maps.googleapis.com/maps/api/js?key=AIzaSyBvr1-UCQndo_dF0JKTkF9VIND2UZFFEZA&amp;libraries=places`,e.async=!0,e.defer=!0,$(`head`).append(e)}forgetPassword(){var e=this.loginDetails.emailid.toLowerCase();e=e.trim(),e==``?this.email_forgetClick=!0:(this.notRegistered=!1,this.email_forgetClick=!1,this.searchPerson.email=e,this.searchPerson.orgID=this.orgID(),this.universalService.getSurveysCustomerDataFunction(this.searchPerson).subscribe(i=>{if(i.length!=0){$(`.loadFrgtBtn`).button(`loading`);var t=``;let p=this.organizationDetails();if(location.href.includes(`stage`))if(p.websiteUrl.includes(`meshbasewebsite`))for(var s=p.websiteUrl.split(`.`),t=s[0]+`-stage`,_=1;_<s.length;_++)t+=`.`+s[_];else{var s=p.websiteUrl.replace(`https://`,``).replace(`www.`,``);t=`https://meshbasewebsite-stage.azurewebsites.net/`+s}else t=p.websiteUrl;this.validateEmailId=!1,this.mailDataCust.ReceiverName=i[0].persons.firstName,this.mailDataCust.ReceiverMailID=i[0].persons.email,this.mailDataCust.Subject=`Reset Your `+p.name+` Password`;for(var f=``,_=0;_<p.socialLinks.length;_++)f+=`<span style="display: inline-flex;padding-top:10px;"><a itemprop="url" target="_blank" style="color: white;" href="`+p.socialLinks[_].url+`">`,p.socialLinks[_].type!=`healthgrades`?f+=`<span><img style="width:50px"src="https://meshbasestorage.blob.core.windows.net/icons/`+p.socialLinks[_].type+`.png"></span></a></span>`:f+=`<span> <img style="font-size: 20px;"src="https://ceadstorage.blob.core.windows.net/icons/HG-logo.png"></span></a></span>`;this.mailDataCust.MessageBody=`<div style="width:85%;border: black solid 2px;margin: auto;">                <div style="padding: 6%;">                    <div class="row" style="text-align:center; padding-top: 10px;margin-bottom: 25px;">                        <img id="logo" style="width:200px; padding: 10px;" src=`+p.footerLogo+` />                    </div>                    <div class="row" style="text-align:center; padding-top: 5px;">                        <div style="border: black solid 1px;">                            <div                                style="margin: 8px;padding: 14px;border-top: lightgrey solid 3px;border-bottom: lightgrey solid 3px;font-size: 18px;font-weight: 500;">                                <div>Hello `+i[0].persons.firstName+`,</div>                                <div>We received a request to reset the password for your account.</div>                            </div>                        </div>                    </div>                    <div class="row" style="padding: 15px;"><br> We received a request to reset the password for your account. If you made this request, click the link below to change your password:<br><br><a href='`+t+`/reset?personID=`+i[0].persons.personID+`&value=cart'>Reset Password</a><br><br>If you don't want to change your password or didn't request this, please ignore and delete this message.                    </div>                        <div class="row" style="padding: 15px; text-align: center;">                        <div style="font-size: 16px;"><strong>Cancellation Policy</strong></div>                        <div style="font-size: 16px;">`+this.configDoc.cancellationPolicy.value+`</div>                    </div>                    <div class="row" style="padding: 15px;text-align: center;color: rgb(55, 160, 165);">                        <div style="font-size: 16px;"><i><strong>`+p.name+`</strong></i></div><a style="font-size: 16px;color: rgb(55, 160, 165);" href="http://maps.google.com/maps?q=`+p.address[0].address1+` `+p.address[0].address2+`, `+p.address[0].city+`, `+p.address[0].state
26+` `+p.address[0].zip+`" target="_blank">`+p.address[0].address1+`<br>`+p.address[0].address2+`<br>`+p.address[0].city+`, `+p.address[0].state+` `+p.address[0].zip+`</a>                        <div style="font-size: 16px;">`+p.phone[0].number+`</div>                        <div style="font-size: 16px;"><a style="color: rgb(55, 160, 165);"                                href="`+p.websiteUrl+`/home">www.`+this.domainName()+`</a></div>`+f+`                    </div>                    </div>            </div>`,this.universalService.emailHandlerFunction(this.mailDataCust).subscribe(C=>{}),setTimeout(()=>{$(`.loadFrgtBtn`).button(`reset`),this.success_forgetClick=!0},1e3)}else this.email_forgetClick=!1,this.notRegistered=!0}))}removeItemFromCheckout(){for(var e=0;e<this.cartProductList.length;e++)for(var i=0;i<this.checkCartList.length;i++)this.cartProductList[e].id==this.checkCartList[i].id&&this.cartProductList.splice(e,1);this.calculateTotalPrice(),$(`#outOfStockModal`).css(`display`,`none`)}editItemFromCheckout(){location.reload()}bookProductOrder(e){var i=this.cartPrductService.getAppointmentTemplate();i.orgID=this.orgID(),i.source=`storefront`,i.customerID=this.personDoc.id,i.dateCreated=i.dateBooked=new Date().getTime(),i.id=V.UUID.UUID(),i.domainDiscipline=this.domainDiscipline,i.deliveryMethodID=this.deliveryMethodID,this.selectedAddressIndex!=-1&&(i.deliveryAddress=this.personDoc.address[this.selectedAddressIndex]),i.activity.push({id:V.UUID.UUID(),timeStamp:new Date().getTime(),activity:this.personDoc.firstName+` has placed an order`,type:`default`}),this.cartProductList.forEach(p=>{i.appointmentDetails.push({productServiceID:p.id,type:`product`,price:p.price,startTime:0,endTime:0,staff:[],resources:[],features:p.selectedColor,quantity:p.quantity})});var t=this.cartPrductService.getOrderTemplate();t.id=V.UUID.UUID(),t.orgID=this.orgID(),t.appointmentID=i.id,t.domainDiscipline=this.domainDiscipline,t.customerID=this.personDoc.id,t.deliveryMethodID=this.deliveryMethodID,this.selectedAddressIndex!=-1&&(t.deliveryAddress=this.personDoc.address[this.selectedAddressIndex]),t.dateCreated=new Date().getTime(),t.subType=`product`,t.orderDetails=i.appointmentDetails,t.pricing.estimatedTotal=t.pricing.subTotal=this.cartProductTotal,t.pricing.deliveryCharge=this.deliveryCharges,t.pricing.salesTax=this.tax,t.pricing.grandTotal=t.pricing.subTotal+t.pricing.deliveryCharge+t.pricing.salesTax,t.payment.balanceDue=0,t.payment.charges.push({paymentMethod:`card`,chargeType:`payment`,source:this.storeFrontLoginFlag?e:``,chargeID:``,amount:t.pricing.grandTotal,date:new Date().getTime()}),t.payment.adjustedAmount.remainingPayment=t.payment.adjustedAmount.remainingTotal=t.pricing.grandTotal;var s={id:V.UUID.UUID(),type:`appointment`,subType:`storefront`,status:`new`,timestamp:new Date().getTime(),resourceID:i.id,message:{text:``,timeStamp:0},personID:this.orgAdmin.personID},_={accountID:this.accountID,customerID:this.storeFrontLoginFlag?this.personDoc.roles[0].stripeCustID:``,custName:this.personDoc.firstName+` `+this.personDoc.lastName,applicationFee:0,stripeStatus:this.organizationDetails().stripeStatus,orgID:this.orgID(),cardID:e,serviceID:`NA`},f={appointments:[i],orders:[t],paymentInfo:_,notifications:[s]};this.paymentService.processAppointmentFunction(f).subscribe(p=>{this.displayBookingSuccessModal=!0,sessionStorage.removeItem(`cartProduct`),$(`.paymentBtn`).button(`reset`),this.sendMails()},p=>{$(`.paymentBtn`).button(`reset`)})}onStripeCardSubmit(){if($(`.paymentBtn`).button(`loading`),this.cardEmpty==!1&&this.cardErrors==!1&&this.cvvLength==!1&&this.expiryErrors==!1&&this.cvvLength==!1){this.searchPerson.orgID=this.orgID(),this.searchPerson.email=this.personDoc.email[0].address,this.universalService.getSurveysCustomerDataFunction(this.searchPerson).subscribe(t=>{t.length!=0&&this.universalService.getdocumentfunctionV2(t[0].persons.personID).subscribe(s=>{this.personDoc=s[0]})});var e={email:this.personDoc.email[0].address,id:this.personDoc.id.replace(/-/g,``),password:`abc@123`,accountID:`acct_1EI9wWBYUdpZsaFo`,accountType:this.accountType,stripeStatus:this.organizationDetail
26s().stripeStatus,orgID:this.organizationDetails().id,cardNumber:`4242424242424242`,expirationDate:`1222`,firstName:this.personDoc.firstName,lastName:this.personDoc.lastName};this.paymentService.addCustomerFunction(e).subscribe(t=>{var s=JSON.parse(t);this.newCustomer=s});var i=this.userDetails.expiryDate.split(`/`);this.userDetails.expiryMonth=i[0],this.userDetails.expiryYear=i[1],this.userDetails.cardNumber=this.userDetails.cardNumber.replace(/ /g,``),window.Stripe.card.createToken({number:this.userDetails.cardNumber,exp_month:this.userDetails.expiryMonth,exp_year:this.userDetails.expiryYear,cvc:this.userDetails.cvv},(t,s)=>{if(t==200){var _={amount:Math.round(this.totalAmount*100*100)/100,description:`Test`,sourceToken:s.id,accountID:this.accountID,custName:this.personDoc.firstName+` `+this.personDoc.lastName,applicationFee:Math.round(.005*this.totalAmount*100)/100*0,stripeStatus:this.organizationDetails().stripeStatus,orgID:this.orgID(),serviceID:``};this.paymentService.chargeFunctionV1(_).subscribe(f=>{var p=this.cartPrductService.getAppointmentTemplate();p.orgID=this.orgID(),p.source=`storefront`,p.customerID=this.personDoc.id,p.dateCreated=p.dateBooked=new Date().getTime(),p.id=V.UUID.UUID(),p.domainDiscipline=this.domainDiscipline,p.deliveryMethodID=this.deliveryMethodID,this.selectedAddressIndex!=-1&&(p.deliveryAddress=this.personDoc.address[this.selectedAddressIndex]),p.activity.push({id:V.UUID.UUID(),timeStamp:new Date().getTime(),activity:this.personDoc.firstName+` has placed an order`,type:`default`}),this.cartProductList.forEach(P=>{p.appointmentDetails.push({productServiceID:P.id,type:`product`,name:P.name,price:P.price,startTime:0,endTime:0,staff:[],resources:[],features:P.selectedColor,quantity:P.quantity})});var C=this.orderDoc;C.id=V.UUID.UUID(),C.orgID=this.orgID(),C.appointmentID=p.id,C.domainDiscipline=this.domainDiscipline,C.customerID=this.personDoc.id,C.deliveryMethodID=this.deliveryMethodID,this.selectedAddressIndex!=-1&&(C.deliveryAddress=this.personDoc.address[this.selectedAddressIndex]),C.dateCreated=new Date().getTime(),C.subType=`product`,C.orderDetails=p.appointmentDetails,C.pricing.estimatedTotal=C.pricing.subTotal=this.cartProductTotal,C.pricing.deliveryCharge=this.deliveryCharges,C.pricing.salesTax=this.tax,C.pricing.grandTotal=C.pricing.subTotal+C.pricing.deliveryCharge+C.pricing.salesTax,C.payment.balanceDue=0,C.payment.charges.push({paymentMethod:`card`,chargeType:`payment`,source:`stripe`,chargeID:f,amount:C.pricing.grandTotal,date:new Date().getTime()}),C.payment.adjustedAmount.remainingPayment=C.payment.adjustedAmount.remainingTotal=C.pricing.grandTotal,this.universalService.updateDocumentFunction(this.personDoc).subscribe(P=>{}),this.universalService.updateDocumentFunction(this.orderDoc).subscribe(P=>{}),this.displayBookingSuccessModal=!0,sessionStorage.removeItem(`cartProduct`),$(`.paymentBtn`).button(`reset`),this.sendMails()},f=>{$(`.paymentBtn`).button(`reset`)})}})}else $(`.paymentBtn`).button(`reset`),this.validateExpiryDate(this.userDetails.expiryDate),this.validateCard(this.userDetails.cardNumber),this.validateCvv(this.userDetails.cvv)}getColorPalette(e){var i=this.mainService.getColorPalette(e);i!=null?(this.widgetColor.bg1Color=i.bg1Color,this.widgetColor.fg1Color=i.fg1Color,this.widgetColor.bg2Color=i.bg2Color,this.widgetColor.fg2Color=i.fg2Color):setTimeout(()=>{this.getColorPalette(e)},500)}ngOnDestroy(){this.mainComponent.contactDisplay=!0}static{this.ɵfac=function(i){return new(i||n)(qr(Qt$1),qr(V$1),qr(K),qr(Ie),qr(Jt$1),qr(BF),qr(u1),qr(f),qr(xo),qr(u),qr(ty))}}static{this.ɵcmp=ED({type:n,selectors:[[`app-t2-cart-prduct-list`]],inputs:{domainName:[1,`domainName`],orgID:[1,`orgID`],organizationDetails:[1,`organizationDetails`],widgetStyle:[1,`widgetStyle`],productDocument:[1,`productDocument`],ourTeamDoc:[1,`ourTeamDoc`]},outputs:{LoginEvent:`LoginEvent`},decls:99,vars:21,consts:[[1,`cart-cont-wrapeer`,2,`min-height`,`100vh`,`padding-top`,`1px`,`padding-bottom`,`1px`,`box-sizing`,`border-box`],[1,`t2-cart-container`],[1,`t2-cart-progressbar`],[`id`,`list1`,1,`list`],[`id`,`list2`,1,`list`],[1,`t2-cart-body`],[1,`row`,2,`margin-top`,`8%`,`margin-bottom`,`5%`],[1,`row`,`continueBtn`,`p-10`,2,`cursor`,`pointer`,`font-size`,`18px`,`text-decoration`,`underline`,`text-decoration-color`,`cornflowerblue`,`color`,`cornflowerblue`,`width`,`190px`,3,`click`],[`id`,`overlay`,1,`modal`,`confirmModal`,2,`color`,`rgb(64,64,64)`],[1,`modal-dialog`,2,`top`,`25%`],[1,`modal-content`],[1,`modal-header`,2,`justify-content`,`center`],[1,`modal-title`],[1,`modal-body`,`p-20`],[1,`p-20`],[1,`modal-footer`,`justify-content-around`],[1,`t2-cart-remove`,`fnt-16`,3,`click`],[1,`border-inner`],[1,`t2-cart-remove`,`fnt-16`,`t2-cart-borderLeft`,3,`click`],[1,`modal`,`customerAddressModal`],[1,`modal-dialog`],[1,`modal-header`],[1,`modal-title`,`tx-c`,2,`margin-left`,`auto`],[`type`,`button`,1,`btn-close`,3,`click`],[1,`modal`,`bookingSuccessModal`],[`id`,`overlays`],[`id`,`loginModal`,1,`modal`,2,`display`,`none`],[1,`py-5`,`info-text`],[1,`info-text`],[1,`panel-collapse`,`py-5`],[1,`tab-pane`,`active`],[1,`form-group`,`mb-3`],[1,`t2-res-text`],[`type`,`email`,`placeholder`,`Email`,`required`,`required`,`name`,`emailid`,1,`form-control`,3,`change`,`keyup`,`ngModelChange`,`ngModel`],[1,`red`],[`id`,`loginidError`,1,`t2-res-red`,`errorText`],[`type`,`password`,`placeholder`,`Password`,`name`,`password`,`onkeyup`,`document.getElementById('loginpassError').style.display='none'`,1,`form-control`,3,`ngModelChange`,`ngModel`],[`id`,`loginpassError`,1,`t2-res-red`,`errorText`],[1,`form-group`,`tx-r`],[`type`,`button`,`data-loading-text`,`<i class='fa fa-spinner fa-spin btn-spinner'></i> Sending Mail...`,1,`loadFrgtBtn`,`forgot-pwd-btn`,3,`click`],[1,`config-red`,`form-group`,3,`innerHtml`],[1,`config-success`,`form-group`,3,`innerHtml`],[1,`tx-c`,`registerBtn`],[`type`,`button`,`data-loading-text`,`<i class='fa fa-spinner fa-spin btn-spinner'></i> Logging in...`,1,`btn`,`btn-primary`,`t2-salon-res-btn`,`loadLogin`,`m-5`,3,`click`],[`type`,`button`,1,`btn`,`btn-primary`,`t2-salon-res-btn`,`m-5`,3,`click`],[1,`mail-container`,2,`display`,`none`],[`id`,`target`],[2,`width`,`85%`,`border`,`black solid 2px`,`margin`,`auto`],[2,`padding`,`6%`],[1,`row`,2,`padding-top`,`15px`],[1,`receipt`],[`id`,`outOfStockModal`,1,`modal`,2,`display`,`none`],[1,`modal-title`,`tx-c`],[2,`padding`,`40px`],[1,`modal-footer`,`tx-c`,`row`],[`data-toggle`,`tooltip`,`title`,`Edit Quantity`,1,`t2-cart-remove`,`fnt-16`,3,`click`],[`svgIcon`,`pen`,2,`overflow`,`visible`],[3,`errorText`],[`id`,`map`,2,`opacity`,`0`],[`id`,`cartItemList`,1,`cartItemList`],[1,`row`],[1,`col-lg-8`,`col-sm-12`,`t2-cart-borderRight`],[1,`t2-cart-text`,`fnt-p`,`fl`],[1,`t2-cart-text`,`fnt-p`,`tx-r`],[1,`t2-cartDetails`,`row`,`my-15`],[1,`col-lg-4`,`col-sm-12`],[1,`t2-cart-paymentDetails`],[1,`my-15`,`t2-cart-priceBlock-container`],[1,`t2-cart-quantity-text`],[1,`table`,`tableServices`],[1,`t2-res-text`,`tableHeading2`],[1,`t2-res-text`,`tx-c`],[1,`receipt-mobile`],[1,`fnt-h5`],[1,`tx-r`],[1,`my-15`],[`type`,`submit`,1,`btn`,`btn-primary`,`t2-res-button`,2,`width`,`100%`],[1,`alert`,`alert-danger`],[`id`,`t2-cart-payment`,1,`row`,`t2-cart-payment`],[1,`tx-r`,`p-10`],[1,`productCart`,`p-10`,3,`click`],[`svgIcon`,`cart`,`data-badge`,`0`,`data-toggle`,`tooltip`,`title`,`Go to Cart`,`data-placement`,`left`,`aria-hidden`,`true`,1,`alertBadge`,2,`overflow`,`visible`,`font-size`,`1.2em !important`],[`id`,`new-message-badge`,1,`new-message`,`w3-dropdown-content`],[1,`col-lg-7`],[`id`,`accordion`,1,`t2-cart-paymentSteps`],[1,`accordinHeader`],[1,`t2-cart-text`,`fnt-p`,`textColor`,`customerText`,2,`cursor`,`pointer`,3,`click`],[1,`customerSummery`],[1,`accordionBlock`,`custmerDetails`],[1,`customerDetailsForm`,`p-20`],[1,`t2-cart-text`,`fnt-p`,`textColor`,`methodColor`,2,`cursor`,`pointer`,3,`click`],[1,`paymentMethodSummery`],[1,`fnt-16`],[1,`accordionBlock`,`p-20`,`deliveryMethod`],[1,`t2-cart-methodBlock`,2,`display`,`flex`],[1,`dn`,`error`,`deliveryMethodError`,`py-10`,`fnt-14`],[1,`alert`,`alert-danger`,3,`innerHtml`],[1,`dn`,`error`,`addressError`,`py-10`,`fnt-14`],[`type`,`submit`,1,`btn`,`t2-cart-formBtn`,3,`background`,`color`],[1,`accordionBlock`,`p-20`,`payment`,3,`click`],[1,`col-lg-5`],[`id`,`t2-cart-orderSummery`,1,`t2-cart-payment`,`t2-cart-orderSummery`],[1,`tx-c`],[1,`col-sm-2`,`p-0`],[1,`img-responsive`,2,`width`,`-webkit-fill-available`,3,`src`],[1,`col-sm-10`,`t2-cart-desc`],[1,`t2-cart-borderBottom`],[1,`row`,`cartContent`],[1,`col-sm-8`,`t2-cart-text`,`fnt-18`,2,`padding-left`,`10px`],[1,`col-sm-4`,`t2-cart-text`,`fnt-18`,`tx-r`],[1,`row`,`p-10`],[`id`,`quantity`,1,`t2-cart-quantity-text`,`fl`,`fnt-16`],[1,`input-number-group`],[1,`input-group-button`,3,`click`],[1,`input-number-decrement`],[1,`inputcontainer`],[`readonly`,``,1,`input-number`,3,`keyup`,`keypress`,`ngModelChange`,`ngModel`],[2,`display`,`none`],[1,`loader`],[1,`input-number-increment`],[1,`row`,`px-10`],[3,`click`],[1,`t2-cart-remove`,`fnt-16`],[`svgIcon`,`trash`,2,`overflow`,`visible`],[1,`col-md-10`],[1,`col-md-1`,`tx-r`],[`type`,`submit`,1,`btn`,`btn-primary`,`t2-res-button`,2,`width`,`100%`,3,`click`],[1,`t2-cart-Form-lbl`],[`id`,`fName`,1,`t2-custDetails-div`,`form-group`,`mb-3`],[`type`,`text`,`pattern`,`^[a-zA-Z ]+$$`,`name`,`firstname`,`placeholder`,`Enter your first name`,1,`t2-cart-custForm-input`,`form-control`,3,`ngModelChange`,`keyup`,`ngModel`],[1,`invalid-fName`,`dn`,`error`],[`id`,`lName`,1,`t2-custDetails-div`,`form-group`,`mb-3`],[`type`,`text`,`pattern`,`^[a-zA-Z ]+$$`,`name`,`lastName`,`placeholder`,` Enter your last name`,1,`t2-cart-custForm-input`,`form-control`,3,`ngModelChange`,`keyup`,`ngModel`],[1,`invalid-lName`,`dn`,`error`],[`id`,`phone`,1,`t2-custDetails-div`,`form-group`,`mb-3`],[`type`,`text`,`name`,`phone`,`placeholder`,`Enter your phone number`,1,`t2-cart-custForm-input`,`form-control`,3,`ngModelChange`,`keyup`,`ngModel`,`maskito`],[1,`invalid-phone`,`dn`,`error`],[`id`,`emailClass`,1,`t2-custDetails-div`,`form-group`,`mb-3`],[`type`,`text`,`name`,`emailAddress`,`pattern`,"^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$",`placeholder`,`Enter your email address`,1,`t2-cart-custForm-input`,`form-control`,3,`ngModelChange`,`keyup`,`ngModel`],[1,`invalid-email`,`dn`,`error`],[1,`config-red`,`my-10`],[`data-loading-text`,`<i class='fa fa-spinner fa-spin btn-spinner'></i> Please wait`,`type`,`button`,1,`btn`,`t2-cart-formBtn`,`loadSubmit`,`mt-3`,3,`click`],[1,`mb-10`],[1,`mb-10`,`fnt-16`],[1,`config-link`,`btn`,`btn-primary`,`signedIn-btn`,3,`click`],[`type`,`password`,`id`,`newRegPwd`,`placeholder`,`Password`,`name`,`newRegPwd`,`required`,`required`,1,`t2-cart-custForm-input`,`form-control`,3,`ngModelChange`,`keyup`,`ngModel`],[1,`invalid-password`,`dn`,`error`],[`type`,`password`,`id`,`newRegConfirmPwd`,`placeholder`,`Confirm Password`,`name`,`newRegConfirmPwd`,`required`,`required`,1,`t2-cart-custForm-input`,`form-control`,3,`ngModelChange`,`keyup`,`ngModel`],[1,`invalid-confirmPassword`,`dn`,`error`],[1,`empty-confirmPassword`,`dn`,`error`],[3,`innerHtml`],[`type`,`radio`,`name`,`methodOption`,2,`margin-top`,`8px`,3,`click`,`id`],[1,`col-sm-8`],[`for`,`methodOption`,1,`px-20`],[1,`fnt-16`,`t1-cart-text`],[1,`col-sm-4`],[1,`t1-cart-text`,`fnt-16`],[1,`col-sm-6`,`py-10`],[1,`row`,`p-10`,2,`cursor`,`pointer`,`font-size`,`18px`,`text-decoration`,`underline`,`text-decoration-color`,`cornflowerblue`,`color`,`cornflowerblue`,`width`,`190px`,3,`click`],[1,`m-5`,`addressBlock`,3,`id`],[1,`tx-r`,3,`click`],[`svgIcon`,`trash`,`aria-hidden`,`true`,2,`overflow`,`visible`],[1,`py-5`,2,`font-weight`,`500`],[1,`p-10`],[1,`modal-footer`,`tx-c`,2,`display`,`flex`,`justify-content`,`center`],[`data-loading-text`,`<i class='fa fa-spinner fa-spin btn-spinner'></i>loading`,2,`background`,`none`,3,`click`],[`type`,`button`,1,`fnt-16`,`t2-cart-borderLeft`,2,`background`,`none`,3,`click`],[`type`,`submit`,1,`btn`,`t2-cart-formBtn`,3,`click`],[1,`accordinHeader`,3,`click`],[1,`t2-cart-text`,`fnt-p`,`textColor`,`paymentColor`,2,`cursor`,`pointer`],[1,`my-10`],[1,`row`,`t2-res-text`,`p-10`],[`id`,`newCards`,1,`db-tab`],[`id`,`savedCards`,1,`db-tab`],[`id`,`cardEmptyErrors`,1,`alert`,`alert-danger`,`t2-res-errorMgs`],[`id`,`savedCardsTab`,1,`col-sm-6`,`db-tab-title`,`p-5`,3,`click`],[`id`,`newCardsTab`,1,`col-sm-6`,`db-tab-title`,`p-5`,3,`click`],[`id`,`payment-form`],[`id`,`card-container`],[`id`,`payment-status-container`],[1,`row`,`saveC
26ardRow`],[1,`col-sm-1`,`saveCardCol`,`p-0`],[`type`,`radio`,1,`res-radio-card`,`cp`,3,`click`,`id`],[1,`col-sm-10`,`res-saved-cards`,3,`id`],[1,`imgSaved-cards`,2,`width`,`70%`,3,`src`],[1,`col-sm-5`,`p-0`],[1,`col-sm-4`,`p-0`],[1,`col-sm-1`,`tx-c`,`p-0`,`cp`,3,`click`],[`aria-hidden`,`true`,`svgIcon`,`trash`,2,`overflow`,`visible`],[`id`,`card-button`,`data-loading-text`,`<i class='fa fa-spinner fa-spin btn-spinner'></i> Processing...`,1,`btn`,`t2-cart-formBtn`,`paymentBtn`,3,`click`],[1,`t2-res-text`,`p-10`],[`data-loading-text`,`<i class='fa fa-spinner fa-spin btn-spinner'></i> Processing...`,1,`btn`,`t2-cart-formBtn`,`paymentBtn`,3,`click`],[1,`form-group`,`mb-3`,2,`padding-left`,`0px`,`padding-right`,`0px`],[`for`,`cardNumber`],[`type`,`text`,`name`,`cardNumber`,`placeholder`,`XXXX XXXX XXXX XXXX`,1,`form-control`,3,`keyup`,`keypress`,`ngModelChange`,`maskito`,`ngModel`],[1,`error`],[1,`col-sm-12`,`col-md-7`,2,`padding-right`,`5px`,`padding-left`,`0px`],[`type`,`text`,`placeholder`,`MM/YY`,`name`,`expiryDate`,`id`,`expiryDate`,1,`form-control`,3,`keyup`,`keypress`,`ngModelChange`,`maskito`,`ngModel`],[1,`col-sm-12`,`col-md-5`,`pull-right`,2,`padding-right`,`0px`,`padding-left`,`5px`],[`for`,`cvv`],[`type`,`password`,`pattern`,`\\d*`,`maxlength`,`4`,`name`,`cvCode`,`placeholder`,`CVV`,1,`form-control`,3,`ngModelChange`,`keyup`,`keypress`,`ngModel`],[1,`col-sm-3`],[1,`col-sm-6`],[`src`,`https://meshbasestorage.blob.core.windows.net/images/empty%20cart%20image%20commonArtboard%201.png`,1,`img-responsive`,`img-fluid`,2,`margin-left`,`auto`,`margin-right`,`auto`],[1,`form-group`,`row`],[1,`form-group`,`mb-3`,`col-sm-6`,`pl-0`],[`for`,`address1`],[`type`,`text`,`placeholder`,`Enter Address`,`name`,`address1`,1,`form-control`,3,`ngModelChange`,`ngModel`],[1,`form-group`,`mb-3`,`col-sm-6`,`pr-0`],[`for`,`address2`],[`type`,`text`,`placeholder`,`Enter Address`,`name`,`address2`,1,`form-control`,3,`ngModelChange`,`ngModel`],[1,`form-group`,`mb-3`,`col-md-6`,`pl-0`],[`for`,`city`],[`type`,`text`,`placeholder`,`Enter city`,`name`,`city`,1,`form-control`,3,`ngModelChange`,`ngModel`],[1,`form-group`,`mb-3`,`col-md-6`,`pr-0`],[`for`,`state`],[`type`,`text`,`placeholder`,`Enter state`,`name`,`state`,`onkeypress`,`return /[a-z]/i.test(event.key)`,`maxlength`,`10`,1,`form-control`,3,`ngModelChange`,`keyup`,`ngModel`],[`for`,`zip`],[`type`,`text`,`placeholder`,`Enter zip`,`name`,`zip`,`oninput`,`this.value=this.value.replace(/(?![0-9])./gmi,'')`,1,`form-control`,3,`ngModelChange`,`ngModel`],[1,`tx-c`,`p-10`],[`data-loading-text`,`<i class='fa fa-spinner fa-spin btn-spinner'></i> Loading...`,1,`btn`,`form-btn`,`pay-btn`,`bg-color`,`my-10`,3,`click`],[1,`modal-title`,`tx-c`,`fnt-h4`],[1,`modal-body`,`p-20`,`tx-c`],[`svgIcon`,`check`,1,`p-15`,`bookSuccessCheck`],[1,`p-20`,`tx-c`],[3,`innerHTML`],[2,`color`,`red`],[`type`,`button`,1,`btn`,`btn-primary`,`t2-sal-res-btn`,`m-5`,3,`click`],[2,`padding`,`10px`],[1,`row`,2,`padding-top`,`5px`],[2,`font-weight`,`500`,`font-size`,`16px`,`float`,`right`],[`cellpadding`,`10`,2,`border`,`none`,`width`,`100%`],[2,`font-weight`,`bold`,`font-size`,`16px`],[2,`font-size`,`16px`,`text-align`,`right`],[2,`font-weight`,`bold`,`padding`,`20px`,`text-align`,`center`,`background-color`,`#ececec`],[2,`text-align`,`center`,`width`,`100%`],[`cellpadding`,`10`,2,`border`,`none`,`width`,`100%`,`margin-top`,`20px`],[2,`font-size`,`16px`,`font-weight`,`500`,`text-align`,`left`],[2,`text-align`,`right`,`font-size`,`16px`,`font-weight`,`500`],[2,`text-align`,`right`],[2,`border-top`,`1px solid black`],[3,`sendCloseModal`,`errorText`]],template:function(i,t){i&1&&(Ni(0,`div`,0)(1,`div`,1)(2,`div`)(3,`ul`,2)(4,`li`,3),lw(5,`Cart`),Bl(),Ni(6,`li`,4),lw(7,`Payment`),Bl()(),gb(8,qt,108,43,`div`,5),gb(9,Rt,5,0,`div`,6),Ni(10,`div`,7),Zh(`click`,function(){return t.navigateToAllProd()}),lw(11,`Continue Shopping`),Bl()(),Ni(12,`div`,8)(13,`div`,9)(14,`div`,10)(15,`div`,11)(16,`h4`,12),lw(17,`Warning`),Bl()(),Ni(18,`div`,13)(19,`label`,14),lw(20,`Are you sure want to remove this item?`),Bl()(),Ni(21,`div`,15)(22,`label`,16),Zh(`click`,function(){return t.removeItem()}),lw(23,`Remove`),Bl(),Hh(24,`div`,17),Ni(25,`label`,18),Zh(`click`,function(){return t.closeModal()}),lw(26,`Cancel`),Bl()()()()()()(),Ni(27,`div`,19)(28,`div`,20)(29,`div`,10)(30,`div`,21)(31,`h4`,22),lw(32,`Customer Address`),Bl(),Ni(33,`button`,23),Zh(`click`,function(){return t.closeAddress()}),Bl()(),gb(34,Wt,25,5,`div`,13),Bl()()(),Ni(35,`div`,24),gb(36,jt,14,1,`div`,20),Bl(),Hh(37,`div`,25),Ni(38,`div`,26)(39,`div`,20)(40,`div`,10)(41,`div`,13)(42,`div`,27),lw(43,`Thank y
26ou for shopping with us again! `),Bl(),Ni(44,`div`,28),lw(45,`Please sign in:`),Bl(),Ni(46,`div`,29)(47,`div`,30)(48,`div`,31)(49,`label`,32),lw(50,`Email Address`),Bl(),Ni(51,`input`,33),Zh(`change`,function(){return t.validateEmailAddress(`login`)})(`keyup`,function(){return t.validateEmailAddress(`login`)}),vg(`ngModelChange`,function(_){return pw(t.loginDetails.emailid,_)||(t.loginDetails.emailid=_),_}),Bl(),AI(),gb(52,Ht,2,0,`span`,34),Ni(53,`div`,35),lw(54,`Please enter email address.`),Bl()(),Ni(55,`div`,31)(56,`label`,32),lw(57,`Password`),Bl(),Ni(58,`input`,36),vg(`ngModelChange`,function(_){return pw(t.loginDetails.password,_)||(t.loginDetails.password=_),_}),Bl(),AI(),gb(59,Xt,2,0,`span`,34),Ni(60,`div`,37),lw(61,`Please enter your password.`),Bl()(),Ni(62,`div`,31)(63,`div`,38)(64,`button`,39),Zh(`click`,function(){return t.forgetPassword()}),lw(65,`Forgot password? `),Bl()()(),gb(66,Jt,2,0,`span`,34),gb(67,Zt,4,1,`div`,40),gb(68,Kt,1,1,`div`,41),Bl()(),Ni(69,`div`,42)(70,`button`,43),Zh(`click`,function(){return t.login()}),lw(71,`Login `),Bl(),Ni(72,`button`,44),Zh(`click`,function(){return t.closeLogin()}),lw(73,`Close `),Bl()()()()()(),Ni(74,`div`,45)(75,`div`,46)(76,`div`,47)(77,`div`,48)(78,`div`,49),gb(79,ii,46,28,`div`,50),Bl()()()()(),Ni(80,`div`,51)(81,`div`,9)(82,`div`,10)(83,`div`,21)(84,`h4`,52),lw(85,`Oops! We just ran out of stock!`),Bl()(),Ni(86,`div`)(87,`div`,53),lw(88,` We regret to inform you that the following product is out of stock: `),Hh(89,`br`),Eb(90,ni,2,1,`div`,null,vb),Bl(),Ni(92,`div`,54)(93,`div`)(94,`label`,55),Zh(`click`,function(){return t.editItemFromCheckout()}),lw(95,`Edit Item `),Hh(96,`mat-icon`,56),Bl()()()()()()(),gb(97,oi,1,1,`app-error-modal`,57),Hh(98,`div`,58)),i&2&&(og(`background`,t.widgetColor.bg1Color)(`color`,t.widgetColor.fg1Color),zE(8),mb(t.cartProductList.length>0?8:-1),zE(),mb(t.cartProductList.length==0?9:-1),zE(18),og(`display`,t.displayAddressFlag?`block`:`none`),zE(7),mb(t.currAddress!=null?34:-1),zE(),og(`display`,t.displayBookingSuccessModal?`block`:`none`),zE(),mb(t.configDoc!=null?36:-1),zE(15),yg(`ngModel`,t.loginDetails.emailid),kI(),zE(),mb(t.validateEmailId==!0?52:-1),zE(6),yg(`ngModel`,t.loginDetails.password),kI(),zE(),mb(t.validatePass==!0?59:-1),zE(7),mb(t.notRegistered==!0?66:-1),zE(),mb(t.email_forgetClick==!0&&t.configDoc!=null&&t.configDoc.forgotPasswordText.display?67:-1),zE(),mb(t.success_forgetClick==!0&&t.configDoc!=null&&t.configDoc.forgotPasswordLinkSentText.display?68:-1),zE(11),mb(t.cartProductList!=null?79:-1),zE(11),Ib(t.checkCartList),zE(7),mb(t.errorModalDisplay?97:-1))},dependencies:[Qn,Xn,Xe$1,qn,$n,mt$1,Zt$1,Yt$1,hn,un,Oe$1,xe,Se,b,wt$1,Qt$1,Jt$1],styles:[`.t2-cart-container[_ngcontent-%COMP%]{width:68%;margin:100px auto}.t2-cart-body[_ngcontent-%COMP%]{margin-top:60px}.t2-cart-desc[_ngcontent-%COMP%]{padding-top:15px}b[_ngcontent-%COMP%]{font-weight:700}.signedIn-btn[_ngcontent-%COMP%]{background:#337ab7;border-color:#337ab7;color:#fff;cursor:pointer}.addressBlock[_ngcontent-%COMP%]{border:solid 1px rgba(18,18,18,.15);padding:5px 15px}.activeAddress[_ngcontent-%COMP%]{border:solid 2px rgba(43,40,90)!important}.addressBtn[_ngcontent-%COMP%]{cursor:pointer}.t2-cart-payment[_ngcontent-%COMP%], .errorText[_ngcontent-%COMP%], .customerSummery[_ngcontent-%COMP%], .paymentMethodSummery[_ngcontent-%COMP%]{display:none}.t2-res-red[_ngcontent-%COMP%]{color:red}.inputcontainer[_ngcontent-%COMP%]{position:relative}.icon-container[_ngcontent-%COMP%]{position:absolute;right:13px;top:calc(50% - 10px)}.loader[_ngcontent-%COMP%]{position:relative;height:17px;width:17px;display:inline-block;animation:_ngcontent-%COMP%_around 5.4s infinite}@keyframes _ngcontent-%COMP%_around{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.loader[_ngcontent-%COMP%]:after, .loader[_ngcontent-%COMP%]:before{content:"";background:transparent;position:absolute;display:inline-block;width:100%;height:100%;border-width:2px;border-color:#333 #333 transparent transparent;border-style:solid;border-radius:20px;box-sizing:border-box;top:0;left:0;animation:_ngcontent-%COMP%_around .7s ease-in-out infinite}.loader[_ngcontent-%COMP%]:after{animation:_ngcontent-%COMP%_around .7s ease-in-out .1s infinite;background:transparent}
26.t2-cart-progressbar[_ngcontent-%COMP%]{counter-reset:step;margin:100px auto 20px;max-width:1000px}.t2-cart-progressbar[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]{list-style:none;display:inline-grid;width:49%;position:relative;text-align:center;color:#a2a2a2}.t2-cart-progressbar[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]:before{content:counter(step);counter-increment:step;width:30px;height:30px;line-height:26px;border:2px solid #a2a2a2;border-radius:100%;display:block;text-align:center;margin:0 auto 10px;background-color:#fff;z-index:1}.t2-cart-progressbar[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]:after{content:"";position:absolute;width:100%;height:2px;background-color:#a2a2a2;top:15px;left:-50%}.t2-cart-progressbar[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]:first-child:after{content:none}.t2-cart-progressbar[_ngcontent-%COMP%]   li.active[_ngcontent-%COMP%]{color:#20bd99}.t2-cart-progressbar[_ngcontent-%COMP%]   li.active[_ngcontent-%COMP%]:before{border-color:#20bd99;color:#20bd99}.t2-cart-progressbar[_ngcontent-%COMP%]   li.active[_ngcontent-%COMP%] + li[_ngcontent-%COMP%]:after{background-color:#20bd99}.t2-cartDetails[_ngcontent-%COMP%]{box-shadow:0 0 6px #0003,0 0 6px transparent;border-radius:5px}img[_ngcontent-%COMP%]{margin-bottom:unset!important}.t2-cart-text[_ngcontent-%COMP%]{letter-spacing:.01em;font-weight:700}.fnt-14[_ngcontent-%COMP%]{font-size:14px}.fnt-16[_ngcontent-%COMP%]{font-size:16px}.input-number-group[_ngcontent-%COMP%]{display:-webkit-flex;display:-ms-flexbox;display:flex}.input-number-group[_ngcontent-%COMP%]   input[type=number][_ngcontent-%COMP%]::-webkit-inner-spin-button, .input-number-group[_ngcontent-%COMP%]   input[type=number][_ngcontent-%COMP%]::-webkit-outer-spin-button{-webkit-appearance:none}.input-number-group[_ngcontent-%COMP%]   .input-group-button[_ngcontent-%COMP%]{line-height:25px}.input-number-group[_ngcontent-%COMP%]   .input-number[_ngcontent-%COMP%]{width:45px;padding:0 10px;text-align:center;outline:none;display:block;margin:0}.input-number-group[_ngcontent-%COMP%]   .input-number[_ngcontent-%COMP%], .input-number-group[_ngcontent-%COMP%]   .input-number-decrement[_ngcontent-%COMP%], .input-number-group[_ngcontent-%COMP%]   .input-number-increment[_ngcontent-%COMP%]{border:1px solid #cacaca;height:25px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border-radius:4px}.input-number-group[_ngcontent-%COMP%]   .input-number-decrement[_ngcontent-%COMP%], .input-number-group[_ngcontent-%COMP%]   .input-number-increment[_ngcontent-%COMP%]{display:inline-block;width:30px;background:#e6e6e6;color:#0a0a0a;text-align:center;font-weight:700;cursor:pointer;font-size:1.4rem}.input-number-group[_ngcontent-%COMP%]   .input-number-decrement[_ngcontent-%COMP%]{margin-right:2px}.input-number-group[_ngcontent-%COMP%]   .input-number-increment[_ngcontent-%COMP%]{margin-left:2px}.t2-cart-quantity-text[_ngcontent-%COMP%]{padding-right:10px}.t2-cart-borderBottom[_ngcontent-%COMP%]{border-bottom:1px solid #eeeeee;padding-bottom:25px}.t2-cart-borderLeft[_ngcontent-%COMP%]{border-left:2px solid #eeeeee}.t2-cart-borderRight[_ngcontent-%COMP%]{border-right:1px solid #eeeeee;padding-right:30px}.error[_ngcontent-%COMP%], .asterisk[_ngcontent-%COMP%]{color:red}.dn[_ngcontent-%COMP%]{display:none}.t2-cart-remove[_ngcontent-%COMP%]{font-weight:600;padding-left:10px;padding-top:5px;text-decoration:none;border:none;background:none;cursor:pointer}.t2-cart-methodBlock[_ngcontent-%COMP%]{border:solid 1px;padding:20px 30px;margin-bottom:10px}a[aria-expanded=true][_ngcontent-%COMP%]{color:#000}.t2-cart-Form-lbl[_ngcontent-%COMP%]{font-size:16px}.t2-cart-custForm-input[_ngcontent-%COMP%]{border:1px solid rgba(0,0,0,.12);font-size:15px;margin:0;height:40px}.t2-cart-formBtn[_ngcontent-%COMP%]{padding:12px 83px;font-size:16px;width:100%}#overlay[_ngcontent-%COMP%]{position:fixed;display:none;width:100%;height:100%;left:0;right:0;bottom:0;background-color:#00000080;z-index:2;cursor:pointer}.forgot-pwd-btn[_ngcontent-%COMP%]{border:none;background:none}.customerAddressModal[_ngcontent-%COMP%]{overflow-y:auto}#loginModal[_ngcontent-%COMP%], .bookingSuccessModal[_ngcontent-%COMP%]{background:#0000006e}#outOfStockModal[_ngcontent-%COMP%], .customerAddressModal[_ngcontent-%COMP%]{background-color:#00000080}.modal-dialog[_ngcontent-%COMP%]{top:20%}.t2-cart-paymentSteps[_ngcontent-%COMP%]{border-right:1px solid #eaeaec;padding-right:30px}.t2-cart-priceDetail-baseRow[_ngcontent-%COMP%]{margin-bottom:8px}.t2-cart-priceDetail-total[_ngcontent-%COMP%]{font-weight:600;padding-top:10px;border-top:1px solid #eaeaec}.accordinHeader[_ngcontent-%COMP%]{padding:15px 0;border-bottom:1px solid #eaeaec}.t2-cartDetails[_ngcontent-%COMP%]{padding:20px}.fnt-18[_ngcontent-%COMP%]{font-size:18px}.bookSuccessCheck[_ngcontent-%COMP%]{display:inline!important;background:#e1e1e1;border-radius:30px;font-size:21px}  .bookSuccessCheck svg{width:30px!important;height:30px!important}#successModal[_ngcontent-%COMP%]{width:30%;left:35%;top:40%}
26#successModal[_ngcontent-%COMP%]   .modal-header[_ngcontent-%COMP%]{text-align:center;padding:0%!important}#overlays[_ngcontent-%COMP%]{position:fixed;display:none;width:100%;height:100%;inset:0;background-color:#00000080;z-index:2;cursor:pointer}.closeModel[_ngcontent-%COMP%]{font-size:50px!important;opacity:.6!important;padding-right:10px!important}.t2-colLeft[_ngcontent-%COMP%]{padding-left:0}.t2-colRight[_ngcontent-%COMP%]{padding-right:0}.editCart[_ngcontent-%COMP%]{text-align:right;cursor:pointer;font-size:16px;text-decoration:underline;text-decoration-color:#6495ed;color:#6495ed}.res-saved-cards[_ngcontent-%COMP%]{margin:10px;padding:20px 10px;border:1px solid #ccc}.res-saved-cards.active[_ngcontent-%COMP%]{box-shadow:0 2px 2px #00000024,0 3px 1px -2px #0000001f,0 1px 5px #0003}.db-tab[_ngcontent-%COMP%]{padding:20px}.db-tab-title[_ngcontent-%COMP%]{width:50%;cursor:pointer;border-bottom:1px solid #ccc;background:#e2e2e2;border-top-left-radius:3px;border-top-right-radius:3px;padding:8px 20px;font-weight:600;text-align:center}.activeTab[_ngcontent-%COMP%]{text-decoration:none;border:1px solid #ccc;border-bottom:none!important;background:#fff}#savedCards[_ngcontent-%COMP%]   input[type=radio][_ngcontent-%COMP%]{margin:40px 0 0}#cardEmptyErrors[_ngcontent-%COMP%]{display:none}.new-message[_ngcontent-%COMP%]{padding:15px;width:300px;box-shadow:0 5px 20px #c4c4c452;margin-top:10px;border:1px solid #b5b5b5;overflow-y:scroll;height:300px}.fr[_ngcontent-%COMP%]{float:right}.alertBadge[_ngcontent-%COMP%]{position:relative;font-size:18px}.alertBadge[data-badge][_ngcontent-%COMP%]:after{content:attr(data-badge);position:absolute;top:-6px;right:-10px;font-size:.7em;background:green;color:#fff;width:18px;height:18px;text-align:center;line-height:18px;border-radius:50%;box-shadow:0 0 1px #333}.productCart[_ngcontent-%COMP%]{cursor:pointer}.border-inner[_ngcontent-%COMP%]{border-left:2px solid #eeeeee;height:30px}@media only screen and (max-width:1440px){.t2-cart-container[_ngcontent-%COMP%]{width:80%}}@media only screen and (max-width:1024px){.t2-cart-container[_ngcontent-%COMP%]{width:85%}}@media only screen and (max-width:768px){.t2-colLeft[_ngcontent-%COMP%]{padding-left:0;padding-right:0}.t2-colRight[_ngcontent-%COMP%]{padding-right:0;padding-left:0}#successModal[_ngcontent-%COMP%]{width:60%;left:21%;top:40%}}@media only screen and (max-width:500px){.db-tab[_ngcontent-%COMP%]{padding:20px 0}.payment.p-20[_ngcontent-%COMP%]{padding:0}}@media only screen and (max-width:425px){#successModal[_ngcontent-%COMP%]{width:86%;left:8%;top:40%}.t2-cart-borderRight[_ngcontent-%COMP%]{padding-right:15px;border-right:unset}.t2-cart-paymentSteps[_ngcontent-%COMP%]{padding-right:0;border-right:unset}.t2-cartDetails[_ngcontent-%COMP%]   .tx-r[_ngcontent-%COMP%]{text-align:unset}.t2-cart-container[_ngcontent-%COMP%]{width:100%}.cartContent[_ngcontent-%COMP%]   .tx-r[_ngcontent-%COMP%]{text-align:unset!important}}`],changeDetection:1})}}return n})();export{bi as T2CartPrductListComponent};

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.